summaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmds.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2013-11-07 17:40:48 +0400
committerJoel Brobecker <brobecker@adacore.com>2013-11-12 06:45:29 +0400
commit778865d3e288f4fcf3b293e78d52cd5dacb4b999 (patch)
tree9bc37efb587b92f4e942f94cb9d5d5d07339a04c /gdb/mi/mi-cmds.h
parent304a8ac17c606a83a60a371267daa71ab0bcbc12 (diff)
downloadbinutils-gdb-778865d3e288f4fcf3b293e78d52cd5dacb4b999.tar.gz
Add command to list Ada exceptions
This patch adds a new command "info exceptions" whose purpose is to provide the list of exceptions currently defined in the inferior. The usage is: (gdb) info exceptions [REGEXP] Without argument, the command lists all exceptions. Otherwise, only those whose name match REGEXP are listed. For instance: (gdb) info exceptions All defined Ada exceptions: constraint_error: 0x613dc0 program_error: 0x613d40 storage_error: 0x613d00 tasking_error: 0x613cc0 global_exceptions.a_global_exception: 0x613a80 global_exceptions.a_private_exception: 0x613ac0 The name of the command, as well as its output is part of a legacy I inherited long ago. It's output being parsed by frontends such as GPS, I cannot easily change it. Same for the command name. The implementation is mostly self-contained, and is written in a way that should make it easy to implement the GDB/MI equivalent. The careful reviewer will notice that the code added in ada-lang.h could normally be made private inside ada-lang.c. But these will be used by the GDB/MI implementation. Rather than making those private now, only to move them later, I've made them public right away. gdb/ChangeLog: * ada-lang.h: #include "vec.h". (struct ada_exc_info): New. (ada_exc_info): New typedef. (DEF_VEC_O(ada_exc_info)): New vector. (ada_exceptions_list): Add declaration. * ada-lang.c (ada_is_exception_sym) (ada_is_non_standard_exception_sym, compare_ada_exception_info) (sort_remove_dups_ada_exceptions_list) (ada_exc_search_name_matches, ada_add_standard_exceptions) (ada_add_exceptions_from_frame, ada_add_global_exceptions) (ada_exceptions_list_1, ada_exceptions_list) (info_exceptions_command): New function. (_initialize_ada_language): Add "info exception" command. gdb/testsuite/ChangeLog: * gdb.ada/info_exc: New testcase.
Diffstat (limited to 'gdb/mi/mi-cmds.h')
0 files changed, 0 insertions, 0 deletions