09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>XENIX</strong> Programming adb: Program Debugger<br />

Since execution to this point caused no errors, you can remove the first breakpoint by<br />

typing<br />

f:dl<br />

and continue the program by typing<br />

:co<br />

adb displays the message<br />

sample: running<br />

and starts the program at the next instruction. Execution continues until the next<br />

breakpoint where adb displays the message<br />

breakpoint _ g: push bp<br />

You can now trace the path of execution by typing<br />

$c<br />

The command shows that only two functions are active: main and f.<br />

f(1.,1.)<br />

- main (1.,470.)<br />

from main + 6.<br />

from -start + 114.<br />

Although the breakpoint has been set at the start of function g, it will not be listed in<br />

the backtrace until its first few instructions have been executed. To execute these<br />

instructions, type<br />

,S:s<br />

adb single-steps the first five instructions. Now you can list the backtrace again. Type<br />

$c<br />

This time the list shows three active functions:<br />

g (2.,3.)<br />

- f(1.,1.)<br />

- main (1.,470.)<br />

from f + 48.<br />

from - main + 6.<br />

from - start + 114.<br />

6-2 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!