[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd 1/2] xxx print fail
From: |
Justus Winter |
Subject: |
[PATCH hurd 1/2] xxx print fail |
Date: |
Sat, 4 Jun 2016 15:47:51 +0200 |
---
libshouldbeinlibc/assert-backtrace.c | 8 ++++++++
libshouldbeinlibc/assert-backtrace.h | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/libshouldbeinlibc/assert-backtrace.c
b/libshouldbeinlibc/assert-backtrace.c
index ca23c8d..72a49e9 100644
--- a/libshouldbeinlibc/assert-backtrace.c
+++ b/libshouldbeinlibc/assert-backtrace.c
@@ -76,4 +76,12 @@ __assert_perror_fail_backtrace (int errnum,
}
+void
+__print_fail_backtrace (const char *message, const char *file,
+ unsigned int line, const char *function)
+{
+ __assert_fail_base_backtrace ("%s: %s:%u: %s: %s.\n",
+ message, file, line, function);
+}
+
#endif /* ! defined NDEBUG */
diff --git a/libshouldbeinlibc/assert-backtrace.h
b/libshouldbeinlibc/assert-backtrace.h
index c54b810..b36e5b2 100644
--- a/libshouldbeinlibc/assert-backtrace.h
+++ b/libshouldbeinlibc/assert-backtrace.h
@@ -42,6 +42,12 @@ void __assert_perror_fail_backtrace (int errnum,
const char *function)
__attribute__ ((noreturn, unused));
+/* Likewise, but prints the given MESSAGE. */
+void
+__print_fail_backtrace (const char *message, const char *file,
+ unsigned int line, const char *function)
+ __attribute__ ((noreturn, unused));
+
#define assert_backtrace(expr) \
((expr) \
? (void) 0 \
--
2.1.4
- RFC: Runtime checking of port handling, Justus Winter, 2016/06/04
- [PATCH hurd 1/2] xxx print fail,
Justus Winter <=
- [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Justus Winter, 2016/06/04
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Ludovic Courtès, 2016/06/05
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Samuel Thibault, 2016/06/05
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Ludovic Courtès, 2016/06/06
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Thomas Schwinge, 2016/06/06
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Samuel Thibault, 2016/06/06
- Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros, Ludovic Courtès, 2016/06/06
Re: [PATCH hurd 1/2] xxx print fail, Samuel Thibault, 2016/06/04
Re: RFC: Runtime checking of port handling, Samuel Thibault, 2016/06/04