Bug 7946 - Doco 'jump' vs '$pc = ..., $npc = ....'
Summary: Doco 'jump' vs '$pc = ..., $npc = ....'
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-20 12:48 UTC by ac131313
Modified: 2023-04-27 13:01 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ac131313 2002-11-20 20:48:00 UTC
[Converted from Gnats 841]

http://sources.redhat.com/gdb/current/onlinedocs/gdb_15.html#IDX545

Doco should mention that, on some architectures, 'jump ...' actually sets $pc and $npc (and well if I'd not deleted the 88k) $nnpc.

Or to put it another way 'set $pc = ...' is not portable across architectures.

Release:
unknown
Comment 1 Sourceware Commits 2023-04-27 12:59:48 UTC
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0d42948f0c822ed3782a45771c8fbc21aa2d6553

commit 0d42948f0c822ed3782a45771c8fbc21aa2d6553
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon Apr 24 15:27:27 2023 +0100

    gdb/doc: extend the documentation of the jump command
    
    This commit addresses PR gdb/7946.  While checking for bugs relating
    to the jump command I noticed a long standing bug that points out a
    deficiency with GDB's documentation of the jump command.
    
    The bug points out that 'jump 0x...' is not always the same as 'set
    $pc = 0x...' and then 'continue'.  Writing directly to the $pc
    register does not update any auxiliary state, e.g. $npc on SPARC,
    while using 'jump' does.
    
    It felt like this would be an easy issue to address by adding a
    paragraph to the docs, so I took a stab at writing something suitable.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7946
    
    Approved-By: Eli Zaretskii <eliz@gnu.org>
Comment 2 Andrew Burgess 2023-04-27 13:01:05 UTC
I believe this is now resolved.