01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

SDB ( 1) SDB ( 1)<br />

An exception to this interpretation occurs when displaying variable<br />

addresses. An entire structure does have an address, and it is<br />

this value sdb displays, not the addresses of individual elements.<br />

Elements of a multidimensional array may be referenced as<br />

variable [number] [number] ... ,<br />

or as<br />

variable [number,number, ... ].<br />

In place of number, the form number;number may be used to<br />

indicate a range of values, * may be used to indicate all legitimate<br />

values for that subscript, or subscripts may be omitted entirely if<br />

they are the last subscripts and the full range of values is desired .<br />

.AJ; with structures, sdb displays all the values of an array or section<br />

of an array if trailing subscripts are omitted. It displays only<br />

the address of the array itself or section specified by the user if<br />

subscripts are omitted.<br />

A particular instance of a variable on the stack may be referenced<br />

by using the form procedure :variable ,number. All the variations<br />

mentioned in naming variables may be used. Number is the<br />

occurrence of the specified procedure on the stack, counting the<br />

top, or most current, as the first. If no procedure is specified, the<br />

procedure currently executing is used by default.<br />

It is also possible to specify a variable by its address. All forms of.<br />

integer constants which are valid in C may be used, so that<br />

addresses may be input in decimal, octal or hexadecimal .<br />

Line numbers in the source program are referred to as filename<br />

:number or procedure :number. In either case the number is<br />

relative to the beginning of the file. If no procedure or file name is<br />

given, the current file is used by default. If no number is given,<br />

the first line of the named procedure or file is used.<br />

While a process is running under sdb, all addresses refer to the<br />

executing program; otherwise they refer to objfil or corfil . An initial<br />

argument of -w permits overwriting locations in objjil .<br />

Addresses.<br />

The address in a file associated with a written address is determined<br />

by a mapping associated with that file. Each mapping is<br />

represented by two triples ( b1, e1, /1 ) and ( b2, e2, /2 ) and the file<br />

address corresponding to a written address is calculated as follows:<br />

b1 � address< e1<br />

file address= address+/1- b1<br />

otherwise<br />

b2� address< e2<br />

file address= address+f2- b2<br />

otherwise, the requested address is not legal. In some cases (e.g.<br />

for programs with separated I and D space) the two segments for a<br />

- 2 -

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

Saved successfully!

Ooh no, something went wrong!