stack-trace

Get line number of first-chance exception

£可爱£侵袭症+ 提交于 2019-12-23 07:38:16
问题 I'm getting exceptions thrown from somewhere, but all I get from the compiler is "A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll". This is fairly useless to me, as that's not my code (pretty sure it's default library). I'd like to see a stack-trace or something so I know where in my code things went wrong. It's a fairly large codebase (much of which is not mine), and there's a lot of multi-threading and other stuff going on, so it's nearly

Delphi obtain stack trace after exception

∥☆過路亽.° 提交于 2019-12-23 07:36:20
问题 I'm trying to figure out how to obtain a stack trace after an exception is thrown in Delphi. However, when I try to read the stack in the Application.OnException event using the function below, the stack already seems to be flushed and replaced by the throwing procedures. function GetStackReport: AnsiString; var retaddr, walker: ^pointer; begin // ... // History of stack, ignore esp frame asm mov walker, ebp end; // assume return address is present above ebp while Cardinal(walker^) <> 0 do

Get name from variable in calling method - creating calling method signature, parameters and values

不羁岁月 提交于 2019-12-23 04:57:14
问题 I'm looking for a way to get hold of the name of a variable that was passed into an extensionmethod. I want to have the name of the parameter in the calling variable. Sounds strange, let me explain. assume this piece of testing code private static void TestingMethod(string firstParam, int secondParam, bool thirdParam) { try { throw new InvalidOperationException("This named optional params stuff, it's just not working boss"); } catch (Exception ex) { GenericLog_Exception(ex, "it's on fire,

Is showing the Exception StackTrace useful in a RELEASE assembly or only a DEBUG .dll

不想你离开。 提交于 2019-12-23 04:21:11
问题 I've gone to some lengths to improve the error handling in my webservice - in particular, showing the StackTrace as in this example: catch (Exception ex) { EventLog log = new EventLog(); log.Source = g_EventSource; StringBuilder msg = new StringBuilder("Exception in UpdateRecord method has been logged:"); msg.Append(Environment.NewLine); msg.Append("passedURL="); msg.Append(passedURL); msg.Append(Environment.NewLine); msg.Append(ex.Message); msg.Append(Environment.NewLine); msg.Append(ex

cygwin_exception::open_stackdumpfile: Dumping stack trace to *.exe.stackdump

时间秒杀一切 提交于 2019-12-23 03:11:03
问题 I am getting "cygwin_exception::open_stackdumpfile: Dumping stack trace to TestProject.exe.stackdump" error. My project is nothing but a C++ HalloWorld project that contains an additional class in which I set and get a variable. I am getting this error at the line I try to set a matrix variable of type Eigen. Here is my code: TestProject.cpp #include <iostream> #include "TestClass.hpp" using namespace std; int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! TestClass

iOS - Symbolicate Stack trace symbols

﹥>﹥吖頭↗ 提交于 2019-12-23 01:15:02
问题 I want to symbolicate the stack trace symbols logged using [NSThread callStackSymbols] to identify the full stack backtrace calls. But, this doesn't give symbolicated trace. 0 TestApp 0x0029616f TestApp + 1823087 1 TestApp 0x003ef18d TestApp + 3236237 2 UIKit 0x2ab7bb1f <redacted> + 438 3 UIKit 0x2ac0bea3 <redacted> + 306 4 UIKit 0x2ab7bb1f <redacted> + 438 5 CoreFoundation 0x2757546d <redacted> + 48 6 CoreFoundation 0x2756e4c3 <redacted> + 234 7 UIKit 0x2ab7bc9b <redacted> + 818 8 UIKit

Accessing caller information quickly

和自甴很熟 提交于 2019-12-22 12:28:14
问题 I'm working on an aspectj aspect which needs to know where it's invoked from. At the moment I'm using new Throwable().getStackTrace(); to access this information but each aspect is taking several hundred microseconds to run. I've looked at the SecurityManager but that only seems to be able to get me the class name. Are there any other alternatives I've missed? Update JMH Benchmark results referred to in my comment on @apangin's answer: Benchmark Mode Cnt Score Error Units MyBenchmark

backtrace() function during fault (SIGSEGV) signal handler

馋奶兔 提交于 2019-12-22 12:24:08
问题 I have read (see here) that "common practice" to print a stack trace using backtrace() during a fault signal handler (e.g. when handling SIGSEGV ) under Linux is to: 1 Get the instruction pointer ( EIP or RIP ) from the undocumented sigcontext structure. 2 Replace the 2nd frame in the stack trace with the instruction pointer, since the first frame is the signal handler, and the 2nd frame is supposed to be within libc in the sigaction code, which has overwritten the original frame in which the

Why do my exception stack traces always point to the last method line?

笑着哭i 提交于 2019-12-22 11:27:46
问题 I have a problem with my Visual Studio installation. When I got an exception I always have incorrect line numbers in it's stack trace. There are always point to last line of each method in my codebase. At the same time it's OK when I'm tracing programs with debugger. What's happed with PDBs? No, I'm not re-throwing exception at each method. In each line of stack trace I have last row of corresponding method, while exception had thrown by statement in the middle. 回答1: Sounds like you're

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

…衆ロ難τιáo~ 提交于 2019-12-22 10:01:22
问题 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