GDB">

Controlling GDB

Posted by Beetle B. on Mon 03 February 2020

Prompt You can change the prompt. If yoru gdb has python scripting enabled, you have prompt extensions. Command History You can set the filename for storing history, as well as how much history to save, and the handling of duplicates.

Some useful commands:

show commands: Display the last ten commands in the command history.

show commands N: Print ten commands centered on command number N.

show commands +: Print ten commands just after the commands last printed. Screen Size

If the output is too long, GDB may use a pager. Press c to continue without prompting.

You can also set the height, width, and turn off pagination altogether. Output Styling

You can style things. Colors, etc. Numbers

You can control the base of numbers. Automatically Loading Associated Files GDB can autoload a bunch of files (including your init file). This sections lists some (all?) of them. You may want to have some specific to a project.

There are also security implications - some of these can come from untrusted sources. Optional Warnings and Messages You can set verbose. Other Miscellaneous Settings You can get GDB to assume the defaults instead or prompting (useful in non-interactive applicactions).

tags : gdb