This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/3] main_name cleanups
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 13 Jan 2014 13:31:12 -0700
- Subject: Re: [PATCH 0/3] main_name cleanups
- Authentication-results: sourceware.org; auth=none
- References: <1389028297-16977-1-git-send-email-tromey at redhat dot com> <52CAFDCD dot 7070000 at redhat dot com>
>>>>> "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