Summary of idb Debugger Commands

The table below lists some of the more frequently used debugging commands available in idb.  Many of these commands can be abbreviated (for example, you can enter c instead of cont and s instead of step.  You can use the alias command to get a complete list of these abbreviations and even create your own aliases.

The table shows examples of the most commonly used debugger commands. For more information, see the online Intel ® Debugger (IDB) Manual.

Command example

Description

catch

Displays all signals that the debugger is currently set to catch. See also ignore.

catch fpe

Tells the debugger to catch the fpe signal (or the signal specified). This prevents the specified signal from reaching the Intel Fortran run-time library (RTL).

catch unaligned

Tells the debugger to catch the unaligned signal.

cont

Resumes (continues) execution of the program that is being debugged. Note that there is no idb command named continue.

delete 2

Removes the breakpoint or tracepoint identified by event number 2. See also status.

delete all

Removes all breakpoints and tracepoints.

help

Displays debugger help text.

history 5

Displays the last five debugger commands.

ignore

Displays the signals the debugger is currently set to ignore. The ignored signals are allowed to pass directly to the Intel Fortran RTL, See also catch.

ignore fpe

Tells the debugger to ignore the fpe signal (or the signal specified). This allows the specified signal to pass directly to the Intel Fortran RTL, allowing message display.

ignore unaligned

Tells the debugger to ignore the unaligned signal (the default).

kill

Terminates the program process, leaving the debugger running and its breakpoints and tracepoints intact for when the program is rerun.

list

Displays source program lines. To list a range of lines, add the starting line number, a comma (,), and the ending line number, such as list 1,9.

print k

Displays the value of the specified variable, such as K.

printregs

Displays all registers and their contents.

next

Steps one source statement but does not step into calls to subprograms, Compare with step.

quit

Ends the debugging session.

run

Runs the program being debugged. You can specify program arguments and redirection.

rerun

Runs the program being debugged again. You can specify program arguments and redirection.

return [routine-name]

Continues execution of the function until it returns to its caller.

When using the step command, if you step into a subprogram that does not require further investigation, use the return command to continue execution of the current function until it returns to its caller. If you include the name of a routine with the return command, execution continues until control is returned to that routine.

The routine-name is the name of the routine, usually named by a PROGRAM, SUBROUTINE, or FUNCTION statement. If there is no PROGRAM statement, the debugger refers to the main program with a prefix of main$ followed by the file name.

sh more progout.f90

Executes the shell command more to display file progout.f90, then returns to the debugger environment.

show thread

Lists all threads known to the  debugger.

status

Displays breakpoints and tracepoints with their event numbers. See also delete.

step

Steps one source statement, including stepping into calls of a subprogram. For Intel Fortran I/O statements, intrinsic procedures, library routines, or other subprograms, use the next command instead of step to step over the subprogram call. Compare with next; see also  return.

stop in foo

Stops execution (breakpoint) at the beginning of routine foo.

stop at 100

Stops execution at line 100 (breakpoint) of the current source file.

stopi at xxxxxxx

Stops execution at address xxxxxxx of the current executable program.

thread [n]

Identifies or sets the current thread context.

watch location

Displays a message when the debuggee (or user program) accesses the specified memory location. For example:  watch 0x140000170

watch variable m

Displays a message when the debuggee (or user program) accesses the variable specified by m.

whatis symbol

Displays the data type of the specified symbol.

when at 9 {command}

Executes a command or commands.

When a specified line (such as 9) is reached, the command or commands are executed. For example, when at 9 {print k} prints the value of variable K when the program executes source code line 9.

when in name {command}

Executes a command or commands.

When a procedure specified by name is reached, the command or commands are executed. For example, when in calc_ave {print k} prints the value of variable K when the program begins executing the procedure named calc_ave.

where

Displays the call stack.

where thread all

Displays the stack traces of all threads.

The debugger supports other special-purpose commands. For example: