Christian Groessler | 4 Jul 2002 01:28
Picon
Favicon

gdb backtrace

Hi,

the gdb backtrace doesn't work if linked w/ shared libs.

Assume the following program:

----------------
#include <stdio.h>

void runtz(void)
{
        sleep(1);
        printf("runtz\n");
}

int main(void)
{

        int i;

        for (i=0; i<100; i++) runtz();

        return(0);
}
----------------

After "cc -g loopy.c -o loopy", try

----------------
[power:~/tmp]$ gdb loopy
(Continue reading)

Kamal Prasad | 4 Jul 2002 01:50
Picon
Favicon

Re: gdb backtrace

I am seeing the same problem. further, the address
returned by the bt is not a valid address.
at the very least, it should be possible to do an nm
and locare the function name where we got a signal.
thanks
-kamal

--- Christian Groessler <cpg <at> aladdin.de> wrote:
> Hi,
> 
> the gdb backtrace doesn't work if linked w/ shared
> libs.
> 
> Assume the following program:
> 
> ----------------
> #include <stdio.h>
> 
> void runtz(void)
> {
>         sleep(1);
>         printf("runtz\n");
> }
> 
> int main(void)
> {
> 
>         int i;
> 
>         for (i=0; i<100; i++) runtz();
(Continue reading)

Nathan J. Williams | 4 Jul 2002 01:49

Re: gdb backtrace

Christian Groessler <cpg <at> aladdin.de> writes:

> the gdb backtrace doesn't work if linked w/ shared libs.

Hi. I noticed this too, a few months ago. The problem is that the
NetBSD target definition for GDB was using too many of the RS/6000
definitions, which caused GDB to try to use AIX relocation semantics
for shared libraries, fouling up the addresses of symbols in shared
libs.

I've committed my fix (should have done that months ago.... it just
slipped my mind :/), so if you rebuild gdb it should work.

        - Nathan

Jason R Thorpe | 4 Jul 2002 02:15

Re: gdb backtrace

On Wed, Jul 03, 2002 at 07:49:19PM -0400, Nathan J. Williams wrote:

 > I've committed my fix (should have done that months ago.... it just
 > slipped my mind :/), so if you rebuild gdb it should work.

Can you make sure to submit a pullup request for NetBSD 1.6 for that
fix?

--

-- 
        -- Jason R. Thorpe <thorpej <at> wasabisystems.com>

Oleg Polyanski | 4 Jul 2002 03:23
Picon

Re: gdb backtrace

Jason R Thorpe <thorpej <at> wasabisystems.com> writes:

>  > I've committed my fix (should have done that months ago.... it
>  > just slipped my mind :/), so if you rebuild gdb it should work.
> 
> Can you make sure to submit a pullup request for NetBSD 1.6 for
> that fix?

 Is it possible to integrate this fix with the main `gdb' source
 tree?  `gdb' from `binutils-current' still does not work properly
 with shared libraries and our older `gdb' 5.0 does not handle DWARF
 at all, which makes the debugging of a program compiled by g++
 3.{0,1} a nightmare.

Oleg

Jason R Thorpe | 4 Jul 2002 03:35

Re: gdb backtrace

On Thu, Jul 04, 2002 at 01:23:38PM +1200, Oleg Polyanski wrote:

 >  Is it possible to integrate this fix with the main `gdb' source
 >  tree?  `gdb' from `binutils-current' still does not work properly
 >  with shared libraries and our older `gdb' 5.0 does not handle DWARF
 >  at all, which makes the debugging of a program compiled by g++
 >  3.{0,1} a nightmare.

I'll take a look at it (I'm the NetBSD host/target maintainer for GDB).

--

-- 
        -- Jason R. Thorpe <thorpej <at> wasabisystems.com>

Michael Rauch | 8 Jul 2002 15:27
Picon

gcc3 exceptions

Hi, 

which type of exception handling do we use in gcc3 (gcc 3.1.0, i386, if it
matters)?
From looking at the source code it seems as if it is sjlj type.
Is this correct? 

Michael

Jason R Thorpe | 9 Jul 2002 04:16

Re: gcc3 exceptions

On Mon, Jul 08, 2002 at 03:27:24PM +0200, Michael Rauch wrote:

 > which type of exception handling do we use in gcc3 (gcc 3.1.0, i386, if it
 > matters)?

GCC 3.1 and 3.2 (gcc-current) should both be using DWARF2 on the i386,
assuming ELF.

--

-- 
        -- Jason R. Thorpe <thorpej <at> wasabisystems.com>

Emmanuel Dreyfus | 10 Jul 2002 13:14
X-Face
Picon

build machinery and pseudousers

Hi

Is it normal that the build.sh script fails if there is no named user on the
system (A chown operation fails)?

--

-- 
Emmanuel Dreyfus
manu <at> netbsd.org

Andrew Cagney | 11 Jul 2002 01:25
Picon

Re: gdb backtrace

> On Wed, Jul 03, 2002 at 07:49:19PM -0400, Nathan J. Williams wrote:
> 
>  > I've committed my fix (should have done that months ago.... it just
>  > slipped my mind :/), so if you rebuild gdb it should work.
> 
> Can you make sure to submit a pullup request for NetBSD 1.6 for that
> fix?

Or remember which knob was set wrong.  I fixed some recently (GDB trunk).

Andrew


Gmane