Questions tagged [libunwind]

43 questions
0
votes
0 answers

Exception Handling in C++ Implementation: What is the "alternative function entry point", entered by the unwinding library to destruct local objects?

Here is a very simple file in c++ class C { public: C(){} ~C(){} }; void g() { throw std::exception(); } void f() { C c; g(); } int main() { return 0; } LLVM produces the following (please note the comment I've added,…
alex35833
  • 107
  • 6
0
votes
1 answer

How to properly build & link the libunwind library

I need to build the libary libunwind(https://github.com/libunwind/libunwind) on my ubuntu x86_64 pc for my pc and compile and link everything with g++. I am able to build some files, including the static library file libunwind.a but I just cannot…
0
votes
1 answer

Cross-compiling libunwind results in a missing shared library

I'm trying to cross-compile libunwind to aarch64 architecture using the following command: ./configure --prefix=/home/test/libunwind/arm_build --libdir=/home/test/libunwind/arm_build/lib --target=aarch64 --host=x86_64…
Jay
  • 373
  • 1
  • 10
0
votes
0 answers

Wrong value when unwinding for the IP register on Mac M1 program

I am trying to use unwind in Mac M1 but getting the wrong results. here is my program (I took one of the unwind tests). /* libunwind - a platform-independent unwind library Copyright (C) 2001-2004 Hewlett-Packard Co Contributed by David…
yehudahs
  • 2,488
  • 8
  • 34
  • 54
0
votes
0 answers

How to reduce the overhead of libunwind

I am working with the following scenario: I need to get the call stack at the entry point of some APIs. So I wrote some wrappers and use libunwind to perform stack backtracing before executing the real API. For example: #include void…
flyingrose
  • 107
  • 2
  • 11
0
votes
0 answers

could not dump fully backtrace with libunwind

int do_backtrace() { unw_cursor_t cursor; unw_context_t context; unw_getcontext(&context); unw_init_local(&cursor, &context); char buf[2048+1]; int len = 0; memset(buf, 0, sizeof(buf)); int n=0; while ( unw_step(&cursor) ) { …
jackion
  • 1
  • 2
0
votes
1 answer

How to check if a pre-compiled libtcmalloc.so is compiled without libunwind?

I do not know where to even start, apologies for the noob question but seems there's nothing on this specific case in SO unless there's more generic terms I do not know.
mlj
  • 13
  • 2
0
votes
1 answer

moviepy libunwind: pc not in table, pc=0xFFFFFFFFFFFFFFFF

Inside msys mingw 64 I run this: Χρήστος@Chris-pc MINGW64 /c/Python/Scripts/Papinhio player/src/main/python_files $ python Python 3.8.9 (default, Apr 13 2021, 15:54:59) [GCC 10.2.0 64 bit (AMD64)] on wi n32 Type "help", "copyright", "credits" or…
Chris P
  • 2,059
  • 4
  • 34
  • 68
0
votes
1 answer

Why does cmp instruction cost too much time?

I am trying to do profile with libunwind (using linux perf), with perf top monitoring the target process, I get this assembly time cost screen: 0.19 │ mov %rcx,0x18(%rsp) …
prehistoricpenguin
  • 6,130
  • 3
  • 25
  • 42
0
votes
1 answer

Getting module addresses with libunwind

I extract the instruction pointer from a stackframe using libunwind like this: unw_get_reg ( &cursor, UNW_REG_IP, &ip ); However, this only gives me the dynamic addresses of the function pointers. I would like to receive the static addresses in the…
Desperado17
  • 835
  • 6
  • 12
0
votes
1 answer

How to test API that just returns system values?

Let's say for example we have a routine int unw_getcontext(unw_context_t *ucp) The unw_getcontext() routine initializes the context structure pointed to by ucp with the machine-state of the call-site. The exact set of registers stored by…
embedc
  • 1,485
  • 1
  • 6
  • 20
0
votes
1 answer

Is libunwind implementation of abi in libcxxabi?

I was trying to build libcxx/libcxxabi/libunwind when I realized that I didn't actually understand what role they play. I checked libcxxabi spci, and found that it defines API used in C++ exception. But I can't find any document about libunwind, …
JiaHao Xu
  • 2,452
  • 16
  • 31
0
votes
0 answers

Using gperftools with a Jetson TX1 dev kit

I've been recommended gperftools to simply and quickly profile my code. Furthermore, the integration of -lprofiler was already done in the CMAKE of the code I got. Now that I migrated the source code on to the Jetson TX1 and that it worked well,…
Kriegalex
  • 423
  • 6
  • 17
1 2
3