source

Execute commands from a batch file.

Syntax

source filename  

Parameters

filename

The file from which to execute commands.

Description

This command specifies a file from which the debugger reads and executes a series of commands.

Alternatively, you can execute debugger commands when you invoke the debugger by creating an initialization file named .idbrc or .dbxinit.

If you place commands in a file, you can execute them directly from the file rather than cutting and pasting them to the terminal. These commands can be nested. If you have multiple command files, the debugger continues reading and processing the commands in a subsequent file immediately after processing the final command of the previous file.

The following rules and guidelines apply to command files:

Example

The following example is a debugger script named ../src/myscript:

step 
where 2 

The following example shows how to execute this script:

(idb) run
[1] stopped at [int main(void):187 0x080516aa] 
188 nodeList.append(newNode); {static int somethingToReturnTo; somethingToReturnTo++; } 
(idb) source ../src/myscript
stopped at [void List<Node>::append(class Node* const):148 0x0804ae5a] 
148 if (!_firstNode) 
>0 0x0804ae5a in ((List<Node>*)0xbfffa460)->List<Node>::append(node=0x805c500) "src/x_list.cxx":148

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.