Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Jean-Eric Cuendet <jean-eric.cuendet@linkvest.com>,
	gdb@sources.redhat.com
Subject: Re: Setting Prog pointer back in the prog
Date: Wed, 20 Nov 2002 12:35:00 -0000	[thread overview]
Message-ID: <3DDBF21A.8070801@redhat.com> (raw)
In-Reply-To: <20021120183644.GB24089@nevyn.them.org>

> 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



      reply	other threads:[~2002-11-20 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-20  3:07 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 message]

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=3DDBF21A.8070801@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=jean-eric.cuendet@linkvest.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