From: Pedro Alves <palves@redhat.com>
To: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>,
"'Joel Brobecker'" <brobecker@adacore.com>
Cc: "'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v1] Intel(R) MPX - Bound violation handling.
Date: Wed, 16 Dec 2015 16:52:00 -0000 [thread overview]
Message-ID: <567196E6.9040602@redhat.com> (raw)
In-Reply-To: <AC542571535E904D8E8ADAE745D60B1944506C80@IRSMSX104.ger.corp.intel.com>
On 12/16/2015 03:19 PM, Tedeschi, Walfred wrote:
> Pedro,
>
> We have found an interesting fact, changing the order the observer_notify_signal_recieved from about line 8170 to just before
> Observer_notify_normal_stop. Allows the evaluation of the siginfo without the stop.
That's because we're about to present a stop to the user, so we
mark the threads as stopped in between:
/* Let the user/frontend see the threads as stopped. */
do_cleanups (old_chain);
But there's another observer_notify_signal_received
call that is done while threads are still marked running. Here
when we print the signal, but don't stop:
/* Notify observers the signal has "handle print" set. Note we
returned early above if stopping; normal_stop handles the
printing in that case. */
if (signal_print[ecs->event_thread->suspend.stop_signal])
{
/* The signal table tells us to print about this signal. */
target_terminal_ours_for_output ();
observer_notify_signal_received (ecs->event_thread->suspend.stop_signal);
target_terminal_inferior ();
}
Should gdb print the extra info in that case?
In any case, for the normal_stop case, I think you'd want to move
the observers call to just after the do_cleanups call shown above.
At least, put it before the stop hook handling. If something sets the
target running in the stop hook, then you'd lose stopped_by_random_signal.
> Looking at the code I could not see anything could harm there.
This may change output order, both CLI and MI. Please actually
try using the resulting gdb to intercept a signal, and compare it
with an unpatched gdb. Also, running the testsuite wouldn't be
a bad idea...
>
> What do you think? Is moving that code a possibility?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-12-16 16:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 15:09 [PATCH obv] Changing compiler flags for MPX tests Walfred Tedeschi
2015-10-26 16:10 ` [PATCH v1] Intel(R) MPX registers to the DWARF enumeration Walfred Tedeschi
2015-12-06 16:35 ` Joel Brobecker
2015-12-06 17:42 ` H.J. Lu
2015-12-07 8:29 ` Tedeschi, Walfred
2015-10-26 16:11 ` [PATCH v1] Synchronize siginfo type described in GDB with the kernel and glibc ones Walfred Tedeschi
2015-11-18 23:01 ` Joel Brobecker
2015-11-19 9:52 ` Tedeschi, Walfred
2015-11-19 13:27 ` Pedro Alves
2015-11-19 16:41 ` Tedeschi, Walfred
2015-11-19 17:07 ` Pedro Alves
2015-12-01 10:08 ` Tedeschi, Walfred
2015-12-01 12:08 ` Pedro Alves
2015-10-26 16:22 ` [PATCH v1] ABI changes for Intel(R) MPX Walfred Tedeschi
2015-10-26 19:07 ` Eli Zaretskii
2015-10-27 17:21 ` Tedeschi, Walfred
2015-12-06 16:16 ` Joel Brobecker
2015-10-26 16:25 ` [PATCH obv] Fix non stopping breakpoint on newer compilers Walfred Tedeschi
2015-11-04 14:42 ` Joel Brobecker
2015-10-26 16:26 ` [PATCH v1] Intel(R) MPX - Bound violation handling Walfred Tedeschi
2015-11-04 14:55 ` Joel Brobecker
2015-11-05 10:04 ` Tedeschi, Walfred
2015-11-19 0:01 ` Joel Brobecker
2015-12-14 17:43 ` Tedeschi, Walfred
2015-12-14 18:45 ` Pedro Alves
2015-12-15 11:01 ` Tedeschi, Walfred
2015-12-16 15:21 ` Tedeschi, Walfred
2015-12-16 16:52 ` Pedro Alves [this message]
2015-12-17 17:31 ` Tedeschi, Walfred
2015-12-21 17:23 ` Pedro Alves
2015-11-04 14:42 ` [PATCH obv] Changing compiler flags for MPX tests Joel Brobecker
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=567196E6.9040602@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=walfred.tedeschi@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