Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: Anton Blanchard <anton@samba.org>,
	gdb-patches@sourceware.org,	emachado@linux.vnet.ibm.com,
	luis_gustavo@mentor.com,	ulrich.weigand@de.ibm.com
Subject: Re: [PATCH 2/4] Support up to 3 conditional branches in an atomic sequence
Date: Fri, 28 Mar 2014 17:32:00 -0000	[thread overview]
Message-ID: <20140328173251.GJ4030@adacore.com> (raw)
In-Reply-To: <5335AD94.4030701@redhat.com>

> > IIUC, it looks like MAX_SINGLE_STEP_BREAKPOINTS is actually not
> > the max, but MAX - 1. I was a little confused by that. Why not
> > change MAX to 3, and then adjust the array definition and code
> > accordingly? I think things will be slightly simpler to understand.
> 
> IMO that would be more confusing.  I read MAX_SINGLE_STEP_BREAKPOINTS
> as meaning the "maximum number of of single-step breakpoints we
> can create simultaneously".  I think you're reading it as
> "the highest index possible into the single-step breakpoints
> array" ?

Here is how I read the patch: MAX_SINGLE_STEP_BREAKPOINTS is the size
of the array, and we rely on the last element always being NULL
to determine the number of "live" elements we actually have.
Hence, to me, the maximum number of SS breakpoints we can handle
in practice is not MAX_SINGLE_STEP_BREAKPOINTS but 1 less. For
instance, I think the patch is trying to increase the number of
SS breakpoints to 3, and yet defines MAX_SINGLE_STEP_BREAKPOINTS
to 4.

Perhaps it's time to just use a vec? That way, we don't have
a limit at all anymore...

-- 
Joel


  parent reply	other threads:[~2014-03-28 17:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  3:41 [PATCH 1/4] Fix ppc64 single step over atomic sequence testcase Anton Blanchard
2014-03-28  3:42 ` [PATCH 2/4] Support up to 3 conditional branches in an atomic sequence Anton Blanchard
2014-03-28 13:12   ` Joel Brobecker
2014-03-28 17:13     ` Pedro Alves
2014-03-28 17:22       ` Pedro Alves
2014-03-28 17:32       ` Joel Brobecker [this message]
2014-03-28 17:58         ` Pedro Alves
2014-03-28 18:10           ` Joel Brobecker
2014-03-28  3:42 ` [PATCH 4/4] Add lbarx/stbcx., lharx/sthcx. and lqarx/stqcx. single stepping Anton Blanchard
2014-03-28 13:17   ` Joel Brobecker
2014-03-28  3:42 ` [PATCH 3/4] Add multiple branches to ppc64 single step through atomic sequence testcase Anton Blanchard
2014-03-28 13:14   ` Joel Brobecker
2014-03-28 13:05 ` [PATCH 1/4] Fix ppc64 single step over " Joel Brobecker
2014-03-31  2:55   ` Anton Blanchard
2014-03-28 13:13 ` Ulrich Weigand

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=20140328173251.GJ4030@adacore.com \
    --to=brobecker@adacore.com \
    --cc=anton@samba.org \
    --cc=emachado@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis_gustavo@mentor.com \
    --cc=palves@redhat.com \
    --cc=ulrich.weigand@de.ibm.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