* [patch, moxie] fix SIM_DESC object initialization for the moxie sim.
@ 2010-01-13 8:30 Anthony Green
0 siblings, 0 replies; only message in thread
From: Anthony Green @ 2010-01-13 8:30 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
I've checked in this patch to fix SIM_DESC object initialization in the
moxie sim.
AG
[-- Attachment #2: moxie-sim.patch --]
[-- Type: text/x-patch, Size: 956 bytes --]
2010-01-13 Anthony Green <green@moxielogic.com>
* interp.c (sim_open): Initialize the SIM_DESC object properly
with sim_config() and sim_post_argv_init().
Index: sim/moxie/interp.c
===================================================================
RCS file: /cvs/src/src/sim/moxie/interp.c,v
retrieving revision 1.6
diff -u -r1.6 interp.c
--- sim/moxie/interp.c 1 Jan 2010 10:03:33 -0000 1.6
+++ sim/moxie/interp.c 13 Jan 2010 08:14:11 -0000
@@ -1176,6 +1176,22 @@
set_initial_gprs (); /* Reset the GPR registers. */
+ /* Configure/verify the target byte order and other runtime
+ configuration options */
+ if (sim_config (sd) != SIM_RC_OK)
+ {
+ sim_module_uninstall (sd);
+ return 0;
+ }
+
+ if (sim_post_argv_init (sd) != SIM_RC_OK)
+ {
+ /* Uninstall the modules to avoid memory leaks,
+ file descriptor leaks, etc. */
+ sim_module_uninstall (sd);
+ return 0;
+ }
+
return sd;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-13 8:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-13 8:30 [patch, moxie] fix SIM_DESC object initialization for the moxie sim Anthony Green
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox