Patchwork Make "skip" work on inline frames

login
register
mail settings
Submitter Bernd Edlinger
Date Oct. 19, 2019, 4:38 a.m.
Message ID <VI1PR03MB452851603771A9F8A45E74C9E46F0@VI1PR03MB4528.eurprd03.prod.outlook.com>
Download mbox | patch
Permalink /patch/35152/
State New
Headers show

Comments

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

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
counted...

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.
>

Patch

--- 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.


Thanks.

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