This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] [PATCH V8 1/1] Intel MPX bound violation handling
- From: "Tedeschi, Walfred" <walfred dot tedeschi at intel dot com>
- To: Pedro Alves <palves at redhat dot com>, "eliz at gnu dot org" <eliz at gnu dot org>, "brobecker at adacore dot com" <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 18 Feb 2016 16:32:21 +0000
- Subject: [commit] [PATCH V8 1/1] Intel MPX bound violation handling
- Authentication-results: sourceware.org; auth=none
Pedro, Eli and Joel,
Thanks a lot for your review and support!
Pushed!
Regards,
-Fred
From: Pedro Alves [mailto:palves@redhat.com]
Sent: Wednesday, February 17, 2016 4:52 PM
To: Tedeschi, Walfred; eliz@gnu.org; brobecker@adacore.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH V8 1/1] Intel MPX bound violation handling
On 02/05/2016 04:58 PM, Walfred Tedeschi wrote:
> diff --git a/gdb/NEWS b/gdb/NEWS
> index d9cbb80..19985bc 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,20 @@
>
> *** Changes since GDB 7.10
>
> +* Intel MPX bound violation handling.
(Please remember to move this to the 7.11 section.)
>
> static void
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index
> 7da31c8..3e9b289 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -5819,6 +5819,33 @@ $1 = (void *) 0x7ffff7ff7000
> +bounds, while with @code{handle nostop SIGSEGV} no additional
> +information is displayed..
Spurious double period.
> +void
> +i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
> + struct ui_out *uiout)
> +{
> + ui_out_text (uiout, _("]"));
> + return;
Remove useless return.
> +set segv_upper_bound "$u_fault.*$gdb_prompt $"
> +
> +set segv_lower_bound "$l_fault.*$gdb_prompt $"
AFAICS, these two are unused now. Remove them.
> +set parameters "print pass nostop"
> +with_test_prefix "$parameters" {
> + if ![runto_main] {
> + fail "could not run to main"
> + return -1
> + }
> +
> + gdb_test "handle SIGSEGV $parameters"\
> + ".*SIGSEGV.*No.*Yes.*Yes.*Segmentation fault.*"\
> + "set parameters"
> +
> + gdb_test "continue" ".*$segv_with_exit.*" "Display"
> +
> + gdb_test "where" "No stack." "no inferior $parameters"
This "$parameters" here will end up producing redundant test message, given the with_test_prefix already includes that info. Remove it:
gdb_test "where" "No stack." "no inferior"
Please take look at the resulting gdb.sum file, and check for other similar cases and fix them.
The code changes are OK with the above issues addressed.
I think you still need to get an OK from Eli, though.
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