gdb 8.1-0ubuntu3.1 freezes before call main function while debugging 32bit application

Bug #1845494 reported by Wladyslaw Ostrowski on 2019-09-26
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Undecided
Manoj Iyer

Bug Description

gdb 8.1ubuntu3.1 run binary 64bit without problem.
If compile for 32bit target (g++ -m32 ..) then it can't load libraries
before call main(), i mean it gets frozen.
gdb 8.1-0ubuntu3 works with 32 and 64 bit binaries without problem.

Here is log:
g++ -m32 -o test test.cpp
gdb ./test

GNU gdb (Ubuntu 8.1-0ubuntu3.1) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test...(no debugging symbols found)...done.
(gdb) run
Starting program: /tmp/test
warning: Breakpoint address adjusted from 0xf7fd9be0 to 0xfffffffff7fd9be0.
warning: Breakpoint address adjusted from 0xf7fda195 to 0xfffffffff7fda195.
warning: Breakpoint address adjusted from 0xf7fdbd1c to 0xfffffffff7fdbd1c.
warning: Breakpoint address adjusted from 0xf7fdb924 to 0xfffffffff7fdb924.
warning: Breakpoint address adjusted from 0xf7fe99b3 to 0xfffffffff7fe99b3.
warning: Breakpoint address adjusted from 0xf7fea401 to 0xfffffffff7fea401.
warning: Breakpoint address adjusted from 0xf7fea706 to 0xfffffffff7fea706.
exit()
^C
Program received signal SIGINT, Interrupt.
0xf7fd9be0 in ?? () from /lib/ld-linux.so.2

lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

summary: - 8.1-0ubuntu3.1 freezes before call main function while debugging 32bit
- application
+ gdb 8.1-0ubuntu3.1 freezes before call main function while debugging
+ 32bit application
description: updated
description: updated

Workaround is to hold previous gdb version in apt.

apt purge gdb
apt install gdb=8.1-0ubuntu3
echo "gdb hold" | sudo dpkg --set-selections

Matthias Klose (doko) on 2019-09-29
Changed in gdb (Ubuntu):
assignee: nobody → Manoj Iyer (manjo)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdb (Ubuntu):
status: New → Confirmed

This might be this GDB bug (patch available there too):
https://sourceware.org/bugzilla/show_bug.cgi?id=23210#c6

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.