From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26266 invoked by alias); 6 Jan 2011 16:53:02 -0000 Received: (qmail 26250 invoked by uid 22791); 6 Jan 2011 16:53:00 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Jan 2011 16:52:55 +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.13.8/8.13.8) with ESMTP id p06GqrVS017973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Jan 2011 11:52:54 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p06Gqr3M006860; Thu, 6 Jan 2011 11:52:53 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p06Gqqdo012197; Thu, 6 Jan 2011 11:52:53 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 89E6037848D; Thu, 6 Jan 2011 09:52:52 -0700 (MST) From: Tom Tromey To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: RFA: document frame types, plus add missing ones References: <201101052053.p05KrX6H003178@glazunov.sibelius.xs4all.nl> Date: Thu, 06 Jan 2011 16:53:00 -0000 In-Reply-To: <201101052053.p05KrX6H003178@glazunov.sibelius.xs4all.nl> (Mark Kettenis's message of "Wed, 5 Jan 2011 21:53:33 +0100 (CET)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2011-01/txt/msg00132.txt.bz2 >>>>> "Mark" == Mark Kettenis writes: >> +@item gdb.INLINE_FRAME >> +A frame representing an inlined function. The function was inlined >> +into a @code{gdb.NORMAL_FRAME} that is newer than this one. Mark> It isn't quite clear to me what this last sentence means. I looked deeper, and this sentence is also incorrect. I was looking at the comments in enum frame_type when writing this, but the comment for INLINE_FRAME seems backward to me. Code in various places seems to agree with this. Tom> Doc review needed. Tom> Ok? Eli> Yes, thanks. How about the appended? It has all the updates in place. Tom ChangeLog: 2011-01-06 Tom Tromey * frame.h (enum frame_type) : Fix comment. * python/py-frame.c (gdbpy_initialize_frames): Add INLINE_FRAME and ARCH_FRAME. doc/ChangeLog: 2011-01-06 Tom Tromey PR python/12133: * gdb.texinfo (Frames In Python): Document various frame constants. Index: frame.h =================================================================== RCS file: /cvs/src/src/gdb/frame.h,v retrieving revision 1.183 diff -u -r1.183 frame.h --- frame.h 1 Jan 2011 15:33:04 -0000 1.183 +++ frame.h 6 Jan 2011 16:52:30 -0000 @@ -204,7 +204,7 @@ call. */ DUMMY_FRAME, /* A frame representing an inlined function, associated with an - upcoming (next, inner, younger) NORMAL_FRAME. */ + upcoming (prev, outer, older) NORMAL_FRAME. */ INLINE_FRAME, /* In a signal handler, various OSs handle this in various ways. The main thing is that the frame may be far from normal. */ Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.783 diff -u -r1.783 gdb.texinfo --- doc/gdb.texinfo 5 Jan 2011 05:09:52 -0000 1.783 +++ doc/gdb.texinfo 6 Jan 2011 16:52:34 -0000 @@ -22536,9 +22536,30 @@ @end defmethod @defmethod Frame type -Returns the type of the frame. The value can be one of -@code{gdb.NORMAL_FRAME}, @code{gdb.DUMMY_FRAME}, @code{gdb.SIGTRAMP_FRAME} -or @code{gdb.SENTINEL_FRAME}. +Returns the type of the frame. The value can be one of: +@table @code +@item gdb.NORMAL_FRAME +An ordinary stack frame. + +@item gdb.DUMMY_FRAME +A fake stack frame that was created by @value{GDBN} when performing an +inferior function call. + +@item gdb.INLINE_FRAME +A frame representing an inlined function. The function was inlined +into a @code{gdb.NORMAL_FRAME} that is older than this one. + +@item gdb.SIGTRAMP_FRAME +A signal trampoline frame. This is the frame created by the OS when +it calls into a signal handler. + +@item gdb.ARCH_FRAME +A fake stack frame representing a cross-architecture call. + +@item gdb.SENTINEL_FRAME +This is like @code{gdb.NORMAL_FRAME}, but it is only used for the +newest frame. +@end table @end defmethod @defmethod Frame unwind_stop_reason Index: python/py-frame.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-frame.c,v retrieving revision 1.10 diff -u -r1.10 py-frame.c --- python/py-frame.c 1 Jan 2011 15:33:25 -0000 1.10 +++ python/py-frame.c 6 Jan 2011 16:52:34 -0000 @@ -574,7 +574,9 @@ That seems too messy. */ PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME); PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME); + PyModule_AddIntConstant (gdb_module, "INLINE_FRAME", INLINE_FRAME); PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME); + PyModule_AddIntConstant (gdb_module, "ARCH_FRAME", ARCH_FRAME); PyModule_AddIntConstant (gdb_module, "SENTINEL_FRAME", SENTINEL_FRAME); PyModule_AddIntConstant (gdb_module, "FRAME_UNWIND_NO_REASON", UNWIND_NO_REASON);