Include "libunwind_i.h" instead of "internal.h".
(Logical change 1.294)
diff --git a/src/elfxx.h b/src/elfxx.h
index 694c03d..a12375b 100644
--- a/src/elfxx.h
+++ b/src/elfxx.h
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2003 Hewlett-Packard Co
+ Copyright (C) 2003, 2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -30,7 +30,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
-#include "internal.h"
+#include "libunwind_i.h"
#if ELF_CLASS == ELFCLASS32
# define ELF_W(x) ELF32_##x
diff --git a/src/ia64/regname.c b/src/ia64/regname.c
index 9069b3e..4936a3d 100644
--- a/src/ia64/regname.c
+++ b/src/ia64/regname.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2002-2004 Hewlett-Packard Co
+ Copyright (C) 2002-2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -37,7 +37,7 @@
example, in the Linux sigcontext, sc_fr[0] and sc_fr[1] serve this
purpose. */
-#include "internal.h"
+#include "libunwind_i.h"
/* Maintain the register names as a single string to keep the number
of dynamic relocations in the shared object to a minimum. */
diff --git a/src/mi/Gput_dynamic_unwind_info.c b/src/mi/Gput_dynamic_unwind_info.c
index 92c81ff..13a9c1a 100644
--- a/src/mi/Gput_dynamic_unwind_info.c
+++ b/src/mi/Gput_dynamic_unwind_info.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2001-2002 Hewlett-Packard Co
+ Copyright (C) 2001-2002, 2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -23,7 +23,7 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "internal.h"
+#include "libunwind_i.h"
HIDDEN void
unwi_put_dynamic_unwind_info (unw_addr_space_t as, unw_proc_info_t *pi,
diff --git a/src/mi/dyn-cancel.c b/src/mi/dyn-cancel.c
index 85a3645..e784317 100644
--- a/src/mi/dyn-cancel.c
+++ b/src/mi/dyn-cancel.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2001-2002 Hewlett-Packard Co
+ Copyright (C) 2001-2002, 2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -23,7 +23,7 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "internal.h"
+#include "libunwind_i.h"
void
_U_dyn_cancel (unw_dyn_info_t *di)
diff --git a/src/mi/dyn-info-list.c b/src/mi/dyn-info-list.c
index 755f583..b06fee4 100644
--- a/src/mi/dyn-info-list.c
+++ b/src/mi/dyn-info-list.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2001-2002 Hewlett-Packard Co
+ Copyright (C) 2001-2002, 2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -23,7 +23,7 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "internal.h"
+#include "libunwind_i.h"
HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
diff --git a/src/mi/dyn-register.c b/src/mi/dyn-register.c
index 5f58136..a62d696 100644
--- a/src/mi/dyn-register.c
+++ b/src/mi/dyn-register.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2001-2002 Hewlett-Packard Co
+ Copyright (C) 2001-2002, 2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -23,7 +23,7 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "internal.h"
+#include "libunwind_i.h"
HIDDEN pthread_mutex_t _U_dyn_info_list_lock = PTHREAD_MUTEX_INITIALIZER;
diff --git a/src/mi/flush_cache.c b/src/mi/flush_cache.c
index 25f869d..15e8950 100644
--- a/src/mi/flush_cache.c
+++ b/src/mi/flush_cache.c
@@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
- Copyright (C) 2002-2004 Hewlett-Packard Co
+ Copyright (C) 2002-2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@@ -23,8 +23,7 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "internal.h"
-#include "tdep.h"
+#include "libunwind_i.h"
PROTECTED void
unw_flush_cache (unw_addr_space_t as, unw_word_t lo, unw_word_t hi)
diff --git a/src/mi/strerror.c b/src/mi/strerror.c
index e69de29..ef64716 100644
--- a/src/mi/strerror.c
+++ b/src/mi/strerror.c
@@ -0,0 +1,51 @@
+/* libunwind - a platform-independent unwind library
+ Copyright (C) 2004 BEA Systems
+ Contributed by Thomas Hallgren <thallgre@bea.com>
+
+This file is part of libunwind.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#include "libunwind_i.h"
+
+/* Returns the text corresponding to the given err_code or the
+ text "invalid error code" if the err_code is invalid. */
+const char *
+unw_strerror (int err_code)
+{
+ const char *cp;
+ unw_error_t error = (unw_error_t)-err_code;
+ switch (error)
+ {
+ case UNW_ESUCCESS: cp = "no error"; break;
+ case UNW_EUNSPEC: cp = "unspecified (general) error"; break;
+ case UNW_ENOMEM: cp = "out of memory"; break;
+ case UNW_EBADREG: cp = "bad register number"; break;
+ case UNW_EREADONLYREG: cp = "attempt to write read-only register"; break;
+ case UNW_ESTOPUNWIND: cp = "stop unwinding"; break;
+ case UNW_EINVALIDIP: cp = "invalid IP"; break;
+ case UNW_EBADFRAME: cp = "bad frame"; break;
+ case UNW_EINVAL: cp = "unsupported operation or bad value"; break;
+ case UNW_EBADVERSION: cp = "unwind info has unsupported version"; break;
+ case UNW_ENOINFO: cp = "no unwind info found"; break;
+ default: cp = "invalid error code";
+ }
+ return cp;
+}