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: [RFC v2] fix regressions with target-async


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


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