Monday, August 11, 2014

DBX Commands

The following snippets are as per the Oracle docs.
http://docs.oracle.com/cd/E19422-01/819-3683/command_ref.html#52675

1. source - The source command executes commands from a given file. It is valid only in native mode.

Syntax

source filename
Execute commands from file filename. $PATH is not searched.

2. where  - The where command prints the call stack.

Native Mode Syntax

where
Print a procedure traceback.
where number
Print the number top frames in the traceback.
where -f number
Start traceback from frame number.
where -h
Include hidden frames.
where -l
Include library name with function name
where -q
Quick traceback (only function names).
where -v
Verbose traceback (include function args and line info).

where:
number is a number of call stack frames.
Any of the above forms may be followed by a thread or LWP ID to obtain the traceback for the specified entity.

Java Mode Syntax


where [thread_id]
Print a method traceback.
where [thread_id] number
Print the number top frames in the traceback.
where -f [thread_id] number
Start traceback from frame number.
where -q [thread_id]
Quick trace back (only method names).
where -v [thread_id]
Verbose traceback (include method arguments and line information).

where:
number is a number of call stack frames.
thread_id is a dbx-style thread ID or the Java thread name specified for the thread.


3. cont Command

The cont command causes the process to continue execution. It has identical syntax and identical functionality in native mode and Java mode.

Syntax


cont
Continue execution. In an MT process all threads are resumed. Use Control-C to stop executing the program.
cont ... -sig signal
Continue execution with signal signal.
cont ... id
The id specifies which thread or LWP to continue.
cont at line [ id ]
Continue execution at line line. id is required if the application is multi-threaded.
cont ... -follow parent|child|both
If the dbx follow_fork_mode environment variable is set to ask, and you have chosen stop, use this option to choose which process to follow. both is only applicable in the Sun Studio IDE.

4. detach Command

The detach command releases the target process from dbx's control.

Native Mode Syntax


detach
Detach dbx from the target, and cancel any pending signals.
detach -sig signal
Detach while forwarding the given signal.
detach -stop
Detach dbx from the target and leave the process in a stopped state. This option allows temporary application of other /proc-based debugging tools that might be blocked due to exclusive access. For an example, see Detaching dbx From a Process.

No comments:

Post a Comment