[PATCH 0/3] main_name cleanups

Tom Tromey tromey@redhat.com
Mon Jan 13 20:31:00 GMT 2014


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> I was just wondering why duplicate the main name/language both in the
Pedro> progspace and in the objfiles?  Wouldn't just storing a pointer to the
Pedro> objfile that has the main name and its language in the progspace
Pedro> be enough?  If not, then it'd be good to mention that in a comment,
Pedro> I think.

The current series is just a simple transform of the existing code.
I think your proposed approach would work ok, though the current code
returns "main" even if it isn't defined in the program -- so we'd need
some extra hack for that.  I'll add a note about this.

If we ever want to support DW_AT_main_subprogram, we'll need some other
changes as well, since multiple functions can be marked that way.

Tom



More information about the Gdb-patches mailing list