Keil Logo

--expandarrays

3.21 --expandarrays

Prints data addresses, including arrays that are expanded both inside and outside structures.

Restrictions

You can use this option with --text -a or with --fieldoffsets.

Example

The following example shows the output for a struct containing arrays when --fieldoffsets --expandarrays is specified:
< more foo.c
struct S {
    char A[8];
    char B[4];
};
struct S s;

struct S* get()
{
    return &s;
}

< armcc --debug -c foo.c
< fromelf --fieldoffsets --expandarrays foo.o


; Structure, S , Size 0xc bytes, from foo.c
|S.A|                                    EQU    0        ;  array[8] of char
|S.A[0]|                                 EQU    0        ;  char
|S.A[1]|                                 EQU    0x1      ;  char
|S.A[2]|                                 EQU    0x2      ;  char
|S.A[3]|                                 EQU    0x3      ;  char
|S.A[4]|                                 EQU    0x4      ;  char
|S.A[5]|                                 EQU    0x5      ;  char
|S.A[6]|                                 EQU    0x6      ;  char
|S.A[7]|                                 EQU    0x7      ;  char
|S.B|                                    EQU    0x8      ;  array[4] of char
|S.B[0]|                                 EQU    0x8      ;  char
|S.B[1]|                                 EQU    0x9      ;  char
|S.B[2]|                                 EQU    0xa      ;  char
|S.B[3]|                                 EQU    0xb      ;  char
; End of Structure S

    END
Non-ConfidentialPDF file icon PDF versionARM DUI0459G
Copyright © 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.