From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19009 invoked by alias); 28 Nov 2013 18:46:07 -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 18991 invoked by uid 89); 28 Nov 2013 18:46:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_20,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Nov 2013 18:46:05 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rASIjwpq016089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Nov 2013 13:45:58 -0500 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rASIjvDk009874 for ; Thu, 28 Nov 2013 13:45:57 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [RFC] Python's gdb.FRAME_UNWIND_NULL_ID is no longer used. What to do with it? Date: Thu, 28 Nov 2013 20:13:00 -0000 Message-Id: <1385664356-29726-1-git-send-email-palves@redhat.com> X-SW-Source: 2013-11/txt/msg00889.txt.bz2 I'd assume scripts just check the result of Frame.unwind_stop_reason, and compare it to gdb.FRAME_UNWIND_NO_REASON. That at most, they'll pass the result of Frame.unwind_stop_reason to gdb.frame_stop_reason_string. I'd prefer to just get rid of it, but it may be best to keep this around for compatibility, in case a script does refer to gdb.FRAME_UNWIND_NULL_ID directly. In general, what's the policy for exposed constants like this in Python? gdb/ 2013-11-28 Pedro Alves * unwind_stop_reasons.def (UNWIND_NULL_ID): Update comment. gdb/doc/ 2013-11-28 Pedro Alves * gdb.texinfo (Frames In Python) : Update comment. --- gdb/doc/gdb.texinfo | 4 +++- gdb/unwind_stop_reasons.def | 10 +++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 004c376..ddb4b38 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -26556,7 +26556,9 @@ function to a string. The value can be one of: No particular reason (older frames should be available). @item gdb.FRAME_UNWIND_NULL_ID -The previous frame's analyzer returns an invalid result. +The previous frame's analyzer returns an invalid result. This is no +longer used by @value{GDBN}, and is kept only for backward +compatibility. @item gdb.FRAME_UNWIND_OUTERMOST This frame is the outermost. diff --git a/gdb/unwind_stop_reasons.def b/gdb/unwind_stop_reasons.def index ca5a74a..2c3d341 100644 --- a/gdb/unwind_stop_reasons.def +++ b/gdb/unwind_stop_reasons.def @@ -31,13 +31,9 @@ or we didn't fail. */ SET (UNWIND_NO_REASON, "no reason") -/* The previous frame's analyzer returns an invalid result - from this_id. - - FIXME drow/2006-08-16: This is how GDB used to indicate end of - stack. We should migrate to a model where frames always have a - valid ID, and this becomes not just an error but an internal - error. But that's a project for another day. */ +/* This is no longer used anywhere, but it's kept because it's exposed + to Python. This is how GDB used to indicate end of stack. We've + now migrated to a model where frames always have a valid ID. */ SET (UNWIND_NULL_ID, "unwinder did not report frame ID") /* This frame is the outermost. */ -- 1.7.11.7