Commit | Line | Data |
---|---|---|
e2882c85 | 1 | /* Copyright (C) 2011-2018 Free Software Foundation, Inc. |
2231f1fb KP |
2 | |
3 | This file is part of GDB. | |
4 | ||
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. | |
9 | ||
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. | |
14 | ||
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/>. */ | |
17 | ||
18 | /* Reasons why frames could not be further unwound | |
19 | SET (name, description) | |
20 | ||
21 | After this reason name, all reasons should be considered errors; | |
22 | i.e.: abnormal stack termination. | |
23 | FIRST_ERROR (name) | |
24 | ||
25 | First and Last reason defined | |
26 | FIRST_ENTRY (name) | |
27 | LAST_ENTRY (name) */ | |
28 | ||
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") | |
33 | ||
20e1ca3b PA |
34 | /* This is no longer used anywhere, but it's kept because it's exposed |
35 | to Python. This is how GDB used to indicate end of stack. We've | |
36 | now migrated to a model where frames always have a valid ID. */ | |
2231f1fb KP |
37 | SET (UNWIND_NULL_ID, "unwinder did not report frame ID") |
38 | ||
39 | /* This frame is the outermost. */ | |
40 | SET (UNWIND_OUTERMOST, "outermost") | |
41 | ||
42 | /* Can't unwind further, because that would require knowing the | |
43 | values of registers or memory that haven't been collected. */ | |
44 | SET (UNWIND_UNAVAILABLE, \ | |
45 | "not enough registers or memory available to unwind further") | |
46 | ||
47 | /* This frame ID looks like it ought to belong to a NEXT frame, | |
48 | but we got it for a PREV frame. Normally, this is a sign of | |
49 | unwinder failure. It could also indicate stack corruption. */ | |
50 | SET (UNWIND_INNER_ID, "previous frame inner to this frame (corrupt stack?)") | |
51 | ||
52 | /* This frame has the same ID as the previous one. That means | |
53 | that unwinding further would almost certainly give us another | |
54 | frame with exactly the same ID, so break the chain. Normally, | |
55 | this is a sign of unwinder failure. It could also indicate | |
56 | stack corruption. */ | |
57 | SET (UNWIND_SAME_ID, "previous frame identical to this frame (corrupt stack?)") | |
58 | ||
59 | /* The frame unwinder didn't find any saved PC, but we needed | |
60 | one to unwind further. */ | |
61 | SET (UNWIND_NO_SAVED_PC, "frame did not save the PC") | |
62 | ||
53e8a631 AB |
63 | /* There was an error accessing memory while unwinding this frame. */ |
64 | SET (UNWIND_MEMORY_ERROR, "memory error while unwinding") | |
65 | ||
2231f1fb KP |
66 | #endif /* SET */ |
67 | ||
68 | ||
69 | #ifdef FIRST_ERROR | |
70 | FIRST_ERROR (UNWIND_UNAVAILABLE) | |
71 | #endif | |
72 | ||
73 | #ifdef FIRST_ENTRY | |
74 | FIRST_ENTRY (UNWIND_NO_REASON) | |
75 | #endif | |
76 | ||
77 | #ifdef LAST_ENTRY | |
53e8a631 | 78 | LAST_ENTRY (UNWIND_MEMORY_ERROR) |
2231f1fb | 79 | #endif |