aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-10 10:57:18 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-03-14 14:08:05 +0000
commit23bade95de322dead7fbd33368dce271c2911773 (patch)
tree68fa8454065e7ff994ef371c88c6705c6be9c578 /gdb/gdbarch.c
parentfb85cece22a2cb3c0185e61cfc1323e9c5a6466e (diff)
downloadfsf-binutils-gdb-23bade95de322dead7fbd33368dce271c2911773.zip
fsf-binutils-gdb-23bade95de322dead7fbd33368dce271c2911773.tar.gz
fsf-binutils-gdb-23bade95de322dead7fbd33368dce271c2911773.tar.bz2
gdb/gdbarch: remove the predicate function for gdbarch_register_type
I don't believe that the gdbarch_register_type_p predicate is called anywhere in GDB, and the gdbarch_register_type function is called without checking the gdbarch_register_type_p predicate function everywhere it is used, for example in init_regcache_descr (regcache.c). My claim is that the gdbarch_register_type function is required for every architecture, and GDB will not work if this function is not supplied. And so, in this commit, I remove the 'predicate=True' from gdbarch-components.py for the 'register_type' field, and regenerate the gdbarch files. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 55dd602..28e1fbc 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -443,7 +443,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
if (gdbarch->register_name == 0)
log.puts ("\n\tregister_name");
- /* Skip verify of register_type, has predicate. */
/* Skip verify of dummy_id, invalid_p == 0 */
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
/* Skip verify of push_dummy_call, has predicate. */
@@ -781,9 +780,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: register_name = <%s>\n",
host_address_to_string (gdbarch->register_name));
fprintf_filtered (file,
- "gdbarch_dump: gdbarch_register_type_p() = %d\n",
- gdbarch_register_type_p (gdbarch));
- fprintf_filtered (file,
"gdbarch_dump: register_type = <%s>\n",
host_address_to_string (gdbarch->register_type));
fprintf_filtered (file,
@@ -2219,13 +2215,6 @@ set_gdbarch_register_name (struct gdbarch *gdbarch,
gdbarch->register_name = register_name;
}
-bool
-gdbarch_register_type_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->register_type != NULL;
-}
-
struct type *
gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
{