Questions tagged [backtrace]

A backtrace is the series of currently active function calls for the program.

On linux and mac, it is possible to obtain the backtrace using the backtrace() function.

417 questions
5
votes
2 answers

UIResponder doesNotRecognizeSelector

I'm getting lots of crashes with the following backtrace and I can't find the cause for it. According to Apple -[NSObject(NSObject) doesNotRecognizeSelector:] occurs when a new object is allocated in the memory previously occupied by the deallocated…
ChrisTheGreat
  • 512
  • 4
  • 21
5
votes
2 answers

Is there a production safe version of Function.caller in Javascript?

Is there a way to return the function that invoked the current function? Function.caller will only work for non-strict mode applications. I want to be able to use this functionality for production environment, therefore I need strict mode to be…
dwen
  • 141
  • 2
  • 7
5
votes
2 answers

After the Ruby interpreter segfaults, is it possible to get the Ruby backtrace from the corefile?

Note: I'm using a segfault that I encountered whilst using the libxml-ruby gem to illustrate the question, but I've since fixed my problem with said gem. What this question is really about is viewing the Ruby backtrace (i.e. the same thing the…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
5
votes
1 answer

OS X kernel panic diagnostics. How to translate backtrace addresses

I'm debugging a driver that cause kernel dump on my mac. It shows long backtrace composed out of series of addresses: panic(cpu 6 caller 0xffffff8004dc9986): trying to interlock destroyed mutex (0xffffff8049deedb0) Backtrace (CPU 6), Frame :…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
5
votes
0 answers

iOS display backtrace with method names also in released product

I wanted to have a backtrace with the classes and method names displayed every time the app crashes. I managed to do it in debug mode, using this code (the printTrace function just prints the string on a file.): void HandleException(NSException…
Deboroh88
  • 391
  • 1
  • 6
  • 20
5
votes
3 answers

C++ get backtrace of a different thread

I am looking to understand what is the state of a specific thread in my software, doing it from another thread. Specifically I'd like to know if it's I/O stuck. I was thinking of doing it by getting the backtrace(unless someone has another idea?),…
Alon
  • 1,776
  • 13
  • 31
5
votes
3 answers

GDB backtrace does not show the function names

I compiled my library (specifically protbuf-2.3.0) using -g -O0 on a SunOS 5.10. A sample line in the make log is this: /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pthreads -Wall -Wwrite-strings…
Franz See
  • 3,282
  • 5
  • 41
  • 48
5
votes
1 answer

SymFromAddr returns ERROR_INVALID_ADDRESS flag, how to get stack trace in mingw?

All I try to do is to print stack of methods that called a given line. I got code from https://stackoverflow.com/a/5699483/393087 answer. Slightly refactored it to show where lies the problem. #include #include #include…
rsk82
  • 28,217
  • 50
  • 150
  • 240
5
votes
0 answers

Getting symbolicated stack traces from backtrace_symbols() in iOS 6

Prior to iOS 6, calling callStackSymbols() (also what -[NSException callStackSymbols] uses) would provide human readable stack frames. However, with iOS 6, this no longer the case and only addresses are provided (eg 57 CoreFoundation …
BergQuester
  • 6,167
  • 27
  • 39
5
votes
2 answers

backtrace function inside shared libraries

I'm trying to obtain and save a stack trace to a file after I get SEGSEGV inside my shared library. The shared library is a plugin for a closed-source product. All this works on production and I don't have a direct access to it. My code catches…
Dmitry
  • 183
  • 2
  • 8
4
votes
3 answers

How to fix backtrace line number error in C++

I got a problem while wants to trace some information on program catches exceptions. I used the function below: extern "C" void log_backtrace() { // Dump the callstack int callstack[128]; int frames = backtrace((void**) callstack,…
Jason Cheng
  • 315
  • 1
  • 3
  • 8
4
votes
1 answer

Linux(MIPS): Temporarily "change" register contents when viewing core dump

Some of the threads in my app are sat in optimized functions and when I debug the app, gdb can't backtrace from those functions. But I've looked at the assembler and can partially unwind the stack by hand up to the previous function's frame by doing…
gimmeamilk
  • 2,016
  • 5
  • 24
  • 36
4
votes
2 answers

PHP trace for Form post

A little background, I have a client that has a legacy php site that has been converted to python/django in the last 12 months. However they are still using the php site while phasing it out. Some new data is gathered in the old system and…
Cyrus Cold
  • 269
  • 2
  • 11
4
votes
1 answer

Export full callstack/backtrace from `xctrace` report

Context: We're trying to add xctrace support for inferno, a rust library used to generate flamegraphes. Actual issue can be found here. This question was previously asked on apple developer forums, without luck so far. Flamegraphes are built by…
Kraktus
  • 41
  • 3
4
votes
3 answers

Function calls seen before _start and main in backtrace

I received a backtrace of my program (qt app running on RHEL 5.3) from a coworker and as I was analyzing it I found something I could not explain. If you look at this backtrace, you will notice the trace for main and _start. But before that we see…
yan bellavance
  • 4,710
  • 20
  • 62
  • 93