unwind_stop_reasons.def 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* Copyright (C) 2011-2022 Free Software Foundation, Inc.
  2. This file is part of GDB.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /* Reasons why frames could not be further unwound
  14. SET (name, description)
  15. After this reason name, all reasons should be considered errors;
  16. i.e.: abnormal stack termination.
  17. FIRST_ERROR (name)
  18. First and Last reason defined
  19. FIRST_ENTRY (name)
  20. LAST_ENTRY (name) */
  21. #ifdef SET
  22. /* No particular reason; either we haven't tried unwinding yet,
  23. or we didn't fail. */
  24. SET (UNWIND_NO_REASON, "no reason")
  25. /* This is no longer used anywhere, but it's kept because it's exposed
  26. to Python. This is how GDB used to indicate end of stack. We've
  27. now migrated to a model where frames always have a valid ID. */
  28. SET (UNWIND_NULL_ID, "unwinder did not report frame ID")
  29. /* This frame is the outermost. */
  30. SET (UNWIND_OUTERMOST, "outermost")
  31. /* Can't unwind further, because that would require knowing the
  32. values of registers or memory that haven't been collected. */
  33. SET (UNWIND_UNAVAILABLE, \
  34. "not enough registers or memory available to unwind further")
  35. /* This frame ID looks like it ought to belong to a NEXT frame,
  36. but we got it for a PREV frame. Normally, this is a sign of
  37. unwinder failure. It could also indicate stack corruption. */
  38. SET (UNWIND_INNER_ID, "previous frame inner to this frame (corrupt stack?)")
  39. /* This frame has the same ID as the previous one. That means
  40. that unwinding further would almost certainly give us another
  41. frame with exactly the same ID, so break the chain. Normally,
  42. this is a sign of unwinder failure. It could also indicate
  43. stack corruption. */
  44. SET (UNWIND_SAME_ID, "previous frame identical to this frame (corrupt stack?)")
  45. /* The frame unwinder didn't find any saved PC, but we needed
  46. one to unwind further. */
  47. SET (UNWIND_NO_SAVED_PC, "frame did not save the PC")
  48. /* There was an error accessing memory while unwinding this frame. */
  49. SET (UNWIND_MEMORY_ERROR, "memory error while unwinding")
  50. #endif /* SET */
  51. #ifdef FIRST_ERROR
  52. FIRST_ERROR (UNWIND_UNAVAILABLE)
  53. #endif
  54. #ifdef FIRST_ENTRY
  55. FIRST_ENTRY (UNWIND_NO_REASON)
  56. #endif
  57. #ifdef LAST_ENTRY
  58. LAST_ENTRY (UNWIND_MEMORY_ERROR)
  59. #endif