summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-01-20 02:46:14 +0000
committeremaste <emaste@FreeBSD.org>2017-01-20 02:46:14 +0000
commitb2b1cb704e32a1e43978f556cf01ec30354fca17 (patch)
tree80ad4125814c82eeafc2a6ced1d4c25cb81b9c22 /contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
parentdd08fcebd27562bf459846063825f2bca66f1c6c (diff)
downloadFreeBSD-src-b2b1cb704e32a1e43978f556cf01ec30354fca17.zip
FreeBSD-src-b2b1cb704e32a1e43978f556cf01ec30354fca17.tar.gz
MFC r308006: libunwind: consistently add \n to log and trace messages
Previously most messages included a newline in the string, but a few of them were missing. Fix these and simplify by just adding the newline in the _LIBUNWIND_LOG macro itself. While here correct 'libuwind' typo (missing 'n'). Upstream LLVM libunwind commits r280086 and r280103. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c')
-rw-r--r--contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c b/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
index 28ba092..61af9e8 100644
--- a/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
+++ b/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
@@ -29,11 +29,11 @@
_LIBUNWIND_EXPORT _Unwind_Reason_Code
_Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
#if _LIBUNWIND_ARM_EHABI
- _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld\n",
+ _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld",
(void *)exception_object,
(long)exception_object->unwinder_cache.reserved1);
#else
- _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld\n",
+ _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld",
(void *)exception_object,
(long)exception_object->private_1);
#endif
@@ -66,7 +66,7 @@ _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
_LIBUNWIND_EXPORT uintptr_t
_Unwind_GetDataRelBase(struct _Unwind_Context *context) {
(void)context;
- _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)\n", (void *)context);
+ _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)", (void *)context);
_LIBUNWIND_ABORT("_Unwind_GetDataRelBase() not implemented");
}
@@ -76,7 +76,7 @@ _Unwind_GetDataRelBase(struct _Unwind_Context *context) {
_LIBUNWIND_EXPORT uintptr_t
_Unwind_GetTextRelBase(struct _Unwind_Context *context) {
(void)context;
- _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)\n", (void *)context);
+ _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)", (void *)context);
_LIBUNWIND_ABORT("_Unwind_GetTextRelBase() not implemented");
}
@@ -84,7 +84,7 @@ _Unwind_GetTextRelBase(struct _Unwind_Context *context) {
/// Scans unwind information to find the function that contains the
/// specified code address "pc".
_LIBUNWIND_EXPORT void *_Unwind_FindEnclosingFunction(void *pc) {
- _LIBUNWIND_TRACE_API("_Unwind_FindEnclosingFunction(pc=%p)\n", pc);
+ _LIBUNWIND_TRACE_API("_Unwind_FindEnclosingFunction(pc=%p)", pc);
// This is slow, but works.
// We create an unwind cursor then alter the IP to be pc
unw_cursor_t cursor;
@@ -108,7 +108,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
unw_getcontext(&uc);
unw_init_local(&cursor, &uc);
- _LIBUNWIND_TRACE_API("_Unwind_Backtrace(callback=%p)\n",
+ _LIBUNWIND_TRACE_API("_Unwind_Backtrace(callback=%p)",
(void *)(uintptr_t)callback);
#if _LIBUNWIND_ARM_EHABI
@@ -123,11 +123,11 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
_Unwind_Reason_Code result;
#if !_LIBUNWIND_ARM_EHABI
- // ask libuwind to get next frame (skip over first frame which is
+ // ask libunwind to get next frame (skip over first frame which is
// _Unwind_Backtrace())
if (unw_step(&cursor) <= 0) {
_LIBUNWIND_TRACE_UNWINDING(" _backtrace: ended because cursor reached "
- "bottom of stack, returning %d\n",
+ "bottom of stack, returning %d",
_URC_END_OF_STACK);
return _URC_END_OF_STACK;
}
@@ -164,7 +164,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
unw_get_proc_name(&cursor, functionName, 512, &offset);
unw_get_proc_info(&cursor, &frame);
_LIBUNWIND_TRACE_UNWINDING(
- " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n",
+ " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p",
(long long)frame.start_ip, functionName, (long long)frame.lsda,
(void *)&cursor);
}
@@ -173,7 +173,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
result = (*callback)((struct _Unwind_Context *)(&cursor), ref);
if (result != _URC_NO_REASON) {
_LIBUNWIND_TRACE_UNWINDING(
- " _backtrace: ended because callback returned %d\n", result);
+ " _backtrace: ended because callback returned %d", result);
return result;
}
}
@@ -195,7 +195,7 @@ _LIBUNWIND_EXPORT const void *_Unwind_Find_FDE(const void *pc,
bases->tbase = (uintptr_t)info.extra;
bases->dbase = 0; // dbase not used on Mac OS X
bases->func = (uintptr_t)info.start_ip;
- _LIBUNWIND_TRACE_API("_Unwind_Find_FDE(pc=%p) => %p\n", pc,
+ _LIBUNWIND_TRACE_API("_Unwind_Find_FDE(pc=%p) => %p", pc,
(void *)(long) info.unwind_info);
return (void *)(long) info.unwind_info;
}
@@ -206,7 +206,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetCFA(struct _Unwind_Context *context) {
unw_cursor_t *cursor = (unw_cursor_t *)context;
unw_word_t result;
unw_get_reg(cursor, UNW_REG_SP, &result);
- _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p) => 0x%" PRIx64 "\n",
+ _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p) => 0x%" PRIx64,
(void *)context, (uint64_t)result);
return (uintptr_t)result;
}
@@ -217,7 +217,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetCFA(struct _Unwind_Context *context) {
/// site address. Normally IP is the return address.
_LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
int *ipBefore) {
- _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p)\n", (void *)context);
+ _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p)", (void *)context);
*ipBefore = 0;
return _Unwind_GetIP(context);
}
@@ -229,7 +229,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
/// This function has existed on Mac OS X since 10.4, but
/// was broken until 10.6.
_LIBUNWIND_EXPORT void __register_frame(const void *fde) {
- _LIBUNWIND_TRACE_API("__register_frame(%p)\n", fde);
+ _LIBUNWIND_TRACE_API("__register_frame(%p)", fde);
_unw_add_dynamic_fde((unw_word_t)(uintptr_t) fde);
}
@@ -239,7 +239,7 @@ _LIBUNWIND_EXPORT void __register_frame(const void *fde) {
/// This function has existed on Mac OS X since 10.4, but
/// was broken until 10.6.
_LIBUNWIND_EXPORT void __deregister_frame(const void *fde) {
- _LIBUNWIND_TRACE_API("__deregister_frame(%p)\n", fde);
+ _LIBUNWIND_TRACE_API("__deregister_frame(%p)", fde);
_unw_remove_dynamic_fde((unw_word_t)(uintptr_t) fde);
}
@@ -259,7 +259,7 @@ _LIBUNWIND_EXPORT void __register_frame_info_bases(const void *fde, void *ob,
(void)ob;
(void)tb;
(void)db;
- _LIBUNWIND_TRACE_API("__register_frame_info_bases(%p,%p, %p, %p)\n",
+ _LIBUNWIND_TRACE_API("__register_frame_info_bases(%p,%p, %p, %p)",
fde, ob, tb, db);
// do nothing, this function never worked in Mac OS X
}
@@ -267,7 +267,7 @@ _LIBUNWIND_EXPORT void __register_frame_info_bases(const void *fde, void *ob,
_LIBUNWIND_EXPORT void __register_frame_info(const void *fde, void *ob) {
(void)fde;
(void)ob;
- _LIBUNWIND_TRACE_API("__register_frame_info(%p, %p)\n", fde, ob);
+ _LIBUNWIND_TRACE_API("__register_frame_info(%p, %p)", fde, ob);
// do nothing, this function never worked in Mac OS X
}
@@ -279,33 +279,33 @@ _LIBUNWIND_EXPORT void __register_frame_info_table_bases(const void *fde,
(void)tb;
(void)db;
_LIBUNWIND_TRACE_API("__register_frame_info_table_bases"
- "(%p,%p, %p, %p)\n", fde, ob, tb, db);
+ "(%p,%p, %p, %p)", fde, ob, tb, db);
// do nothing, this function never worked in Mac OS X
}
_LIBUNWIND_EXPORT void __register_frame_info_table(const void *fde, void *ob) {
(void)fde;
(void)ob;
- _LIBUNWIND_TRACE_API("__register_frame_info_table(%p, %p)\n", fde, ob);
+ _LIBUNWIND_TRACE_API("__register_frame_info_table(%p, %p)", fde, ob);
// do nothing, this function never worked in Mac OS X
}
_LIBUNWIND_EXPORT void __register_frame_table(const void *fde) {
(void)fde;
- _LIBUNWIND_TRACE_API("__register_frame_table(%p)\n", fde);
+ _LIBUNWIND_TRACE_API("__register_frame_table(%p)", fde);
// do nothing, this function never worked in Mac OS X
}
_LIBUNWIND_EXPORT void *__deregister_frame_info(const void *fde) {
(void)fde;
- _LIBUNWIND_TRACE_API("__deregister_frame_info(%p)\n", fde);
+ _LIBUNWIND_TRACE_API("__deregister_frame_info(%p)", fde);
// do nothing, this function never worked in Mac OS X
return NULL;
}
_LIBUNWIND_EXPORT void *__deregister_frame_info_bases(const void *fde) {
(void)fde;
- _LIBUNWIND_TRACE_API("__deregister_frame_info_bases(%p)\n", fde);
+ _LIBUNWIND_TRACE_API("__deregister_frame_info_bases(%p)", fde);
// do nothing, this function never worked in Mac OS X
return NULL;
}
OpenPOWER on IntegriCloud