bitwise operations on registers
Andrew Cagney
ac131313@cygnus.com
Wed Mar 27 13:43:00 GMT 2002
>
> 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.
Andrew
More information about the Gdb
mailing list