We can use .gdbinit or a command file to start gdb with pre-set commands and macro definitions. But my case in:
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.
Does gdb support this? Thanks.