]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change ada_decode to preserve upper-case in some situations
authorTom Tromey <tom@tromey.com>
Sat, 22 Feb 2025 21:07:57 +0000 (14:07 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 10 Sep 2025 22:05:27 +0000 (16:05 -0600)
commitcfe3a766e64663091be4a791394269bf353d6d27
treee153c69827a7cdc2da0b5e0dc66eb931a15a88fa
parent27de7d7bc3c16137f03a5be2d5da2b7687200eff
Change ada_decode to preserve upper-case in some situations

This patch is needed to avoid regressions later in the series.

The issue here is that ada_decode, when called with wide=false, would
act as though the input needed verbatim quoting.  That would happen
because the 'W' character would be passed through; and then a later
loop would reject the result due to that character.

Similarly, with operators=false the upper-case-checking loop would be
skipped, but then some names that did need verbatim quoting would pass
through.

Furthermore I noticed that there isn't a need to distinguish between
the "wide" and "operators" cases -- all callers pass identical values
to both.

This patch cleans up the above, consolidating the parameters and
changing how upper-case detection is handled, so that both the
operator and wide cases pass-through without issue.  I've added new
unit tests for this.

Acked-By: Simon Marchi <simon.marchi@efficios.com>
gdb/ada-lang.c
gdb/ada-lang.h
gdb/dwarf2/cooked-index-shard.c
gdb/symtab.h