binutils-gdb/gdb/arch
Pedro Alves f34652de0b internal_error: remove need to pass __FILE__/__LINE__
Currently, every internal_error call must be passed __FILE__/__LINE__
explicitly, like:

  internal_error (__FILE__, __LINE__, "foo %d", var);

The need to pass in explicit __FILE__/__LINE__ is there probably
because the function predates widespread and portable variadic macros
availability.  We can use variadic macros nowadays, and in fact, we
already use them in several places, including the related
gdb_assert_not_reached.

So this patch renames the internal_error function to something else,
and then reimplements internal_error as a variadic macro that expands
__FILE__/__LINE__ itself.

The result is that we now should call internal_error like so:

  internal_error ("foo %d", var);

Likewise for internal_warning.

The patch adjusts all calls sites.  99% of the adjustments were done
with a perl/sed script.

The non-mechanical changes are in gdbsupport/errors.h,
gdbsupport/gdb_assert.h, and gdb/gdbarch.py.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Ia6f372c11550ca876829e8fd85048f4502bdcf06
2022-10-19 15:32:36 +01:00
..
aarch32.c Add an arm-tls feature which includes the tpidruro register from CP15. 2022-05-03 16:05:10 -07:00
aarch32.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
aarch64-insn.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
aarch64-insn.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
aarch64-mte-linux.c [AArch64] MTE corefile support 2022-07-19 15:24:31 +01:00
aarch64-mte-linux.h [AArch64] MTE corefile support 2022-07-19 15:24:31 +01:00
aarch64.c Use aarch64_features to describe register features in target descriptions. 2022-05-18 13:32:04 -07:00
aarch64.h Tweak the std::hash<> specialization for aarch64_features. 2022-05-23 11:02:55 -07:00
amd64.c gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml 2022-03-31 10:25:26 -07:00
amd64.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arc.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arc.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-get-next-pcs.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-get-next-pcs.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-linux.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-linux.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
arm.h gdb/arm: Handle lazy FPU state preservation 2022-10-06 16:01:10 +02:00
csky.c gdb/csky add cskyv2-linux.xml for cskyv2-linux.c 2022-09-23 10:46:44 +08:00
csky.h gdbserver/csky add csky gdbserver support 2022-09-13 11:20:54 +08:00
i386.c gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml 2022-03-31 10:25:26 -07:00
i386.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
loongarch.c gdb: LoongArch: Add floating-point support 2022-07-12 20:14:48 +08:00
loongarch.h gdb/gdbserver: LoongArch: Improve implementation of fcc registers 2022-08-09 22:22:23 +08:00
ppc-linux-common.c Constify target_desc declarations 2022-09-29 10:00:13 -07:00
ppc-linux-common.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ppc-linux-tdesc.h Constify target_desc declarations 2022-09-29 10:00:13 -07:00
riscv.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
riscv.h gdb/riscv: better support for fflags and frm registers 2022-08-31 16:07:05 +01:00
tic6x.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
tic6x.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
xtensa.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00