[syslinux:lwip] lwip: Add return address to LWIP_PLATFORM_ASSERT()

syslinux-bot for H. Peter Anvin hpa at zytor.com
Thu Apr 26 15:54:02 PDT 2012


Commit-ID:  335cd2ec7488a994323e569d55d14f658840b30b
Gitweb:     http://www.syslinux.org/commit/335cd2ec7488a994323e569d55d14f658840b30b
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 26 Apr 2012 15:51:52 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 26 Apr 2012 15:51:52 -0700

lwip: Add return address to LWIP_PLATFORM_ASSERT()

It might help a little bit finding bugs...

Signed-off-by: H. Peter Anvin <hpa at zytor.com>

---
 core/lwip/src/include/arch/cc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/lwip/src/include/arch/cc.h b/core/lwip/src/include/arch/cc.h
index 5f5547f..677ef4f 100644
--- a/core/lwip/src/include/arch/cc.h
+++ b/core/lwip/src/include/arch/cc.h
@@ -23,7 +23,7 @@ typedef uintptr_t mem_ptr_t;
 
 #if 1
 #define LWIP_PLATFORM_DIAG(x)	do { printf x; } while(0)
-#define LWIP_PLATFORM_ASSERT(x)	do { printf("LWIP(%s,%d): %s", __FILE__, __LINE__, (x)); kaboom(); } while(0)
+#define LWIP_PLATFORM_ASSERT(x)	do { printf("LWIP(%s,%d,%p): %s", __FILE__, __LINE__, __builtin_return_address(0), (x)); kaboom(); } while(0)
 #else
 #define LWIP_PLATFORM_DIAG(x)	((void)0) /* For now... */
 #define LWIP_PLATFORM_ASSERT(x)	kaboom()


More information about the Syslinux-commits mailing list