This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] use frame IDs to detect function calls while stepping


On Thu, Feb 05, 2004 at 02:20:10PM -0500, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> 
>  > > +      if (IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name))
>  > > +        {
>  > > +          /* We landed in a shared library call trampoline, so it
>  > > +             is a subroutine call.  */
>  > > +          handle_step_into_function (ecs);
>  > > +          return;
>  > > +        }
>  > > +
>  > > +      if (frame_id_eq (get_frame_id (get_prev_frame (get_current_frame ())),
>  > > +                       step_frame_id))
>  > > +        {
>  > > +          /* It's a subroutine call.  */
>  > > +          handle_step_into_function (ecs);
>  > > +          return;
>  > > +        }
>  > > +
>  > 
>  > get_prev_frame can return NULL.  In fact, it generally does in main.
>  > 
> 
> I don't think it matters, frame_id_eq will handle a comparison with
> null_frame_id.

Oh, you're right - I was expecting get_frame_id (NULL) to be a problem,
but it isn't.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]