callstack

Stack calling convention between .NET & C on WinCE 6.0

Hi there. I'm porting a DLL written in C from WinCE 5.0 to WinCE 6.0 on an ARM target. This DLL is called by a .NET software. On WinCE5.0, everything runs fine. On WinCE6, I have the following problem: on InitInstance() of my DLL, I can call anything without problem (for example MessageBox()) or uses recursivity. Passed that point, th...

Need a way to periodically log the call stack/stack trace for EVERY method/procedure/function called

I'm working on a very large application where periodically I'd like to log the ENTIRE call stack up until the current execution point (not on an exception). The idea here is that I want a map of the exact code path that led me to the point that I am. I have been working with madExcept, tooled around with jclDebug and while I can get so...

If the call stack gets corrupted, would that crash only the current thread, or my entire application?

I'm a noob when it comes to threading in C#, and I'm not sure if each thread is supposed to have its own call stack? Basically, if I get a "Run-Time Check Failure #0 - The value of ESP was not properly " , would that crash only the thread in which it occured, or the entire program? ...

What is an execution frame?

In C#, what is an execution frame (also related to this I have heard of activation frame). IIRC it is a slot where method parameters go but cannot remember all of the details. Thanks ...

How are exceptions allocated on the stack caught beyond their scope?

In the following code, the stack-based variable 'ex' is thrown and caught in a function beyond the scope in which ex was declared. This seems a bit strange to me, since (AFAIK) stack-based variables cannot be used outside the scope in which they were declared (the stack is unwound). void f() { SomeKindOfException ex(...); throw ...

functions in assembler

hi, i have philosophised about the purpose of stack a little bit and after some coding i figured out what is it's strength. The only thing that lies in my stomache is how does it work with functions? I tried to make some easy function for adding two numbers using universal registers but I suppose that's not how does it work in C for exa...

powershell capture call stack after an error is thrown

Hi, I want to do something like this... try { # Something in this function throws an exception Backup-Server ... }catch { # Capture stack trace of where the error was thrown from Log-Error $error } Ideally I'd like to capture arguments to the function and line numbers etc. (like you see in get-pscallstack) E...

How can I see the stack trace in Octave's debug mode

I have a failure in some inner library function in Octave. I want to debug the calling function, but I don't know how to do it. How can I see the stack trace? How can I move between frames? ...

A function's static and dynamic parent

I'm reading Thinking in C++ (vol. 2): Whenever a function is called, information about that function is pushed onto the runtime stack in an activation record instance (ARI), also called a stack frame. A typical stack frame contains (1) the address of the calling function (so execution can return to it), (2) a pointer to...

Boost Unit testing memory reuse causing tests that should fail to pass

We have started using the boost unit testing library for a large existing code base, and I have run into some trouble with unit tests incorrectly passing, seemingly due to the reuse of memory on the stack. Here is my situation: BOOST_AUTO_TEST_CASE(test_select_base_instantiation_default) { SelectBase selectBase(); BOOST_CHEC...

How to return string name of calling method?

Right now my code works as such: def method_a self.method_b ==> 'method_b' end def method_b puts self.name_of_calling_method end def name_of_calling_method if /`(.*)'/.match(caller.first) return $1 else return nil end end Instead of method_b printing 'method_b', how can I print the name of the calling method -...

How can we get Function name from Spack Pointer(reg/SP) on Linux?

Hi, i am using ptrace to get information related to Callstack on Linux. i can retrieve Spack Pointer to my stack using register returned by ptarces. but using this stack pointer how can i retrieve information related to Function name and signature of current call stack? are there any Linux APIs to traverse this callstack? please help....

Java return to position N in call stack.

Using the return keyword in Java code will return execution to the last piece of calling code in the call stack. If object foo calls baz.bar(), the return keyword in the bar method will continue code execution in foo. Let's say I have object foo that calls foofoo that calls foofoofoo in the above scenario, and foofoofoo calls baz.bar()....

How do I set properties related to the calling method's scope?

I'm not looking for a way to associate values with a thread using the 'SetData' method. I need to store some kind of data that will only exist during the scope of a calling method, could be the immediate parent or any other call that is made down on the stack. For example: void SomeMethod() { string someInfo = "someInfo"; SomeOth...

Complex JavaScript. What called me?

Project I'm working on uses jQuery. I have a series of Ajax calls being made that load() other HTML fragments which in turn load() other fragments. The whole thing is confusing. I didn't write the code. Is there any tool which will allow me to walk the callstack so I can figure what is calling a method? any browser tools that would he...

Inheritance in Java

Hello, recently I went through the inheritance concept. As we all know, in inheritance, superclass objects are created/initialized prior to subclass objects. So if we create an object of subclass, it will contain all the superclass information. But I got stuck at one point. Do the superclass and the subclass methods are present ...

Codeigniter pre_system hook for DB driven dynamic controller selection - best approach?

Although I can tentatively see a solution to this, I was wondering if there may be a glaringly obvious simpler approach. My aim is to use the first segment of a given URI to query the DB as to which controller should be run. I assume I would have to reform the URI with the resultant controller name in segment 1, then allow the system ...

Ways to optimize Android App code based on function call stack?

I've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct? So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such ...

How to get full callstack of FaultException

Hi, I have a WCF service that throws an exception. I get a FaultException in the client without an InnerException. I only have part of the callstack of the original exception, from which it's hard to understand what caused this. How do I get the original exception or at least all the callstack? Thanks. ...

Could it be that the stack size of a Web Service is smaller than that of a Window Application?

Possible Duplicate: Webservice creates Stack Overflow Hi, I have a program that includes a recursive function. This function when executed in a Windows Application works just fine, and when used in a Webservice, it works fine when the webservice is initiated by the VS (it assigns a random port), but this function return a sta...