Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc breakpoint] Catch exceptions
Date: Tue, 25 Mar 2003 16:14:00 -0000	[thread overview]
Message-ID: <20030325161352.GA15528@nevyn.them.org> (raw)
In-Reply-To: <3E807E37.8010409@redhat.com>

On Tue, Mar 25, 2003 at 11:05:11AM -0500, Andrew Cagney wrote:
> >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.

I know from experience that I don't have time to maintain a branch for
something I'm just doing in my spare time; this isn't an important
project.

> >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 ...

That should actually be replaced with something opaque.  Meant to fix
that, oops.

They'll be mostly the same, but the code for conditional stops will be
different.

> >+    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).

OK, good idea.  Separate files is possible but seems unlikely to
happen.

> Long term, the `breakpoint' code should do everything via these virtual 
> methods.  If a breakpoint is hit, the corresponding handler should be 
> called.

Yes, that's my hope.  Practical?  Maybe.

> Those methods should rely on zero globals - pass everything in.

I think that's the case, I'll recheck.

> 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.

OK; I prefer the former style but it doesn't really matter.

> 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?

Sure.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-03-25 16:14 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
2003-03-25 16:14   ` Daniel Jacobowitz [this message]
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=20030325161352.GA15528@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.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