simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Still more on gdb parameter reporting


From: Theodore A. Roth
Subject: Re: [Simulavr-devel] Still more on gdb parameter reporting
Date: Thu, 31 Jan 2002 19:00:33 -0700 (MST)

On Thu, 31 Jan 2002, ken restivo wrote:

:)this is all a long way of saying: is there some way to get simulavr to
:)report the values of passed parameters to gdb IMMEDIATELY after the
:)rcall/call instruction, and before all this moving-aroung-of-registers
:)has been done by avr-as? or for it to track all this shuffling a
:)little more closely? i have to guess that the
:)i386/68k/mips/mipsel/ppc/sh/sparc/arm/etc guys have been through this
:)wringer before, there has to be some solution.

Gdb must ask for this type of information from the target. And it seems to 
me that it does ask for it. Here's the output from simulavr once it hits 
the break point when stepping into the calledFunc() routine:

Sent: $T0520:00;21:4d02;22:9000;# -> Ack
Recv: "$z0,90,0#9b"
Sent: "+" (Ack)
Sent: $OK# -> Ack
Recv: "$g#67"
Sent: "+" (Ack)
Sent: 
$00000000000000000000000000000000000000002b000000630063004d026700004d029000# 
-> Ack
Recv: "$m6c,24#98"
Sent: "+" (Ack)
Sent: 
$cf93df93cdb7deb728970fb6f894debf0fbecdbf89839a836b837c834d835e832f833887# 
-> Ack
Recv: "$m800258,1#01"
Sent: "+" (Ack)
Sent: $00# -> Ack
Recv: "$m800259,1#02"
Sent: "+" (Ack)
Sent: $70# -> Ack
Recv: "$z0,c0,0#c5"
Sent: "+" (Ack)
Sent: $OK# -> Ack
Recv: "$m80024e,2#2e"
Sent: "+" (Ack)
Sent: $6300# -> Ack
Recv: "$m800250,2#fa"
Sent: "+" (Ack)
Sent: $0000# -> Ack
Recv: "$m800252,2#fc"
Sent: "+" (Ack)
Sent: $2b00# -> Ack
Recv: "$m800254,2#fe"
Sent: "+" (Ack)
Sent: $0000# -> Ack

Here's the run down:

The '$T0520:00;21:4d02;22:9000;#' packet is the sim telling gdb it hit a 
breakpoint (SIGTRAP).

The "$g#67" packet is gdb asking for all register info (r0-r31, sreg, sp 
pc).

The "$m6c,24#98" packet is gdb asking for the opcodes of the function 
prologue (calledFunc in this case).

The last four '$m...' packets are gdb asking for the values of the passed 
args.

All this looks correct to me while looking at it from a high level. Now, I 
need to run avr-gdb in the debugger and see if it is scanning the function 
prologue correctly. There might be some jiggery-pokery going on there. 

I don't think I'll be able to really dig into this more until saturday 
since I gotta help the girlfriend with stuff tonight and we might go 
skiing tomorrow.

Ted Roth





reply via email to

[Prev in Thread] Current Thread [Next in Thread]