How clear gdb command screen?

C++CGccGdbBinutils

C++ Problem Overview


Is it possible to clear the command window of gdb? I mean, is there a command in gdb that do the same (for the command windows) as the clear command in a bash terminal?

C++ Solutions


Solution 1 - C++

Hit Control + L. Works for me in Linux and Mac OS X as well with recent versions of GDB.

Solution 2 - C++

Depending on the environment you can try this key combination: Ctrl+L. That is: hold down the Control key, and type the L key.

But this may not work in all environments. You can also try the following: in gdb you can execute shell commands using shell: use this to call out to the shell to clear the terminal:

shell clear

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohnTortugoView Question on Stackoverflow
Solution 1 - C++user529758View Answer on Stackoverflow
Solution 2 - C++pb2qView Answer on Stackoverflow