This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC v2] fix regressions with target-async
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 03 Mar 2014 16:38:02 +0000
- Subject: Re: [RFC v2] fix regressions with target-async
- Authentication-results: sourceware.org; auth=none
- References: <1393609699-26407-1-git-send-email-tromey at redhat dot com> <5310D2F9 dot 2090507 at redhat dot com> <87mwh7cks4 dot fsf at fleche dot redhat dot com>
On 03/03/2014 04:24 PM, Tom Tromey wrote:
> Pedro> But this looks bogus to me -- it's only reachable if you already
> Pedro> have the target pushed because you're debugging a threaded core,
> Pedro> and then do "attach"...
>
> FWIW, gdb doesn't recognize multi-threaded core files on the AIX machine
> to which I have access. It seems that perhaps it is intended to work,
> but neither my branch nor the gdb 7.6 installed on that machine do in
> fact work.
I was wrong on how this was supposedly reachable. No need for cores.
Does multi-threading support work when debugging live programs?
Looks like the target pushes itself from the new_objfile observer:
static void
new_objfile (struct objfile *objfile)
{
if (objfile)
pd_enable ();
else
pd_disable ();
}
Say, as a result of "file ...".
So it seems like that would end up pushing the target even
before we had execution. Then later, an "attach" actually
activates thread debugging (with pd_activate).
linux-thread-db.c has:
/* Don't attempt to use thread_db on executables not running
yet. */
if (!target_has_registers)
return 0;
and attempts activation from the inferior_created observer.
It seems to me aix-thread.c should be adjusted to do the same.
--
Pedro Alves