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
12
votes
2 answers

How can I show lambda functions on backtraces?

I'm writing a C++11 software and I'm using lambdas. When I print the backtrace with backtrace_symbols_fd all functions are demangled except of lambda. It's a bit obvious because they are anonymous functions, but there is a way to get more insight…
Luca Marturana
  • 428
  • 2
  • 10
11
votes
9 answers

How to extract debugging information from a crash

If my C++ app crashes on Windows I want to send useful debugging information to our server. On Linux I would use the GNU backtrace() function - is there an equivalent for Windows? Is there a way to extract useful debugging information after a…
hoju
  • 28,392
  • 37
  • 134
  • 178
11
votes
2 answers

Retrieving backtrace from a panic in hook in Rust?

My application needs to send logs to fluentd as JSON format through stdout. While I'm trying to handle panics and arrange a &std::panic::PanicInfo as a JSON with std::panic::set_hook, I could not find a way to retrieve backtrace from a &PanicInfo. …
KUNIMI Taiyoh
  • 140
  • 1
  • 8
11
votes
3 answers

Is shoulda destroying my backtraces?

I have a test more or less like this: class FormDefinitionTest < ActiveSupport::TestCase context "a form_definition" do setup do @definition = SeedData.form_definition # ... I've purposely added a raise "blah" somewhere down the…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
11
votes
4 answers

Rails backtrace silencers do not work, while filters do

Fresh Rails 4.2 set up. I want to suppress long error backtraces. In the following backtrace log first line would be enough for me, and next 4 could be removed ActionController::RoutingError (No route matches [GET] "/user"): actionpack (4.2.1)…
Elder
  • 437
  • 5
  • 17
11
votes
2 answers

backtrace_symbols() with both -static and -rdynamic

Looking at this question and this question I can see that for backtrace_symbols() to work, one must compile with the -rdynamic flag. I've tried it into a test program and it works, but I'm writing a program that is also compiled with -static and…
Avio
  • 2,700
  • 6
  • 30
  • 50
10
votes
3 answers

stacktrace and functions in namespaces

I am trying to get a backtrace at some point of the execution of my (c++) program. for that I am using backtrace and backtrace_symbols. Something along this lines: std::string stacktrace( unsigned int frames_to_skip ) { std::string str; …
foke
  • 1,339
  • 2
  • 12
  • 20
10
votes
2 answers

gdb weird backtrace

My program is statically compiled with dietlibc. It is compiled on ubuntu x64 (compiled for x86 using the -m32 flag) and is run on a centos x86. The compiled size is only about 100KB. I compile it with -ggdb3 and no optimization flags. My program…
Paul Dugan
  • 103
  • 1
  • 4
10
votes
2 answers

How to trace a deadlock in Ruby

I use BrB to share a datasource for various worker processes in Ruby 1.9 that I fork with Process#fork: Thread.abort_on_exception = true fork do puts "Initializing data source process... (PID: #{Process.pid})" data = DataSource.new(files) …
Patrick Glandien
  • 7,791
  • 5
  • 41
  • 47
10
votes
2 answers

Any porting available of backtrace for uclibc?

We are running the uclibc linux on ARM 9. The problem is uclibc doesn't support backtrace. When a core dump happens, I cannot grab the call stack. Does anyone have a good solution for that? For example, an existing porting of backtrace for uclibc,…
user303967
  • 131
  • 2
  • 6
10
votes
2 answers

Visual C# backtrace: how to know where [external code] resides?

I am using visual c# to debug a large c# project. The project is very large and only some of the pdbs are build by myself. I can build all the pdb however it's very time consuming. I am debugging a backtrace but a part of the trace is marked with…
Bin Chen
  • 61,507
  • 53
  • 142
  • 183
9
votes
1 answer

What causes failure to unwind in a DWARF perf call stack?

In backtraces produced by perf record --call-graph dwarf and printed by perf script, I am consistently getting wrong addresses for maybe 5% of call stacks, i.e. unwinding fails. One example is my_bin 770395 705462.825887: 3560360 cycles: …
nnnmmm
  • 7,964
  • 4
  • 22
  • 41
9
votes
1 answer

GDB: Question about relative and absolute paths to files in backtraces

I have question about gdb or gcc (but not firefox). I see only absolute paths in gdb when i debugging firefox. Example: 5 0x01bb0c52 in nsAppShell::ProcessNextNativeEvent (this=0xb7232ba0, mayWait=1) at …
uintptr_t
  • 293
  • 1
  • 3
  • 9
9
votes
1 answer

What is RUST_BACKTRACE supposed to tell me?

My program is panicking so I followed its advice to run RUST_BACKTRACE=1 and I get this (just a little snippet). 1: 0x800c05b5 - std::sys::imp::backtrace::tracing::imp::write::hf33ae72d0baa11ed at…
boss revs
  • 331
  • 2
  • 4
  • 13
9
votes
1 answer

Different offset in libc's backtrace_symbols() and libunwind's unw_get_proc_name()

I make a stack trace at some point in my program. Once with libc's backtrace_symbols() function and once with unw_get_proc_name() from libunwind. backtrace_symbols() output: /home/jj/test/mylib.so(+0x97004)[0x7f6b47ce9004] unw_get_proc_name()…
tur1ng
  • 3,139
  • 5
  • 24
  • 31
1 2
3
27 28