This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Several regressions and we branch soon.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: "Tedeschi\, Walfred" <walfred dot tedeschi at intel dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Patrick Palka <patrick at parcs dot ath dot cx>, Doug Evans <dje at google dot com>, Keith Seitz <keiths at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 01 Jul 2015 09:49:41 +0100
- Subject: Re: Several regressions and we branch soon.
- Authentication-results: sourceware.org; auth=none
- References: <CADPb22SYnN52pqR+1UtR_Vr-1Yxzmx=OyMgnCD-OMcCL1GwAYg at mail dot gmail dot com> <CA+C-WL_uZdNj29-6u4MnqH-8zQt9Q20fzUb6b9nWHKJPCstY9A at mail dot gmail dot com> <CADPb22Rg2FySdxWo9VKb5WApPh-wdf946po9UXX-+kQ99bULug at mail dot gmail dot com> <5589BECB dot 7090200 at redhat dot com> <CADPb22RbcoyxPwwTTQCjSTdexN-D-gfWPd6doF2KbcMm074XyA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 8 dot 1506231742590 dot 4322 at idea> <86mvzpqq1z dot fsf at gmail dot com> <AC542571535E904D8E8ADAE745D60B194444379A at IRSMSX104 dot ger dot corp dot intel dot com>
"Tedeschi, Walfred" <walfred.tedeschi@intel.com> writes:
> This command was proposed initially as an standalone like:
>
> Set-mpx-bound and show-mpx-bound.
>
> Recommendation was to introduce it in the sets and shows, which I have agreed.
> Also because "set" is also used to set values of variables when used alone.
> Which is similar to what "set mpx bound" is doing, In this sense it
> can be considered as the right category to have it, as Joel indicated.
>
> About the show, well that is the natural counterpart of the set, right?
>
> Also, I agree with Yao patch. I would use a "warning" instead.
>
> Initialization of the command can be placed in a different location. I
> could think of adding them at the validation of the tdesc, i.e.
> I386_validate_tdesc_p and amd64_validate_tdesc_p. Would you agree with that?
>
> Open questions are:
> 1. Command call. Should they still be called "set mpx bound" / "show
> mpx bound"
Command "show mpx bound" expects an argument, which is an address. Is
this argument mandatory? In other words, can gdb scan bound directory
and bound table from inferior memory and print all entries? this would
be slow, but "show mpx bound" doesn't need an argument.
After I read intel mpx doc and the patch, I have more questions in my
mind,
- if program doesn't set mpx bounds at all, GDB attaches to the program,
and set mpx bounds, when GDB detaches from this program, does GDB
need to clear these mpx bounds it sets?
- if program does set mpx bounds too (through mpx instructions or
compiler builtins), do we expect GDB to show these mpx bounds too?
- If program sets mpx bounds through mxp instructions and GDB sets mpx
bounds too, does this interfere each other? or program's mxp bounds
setting is stored in bnd0-bnd3, but GDB's mpx bound setting is bound
directory and bound table, so this doesn't interfere each other?
> 2. Should initialization move to the validation routine?
If we do so, commands are not shown up on the target doesn't meet the
requirements of commands. After some thinking, I prefer registering
mpx commands unconditionally even target doesn't support mpx. The
"show" command still can tell user that this command doesn't work on
this target. Otherwise, it should be confusing that some commands
disappear silently.
--
Yao (éå)