kdb_cmds: new (returning) user questions
randy.dunlap at verizon.net
Fri May 18 14:59:32 PDT 2007
On Wed, 16 May 2007 21:20:20 +1000 Keith Owens wrote:
> >4. Is there a way to print (decode) the CPU flags register so that
> >I can see which bits (conditions) are set/clear?
> No. Feel free to write one for kdb, but I usually handle this sort of
> problem by taking the hex value and feeding it to an external script.
> Like this one for decoding the IA64 psr bits.
Does that mean that you usually use kdb over a serial line instead
of on the target system's keyboard+display? (sounds like that to me,
since you feed psr bits to an external script, whereas I typically
don't use a serial line for kdb, so having flag-bit-decoding done
internally would make some sense)
Anyway, I took your ia64 psr bits script and modified it to decode
x86/x86-64 EFLAGS bits. The eflags are fed to it on the command
line instead of via STDIN, and the output bit values are not shifted
right, but that didn't matter to me. E.g.:
$ decode-x86flags 10296 246
flags: 0x10296 = PF  AF  SF  IF  RF 
flags: 0x246 = PF  ZF  IF 
It's attached, in case anyone cares for it.
-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: decode-x86flags
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
More information about the kdb