]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb] Use using instead of typedef
authorTom de Vries <tdevries@suse.de>
Thu, 11 Jun 2026 06:54:34 +0000 (08:54 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 11 Jun 2026 06:54:34 +0000 (08:54 +0200)
commit6c85ef111b0430493792cde3b0fd572f1c78e732
treea4e73d21e6ffc6dd01280d91ad5ddcb6143a5fe6
parent2eea7bca0ced1a25eb47ae586363fe32008b8566
[gdb] Use using instead of typedef

After commit 1eed06ae51d ("[gdbsupport] Use using instead of typedef in
next_iterator") I wondered if I could do something similar using sed.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
    's/^\([ \t]*\)typedef \([a-zA-Z_0-9:<>,.() ]*\) \([\*&][\*&]*\)\([a-zA-Z_0-9]*\);/\1using \4 = \2 \3;/'

$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
    's/^\([ \t]*\)typedef \([a-zA-Z_0-9:<>,.() ]*\) \([a-zA-Z_0-9]*\);/\1using \3 = \2;/'
...

Tested on x86_64-linux.
115 files changed:
gdb/aarch64-tdep.c
gdb/aarch64-windows-tdep.c
gdb/ada-exp.h
gdb/alpha-tdep.c
gdb/arch/xtensa.h
gdb/arm-linux-nat.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax.h
gdb/block.h
gdb/breakpoint.h
gdb/cli/cli-script.h
gdb/compile/compile-object-load.h
gdb/complaints.h
gdb/completer.h
gdb/config/djgpp/nl_types.h
gdb/darwin-nat.h
gdb/dcache.h
gdb/dictionary.h
gdb/dwarf2/index-common.h
gdb/dwarf2/line-header.h
gdb/dwarf2/read.c
gdb/elfread.c
gdb/expop.h
gdb/expression.h
gdb/extension.h
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/gdb_bfd.h
gdb/gdb_wchar.h
gdb/gdbtypes.h
gdb/gregset.h
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/i386-tdep.c
gdb/inferior-iter.h
gdb/linux-nat.c
gdb/lm32-tdep.c
gdb/location.h
gdb/loongarch-tdep.c
gdb/m32c-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/microblaze-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/msp430-tdep.c
gdb/nat/aarch64-linux-hw-point.h
gdb/nat/aarch64-linux.h
gdb/nat/amd64-linux-siginfo.c
gdb/nat/glibc_thread_db.h
gdb/nat/linux-osdata.c
gdb/nat/loongarch-linux-hw-point.h
gdb/nat/windows-nat.h
gdb/nds32-tdep.c
gdb/objfiles.h
gdb/or1k-tdep.c
gdb/proc-utils.h
gdb/procfs.c
gdb/prologue-value.h
gdb/python/py-registers.c
gdb/python/python-internal.h
gdb/python/python-limited-api-missing.h
gdb/quick-symbol.h
gdb/remote-notif.h
gdb/remote.c
gdb/rl78-tdep.c
gdb/rx-tdep.c
gdb/s12z-tdep.c
gdb/s390-tdep.c
gdb/ser-go32.c
gdb/ser-mingw.c
gdb/ser-tcp.c
gdb/serial.h
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/stubs/z80-stub.c
gdb/symfile.h
gdb/symtab.h
gdb/target.h
gdb/thread-iter.h
gdb/tilegx-tdep.c
gdb/tracepoint.h
gdb/tui/tui-layout.h
gdb/tui/tui-winsource.h
gdb/ui-file.h
gdb/ui-out.h
gdb/unittests/packed-selftests.c
gdb/utils.h
gdb/value.h
gdb/varobj.c
gdb/vax-tdep.c
gdb/windows-nat.h
gdb/xml-syscall.c
gdb/xstormy16-tdep.c
gdbserver/gdbreplay.cc
gdbserver/linux-arm-low.cc
gdbserver/proc-service.cc
gdbserver/remote-utils.cc
gdbsupport/buildargv.h
gdbsupport/common-types.h
gdbsupport/default-init-alloc.h
gdbsupport/event-loop.h
gdbsupport/filestuff.h
gdbsupport/format.h
gdbsupport/gdb-dlfcn.h
gdbsupport/gdb-hashtab.h
gdbsupport/gdb_file.h
gdbsupport/gdb_proc_service.h
gdbsupport/observable.h
gdbsupport/safe-iterator.h
gdbsupport/scoped_restore.h
gdbsupport/tdesc.h
gdbsupport/thread-pool.h