diff options
author | Tom Tromey <tom@tromey.com> | 2022-07-31 10:44:01 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-08-16 07:29:46 -0600 |
commit | ec29a63c80602056bfc8533d230394d0db14b982 (patch) | |
tree | e16e0f1a660105aaf314af59dbedf05042917743 /gdb | |
parent | 45d92439aebd0386ef8af76e1796d08cfe457e1d (diff) | |
download | gdb-ec29a63c80602056bfc8533d230394d0db14b982.zip gdb-ec29a63c80602056bfc8533d230394d0db14b982.tar.gz gdb-ec29a63c80602056bfc8533d230394d0db14b982.tar.bz2 |
Remove register_gdbarch_init
This removes the deprecated register_gdbarch_init in favor a default
argument to gdbarch_register. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/arch-utils.c | 10 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 | ||||
-rw-r--r-- | gdb/bfin-tdep.c | 2 | ||||
-rw-r--r-- | gdb/bpf-tdep.c | 2 | ||||
-rw-r--r-- | gdb/csky-tdep.c | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ft32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.h | 7 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 2 | ||||
-rw-r--r-- | gdb/iq2000-tdep.c | 2 | ||||
-rw-r--r-- | gdb/lm32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m32r-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 4 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 2 | ||||
-rw-r--r-- | gdb/microblaze-tdep.c | 2 | ||||
-rw-r--r-- | gdb/moxie-tdep.c | 2 | ||||
-rw-r--r-- | gdb/msp430-tdep.c | 2 | ||||
-rw-r--r-- | gdb/nds32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rl78-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rx-tdep.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 2 | ||||
-rw-r--r-- | gdb/tic6x-tdep.c | 2 | ||||
-rw-r--r-- | gdb/tilegx-tdep.c | 2 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 4 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 | ||||
-rw-r--r-- | gdb/z80-tdep.c | 2 |
29 files changed, 32 insertions, 43 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 9c6b926..9bd4f0d 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -1277,7 +1277,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture, } /* log it */ if (gdbarch_debug) - gdb_printf (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", + gdb_printf (gdb_stdlog, "gdbarch_register (%s, %s)\n", bfd_arch_info->printable_name, host_address_to_string (init)); /* Append it */ @@ -1289,14 +1289,6 @@ gdbarch_register (enum bfd_architecture bfd_architecture, (*curr)->next = NULL; } -void -register_gdbarch_init (enum bfd_architecture bfd_architecture, - gdbarch_init_ftype *init) -{ - gdbarch_register (bfd_architecture, init, NULL); -} - - /* Look for an architecture using gdbarch_info. */ struct gdbarch_list * diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 357f5bb..693d563 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1633,7 +1633,7 @@ void _initialize_avr_tdep (); void _initialize_avr_tdep () { - register_gdbarch_init (bfd_arch_avr, avr_gdbarch_init); + gdbarch_register (bfd_arch_avr, avr_gdbarch_init); /* Add a new command to allow the user to query the avr remote target for the values of the io space registers in a saner way than just using diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index f232e22..3e801a9 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -842,5 +842,5 @@ void _initialize_bfin_tdep (); void _initialize_bfin_tdep () { - register_gdbarch_init (bfd_arch_bfin, bfin_gdbarch_init); + gdbarch_register (bfd_arch_bfin, bfin_gdbarch_init); } diff --git a/gdb/bpf-tdep.c b/gdb/bpf-tdep.c index a5df478..4c08509 100644 --- a/gdb/bpf-tdep.c +++ b/gdb/bpf-tdep.c @@ -374,7 +374,7 @@ void _initialize_bpf_tdep (); void _initialize_bpf_tdep () { - register_gdbarch_init (bfd_arch_bpf, bpf_gdbarch_init); + gdbarch_register (bfd_arch_bpf, bpf_gdbarch_init); /* Add commands 'set/show debug bpf'. */ add_setshow_zuinteger_cmd ("bpf", class_maintenance, diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index 01d4a0f..ba53c1b 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -3053,7 +3053,7 @@ void _initialize_csky_tdep () { - register_gdbarch_init (bfd_arch_csky, csky_gdbarch_init); + gdbarch_register (bfd_arch_csky, csky_gdbarch_init); csky_init_reggroup (); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 55a6cfd..8029080 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1575,5 +1575,5 @@ void _initialize_frv_tdep (); void _initialize_frv_tdep () { - register_gdbarch_init (bfd_arch_frv, frv_gdbarch_init); + gdbarch_register (bfd_arch_frv, frv_gdbarch_init); } diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 024ca47..500c691 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -625,5 +625,5 @@ void _initialize_ft32_tdep (); void _initialize_ft32_tdep () { - register_gdbarch_init (bfd_arch_ft32, ft32_gdbarch_init); + gdbarch_register (bfd_arch_ft32, ft32_gdbarch_init); } diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 2c431a3..9ac4181 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -271,12 +271,9 @@ struct gdbarch_info typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); -/* DEPRECATED - use gdbarch_register() */ -extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); - extern void gdbarch_register (enum bfd_architecture architecture, - gdbarch_init_ftype *, - gdbarch_dump_tdep_ftype *); + gdbarch_init_ftype *init, + gdbarch_dump_tdep_ftype *dump_tdep = nullptr); /* Return a vector of the valid architecture names. Since architectures are diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index c4d9824..d453fce 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1383,7 +1383,7 @@ void _initialize_h8300_tdep (); void _initialize_h8300_tdep () { - register_gdbarch_init (bfd_arch_h8300, h8300_gdbarch_init); + gdbarch_register (bfd_arch_h8300, h8300_gdbarch_init); } static int diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index d8e910b..c652fb9 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -9071,7 +9071,7 @@ void _initialize_i386_tdep (); void _initialize_i386_tdep () { - register_gdbarch_init (bfd_arch_i386, i386_gdbarch_init); + gdbarch_register (bfd_arch_i386, i386_gdbarch_init); /* Add the variable that controls the disassembly flavor. */ add_setshow_enum_cmd ("disassembly-flavor", no_class, valid_flavors, diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c index 42fcc46..e5fe1c6 100644 --- a/gdb/iq2000-tdep.c +++ b/gdb/iq2000-tdep.c @@ -844,5 +844,5 @@ void _initialize_iq2000_tdep (); void _initialize_iq2000_tdep () { - register_gdbarch_init (bfd_arch_iq2000, iq2000_gdbarch_init); + gdbarch_register (bfd_arch_iq2000, iq2000_gdbarch_init); } diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index 4cbff53..af32251 100644 --- a/gdb/lm32-tdep.c +++ b/gdb/lm32-tdep.c @@ -539,5 +539,5 @@ void _initialize_lm32_tdep (); void _initialize_lm32_tdep () { - register_gdbarch_init (bfd_arch_lm32, lm32_gdbarch_init); + gdbarch_register (bfd_arch_lm32, lm32_gdbarch_init); } diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 30f716b..83b7432 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -2658,7 +2658,7 @@ void _initialize_m32c_tdep (); void _initialize_m32c_tdep () { - register_gdbarch_init (bfd_arch_m32c, m32c_gdbarch_init); + gdbarch_register (bfd_arch_m32c, m32c_gdbarch_init); m32c_dma_reggroup = reggroup_new ("dma", USER_REGGROUP); } diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 3ad4c8d..7edbd50 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -916,5 +916,5 @@ void _initialize_m32r_tdep (); void _initialize_m32r_tdep () { - register_gdbarch_init (bfd_arch_m32r, m32r_gdbarch_init); + gdbarch_register (bfd_arch_m32r, m32r_gdbarch_init); } diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 7ea1f9a..53b7752 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1533,8 +1533,8 @@ void _initialize_m68hc11_tdep (); void _initialize_m68hc11_tdep () { - register_gdbarch_init (bfd_arch_m68hc11, m68hc11_gdbarch_init); - register_gdbarch_init (bfd_arch_m68hc12, m68hc11_gdbarch_init); + gdbarch_register (bfd_arch_m68hc11, m68hc11_gdbarch_init); + gdbarch_register (bfd_arch_m68hc12, m68hc11_gdbarch_init); m68hc11_init_reggroups (); } diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 170b4b0..66b7656 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -2463,7 +2463,7 @@ _initialize_mep_tdep () mep_cr_reggroup = reggroup_new ("cr", USER_REGGROUP); mep_ccr_reggroup = reggroup_new ("ccr", USER_REGGROUP); - register_gdbarch_init (bfd_arch_mep, mep_gdbarch_init); + gdbarch_register (bfd_arch_mep, mep_gdbarch_init); mep_init_pseudoregister_maps (); } diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 3d5dd66..3525453 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -742,7 +742,7 @@ void _initialize_microblaze_tdep (); void _initialize_microblaze_tdep () { - register_gdbarch_init (bfd_arch_microblaze, microblaze_gdbarch_init); + gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); initialize_tdesc_microblaze_with_stack_protect (); initialize_tdesc_microblaze (); diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index f5cf501..77e1c33 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -1108,5 +1108,5 @@ void _initialize_moxie_tdep (); void _initialize_moxie_tdep () { - register_gdbarch_init (bfd_arch_moxie, moxie_gdbarch_init); + gdbarch_register (bfd_arch_moxie, moxie_gdbarch_init); } diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index cf4106d..35bea09 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -996,5 +996,5 @@ void _initialize_msp430_tdep (); void _initialize_msp430_tdep () { - register_gdbarch_init (bfd_arch_msp430, msp430_gdbarch_init); + gdbarch_register (bfd_arch_msp430, msp430_gdbarch_init); } diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index 11bfd2d..5b55523 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -2093,7 +2093,7 @@ void _initialize_nds32_tdep () { /* Initialize gdbarch. */ - register_gdbarch_init (bfd_arch_nds32, nds32_gdbarch_init); + gdbarch_register (bfd_arch_nds32, nds32_gdbarch_init); initialize_tdesc_nds32 (); nds32_init_reggroups (); diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index be668bf..3920fa1 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -1489,5 +1489,5 @@ void _initialize_rl78_tdep (); void _initialize_rl78_tdep () { - register_gdbarch_init (bfd_arch_rl78, rl78_gdbarch_init); + gdbarch_register (bfd_arch_rl78, rl78_gdbarch_init); } diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index 989d900..c7e7c3f 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -1063,6 +1063,6 @@ void _initialize_rx_tdep (); void _initialize_rx_tdep () { - register_gdbarch_init (bfd_arch_rx, rx_gdbarch_init); + gdbarch_register (bfd_arch_rx, rx_gdbarch_init); initialize_tdesc_rx (); } diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 2aeb3a1..7f0ed65 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -7229,7 +7229,7 @@ void _initialize_s390_tdep () { /* Hook us into the gdbarch mechanism. */ - register_gdbarch_init (bfd_arch_s390, s390_gdbarch_init); + gdbarch_register (bfd_arch_s390, s390_gdbarch_init); initialize_tdesc_s390_linux32 (); initialize_tdesc_s390x_linux64 (); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 397f548..0f5da2c 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -2269,5 +2269,5 @@ void _initialize_sparc_tdep (); void _initialize_sparc_tdep () { - register_gdbarch_init (bfd_arch_sparc, sparc32_gdbarch_init); + gdbarch_register (bfd_arch_sparc, sparc32_gdbarch_init); } diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index b7efcf1..7757683 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -1302,5 +1302,5 @@ void _initialize_tic6x_tdep (); void _initialize_tic6x_tdep () { - register_gdbarch_init (bfd_arch_tic6x, tic6x_gdbarch_init); + gdbarch_register (bfd_arch_tic6x, tic6x_gdbarch_init); } diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 9668aa8..744aca9 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -1028,5 +1028,5 @@ void _initialize_tilegx_tdep (); void _initialize_tilegx_tdep () { - register_gdbarch_init (bfd_arch_tilegx, tilegx_gdbarch_init); + gdbarch_register (bfd_arch_tilegx, tilegx_gdbarch_init); } diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index f7094e3..232b92d 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1465,6 +1465,6 @@ void _initialize_v850_tdep (); void _initialize_v850_tdep () { - register_gdbarch_init (bfd_arch_v850, v850_gdbarch_init); - register_gdbarch_init (bfd_arch_v850_rh850, v850_gdbarch_init); + gdbarch_register (bfd_arch_v850, v850_gdbarch_init); + gdbarch_register (bfd_arch_v850_rh850, v850_gdbarch_init); } diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index c0fe5da..10c0d3e 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -838,5 +838,5 @@ void _initialize_xstormy16_tdep (); void _initialize_xstormy16_tdep () { - register_gdbarch_init (bfd_arch_xstormy16, xstormy16_gdbarch_init); + gdbarch_register (bfd_arch_xstormy16, xstormy16_gdbarch_init); } diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index 1ab375c..684f083 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -1460,6 +1460,6 @@ extern initialize_file_ftype _initialize_z80_tdep; void _initialize_z80_tdep () { - register_gdbarch_init (bfd_arch_z80, z80_gdbarch_init); + gdbarch_register (bfd_arch_z80, z80_gdbarch_init); initialize_tdesc_z80 (); } |