diff options
author | thegeorg <thegeorg@yandex-team.com> | 2025-02-24 20:04:09 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2025-02-24 21:30:51 +0300 |
commit | 586061997e2f9d67eefb66122c5ccd6a8524f3a1 (patch) | |
tree | 8b9f268988db87aa2f25d6998daa2b8c2d4ebda1 /contrib/libs | |
parent | c55cc61566e5b60d228aded81bf7391a51278c0a (diff) | |
download | ydb-586061997e2f9d67eefb66122c5ccd6a8524f3a1.tar.gz |
Simplify libcxxrt patches
commit_hash:4358151e7723e37a39cf6f5478bfa336aa687fd4
Diffstat (limited to 'contrib/libs')
-rw-r--r-- | contrib/libs/cxxsupp/libcxxrt/cxxabi.h | 1 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxxrt/exception.cc | 50 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxxrt/ya.make | 2 |
3 files changed, 27 insertions, 26 deletions
diff --git a/contrib/libs/cxxsupp/libcxxrt/cxxabi.h b/contrib/libs/cxxsupp/libcxxrt/cxxabi.h index 2e50c9b7f5..6aec41c743 100644 --- a/contrib/libs/cxxsupp/libcxxrt/cxxabi.h +++ b/contrib/libs/cxxsupp/libcxxrt/cxxabi.h @@ -22,6 +22,7 @@ #ifndef __CXXABI_H_ #define __CXXABI_H_ +#include <stddef.h> #include <stdint.h> #include "unwind.h" namespace std diff --git a/contrib/libs/cxxsupp/libcxxrt/exception.cc b/contrib/libs/cxxsupp/libcxxrt/exception.cc index 7c34bd9cbe..ea19474857 100644 --- a/contrib/libs/cxxsupp/libcxxrt/exception.cc +++ b/contrib/libs/cxxsupp/libcxxrt/exception.cc @@ -287,31 +287,6 @@ namespace std using namespace ABI_NAMESPACE; -/** - * Callback function used with _Unwind_Backtrace(). - * - * Prints a stack trace. Used only for debugging help. - * - * Note: As of FreeBSD 8.1, dladd() still doesn't work properly, so this only - * correctly prints function names from public, relocatable, symbols. - */ -static _Unwind_Reason_Code trace(struct _Unwind_Context *context, void *c) -{ - Dl_info myinfo; - int mylookup = - dladdr(reinterpret_cast<void *>(__cxa_current_exception_type), &myinfo); - void *ip = reinterpret_cast<void*>(_Unwind_GetIP(context)); - Dl_info info; - if (dladdr(ip, &info) != 0) - { - if (mylookup == 0 || strcmp(info.dli_fname, myinfo.dli_fname) != 0) - { - printf("%p:%s() in %s\n", ip, info.dli_sname, info.dli_fname); - } - } - return _URC_CONTINUE_UNWIND; -} - static void bt_terminate_handler() { __cxa_eh_globals* globals = __cxa_get_globals(); __cxa_exception* thrown_exception = globals->caughtExceptions; @@ -785,6 +760,31 @@ void __cxa_free_dependent_exception(void *thrown_exception) } /** + * Callback function used with _Unwind_Backtrace(). + * + * Prints a stack trace. Used only for debugging help. + * + * Note: As of FreeBSD 8.1, dladd() still doesn't work properly, so this only + * correctly prints function names from public, relocatable, symbols. + */ +static _Unwind_Reason_Code trace(struct _Unwind_Context *context, void *c) +{ + Dl_info myinfo; + int mylookup = + dladdr(reinterpret_cast<void *>(__cxa_current_exception_type), &myinfo); + void *ip = reinterpret_cast<void*>(_Unwind_GetIP(context)); + Dl_info info; + if (dladdr(ip, &info) != 0) + { + if (mylookup == 0 || strcmp(info.dli_fname, myinfo.dli_fname) != 0) + { + printf("%p:%s() in %s\n", ip, info.dli_sname, info.dli_fname); + } + } + return _URC_CONTINUE_UNWIND; +} + +/** * Report a failure that occurred when attempting to throw an exception. * * If the failure happened by falling off the end of the stack without finding diff --git a/contrib/libs/cxxsupp/libcxxrt/ya.make b/contrib/libs/cxxsupp/libcxxrt/ya.make index 7915fb58be..f9eb8743d8 100644 --- a/contrib/libs/cxxsupp/libcxxrt/ya.make +++ b/contrib/libs/cxxsupp/libcxxrt/ya.make @@ -1,4 +1,4 @@ -# Generated by devtools/yamaker from nixpkgs 22.11. +# Generated by devtools/yamaker from nixpkgs 24.05. LIBRARY() |