This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[OBJDUMP debugging] inlined enum
- From: Giovanni Visciano <giovanni_visciano at yahoo dot it>
- To: binutils at sourceware dot org
- Date: Tue, 18 Dec 2007 17:18:21 +0000 (GMT)
- Subject: [OBJDUMP debugging] inlined enum
I'm looking at --debugging* options of objdump.
For some object I'm debugging, I can see a strange debugging type report:
some C structure fields of type resolving (via typedef) to an enum are expanded "inline", although they are not defined like "inlined enum".
Example:
typedef enum {
E_A,
E_B,
E_C
} ENUM_E;
typedef struct {
ENUM_E e;
} STRUCT_S;
debugging report:
typedef struct {
enum {
E_A,
E_B,
E_C
} e;
} STRUCT_S;
I have compared the ".stabs" section of two object, one OK and the other KO.
Both ".stabs" first define the "typedef enum", and the use it (via reference) in the field type.
In this case, I would like to obtain a one-to-one corrispondence between the oginal C data definition and the debugging information reported from objdump --debugging*.
Why the debug_write() "engine" execute the call-back functions in a different order respect to the stabs info,
that carry to define the "enum" after its use?
PS:
Is there a clean way for me to obtain the type name of the enum defined in the prdbg.c :: pr_enum_type () / tg_enum_type () call-back functions?
Thanks,
Giovanni
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html