This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch 0/3] case preserving, case insensitive (PR 11313+PR 11560)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 8 Apr 2011 19:56:41 +0200
- Subject: [patch 0/3] case preserving, case insensitive (PR 11313+PR 11560)
Hi,
obsoletes:
[patch 2/2] iFort compat.: case insensitive symbols (PR 11313)
http://sourceware.org/ml/gdb-patches/2010-11/msg00108.html
Patch has to introduce .gdb_index version 5 but it stays backward compatible
with v4. This is because a case-insensitive hash is in use. It means that
even with new GDB when still using v4 .gdb_index case-insensitive look ups of
symbols which were not fully lowercased (such as in fortran language mode
those produced by iFort) cannot be looked up. As it is not a regression and
generated .gdb_index v4 files should get replaced by v5 soon anyway I found it
acceptable. There needs to be some code specific for the v4 compatibility.
When we find the next .gdb_index regression (PR symtab/12426) requiring a new
.gdb_index format this v4 compatibility code will be dropped along. Therefore
I dod not try for example to re-hash a v4 table read in which could fix the
case insensitive look ups even with .gdb_index v4 for an IMO negligible cost.
GCC produces now DW_AT_identifier_case (GCC PR debug/43950) but this patch
does not use it at all. GDB uses just its global setting `set case-sensitive'
(which normally depends on current `set language' which is detected from the
current frame). I do not find DW_AT_identifier_case to fit into the user
interface GDB currently has.
I did not try to fix code which is used only by Ada as Ada already expects the
GDB symbols codebase is sensitive. As Ada is case insensitive I would guess
it could be based on top of it instead of its own case insensitivity
implementation but Joel did not answer that in the referenced thread.
http://sourceware.org/ml/gdb-patches/2010-11/msg00301.html
Currently the map_matching_symbols implementation match_partial_symbol is not
fixed for case insensitivity - it is already missing the physname
psymtab_search_name fix (C++/Java only) but that is not so applicable as
match_partial_symbol is Ada specific and its .gdb_index implementation
dw2_map_matching_symbols is not implemented at all. If Ada starts using case
insensitivity from the rest of GDB codebase I would roughly guess it no longer
needs to builds its own symbols copy by aux_add_nonlocal_symbols and maybe
whole map_matching_symbols can be dropped.
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu with and without
gdb/cc-with-index.sh in use.
Thanks,
Jan