Questions tagged [debug-backtrace]

debug_backtrace() is a PHP function that prints the backtrace.

debug_backtrace() is a PHP function that prints the backtrace. A backtrace is a summary of how your program got where it is. It shows one line per call, for many calls, starting with the currently executing call (call zero), followed by its caller (call one), and on up the stack.

67 questions
28
votes
5 answers

debug_backtrace() from registered shutdown function in PHP

While tinkering for an answer to this question, I found that debug_backtrace() doesn't trace beyond the function registered to register_shutdown_function(), when called from within it. This was mentioned in this comment for…
Dan Lugg
  • 20,192
  • 19
  • 110
  • 174
17
votes
8 answers

Custom console log function, a console.log wrapper

function log( msgOrObj ){ if(dev_mode){ console.log({ 'message': msgOrObj, 'caller': arguments.callee.caller.toString() }); } } So, I have attempted to write a simple custom console log function (as…
user1037355
14
votes
2 answers

Console is not supported for a recorded stack frame, in debug mode

I am not able to backtrace using the bt command in debug mode after crash. I have searched but did not get the solution. I have tried [NSThread callStackSymbols], but it gives the same message in console: Console is not supported for a recorded…
Sanoj Kashyap
  • 5,020
  • 4
  • 49
  • 75
10
votes
1 answer

Useful Xcode DEBUG commands to use in console

I've been wondering but haven't found anywhere an useful list of commands that are useful in Xcode. One I know, and I use a lot is Backtrace which the input command is bt , after you encounter an app crash after uncaught exceptions it sometimes…
Ivan Cantarino
  • 3,058
  • 4
  • 34
  • 73
9
votes
1 answer

GDB bt error: "Not enough registers or memory available to unwind further"

The backtrace from core-file cut the useful information due to this: Backtrace stopped: Not enough registers or memory available to unwind further. Why this message occurs and can I do something about it?
Yodo
  • 148
  • 1
  • 5
8
votes
1 answer

GDB backtrace on child process

I have a application which forks a child process. Child process does some work and somewhere in the middle it gives Segmentation fault. I used GDB to debug this, I used: set follow-fork-mode child I have also set a breakpoint to a function within…
broun
  • 2,483
  • 5
  • 40
  • 55
7
votes
2 answers

How to interpret backtrace addresses for debugging with GDB

I am using backtrace() and backtrace_symbols() to output backtrace on SIGSEGV and other signals in format like this: 0: [0xb750818] 1: /opt/server/libQtScript.so.4(+0x6f42a) [0xb782c42a] 2: /opt/server/libQtScript.so.4(+0x7bffc) [0xb7838ffc] 3:…
Vincas Dargis
  • 535
  • 5
  • 14
6
votes
1 answer

PHP debug_backtrace() called by register_tick_function() does not return the full stack

I want to use register_tick_function() to hook the following calls and print their stack trace with debug_backtrace(). If I run the following code.
Emilio
  • 3,901
  • 11
  • 44
  • 50
6
votes
2 answers

Analyze backtrace of a crash occurring due to a faulty library

In my application I have setup signal handler to catch Segfaults, and print bactraces. My application loads some plugins libraries, when process starts. If my application crashes with a segfault, due to an error in the main executable binary, I can…
mdk
  • 6,225
  • 1
  • 25
  • 30
5
votes
1 answer

Is there a way to do a "forward trace" in PHP?

I'm familiar with the debug_backtrace function in PHP, and really find it useful. However, I have a specific, very messy case where I need to be able to do the reverse - stick a function call in somewhere and have it give me a list of every function…
EmmyS
  • 11,892
  • 48
  • 101
  • 156
4
votes
2 answers

What the debug_backtrace() exactly works in php?

While working on one of my PHP project I got a function debug_backtrace() at the start of code file as . While studding on it I got some explanation that it works as: Debugging…
Ganesh Aher
  • 1,118
  • 3
  • 21
  • 51
4
votes
1 answer

PHP-FPM segfault error 6

i have a problem with php5-fpm. Very often it gets a segfault and is blocking the whole php processing, so no answer is serve to the client. For me the backtrace is looking like a infinite loop, but i don't see if it is cause by a script or an…
4
votes
1 answer

Kernel oops Oops: 80000005 on arm embedded system

Please help me to solve this Oops. I use a 1 milli sec high resolution timer and installing it as a seperate module with "insmod". This fires every 1 ms and i have to do some task with this timer interrupt. There are other processes which does image…
Ashoka K
  • 453
  • 3
  • 6
  • 17
3
votes
1 answer

Tracing each function calls in PHP

I am trying to create a tracer log in my PHP application. Turning on the debug mode will start to track the flow of the function. Below is what I am expecting as my implementation: function callA(x) { ... } //XYZ.php function callB() { ... callA(1)…
Veer Shrivastav
  • 5,434
  • 11
  • 53
  • 83
3
votes
1 answer

Stack frame NULL in backtrace log

My application is receiving the segmentation fault. The back trace log - Program received signal SIGSEV, Segmentation fault. 0x00000000004a5c03 in engine_unlocked_finish () (gdb) bt #0 0x00000000004a5c03 in engine_unlocked_finish () #1 …
Mahesh
  • 34,573
  • 20
  • 89
  • 115
1
2 3 4 5