2013-03-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
[binutils-gdb.git] / gdb / unwind_stop_reasons.def
blobca5a74a9f02830b98e5eacc4ec304b1be18d67fa
1 /* Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 This file is part of GDB.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Reasons why frames could not be further unwound
19 SET (name, description)
21 After this reason name, all reasons should be considered errors;
22 i.e.: abnormal stack termination.
23 FIRST_ERROR (name)
25 First and Last reason defined
26 FIRST_ENTRY (name)
27 LAST_ENTRY (name) */
29 #ifdef SET
30 /* No particular reason; either we haven't tried unwinding yet,
31 or we didn't fail. */
32 SET (UNWIND_NO_REASON, "no reason")
34 /* The previous frame's analyzer returns an invalid result
35 from this_id.
37 FIXME drow/2006-08-16: This is how GDB used to indicate end of
38 stack. We should migrate to a model where frames always have a
39 valid ID, and this becomes not just an error but an internal
40 error. But that's a project for another day. */
41 SET (UNWIND_NULL_ID, "unwinder did not report frame ID")
43 /* This frame is the outermost. */
44 SET (UNWIND_OUTERMOST, "outermost")
46 /* Can't unwind further, because that would require knowing the
47 values of registers or memory that haven't been collected. */
48 SET (UNWIND_UNAVAILABLE, \
49 "not enough registers or memory available to unwind further")
51 /* This frame ID looks like it ought to belong to a NEXT frame,
52 but we got it for a PREV frame. Normally, this is a sign of
53 unwinder failure. It could also indicate stack corruption. */
54 SET (UNWIND_INNER_ID, "previous frame inner to this frame (corrupt stack?)")
56 /* This frame has the same ID as the previous one. That means
57 that unwinding further would almost certainly give us another
58 frame with exactly the same ID, so break the chain. Normally,
59 this is a sign of unwinder failure. It could also indicate
60 stack corruption. */
61 SET (UNWIND_SAME_ID, "previous frame identical to this frame (corrupt stack?)")
63 /* The frame unwinder didn't find any saved PC, but we needed
64 one to unwind further. */
65 SET (UNWIND_NO_SAVED_PC, "frame did not save the PC")
67 #endif /* SET */
70 #ifdef FIRST_ERROR
71 FIRST_ERROR (UNWIND_UNAVAILABLE)
72 #endif
74 #ifdef FIRST_ENTRY
75 FIRST_ENTRY (UNWIND_NO_REASON)
76 #endif
78 #ifdef LAST_ENTRY
79 LAST_ENTRY (UNWIND_NO_SAVED_PC)
80 #endif