This is the mail archive of the gdb-cvs@sourceware.org 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]

gdb and binutils branch master updated. b7a084bebe979a4743540349025561ce82208843


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  b7a084bebe979a4743540349025561ce82208843 (commit)
      from  071436c6e94be13904438b6eb70ee79c73354a61 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b7a084bebe979a4743540349025561ce82208843

commit b7a084bebe979a4743540349025561ce82208843
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Nov 7 13:53:01 2014 +0000

    Revert old nexti prologue check and eliminate in_prologue
    
    The in_prologue check in the nexti code is obsolete; this commit
    removes that, and then removes the in_prologue function as nothing
    else uses it.
    
    Looking at the code in GDB that makes use in_prologue, all we find is
    this one caller:
    
          if ((ecs->event_thread->control.step_over_calls == STEP_OVER_NONE)
    	  || ((ecs->event_thread->control.step_range_end == 1)
    	      && in_prologue (gdbarch, ecs->event_thread->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 */
    	  /* And this works the same backward as frontward.  MVS */
    	  end_stepping_range (ecs);
    	  return;
    	}
    
    This was added by:
    
     commit 100a02e1deec2f037a15cdf232f026dc79763bf8
     ...
         From Fernando Nasser:
         * infrun.c (handle_inferior_event): Handle "nexti" inside function
         prologues.
    
    The mailing list thread is here:
    
      https://sourceware.org/ml/gdb-patches/2001-01/msg00047.html
    
    Not much discussion there, and no test, but looking at the code around
    what was patched in that revision, we see that the checks that detect
    whether the program has just stepped into a subroutine didn't rely on
    the unwinders at all back then.
    
    From 'git show 100a02e1:gdb/infrun.c':
    
        if (stop_pc == ecs->stop_func_start         /* Quick test */
            || (in_prologue (stop_pc, ecs->stop_func_start) &&
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
            || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name)
            || ecs->stop_func_name == 0)
          {
            /* It's a subroutine call.  */
    
            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;
              }
    
    Stripping the IN_SOLIB_RETURN_TRAMPOLINE checks for simplicity, we had:
    
        if (stop_pc == ecs->stop_func_start         /* Quick test */
            || in_prologue (stop_pc, ecs->stop_func_start)
            || ecs->stop_func_name == 0)
          {
            /* It's a subroutine call.  */
    
    That is, detecting a subroutine call was based on prologue detection
    back then.  So the in_prologue check in the current tree only made
    sense back then as it was undoing a bad decision the in_prologue check
    that used to exist above did.
    
    Today, the check for a subroutine call relies on frame ids instead,
    which are stable throughout the function.  So we can just remove the
    in_prologue check for nexti, and the whole in_prologue function along
    with it.
    
    Tested on x86_64 Fedora 20, and also by nexti-ing manually a prologue.
    
    gdb/
    2014-11-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (process_event_stop_test) <subroutine check>: Don't
    	check if we did a "nexti" inside a prologue.
    	* symtab.c (in_prologue): Delete function.
    	* symtab.h (in_prologue): Delete declaration.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog |    7 +++++
 gdb/infrun.c  |    8 +-----
 gdb/symtab.c  |   73 ---------------------------------------------------------
 gdb/symtab.h  |    3 --
 4 files changed, 8 insertions(+), 83 deletions(-)


hooks/post-receive
-- 
gdb and binutils


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