Make "skip" work on inline frames

Message ID
State New, archived

Commit Message

Bernd Edlinger Oct. 19, 2019, 4:38 a.m. UTC

I noticed that the patch does not yet handle
the step <count> correctly, the count is decremented
although the inline frame is skipped and should not be

Thus I will need to change at least this:

> I noticed that skip is not working well on inlined frames which may
> happen in optimized gcc stage3 binary, where step stops at functions
> which are marked for skip, whenever they happen to be in-lined, where
> it is ignored if the frame is marked for skip, thus currently
> skipped frames are only checked when the skipped function
> is not inlined, which is usually only the case in non-optimized builds.
> Thanks
> Bernd.


--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1122,7 +1122,6 @@  prepare_one_step (struct step_command_fsm *sm)
              set_running (resume_ptid, 1);
              step_into_inline_frame (tp);
-             sm->count--;
              sal = find_frame_sal (frame);
              sym = get_frame_function (frame);
@@ -1132,13 +1131,17 @@  prepare_one_step (struct step_command_fsm *sm)
              if (sal.line == 0
                  || !function_name_is_marked_for_skip (fn, sal))
-               return prepare_one_step (sm);
+               {
+                 sm->count--;
+                 return prepare_one_step (sm);
+               }

So I'll send a new patch in a moment.


On 10/18/19 2:52 PM, Bernd Edlinger wrote:
> Hi,