]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commit
Use string_view in user_reg_map_name_to_regnum
authorTom Tromey <tom@tromey.com>
Fri, 19 Dec 2025 14:40:05 +0000 (07:40 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 22 Dec 2025 20:24:38 +0000 (13:24 -0700)
commitd7bc2ad4178b753f0a406fb274a437d11771bf1b
tree516be3cfa8f77da58a08f3bd3a924d8fbe73444a
parent164b8847c408f77b747cd33e6f9b8a50f75324b8
Use string_view in user_reg_map_name_to_regnum

This changes user_reg_map_name_to_regnum to use std::string_view.
This pointed out some dead code in that function: the "len < 0" test
in the loop can never be true, because earlier code changes 'len' in
this case.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
19 files changed:
gdb/aarch64-linux-tdep.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/ax-gdb.c
gdb/csky-tdep.c
gdb/eval.c
gdb/guile/scm-frame.c
gdb/i386-tdep.c
gdb/infcmd.c
gdb/nds32-tdep.c
gdb/parse.c
gdb/ppc-linux-tdep.c
gdb/python/py-registers.c
gdb/riscv-none-tdep.c
gdb/rs6000-tdep.c
gdb/stap-probe.c
gdb/tracepoint.c
gdb/user-regs.c
gdb/user-regs.h