
Appendix E. The GDB Agent Expression Mechanism
357
log_not
(0x0e):
a
=>
!a
Pop an integer from the stack; if it is zero, push the value one; otherwise, push the value zero.
bit_and
(0x0f):
a b
=>
a&b
Pop two integers from the stack, and push their bitwise
and
.
bit_or
(0x10):
a b
=>
a|b
Pop two integers from the stack, and push their bitwise
or
.
bit_xor
(0x11):
a b
=>
a^b
Pop two integers from the stack, and push their bitwise exclusive-
or
.
bit_not
(0x12):
a
=>
~a
Pop an integer from the stack, and push its bitwise complement.
equal
(0x13):
a b
=>
a=b
Pop two integers from the stack; if they are equal, push the value one; otherwise, push the value
zero.
less_signed
(0x14):
a b
=>
a
h
b
Pop two signed integers from the stack; if the next-to-top value is less than the top value, push
the value one; otherwise, push the value zero.
less_unsigned
(0x15):
a b
=>
a
h
b
Pop two unsigned integers from the stack; if the next-to-top value is less than the top value, push
the value one; otherwise, push the value zero.
ext
(0x16)
n
:
a
=>
a
, sign-extended from
n
bits
Pop an unsigned value from the stack; treating it as an
n
-bit twos-complement value, extend it to
full length. This means that all bits to the left of bit
n-1
(where the least significant bit is bit 0)
are set to the value of bit
n-1
. Note that
n
may be larger than or equal to the width of the stack
elements of the bytecode engine; in this case, the bytecode should have no effect.
The number of source bits to preserve,
n
, is encoded as a single byte unsigned integer following
the
ext
bytecode.
zero_ext
(0x2a)
n
:
a
=>
a
, zero-extended from
n
bits
Pop an unsigned value from the stack; zero all but the bottom
n
bits. This means that all bits to
the left of bit
n-1
(where the least significant bit is bit 0) are set to the value of bit
n-1
.
The number of source bits to preserve,
n
, is encoded as a single byte unsigned integer following
the
zero_ext
bytecode.
ref8
(0x17):
addr
=>
a
ref16
(0x18):
addr
=>
a
ref32
(0x19):
addr
=>
a
ref64
(0x1a):
addr
=>
a
Pop an address
addr
from the stack. For bytecode
refn
, fetch an
n
-bit value from
addr
, using
the natural target endianness. Push the fetched value as an unsigned integer.
Note that
addr
may not be aligned in any particular way; the
ref
n
bytecodes should operate
correctly for any address.
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......