This adjusts:
gdb.python/{py-framefilter-mi,py-framefilter}.c
to make them buildable as C++ programs.
gdb/testsuite/ChangeLog:
* gdb.python/py-framefilter-mi.c (funca): Add casts.
* gdb.python/py-framefilter.c.c (funca, func2): Add casts.
This adjusts:
gdb.base/{exprs,ptype,ptype1,setvar,whatis}.c,
to make them buildable as C++ programs.
gdb/testsuite/ChangeLog:
* gdb.base/exprs.c: Replace 'this' with 'self' throughout.
* gdb.base/ptype.c: : Replace 'this' with 'self' throughout.
(charfoo, intfoo): Define full prototype.
* gdb.base/ptype1.c (charfoo): Define full prototype.
* gdb.base/setvar.c: Replace 'this' with 'self' throughout.
* gdb.base/whatis.c: Replace 'this' with 'self' throughout.
Adjust gdb.base/charset.{c,exp} so that the testcase works when
compiled as a C++ program.
wchar_t is built-in in C++, so don't make a phony typedef.
The "print /d" is so that we also get "1" instead of "true" in C++
mode.
gdb/testsuite/ChangeLog:
* gdb.base/charset.c [__cplusplus] (wchar_t, char16_t, char32_t):
Don't define.
(utf_32_string): Compile for both C and C++.
* gdb.base/charset.exp: Use "print /d".
Adjust gdb.base/watchpoint.c so that it can be built as a C++ program.
Fixes:
gdb compile failed, src/gdb/testsuite/gdb.base/watchpoint.c:33:16: error: initializer-string for array of chars is too long [-fpermissive]
33 | char buf[30] = "testtesttesttesttesttesttestte";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gdb/testsuite/gdb.base/watchpoint.c:62:14: error: expected unqualified-id before 'nullptr'
62 | struct foo5 *nullptr;
| ^~~~~~~
gdb/testsuite/ChangeLog:
* gdb.base/watchpoint.c (buf): Make it 31 bytes.
(nullptr): Rename to ...
(null_ptr): ... this.
* gdb.base/watchpoint.exp: Adjust to rename.
Adjust gdb.base/printcmds.c to make it buildable as a C++ program.
gdb/testsuite/ChangeLog:
* gdb.base/printcmds.c (three, flag_enum_without_zero)
(three_not_flag): Add casts.
Adjust gdb.base/examine-backward.exp to let the testcase build and run
as a C++ program, built with either G++ or Clang++.
The change to use unsigned char instead of plain char is to avoid
narrowing warnings:
gdb compile failed, src/gdb/testsuite/gdb.base/examine-backward.c:55:1: error: narrowing conversion of '227' from 'int' to 'char' [-Wnarrowing]
55 | };
| ^
gdb/testsuite/ChangeLog:
* gdb.base/examine-backward.c (Barrier, TestStrings): Now unsigned
char array.
(main): Add references to Barrier, TestStrings, TestStringsH and
TestStringsW.
* gdb.base/examine-backward.exp: Issue "set print asm-demangle on"
and expect a full prototype in C++.
Adjust gdb.base/nested-addr.exp to let the testcase build and run as a
C++ program. "print /d" is used so we get "= 1" instead of "= true"
in C++ mode.
gdb/testsuite/ChangeLog:
* gdb.base/nested-addr.c (main): Add cast.
* gdb.base/nested-addr.exp: Use "print /d".
Some adjustments to make gdb.base/break.exp work when compiled as a
C++ program. Passes cleanly with Clang++, but not with G++. The
latter puts a breakpoint at an unexpected line in one case. It seems
like a bug that gcc and g++ behave differently here.
gdb/testsuite/ChangeLog:
* gdb.base/break.exp (func): New. Use it throughout when
expecting a function name.
This makes the testcase work when compiled with C++ compiler.
We need #include <string.h> for memset.
gdb/testsuite/ChangeLog:
* gdb.base/find.c: Include <string.h>.
(init_bufs): Add cast.
* gdb.base/find.exp: Issue "set print asm-demangle on".
While working on something else, I noticed that tdesc_data_cleanup
took a void* parameter. Looking more into this, I found that
tdesc_use_registers expected a transfer of ownership.
I think it's better to express this sort of thing via the type system,
when possible. This patch changes tdesc_data_alloc to return a unique
pointer, changes tdesc_use_registers to accept an rvalue reference,
and then adapts all the users.
Note that a deleter structure is introduced to avoid having to move
tdesc_arch_data to the header file.
2020-09-17 Tom Tromey <tromey@adacore.com>
* tic6x-tdep.c (tic6x_gdbarch_init): Update.
* target-descriptions.h (struct tdesc_arch_data_deleter): New.
(tdesc_arch_data_up): New typedef.
(tdesc_use_registers, tdesc_data_alloc): Update.
(tdesc_data_cleanup): Don't declare.
* target-descriptions.c (tdesc_data_alloc): Return a
tdesc_arch_data_up.
(tdesc_arch_data_deleter::operator()): Rename from
tdesc_data_cleanup. Change argument type.
(tdesc_use_registers): Change early_data to an rvalue reference.
(tdesc_use_registers): Don't use delete.
* sparc-tdep.c (sparc32_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rx-tdep.c (rx_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* riscv-tdep.c (riscv_gdbarch_init): Update.
* or1k-tdep.c (or1k_gdbarch_init): Update.
* nios2-tdep.c (nios2_gdbarch_init): Update.
* nds32-tdep.c (nds32_gdbarch_init): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* microblaze-tdep.c (microblaze_gdbarch_init): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
* i386-tdep.c (i386_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* arc-tdep.c (arc_tdesc_init): Update.
(arc_gdbarch_init): Update.
* aarch64-tdep.c (aarch64_gdbarch_init): Update.
DebugBreakProcess starts a new thread in the target process with the
entry point DbgUiRemoteBreakin, where an int3 triggers a breakpoint
exception for gdb.
But this uses DbgUiRemoteBreakin of the 64bit ntdll.dll even for
WOW64 processes.
It stops in 64bit code, Wow64GetThreadContext reports a wrong pc without
the int3, and gdb lets the target process continue.
So this uses DbgUiRemoteBreakin of the 32bit ntdll.dll as the thread
entry point for WOW64 processes instead.
gdb/ChangeLog:
2020-09-17 Hannes Domani <ssbssa@yahoo.de>
* windows-nat.c (ctrl_c_handler): Use 32bit DbgUiRemoteBreakin
for WOW64 processes.
This changes dwarf2/read.c to use htab_up rather than explicit calls
to htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (compute_compunit_symtab_includes): Use htab_up.
This changes typedef_hash_table to use htab_up rather than explicit
calls to htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* typeprint.h (class typedef_hash_table) <~typedef_hash_table>:
Remove.
<m_table>: Now htab_up.
* typeprint.c (typedef_hash_table::recursively_update)
(typedef_hash_table::add_template_parameters)
(typedef_hash_table::typedef_hash_table): Update.
(typedef_hash_table::~typedef_hash_table): Remove.
(typedef_hash_table::typedef_hash_table)
(typedef_hash_table::find_global_typedef)
(typedef_hash_table::find_typedef): Update.
This changes target-descriptions.c to use htab_up rather than explicit
calls to htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* target-descriptions.c (tdesc_use_registers): Use htab_up.
This changes linespec.c to use htab_up rather than explicit calls to
htab_delete. Note that a use still exists in this file, because
linespec_state hasn't been converted to have a real destructor.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* linespec.c (class decode_compound_collector)
<~decode_compound_collector>: Remove.
<m_unique_syms>: Now htab_up.
(decode_compound_collector::operator ()): Update.
(class symtab_collector) <~symtab_collector>: Remove.
<m_symtab_table>: Now htab_up.
(symtab_collector::operator ()): Update.
This changes filename_seen_cache to use htab_up, rather than explicit
calls to htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* filename-seen-cache.c (filename_seen_cache::filename_seen_cache)
(filename_seen_cache::clear): Update.
(~filename_seen_cache): Remove.
(filename_seen_cache::seen): Update.
* filename-seen-cache.h (class filename_seen_cache) <m_tab>: Now
htab_up.
<~filename_seen_cache>: Remove.
<traverse>: Update.
This changes completion_tracker to use htab_up, rather than explicit
calls to htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* completer.c (completion_tracker::discard_completions)
(completion_tracker::~completion_tracker)
(completion_tracker::maybe_add_completion)
(completion_tracker::remove_completion)
(completion_tracker::recompute_lowest_common_denominator)
(completion_tracker::build_completion_result): Update.
* completer.h (class completion_tracker) <have_completions>:
Update.
<m_entries_hash>: Now htab_up.
This changes breakpoint.c to use htab_up rather than an explicit
htab_delete. This simplifies the code somewhat.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* breakpoint.c (ambiguous_names_p): Use htab_up.
This changes auto-load.c to use htab_up, rather than manually calling
htab_delete.
gdb/ChangeLog
2020-09-17 Tom Tromey <tom@tromey.com>
* auto-load.c (struct auto_load_pspace_info)
<~auto_load_pspace_info, auto_load_pspace_info>: Remove.
<loaded_script_files, loaded_script_texts>: Change type to
htab_up.
(~auto_load_pspace_info) Remove.
(init_loaded_scripts_info, maybe_add_script_file)
(maybe_add_script_text, auto_load_info_scripts): Update.
c-exp.y:name_obstack is not static, but should be. This patch makes
the change. Tested by rebuilding.
gdb/ChangeLog
2020-09-17 Tom Tromey <tromey@adacore.com>
* c-exp.y (name_obstack): Now static.
The decode of c.sdsp was incorrectly claiming to be a 4-byte store
instead of an 8-byte store.
gdb/ChangeLog:
* riscv-tdep.c (riscv-insn::decode): Fix recorded insn type.
The disassembler function should return a valid disassembler function
even when there is no BFD present. This is implied (I believe) by the
comment in dis-asm.h which says the BFD may be NULL. Further, it
makes sense when considering that the disassembler is used in GDB, and
GDB may connect to a target and perform debugging even without a BFD
being supplied.
This commit makes the csky_get_disassembler function return the
default disassembler configuration when no bfd is supplied, this is
the same default configuration as is used when a BFD is supplied, but
the BFD has no attributes section.
Before the change configuring GDB with --enable-targets=all and
running the tests gdb.base/all-architectures-2.exp results in many
errors, but after this change there are no failures.
opcodes/ChangeLog:
* csky-dis.c (csky_get_disassembler): Don't return NULL when there
is no BFD.
Use bool instead of int in struct solib_catchpoint and in init_catchpoint &
related functions.
gdb/ChangeLog:
* breakpoint.h (init_catchpoint): Change int parameter to bool.
(add_solib_catchpoint): Likewise.
* breakpoint.c (struct solib_catchpoint) <is_load>: Change type
to bool.
(add_solib_catchpoint): Change int parameter/variable to bool.
(catch_load_or_unload): Likewise.
(init_catchpoint): Likewise.
(create_fork_vfork_event_catchpoint): Likewise.
(catch_fork_command_1): Likewise.
(catch_exec_command_1): Likewise.
Change-Id: I1faf4506e9109f3ccdd7229ba766dc7d77aa7aa0
Commit 314ad88df6 ("Use type_instance_flags more throughout") changed
the name of field type::instance_flags to type::m_instance_flags. It
however missed changing it in the gdb-gdb.py.in file, which results in
this when trying to use the pretty-printer:
(top-gdb) p *val.type
Traceback (most recent call last):
File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 116, in to_string
% TypeFlagsPrinter(self.val['instance_flags']))
File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 76, in __str__
flag_list = [flag.short_name for flag in TYPE_FLAGS
File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 77, in <listcomp>
if self.val & flag.value]
gdb.error: Argument to arithmetic operation not a number or boolean.
$7 =
This patch fixes it.
gdb/ChangeLog:
* gdb-gdb.py.in (class StructTypePrettyPrinter) <to_string>:
Change instance_flags to m_instance_flags.
Change-Id: Ib5e03c08fe41ca11cd71998f2b1c58052879ce95
PR gdb/26598 notes that, before commit bcfe6157ca ("Use the linkage
name if it exists"), the "skip" command would match the demangled name
of a symbol, but now only matches the linkage name.
This patch fixes this regression. I looked at all calls to
function_name_is_marked_for_skip, and only one used the linkage name.
2020-09-16 Tom Tromey <tromey@adacore.com>
PR gdb/26598:
* infrun.c (fill_in_stop_func): Use find_pc_partial_function_sym.
gdb/testsuite/ChangeLog
2020-09-16 Tom Tromey <tromey@adacore.com>
PR gdb/26598:
* gdb.base/skipcxx.exp: New file.
* gdb.base/skipcxx.cc: New file.
FreeBSD kernels have reported exec events via the PL_FLAG_EXEC flag
since 8.2 release. The most recent release that did not support this
flag is 7.4 released in November of 2011.
Note that the FreeBSD native target already assumed that PL_FLAG_SCE
and PL_FLAG_SCX were always supported on systems supporting
PT_LWPINFO, but those flags were added at the same time as
PL_FLAG_EXEC. Building the native target on a system without
PL_FLAG_EXEC would have failed to build before this change already as
a result.
gdb/ChangeLog:
* fbsd-nat.c (fbsd_nat_target::wait): Always check for
PL_FLAG_EXEC.
(fbsd_nat_target::insert_exec_catchpoint)
(fbsd_nat_target::remove_exec_catchpoint): Always define.
* fbsd-nat.h (fbsd_nat_target::insert_exec_catchpoint)
(fbsd_nat_target::remove_exec_catchpoint): Always declare.
FreeBSD systems have provided these functions in libutil since 7.1
release. The most recent release without support is 6.4 released in
November of 2008.
This also requires libutil-freebsd on GNU/kFreeBSD systems. I assume
that those systems have supported kinfo_get_file and kinfo_get_vmmap
over a similar timeframe.
gdb/ChangeLog:
* configure.ac: Remove check for kinfo_getvmmap().
* configure, config.in: Regenerate.
* fbsd-nat.c (fbsd_read_mapping): Remove
(fbsd_nat_target::find_memory_regions): Remove the procfs version.
(fbsd_nat_target::info_proc): Assume kinfo_getfile() and
kinfo_get_vmmap() are always present.
gdbsupport/ChangeLog:
* common.m4 (GDB_AC_COMMON): Refactor checks for kinfo_getfile().
* configure, config.in: Regenerate.
The current layout of siginfo_t and support for fetching it has been
included in FreeBSD kernels since 7.0 release. The most recent
release without support is 6.4 released in November of 2008.
gdb/ChangeLog:
* fbsd-nat.c: Always include support for
TARGET_OBJECT_SIGNAL_INFO.
FreeBSD kernels have included this sysctl since 6.0 release. The most
recent release without support is 5.5 which was released in May of
2006.
Both the sysctl and the /proc/<pid>/exe file call the same function in
the kernel to obtain the path (vn_fullpath). If the sysctl fails, the
readlink call will also fail, so there is no need to keep the readlink
fallback.
gdb/ChangeLog:
* fbsd-nat.c (fbsd_nat_target::pid_to_exec_file): Always use
sysctl and remove procfs fallback.
FreeBSD kernels have included support for this since 5.0 release.
The most recent release without support is 4.11 which was released
in January of 2005.
gdb/ChangeLog:
* fbsd-nat.c: Assume PT_LWPINFO is always defined.
* fbsd-nat.h: Likewise.
On ppc64, we run into:
...
/tmp/ccKXURmw.s: Assembler messages:^M
/tmp/ccKXURmw.s:99: Error: can't resolve \
`_Dmain_end' {.text section} - `_Dmain' {.opd section}^M
compiler exited with status 1
...
The unresolvable entity comes from the .debug_aranges section hardcoded in
watch-loc.c:
...
" .4byte _Dmain \n" // Address
" .4byte _Dmain_end - _Dmain \n" // Length
...
where _Dmain is the function label for function _Dmain, and _Dmain_end is a
label after function _Dmain:
...
int _Dmain (void)
{
asm ("_Dmain_label: .globl _Dmain_label");
return 0;
}
asm ("_Dmain_end: .globl _Dmain_end");
...
The problem is that the two labels are not in the same section, because _Dmain
ends up in the .opd section, which "contains the official procedure
descriptors. A pointer to a function shall reference a procedure descriptor in
this section."
Fix this by using function_range instead to get the length.
Also, fix the address part to not use _Dmain, but instead use the function
start as returned by function_range.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-09-16 Tom de Vries <tdevries@suse.de>
PR testsuite/26617
* gdb.dlang/watch-loc.c: Only add .debug_aranges if
WITH_DEBUG_SECTIONS is defined.
(xstr, str): New macro.
(.debug_aranges): Use DMAIN_START_0/1/2 and DMAIN_LENGTH
to get start and size of _Dmain.
* gdb.dlang/watch-loc.exp: Pass DMAIN_START_0/1/2 and DMAIN_LENGTH
using additional_flags.
When GDB reads commands from the input, its internal buffer is re-used
for each line. This is usually just fine because commands are
executed in order; by the time we read the next line, we are already
done with the current line. However, a problematic case is breakpoint
commands that are input from a script. The header (e.g. commands 1 2)
is overwritten with the next line before the breakpoint numbers are
processed completely.
For example, suppose we have the following script:
break main
break main
commands 1 2
print 100123
end
and source this script:
(gdb) source script.gdb
Breakpoint 1 at 0x1245: file main.cpp, line 27.
Breakpoint 2 at 0x1245: file main.cpp, line 27.
No breakpoint number 123.
Note the "No breakpoint number 123." error message. This happens
because GDB first reads "commands 1 2" into its internal buffer
buffer -> "commands 1 2"
and then starts parsing the breakpoint numbers. After parsing the first
token, the "next token" pointer is as below:
buffer -> "commands 1 2"
next-token -----------^
So, if we continue parsing, we would tokenize "2" correctly. However,
before parsing the next number, GDB reads the commands to attach them
to breakpoint 1. Reading the commands causes the buffer to be
overwritten:
buffer -> " print 100123"
next-token -----------^
So, the next time we parse the breakpoint number, we read "123".
To fix, simply create a copy of the arguments of the header.
gdb/ChangeLog:
2020-09-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* breakpoint.c (commands_command_1): Make a copy of the 'arg'
argument.
gdb/testsuite/ChangeLog:
2020-09-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.base/bp-cmds-sourced-script.c: New file.
* gdb.base/bp-cmds-sourced-script.exp: New test.
* gdb.base/bp-cmds-sourced-script.gdb: New file.
With this gdbserver-support.exp patch:
...
@@ -451,8 +451,10 @@ proc gdbserver_exit { is_mi } {
# We use expect rather than gdb_expect because
# we want to suppress printing exception messages, otherwise,
# remote_expect, invoked by gdb_expect, prints the exceptions.
+ set have_prompt 0
expect {
-i "$gdb_spawn_id" -re "$gdb_prompt $" {
+ set have_prompt 1
exp_continue
}
-i "$server_spawn_id" eof {
@@ -463,6 +465,7 @@ proc gdbserver_exit { is_mi } {
warning "Timed out waiting for EOF in server after $monitor_exit"
}
}
+ gdb_assert {$have_prompt}
}
}
close_gdbserver
...
and with this in parallel:
...
$ stress -c 5
...
we run into this and similar FAILs:
...
FAIL: gdb.multi/multi-target.exp: continue: non-stop=on: $have_prompt
...
In more detail:
...
(gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=on: inferior 5
Remote debugging from host ::1, port 40712^M
Process build/gdb/testsuite/outputs/gdb.multi/multi-target/multi-target \
created; pid = 11098^M
monitor exit^M
Killing process(es): 11098^M
FAIL: gdb.multi/multi-target.exp: continue: non-stop=on: $have_prompt
spawn build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory \
build/gdb/testsuite/../data-directory^M
...
After issuing a "monitor exit" command, we should always get a prompt back, so
check for that.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-09-16 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdbserver_exit): Make sure we
get the gdb prompt after issuing "monitor exit".
When running test-case gdb.base/watchpoint-stops-at-right-insn.exp, we may run
into a tcl error, which can be reproduced reliably using this trigger patch:
...
+ set hw_watch_pc ""
gdb_assert {$sw_watch_pc == $hw_watch_pc} \
"hw watchpoint stops at right instruction"
...
such that we have:
...
ERROR: tcl error sourcing watchpoint-stops-at-right-insn.exp.
ERROR: missing operand at _@_
in expression "0x4004b7 == _@_"
(parsing expression "0x4004b7 == ")
invoked from within
"expr $sw_watch_pc == $hw_watch_pc"
("uplevel" body line 1)
invoked from within
"uplevel 1 expr $condition"
(procedure "gdb_assert" line 6)
invoked from within
"gdb_assert {$sw_watch_pc == $hw_watch_pc} \
"hw watchpoint stops at right instruction""
...
A similar problem was fixed in commit 5f0e2eb79e "GDB/testsuite: Fix a
catastrophic step-over-no-symbols.exp failure", by making the assert condition
more robust:
...
- gdb_assert {$before_addr != $after_addr} "advanced"
+ gdb_assert {{[string is integer -strict $before_addr] \
+ && [string is integer -strict $after_addr] \
+ && $before_addr != $after_addr}} "advanced"
...
Fix this instead in gdb_assert, by catching errors while evaluating the assert
condition.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-09-16 Tom de Vries <tdevries@suse.de>
PR testsuite/26624
* lib/gdb.exp (gdb_assert): Catch errors in condition evaluation.
The language_data type, from which language_defn inherits, is now
empty, and this commit removes it.
Each language is updated to no longer create and use a language_data
struct.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_language_data): Delete.
(ada_language): Remove references to ada_language_data.
* c-lang.c (c_language_data): Delete.
(c_language): Remove references to c_language_data.
(cplus_language_data): Delete.
(cplus_language): Remove references to cplus_language_data.
(asm_language_data): Delete.
(asm_language): Remove references to asm_language_data.
(minimal_language_data): Delete.
(minimal_language): Remove references to minimal_language_data.
* d-lang.c (d_language_data): Delete.
(d_language): Remove references to d_language_data.
* f-lang.c (f_language_data): Delete.
(f_language): Remove references to f_language_data.
* go-lang.c (go_language_data): Delete.
(go_language): Remove references to go_language_data.
* language.c (unknown_language_data): Delete.
(unknown_language): Remove references to unknown_language_data.
(auto_language_data): Delete.
(auto_language): Remove references to auto_language_data.
* language.h (language_data): Delete struct.
(language_defn): No longer inherit from language_data.
* m2-lang.c (m2_language_data): Delete.
(m2_language): Remove references to m2_language_data.
* objc-lang.c (objc_language_data): Delete.
(objc_language): Remove references to objc_language_data.
* opencl-lang.c (opencl_language_data): Delete.
(opencl_language): Remove references to opencl_language_data.
* p-lang.c (pascal_language_data): Delete.
(pascal_language): Remove references to pascal_language_data.
* rust-lang.c (rust_language_data): Delete.
(rust_language): Remove references to rust_language_data.
Convert language_data::la_op_print_tab member variable to a virtual
method language_defn::opcode_print_table. I changed the name in order
to make it clearer (I hope) what the method does.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_language_data): Remove la_op_print_tab
initializer.
(ada_language::opcode_print_table): New member function.
* c-lang.c (c_language_data): Remove la_op_print_tab initializer.
(c_language::opcode_print_table): New member function.
(cplus_language_data): Remove la_op_print_tab initializer.
(cplus_language::opcode_print_table): New member function.
(asm_language_data): Remove la_op_print_tab initializer.
(asm_language::opcode_print_table): New member function.
(minimal_language_data): Remove la_op_print_tab initializer.
(minimal_language::opcode_print_table): New member function.
* d-lang.c (d_language_data): Remove la_op_print_tab initializer.
(d_language::opcode_print_table): New member function.
* expprint.c (print_subexp_standard): Update call to
opcode_print_table.
(op_string): Likewise.
* f-lang.c (f_language_data): Remove la_op_print_tab initializer.
(f_language::opcode_print_table): New member function.
* go-lang.c (go_language_data): Remove la_op_print_tab
initializer.
(go_language::opcode_print_table): New member function.
* language.c (unknown_language_data): Remove la_op_print_tab
initializer.
(unknown_language::opcode_print_table): New member function.
(auto_language_data): Remove la_op_print_tab initializer.
(auto_language::opcode_print_table): New member function.
* language.h (language_data): Remove la_op_print_tab field.
(language_defn::opcode_print_table): Declare new member function.
* m2-lang.c (m2_language_data): Remove la_op_print_tab
initializer.
(m2_language::opcode_print_table): New member function.
* objc-lang.c (objc_language_data): Remove la_op_print_tab
initializer.
(objc_language::opcode_print_table): New member function.
* opencl-lang.c (opencl_language_data): Remove la_op_print_tab
initializer.
(opencl_language::opcode_print_table): New member function.
* p-lang.c (pascal_language_data): Remove la_op_print_tab
initializer.
(pascal_language::opcode_print_table): New member function.
* rust-lang.c (rust_language_data): Remove la_op_print_tab
initializer.
(rust_language::opcode_print_table): New member function.
Convert language_data::la_exp_desc member variable to a virtual
method language_defn::expression_ops. The change of names brings this
method more into line with the existing varobj_ops method, that also
returns a table of function pointers.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_language_data): Remove la_exp_desc initializer.
(ada_language::expression_ops): New member function.
* c-lang.c (c_language_data): Remove la_exp_desc initializer.
(c_language::expression_ops): New member function.
(cplus_language_data): Remove la_exp_desc initializer.
(cplus_language::expression_ops): New member function.
(asm_language_data): Remove la_exp_desc initializer.
(asm_language::expression_ops): New member function.
(minimal_language_data): Remove la_exp_desc initializer.
(minimal_language::expression_ops): New member function.
* d-lang.c (d_language_data): Remove la_exp_desc initializer.
(d_language::expression_ops): New member function.
* eval.c (evaluate_subexp): Update call to expression_ops.
* expprint.c (print_subexp): Likewise.
(op_name): Likewise.
(dump_subexp_body): Likewise.
* f-lang.c (f_language_data): Remove la_exp_desc initializer.
(f_language::expression_ops): New member function.
* go-lang.c (go_language_data): Remove la_exp_desc initializer.
(go_language::expression_ops): New member function.
* language.c (language_defn::expression_ops): New function.
(unknown_language_data): Remove la_exp_desc initializer.
(auto_language_data): Likewise.
* language.h (language_data): Remove la_exp_desc field.
(language_defn::expression_ops): Declare new member function.
* m2-lang.c (m2_language_data): Remove la_exp_desc initializer.
(m2_language::expression_ops): New member function.
* objc-lang.c (objc_language_data): Remove la_exp_desc
initializer.
* opencl-lang.c (opencl_language_data): Remove la_exp_desc
initializer.
(opencl_language::expression_ops): New member function.
* p-lang.c (pascal_language_data): Remove la_exp_desc initializer.
* parse.c (operator_length): Update call to expression_ops.
(exp_iterate): Likewise.
* rust-lang.c (rust_language_data): Remove la_exp_desc
initializer.
(ruse_language::expression_ops): New member function.
Convert language_data::la_macro_expansion member variable to a virtual
method language_defn::macro_expansion.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_language_data): Remove la_macro_expansion
initializer.
* c-lang.c (c_language_data): Likewise.
(c_language::macro_expansion): New member function.
(cplus_language_data): Likewise.
(cplus_language::macro_expansion): New member function.
(asm_language_data): Likewise.
(asm_language::macro_expansion): New member function.
(minimal_language_data): Likewise.
(minimal_language::macro_expansion): New member function.
* d-lang.c (d_language_data): Remove la_macro_expansion
initializer.
* f-lang.c (f_language_data): Likewise.
* go-lang.c (go_language_data): Likewise.
* language.c (unknown_language_data): Likewise.
(auto_language_data): Likewise.
* language.h (language_data): Remove la_macro_expansion field.
(language_defn::macro_expansion): New member function.
* m2-lang.c (m2_language_data): Remove la_macro_expansion
initializer.
* objc-lang.c (objc_language_data): Likewise.
(objc_language::macro_expansion): New member function.
* opencl-lang.c (opencl_language_data): Likewise.
(opencl_language::macro_expansion): New member function.
* p-lang.c (pascal_language_data): Remove la_macro_expansion
initializer.
* rust-lang.c (rust_language_data): Likewise.
* symtab.c (default_collect_symbol_completion_matches_break_on):
Update call to macro_expansion.