aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-02-06 11:27:16 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2013-02-06 11:27:16 +0100
commitd7ffe14c000af9bf1f63f8fbfb5a6511bbf66392 (patch)
tree048ed428886f8760b2f07ebf65de182a448f9203 /gcc/ada/raise-gcc.c
parentc91dbd184bc0dde2d04895dc15a7fe169d7169d7 (diff)
downloadgcc-d7ffe14c000af9bf1f63f8fbfb5a6511bbf66392.zip
gcc-d7ffe14c000af9bf1f63f8fbfb5a6511bbf66392.tar.gz
gcc-d7ffe14c000af9bf1f63f8fbfb5a6511bbf66392.tar.bz2
[multiple changes]
2013-02-06 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h) Enclosing debugging functions within #ifndef inhibit_libc to support builds without full C headers. 2013-02-06 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order. 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing check to detect a parent-child relationship between two units in order to correctly bypass the installation of a limited view. In other words, the comment on the intended usage of the check was correct, but the code itself did not reflect the behavior. From-SVN: r195794
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 4da4bd2..42c5a5c 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2013, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -38,13 +38,12 @@
#include "tconfig.h"
#include "tsystem.h"
-#include <sys/stat.h>
+
#include <stdarg.h>
typedef char bool;
# define true 1
# define false 0
-#include "adaint.h"
#include "raise.h"
#ifdef __APPLE__
@@ -81,7 +80,6 @@ extern struct Exception_Occurrence *__gnat_setup_current_excep
(_Unwind_Exception *);
extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
-#include "dwarf2.h"
#include "unwind-pe.h"
/* The known and handled exception classes. */
@@ -93,6 +91,8 @@ extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
-- The DB stuff below is there for debugging purposes only. --
-------------------------------------------------------------- */
+#ifndef inhibit_libc
+
#define DB_PHASES 0x1
#define DB_CSITE 0x2
#define DB_ACTIONS 0x4
@@ -193,7 +193,11 @@ db_phases (int phases)
db (DB_PHASES, " :\n");
}
-
+#else /* !inhibit_libc */
+#define db_phases(X)
+#define db_indent(X)
+#define db(X, ...)
+#endif /* !inhibit_libc */
/* ---------------------------------------------------------------
-- Now come a set of useful structures and helper routines. --
@@ -516,6 +520,7 @@ get_ip_from_context (_Unwind_Context *uw_context)
static void
db_region_for (region_descriptor *region, _Unwind_Ptr ip)
{
+#ifndef inhibit_libc
if (! (db_accepted_codes () & DB_REGIONS))
return;
@@ -527,6 +532,7 @@ db_region_for (region_descriptor *region, _Unwind_Ptr ip)
db (DB_REGIONS, "no lsda");
db (DB_REGIONS, "\n");
+#endif
}
/* Retrieve the ttype entry associated with FILTER in the REGION's
@@ -647,6 +653,7 @@ typedef struct
static void
db_action_for (action_descriptor *action, _Unwind_Ptr ip)
{
+#ifndef inhibit_libc
db (DB_ACTIONS, "For ip @ %p => ", (void *)ip);
switch (action->kind)
@@ -672,8 +679,7 @@ db_action_for (action_descriptor *action, _Unwind_Ptr ip)
db (DB_ACTIONS, "Err? Unexpected action kind !\n");
break;
}
-
- return;
+#endif
}
/* Search the call_site_table of REGION for an entry appropriate for the