From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22280 invoked by alias); 17 Jul 2002 23:30:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22273 invoked from network); 17 Jul 2002 23:30:29 -0000 Received: from unknown (HELO uclink4.berkeley.edu) (128.32.25.39) by sources.redhat.com with SMTP; 17 Jul 2002 23:30:29 -0000 Received: from zhangl (p1.almaden.ibm.com [198.4.83.52]) by uclink4.berkeley.edu (8.12.3/8.12.3) with SMTP id g6HNUTce008053; Wed, 17 Jul 2002 16:30:29 -0700 (PDT) Message-ID: <007f01ea8a71$cce46880$9a0a0109@zhangl> From: "Lucy Zhang" To: Cc: References: <008001ea898d$73096110$9a0a0109@zhangl><20020716202321.GA28627@nevyn.them.org><002201ea89ac$0bfdbce0$9a0a0109@zhangl> Subject: Re: multi-thread debugging not working Date: Wed, 17 Jul 2002 16:30:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-07/txt/msg00174.txt.bz2 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" To: "Lucy Zhang" Cc: Sent: Wednesday, July 17, 2002 3:07 PM Subject: Re: multi-thread debugging not working > > "Lucy Zhang" 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.