This is the mail archive of the gdb@sources.redhat.com 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: bitwise operations on registers


On Wed, Mar 27, 2002 at 04:41:43PM -0500, Andrew Cagney wrote:
> >
> >Can't really do this, but you can at least:
> >define current
> >((struct task_struct *)($esp & ~8191))
> >end
> >
> >(gdb) current
> >$33 = <blah>
> >(gdb) $33->pid
> 
> You've also got:
> 	(gdb) set $current = ($esp & ~8191)
> but that is only evaluated once (If I remember right).
> 
> The next step would be to add it to the stop-hook so it is executed 
> after every stop.

... or hook it up to Jim's new macro expander, perhaps?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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