This is the mail archive of the gdb-patches@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]

Re: display in ~/.gdbinit does not work


On Mon, 28 May 2012 18:09:01 +0200, Joel Brobecker wrote:
> You might be able to achieve what you want using command hooks,
> although it might not always work - I don't know how the hooks
> are implemented in practice. But take a look at:
> 
>     http://www.sourceware.org/gdb/current/onlinedocs/gdb/Startup.html#Startup

It probably has some bugs but basically it works for me:

set $dpc=1
define hookpost-file
 display/i $pc
 set $dpc=0
end
define hook-stop
 if $dpc
  display/i $pc
  set $dpc=0
 end
end


Regards,
Jan


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