mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
f34652de0b
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 |
||
---|---|---|
.. | ||
aarch32.c | ||
aarch32.h | ||
aarch64-insn.c | ||
aarch64-insn.h | ||
aarch64-mte-linux.c | ||
aarch64-mte-linux.h | ||
aarch64.c | ||
aarch64.h | ||
amd64.c | ||
amd64.h | ||
arc.c | ||
arc.h | ||
arm-get-next-pcs.c | ||
arm-get-next-pcs.h | ||
arm-linux.c | ||
arm-linux.h | ||
arm.c | ||
arm.h | ||
csky.c | ||
csky.h | ||
i386.c | ||
i386.h | ||
loongarch.c | ||
loongarch.h | ||
ppc-linux-common.c | ||
ppc-linux-common.h | ||
ppc-linux-tdesc.h | ||
riscv.c | ||
riscv.h | ||
tic6x.c | ||
tic6x.h | ||
xtensa.h |