]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-lang.c
Rework a bit Ada exception catchpoint support (in prep for GDB/MI)
authorJoel Brobecker <brobecker@gnat.com>
Fri, 11 Oct 2013 13:44:11 +0000 (13:44 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 11 Oct 2013 13:44:11 +0000 (13:44 +0000)
commitb4a5b78b782ac0a689ed6e6b8ca8b58ad8948258
treeb44f558e9c9d8dd4fffcf4a40376e5df9be9b229
parent7ad1d32c17973b8ae448d92b21e45d4a9439e347
Rework a bit Ada exception catchpoint support (in prep for GDB/MI)

This patch reworks a bit how the different steps required to insert
an Ada exception catchpoints are organized. They used to be:

  1. Call a "decode" function which does:
        1.a.  Parse the command and its arguments
        1.b.  Create a SAL & OPS from some of those arguments

  2. Call create_ada_exception_catchpoint using SAL as well
     as some of the arguments extracted above.

The bulk of the change consists in integrating step (1.b) into
step (2) in order to turn create_ada_exception_catchpoint into
a function whose arguments are all user-level concepts. This
paves the way from a straightforward implementation of the equivalent
commands in the GDB/MI interpreter.

gdb/ChangeLog:

        * ada-lang.c (ada_decode_exception_location): Delete.
        (create_ada_exception_catchpoint): Remove arguments "sal",
        "addr_string" and "ops".  Add argument "ex_kind" instead.
        Adjust implementation accordingly, calling ada_exception_sal
        to get the entities it no longer gets passed as arguments.
        Document the function's arguments.
        (catch_ada_exception_command): Use catch_ada_exception_command_split
        instead of ada_decode_exception_location, and update call to
        create_ada_exception_catchpoint.
        (catch_ada_assert_command_split): Renames
        ada_decode_assert_location.  Remove parameters "addr_string" and
        "ops", and now returns void.  Adjust implementation accordingly.
        Update the function documentation.
        (catch_assert_command): Use catch_ada_assert_command_split
        instead of ada_decode_assert_location.  Update call to
        create_ada_exception_catchpoint.
gdb/ChangeLog
gdb/ada-lang.c