3.24 --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 DUI0477M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.