callstack

Who is responsible for cleanup?

Hi I wish to know which one is responsible for cleanup of the stack suppose you have a function fun lets say like this :- var = fun(int x, int y, float z, char x); when fun will get called it will go into the stack along with the parameters then when the function returns who is responsible for cleanup of the stack is it the function...

Tail calls in architectures without a call stack.

My answer for a recent question about GOTOs and tail recursion was phrased in terms of a call stack. I'm worried that it wasn't sufficiently general, so I ask you: how is the notion of a tail call (or equivalent) useful in architectures without a call stack? In continuation passing, all called functions replace the calling function, and...

static methods and the call stack in IIS/asp.net

Theoretical question. If you have 100 separate requests coming to an aspx web page that calls the static method below. public static GeocodeResult GeocodeQuery(string query) { int train, tube, dlr = 0; // manipulate these ints if (train) { // do something important } } ...

Why don't Minidumps give good call stacks?

I've used minidumps on many game projects over the years and they seem to have about a 50% chance of having a valid call stack. What can I do to make them have better call stacks? I've tried putting the latest dbghelp.dll in the exe directory. That seems to help some. Is Visual Studio 2008 or 2010 any better? (I'm still on VS 2005). T...

How can I get the stack trace in Specman?

Is there any way to get the stack trace in Specman? I patched the functions that force signals to tell me when signals are forced. I want to be able to tell where the forcing originated. ...

Web Based Stack Dump Tool for ASP.NET Using Mdbg?

There is a great presentation by Dan Farino, Chief Systems Architect at MySpace.com, showcasing a web-based stack dump tool that catalogues all threads running in a given process (what they're doing, how long they've been executing, etc.) Their techniques are also summarized on highscalability.com: PerfCollector. Centralized collect...

How to get the name of the calling class in Java?

I would like some help on this matter, Example: public class A { private void foo() { //Who Invoked me } } public class B extends A { } public class C extends A { } public class D { C.foo(); } This is basically the scenario. My question is how can method foo() know who is calling it? EDIT: Basically ...

Why can I "fake" the stack trace of an exception in Java?

If I run the following test, it fails: public class CrazyExceptions { private Exception exception; @Before public void setUp(){ exception = new Exception(); } @Test public void stackTraceMentionsTheLocationWhereTheExceptionWasThrown(){ String thisMethod = new Exception().getStackTrace()[0].getMe...

What does each entry in the Jmp_buf structure hold?

I am running ubuntu 9.10 (karmic koala), and I took a look at the jmp_buf structure which is simply an array of 12 ints. When I use setjmp, and pass in a jmp_buf structure -- 4 out of 12 entries are saved off. These 4 entries are the stack pointer, frame pointer, program counter and return address. What are the other 8 entries for? Are t...

Is there a way to know the invoking method?

I know the class method tells what is the name of the class of an object, how could I know the name of the invoking method? Is there a way to know that? ...

VBA: Is there a call stack level limit?

I have a couple of colleagues looking at some bad code in Excel VBA, wondering is there a limit to the number of levels in a call stack ...

Answering "Which method called me?" at the run-time in .NET? Or is CallStack data readable by the code?

Presume that there are methodA() , methodB() and methodC(). And methodC() is called at the run-time. Is is possible to know methodC() is called from what method? I was thinking if CallStack can be read at the run-time for some checks? If yes, I think it should not be a big deal. Any ideas? Thanks! ...

JavaScript exception handling - displaying the line number

When catching / handling exceptions in JavaScript, how can I determine what the call stack was when the exception occurred? (and also if possible what the line number was) try { // etc... } catch (ex) { // At this point here I want to be able to print out a detailed exception // message, complete with call stack, and if pos...

Execution Path Specific Breakpoint

I would like Visual Studio debugger to break within a function only when the call is from a specific sequence of callers. Is there a way to set such a breakpoint? Or perhaps some alternative hack? I ask this in the context of native (C++) as well as managed (C#) code. ...

If the program counter points to the address of the next instruction to be executed, what do frame pointers do?

If the program counter points to the address of the next instruction to be executed, what do frame pointers do? ...

How can I monitor the Perl call stack?

I'm using ActivePerl 5.8 on Windows XP. use strict; use warnings; use Data::Dumper; There are three subroutines used in my script. To detect the call stack, I can only insert some print "some location"; and check the print result from console Window. Is there any good method to monitor it? Thank you. ...

What is a good resource to read about stack/heap and symbol table concepts?

Please suggest some website or some book that deals with these topics in really good detail. I need to have a better understanding of these concepts (in reference to C++): stack and heaps symbol tables implementation of scope rules implementation of function calls ...

Treating Warnings as Errors

I have a php application that I have just re-factored. Unfortunately it spewing out warnings like: Warning: preg_match() expects parameter 2 to be string, object given in /home/yacoby/dev/netbeans/php/Zend/Db/Select.php on line 776 Which is impossible (or very hard work) to work out the issue as I don't have a callstack so can't te...

Xcode - Call stack trace on assert?

Right now when one of my asserts is triggered in Xcode, I get the assert message, and a dump of the stack, which is full of numbers that are not very meaningful to me. In order to get a trace of the call stack, it requires me to debug the application, and run it up to the point where the assert occurred, and hope that it asserts again....

How do I pass arguments to C++ functions when I call them from inline assembly.

So, I would like to be able to call functions from a c++ dll. For certain reasons, I would like to call them from an __asm block in my C++ code. My question is this: I know that before I call the function, I have to push its arguments on the stack in the order specified by the function's calling convention.However, can i simply do someth...