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 />

Starting adb with Data Files<br />

You can use adb to examine data files by giving the name of the data file in place of the<br />

program or core file. For example, to examine a data file named outdata, type<br />

adb outdata<br />

adb opens this file and lets you examine its contents.<br />

This method of examining files is very useful if the file contains non-ASCII data. adb<br />

provides a way to look at the contents of the file in a variety of formats and structures.<br />

Note that adb may display a warning when you give the name of a non-ASCII data file in<br />

place of a program file. This usually happens when the content of the data file is<br />

similar to a program file. Like core files, data files cannot be executed.<br />

Sta rting with the Write Option<br />

You can make changes and corrections in a program or data file using adb if you open it<br />

for writing using the -w option. For example, the command<br />

adb -w sample<br />

opens the program file sample for writing. You may then use adb commands to examine<br />

and modify this file.<br />

Nate that the -w option causes adb to create a given file if it does not already exist.<br />

The option also can be used to write directly to memory after executing the given<br />

program. See the section "Pa<strong>tc</strong>hing Binary Files" later in this chapter.<br />

Starting with the Prompt Option<br />

You can define the prompt used by adb by using the -p option. The option has the form<br />

-p prompt<br />

where prompt is any combination of characters. If you use spaces, enclose prompt in<br />

quotes. For example, the command<br />

adb -p "Mar 10->" sample<br />

sets the prompt to "Mar 10->". The new prompt takes the place of the default prompt<br />

(*) when adb begins to prompt for commands.<br />

Make sure you put at least one space between the -p and the new prompt, otherwise adb<br />

will display an error message. Note that adb automatically supplies a space at the end<br />

of the new prompt, so you do not have to supply one.<br />

6-3

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

Saved successfully!

Ooh no, something went wrong!