binutils-gdb/gdb/tui
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
..
ChangeLog-1998-2003
tui-command.c gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-command.h gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-data.c
tui-data.h
tui-disasm.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-disasm.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-file.c TUI stdout buffering cleanup 2022-08-31 11:03:40 -06:00
tui-file.h TUI stdout buffering cleanup 2022-08-31 11:03:40 -06:00
tui-hooks.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-hooks.h
tui-interp.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
tui-io.c Use checked_static_cast in more places 2022-09-12 14:25:06 -06:00
tui-io.h
tui-layout.c gdb/python: restrict the names accepted by gdb.register_window_type 2022-09-22 10:34:15 +01:00
tui-layout.h gdb/tui: support placing the cmd window into a horizontal layout 2022-04-03 15:31:47 +01:00
tui-location.c
tui-location.h
tui-out.c Remove tui_out_new 2022-08-31 11:03:40 -06:00
tui-out.h Remove tui_out_new 2022-08-31 11:03:40 -06:00
tui-regs.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-regs.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-source.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-source.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-stack.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-stack.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-win.c gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-win.h
tui-wingeneral.c
tui-wingeneral.h
tui-winsource.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui-winsource.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
tui.c gdb/tui: add a tui debugging flag 2022-04-03 15:31:46 +01:00
tui.h gdb/tui: add a tui debugging flag 2022-04-03 15:31:46 +01:00