summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-07-12 17:44:24 +0000
committerobrien <obrien@FreeBSD.org>2002-07-12 17:44:24 +0000
commitcacc7a70dbf386866c2a5a05b930999bde3ef92e (patch)
tree246c785fef9db0b4566c786ff8549e69130380e2 /contrib
parent599a83dfc41a1c086e0f0ad7d60c120f236827ef (diff)
downloadFreeBSD-src-cacc7a70dbf386866c2a5a05b930999bde3ef92e.zip
FreeBSD-src-cacc7a70dbf386866c2a5a05b930999bde3ef92e.tar.gz
Fix C++ exception handling. GCC was using the older BSD DBX register numbers
rather than the ELF ABI/SVR4 ones in its DWARF unwinding. Submitted by: Alexander Kabaev <ak03@gte.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc/config/i386/freebsd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc/config/i386/freebsd.h b/contrib/gcc/config/i386/freebsd.h
index 5adcac9..f35e755 100644
--- a/contrib/gcc/config/i386/freebsd.h
+++ b/contrib/gcc/config/i386/freebsd.h
@@ -387,6 +387,14 @@ Boston, MA 02111-1307, USA. */
? svr4_dbx_register_map[(n)] \
: dbx_register_map[(n)])
+/* The same functions are used to creating the DWARF2 debug info and C++
+ unwind info (except.c). Regardless of the debug format requested, the
+ register numbers used in exception unwinding sections still have to be
+ DWARF compatible. IMO the GCC folks may be abusing the DBX_REGISTER_NUMBER
+ macro to mean too much. */
+#define DWARF_FRAME_REGNUM(n) (TARGET_64BIT ? dbx64_register_map[n] \
+ : svr4_dbx_register_map[(n)])
+
/* tag end of file in elf mode */
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
OpenPOWER on IntegriCloud