This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/22647] New: Tab completion hangs with a gcc7 LTO elf
- From: "halbert at halwitz dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 28 Dec 2017 21:09:35 +0000
- Subject: [Bug gdb/22647] New: Tab completion hangs with a gcc7 LTO elf
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22647
Bug ID: 22647
Summary: Tab completion hangs with a gcc7 LTO elf
Product: gdb
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: halbert at halwitz dot org
Target Milestone: ---
Created attachment 10701
--> https://sourceware.org/bugzilla/attachment.cgi?id=10701&action=edit
gdb-hang-gcc721.elf and gdb-ok-gcc631.elf
I have a an arm-none-eabi-gcc 7.2.1 .elf that causes gdb to hang when doing tab
completion.
Problem appears with various gdb's I tried:
1. arm-none-eabi-gdb 8.0.50-8.0.50.20171128-git. This gdb came with the GNU
Tools for Arm Embedded Processors 7-2017-q4-major release.
2. arm-none-eabi-gdb 7.2.1 20170904 (previous 2017 q2 ARM tools release)
3. gdb 7.11.1 (non-ARM) Ubuntu 7.11.1-0ubuntu1~16.5
A good and a bad .elf are attached in a .zip.
To reproduce, do:
$ gdb gdb-hang-gcc721.elf
(gdb) break mp_cal<tab>
When you press <tab>, gdb will start consuming 100% CPU. I waited for several
minutes with no effect. The process must be `kill -9`d to get rid of it. ^C
does not work.
I tried `set max-completions 5`, which works, and `50`, which still hangs.
The good .elf looks like this:
$ gdb gdb-ok-gcc631.elf
(gdb) break mp_cal<tab>l_
which completes with `l_` immediately (the symbol is still incomplete).
You can test this ARM .elf with x64 gdb; you don't need to use an ARM-specific
gdb.
Both .elf's are from the same large source tree. One was compiled with -flto
with arm-none-eabi-gcc 6.3.1, the other with -flto on7.2.1. If I turn off
-flto, the problem does not occur, so it's some issue with what -flto is
causing to be generated in the elf. Nevertheless, gdb shouldn't hang even if
the .elf is bad.
--
You are receiving this mail because:
You are on the CC list for the bug.