Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix step-out command behaviour to complete current function #493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions gdbgui/src/js/GdbApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,11 @@ const GdbApi = {
"-exec-step" + (store.get("debug_in_reverse") || reverse ? " --reverse" : "")
);
},
click_return_button: function() {
// From gdb mi docs (https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution):
// `-exec-return` Makes current function return immediately. Doesn't execute the inferior.
// That means we do NOT dispatch the event `event_inferior_program_resuming`, because it's not, in fact, running.
// The return also doesn't even indicate that it's paused, so we need to manually trigger the event here.
GdbApi.run_gdb_command("-exec-return");
click_return_button: function(reverse = false) {
Actions.inferior_program_resuming();
GdbApi.run_gdb_command(
"-exec-finish" + (store.get("debug_in_reverse") || reverse ? " --reverse" : "")
);
Actions.inferior_program_paused();
},
click_next_instruction_button: function(reverse = false) {
Expand Down