From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29892 invoked by alias); 5 Oct 2004 15:26:13 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29843 invoked from network); 5 Oct 2004 15:26:11 -0000 Received: from unknown (HELO smtp.hispeed.ch) (62.2.95.247) by sourceware.org with SMTP; 5 Oct 2004 15:26:11 -0000 Received: from indel.ch (217-162-27-127.dclient.hispeed.ch [217.162.27.127]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with SMTP id i95FQApd002913 for ; Tue, 5 Oct 2004 17:26:10 +0200 Received: from fabi.indel.ch [192.168.1.19] by indel.ch [127.0.0.1] with SMTP (MDaemon.v2.7.SP5.R) for ; Tue, 05 Oct 2004 17:24:50 +0200 Message-Id: <5.2.0.9.1.20041005171658.01d208e0@NT_SERVER> X-Sender: cenedese@NT_SERVER (Unverified) Date: Tue, 05 Oct 2004 17:57:00 -0000 To: gdb@sources.redhat.com From: Fabian Cenedese Subject: Re: View registers from stack frames In-Reply-To: <5.2.0.9.1.20041005162110.01d03818@NT_SERVER> References: <20041005140227.GA13586@nevyn.them.org> <5.2.0.9.1.20041005154532.01d52ec0@NT_SERVER> <5.2.0.9.1.20041005142840.01d03818@NT_SERVER> <5.2.0.9.1.20041005142840.01d03818@NT_SERVER> <5.2.0.9.1.20041005154532.01d52ec0@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MDaemon-Deliver-To: gdb@sources.redhat.com X-Return-Path: cenedese@indel.ch X-SW-Source: 2004-10/txt/msg00094.txt.bz2 >>> 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