Code:
#include <stdio.h>int main(){ int a = 0x414243; printf("%d\n", 1); return 0;}
To compile and link:
Xlc_r-g-o Test test. cpp
To debug:
Dbx./test
Type 'help' for help.
Reading symbolic information...
(DBX) File
Test. cpp
(DBX) Stop in main
[1] Stop in main
(DBX) Run
[1] stopped in main at line 5 ($ T1)
5 Int a = 0x414243;
(DBX) N
Stopped in main at line 7 ($ T1)
7 printf ("% d \ n", 1 );
(DBX) P
4276803
(DBX) P &
0x2ff22470
(DBX) & A/X; X prints long integer characters in hexadecimal format.
0x2ff22470: 00414243
(DBX) & A, & A + 3/h; H prints bytes in hexadecimal notation.
0x2ff22470: 00 41 42 43
(DBX)
==================================
View memory:
Address, address/[mode] [> file]
Address/[count] [mode] [> file]
If the mode variable is omitted, the method previously specified is reused. The initial mode is X. The following methods are supported:
B prints bytes in octal.
C prints bytes as characters.
D. Print the long integer in decimal format.
D. Print the short integer in decimal format.
F print the single-precision floating point number.
G prints double-precision floating point numbers.
H prints bytes in hexadecimal format.
I printer commands.
LLD prints 8 bytes of signed decimal number.
LLO prints 8 bytes of unsigned eight bytes.
LlU prints 8 bytes of unsigned decimal number.
LLX prints 8 bytes of unsigned hexadecimal number.
O print long integer characters in octal.
O print short integer characters in octal.
Q: print the Extended Floating Point Number.
S prints the string terminated by NULL bytes.
X prints long integer characters in hexadecimal format.
X prints short integer characters in hexadecimal format.