stack-trace

Stack unwinding on HP-UX and Linux

依然范特西╮ 提交于 2019-12-05 08:51:49
I need to get the stack information of my C application in certain points. I've read the documentation and searched the Net but still cannot figure out how I can do it. Can you point to a simple process explanation? Or, even better, to an example of stack unwinding. I need it for HP-UX (Itanium) and Linux. Check out linux/stacktrace.h Here is an API reference: http://www.cs.cmu.edu/afs/cs/Web/People/tekkotsu/dox/StackTrace_8h.html Should work on all Linux kernels Here is an alternative example in C from http://www.linuxjournal.com/article/6391 #include <stdio.h> #include <signal.h> #include

How can I tell who calls System.gc()?

扶醉桌前 提交于 2019-12-05 05:43:47
In a running system, we see lots of "Full GC (System)" which indicates someone triggers System.gc(). Is there a way to find out where in the code this happens? I did search all the available source but found nothing suspicious so it must be somewhere, probably another app that's running in the same container or the container itself. You can change the Runtime class to log where gc() is being called to a file (System.gc() calls Runtime.gc()) To do this, edit a copy, compile it and add it to your -Xbootclasspath/p: However a high number of Full GC is more likely to be due to insufficient

Is it possible to track down which expression caused an NPE?

怎甘沉沦 提交于 2019-12-05 01:37:29
When I get an NPE, I'll get a stack trace with line number. That's helpful, but if the line is very dense and/or contains nested expression, it's still impossible to figure out which reference was null. Surely, this information must've been available somewhere. Is there a way to figure this out? (If not java expression, then at least the bytecode instruction that caused NPE would be helpful as well) Edit #1: I've seen a few comments suggesting breaking up the line, etc, which, no offence, is really non-constructive and irrelevant. If I could do that, I would have ! Let just say this modifying

How to enable stacktrace react-native run-android command?

∥☆過路亽.° 提交于 2019-12-05 01:31:58
I'm running a react native project via the react-native run-android . But during the build it fails stating that :react-native-device-info:processReleaseResources FAILED . Which doesn't give much info, so I tried running with react-native run-android --stacktrace as suggested but that isn't a recognized command. How can you enable stacktrace / verbose logging with react-native run-android command? This is the detail of the error which is too short to figure out at build: :react-native-device-info:processReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong:

Can I translate a stacktrace from minified code into a human readable stacktrace using sourcemaps?

时光毁灭记忆、已成空白 提交于 2019-12-05 01:23:25
I have some errors from minified code in production. I have sourcemaps not in production. I'd like to (after the fact) use source maps in a way to convert my stack trace into a human readable stack trace. Has anyone done this before? Velkumar I am also doing some research on the same, and come up with some reference. I am sharing those for you: https://github.com/janekp/mapstrace https://github.com/novocaine/sourcemapped-stacktrace https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/ Raygun developed a Source Maps Validator which let's you upload your

Java threads: interpreting thread states of a running JVM

╄→гoц情女王★ 提交于 2019-12-05 01:15:50
问题 A Java thread is always in one of the following ten states: NEW: Just starting up, i.e., in process of being initialized. NEW_TRANS: Corresponding transition state (not used, included for completness). IN_NATIVE: Running in native code. IN_NATIVE_TRANS: Corresponding transition state. IN_VM: Running in VM. IN_VM_TRANS: Corresponding transition state. IN_JAVA: Running in Java or in stub code. IN_JAVA_TRANS: Corresponding transition state (not used, included for completness). BLOCKED: Blocked

Perl: $SIG{__DIE__}, eval { } and stack trace

这一生的挚爱 提交于 2019-12-05 00:31:33
I have a piece of Perl code somewhat like the following (strongly simplified): There are some levels of nested subroutine calls (actually, methods), and some of the inner ones do their own exception handling: sub outer { middle() } sub middle { eval { inner() }; if ( my $x = $@ ) { # caught exception if (ref $x eq 'ARRAY') { print "we can handle this ..."; } else { die $x; # rethrow } } } sub inner { die "OH NOES!" } Now I want to change that code so that it does the following: print a full stack trace for every exception that "bubbles up" all the way to the outermost level ( sub outer ).

Getting stack trace for an error when running code from the console in Chrome

心不动则不痛 提交于 2019-12-04 22:49:27
问题 I am calling a function from the console but when it throws an exception I do not receive a stack trace like I would if the code was executed normally. Is there a way I can modify my command (perhaps with try/catch) to have it provide me this information? to clarify: page.js: function otherStuff() { return ['a','b',undefined,'c']; function doStuff() { var x = otherStuff(); var z = parseInt(x[2]); // this will throw an error } console, after loading a html page that links page.js > otherStuff(

Any way to avoid Property inline optimization in C#?

帅比萌擦擦* 提交于 2019-12-04 21:48:58
问题 So I have a PropertyBag class that is intended to implement INotifyPropertyChanged. In order to make this code work as cleanly as possible and to avoid user error, I am using the stack to get the property name. See, if the property name doesn't match the actual property exactly, then you will have a failure and I am trying to protect from that. So, here is an example usage of the class: public class MyData : PropertyBag { public MyData() { Foo = -1; } public int Foo { get { return GetProperty

System.Net tracing in Powershell

坚强是说给别人听的谎言 提交于 2019-12-04 20:33:09
I am trying to get tracing set up for Powershell(ISE) and I came across this link , but I am running debugView, and nothing seems to be happening. Anyone know what I am doing wrong? Basically my goal is to get tracing for System.Net.Webrequest working in powershell. If there is another way to do it, I'd also be open to that. The answer - which is mine funnily enough - in that link refers to the regular console (powershell.exe) version of powershell. I have to ask some dumb questions: You created a powershell_ise.exe.config file, not powershell.exe.config, right? If you're viewing dbgview over