This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [PATCH 0/3] main_name cleanups


>>>>> "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


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