2004-03-28 Andrew Cagney <cagney@redhat.com>
[platform/upstream/binutils.git] / gdb / PROBLEMS
1
2                         Known problems in GDB 6.1
3
4                 See also: http://www.gnu.org/software/gdb/bugs/
5
6
7 *** Misc
8
9 gdb/1560: Control-C does not always interrupt GDB.
10
11 When GDB is busy processing a command which takes a long time to
12 complete, hitting Control-C does not have the expected effect.
13 The command execution is not aborted, and the "QUIT" message confirming
14 the abortion is displayed only after the command has been completed.
15
16 *** C++ support
17
18 gdb/931: GDB could be more generous when reading types C++ templates on input
19
20 When the user types a template, GDB frequently requires the type to be
21 typed in a certain way (e.g. "const char*" as opposed to "const char *"
22 or "char const *" or "char const*").
23
24 gdb/1512: no canonical way to output names of C++ types
25
26 We currently don't have any canonical way to output names of C++ types.
27 E.g. "const char *" versus "char const *"; more subtleties arise when
28 dealing with templates.
29
30 gdb/1516: [regression] local classes, gcc 2.95.3, dwarf-2
31
32 With gcc 2.95.3 and the dwarf-2 debugging format, classes which are
33 defined locally to a function include the demangled name of the function
34 as part of their name.  For example, if a function "foobar" contains a
35 local class definition "Local", gdb will say that the name of the class
36 type is "foobar__Fi.0:Local".
37
38 This applies only to classes where the class type is defined inside a
39 function, not to variables defined with types that are defined somewhere
40 outside any function (which most types are).
41
42 gdb/1588: names of c++ nested types in casts must be enclosed in quotes
43
44 You must type
45   (gdb) print ('Foo::Bar') x
46 or
47   (gdb) print ('Foo::Bar' *) y
48 instead of
49   (gdb) print (Foo::Bar) x
50 or
51   (gdb) print (Foo::Bar *) y
52 respectively.
53
54 gdb/1091: Constructor breakpoints ignored
55 gdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints
56
57 When gcc 3.x compiles a C++ constructor or C++ destructor, it generates
58 2 or 3 different versions of the object code.  These versions have
59 unique mangled names (they have to, in order for linking to work), but
60 they have identical source code names, which leads to a great deal of
61 confusion.  Specifically, if you set a breakpoint in a constructor or a
62 destructor, gdb will put a breakpoint in one of the versions, but your
63 program may execute the other version.  This makes it impossible to set
64 breakpoints reliably in constructors or destructors.
65
66 gcc 3.x generates these multiple object code functions in order to
67 implement virtual base classes.  gcc 2.x generated just one object code
68 function with a hidden parameter, but gcc 3.x conforms to a multi-vendor
69 ABI for C++ which requires multiple object code functions.
70
71 *** Stack backtraces
72
73 GDB's core code base has been updated to use a new backtrace
74 mechanism.  This mechanism makes it possible to support new features
75 such DWARF 2 Call Frame Information (which in turn makes possible
76 backtraces through optimized code).
77
78 Since this code is new, it is known to still have a few problems:
79
80 gdb/1505: [regression] gdb prints a bad backtrace for a thread
81
82 When backtracing a thread, gdb does not stop when it reaches the
83 outermost frame, instead continuing until it hits garbage.  This is
84 sensitive to the operating system and thread library.
85
86 hppa*-*-*
87 mips*-*-*
88
89 The MIPS and HPPA backtrace code has only very recently been updated
90 to use GDB's new frame mechanism.  At present there are still a few
91 problems, in particular backtraces through signal handlers do not
92 work.
93
94 People encountering problems with these architectures should consult
95 GDB's web pages and mailing lists (http://www.gnu.org/software/gdb/)
96 to see if there are updates.
97
98 powerpc*-*-*
99
100 PowerPC architecture support, in 6.1, does not use the new frame code.
101
102 Fortunately, PowerPC architecture support, in GDB's mainline sources,
103 have been updated.  People encountering problems should consider
104 downloading a more current snapshot of GDB
105 (http://www.gnu.org/software/gdb/current/).