From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2382 invoked by alias); 21 Mar 2011 23:19:17 -0000 Received: (qmail 2327 invoked by uid 22791); 21 Mar 2011 23:19:16 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Mar 2011 23:18:37 +0000 From: "markflorisson88 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug python/12174] gdb.GdbError exceptions should not be translated to RuntimeError exceptions X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markflorisson88 at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pmuldoon at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 21 Mar 2011 23:19:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00235.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12174 --- Comment #3 from Mark Florisson 2011-03-21 23:04:23 UTC --- (In reply to comment #2) > Created attachment 5321 [details] > Preserve Python exception information through GDB code It seems sourceware forgot about my actual comment, so here goes. For GDB commands, the C function that is invoking the Python 'invoke' method of Command subclasses is clearing the exception, decreffing the type, value and traceback, and is then calling error() with the message string of the Python exception. At this point all Python information except for the exception message (in case this was actually a string!) is lost. So instead I propose to leave the Python error indicator installed, and have py-utils.c:gdbpy_convert_exception() check if a Python error indicator is set. If so, it can simply re-raise (i.e., propagate) it. I attached an untested patch, because unfortunately I don't have archer compiled at this moment. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.