From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 3/3] Add missing stdlib.h includes to sim
Date: Tue, 4 May 2021 08:58:18 -0600 [thread overview]
Message-ID: <20210504145818.4088770-4-tromey@adacore.com> (raw)
In-Reply-To: <20210504145818.4088770-1-tromey@adacore.com>
This updates the various "mloop.in" files to emit an include of
stdlib.h, to avoid warnings about 'abort' being undeclared.
One such warning now remains, in mn10300.igen. I don't know offhand
the best way to fix this one.
sim/cris/ChangeLog
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
sim/iq2000/ChangeLog
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
sim/lm32/ChangeLog
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
sim/m32r/ChangeLog
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
sim/or1k/ChangeLog
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
---
sim/cris/ChangeLog | 4 ++++
sim/cris/mloop.in | 2 ++
sim/iq2000/ChangeLog | 4 ++++
sim/iq2000/mloop.in | 1 +
sim/lm32/ChangeLog | 4 ++++
sim/lm32/mloop.in | 1 +
sim/m32r/ChangeLog | 4 ++++
sim/m32r/mloop.in | 1 +
sim/or1k/ChangeLog | 4 ++++
sim/or1k/mloop.in | 1 +
10 files changed, 26 insertions(+)
diff --git a/sim/cris/mloop.in b/sim/cris/mloop.in
index 32f5fef95f3..645d8211606 100644
--- a/sim/cris/mloop.in
+++ b/sim/cris/mloop.in
@@ -42,6 +42,8 @@ case "x$1" in
xsupport)
cat <<EOF
+#include <stdlib.h>
+
/* It seems we don't have a templated header file corresponding to
cris-tmpl.c, so we have to get out declarations the hackish way. */
extern void @cpu@_specific_init (SIM_CPU *current_cpu);
diff --git a/sim/iq2000/mloop.in b/sim/iq2000/mloop.in
index b973fa106ab..7d3a9b5e9a1 100644
--- a/sim/iq2000/mloop.in
+++ b/sim/iq2000/mloop.in
@@ -40,6 +40,7 @@ case "x$1" in
xsupport)
cat <<EOF
+#include <stdlib.h>
static INLINE const IDESC *
extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
diff --git a/sim/lm32/mloop.in b/sim/lm32/mloop.in
index a8db7f51768..574f00a5119 100644
--- a/sim/lm32/mloop.in
+++ b/sim/lm32/mloop.in
@@ -32,6 +32,7 @@ case "x$1" in
xsupport)
cat <<EOF
+#include <stdlib.h>
static INLINE const IDESC *
extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn,
diff --git a/sim/m32r/mloop.in b/sim/m32r/mloop.in
index 405a7e92736..6b0d0dec616 100644
--- a/sim/m32r/mloop.in
+++ b/sim/m32r/mloop.in
@@ -42,6 +42,7 @@ case "x$1" in
xsupport)
cat <<EOF
+#include <stdlib.h>
static INLINE const IDESC *
extract16 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn,
diff --git a/sim/or1k/mloop.in b/sim/or1k/mloop.in
index 49c42276209..a94b534a9ae 100644
--- a/sim/or1k/mloop.in
+++ b/sim/or1k/mloop.in
@@ -42,6 +42,7 @@ case "x$1" in
xsupport)
cat <<EOF
+#include <stdlib.h>
static INLINE const IDESC *
extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn,
--
2.26.3
next prev parent reply other threads:[~2021-05-04 14:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 14:58 [PATCH 0/3] Some minor sim fixes Tom Tromey
2021-05-04 14:58 ` [PATCH 1/3] Add config.h to generated_files for sim Tom Tromey
2021-05-04 17:38 ` Mike Frysinger via Gdb-patches
2021-05-04 14:58 ` [PATCH 2/3] Fix igen build Tom Tromey
2021-05-04 17:38 ` Mike Frysinger via Gdb-patches
2021-05-04 14:58 ` Tom Tromey [this message]
2021-05-04 17:44 ` [PATCH 3/3] Add missing stdlib.h includes to sim Mike Frysinger via Gdb-patches
2021-05-04 19:17 ` Tom Tromey
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=20210504145818.4088770-4-tromey@adacore.com \
--to=tromey@adacore.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