aboutsummaryrefslogtreecommitdiff
path: root/gdb/unwind_stop_reasons.def
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-05-30Add a TRY_CATCH to get_prev_frame_always to better manage errors during unwind.Andrew Burgess1-1/+4
https://sourceware.org/ml/gdb-patches/2014-05/msg00737.html Currently a MEMORY_ERROR raised during unwinding a frame will cause the unwind to stop with an error message, for example: (gdb) bt #0 breakpt () at amd64-invalid-stack-middle.c:27 #1 0x00000000004008f0 in func5 () at amd64-invalid-stack-middle.c:32 #2 0x0000000000400900 in func4 () at amd64-invalid-stack-middle.c:38 #3 0x0000000000400910 in func3 () at amd64-invalid-stack-middle.c:44 #4 0x0000000000400928 in func2 () at amd64-invalid-stack-middle.c:50 Cannot access memory at address 0x2aaaaaab0000 However, frame #4 is marked as being the end of the stack unwind, so a subsequent request for the backtrace looses the error message, such as: (gdb) bt #0 breakpt () at amd64-invalid-stack-middle.c:27 #1 0x00000000004008f0 in func5 () at amd64-invalid-stack-middle.c:32 #2 0x0000000000400900 in func4 () at amd64-invalid-stack-middle.c:38 #3 0x0000000000400910 in func3 () at amd64-invalid-stack-middle.c:44 #4 0x0000000000400928 in func2 () at amd64-invalid-stack-middle.c:50 When fetching the backtrace, or requesting the stack depth using the MI interface the situation is even worse, the first time a request is made we encounter the memory error and so the MI returns an error instead of the correct result, for example: (gdb) -stack-info-depth ^error,msg="Cannot access memory at address 0x2aaaaaab0000" Or, (gdb) -stack-list-frames ^error,msg="Cannot access memory at address 0x2aaaaaab0000" However, once one of these commands has been used gdb has, internally, walked the stack and figured that out that frame #4 is the bottom of the stack, so the second time an MI command is tried you'll get the "expected" result: (gdb) -stack-info-depth ^done,depth="5" Or, (gdb) -stack-list-frames ^done,stack=[frame={level="0", .. snip lots .. }] After this patch the MEMORY_ERROR encountered during the frame unwind is attached to frame #4 as the stop reason, and is displayed in the CLI each time the backtrace is requested. In the MI, catching the error means that the "expected" result is returned the first time the MI command is issued. So, from the CLI the results of the backtrace will be: (gdb) bt #0 breakpt () at amd64-invalid-stack-middle.c:27 #1 0x00000000004008f0 in func5 () at amd64-invalid-stack-middle.c:32 #2 0x0000000000400900 in func4 () at amd64-invalid-stack-middle.c:38 #3 0x0000000000400910 in func3 () at amd64-invalid-stack-middle.c:44 #4 0x0000000000400928 in func2 () at amd64-invalid-stack-middle.c:50 Backtrace stopped: Cannot access memory at address 0x2aaaaaab0000 Each and every time that the backtrace is requested, while the MI output will similarly be consistently: (gdb) -stack-info-depth ^done,depth="5" Or, (gdb) -stack-list-frames ^done,stack=[frame={level="0", .. snip lots .. }] gdb/ChangeLog: * frame.c (struct frame_info): Add stop_string field. (get_prev_frame_always_1): Renamed from get_prev_frame_always. (get_prev_frame_always): Old content moved into get_prev_frame_always_1. Call get_prev_frame_always_1 inside TRY_CATCH, handle MEMORY_ERROR exceptions. (frame_stop_reason_string): New function definition. * frame.h (unwind_stop_reason_to_string): Extend comment to mention frame_stop_reason_string. (frame_stop_reason_string): New function declaration. * stack.c (frame_info): Switch to frame_stop_reason_string. (backtrace_command_1): Switch to frame_stop_reason_string. * unwind_stop_reason.def: Add UNWIND_MEMORY_ERROR. (LAST_ENTRY): Changed to UNWIND_MEMORY_ERROR. * guile/lib/gdb.scm: Add FRAME_UNWIND_MEMORY_ERROR to export list. gdb/doc/ChangeLog: * guile.texi (Frames In Guile): Mention FRAME_UNWIND_MEMORY_ERROR. * python.texi (Frames In Python): Mention gdb.FRAME_UNWIND_MEMORY_ERROR. gdb/testsuite/ChangeLog: * gdb.arch/amd64-invalid-stack-middle.exp: Update expected results. * gdb.arch/amd64-invalid-stack-top.exp: Likewise.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-11-29UNWIND_NULL_ID is no longer used anywhere. Update comments.Pedro Alves1-7/+3
Unfortunately, UNWIND_NULL_ID is exported to Python as gdb.FRAME_UNWIND_NULL_ID so we can't really eliminate it. (I'd assume scripts just check the result of Frame.unwind_stop_reason, and compare it to gdb.FRAME_UNWIND_NO_REASON. That at most, they'll pass the result of Frame.unwind_stop_reason to gdb.frame_stop_reason_string. I'd prefer to just get rid of it, but because we make an API promise, we get to keep this around for compatibility, in case a script does refer to gdb.FRAME_UNWIND_NULL_ID directly.) gdb/ 2013-11-29 Pedro Alves <palves@redhat.com> * unwind_stop_reasons.def (UNWIND_NULL_ID): Update comment. gdb/doc/ 2013-11-29 Pedro Alves <palves@redhat.com> * gdb.texinfo (Frames In Python) <gdb.FRAME_UNWIND_NULL_ID>: Update comment.
2013-02-12Consistent use of (C) after "Copyright".Pedro Alves1-1/+1
While writing the previous patch, I noticed that we're not consistent with the (C) in the copyright header. The maintainers manual prefers having it, though also says it's optional. We have over 10x more files with (C) than without in gdb's code, so I spent a few minutes grepping and fixing. Funny enough, the testsuite has it backwards. I'll leave that for another time. gdb/ 2013-02-12 Pedro Alves <palves@redhat.com> * amd64-darwin-tdep.c: Add (C) after Copyright. * cli/cli-cmds.h: Ditto. * cli/cli-decode.c: Ditto. * cli/cli-decode.h: Ditto. * cli/cli-dump.c: Ditto. * cli/cli-dump.h: Ditto. * cli/cli-interp.c: Ditto. * cli/cli-logging.c: Ditto. * cli/cli-script.c: Ditto. * cli/cli-script.h: Ditto. * cli/cli-setshow.c: Ditto. * cli/cli-setshow.h: Ditto. * cli/cli-utils.c: Ditto. * cli/cli-utils.h: Ditto. * config/alpha/nm-osf3.h: Ditto. * config/djgpp/djconfig.sh: Ditto. * config/i386/nm-fbsd.h: Ditto. * config/i386/nm-i386gnu.h: Ditto. * config/nm-linux.h: Ditto. * config/nm-nto.h: Ditto. * config/rs6000/nm-rs6000.h: Ditto. * config/sparc/nm-sol2.h: Ditto. * darwin-nat-info.c: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * gdb-demangle.h: Ditto. * i386-darwin-nat.c: Ditto. * i386-darwin-tdep.c: Ditto. * linux-fork.h: Ditto. * m32c-tdep.c: Ditto. * microblaze-linux-tdep.c: Ditto. * microblaze-rom.c: Ditto. * microblaze-tdep.c: Ditto. * microblaze-tdep.h: Ditto. * mips-linux-tdep.h: Ditto. * ppc-ravenscar-thread.c: Ditto. * ppc-ravenscar-thread.h: Ditto. * prologue-value.c: Ditto. * prologue-value.h: Ditto. * ravenscar-thread.c: Ditto. * ravenscar-thread.h: Ditto. * sparc-ravenscar-thread.c: Ditto. * sparc-ravenscar-thread.h: Ditto. * tilegx-linux-tdep.c: Ditto. * unwind_stop_reasons.def: Ditto. * windows-nat.h: Ditto. * xtensa-linux-tdep.c: Ditto. * xtensa-xtregs.c: Ditto. * regformats/regdat.sh: Ditto. * regformats/regdef.h: Ditto. gdb/gdbserver/ 2013-02-12 Pedro Alves <palves@redhat.com> * linux-xtensa-low.c: Ditto. * xtensa-xtregs.c: Ditto.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-1/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-10-27Move unwind reasons to an external .def fileKevin Pouget1-0/+80
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.