Bug 30115 - Investigate use of case-folding in cooked-index
Summary: Investigate use of case-folding in cooked-index
Status: RESOLVED INVALID
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 29366
  Show dependency treegraph
 
Reported: 2023-02-12 16:17 UTC by Tom Tromey
Modified: 2023-08-31 13:45 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2023-02-12 16:17:26 UTC
Right now the cooked index does case-insensitive comparisons.
But is this really needed?

I think there are a few case-insensitive languages in gdb.

GNAT already case-folds all symbol names.  In fact, due to the
way GNAT encodes non-ASCII characters, case-folding in the index
might mean that you could construct a situation where symbol
lookup finds the wrong thing.

I haven't looked to see what Pascal, Modula-2, or Fortran do.

However, for those, one option might be to do the folding as
a canonicalization step.
Comment 1 Tom Tromey 2023-08-31 13:45:14 UTC
Actually, this is needed to handle "set case-sensitive off".
It might also be needed so that Ada users can print C
globals without trying to get the case correct (though in
a brief test I couldn't get that working).