From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11475 invoked by alias); 4 Mar 2014 10:36:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11466 invoked by uid 89); 4 Mar 2014 10:36:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,KAM_STOCKGEN,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: satori.sandbox-dev.search.yandex.net Received: from satori.sandbox-dev.search.yandex.net (HELO satori.sandbox-dev.search.yandex.net) (5.255.204.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Mar 2014 10:36:30 +0000 Received: by satori.sandbox-dev.search.yandex.net (Postfix, from userid 30101) id 678DBF40B33; Tue, 4 Mar 2014 14:36:27 +0400 (MSK) From: Maxim Bublis To: gdb-patches@sourceware.org Cc: Maxim Bublis Subject: [PATCH 0/3] Fixed abortion using Python API for label symbol object. Date: Tue, 04 Mar 2014 10:36:00 -0000 Message-Id: <1393929360-31299-1-git-send-email-satori@yandex-team.ru> X-SW-Source: 2014-03/txt/msg00062.txt.bz2 Hi, There is a problem with calling .value() method for label symbol object, i.e. symbol object with it's .addr_class == gdb.SYMBOL_LOC_LABEL. If you debugging code similar to that: int main() { abort(); some_label: return 0; } and if you are running something like that (frame with `main' function should be selected in this case): gdb> python "print list(gdb.selected_frame().block())[0].value(gdb.selected_frame())" gdb will fail with SIGABRT. Following patchset adds testcase, fixes problem and documents this behavior. Maxim Bublis (3): gdb/testsuite/gdb.python: Added testcase for .value() method gdb/python: raise TypeError instead of abort() on calling .value() method for label symbol object gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method gdb/ChangeLog | 6 ++++++ gdb/doc/ChangeLog | 6 ++++++ gdb/doc/python.texi | 9 ++++++++- gdb/python/py-symbol.c | 6 ++++++ gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.python/py-symbol.c | 3 +++ gdb/testsuite/gdb.python/py-symbol.exp | 6 ++++++ 7 files changed, 41 insertions(+), 1 deletion(-) -- 1.7.9.5