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


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


  parent reply	other threads:[~2002-07-17 22:08 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 [this message]
2002-07-17 16:30       ` Lucy Zhang
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=np65zekny9.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=lucyz@uclink4.berkeley.edu \
    /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