public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* remote debugging: gdbserver backtrace on mips
@ 2003-06-03  9:00 #-sadiq shaikh-#
  2003-06-03 12:57 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: #-sadiq shaikh-# @ 2003-06-03  9:00 UTC (permalink / raw)
  To: gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 2391 bytes --]

Hi,
 
Has anyone worked on gdbserver on mips platform, and
got thru the backtrace problem. when i do bt command
on the client(host) side i could see only innermost
frame, previous frames its trying to get but not
succeeding. Eventually giving error as 
--------------------------------------------------
(gdb) bt
#0  cal (a=0x803cff20, b=0x803cff24) at test.c:29
warning: Warning: GDB can't find the start of the
function at 0x803c82ec.
 
    GDB is unable to find the start of the function at
0x803c82ec and thus can't determine the size of that
function's stack frame.This means that GDB may be
unable to access that stack frame, or the frames below
it.
    This problem is most likely caused by an invalid
program counter or stack pointer. However, if you
think GDB should simply search farther back
from 0x803c82ec for code which looks like the
beginning of a function, you can increase the range of
the search using the `set heuristic-fence-post'
command.
(gdb)
--------------------------------------------------
 
#)Is it because of difference in addressing schemes on
both target/host.Does client expect addresses in some
format from the server.
#)My target is mips running uclinux flat binary.
#) Host is linux running mips-linux-gdb cross compiled
gdb client.
#) Server-client talk over ethernet via tcp.
#) In dump i could see that server is conveying client
the loaded address(text/data sections) of the
programme.
#) However on host while loading symbol file, i tried
manually giving sections address of the programme
running on the target, as well as without giving the
section addresses. Both method yielded no result.I
mean error persist !
#) I also tried setting heuristic-fence-post, but 
observe no good result.
#)gdb client already knows the finals address where
the programme is running on the target and offset in
the symbol file, but still its not able to find the
prev frames ?
#)what is that more gdb client expecting from the
server ?
#)I have seen register dump on the client and appears
to be fine, then what is stopping client from passing
thru the stack frames and displaying properly all
frames in the stack ?
 
Any help on these score will be helpfull.Thanking you
in anticipation.
 
Regards,
sadiq.shaikh
 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: remote debugging: gdbserver backtrace on mips
  2003-06-03  9:00 remote debugging: gdbserver backtrace on mips #-sadiq shaikh-#
@ 2003-06-03 12:57 ` Daniel Jacobowitz
  2003-06-04  5:26   ` #-sadiq shaikh-#
  2003-06-04  6:21   ` #-sadiq shaikh-#
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-06-03 12:57 UTC (permalink / raw)
  To: #-sadiq shaikh-#; +Cc: gdb

On Tue, Jun 03, 2003 at 02:00:03AM -0700, #-sadiq shaikh-# wrote:
> Hi,
>  
> Has anyone worked on gdbserver on mips platform, and
> got thru the backtrace problem. when i do bt command
> on the client(host) side i could see only innermost
> frame, previous frames its trying to get but not
> succeeding. Eventually giving error as 
> --------------------------------------------------
> (gdb) bt
> #0? cal (a=0x803cff20, b=0x803cff24) at test.c:29
> warning: Warning: GDB can't find the start of the
> function at 0x803c82ec.

Please provide a full transcript of the session, including GDB's
command line and any other commands.

It should work, and I do test mips-linux gdbserver.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: remote debugging: gdbserver backtrace on mips
  2003-06-03 12:57 ` Daniel Jacobowitz
@ 2003-06-04  5:26   ` #-sadiq shaikh-#
  2003-06-04 12:59     ` Daniel Jacobowitz
  2003-06-04  6:21   ` #-sadiq shaikh-#
  1 sibling, 1 reply; 5+ messages in thread
From: #-sadiq shaikh-# @ 2003-06-04  5:26 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Hi,

SETUP:--

Server:
Running on the uclinux mips board.Talking to the
client over ethernet via tcp.

Following i'm doing at server:
server> gdbserver 137.71.32.9:5000 test
Process test created; pid = 34
Remote debugging from host 137.71.32.9 

