Re: gdb / thread_db / multiple ABI question

Steve Ellcey
2017-07-10T18:02:59Z

On Mon, 2017-07-10 at 10:43 +0100, Pedro Alves wrote:
> >
> > OK, setting libthread-db-search-path and debug libthread-db got me
> > a bit further.Â Â I don't get any errors or warnings about not being
> > able to find or load libthread_db.Â Â It's still not reading
> > everything
> > correctly though:
> >
> > (gdb) info threads
> > Found 0 new threads in iteration 0.
> > Â  IdÂ Â Â Target IdÂ Â Â Â Â Â Â Â Â FrameÂ
> > * 3Â Â Â Â Thread 0xf739ef70 (LWP 8660) 0x00400680 in doSomeThing ()
> > Â  4Â Â Â Â Thread 0xf69bf490 (LWP 8662) warning: Couldn't find general-
> > purpose registers in core file.
> > PC register is not available
> Do you get that same warning without libthread_db?Â Â It sounds more
> like an issue on the gdb<->bfd side than on the libthread_db side
> of things.Â Â (Put a breakpoint on "warning".Â Â I believe it comes from
> corelow.c:get_core_register_section.)
>
> Thanks,
> Pedro Alves

No, without thread_db I get this:

(gdb) file m32
Reading symbols from m32...done.
(gdb) core c_32
[New LWP 79425]
[New LWP 79425]
[New LWP 79425]
warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.
Core was generated by `./m32'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0Â Â 0x00400680 in doSomeThing ()
(gdb) info threads
Â  IdÂ Â Â Target IdÂ Â Â Â Â Â Â Â Â FrameÂ
* 3Â Â Â Â LWP 79425Â Â Â Â Â Â Â Â Â 0x00400680 in doSomeThing ()

Steve Ellcey
sellcey@cavium.com