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


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  da361ebd2db2ca7696fbb7b45e2661f80c069c72 (commit)
      from  b9458955949ada1ee1464dafff66bf1405ab4dda (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=da361ebd2db2ca7696fbb7b45e2661f80c069c72

commit da361ebd2db2ca7696fbb7b45e2661f80c069c72
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 5 13:17:40 2013 +0100

    Uninitialized variable "this_id" in frame.c:get_prev_frame_1.
    
    With a simple Ada program where I have 3 functions, one just calling
    the next, the backtrace is currently broken when GDB is compiled
    at -O2:
    
       #0  hello.first () at hello.adb:5
       #1  0x0000000100001475 in hello.second () at hello.adb:10
       Backtrace stopped: previous frame inner to this frame (corrupt stack?)
    
    It turns out that a recent patch deleted the assignment of variable
    this_id, making it an unitialized variable:
    
            * frame-unwind.c (default_frame_unwind_stop_reason): Return
            UNWIND_OUTERMOST if the frame's ID is outer_frame_id.
            * frame.c (get_prev_frame_1): Remove outer_frame_id check.
    
    The hunk in question starts with:
    
    -  /* Check that this frame is not the outermost.  If it is, don't try
    -     to unwind to the prev frame.  */
    -  this_id = get_frame_id (this_frame);
    -  if (frame_id_eq (this_id, outer_frame_id))
    
    (the code was removed as redundant - but removing the assignment
    was in fact not intentional).
    
    There is no other code in this function that sets the variable.
    Instead of re-adding the statement in the lone section where it is
    actually used, I inlined it, and then got rid of the variable
    altogether.  This way, and until we start needing this frame ID
    in another location within that function, we dont' have to worry
    about the variable's validity/lifetime.
    
    gdb/ChangeLog:
    
            * frame.c (get_prev_frame_1): Delete variable "this_id".
            Replace its use by a call to get_frame_id.

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

Summary of changes:
 gdb/ChangeLog |    5 +++++
 gdb/frame.c   |    4 ++--
 2 files changed, 7 insertions(+), 2 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]