How to save gdb setup information inside gdb session?
<p>We can use .gdbinit or a command file to start gdb with pre-set commands and macro definitions. But my case in:</p>

<p>I've started gdb and defined a few "breakpoints", "commands", "defines", how to save these debug session information into a file(either .gdbinit or commands file), by a gdb command? I don't wish to trace back gdb command history and copy-paste all those typings. </p>

<p>Does gdb support this?
Thanks.</p>