This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] use frame IDs to detect function calls while stepping
On Thu, Feb 05, 2004 at 09:13:24PM +0400, Joel Brobecker wrote:
> + if (ecs->stop_func_name == NULL
> + && step_over_calls == STEP_OVER_UNDEBUGGABLE)
> + {
> + /* We couldn't determine where we stopped, so we just stepped
> + inside undebuggable code. Since we want to step over this
> + kind of code, we keep going until the inferior returns from
> + the current function. */
The test and the comment don't seem to match. Code with only minimal
symbols will still set stop_func_name.
> + 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.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer