summaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorkpouget <kpouget>2011-10-27 11:04:25 +0000
committerkpouget <kpouget>2011-10-27 11:04:25 +0000
commit2ac83145862aad11f7cb29415375b188cbb6ff30 (patch)
tree94384c1be500634bbc16c80f7e8d56dcc1ce9067 /gdb/doc
parent57ff7a6e9ad86330f4717332eecdadbc0f0d4a89 (diff)
downloadgdb-2ac83145862aad11f7cb29415375b188cbb6ff30.tar.gz
Move unwind reasons to an external .def file
gdb/ * frame.c (frame_stop_reason_string): Rewrite using unwind_stop_reasons.def. * frame.h (enum unwind_stop_reason): Likewise. * python/py-frame.c (gdbpy_initialize_frames): Likewise. (gdbpy_frame_stop_reason_string): Use new enum unwind_stop_reason constants for bound-checking. * unwind_stop_reasons.def: New file. * stack.c (backtrace_command_1): Handle UNWIND_FIRST_ERROR as an alias instead of a distinct value. doc/ * gdb.texinfo ((Frames In Python): Document gdb.FRAME_UNWIND_FIRST_ERROR contant.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo13
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 403675eaea0..2001e0c5c06 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-27 Kevin Pouget <kevin.pouget@st.com>
+
+ * gdb.texinfo ((Frames In Python): Document
+ gdb.FRAME_UNWIND_FIRST_ERROR contant.
+
2011-10-26 Paul Koning <paul_koning@dell.com>
* gdb.texinfo (gdb.types): Document new deepitems function.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b451a6afedb..3e78832f96c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23473,6 +23473,19 @@ stack corruption.
@item gdb.FRAME_UNWIND_NO_SAVED_PC
The frame unwinder did not find any saved PC, but we needed
one to unwind further.
+
+@item gdb.FRAME_UNWIND_FIRST_ERROR
+Any stop reason greater or equal to this value indicates some kind
+of error. This special value facilitates writing code that tests
+for errors in unwinding in a way that will work correctly even if
+the list of the other values is modified in future @value{GDBN}
+versions. Using it, you could write:
+@smallexample
+reason = gdb.selected_frame().unwind_stop_reason ()
+reason_str = gdb.frame_stop_reason_string (reason)
+if reason >= gdb.FRAME_UNWIND_FIRST_ERROR:
+ print "An error occured: %s" % reason_str
+@end smallexample
@end table
@end defun