From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc breakpoint] Catch exceptions
Date: Tue, 25 Mar 2003 16:05:00 -0000 [thread overview]
Message-ID: <3E807E37.8010409@redhat.com> (raw)
In-Reply-To: <20030325030107.GA3889@nevyn.them.org>
> I'm just looking for feedback on this patch. It's mostly complete except
> for some mass re-indenting that some of the changes would require; I'm not
> entirely happy with the design yet though, so I'm looking for comments.
If you're not happy with a design, the best thing to do is toss it on a
branch where it can incubate a little.
> The basic idea is that these "catchpoints" are just normal breakpoints and
> should be handled as such. But we'd like to print them a little
> differently, for clarity.
> Here's the interesting bit, from struct breakpoint:
This is the more interesting bit:
+ enum {ep_normal, ep_gnuv2, ep_gnuv3} ep_type;
You're expecting multiple implementations ...
> + enum print_stop_action (*print) (struct breakpoint *);
> +
> + void (*print_one) (struct breakpoint *, CORE_ADDR *);
> +
> + void (*print_mention) (struct breakpoint *);
Per frame-unwind, instead put these virutal methods in their own struct
and then point the breakpoint at it. Separate v2 and v3 catchpoints (in
separate files?) will then be possible (and make the enum unnecessary).
Long term, the `breakpoint' code should do everything via these virtual
methods. If a breakpoint is hit, the corresponding handler should be
called.
Those methods should rely on zero globals - pass everything in.
Some nits:
Just write this:
+ (*b->print_mention) (b);
like:
b->print_mention (b)
While I know some kernel groups like to use that style, GDB doesn't
appear to.
This, and related, should be submitted separatly:
+extern struct symtab_and_line find_msymbol_start_sal (struct
minimal_symbol *,
+ int);
Any chance of a comment?
Andrew
next prev parent reply other threads:[~2003-03-25 16:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-25 3:01 Daniel Jacobowitz
2003-03-25 16:05 ` Andrew Cagney [this message]
2003-03-25 16:14 ` Daniel Jacobowitz
2003-04-27 17:52 ` Daniel Jacobowitz
2003-05-02 0:13 ` David Carlton
2003-05-02 0:25 ` Daniel Jacobowitz
[not found] <1048606641.15061.ezmlm@sources.redhat.com>
2003-03-25 23:51 ` Jim Ingham
2003-03-26 0:03 ` Daniel Jacobowitz
2003-03-26 2:14 ` Jim Ingham
2003-03-26 17:48 Michael Elizabeth Chastain
2003-03-26 22:49 ` Jim Ingham
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=3E807E37.8010409@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.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