public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [RFC] sim: framework for self-declaring initializers
@ 2021-02-08  4:08 Mike Frysinger
  2021-02-08  4:08 ` [PATCH 1/3] sim: add framework for declaring init callbacks locally Mike Frysinger
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Mike Frysinger @ 2021-02-08  4:08 UTC (permalink / raw)
  To: gdb-patches

GDB has a framework where modules can declare funcs with names that
start with "_initialize" and they'll automatically get called during
startup.  Bring that same framework idea to the sim so we can stop
hardcoding callbacks in a centralized location.

This is the rough basis for it with a few modules converted over as
an example.  I couldn't find much info in the GDB side to show that
this is the wrong direction to go.  Feedback welcome.

Mike Frysinger (3):
  sim: add framework for declaring init callbacks locally
  sim: dv-sockser: localize init callback
  sim: bfin: move option inits to respective modules

 sim/bfin/dv-bfin_mmu.c    | 12 ++++++++++-
 sim/bfin/interp.c         | 11 ----------
 sim/bfin/machs.c          | 12 ++++++++++-
 sim/common/Make-common.in | 24 +++++++++++++++++++++-
 sim/common/dv-sockser.c   |  5 ++++-
 sim/common/dv-sockser.h   |  2 --
 sim/common/sim-module.c   | 42 +++++++++++++++++++++++++--------------
 sim/common/sim-module.h   |  1 +
 8 files changed, 77 insertions(+), 32 deletions(-)

-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-24 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  4:08 [PATCH 0/3] [RFC] sim: framework for self-declaring initializers Mike Frysinger
2021-02-08  4:08 ` [PATCH 1/3] sim: add framework for declaring init callbacks locally Mike Frysinger
2021-02-08  4:08 ` [PATCH 2/3] sim: dv-sockser: localize init callback Mike Frysinger
2021-02-08  4:08 ` [PATCH 3/3] sim: bfin: move option inits to respective modules Mike Frysinger
2021-02-08 19:45 ` [PATCH 0/3] [RFC] sim: framework for self-declaring initializers Tom Tromey
2021-04-24 17:09 ` [PATCH 1/4] sim: arm: move build logic to source files Mike Frysinger
2021-04-24 17:09   ` [PATCH 2/4] sim: add framework for declaring init callbacks locally Mike Frysinger
2021-04-24 17:09   ` [PATCH 3/4] sim: dv-sockser: localize init callback Mike Frysinger
2021-04-24 17:09   ` [PATCH 4/4] sim: bfin: move option inits to respective modules Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).