[commit] Simplify STEP_OVER_UNDEBUGGABLE

Andrew Cagney
2004-05-14T18:42:00Z

Hello,

The attached deletes all the irrelevant guff that was being executed
when determining how to STEP_OVER_UNDEBUGGABLE. See the bottom of the
patch for what's left.

committed,
Andrew
2004-05-14 Andrew Cagney <cagney@redhat.com>

* infrun.c (handle_inferior_event): Simplify
STEP_OVER_UNDEBUGGABLE.

2004-05-14 Andrew Cagney <cagney@redhat.com>
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.162
diff -p -c -r1.162 infrun.c
*** infrun.c 14 May 2004 15:49:00 -0000 1.162
--- infrun.c 14 May 2004 18:40:47 -0000
*************** process_event_stop_test:
*** 2353,2434 ****
inferior stopped). Since we want to skip this kind of code,
we keep going until the inferior returns from this
function. */
! /* NOTE: cagney/2004-05-12: This test is performed after the
! sigtramp test as often sigtramps, while recognized by GDB,
! have no symbol information. */
! CORE_ADDR real_stop_pc;
!
! if ((step_over_calls == STEP_OVER_NONE)
! || ((step_range_end == 1)
! && in_prologue (prev_pc, ecs->stop_func_start)))
{
! /* I presume that step_over_calls is only 0 when we're
! supposed to be stepping at the assembly language level
! ("stepi"). Just stop. */
! /* Also, maybe we just did a "nexti" inside a prolog, so we
! thought it was a subroutine call but it was not. Stop as
! well. FENN */
stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
}
!
! if (step_over_calls == STEP_OVER_ALL || IGNORE_HELPER_CALL (stop_pc))
{
! /* We're doing a "next", set a breakpoint at callee's return
! address (the address at which the caller will
! resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()),
ecs);
keep_going (ecs);
return;
}
-
- /* If we are in a function call trampoline (a stub between the
- calling routine and the real function), locate the real
- function. That's what tells us (a) whether we want to step
- into it at all, and (b) what prologue we want to run to the
- end of, if we do step into it. */
- real_stop_pc = skip_language_trampoline (stop_pc);
- if (real_stop_pc == 0)
- real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
- if (real_stop_pc != 0)
- ecs->stop_func_start = real_stop_pc;
-
- /* If we have line number information for the function we are
- thinking of stepping into, step into it.
-
- If there are several symtabs at that PC (e.g. with include
- files), just want to know whether *any* of them have line
- numbers. find_pc_line handles this. */
- {
- struct symtab_and_line tmp_sal;
-
- tmp_sal = find_pc_line (ecs->stop_func_start, 0);
- if (tmp_sal.line != 0)
- {
- step_into_function (ecs);
- return;
- }
- }
-
- /* If we have no line number and the step-stop-if-no-debug is
- set, we stop the step so that the user has a chance to switch
- in assembly mode. */
- if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
- {
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
- return;
- }
-
- /* Set a breakpoint at callee's return address (the address at
- which the caller will resume). */
- insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), ecs);
- keep_going (ecs);
- return;
}

if (frame_id_eq (frame_unwind_id (get_current_frame ()),
--- 2353,2377 ----
inferior stopped). Since we want to skip this kind of code,
we keep going until the inferior returns from this
function. */
! if (step_stop_if_no_debug)
{
! /* If we have no line number and the step-stop-if-no-debug
! is set, we stop the step so that the user has a chance to
! switch in assembly mode. */
stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
}
! else
{
! /* Set a breakpoint at callee's return address (the address
! at which the caller will resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()),
ecs);
keep_going (ecs);
return;
}
}

if (frame_id_eq (frame_unwind_id (get_current_frame ()),
From ibr@ata.cs.hun.edu.tr Fri May 14 19:40:00 2004
From: Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
To: gdb-patches@sources.redhat.com
Subject: Re: handling of absolute source file paths
Date: Fri, 14 May 2004 19:40:00 -0000
Message-id: <20040514194159.GC2000@ata.cs.hun.edu.tr>
References: <20040420154855.GD9020@ata.cs.hacettepe.edu.tr> <ud661962c.fsf@elta.co.il> <20040501171420.GB21679@ata.cs.hun.edu.tr> <9743-Sat01May2004211140+0300-eliz@gnu.org> <20040508212208.GA1019@ata.cs.hun.edu.tr> <6137-Tue11May2004190737+0300-eliz@gnu.org>
X-SW-Source: 2004-05/msg00434.html
Content-length: 679

Hello,

On Tue, May 11, 2004 at 07:07:37PM +0200, Eli Zaretskii wrote:
> I was trying to approve your patch (all of its parts). It sounds like
> everything is approved now, is that true?
>
> Once approved, it can go in; if you don't have write access to the GDB
> CVS tree, I (or someone else) could do that for you.
>
> Andrew, is the paperwork part covered for Baurjan?

Andrew, could you please say "yes" or "no" so that Eli could commit this
or I could send the necessary papers?

With kind regards,
Baurjan. Attachment:
gdb-6.0-ibr-search_in_path-20040310-1302.diff
Description: Text document
Attachment:
src-ibr-doc_search-20040509-0926.diff
Description: Text document