From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: Pedro Alves <palves@redhat.com>,
"qiyaoltc@gmail.com" <qiyaoltc@gmail.com>,
"brobecker@adacore.com" <brobecker@adacore.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH V7] amd64-mpx: initialize bnd register before performing inferior calls.
Date: Wed, 15 Feb 2017 13:02:00 -0000 [thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B19513BDA7C@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <e56a89ba-9187-31e7-d339-d51af91c3e61@redhat.com>
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Pedro Alves
Sent: Tuesday, February 14, 2017 1:59 PM
To: Tedeschi, Walfred <walfred.tedeschi@intel.com>; qiyaoltc@gmail.com; brobecker@adacore.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH V7] amd64-mpx: initialize bnd register before performing inferior calls.
Hello Pedro,
On 02/14/2017 01:34 PM, Tedeschi, Walfred wrote:
> On 02/13/2017 09:33 AM, Tedeschi, Walfred wrote:
>> At the inferior call time all BND registers are set to the INIT state.
>> That covers 90% of the usage case and keeps the actual behavior of GDB.
>> In case it is desirable to investigate any bound violation user can
>> add a breakpoint on the prolog of the function and set the BND
>> register there, I understand that this is the normal use case for the
>> debugger as well.
> In reality it did not work as expected. When an inferior call is done
> and there is a breakpoint in the executed GDB issues a message like:
>
> "The program being debugged stopped while in a function called from GDB.
> Evaluation of the expression containing the function
> (foo) will be abandoned.
> When the function is done executing, GDB will silently stop."
This looks normal. What were you expecting instead?
--
Fred:
Message per se is fine. I was expecting that the inferior call should run isolated, exemplifying:
1. Inferior is stopped.
2. inferior call is done.
3. breakpoint in inferior call is triggered.
4. continue is issued.
5. signal is presented to the user.
6. continue is issued again.
7. expected - control should be back to 1, i.e. on stop mode.
7. actual behavior - application finishes with the signal
8. actual behavior - after the breakpoint no result will be displayed to the user (about the inf call)
In 6 if I use return instead I fall back to my expected behavior. In this sense, I think the user can work in that way.
I will continue a bit more testing now. I have got confused with an intermediate version 01/27/2017.
It was not displaying the signal step (5), now it is on again.
--
> Also after that no signal generated within the function call is reported.
Please clarify.
Fred: I tried to summarize above, not sure I succeeded.
Fred: Additional comment:
Trying that now I am considering that this as a whole is more complicated than expected.
Too many actions to realize the simple thing that is set a register before an inferior call and perform the call.
I am inclined to give it a try in creating set/show for the feature and see how it behaves.
In fact I will do it and submit the V8 based on that let's see how it looks like.
Thanks a lot for the review!
Best regards,
/Fred
> Not sure if this a limitation or a bug. In case you think it is a bug
> i can add some entries in Bugzilla.
Thanks,
Pedro Alves
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2017-02-15 13:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 15:13 Walfred Tedeschi
2017-02-06 17:05 ` [ping] " Tedeschi, Walfred
2017-02-06 17:58 ` Pedro Alves
2017-02-07 8:56 ` Tedeschi, Walfred
2017-02-08 12:27 ` Pedro Alves
2017-02-08 16:21 ` Pedro Alves
2017-02-08 16:31 ` Tedeschi, Walfred
2017-02-13 8:33 ` Tedeschi, Walfred
[not found] ` <75843d02-1b8b-f726-c36d-cd05c0ea5339@redhat.com>
2017-02-13 12:55 ` Tedeschi, Walfred
2017-02-14 13:35 ` Tedeschi, Walfred
2017-02-14 13:59 ` Pedro Alves
2017-02-15 13:02 ` Tedeschi, Walfred [this message]
2017-02-15 13:15 ` Pedro Alves
2017-02-16 13:50 ` Tedeschi, Walfred
2017-02-16 14:52 ` Pedro Alves
2017-02-16 15:37 ` Tedeschi, Walfred
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=AC542571535E904D8E8ADAE745D60B19513BDA7C@IRSMSX104.ger.corp.intel.com \
--to=walfred.tedeschi@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.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