[Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints
mjw at redhat dot com
sourceware-bugzilla@sourceware.org
Sun Sep 1 10:23:00 GMT 2013
https://sourceware.org/bugzilla/show_bug.cgi?id=15826
--- Comment #6 from Mark Wielaard <mjw at redhat dot com> ---
Sigh, although the patch in comment #5 works, and bool is a built-in type for
C++, the standard says:
§5.3.3/1, abridged:
sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1; the
result of sizeof applied to any other fundamental type is
implementation-defined. [Note: in particular, sizeof(bool) and sizeof(wchar_t)
are implementation-defined.69)]
Footnote 69):
sizeof(bool) is not required to be 1.
The (Itanium) C++ ABI, which GCC follows now, specifies (2.2 POD Data Types):
Type bool has size and alignment 1.
Can we easily detect the ABI used in language_bool_type?
Note that as far as I can see this special casing for bool_type was introduced
specifically for C++ (plain C doesn't do these symbol lookups). But then
adopted for all other languages introduced after that. Even if they have a
built-in boolean type with a well defined size. In those cases it IMHO doesn't
make sense to explicitly define bool_type_symbol for the language. Because it
will generate these symbol table lookups each time language_bool_type () is
called.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list