callstack

in javascript get the callstack that lead to error

落花浮王杯 提交于 2019-12-05 08:49:26
The problem is not getting the callstack in general, which can be done as described here: http://eriwen.com/javascript/js-stack-trace/ but rather in accessing the callstack that triggered the event, from the handler of the event. In particular I'm interested in logging the callstack from the window error event window.onerror = function(msg, url, line) { //callstack // would be nice to have. //log callstack or whatever. (note this can be done w/ ajax and service, and is not the question at hand. } but I do know how to log the error. (I use jquery's .ajax , and a service) Will browsers make this

How to decode a Windows CE call stack?

雨燕双飞 提交于 2019-12-05 02:44:43
问题 Desktop Windows OSs have a "StackWalk64" function, upon which Jochen Kalmbach made a library for decoding the call stack into something human-readable. I need a similar tool, but for Windows CE. WinCE has a function to get the call stack, GetThreadCallStack, but once I have the raw return addresses, how do I Determine the module (DLL or EXE) from each program counter? Determine the function that contains the address, using my .map or .pdb files? PS. If it helps anyone, I also found OS

Javascript backtrace

江枫思渺然 提交于 2019-12-05 02:20:42
How to I get a backtrace in Javascript? Ideal features: entry function name, or some meaningful identifier for anonymous functions, argument list at each level, line numbers. Can this be done in standard ECMAScript? If not, can it be done in the common web browser dialects? Thanks. Edit -- Thanks for your suggestions. My dialect doesnot support arguments.caller or arguments.callee . I can do this: try { let x = null; x .foo (); } catch (e) { debug (dump (e.stack)); } Which gets me the information as a string, which is okay for at-a-glance, but it would be a great help to walk e.stack . Does it

How to Inspect Call Stack

三世轮回 提交于 2019-12-05 02:12:29
Would it be possible to see the CallStack in VBA for MS Access 2003? That is to say, would it be possible to see from what procedure or function another function was called? There is no programmatic way in VBA to view the call stack that I know of. The usual solution to this problem is to use some structure to track calling of functions, but it always seems like a kludge to me, and really of use only when programming (not at runtime), in which case it seems to me that the VBE's built-in capability for seeing the call stack is sufficient. And, BTW, I always put the call stack button on my VBE

Does a stack frame really get pushed onto the stack when a function is called?

旧城冷巷雨未停 提交于 2019-12-04 19:55:01
The way I've been taught for quite some time is that when I run a program, the first thing that immediately goes on the stack is a stack frame for the main method. And if I call on a function called foo() from within main, then a stack frame that is the size of the local variables ( automatic objects) and the parameters gets pushed onto the stack as well. However, I've ran into a couple things that contradict this. And I'm hoping someone can clear up my confusion or explain why there really aren't any contradictions. First contradiction: In the book, "The C++ Programming Language" 3rd edition

“[Lightweight Function]” in the call stack

家住魔仙堡 提交于 2019-12-04 17:06:18
问题 I'm debugging a program (VS2008), and I was stepping through lines of code. I came across one line where a delegate function was being called, and I tried to step into it. However, rather than stepping into the method as I expected, the method was bypassed, with the debugger instead stepping into what I assume is a function called by the delegate. In the call stack, the line where I expected the delegate method to be is greyed out with the text [Lightweight Function] . What does the

HOWTO get the correct Frame Pointer of an arbitrary thread in iOS?

烈酒焚心 提交于 2019-12-04 11:55:52
Way to get the Frame Pointer On a Demo App running on iPhone 5s Device / Xcode 7, I tried to get the frame pointer of an arbitrary thread using thread_get_state , but always result in an incorrect one : - (BOOL)fillThreadState:(thread_t)thread intoMachineContext:(_STRUCT_MCONTEXT *)machineContext { mach_msg_type_number_t state_count = MACHINE_THREAD_STATE_COUNT; kern_return_t kr = thread_get_state(thread, MACHINE_THREAD_STATE, (thread_state_t)&machineContext->__ss, &state_count); if (kr != KERN_SUCCESS) { char *str = mach_error_string(kr); printf("%s\n", str); return NO; } return YES; } I read

How to get a full call stack in Visual Studio 2005?

若如初见. 提交于 2019-12-04 09:54:05
How can I get a full call stack for a c++ application developed with Visual Studio 2005? I would like to have a full call stack including the code in the system libraries. Do I have to change some settings in Visual Studio, or do I have to install additional software? Get debug information for all project dependencies. This is specified under the "Configuration Properties -> C/C++ -> General" section of the project properties. On the menu, go to "Tools -> Options" then select "Debugging -> Symbols". Add a new symbol location (the folder icon) that points to Microsoft's free symbol server

Confused with Java Memory Management (Stacks and Heaps)

一世执手 提交于 2019-12-04 09:12:20
This might sound stupid but I am still not clear about the Java Stack and the memory heap. What I know from studying is following: 1) All the method calls goes on stack. 2) All the memory allocated locally goes on memory heap (not very clear about this point) 3) All the memory allocated by new operator (either in a method or in a class) goes on memory heap. I am worried about the below cases: 1) If I create a int variable in a method and return it, where does it go ( I believe it goes on stack, but need clarification). 2) If I create a new object in a method it goes on heap memory as it exists

Create function call dynamically in C++

∥☆過路亽.° 提交于 2019-12-04 07:14:27
Hello people I hope you an help me out with this problem: I am currently implementing an interpreter for a scripting language. The language needs a native call interface to C functions, like java has JNI. My problem is, that i want to call the original C functions without writing a wrapper function, which converts the call stack of my scripting language into the C call stack. This means, that I need a way, to generate argument lists of C functions at runtime. Example: void a(int a, int b) { printf("function a called %d", a + b); } void b(double a, int b, double c) { printf("function b called