Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sourceware.org
Subject: Re: minimalistic MI catch support
Date: Fri, 10 Feb 2006 11:25:00 -0000	[thread overview]
Message-ID: <upslv317b.fsf@gnu.org> (raw)
In-Reply-To: <17388.13240.975679.344747@kahikatea.snap.net.nz> (message from 	Nick Roberts on Fri, 10 Feb 2006 19:33:28 +1300)

> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Fri, 10 Feb 2006 19:33:28 +1300
> 
> (gdb) catch catch
> Catchpoint 2 (catch)
> (gdb) catch throw
> Catchpoint 3 (throw)
> (gdb) catch fork
> Catchpoint 4 (fork)
> (gdb) catch exec
> Catchpoint 5 (exec)
> (gdb) info break
> Num Type           Disp Enb Address    What
> 2   breakpoint     keep y   0x07dae1aa exception catch
> 3   breakpoint     keep y   0x07daf001 exception throw
> 4   catch fork     keep y
> 5   catch exec     keep y
> 
> The first two are of type breakpoint and their nature is given under the
> heading "What".
> 
> The second two have their own type: "catch fork" and "catch exec" (I must
> admit that I don't understand how this gives differerent behaviour from using
> "break fork" and "break exec").  Also for some reason, they have no address.

I think this is a bug (or undocumented misfeature) in
breakpoint.c:handle_gnu_v3_exceptions.  You will see that it sets the
type of the raw breakpoint it creates to bp_breakpoint, instead of
using the argument ex_event that is passed by the caller.  In
addition, for some reason, it forces a special function to be used for
printing these catchpoints, and that function
(print_one_exception_catchpoint) doesn't use the list of descriptions
in the bptypes[] array used by the more general code in
print_one_breakpoint.  I think it's bad to have more than one place to
have these description strings.

Can someone explain why we should use special code for gnu_v3
exceptions?

As for the address not being printed, can you step with a debugger
through the function that prints these breakpoints and see why they
are skipped?  I cannot for the moment see any reason, just looking at
the code.


  reply	other threads:[~2006-02-10 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09  6:28 Nick Roberts
2006-02-10  6:34 ` Nick Roberts
2006-02-10 11:25   ` Eli Zaretskii [this message]
2006-02-10 14:11     ` Daniel Jacobowitz
2006-02-10 15:41       ` Eli Zaretskii
2006-02-10 16:48         ` Daniel Jacobowitz
2006-02-10 18:40           ` Eli Zaretskii
2006-02-10 18:52             ` Daniel Jacobowitz
2006-02-10 20:17       ` Nick Roberts
2006-02-10 20:20         ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2006-01-28 13:04 Markus Schiltknecht
2006-02-06 23:29 ` Daniel Jacobowitz
2006-02-07  1:15   ` Bob Rossi
2006-02-07  3:00     ` Daniel Jacobowitz
2006-02-07 12:01       ` Markus Schiltknecht

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=upslv317b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nickrob@snap.net.nz \
    /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