Check all inline frames if they are marked for skip

This makes the skip command work in optimized builds, where skipped
functions may be inlined.  Previously that was only working when
stepping into a non-inlined function.
This commit is contained in:
Bernd Edlinger
2019-10-18 14:28:45 +02:00
committed by Simon Marchi
parent 43a599b56c
commit 4a4c04f1f4
3 changed files with 75 additions and 5 deletions

View File

@@ -52,6 +52,7 @@
#include "thread-fsm.h"
#include "top.h"
#include "interps.h"
#include "skip.h"
#include "gdbsupport/gdb_optional.h"
#include "source.h"
#include "cli/cli-style.h"
@@ -1106,14 +1107,29 @@ prepare_one_step (struct step_command_fsm *sm)
&& inline_skipped_frames (tp))
{
ptid_t resume_ptid;
const char *fn = NULL;
symtab_and_line sal;
struct symbol *sym;
/* Pretend that we've ran. */
resume_ptid = user_visible_resume_ptid (1);
set_running (resume_ptid, 1);
step_into_inline_frame (tp);
sm->count--;
return prepare_one_step (sm);
frame = get_current_frame ();
sal = find_frame_sal (frame);
sym = get_frame_function (frame);
if (sym != NULL)
fn = sym->print_name ();
if (sal.line == 0
|| !function_name_is_marked_for_skip (fn, sal))
{
sm->count--;
return prepare_one_step (sm);
}
}
pc = get_frame_pc (frame);