Following i'm doing at Client:
client> mips-linux-gdb
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=mips-linux".
(gdb) target remote 137.71.32.5:5000
Remote debugging using 137.71.32.5:5000
0x00000010 in ?? ()
(gdb) add-symbol-file test.gdb
add symbol table from file "test.gdb" at
(y or n) y
Reading symbols from test.gdb...done.
(gdb) set heuristic-fence-post 1
(gdb) list
1       #include<stdio.h>
2       void sat();
3       void cal(int *,int *);
4       main()
5       {
6         int xx,yy,zz,ww;
7         xx = 200;
8         yy = 100;
9         zz = xx + yy;
10        ww = zz/yy;
(gdb) b main
Breakpoint 1 at 0x27c: file test.c, line 7.
(gdb) b sat
Breakpoint 2 at 0x324: file test.c, line 22.
(gdb) b cal
Breakpoint 3 at 0x3d0: file test.c, line 29.
(gdb) c
Continuing.
 
Breakpoint 1, main () at test.c:7
7         xx = 200;
(gdb) c
Continuing.
 
Breakpoint 3, cal (a=0x803cff20, b=0x803cff24) at
test.c:29
29        x = *a + *b;
(gdb) bt
#0  cal (a=0x803cff20, b=0x803cff24) at test.c:29
warning: Warning: GDB can't find the start of the
function at 0x803c82ec.
 
    GDB is unable to find the start of the function at
0x803c82ec
and thus can't determine the size of that function's
stack frame.
This means that GDB may be unable to access that stack
frame, or
the frames below it.
    This problem is most likely caused by an invalid
program counter or
stack pointer.
 However, if you think GDB should simply search
farther back
from 0x803c82ec for code which looks like the
beginning of a
function, you can increase the range of the search
using the `set
heuristic-fence-post' command.
(gdb)

MY TEST PROGRAMME LOOK LIKE THIS:-
main()
{
  int xx,yy,zz,ww;
  xx = 200;
  yy = 100;
  zz = xx + yy;
  ww = zz/yy;
  cal(&xx,&yy);
  xx = yy;
  printf("Test program %x %x %x
%x..\n",&xx,&yy,&zz,&ww);
  printf("main %x sat %x cal %x ..\n",main,sat,cal);
  printf(" gVar1 %x gVar2 %x \r\n",&gVar1,&gVar2);
  sat();

}
void sat()
{
  int i=20,j=5,sum=0,dev=0,mul=0;
  sum = i+j;
  dev = i/j;
  mul = i*j;
  printf("division %d\n",dev);
  printf("add %d\n",sum);
  printf("multi %d\n",mul);
}
void cal(int *a,int *b)
{
  int x,y,z;
  x = *a + *b;
  y = *a / *b;
  z = *a - *b;
  printf("x =%d\n",x);
  printf("y =%d\n",y);
  printf("z =%d\n",z);
}

Regards
sadiq.shaikh

--- Daniel Jacobowitz <drow@mvista.com> wrote:
> On Tue, Jun 03, 2003 at 02:00:03AM -0700, #-sadiq
> shaikh-# wrote:
> > Hi,
> >  
> > Has anyone worked on gdbserver on mips platform,
> and
> > got thru the backtrace problem. when i do bt
> command
> > on the client(host) side i could see only
> innermost
> > frame, previous frames its trying to get but not
> > succeeding. Eventually giving error as 
> > --------------------------------------------------
> > (gdb) bt
> > #0? cal (a=0x803cff20, b=0x803cff24) at test.c:29
> > warning: Warning: GDB can't find the start of the
> > function at 0x803c82ec.
> 
> Please provide a full transcript of the session,
> including GDB's
> command line and any other commands.
> 
> It should work, and I do test mips-linux gdbserver.
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian
> GNU/Linux Developer


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: remote debugging: gdbserver backtrace on mips
  2003-06-03 12:57 ` Daniel Jacobowitz
  2003-06-04  5:26   ` #-sadiq shaikh-#
@ 2003-06-04  6:21   ` #-sadiq shaikh-#
  1 sibling, 0 replies; 5+ messages in thread
From: #-sadiq shaikh-# @ 2003-06-04  6:21 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Hi,

More details as follows:--

server> gdbserver 137.71.32.9:5000 test
Process test created; pid = 82
Remote debugging from host 137.71.32.9
Got bp at 80f602b8.
Got bp at 80f602bc.
Got bp at 80f60470.


client> mips-linux-gdb
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=mips-linux".
(gdb) set debug remote 1
(gdb) target remote 137.71.32.5:5000
Remote debugging using 137.71.32.5:5000
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: T0525:80f60050;1d:80f67f88;
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received:
0000000080f0f15c0000000080d7ff7080d7ffa080d7ff6880d7ff70000000000000fc
000000fc000000000080383840000000000009688480fd405a80f77e2480d7ff6880d7fee480d7ff6080f0f
7a00000000080d802d880d806a880f0f7a80000000180d688d0000000000000000080d73dc080f67f8880f1
fc3080d6792800000000425400000000003effffffff0000002000000010fffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000010000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000
0x00000010 in ?? ()
(gdb) add-symbol-file test.gdb
add symbol table from file "test.gdb" at
(y or n) y
Reading symbols from test.gdb...done.
Sending packet: $qSymbol::#5b...Ack
Packet received:
Packet qSymbol (symbol-lookup) is NOT supported
(gdb) b main
Sending packet: $m260,4#65...Ack
Packet received: 27bdffc8
Sending packet: $m264,4#69...Ack
Packet received: afbf0034
Sending packet: $m268,4#6d...Ack
Packet received: afbe0030
Sending packet: $m26c,4#98...Ack
Packet received: afb1002c
Sending packet: $m270,4#66...Ack
Packet received: afb00028
Sending packet: $m274,4#6a...Ack
Packet received: 03a0f021
Sending packet: $m278,4#6e...Ack
Packet received: 240200c8
Breakpoint 1 at 0x278: file test.c, line 11.
(gdb) b sat
Sending packet: $m39c,4#9c...Ack
Packet received: 27bdffe8
Sending packet: $m3a0,4#91...Ack
Packet received: afbf0014
Sending packet: $m3a4,4#95...Ack
Packet received: afbe0010
Sending packet: $m3a8,4#99...Ack
Packet received: 03a0f021
Sending packet: $m3ac,4#c4...Ack
Packet received: 8f848018
Breakpoint 2 at 0x3ac: file test.c, line 29.
(gdb) b cal
Sending packet: $m414,4#66...Ack
Packet received: 27bdffd8
Sending packet: $m418,4#6a...Ack
Packet received: afbf0020
Sending packet: $m41c,4#95...Ack
Packet received: afbe001c
Sending packet: $m420,4#63...Ack
Packet received: afb20018
Sending packet: $m424,4#67...Ack
Packet received: afb10014
Sending packet: $m428,4#6b...Ack
Packet received: afb00010
Sending packet: $m42c,4#96...Ack
Packet received: 03a0f021
Sending packet: $m430,4#64...Ack
Packet received: 8c900000
Breakpoint 3 at 0x430: file test.c, line 36.
(gdb) c
Continuing.
Sending packet: $Z0,278,4#b7...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m278,4#6e...Ack
Packet received: 240200c8
Sending packet: $X278,0:#8f...Ack
Packet received:
binary downloading NOT suppported by target
Sending packet: $M278,4:0005000d#41...Ack
Packet received: OK
Sending packet: $m3ac,4#c4...Ack
Packet received: 8f848018
Sending packet: $M3ac,4:0005000d#97...Ack
Packet received: OK
Sending packet: $m430,4#64...Ack
Packet received: 8c900000
Sending packet: $M430,4:0005000d#37...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Packet received: T0525:00000278;1d:80f67f00;
Sending packet: $g#67...Ack
Packet received:
000000003000fc0080f65f800000002d0000000180f67f8c80f67f94000000000000fc
0080f625100000000000000003000000010000000080fd285980f67ee880f67f940000000180f67f8c80f0f
7a00000000080d802d880d806a880f0f7a80000000080f602a0000000000000000080f6db1080f67f0080f6
7f0080f605ac00000000425400000000003effffffff0000002400000278fffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000010000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000
Sending packet: $M278,4:240200c8#4b...Ack
Packet received: OK
Sending packet: $M3ac,4:8f848018#b9...Ack
Packet received: OK
Sending packet: $M430,4:8c900000#42...Ack
Packet received: OK

Breakpoint 1, main () at test.c:11
11        xx = 200;
(gdb) c
Continuing.
Sending packet: $m278,4#6e...Ack
Packet received: 240200c8
Sending packet: $m27c,4#99...Ack
Packet received: afc20018
Sending packet: $M27c,4:0005000d#6c...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Packet received: T0525:0000027c;1d:80f67f00;
Sending packet: $M27c,4:afc20018#d8...Ack
Packet received: OK
Sending packet: $m278,4#6e...Ack
Packet received: 240200c8
Sending packet: $M278,4:0005000d#41...Ack
Packet received: OK
Sending packet: $m3ac,4#c4...Ack
Packet received: 8f848018
Sending packet: $M3ac,4:0005000d#97...Ack
Packet received: OK
Sending packet: $m430,4#64...Ack
Packet received: 8c900000
Sending packet: $M430,4:0005000d#37...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Packet received: T0525:00000430;1d:80f67ed8;
Sending packet: $g#67...Ack
Packet received:
0000000000000000000000030000000080f67f1880f67f1c80f67f9400000000000000
000000000080f602e400000148ffffff9c0000000080fd285980f67ee880f67f1c80f67f1880f67f8c80f0f
7a00000000080d802d880d806a880f0f7a80000000080f60454000000000000000080f6db1080f67ed880f6
7ed880f6030c00000000425400000000003effffffff0000002400000430fffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000010000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000
Sending packet: $M278,4:240200c8#4b...Ack
Packet received: OK
Sending packet: $M3ac,4:8f848018#b9...Ack
Packet received: OK
Sending packet: $M430,4:8c900000#42...Ack
Packet received: OK

Breakpoint 3, cal (a=0x80f67f18, b=0x80f67f1c) at test.c:36
36        x = *a + *b;
(gdb) bt
#0  cal (a=0x80f67f18, b=0x80f67f1c) at test.c:36
Sending packet: $m80f67ef8,4#0b...Ack
Packet received: 80f6030c
warning: Warning: GDB can't find the start of the function at 0x80f6030c.

    GDB is unable to find the start of the function at 0x80f6030c
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x80f6030c for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
(gdb)


Regards,
sadiq.shaikh


--- Daniel Jacobowitz <drow@mvista.com> wrote:
> On Tue, Jun 03, 2003 at 02:00:03AM -0700, #-sadiq shaikh-# wrote:
> > Hi,
> >  
> > Has anyone worked on gdbserver on mips platform, and
> > got thru the backtrace problem. when i do bt command
> > on the client(host) side i could see only innermost
> > frame, previous frames its trying to get but not
> > succeeding. Eventually giving error as 
> > --------------------------------------------------
> > (gdb) bt
> > #0? cal (a=0x803cff20, b=0x803cff24) at test.c:29
> > warning: Warning: GDB can't find the start of the
> > function at 0x803c82ec.
> 
> Please provide a full transcript of the session, including GDB's
> command line and any other commands.
> 
> It should work, and I do test mips-linux gdbserver.
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: remote debugging: gdbserver backtrace on mips
  2003-06-04  5:26   ` #-sadiq shaikh-#
@ 2003-06-04 12:59     ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-06-04 12:59 UTC (permalink / raw)
  To: #-sadiq shaikh-#; +Cc: gdb

On Tue, Jun 03, 2003 at 10:26:24PM -0700, #-sadiq shaikh-# wrote:
> Hi,
> 
> SETUP:--
> 
> Server:
> Running on the uclinux mips board.Talking to the
> client over ethernet via tcp.
> 
> Following i'm doing at server:
> server> gdbserver 137.71.32.9:5000 test
> Process test created; pid = 34
> Remote debugging from host 137.71.32.9 

Gdbserver isn't actually tested on uclinux.  If you're having problems
with it I recommend talking to them.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-04 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-03  9:00 remote debugging: gdbserver backtrace on mips #-sadiq shaikh-#
2003-06-03 12:57 ` Daniel Jacobowitz
2003-06-04  5:26   ` #-sadiq shaikh-#
2003-06-04 12:59     ` Daniel Jacobowitz
2003-06-04  6:21   ` #-sadiq shaikh-#

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).