This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

macros, debug information, and parse_macro_definition


One of my projects at work is to do the necessary gcc and gdb work to
allow users of sgdb (our GUI on top of GDB) to do macro expansion.

Now, we use ELF/STABS, not ELF/DWARF...

The encoding of macros that I have chosen is very very similar to the
DWARF-2 encoding.  In particular, the string is the same.  (I see no
reason to invent a new encoding.)

As a result, at some point I will need to call a function which will
either be identical to or 99% identical to parse_macro_definition.
So, I'd like to propose that the function parse_macro_definition be
made non static and that it and its support functions (copy_string,
dwarf2_macro_malformed_definition_complaint, consume_improper_spaces
-- all three of which are called *ONLY* by parse_macro_defintion) be
moved to another file -- since they are not DWARF specific anymore.

Any objections?  File name?

My inclination is to move them to macrotab.c since the function
parse_macro_defintion calls functions within that file and can be
thought of as a thin veneer above the functions macro_define_object
and macro_define_function.

Comments?

David
--
David Taylor
dtaylor at emc dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]