From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 0/7] improve btrace enable error reporting
Date: Wed, 07 Feb 2018 12:11:00 -0000 [thread overview]
Message-ID: <e89cb373-79d8-d438-ee80-6a4eaffb4f8f@redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B2369644AC2@IRSMSX104.ger.corp.intel.com>
On 02/07/2018 10:41 AM, Metzger, Markus T wrote:
> Hello Pedro,
>
>> This LGTM, though I have a couple questions, and a nit.
>>
>> #1 - Where does this leave up wrt to:
>>
>> 'old gdb' x 'new gdbserver'
>> and
>> 'new gdb' x 'old gdbserver'
>>
>> ?
>
> An old gdbserver would still produce the old error responses. They would be turned
> into errors on the GDB side in remote.c both for old and new GDB. No change.
>
> Removing remote_supports_btrace in a new GDB will defer the packet availability check
> to the individual functions. The "Target does not support branch tracing" error will now
> come from record_enable_btrace() instead of btrace_enble(). The old gdbserver still does
> the initial availability check and will not announce the respective enabling packets. No
> user-visible change.
>
> A new gdbserver will produce the new error messages and will always announce btrace
> packets in qSupported. An old GDB will hence always ask to enable branch tracing and
> the new gdbserver will always try and report the reason using the new error messages.
> This will look like a new GDB.
Great, thanks. I'd think it a good idea to copy/paste that to the relevant
patch's git log.
>
>
>> #2 - Where we now say
>>
>> + error (_("GDB does not support Intel PT."));
>>
>> (and similarly for BTS)
>>
>> shouldn't that say something like "_This_ GDB does not", so that the user can tell
>> that it's a matter of that particular build of gdb, not that GDB-the-project is lacking
>> support for PT?
>
> I thought we meant GDB in errors to always refer to this instance of GDB. There would
> hardly be an error about missing PT support if the GDB project didn't know about it.
GDB can know about PT but not have support implemented, because no one wrote
the support. The error message "GDB does not support Intel PT" to me sounds
like what we'd say if we had written some initial support in form of
commands that do nothing. How can the user tell the difference to
"gdb supports PT, but you need to build it against a newer version of some library,
or something like that."
>
> I don't mind changing the error string. Would "This GDB" be the correct wording? Or
> should we refer to the configuration and say something like "GDB has not been configured
> to support ..." or "GDB has been built without support for ..."?
>
> Both are substantially longer and not more helpful IMHO, even though they describe
> more accurately what's wrong. The term "This GDB" would refer to this particular GDB
> executable more clearly but I'm not sure whether this would be more helpful, either.
Yeah "This GDB" was a straw man proposal, something to get the discussion started
to maybe find some better warning.
Off hand, I recall that in the no-expat cases, we say things like this:
warning (_("Can not parse XML trace frame info; XML support "
"was disabled at compile time"));
warning (_("Can not parse XML memory map; XML support was disabled "
"at compile time"));
warning (_("Can not parse XML OS data; XML support was disabled "
"at compile time"));
So maybe something around
"Cannot do X; Intel PT support disabled at compile time."
>
>
>> #3 - in patch 7:
>>
>> Instead of:
>>
>> const char *filename = "/proc/sys/kernel/perf_event_paranoid";
>>
>> write:
>>
>> static const char filename[] = ...;
>
> Regarding that last patch, it is checking a Debian-specific kernel feature. The upstream
> kernel only knows levels -1, 0, 1, and 2. Even setting the perf_event_paranoid level to 3
> wouldn't cause any issues.
>
> What is our policy regarding this? Do we accept such distribution-specific checks into
> upstream GDB or do we expect the Debian maintainers to maintain this patch on top
> of upstream GDB?
I don't think we have a written down policy.
I don't mind having it in master. It helps users/developers running
Debian and derivatives, and is not invasive.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-02-07 12:11 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 14:14 Markus Metzger
2018-01-26 14:14 ` [PATCH v2 1/7] common: add scoped_fd Markus Metzger
2018-02-13 16:48 ` Yao Qi
2018-02-13 17:28 ` Metzger, Markus T
2018-02-14 15:22 ` Yao Qi
2018-02-14 17:26 ` Metzger, Markus T
2018-02-19 15:28 ` Metzger, Markus T
2018-02-20 10:12 ` Yao Qi
2018-02-20 10:46 ` Metzger, Markus T
2018-01-26 14:14 ` [PATCH v2 5/7] btrace, gdbserver: remove the to_supports_btrace target method Markus Metzger
2018-02-24 16:51 ` Maciej W. Rozycki
2018-02-26 13:08 ` Metzger, Markus T
2018-02-26 19:30 ` Andreas Arnez
2018-02-26 21:58 ` Maciej W. Rozycki
2018-02-27 10:57 ` Metzger, Markus T
2018-02-27 15:32 ` Maciej W. Rozycki
2018-02-27 18:14 ` Metzger, Markus T
2018-02-28 10:29 ` Maciej W. Rozycki
2018-02-28 11:09 ` Maciej W. Rozycki
2018-02-28 11:24 ` Metzger, Markus T
2018-02-28 12:53 ` Metzger, Markus T
2018-02-28 15:55 ` Maciej W. Rozycki
2018-02-28 16:08 ` Eli Zaretskii
2018-02-28 12:00 ` Yao Qi
2018-02-28 16:27 ` Sergio Durigan Junior
2018-03-01 11:33 ` Metzger, Markus T
2018-03-01 19:27 ` Sergio Durigan Junior
2018-03-05 12:14 ` Yao Qi
[not found] ` <87lgf64i24.fsf@redhat.com>
2018-03-06 9:02 ` Yao Qi
2018-03-06 16:32 ` Sergio Durigan Junior
2018-03-01 19:34 ` Maciej W. Rozycki
2018-01-26 14:14 ` [PATCH v2 3/7] btrace: prepare for throwing exceptions when enabling btrace Markus Metzger
2018-01-26 14:14 ` [PATCH v2 6/7] btrace: improve enable error messages Markus Metzger
2018-01-26 14:14 ` [PATCH v2 4/7] btrace, gdbserver: use exceptions to convey btrace enable/disable errors Markus Metzger
2018-01-26 14:14 ` [PATCH v2 2/7] common: add scoped_mmap Markus Metzger
2018-02-06 16:28 ` [PATCH v2 0/7] improve btrace enable error reporting Pedro Alves
2018-02-07 10:41 ` Metzger, Markus T
2018-02-07 12:11 ` Pedro Alves [this message]
2018-02-08 10:40 ` Metzger, Markus T
[not found] ` <9ce0c90a-5c71-0a7d-3779-f826369a95ec@redhat.com>
2018-02-08 13:49 ` Metzger, Markus T
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=e89cb373-79d8-d438-ee80-6a4eaffb4f8f@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.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