Native Inspect Manual (H06.13+, J06.03+)
Printing Variables and Memory
The following example shows how to print variables and display memory contents by using the
print and x commands:
(eInspect 3,591):print local_ptr1
$1 = 0x80001f0 "From main"
(eInspect 3,591):print /x &local_ptr1[0]
$2 = 0x80001f0
(eInspect 7,911):print local_ptr2
$10 = 0x6ffffedc "Hello world"
(eInspect 7,911):x /4 local_ptr2
0x6ffffedc: 72 'H' 101 'e' 108 'l' 108 'l'
The output from the preceding example shows the following:
• Use of the print command to print the values of variables.
NOTE: C/C++ character pointers are automatically dereferenced.
• Use of the x command to display memory in its internal representation.
Stepping Execution Into a Function
The following example shows how to step execution into a function by using the next, step, and
bt commands:
(eInspect 3,591):next
80 call1(local_ptr1,local_q);
(eInspect 3,591):step
call1(char *, int) (string=0x0, q=0) at \PIPPIN.$D0117.NITEST.GARTCC:84
84 {
(eInspect 3,591):next
85 A1 a1;
(eInspect 3,591):bt
#0 call1(char *, int) (string=0x80001f0 "From main", q=0)
at \PIPPIN.$D0117.NITEST.GARTCC:85
#1 0x70001320:0 in main () at \PIPPIN.$D0117.NITEST.GARTCC:80
#2 0x700034d0:0 in _MAIN () at \SPEEDY.$RLSE.T8432H01.CPLMAINC:68
The output from the preceding example shows the following:
• Use the step command to step execution into a function.
• Parameter values are not available until execution is stepped through function prolog code.
Setting a Memory Access Breakpoint (MAB)
The following example shows how to set a memory access breakpoint (MAB) by using the mab,
c, and print commands:
(eInspect 3,591):mab structure.a
No symbol "structure" in current context.
(eInspect 3,591):next
86 printf("%s q = %d\n",string,q);
(eInspect 3,591):print a1
$3 = {
a = 0x0,
b = 0
}
(eInspect 3,591):mab a1.b
(eInspect 3,591):c
Continuing.
About to execute 'break 0x247'
Process (3,591) called DEBUG.
0x70001190:0 in print_and_break() () at \PIPPIN.$D0117.NITEST.GARTCC:72
72 DEBUG();
(eInspect 3,591):c
Continuing.
Sample Native Inspect Session (C++ Program) 39










