This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: tdep/1291: backtrace for sh3 does not work for local variables with more than 256 bytes
- From: "Kris Warkentin" <kewarken at qnx dot com>
- To: "Gdb at Sources dot Redhat dot Com" <gdb at sources dot redhat dot com>
- Date: Thu, 11 Sep 2003 11:41:21 -0400
- Subject: Re: tdep/1291: backtrace for sh3 does not work for local variables with more than 256 bytes
Can anyone comment as to the efficacy of the patch associated with this PR?
I applied it in hopes that it would solve the problem below but it didn't.
I'm observing an interesting problem with sh4 and C++ applications where
backtraces are truncated. The actual backtrace is about 7 or 8 deep. If
you step out of the bottom frame, you see more of the backtrace.
It looks to me like frame 2 is being misread. I'm thinking that perhaps gdb
and gcc are in less than perfect agreement as to the composition of a frame
in certain situations.
cheers,
Kris
(gdb) bt
#0 0x080b13a8 in MFW_TreeBuilder::GetMenuComponent (this=0x85b7ba8,
name=@0x7e72798)
at
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/TreeBuild
er.cpp:133
#1 0x080a6446 in MFW_GUIInputHandler::GetMenuComponent (this=0x85781b0,
strName=@0x7e72798, pMenu=0x0)
at
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp:1283
#2 0x080a2c1e in MFW_GUIInputHandler::SetCursor (this=0x85781b0,
strCursorNew=@0x7e72798)
at
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp:722
#3 0x07e72798 in ?? ()
(gdb) info frame
Stack level 0, frame at 0x7e724d8:
pc = 0x80b13a8
in MFW_TreeBuilder::GetMenuComponent(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const &)
(D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/TreeBuil
der.cpp:133); saved pc 0x80a6446
called by frame at 0x7e72554
source language c++.
Arglist at 0x7e724d8, args: this=0x85b7ba8, name=@0x7e72798
Locals at 0x7e724d8, Previous frame's sp is 0x7e72554
Saved registers:
r8 at 0x7e72550, r9 at 0x7e7254c, r10 at 0x7e72548, r11 at 0x7e72544,
r12 at 0x7e72540, r13 at 0x7e7253c, r14 at 0x7e72538, pr at 0x7e72534
(gdb) frame 1
#1 0x080a6446 in MFW_GUIInputHandler::GetMenuComponent (this=0x85781b0,
strName=@0x7e72798, pMenu=0x0)
at
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp:1283
1283
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp: No such file or directory.
in
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp
(gdb) info frame
Stack level 1, frame at 0x7e72554:
pc = 0x80a6446
in MFW_GUIInputHandler::GetMenuComponent(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const &, MFW_Menu *)
(D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInput
Handler.cpp:1283); saved pc 0x80a2c1e
called by frame at 0x7e72588, caller of frame at 0x7e724d8
source language c++.
Arglist at 0x7e72554, args: this=0x85781b0, strName=@0x7e72798, pMenu=0x0
Locals at 0x7e72554, Previous frame's sp is 0x7e72588
Saved registers:
r8 at 0x7e72584, r9 at 0x7e72580, r10 at 0x7e7257c, r11 at 0x7e72578,
r14 at 0x7e72574, pr at 0x7e72570
(gdb) frame 2
#2 0x080a2c1e in MFW_GUIInputHandler::SetCursor (this=0x85781b0,
strCursorNew=@0x7e72798)
at
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp:722
722 in
D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInputH
andler.cpp
(gdb) info frame
Stack level 2, frame at 0x7e72588:
pc = 0x80a2c1e
in MFW_GUIInputHandler::SetCursor(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const &)
(D:/PERFORCE/TestUnits/TU_HMI/ModelWare/models/HMIModel/MFW/sources/GUIInput
Handler.cpp:722); saved pc 0x7e72798
called by frame at 0x85470f0, caller of frame at 0x7e72554
source language c++.
Arglist at 0x7e72588, args: this=0x85781b0, strCursorNew=@0x7e72798
Locals at 0x7e72588, Previous frame's sp is 0x85470f0
Saved registers:
r8 at 0x7e725a4, r9 at 0x7e725a0, r10 at 0x7e7259c, r11 at 0x7e72598,
r12 at 0x7e72594, r13 at 0x7e72590, r14 at 0x7e7258c, pr at 0x7e72588
(gdb) frame 3
#3 0x07e72798 in ?? ()
(gdb) info frame
Stack level 3, frame at 0x85470f0:
pc = 0x7e72798; saved pc 0x0
caller of frame at 0x7e72588
Arglist at 0x85470f0, args:
Locals at 0x85470f0, Previous frame's sp is 0x0
(gdb)
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1291