HighLife
HighLife

Reputation: 4344

Viewing previous gdb commands

In a Unix terminal you can use the up arrow key to go back through previous commands, and it remembers these commands even if you close your terminal and open it again later. Is there a way to do this with gdb? When I close gdb it seems to forget previously used commands.

Upvotes: 2

Views: 404

Answers (2)

Kamath
Kamath

Reputation: 4664

You can save gdb gdb command history

(gdb) set history save on

Upvotes: 4

Employed Russian
Employed Russian

Reputation: 213476

Google for "gdb save history" gives this link, which says you need to set history save on.

Upvotes: 1

Related Questions