This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with "next" in main on sparc

On Mon, Nov 01, 1999 at 02:38:31PM -0500, Jim Kingdon wrote:
> Here is a bug in which GDB gets in an infinite loop.

I am sorry I took so long to reply.  I resolved to look into this before
I sent out this week's snapshot.

I tried reproducing it on a SPARC Solaris box with gcc and I didn't have
the problem described.  AFAIK we don't have a SPARC RH box locally so I
can't test that.  The GCC I was using is not one of the FSF releasese,
it is similar to the GCC working sources around February or March.

Maybe you show me the end bit of try.s if you compile "gcc -S -g try.c"
on your side?  I'm getting this here:

.stabn 68,0,3,.LM1-main
        !#PROLOGUE# 0
        save    %sp, -112, %sp
        !#PROLOGUE# 1
.stabn 68,0,4,.LM2-main
        sethi   %hi(foo), %o1
        or      %o1, %lo(foo), %o0
        mov     2, %o1
        st      %o1, [%o0]
.stabn 68,0,5,.LM3-main
        .size    main,.LLfe1-main

Which GDB (current development version) handles correctly:

; ./gdb -q a.out
(gdb) b main
Breakpoint 1 at 0x10704: file try.c, line 4.
(gdb) run
Starting program: /horton/jsm/comp-tools/i-sparc/bin/a.out 

Breakpoint 1, main () at try.c:4
4               foo = 2;                                                 
(gdb) n
5       }
0x105fc in .nope ()
Single stepping until exit from function .nope, 
which has no line number information.

Program exited with code 01.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]