From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: Andrew Cagney <ac131313@cygnus.com>
Subject: Re: RFA: initialize per-arch data in startup_gdbarch
Date: Wed, 06 Jun 2001 09:59:00 -0000 [thread overview]
Message-ID: <npzobl4k6r.fsf_-_@zwingli.cygnus.com> (raw)
In-Reply-To: <3B1E3189.6030009@cygnus.com>
Here's the (much simpler) patch that works the way you want, I think.
2001-06-06 Jim Blandy <jimb@redhat.com>
* 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.
Index: gdb/arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.27
diff -c -r1.27 arch-utils.c
*** gdb/arch-utils.c 2001/05/10 18:36:26 1.27
--- gdb/arch-utils.c 2001/06/06 16:55:00
***************
*** 701,706 ****
--- 701,708 ----
"initialize_current_architecture: Selection of initial architecture failed");
}
}
+ else
+ initialize_non_multiarch ();
/* Create the ``set architecture'' command appending ``auto'' to the
list of architectures. */
Index: gdb/gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.61
diff -c -r1.61 gdbarch.c
*** gdb/gdbarch.c 2001/06/06 14:46:30 1.61
--- gdb/gdbarch.c 2001/06/06 16:55:03
***************
*** 387,392 ****
--- 387,401 ----
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''. */
Index: gdb/gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.49
diff -c -r1.49 gdbarch.h
*** gdb/gdbarch.h 2001/05/14 16:43:35 1.49
--- gdb/gdbarch.h 2001/06/06 16:55:04
***************
*** 1834,1839 ****
--- 1834,1843 ----
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;
Index: gdb/gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.64
diff -c -r1.64 gdbarch.sh
*** gdb/gdbarch.sh 2001/06/06 14:46:30 1.64
--- gdb/gdbarch.sh 2001/06/06 16:55:05
***************
*** 1065,1070 ****
--- 1065,1074 ----
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,1251 ****
--- 1250,1264 ----
};
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);
+ }
EOF
# Create a new gdbarch struct
next prev parent reply other threads:[~2001-06-06 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010601233233.C19845E9CB@zwingli.cygnus.com>
2001-06-01 20:54 ` PATCH: relax restrictions on per-architecture data registration Jim Blandy
2001-06-06 4:59 ` RFA: " Andrew Cagney
2001-06-06 7:39 ` Jim Blandy
2001-06-06 9:35 ` Andrew Cagney
2001-06-06 6:34 ` Andrew Cagney
2001-06-06 9:59 ` Jim Blandy [this message]
2001-06-06 10:13 ` RFA: initialize per-arch data in startup_gdbarch Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=npzobl4k6r.fsf_-_@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox