xref: /openbsd-src/gnu/usr.bin/binutils/gdb/PROBLEMS (revision 11efff7f3ac2b3cfeff0c0cddc14294d9b3aca4f)
1b725ae77Skettenis
2*11efff7fSkettenis			Known problems in GDB 6.3
3b725ae77Skettenis
4b725ae77Skettenis		See also: http://www.gnu.org/software/gdb/bugs/
5b725ae77Skettenis
6b725ae77Skettenis
7b725ae77Skettenis*** Build problems
8b725ae77Skettenis
9*11efff7fSkettenisbuild/1411: build fails on hpux 10.20 and hpux 11.00 with CMA threads
10b725ae77Skettenis
11*11efff7fSkettenisGDB does not build on HP/UX 10.20 or HP/UX 11.00 if the CMA
12*11efff7fSkettenisthread package is installed.  The compile error is:
13*11efff7fSkettenis
14*11efff7fSkettenis  ../../gdb/hpux-thread.c:222: variable-size type declared outside of any function
15*11efff7fSkettenis
16*11efff7fSkettenisThis happens only if the CMA thread package is installed.
17*11efff7fSkettenis
18*11efff7fSkettenisAs a workaround, you can disable support for CMA threads
19*11efff7fSkettenisby editing the file gdb/configure.  Find the line:
20*11efff7fSkettenis
21*11efff7fSkettenis  if test -f /usr/include/dce/cma_config.h ; then
22*11efff7fSkettenis
23*11efff7fSkettenisAnd replace it with:
24*11efff7fSkettenis
25*11efff7fSkettenis  if false ; then
26b725ae77Skettenis
27b725ae77Skettenis*** Misc
28b725ae77Skettenis
29b725ae77Skettenisgdb/1560: Control-C does not always interrupt GDB.
30b725ae77Skettenis
31b725ae77SkettenisWhen GDB is busy processing a command which takes a long time to
32b725ae77Sketteniscomplete, hitting Control-C does not have the expected effect.
33b725ae77SkettenisThe command execution is not aborted, and the "QUIT" message confirming
34b725ae77Skettenisthe abortion is displayed only after the command has been completed.
35b725ae77Skettenis
36b725ae77Skettenis*** C++ support
37b725ae77Skettenis
38b725ae77Skettenisgdb/931: GDB could be more generous when reading types C++ templates on input
39b725ae77Skettenis
40b725ae77SkettenisWhen the user types a template, GDB frequently requires the type to be
41b725ae77Skettenistyped in a certain way (e.g. "const char*" as opposed to "const char *"
42b725ae77Skettenisor "char const *" or "char const*").
43b725ae77Skettenis
44b725ae77Skettenisgdb/1512: no canonical way to output names of C++ types
45b725ae77Skettenis
46b725ae77SkettenisWe currently don't have any canonical way to output names of C++ types.
47b725ae77SkettenisE.g. "const char *" versus "char const *"; more subtleties arise when
48b725ae77Skettenisdealing with templates.
49b725ae77Skettenis
50b725ae77Skettenisgdb/1516: [regression] local classes, gcc 2.95.3, dwarf-2
51b725ae77Skettenis
52b725ae77SkettenisWith gcc 2.95.3 and the dwarf-2 debugging format, classes which are
53b725ae77Skettenisdefined locally to a function include the demangled name of the function
54b725ae77Skettenisas part of their name.  For example, if a function "foobar" contains a
55b725ae77Skettenislocal class definition "Local", gdb will say that the name of the class
56b725ae77Skettenistype is "foobar__Fi.0:Local".
57b725ae77Skettenis
58b725ae77SkettenisThis applies only to classes where the class type is defined inside a
59b725ae77Skettenisfunction, not to variables defined with types that are defined somewhere
60b725ae77Skettenisoutside any function (which most types are).
61b725ae77Skettenis
62b725ae77Skettenisgdb/1588: names of c++ nested types in casts must be enclosed in quotes
63b725ae77Skettenis
64b725ae77SkettenisYou must type
65b725ae77Skettenis  (gdb) print ('Foo::Bar') x
66b725ae77Skettenisor
67b725ae77Skettenis  (gdb) print ('Foo::Bar' *) y
68b725ae77Skettenisinstead of
69b725ae77Skettenis  (gdb) print (Foo::Bar) x
70b725ae77Skettenisor
71b725ae77Skettenis  (gdb) print (Foo::Bar *) y
72b725ae77Skettenisrespectively.
73b725ae77Skettenis
74b725ae77Skettenisgdb/1091: Constructor breakpoints ignored
75b725ae77Skettenisgdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints
76b725ae77Skettenis
77b725ae77SkettenisWhen gcc 3.x compiles a C++ constructor or C++ destructor, it generates
78b725ae77Skettenis2 or 3 different versions of the object code.  These versions have
79b725ae77Skettenisunique mangled names (they have to, in order for linking to work), but
80b725ae77Skettenisthey have identical source code names, which leads to a great deal of
81b725ae77Skettenisconfusion.  Specifically, if you set a breakpoint in a constructor or a
82b725ae77Skettenisdestructor, gdb will put a breakpoint in one of the versions, but your
83b725ae77Skettenisprogram may execute the other version.  This makes it impossible to set
84b725ae77Skettenisbreakpoints reliably in constructors or destructors.
85b725ae77Skettenis
86b725ae77Skettenisgcc 3.x generates these multiple object code functions in order to
87b725ae77Skettenisimplement virtual base classes.  gcc 2.x generated just one object code
88b725ae77Skettenisfunction with a hidden parameter, but gcc 3.x conforms to a multi-vendor
89b725ae77SkettenisABI for C++ which requires multiple object code functions.
90b725ae77Skettenis
91*11efff7fSkettenis*** Threads
92b725ae77Skettenis
93*11efff7fSkettenisthreads/1650: manythreads.exp
94b725ae77Skettenis
95*11efff7fSkettenisOn GNU/Linux systems that use the old LinuxThreads thread library, a
96*11efff7fSkettenisprogram rapidly creating and deleting threads can confuse GDB leading
97*11efff7fSkettenisto an internal error.
98b725ae77Skettenis
99*11efff7fSkettenisThis problem does not occur on newer systems that use the NPTL
100*11efff7fSkettenislibrary, and did not occur with GDB 6.1.
101