binutils-gdb/gdb/dwarf2
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
..
abbrev-cache.c Introduce DWARF abbrev cache 2022-04-12 09:31:16 -06:00
abbrev-cache.h Add comments to dwarf2/abbrev-cache.h 2022-04-16 13:58:34 -06:00
abbrev.c Fix method naming bug in new DWARF indexer 2022-04-22 06:40:49 -06:00
abbrev.h Statically examine abbrev properties 2022-04-12 09:31:16 -06:00
attribute.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
attribute.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
comp-unit-head.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
comp-unit-head.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cooked-index.c [gdb/symtab] Add get/set functions for per_cu->lang/unit_type 2022-07-04 10:28:42 +02:00
cooked-index.h [gdb/symtab] Fix data race in cooked_index_functions::expand_symtabs_matching 2022-07-14 20:47:54 +02:00
cu.c gdb: remove TYPE_LENGTH 2022-09-21 11:05:21 -04:00
cu.h [gdb/symtab] Add dwarf2_cu::lang () 2022-07-12 17:12:17 +02:00
die.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
dwz.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
dwz.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
expr.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
expr.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
file-and-dir.h Add "fullname" handling to file_and_directory 2022-04-12 09:31:16 -06:00
frame-tailcall.c Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
frame-tailcall.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
frame.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
frame.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
index-cache.c Use gdb_bfd_ref_ptr in objfile 2022-08-03 13:26:58 -06:00
index-cache.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
index-common.c Add new overload of dwarf5_djb_hash 2022-04-12 09:31:16 -06:00
index-common.h Add new overload of dwarf5_djb_hash 2022-04-12 09:31:16 -06:00
index-write.c Change .gdb_index de-duplication implementation 2022-10-17 08:01:39 -06:00
index-write.h Rename write_psymtabs_to_index 2022-04-12 09:31:16 -06:00
leb.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
leb.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
line-header.c gdbsupport: change path_join parameter to array_view<const char *> 2022-09-21 11:36:01 -04:00
line-header.h gdb: add "id" fields to identify symtabs and subfiles 2022-07-29 20:54:49 -04:00
loc.c internal_error: remove need to pass __FILE__/__LINE__ 2022-10-19 15:32:36 +01:00
loc.h Change GDB to use frame_info_ptr 2022-10-10 11:57:10 +02:00
macro.c gdb/dwarf: pass a file_entry to line_header::file_file_name 2022-07-29 20:54:49 -04:00
macro.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
mapped-index.h Fix crash when creating index from index 2022-05-04 08:38:05 -06:00
public.h Always use dwarf2_initialize_objfile 2022-04-21 12:18:25 -06:00
read.c Remove a nullptr check in DWARF scanner 2022-10-17 12:59:10 -06:00
read.h [gdb/symtab] Add all_comp_units/all_type_units views on all_units 2022-09-22 14:50:27 +02:00
sect-names.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
section.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
section.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
stringify.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
stringify.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
tag.h Fix .debug_names regression with new indexer 2022-04-29 13:16:44 -06:00