public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with AddressSanitizer
Date: Tue, 9 Nov 2021 11:16:40 -0500	[thread overview]
Message-ID: <574326f8-7939-7c0b-e9b5-c4704196a98f@simark.ca> (raw)
In-Reply-To: <20211104211412.22991-1-simon.marchi@efficios.com>

On 2021-11-04 5:14 p.m., Simon Marchi via Gdb-patches wrote:
> This test fails for me, showing:
> 
>     ERROR: tcl error sourcing /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp.
>     ERROR: This GDB was configured as follows:
>        configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
>                  --with-auto-load-dir=$debugdir:$datadir/auto-load
>                  --with-auto-load-safe-path=$debugdir:$datadir/auto-load
>     ... and much more ...
> 
> The problem is that TCL's exec throws an error as soon as the exec'ed
> process outputs on stderr.  When GDB is built with ASan, it prints some
> warnings about pre-existing signal handlers:
> 
>     warning: Found custom handler for signal 7 (Bus error) preinstalled.
>     warning: Found custom handler for signal 8 (Floating point exception) preinstalled.
>     warning: Found custom handler for signal 11 (Segmentation fault) preinstalled.
> 
> Pass --quiet to GDB to avoid these warnings.
> 
> Change-Id: I3751d89b9b1df646da19149d7cb86775e2d3e80f
> ---
>  gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
> index 92f3cd8b01d..31e9e4a92f0 100644
> --- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
> +++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
> @@ -30,8 +30,13 @@ if { [which curl] == 0 } {
>  }
>  
>  # Skip testing if gdb was not configured with debuginfod
> +#
> +# If GDB is built with ASan, it warns that some signal handlers (installed by
> +# ASan) exist on startup.  That makes TCL's exec throw an error.  Disable that
> +# by passing --quiet.
> +
>  if { [string first "with-debuginfod" \
> -	 [eval exec $GDB $INTERNAL_GDBFLAGS --configuration]] == -1 } {
> +	 [eval exec $GDB --quiet $INTERNAL_GDBFLAGS --configuration]] == -1 } {
>      untested "gdb not configured with debuginfod"
>      return -1
>  }
> -- 
> 2.33.0
> 

This is relatively obvious, I think, so I ended up pushing it.

Simon

      reply	other threads:[~2021-11-09 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 21:14 Simon Marchi
2021-11-09 16:16 ` Simon Marchi [this message]

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=574326f8-7939-7c0b-e9b5-c4704196a98f@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).