Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: call check_typedef at beginning of dwarf_expr_context::fetch_result
Date: Thu, 28 Jul 2022 09:56:26 +0100	[thread overview]
Message-ID: <20220728085607.hicavv2k2tg4jfew@octopus> (raw)
In-Reply-To: <20220728013422.2561677-1-simon.marchi@efficios.com>

Hi,

[...]
> diff --git a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp
> new file mode 100644
> index 00000000000..3a3740234fa
> --- /dev/null
> +++ b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp
> @@ -0,0 +1,36 @@
> +# Copyright 2022 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# The program associated to this test case uncovered a bug in GDB (PR 29374)
> +# where a typedef type was used before it was resolved.
> +
> +standard_testfile .S

Shouldn’t there be something like:

if { ![istarget x86_64-*-linux* ] } {
  return
}

or similar to make sure that we do not try to compile this .S file on
incompatible archs?

Best,
Lancelot.

> +
> +if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {c++}] != ""} {
> +    return
> +}
> +
> +clean_restart $binfile
> +
> +if {![runto_main]} {
> +    return
> +}
> +
> +gdb_test "catch throw" "Catchpoint $::decimal \\(throw\\)"
> +gdb_test "continue" "Catchpoint $::decimal \\(exception thrown\\).*"
> +
> +# Without the corresponding fix, GDB would hit an internal error before
> +# printing the frame for main.
> +gdb_test "backtrace" " $::hex in func \\(t=t@entry=@$::hex: 1234\\).* $::hex in main .*"
> -- 
> 2.37.1
> 

  parent reply	other threads:[~2022-07-28  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28  1:34 Simon Marchi via Gdb-patches
2022-07-28  2:33 ` [PATCH v2] " Simon Marchi via Gdb-patches
2022-07-28  8:56 ` Lancelot SIX via Gdb-patches [this message]
2022-07-28 15:33   ` [PATCH] " Simon Marchi via Gdb-patches
  -- strict thread matches above, loose matches on Subject: below --
2022-07-24  3:59 Simon Marchi via Gdb-patches

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=20220728085607.hicavv2k2tg4jfew@octopus \
    --to=gdb-patches@sourceware.org \
    --cc=lsix@lancelotsix.com \
    --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