gdb can't debug the 32bits program for linux

0

1

How to solve this? When I use the gdb to debug the 32bits program, this warning appeared. And this made the program can't run.

When I use the gdb to debug the 32bits program, this warning appeared. And this made the program can't run. This is the configuration information about gdb

This is the configuration information about gdb

shuitang

Posted 2019-09-28T04:15:17.317

Reputation: 1

But what exactly is the warning you're concerned about? And can you actually debug the program? – Edward – 2019-10-04T13:54:28.610

Answers

0

If you want to debug the 32-bit application on 64-bit ubuntu. Try it.

sudo apt-get install gdb-multiarch

hayicle inu

Posted 2019-09-28T04:15:17.317

Reputation: 1

0

I hit the same issue. After testing with various setups and machines, I have concluded that the gdb version (8.1) Ubuntu 18.04 ships with is buggy. More recent versions of gdb seem to work just fine (that is: you don't see these weird warnings + gdb doesn't hang when debugging 32-bits programs).

I've tried on Ubuntu 19.04, which ships with gdb 8.2, and it works fine out of the box. I've also tried to compile the most recent version (at the time of writing: 8.3.1) and it works fine (even on Ubuntu 18.04).

My suggestion is to grab the latest version of gdb (at the time of writing: 8.3.1) and compile it yourself. You can grab the source bundles here: https://mirrors.kernel.org/sourceware/gdb/releases/.

Another (very) sub-ideal solution that seems to work: you can install the gdb:i386 package, which will install gdb for 32bits application. However, it will uninstall gdb for 64bits, which you may not want to do.

I have no idea what's the underlying issue and whether or not there is a quick way to fix it.

reyammer

Posted 2019-09-28T04:15:17.317

Reputation: 1

A colleague found an entry in the bug tracker opened a couple of weeks ago: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1845494 So, yeah, it seems a gdb bug. The culprit seems to be version 8.1-0ubuntu3, released on Sept 23rd. Older version 8.1-0ubuntu3 seems to work fine.

– reyammer – 2019-10-07T12:58:39.777