Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
	gdb-patches@sourceware.org,
	       Stan Shebs <stan@codesourcery.com>
Subject: Re: [patch 3/3] bpstat_what removal [rediff]
Date: Wed, 23 Jun 2010 14:42:00 -0000	[thread overview]
Message-ID: <20100623144154.GA26869@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3typ2r9tb.fsf@fleche.redhat.com>

On Wed, 16 Jun 2010 22:39:44 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
[...]
> One thing I would like to understand better is the long-term design.
> It seems to me that right now we have a few problems.  I would like to
> understand (1) whether and how your patch fixes them, and (2) what our
> (by which I guess I mostly mean Pedro's :-) ideal design would look
> like.
> 
> My understanding of the problems:
> 
> * We don't nicely handle multiple breakpoints at one location.
>   (AFAIK not touched by your change.)

It gets fixed AFAIK.  Or at least improved, not sure if the fix is complete.
It needs also a patch of this series:
	Re: [patch 2/3] bpstat_print should consider all candidates
	http://sourceware.org/ml/gdb-patches/2010-05/msg00368.html

As explained by Pedro currently some events are ignored but they get re-hit on
a vain attempt to resume at a breakpoint location and all the events get
executed properly.  Described by Pedro's "Well, not cancel, but postpone." ...:
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00404.html


> * bpstat_what is difficult to understand & modify, particularly the table.
>   (You fixed this.)  

The table part gets removed even in the Pedro's generally agreed
simplification:
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00372.html

Other code readability issues are both not agreed upon and they are strongly
bound to the "re-hit" bug-to-bug compatibility described above.


> * It is too hard to add new kinds of breakpoints.  See ifunc or
>   next-over-throw.
>   (Maybe partially fixed?)

It should become generally easy now even with the Pedro's generally agreed
simplification:
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00372.html

The is the major change it has been design-approved the actions can get
executed in breakpoint.c instead of infrun.c which simplified it a lot.


> For multiple breakpoints ... to me it seems like we want to have some
> way to notify *all* the breakpoints at a given spot, with some kind of
> decision making coming later about how to proceed.
> 
> A case that has come up a couple times is having a way for Python to add
> new invisible breakpoints, with Python code attached.

As the action can get executed from breakpoint.c now it can accordingly set
the bpstat_what() result making the "new invisible breakpoints" simple IMO.


> Pedro> To recap, IMO, the current problem with bpstat_main_action is
> Pedro> that a few of its values aren't really independent and mutually
> Pedro> exclusive with the others -- BPSTAT_WHAT_CHECK_SHLIBS and
> Pedro> BPSTAT_WHAT_CHECK_JIT.
> 
> Jan> What if a new breakpoint type wants to stop?  What if a new
> Jan> breakpoint type does not want to stop?  And how they combine if
> Jan> they happend together with other events?  While there exists answer
> Jan> for it I do not know offhand.  I know offhand with my
> Jan> implementation.  I should post a patch introducing new breakpoint
> Jan> types in both variants of the bpstat_what implementation.
> 
> Are you saying that the bpstat_main_action actually encodes several
> things which should actually be independent?  I think that is consistent
> with what I see in your patch, I just wanted to be sure.

There are three levels of independence:

No independence - current FSF GDB - everything is encoded as a single
decision.  This is wrong, some functionality gets lost - PR 9436.

Partial independence - Pedro's simplification
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00372.html
which makes BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_JIT independent
thus no longer breaking PR 9436.  But it still hides some information as shown
in my `set debug infrun' reproducer in
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00403.html
unfortunately current GDB code is (reportedly - I do not know a reproducer)
relies on this "re-hit" bug as described by Pedro in:
	Re: [patch 3/3] bpstat_what removal [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00404.html

Full independence - my original proposals
	[patch 3/3] bpstat_what removal
	http://sourceware.org/ml/gdb-patches/2010-05/msg00050.html
and with an interface
	Re: [patch 3/3] bpstat_what removal
	http://sourceware.org/ml/gdb-patches/2010-05/msg00370.html
which have been generally approved as a future goal but currently they
(a) seem to be a too large change to be approved in a single step and
(b) it may break some bug-to-bug compatibility relying on the "re-hit"s.



Thanks,
Jan


      reply	other threads:[~2010-06-23 14:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 20:02 [patch 3/3] bpstat_what removal Jan Kratochvil
2010-05-04 14:10 ` Stan Shebs
2010-05-07 16:17   ` Jan Kratochvil
2010-05-07 16:26     ` Pedro Alves
2010-05-07 17:02       ` Jan Kratochvil
2010-05-07 17:17         ` Pedro Alves
2010-05-17 21:46           ` Jan Kratochvil
2010-06-12 17:02             ` [patch 3/3] bpstat_what removal [rediff] Jan Kratochvil
2010-06-15 15:08               ` Pedro Alves
2010-06-15 21:54                 ` Jan Kratochvil
2010-06-16 19:13                   ` Pedro Alves
2010-06-18 10:41                     ` Jan Kratochvil
2010-06-18 11:42                       ` Pedro Alves
2010-06-18 14:09                         ` Jan Kratochvil
2010-06-18 14:35                           ` Pedro Alves
2010-06-24 14:44                     ` [patch 3/3] bpstat_what removal Jan Kratochvil
2010-06-24 14:48                       ` [patch 3.1/3] bpstat_what removal - addon gdb_assert Jan Kratochvil
2010-06-24 15:03                       ` [patch 3/3] bpstat_what removal Pedro Alves
2010-06-24 15:21                         ` Jan Kratochvil
2010-06-16 20:40                   ` [patch 3/3] bpstat_what removal [rediff] Tom Tromey
2010-06-23 14:42                     ` Jan Kratochvil [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=20100623144154.GA26869@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=stan@codesourcery.com \
    --cc=tromey@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