aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorKevin Pouget <kpouget@sourceware.org>2011-10-27 11:04:27 +0000
committerKevin Pouget <kpouget@sourceware.org>2011-10-27 11:04:27 +0000
commit2231f1fb609de30056ec5d3f526b39ee146efcab (patch)
treec7f513cc242b04a687017f406ba7507fca657df7 /gdb/doc
parentf77b9a5df0dca976e9fa9c8731c313d5b54befe1 (diff)
downloadgdb-2231f1fb609de30056ec5d3f526b39ee146efcab.zip
gdb-2231f1fb609de30056ec5d3f526b39ee146efcab.tar.gz
gdb-2231f1fb609de30056ec5d3f526b39ee146efcab.tar.bz2
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 403675e..2001e0c 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 b451a6a..3e78832 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