So I'm pretty new to gdb, and have just learned that you can save breakpoints with:
save breakpoints filename
and load them with
source filename
which is great, but because it's something I more or less plan on doing every time I enter/exit gdb, I'd like to get it down to a quick alias.
So, in my ~/.gdbinit I have the lines
alias savebps = save breakpoints .gdb_bps
alias loadbps = source .gdb_bps
loadbps
Unfortunately, every time I open gdb I get the error:
Invalid command to alias to: save breakpoints .gdb_bps
I know(/ strongly think) I have the syntax correct, as I've tested
alias savebps = help
and that alias works. So I think it's an issue with having a non-gdb command word (the filename) as part of an alias.
So, my questions are this:
- Am I being totally stupid and there's already a great way to auto-save and maintain my list of breakpoints?
- Can GDB have filenames in aliases? Or am I looking for something other than an 'alias'?
- If they CAN have filenames in them, what am I doing wrong?
Oh and as a note the '.gdb_bps' is an arbitrary file name I just kinda came up with as it'd be a nice unobtrusive thing to easily .gitignore and stuff.
Thanks!