From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Manfred Schwarb <manfred99@gmx.ch>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Debugging ICE in GCC
Date: Sat, 30 May 2020 08:39:55 +0100 [thread overview]
Message-ID: <CAH6eHdRuSjG4toUWPt94C9GWitx_xz0gH0QRTkFRnXtOnH9A8A@mail.gmail.com> (raw)
In-Reply-To: <61ade9a5-4252-9b6d-5aed-9451404111d4@gmx.ch>
On Sat, 30 May 2020 at 02:01, Manfred Schwarb <manfred99@gmx.ch> wrote:
>
> Hi,
> I tried to debug fortran.dg/pr95090.f90, which showed
>
> f951: internal compiler error: Segmentation fault
> 0x83cfe3c ???
> ../sysdeps/i386/start.S:117
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <https://gcc.gnu.org/bugs/> for instructions.
>
>
> Using GDB (8.3.1), I got
> #> f951="`$instdir/bin/gcc -print-prog-name=f951`"
> #> gdb -ex run -ex bt --batch --args $f951 fortran.dg/pr95090.f90
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
> #0 0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
> #1 0x083e7c3f in get_unique_hashed_string(char*, gfc_symbol*) ()
> #2 0x083e85a4 in gfc_find_derived_vtab(gfc_symbol*) ()
> #3 0x0847fde1 in resolve_fl_derived(gfc_symbol*) ()
> #4 0x0847c717 in resolve_symbol(gfc_symbol*) ()
> #5 0x084a78d0 in do_traverse_symtree(gfc_symtree*, void (*)(gfc_symtree*), void (*)(gfc_symbol*)) ()
> #6 0x08487f77 in resolve_types(gfc_namespace*) ()
> #7 0x0847b6e5 in gfc_resolve(gfc_namespace*) ()
> #8 0x0846e9f6 in gfc_parse_file() ()
> #9 0x084bebe7 in gfc_be_parse_file() ()
> #10 0x08a3b59e in compile_file() ()
> #11 0x083c98a5 in toplev::main(int, char**) ()
> #12 0x083cd9b1 in main ()
>
>
> So far so good, but there are no file locations shown, and I can't
> switch frames and list code in GDB.
> This although I built GCC with debug information and binaries are not stripped.
>
> I built GCC with
> #> ../configure --enable-checking=yes,extra i686-linux
> #> make BOOT_CFLAGS="-O2 -ggdb" bootstrap2-lean
>
> In desperation, I even tried
> #> make BOOT_CFLAGS="-O2 -fanalyzer" bootstrap2-lean
> and
> #> make BOOT_CFLAGS="-O2 -fsanitize=address" bootstrap2-lean
> but both compilation attempts failed.
>
>
> Are there any magic knobs to make GDB output more useful?
There's a whole wiki page about that:
https://gcc.gnu.org/wiki/DebuggingGCC
You probably don't want to use -O2
next prev parent reply other threads:[~2020-05-30 7:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 23:55 Manfred Schwarb
2020-05-30 2:01 ` Dan Kegel
[not found] ` <77248fa9-0729-28a1-ea61-1ed2005f9b66@gmx.ch>
2020-05-30 23:48 ` Manfred Schwarb
2020-05-30 7:39 ` Jonathan Wakely [this message]
2020-05-30 23:46 ` Manfred Schwarb
2020-05-31 13:45 ` Manfred Schwarb
2020-05-31 20:30 ` Jonathan Wakely
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=CAH6eHdRuSjG4toUWPt94C9GWitx_xz0gH0QRTkFRnXtOnH9A8A@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=manfred99@gmx.ch \
/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).