This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13487] Hook for next command shows previous value forregister.


http://sourceware.org/bugzilla/show_bug.cgi?id=13487

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |pedro at codesourcery dot
                   |                            |com
         Resolution|                            |INVALID

--- Comment #1 from Pedro Alves <pedro at codesourcery dot com> 2011-12-09 10:06:34 UTC ---
hook-next executes before next is executed, as per the manual:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hooks
User-defined Command Hooks

hook
You may define hooks, which are a special kind of user-defined
command.  Whenever you run the command foo, if the user-defined
command hook-foo exists, it is executed (with no arguments)
before that command.

hooks, post-command
hookpost

A hook may also be defined which is run after the command you executed.
Whenever you run the command foo, if the user-defined command
hookpost-foo exists, it is executed (with no arguments) after
that command.  Post-execution hooks may exist simultaneously with
pre-execution hooks, for the same command.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You need to define hookpost-next instead:

define hookpost-next
print $rsp
end

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]