Skip to content

Commit

Permalink
wrap rr macros restart and jump in python
Browse files Browse the repository at this point in the history
fixes rr-debugger#3859 warnings during startup
  • Loading branch information
GitMensch authored Nov 2, 2024
1 parent 13541ec commit cfa2782
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/launch_debugger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ static const string& gdb_rr_macros() {
if (s.empty()) {
stringstream ss;
ss << DebuggerExtensionCommandHandler::gdb_macros()
<< "define restart\n"
<< " run c$arg0\n"
<< "end\n"
// gdb warns about redefining inbuilt commands, silence that by
// wrapping it in python code
<< "python gdb.execute('''define jump\nrr-denied jump\nend''')
<< python gdb.execute('''define restart\nrun c$arg0\nend''')
<< "document restart\n"
<< "restart at checkpoint N\n"
<< "checkpoints are created with the 'checkpoint' command\n"
Expand All @@ -61,9 +62,6 @@ static const string& gdb_rr_macros() {
<< "document seek-ticks\n"
<< "restart at given ticks value\n"
<< "end\n"
<< "define jump\n"
<< " rr-denied jump\n"
<< "end\n"
// In gdb version "Fedora 7.8.1-30.fc21", a raw "run" command
// issued before any user-generated resume-execution command
// results in gdb hanging just after the inferior hits an internal
Expand Down

0 comments on commit cfa2782

Please sign in to comment.