This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: multi-thread debugging not working
"Lucy Zhang" <lucyz@uclink4.berkeley.edu> writes:
> Great thank you. One more question though. Right now I only have one NOTE
> segment which contain one of each types of note (prstatus, prpsinfo,
> taskstruct). When I add the new note structs for each thread, should I add
> in into the same NOTE segment after my current single thread structs? Which
> is what readelf -n seems to be suggesting.
> OR should I create a new NOTE segment, and add it in there like the
> following? Which way does GDB prefer?
I don't think GDB will care. The core file I've seen has them all in
one NOTE segment.
If you end up trying to debug this, some starting points: the code
which actually parses the NOTE segment is elfcore_read_notes, in
bfd/elf.c. It turns the prstatus notes into `.reg/PID' sections. The
GDB code which then consumes those sections is add_to_thread_list in
corelow.c.