multi-thread debugging not working
Jim Blandy
jimb@redhat.com
Wed Jul 17 15:08:00 GMT 2002
"Lucy Zhang" <lucyz@uclink4.berkeley.edu> writes:
> Yes, the newer version of GDB solved the previous problem.
>
> Now I have a new problem with not being able to debug my multi-threaded
> program. I'm debugging using an ELF core dump that was coverted from another
> format. The program i'm debugging has about 20 threads. It may be because
> the ELF file i'm creating is missing certain information. Right now I'm at a
> loss as to what could be missing which GDB might be looking for in order to
> see the multiple threads. Does anyone have any ideas on how GDB recognize
> threads from an ELF core dump?
Try running the command `readelf -n' on your core dump. In a
multi-threaded core dump, you should see something like this:
$ readelf -n core.9940
Notes at offset 0x00000254 with length 0x00000d4c:
Owner Data size Description
CORE 0x0000007c NT_PRPSINFO (prpsinfo structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x0000006c NT_FPREGSET (floating point registers)
LINUX 0x00000200 NT_PRXFPREG (user_xfpregs structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x0000006c NT_FPREGSET (floating point registers)
LINUX 0x00000200 NT_PRXFPREG (user_xfpregs structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x0000006c NT_FPREGSET (floating point registers)
LINUX 0x00000200 NT_PRXFPREG (user_xfpregs structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x0000006c NT_FPREGSET (floating point registers)
LINUX 0x00000200 NT_PRXFPREG (user_xfpregs structure)
This program had four threads in it; note that there's one prstatus
structure, one user_xfpregs structure, and one floating point register
structure for each thread.
If you only see one of each kind of register note, then there's only
one thread in the core file.
More information about the Gdb
mailing list