From: Jim Blandy Date: Wed, 6 Jun 2001 17:47:28 +0000 (+0000) Subject: * gdbarch.sh: Changes to effect the following: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ceaa8edf7ecefadd717ec69f2b5821bca2f339c4;p=binutils-gdb.git * gdbarch.sh: Changes to effect the following: * gdbarch.c (initialize_non_multiarch): New function. * gdbarch.h (initialize_non_multiarch): New declaration. * arch-utils.c (initialize_current_architecture): For non-multiarch configurations, call initialize_non_multiarch. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a7be1b1ef89..5369a935767 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2001-06-06 Jim Blandy + + * gdbarch.sh: Changes to effect the following: + * gdbarch.c (initialize_non_multiarch): New function. + * gdbarch.h (initialize_non_multiarch): New declaration. + * arch-utils.c (initialize_current_architecture): For + non-multiarch configurations, call initialize_non_multiarch. + 2001-06-06 Andrew Cagney * symfile.c (compare_psymbols): Replace PTR with void*. Delete diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 733b2b96d02..46970013eb2 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -705,6 +705,8 @@ initialize_current_architecture (void) "initialize_current_architecture: Selection of initial architecture failed"); } } + else + initialize_non_multiarch (); /* Create the ``set architecture'' command appending ``auto'' to the list of architectures. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 2bd957f6e01..95e9044a476 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -387,6 +387,15 @@ struct gdbarch startup_gdbarch = struct gdbarch *current_gdbarch = &startup_gdbarch; +/* Do any initialization needed for a non-multiarch configuration + after the _initialize_MODULE functions have been run. */ +void +initialize_non_multiarch () +{ + alloc_gdbarch_data (&startup_gdbarch); + init_gdbarch_data (&startup_gdbarch); +} + /* Create a new ``struct gdbarch'' based on information provided by ``struct gdbarch_info''. */ diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5b2bcacdfd5..2e9d35f28ec 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1834,6 +1834,10 @@ extern void set_gdbarch_from_file (bfd *); extern void initialize_current_architecture (void); +/* For non-multiarched targets, do any initialization of the default + gdbarch object necessary after the _initialize_MODULE functions + have run. */ +extern void initialize_non_multiarch (); /* gdbarch trace variable */ extern int gdbarch_debug; diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 14e88c30a83..57b1ab02339 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -1065,6 +1065,10 @@ extern void set_gdbarch_from_file (bfd *); extern void initialize_current_architecture (void); +/* For non-multiarched targets, do any initialization of the default + gdbarch object necessary after the _initialize_MODULE functions + have run. */ +extern void initialize_non_multiarch (); /* gdbarch trace variable */ extern int gdbarch_debug; @@ -1246,6 +1250,15 @@ cat <