In This Book

the source code. Use the frame block quali￿er, `main( n), from the traceback as an argument to the environment command. For example:

debug -attach 1189

 

 

 

Attached

to process

1189; initializing

"/home/smith/progs/and".

Stopped

at: `va(800b8658) (800B8658)

 

 

step

 

 

 

 

 

(Warning) Unable to determine statement boundaries;

 

 

stepping

1 instruction.

 

 

Stepped

to: read+0010 (800B8658)

 

 

tb

 

 

 

 

 

`main(7):

Stopped

at: read+0010 (800B8658)

`main(6):

Called from: _filbuf+0100

 

(800A5CC0)

`main(5):

Called

from: _doscan+0a78

 

(80096D2C)

`main(4):

Called

from: _scanf+0024

(8007E8F4)

`main(3):

Called

from: \\and\main\12

(00001DCC)

`main(2):

Called

from: _start+0068

(80041D5C)

`main:

 

Called

from: $START$+0094

 

(0000177C)

env `main(3)

 

 

 

Environment: \\and\main\12 (00001DCC) (frame `main(3))

Stopped

at: read+0010 (800B8658)

 

 

breakpoint

13

 

 

 

go

 

 

 

 

 

If you get a Permission denied error message when you attach to a running process, it is likely that you are running either the debugger or the target process over an NFS link. The relevant ￿le system may be mounted with the default intr option. You must mount the ￿le system with the nointr option to resolve this problem. Use a command like the following to mount the ￿le system containing the debugger:

$ mount -o nointr[, other options] system:/opt/langtools /tools

Use a command like the follo wing to moun t the ￿le system con taining the target process:

$ mount -o nointr[, other options] system:/test_area /test

It is probably easier to create an auxiliary moun t for the ￿le system than to unmount and remount it.

2-8 Compiling, Loading, and Executing the Target Program