Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lucy Zhang" <lucyz@uclink4.berkeley.edu>
To: <gdb@sources.redhat.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: multi-thread debugging not working
Date: Wed, 17 Jul 2002 16:30:00 -0000	[thread overview]
Message-ID: <007f01ea8a71$cce46880$9a0a0109@zhangl> (raw)
In-Reply-To: <np65zekny9.fsf@zwingli.cygnus.com>

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?

Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
NOTE 0x001454 0x00000000 0x00000000 0x00170 0x00000 0
NOTE 0x0015c4 0x00000000 0x00000000 0x001b0 0x00000 0  //add a second NOTE
segment???
LOAD 0x001774 0x40b9e000 0x00000000 0x1bd000 0x1bd000 RW 0x1000
LOAD 0x1be774 0x40d5b000 0x00000000 0xc17000 0xc17000 RW 0x1000
LOAD 0xdd5774 0x41972000 0x00000000 0xbd000 0xbd000 RW 0x1000

Notes at offset 0x00001454 with length 0x00000170: //notes for original
single thread
Owner Data size Description
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x0000007c NT_PRPSINFO (prpsinfo structure)
CORE 0x00000034 NT_TASKSTRUCT (task structure)

Notes at offset 0x000015c4 with length 0x000001b0:  //notes for threads i
will add??
Owner Data size Description
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)
CORE 0x00000090 NT_PRSTATUS (prstatus structure)


Thanks,
Lucy


----- Original Message -----
From: "Jim Blandy" <jimb@redhat.com>
To: "Lucy Zhang" <lucyz@uclink4.berkeley.edu>
Cc: <gdb@sources.redhat.com>
Sent: Wednesday, July 17, 2002 3:07 PM
Subject: Re: multi-thread debugging not working


>
> "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.


  reply	other threads:[~2002-07-17 23:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16 13:16 problem loading libpthread.so Lucy Zhang
2002-07-16 13:23 ` Daniel Jacobowitz
2002-07-16 16:54   ` multi-thread debugging not working Lucy Zhang
2002-07-16 18:41     ` Daniel Jacobowitz
2002-07-17 15:08     ` Jim Blandy
2002-07-17 16:30       ` Lucy Zhang [this message]
2002-07-18 14:55         ` Jim Blandy
2002-07-16 19:05 Lucy Zhang
2002-07-16 19:08 ` Daniel Jacobowitz
2002-07-17 12:54   ` Lucy Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='007f01ea8a71$cce46880$9a0a0109@zhangl' \
    --to=lucyz@uclink4.berkeley.edu \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox