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. 849f2b52ec2b71bc76188ac8c53f35fb57a5d41c


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  849f2b52ec2b71bc76188ac8c53f35fb57a5d41c (commit)
      from  4e35e8085e8922746e0731a7005452de499620fa (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=849f2b52ec2b71bc76188ac8c53f35fb57a5d41c

commit 849f2b52ec2b71bc76188ac8c53f35fb57a5d41c
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Tue Oct 29 11:36:58 2013 +0100

    crash evaluating bogus exception condition expression (sparc-solaris)
    
    With a program raising an exception, trying to debug that program
    in GDB/MI mode can yield a crash:
    
        % gdb -i=mi foo
        (gdb)
        -catch-exception -e "Program_Error"
        ^done,bkptno="2",bkpt={number="2",type="breakpoint",[...]
        (gdb)
        -exec-continue
        ^running
        *running,thread-id="all"
        (gdb)
        =library-loaded,id=[...]
        &"warning: failed to reevaluate internal exception condition for catchpoint 2: Error in expression, near `'.\n"
        zsh: 22956 bus error (core dumped)  gdb -q -i=mi foo
    
    The problem is triggered by a problem in the compiler which causes
    EXP in the following TRY_CATCH block to change unexpectedly when
    parse_exp_1 throws an error :
    
       |      TRY_CATCH (e, RETURN_MASK_ERROR)
       |        {
       |          exp = parse_exp_1 (&s, bl->address,
       |                             block_for_pc (bl->address), 0);
       |        }
    
    In ada-lang.c:create_excep_cond_exprs, EXP is initialized to NULL,
    and is expected to remain NULL if parse_exp_1 throws.  Instead,
    its value gets changed to something invalid.  This later crashes
    the debugger, when trying to evaluate the bogus expression.
    
    This patch works around the issue by simply forcing EXP back to NULL
    when an exception was thrown. A comment explaining why, and the sort
    of timeline we're looking at for a fix, is also added.
    
    gdb/ChangeLog:
    
            * ada-lang.c (create_excep_cond_exprs): Force EXP to NULL
            when parse_exp_1 threw an error.  Add comment.

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

Summary of changes:
 gdb/ChangeLog  |    5 +++++
 gdb/ada-lang.c |   15 ++++++++++++---
 2 files changed, 17 insertions(+), 3 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]