From: Anthony Green <green@moxielogic.com>
To: gdb-patches@sourceware.org
Subject: [patch, moxie] fix SIM_DESC object initialization for the moxie sim.
Date: Wed, 13 Jan 2010 08:30:00 -0000 [thread overview]
Message-ID: <1263371436.3891.1.camel@localhost> (raw)
[-- 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;
}
reply other threads:[~2010-01-13 8:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1263371436.3891.1.camel@localhost \
--to=green@moxielogic.com \
--cc=gdb-patches@sourceware.org \
/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