public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Fabian Cenedese <Cenedese@indel.ch>
To: gdb@sources.redhat.com
Subject: Re: View registers from stack frames
Date: Tue, 05 Oct 2004 17:57:00 -0000	[thread overview]
Message-ID: <5.2.0.9.1.20041005171658.01d208e0@NT_SERVER> (raw)
In-Reply-To: <5.2.0.9.1.20041005162110.01d03818@NT_SERVER>


>>> I'm using a self built gdb-6.1.1 for PPC-targets and cygwin. The
>>> communication with the target is over a stub-server to a PPC-board.
>>
>>For PPC, try 6.2 instead.
>>
>>As Andrew already explained, this is what is supposed to happen.  It
>>did not used to work but was fixed by the new frame architecture.
>
>Ok, I will try 6.2 then.

Hmm, that didn't seem to work better... I should say different.

(gdb) thread 21
[Switching to thread 21 (Thread 1578452)]#0  CMyWorkerTask::Test (
    this=0x1815d4, str=@0x18d734)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:476
476                             while (uTest2 < 3000001){
(gdb) bt
#0  CMyWorkerTask::Test (this=0x1815d4, str=@0x18d734)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:476
#1  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x18d734)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
#2  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x210)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
#3  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x0)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
#4  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x64646464)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
#5  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x32414000)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
Previous frame inner to this frame (corrupt stack?)

(gdb) info frame
Stack level 0, frame at 0x18d6b4:
 pc = 0x6056c in CMyWorkerTask::Test(CINOSString &)
    (N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:476); saved pc 0x60564
 called by frame at 0x18d6fc
 source language c++.
 Arglist at 0x18d66c, args: this=0x1815d4, str=@0x18d734
 Locals at 0x18d66c, Previous frame's sp is 0x18d6b4

(gdb) p/x $pc
$1 = 0x6056c
(gdb) p/x $lr
$2 = 0x60564

(gdb) frame 1
#1  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x18d734)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
469                             Test(str);
(gdb) info frame
Stack level 1, frame at 0x18d6fc:
 pc = 0x60564 in CMyWorkerTask::Test(CINOSString &)
    (N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469); saved pc 0x60564
 called by frame at 0x18d7d4, caller of frame at 0x18d6b4
 source language c++.
 Arglist at 0x18d6b4, args: this=0x1815d4, str=@0x18d734
 Locals at 0x18d6b4, Previous frame's sp is 0x18d6fc

(gdb) p/x $pc
$3 = 0x60564
(gdb) p/x $lr
$4 = 0x60564

(gdb) frame 2
#2  0x00060564 in CMyWorkerTask::Test (this=0x1815d4, str=@0x210)
    at N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469
469                             Test(str);
(gdb) info frame
Stack level 2, frame at 0x18d7d4:
 pc = 0x60564 in CMyWorkerTask::Test(CINOSString &)
    (N:\Temp\SAMCLASS\Applicat\Src\Test1.cpp:469); saved pc 0x60564
 called by frame at 0x18d9b4, caller of frame at 0x18d6fc
 source language c++.
 Arglist at 0x18d6fc, args: this=0x1815d4, str=@0x210
 Locals at 0x18d6fc, Previous frame's sp is 0x18d7d4

(gdb) p/x $pc
$5 = 0x60564
(gdb) p/x $lr
$6 = 0x60564


It is better in so far as the pc did change from frame 0 to frame 1.
But now reading the whole call stack is messed up. Funny though
that only the pc stays the same, other values do change.

That was with exactly the same setup as before. But maybe gdb-6.2
needs different values from the stub...? If I go back to gdb-6.1.1
it works again.

Should I try an even newer gdb then?

Thanks

bye  Fabi


  reply	other threads:[~2004-10-05 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 12:48 Fabian Cenedese
2004-10-05 13:30 ` Andrew Cagney
2004-10-05 14:02   ` Fabian Cenedese
2004-10-05 14:03     ` Daniel Jacobowitz
2004-10-05 15:00       ` Fabian Cenedese
2004-10-05 17:57         ` Fabian Cenedese [this message]
2004-10-06  1:57           ` Andrew Cagney
2004-10-06  7:18             ` Fabian Cenedese
2004-10-06 16:41               ` Kevin Buettner
2004-10-07  9:04                 ` Fabian Cenedese
2004-10-11 19:21                   ` Kevin Buettner
2004-10-07 17:50 Xinan Tang
     [not found] <5.2.0.9.1.20041007134711.01d12d90@NT_SERVER>
     [not found] ` <20041007085738.45b5b55a@saguaro>
2004-10-08 10:14   ` Fabian Cenedese
2004-10-11 19:16     ` Kevin Buettner
2004-10-12 14:03       ` Fabian Cenedese
2004-10-16 15:11         ` Kevin Buettner

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=5.2.0.9.1.20041005171658.01d208e0@NT_SERVER \
    --to=cenedese@indel.ch \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).