From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: andrew.stubbs@st.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't give spurious warnings when using thread specific breakpoints
Date: Fri, 20 Oct 2006 18:03:00 -0000 [thread overview]
Message-ID: <uwt6uq2yq.fsf@gnu.org> (raw)
In-Reply-To: <20061020174648.GA4647@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 20 Oct 2006 13:46:48 -0400)
> Date: Fri, 20 Oct 2006 13:46:48 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: andrew.stubbs@st.com, gdb-patches@sourceware.org
> >
> > We need to have different code branches, one each for each one of the
> > possibilities, and each branch should have a format string for a full
> > sentence that is produced by that branch.
> >
> > If there are too many such possible combinations, then the i18n
> > comment should explain the context, as I mentioned elsewhere. (I'm
> > quite sure we've been through a similar discussion a year or so ago,
> > about another place where the code does similar things.)
>
> And I'm pretty sure we concluded there wasn't a reasonable way to do
> this... perhaps my example wasn't good enough.
No, we concluded that if there were no reasonable way of doing that,
we should use an i18n comment to have the context explained in
gdb.pot, where the translators will see it. Which is what I mentioned
as a fallback above.
> Note: breakpoints 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 also set at pc 0x439ee0.
> Breakpoint 11 at 0x439ee0
>
> There can be an arbitrary number of elements.
Yes, I understood that much.
> It'd be easy to reduce the possibilities somewhat, by using "%d
> (disabled)" and "%d (disabled) (thread %d)" and so forth. But I'm
> stumped what to do about the comma separated list.
How about rewriting the code so it'll produce something like
Note: breakpoint(s) 1-9, 10-15, 21, 42 also set at pc 0x439ee0.
?
Then we could have the variable list of breakpoint numbers produced
as a string, and output that string with a format such as this:
"Note: breakpoint(s) %s also set at pc 0x%x."
Actually, this would work for i18n even if we don't produce ranges of
numbers but a plain "1, 2, 3, 4, ..." list, but ranges would compress
some overly-long lists.
The `disabled' notification could be printed as a separate message.
For example:
Note: breakpoint(s) 1-9, 10-15, 21, 42 also set at pc 0x439ee0.
Note: breakpoint(s) 3, 11, 21 are disabled.
We could do something similar with "(thread %d)", for example produce
a separate message for each thread. I think that the current format
becomes quite unreadable anyway when too many "disabled" and "thread
N" parts are produced.
WDYT?
next prev parent reply other threads:[~2006-10-20 18:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 13:44 Andrew STUBBS
2006-10-11 13:55 ` Daniel Jacobowitz
2006-10-11 14:46 ` Andrew STUBBS
2006-10-11 20:45 ` Daniel Jacobowitz
2006-10-11 22:12 ` Mark Kettenis
2006-10-11 22:14 ` Joel Brobecker
2006-10-18 12:01 ` Andrew STUBBS
2006-10-18 14:14 ` Daniel Jacobowitz
2006-10-18 15:12 ` Andrew STUBBS
2006-10-18 19:47 ` Eli Zaretskii
2006-10-18 20:21 ` Andreas Schwab
2006-10-19 4:17 ` Eli Zaretskii
2006-10-19 9:47 ` Andrew STUBBS
2006-10-20 6:10 ` Eli Zaretskii
2006-10-20 14:29 ` Daniel Jacobowitz
2006-10-20 17:42 ` Eli Zaretskii
2006-10-20 17:47 ` Daniel Jacobowitz
2006-10-20 18:03 ` Eli Zaretskii [this message]
2006-10-20 18:07 ` Daniel Jacobowitz
2006-10-20 18:11 ` Eli Zaretskii
2006-10-19 13:28 ` Daniel Jacobowitz
2006-10-19 15:59 ` Andrew STUBBS
2006-10-18 19:22 ` Eli Zaretskii
2006-10-11 22:06 ` Mark Kettenis
2006-10-12 10:45 ` Andrew STUBBS
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=uwt6uq2yq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=andrew.stubbs@st.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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