This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] main_name cleanups
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 6 Jan 2014 10:11:34 -0700
- Subject: [PATCH 0/3] main_name cleanups
- Authentication-results: sourceware.org; auth=none
This series cleans up the "main_name" code both for multi-inferior and
for the long-running objfile splitting project.
Currently, the name and language of main are globals. Also, they can
set in a couple of spots in the debuginfo readers.
Their global-ness can, I think, affect multi-inferior operation. If
you have two inferiors that have different main names, then I think
perhaps some unwinding scenario could fail, because main_name will
necessarily be incorrect for one of them, and because inside_main_func
checks this value. The fix here is to make the determination
per-progspace.
Setting them in the debuginfo readers is bad because, once debuginfo
sharing happens, the second progspace to use the debuginfo will not
pick up the main name automatically. The fix here is to record the
debuginfo readers' findings in the per-BFD object.
Let me know what you think.
Built and regtested on x86-64 Fedora 18.
Tom