summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-09-10 13:10:20 +1000
committerChris Johns <chrisj@rtems.org>2014-09-10 13:10:20 +1000
commit16eee5f6407ec55347115aa4fd10205f15638369 (patch)
tree963bc7449e8a7ceaf289617f9c4c85a87ea9c809
parent675e8a86bca0310ba3819095f4b54080b2ea253a (diff)
rtems-tld: Fix warnings in the generated code.
-rw-r--r--rtems-tld.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/rtems-tld.cpp b/rtems-tld.cpp
index 417b904..0f09dd0 100644
--- a/rtems-tld.cpp
+++ b/rtems-tld.cpp
@@ -591,6 +591,12 @@ namespace rld
}
c.close ();
+
+ if (rld::verbose (RLD_VERBOSE_DETAILS))
+ {
+ std::cout << "Generated C file:" << std::endl;
+ c.output (" ", std::cout, true);
+ }
}
void
@@ -647,9 +653,9 @@ namespace rld
const signature& sig = (*si).second;
- c.write_line(sig.decl () + ";");
-
c.write_line("");
+ c.write_line(sig.decl () + ";");
+ c.write_line(sig.decl ("__real_") + ";");
c.write_line(sig.decl ("__wrap_"));
c.write_line("{");
@@ -679,8 +685,8 @@ namespace rld
std::string l = ' ' + generator_.arg_trace;
std::string n = rld::to_string ((int) (a + 1));
l = rld::find_replace (l, "@ARG_NUM@", n);
- l = rld::find_replace (l, "@ARG_TYPE@", '"' + sig.args[0] + '"');
- l = rld::find_replace (l, "@ARG_SIZE@", "sizeof(" + sig.args[0] + ')');
+ l = rld::find_replace (l, "@ARG_TYPE@", '"' + sig.args[a] + '"');
+ l = rld::find_replace (l, "@ARG_SIZE@", "sizeof(" + sig.args[a] + ')');
l = rld::find_replace (l, "@ARG_LABEL@", "a" + n);
c.write_line(l);
}
@@ -1065,7 +1071,7 @@ main (int argc, char* argv[])
{
const std::string& prefix = rld::get_prefix ();
if (rtems_path.empty () && prefix.empty ())
- throw rld::error ("No RTEMS path provide with arch/bsp", "options");
+ throw rld::error ("No RTEMS path provided with arch/bsp", "options");
if (!rtems_path.empty ())
rld::rtems::set_path (rtems_path);
else