stack-trace

What is a Stack Trace? [duplicate]

萝らか妹 提交于 2019-12-06 10:08:45
This question already has answers here : Closed 7 years ago . Possible Duplicate: CallStack determines where you are going next? Started from the comment in this question, I thought I knew what a Stack Trace was but I guess I didn't. I've Googled it but could find a clear answer. @asawyer says The stacktrace doesn't identify where you've been, it tells you where you are going next. Here is a little program using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Method1(); } private

Why does backtrace not contain Objective-C symbols regardless of -rdynamic?

心已入冬 提交于 2019-12-06 09:04:58
问题 Update: I'm working with the GNU-runtime on Linux. The problem does not occur on MacOS with the Apple-runtime. Update 2: I compiled the GNU-runtime on MacOS and build the example with it. The error does not occur on MacOS with the GNU-runtime. I would say the problem is the glibc (since backtrace and backtrace_symbols are glibc extensions). When printing a backtrace in a GCC compiled Objective-C app using backtrace and backtrace_symbols , I don't get any Objective-C symbols. Only the

Recursion done inside of a variable

喜欢而已 提交于 2019-12-06 08:55:53
问题 I am a bit confused on how the compiler does recursion if it is in a variable. The only way to easily explain the question is if I show an example. def recur_var(s1, s2): '''Test for recursion in variables.''' if s1 == '': return s2 elif s2 == '': return s1 else: test = recur_var(s1[:-1], s2[:-1]) if s1[-1] == '1' and s2[-1] == '1': return True return test The only recursion done in the above code is inside the variable that is above in priority over everything else, besides base cases. I

traceback.print_stack() using IPython's ultratb

被刻印的时光 ゝ 提交于 2019-12-06 08:14:33
For debugging/logging purposes, I would like to write the full stack to a file (such as in this question ). I can do this using traceback.format_stack() . However, I would like it to look like the more verbose tracebacks that IPython outputs, for example, formatting with IPython.core.ultratb.VerboseTB . It appears the classes and methods in IPython.core.ultratb require information on exceptions, as they are designed for tracebacks. But I have no exception: I just want to display the stack in a verbose way. How can I use the output methods of IPython.core.ultratb.VerboseTB to format the stack

Is the stack corrupted if the EBP frame pointer is NULL?

心已入冬 提交于 2019-12-06 08:13:44
My understanding of stack traces is essentially based on What is exactly the base pointer and stack pointer? To what do they point? . A program I have been helping to develop for years spits out a stack dump when it crashes, and I have become accustomed to evaluating these stack traces, in correspondence with a .map file that the C++ compiler produces. A number of times, I have successfully been able to walk the stack and debug issues. However, sometimes the stack trace has a NULL EBP (frame) pointer. Here is the relevant snippet from such a sample stack dump: Initial EBP pointer value:

IE hanging with 100% CPU / Got stack trace

你。 提交于 2019-12-06 05:01:25
I have a situation where IE7 hangs accessing my web app. Based on the excellent suggestion from George V. Reilly , I installed WinDbg to download the IE symbols, setup Process Explorer to use those symbols, and then used Process Explorer to get a stack trace for the hung thread. I have pasted the stack trace below. Does someone more familiar with the IE internals have an idea of what is happening, or a suggestion on how to progress with this? ntkrnlpa.exe!KiUnexpectedInterrupt+0x8d ntkrnlpa.exe!PsDereferencePrimaryToken+0x362 ntkrnlpa.exe!KiDeliverApc+0xb3 ntkrnlpa.exe!KiDispatchInterrupt

How to make gdb get stacktrace repeatably?

我只是一个虾纸丫 提交于 2019-12-06 04:48:38
问题 Like in for((;;)) { gdb -batch -n -ex 'set pagination off' -ex 'thread apply all bt' ffplay_g `pidof ffplay_g` >> /tmp/qq; } , but faster, without reloading GDB and symbols every time? Backtraces need to be taken by timer, not by triggering some breakpoints. 回答1: Use system sleep, this gdb command should do the trick: shell sleep 1 回答2: As recommended by the comment If you want to stick with gdb, then why not script a gdb session? Your controller process can sleep for 50 ms, then wake up,

madExcept, getting top of current stack

≡放荡痞女 提交于 2019-12-06 03:32:06
问题 In an delphi 2007 application, we have used madExcept to handle exeptions for us. We use the standard dialog, letting the user send us a report with mail if he want to. We want to add a little to this functionality. If the user choose not to send a full report, we still want to log the exception to a file, but not a full report. We want the exception class and message, and the source file and line number. The first two is easy, but I can't find a straight forward way of finding the latter. I

Is stacktrace information available in .NET release mode build?

无人久伴 提交于 2019-12-06 03:32:06
问题 If I choose release mode to build a dll, is the stacktrace information still available? If so, then what information is unavailable in release mode? 回答1: You always have stack trace information--that's a runtime feature unrelated to the build mode--but line numbers and source file names are normally unavailable in release build stack traces. You can get both line numbers and source file names in release build stack traces (including in exceptions) by altering the build configuration to create

How to get complete stack dump from profiler in every sample for use in flame graph?

走远了吗. 提交于 2019-12-06 03:18:58
I really like the idea of the Flame Graph for profiling since it will help in eliminating unneeded function calls. There is a catch however in that it requires the profiler to do a complete stack dump each time it collects a sample. This can be accomplished with DTrace or SystemTap quite easily, but I need to be able to do this on an ARM device running ubuntu (which eliminates DTrace). I would also like to do this without recompiling the kernel (which eliminates SystemTap). Is it possible to get Valgrind/Callgrind or OProfile (or some other profiling tool that can run on an ARM device in