gdb pretty printers do not auto-load on Trusty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.8 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Unassigned |
Bug Description
On Ubuntu 14.04.2 (Trusty), the file in libstdc++6-4.8-dbg to auto-load the pretty printers doesn't resolve the right path to the printers. To reproduce, on a fresh install:
$ cat test.cpp
#include <vector>
int main() {
std::vector<int> v;
v.push_back(1);
return 0;
}
$ g++ test.cpp -g
$ gdb a.out -ex start
Reading symbols from a.out...done.
Temporary breakpoint 1 at 0x400956: file test.cpp, line 3.
Starting program: /home/emaisin/a.out
Traceback (most recent call last):
File "/usr/lib/
from libstdcxx.
ImportError: No module named 'libstdcxx'
Temporary breakpoint 1, main () at test.cpp:3
3 std::vector<int> v;
(gdb)
It seems like the fixup for multiarch actually adds an extra "..":
if not os.path.
backdirs += 1 # multiarch subdir
Removing these two lines almost makes it work:
$ gdb a.out -ex start
Reading symbols from a.out...done.
Temporary breakpoint 1 at 0x400956: file test.cpp, line 3.
Starting program: /home/emaisin/a.out
Traceback (most recent call last):
File "/usr/lib/
from libstdcxx.
File "/usr/lib/
raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
SyntaxError: invalid syntax
Temporary breakpoint 1, main () at test.cpp:3
3 std::vector<int> v;
That last problem is tracked in bug #1256419, which is still a pending issue in Trusty.
Changed in gcc-4.8 (Ubuntu): | |
importance: | Undecided → Medium |
Changed in gcc-4.8 (Ubuntu Trusty): | |
importance: | Undecided → Medium |
I confirm this on current 14.04 LTS release.
However, I no longer have problems regarding bug #1256419, so it seems the printers.py file syntax has already been updated in upstream.
So just commenting out the two lines Simon Suggests solves the issue for me (however, I'm not doing any multiarch releases, so I don't know what is broken by this fix).