[Bug tdep/12085] New: gdb-7.2(and gdb-7.1) stack is not work well for mips-elf when use gcc-4.4.2 or gcc-4.4.4

ggs334 at 163 dot com sourceware-bugzilla@sourceware.org
Sun Oct 3 03:54:00 GMT 2010


when I use gcc-4.4.2 or gcc-4.4.4 to compile my source code and debug it use 
gdb-7.2.when I do Some operations in gdb, gdb-7.2(and gdb-7.1) lost the stack 
base,and then the program can not run. 
the source code is :
float
add_float (register float u, register float v)
{
  return u + v;
}
float
wack_float (register float u, register float v)
{
  register float l = u, r = v;
  l = add_float (l, r);
  return l + r;
}

int
main ()
{
  wack_float (-1, -2);
  return 0;
}
I do it as follow£º
Breakpoint 1, main () at ../testsuite_g/gdb.base/store.c:42
42         wack_float (-1, -2);
(gdb) s
wack_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:26
26        register float l = u, r = v;
(gdb) s
27        l = add_float (l, r);
(gdb) s
add_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:14
14        return u + v;
(gdb) bt
#0  add_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:14
#1  0x8000122c in wack_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:27
#2  0x8000131c in main () at ../testsuite_g/gdb.base/store.c:42
(gdb) p  l
No symbol "l" in current context.
(gdb) up
#1  0x8000122c in wack_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:27
27        l = add_float (l, r);
(gdb) p l
$1 = -6.51884046e-42
(gdb) bt
#0  add_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:14
#1  0x8000122c in wack_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:27
#2  0x8000131c in main () at ../testsuite_g/gdb.base/store.c:42
(gdb) set variable l=4
(gdb) bt
#0  add_float (u=-1, v=-2) at ../testsuite_g/gdb.base/store.c:14
#1  0x40800000 in ?? ()
Backtrace stopped: frame did not save the PC
(gdb) down
Bottom (innermost) frame selected; you cannot go down.
(gdb)
question£º
I want to know is it a bug,if not,what should I do?

-- 
           Summary: gdb-7.2(and gdb-7.1) stack is not work well for mips-elf
                    when use gcc-4.4.2 or gcc-4.4.4
           Product: gdb
           Version: 7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: tdep
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: ggs334 at 163 dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=12085

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Gdb-prs mailing list