Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Kris Warkentin" <kewarken@qnx.com>
To: "Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Subject: Re: tdep/1291: backtrace for sh3 does not work for local variables with more than 256 bytes
Date: Thu, 11 Sep 2003 15:40:00 -0000	[thread overview]
Message-ID: <01ee01c3787b$2652ffb0$0202040a@catdog> (raw)

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



                 reply	other threads:[~2003-09-11 15:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01ee01c3787b$2652ffb0$0202040a@catdog' \
    --to=kewarken@qnx.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox