This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] (Ada) New command to stop at start of exception handler.


Hi Xavier,

Still some comments... See below:

> gdb/ChangeLog:
> 
>         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
>         Add field.
>         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
>         Add field.
>         (default_exception_support_info) <catch_handlers_sym>: Add field.
>         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
>         (ada_exception_name_addr_1): Add "catch handlers" handling.
>         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
>         Update all callers.
>         (create_excep_cond_exprs) <ex>: Add parameter.
>         (re_set_exception): Update create_excep_cond_exprs call.
>         (print_it_exception, print_one_exception, print_mention_exception)
>         (print_recreate_exception): Add "catch handler" handling.
>         (allocate_location_catch_handlers, re_set_catch_handlers)
>         (check_status_catch_handlers, print_it_catch_handlers)
>         (print_one_catch_handlers, print_mention_catch_handlers)
>         (print_recreate_catch_handlers): New function.
>         (struct breakpoint_ops) <catch_handlers_breakpoint_ops>: New
>         variable.

There is some confusion as to the purpose of <...> and [...].
Can you review the following description in the GNU Coding Standards,
maybe they will explain it better than me:

https://www.gnu.org/prep/standards/standards.html#Change-Logs

In the meantime, what you are saying above is:
  *IN* struct breapoint_ops, the part that you changed is
  "catch_handlers_breakpoint_ops", and that part is a new
  variable.

What you want to do is that you created a new variable named
"catch_handlers_breakpoint_ops". Therefore:

        (catch_handlers_breakpoint_ops): New variable.

> gdb/doc/ChangeLog:
> 
>         * gdb.textinfo (Set Catchpoints): Add documentation for

You forgot to fix the name of the file (textinfo -> texinfo).

>         new "catch handlers" action.
> @@ -13022,12 +13112,15 @@ ada_get_next_arg (const char **argsp)
>     Set EX to the appropriate catchpoint type.
>     Set EXCEP_STRING to the name of the specific exception if
>     specified by the user.
> +   IS_CATCH_HANDLERS_CMD: True if the arguments are for a
> +   "catch handle" command.  False otherwise.

"catch handle" -> "catch handlers".

> @@ -4458,6 +4458,26 @@ called @code{Constraint_Error} is defined in package @code{Pck}, then
>  the command to use to catch such exceptions is @kbd{catch exception
>  Pck.Constraint_Error}.
>  
> +@item handlers
> +@kindex catch handlers
> +@cindex Ada exception handlers catching
> +@cindex catch Ada exceptions when handled
> +An Ada exception being handled.  If an exception name is
> +specified at the end of the command
> + (eg @kbd{catch handlers Program_Error}), the debugger will stop
> +only when this specific exception is handled.
> +Otherwise, the debugger stops execution when any Ada exception is handled.
> +
> +When inserting an handlers catchpoint on a user-defined

"an handlers" -> "a handlers"

> +################################################################
> +# 4. Try catching with condition and named exception handlers. #
> +################################################################
> +
> +# Insert a catchpoint on Program_Error Ada exception handlers with
> +# condition.
> +
> +gdb_test "catch handlers Program_Error if Global_Var = 4" \
> +         "Catchpoint $decimal: `Program_Error' Ada exception handlers" \
> +         "insert catchpoint on Program_Error Ada exception handlers with condition"

Formatting (> 80 chars)

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]