Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: document frame types, plus add missing ones
Date: Wed, 05 Jan 2011 19:53:00 -0000	[thread overview]
Message-ID: <m3aajfunzh.fsf@fleche.redhat.com> (raw)

This patch fixes PR python/12133.  The bug is that the return values for
Frame.type are not documented.

While doing this, I noticed that we didn't expose all the frame types.
So, this patch adds the missing ones as well.

Doc review needed.
Ok?

Tom

2011-01-05  Tom Tromey  <tromey@redhat.com>

	* python/py-frame.c (gdbpy_initialize_frames): Add INLINE_FRAME
	and ARCH_FRAME.

2011-01-05  Tom Tromey  <tromey@redhat.com>

	PR python/12133:
	* gdb.texinfo (Frames In Python): Document various frame
	constants.

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	5 Jan 2011 19:51:12 -0000
@@ -22536,9 +22536,29 @@
 @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 newer than this one.
+
+@item gdb.SIGTRAMP_FRAME
+A frame in 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	5 Jan 2011 19:51:13 -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);


             reply	other threads:[~2011-01-05 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 19:53 Tom Tromey [this message]
2011-01-05 20:53 ` Mark Kettenis
2011-01-05 21:04   ` Tom Tromey
2011-01-06 16:53   ` Tom Tromey
2011-01-06 18:21     ` Eli Zaretskii
2011-01-05 20:59 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3aajfunzh.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox