I know data in nested function calls go to the Stack.The stack itself implements a step-by-step method for storing and retrieving data from the stack as the functions get called or returns.The name of these methods is most known as Prologue and…
What's the rationale behind dropping the frame pointer on 64-bit architectures by default? I'm well aware that it can be enabled but why does GCC disable it in the first place while having it enabled for 32-bit? After all, 64-bit has more registers…
I have an unusual case where I have a very simple Exception getting thrown and caught in the same method. It isn’t re-thrown (the usual kind of problem naïve programmers have). And yet its StackFrame contains only one the current method. Here’s…
In Java, is there any way to view the complete, untruncated stack trace (e.g. by increasing the number of frames recorded), or otherwise get at the bottom of a stack trace? Normally the stack trace is truncated from the top at 1024 frames worth,…
When using reflection it is possible to obtain the call stack (apart from that it can be a crude approximation due to JIT optimizations) using System.Diagnostics.StackTrace and examine the StackFrame objects contained.
How can I get a reference to…
I'm using VS2010 to develop my project. In my codebase, I use the stackframe's GetFileLineNumber() function. At runtime, however, it always returns 0. This happens even though I am running a debug build. I have also confirmed that the generated pdb…
Say I have a function where depending on some runtime condition an expensive automatic object is created or a cheap automatic object is created:
void foo() {
if (runtimeCondition) {
int x = 0;
} else {
SuperLargeObject y;
…
Following my previous question, in which I wanted to dump all the variables in the stack (from the current and all the previous frame) that can be seen here: Is there a way to examine the stack variables at runtime in C#?
I was suggested to…
I read that when a function call is made by a program, the called function must know how to return to its caller.
My question is: How does the called function know how to return to its caller? Is there a mechanism working behind the scenes through…
As part of answering another question, I wanted to show that the insane level of optimisation of gcc (-O3) would basically strip out any variables that weren't used in main. The code was:
#include
int main (void) {
char bing[71];
int…
I want to use spring insight to trace my spring mvc webapp. When starting up the tc server 2.5 developer edition, my application comes up but I see following message in the console:
20.10.2011 09:24:24…
I ran into a Win64 debugging problem where it looks like we are "missing" debug info. So I did some research and re-created all my .dproj files for our flagship product. This helped, as I got my "missing" blue balls back.
But now I run into a new…
I have a few questions about EBP, ESP and stack frame in following code.
Why did we subtract 28 from esp? We have two local variables x and y in main. So why didn't we subtract 8?
And don't we put values to stack from right (or top) to left (or…
I know this topic has been covered ad nauseam here, and other places on the internet - but hopefully the question is a simple one as I try to get my head around assembly...
So if i understand correctly the ebp (base pointer) will point to the top…