public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Xavier Roirand <roirand@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] (Ada) New command to stop at start of exception handler.
Date: Thu, 21 Dec 2017 11:52:00 -0000	[thread overview]
Message-ID: <20171221115232.kvoudxpr2ojyxpdk@adacore.com> (raw)
In-Reply-To: <1513788893-3802-1-git-send-email-roirand@adacore.com>

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

      reply	other threads:[~2017-12-21 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 16:55 Xavier Roirand
2017-12-21 11:52 ` Joel Brobecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171221115232.kvoudxpr2ojyxpdk@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=roirand@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).