* Setting Prog pointer back in the prog
@ 2002-11-20 3:07 Jean-Eric Cuendet
2002-11-20 6:14 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Eric Cuendet @ 2002-11-20 3:07 UTC (permalink / raw)
To: gdb
Hi,
With MsDev debugger, you can set the program pointer back in the code
(Set Next Statement).
Is it also possible with GDB?
If yes, how? Why doesn't Eclipse/Insight/DDD/... don't provide that?
If no, why? Will it be implemented in a next version? Or is it a MsDev
bug? :-)
Thanks
-jec
--
Jean-Eric Cuendet
Linkvest SA
Av des Baumettes 9, 1020 Renens Switzerland
Tel +41 21 632 9043 Fax +41 21 632 9090
E-mail: jean-eric.cuendet@linkvest.com
http://www.linkvest.com
--------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting Prog pointer back in the prog
2002-11-20 3:07 Setting Prog pointer back in the prog Jean-Eric Cuendet
@ 2002-11-20 6:14 ` Daniel Jacobowitz
2002-11-20 9:21 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-11-20 6:14 UTC (permalink / raw)
To: Jean-Eric Cuendet; +Cc: gdb
On Wed, Nov 20, 2002 at 12:07:30PM +0100, Jean-Eric Cuendet wrote:
> Hi,
> With MsDev debugger, you can set the program pointer back in the code
> (Set Next Statement).
> Is it also possible with GDB?
> If yes, how? Why doesn't Eclipse/Insight/DDD/... don't provide that?
> If no, why? Will it be implemented in a next version? Or is it a MsDev
> bug? :-)
Try: "set $pc = <address>". You have to use PC values, not line
numbers.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting Prog pointer back in the prog
2002-11-20 6:14 ` Daniel Jacobowitz
@ 2002-11-20 9:21 ` Andrew Cagney
2002-11-20 10:36 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-11-20 9:21 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Jean-Eric Cuendet, gdb
> On Wed, Nov 20, 2002 at 12:07:30PM +0100, Jean-Eric Cuendet wrote:
>
>> Hi,
>> With MsDev debugger, you can set the program pointer back in the code
>> (Set Next Statement).
>> Is it also possible with GDB?
>> If yes, how? Why doesn't Eclipse/Insight/DDD/... don't provide that?
>> If no, why? Will it be implemented in a next version? Or is it a MsDev
>> bug? :-)
>
>
> Try: "set $pc = <address>". You have to use PC values, not line
> numbers.
FYI,
(gdb) help jump
Continue program being debugged at specified line or address.
Give as argument either LINENUM or *ADDR, where ADDR is an expression
for an address to start at.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting Prog pointer back in the prog
2002-11-20 9:21 ` Andrew Cagney
@ 2002-11-20 10:36 ` Daniel Jacobowitz
2002-11-20 12:35 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-11-20 10:36 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Jean-Eric Cuendet, gdb
On Wed, Nov 20, 2002 at 12:21:35PM -0500, Andrew Cagney wrote:
> >On Wed, Nov 20, 2002 at 12:07:30PM +0100, Jean-Eric Cuendet wrote:
> >
> >>Hi,
> >>With MsDev debugger, you can set the program pointer back in the code
> >>(Set Next Statement).
> >>Is it also possible with GDB?
> >>If yes, how? Why doesn't Eclipse/Insight/DDD/... don't provide that?
> >>If no, why? Will it be implemented in a next version? Or is it a MsDev
> >>bug? :-)
> >
> >
> >Try: "set $pc = <address>". You have to use PC values, not line
> >numbers.
>
> FYI,
>
> (gdb) help jump
> Continue program being debugged at specified line or address.
> Give as argument either LINENUM or *ADDR, where ADDR is an expression
> for an address to start at.
Learn something new every day.... thanks Andrew!
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting Prog pointer back in the prog
2002-11-20 10:36 ` Daniel Jacobowitz
@ 2002-11-20 12:35 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-11-20 12:35 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Jean-Eric Cuendet, gdb
> On Wed, Nov 20, 2002 at 12:21:35PM -0500, Andrew Cagney wrote:
>
>> >On Wed, Nov 20, 2002 at 12:07:30PM +0100, Jean-Eric Cuendet wrote:
>> >
>
>> >>Hi,
>> >>With MsDev debugger, you can set the program pointer back in the code
>> >>(Set Next Statement).
>> >>Is it also possible with GDB?
>> >>If yes, how? Why doesn't Eclipse/Insight/DDD/... don't provide that?
>> >>If no, why? Will it be implemented in a next version? Or is it a MsDev
>> >>bug? :-)
>
>> >
>> >
>> >Try: "set $pc = <address>". You have to use PC values, not line
>> >numbers.
>
>>
>> FYI,
>>
>> (gdb) help jump
>> Continue program being debugged at specified line or address.
>> Give as argument either LINENUM or *ADDR, where ADDR is an expression
>> for an address to start at.
>
>
> Learn something new every day.... thanks Andrew!
(Ha! You've not spent enough time reading the testsuite gdb.log output.
Learn all sorts of things.)
BTW, on some architectures a simple:
set $pc = ...
May not do what you want. SPARC would need both $pc and $npc set - jump
does this. Wonder if this is documented ...
http://sources.redhat.com/gdb/current/onlinedocs/gdb_15.html#IDX545
Almost, bug report.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-20 20:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 3:07 Setting Prog pointer back in the prog Jean-Eric Cuendet
2002-11-20 6:14 ` Daniel Jacobowitz
2002-11-20 9:21 ` Andrew Cagney
2002-11-20 10:36 ` Daniel Jacobowitz
2002-11-20 12:35 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox