Questions tagged [stack-frame]

Use stackframe for questions related to debugging unterminated function calls.

A stackframe is a list of functions that have been invoked but have not yet returned a value

References

291 questions
2
votes
1 answer

Debugger that can visualise the stack with a block diagram

I would really like a debugging tool that is able to visualise the current stack frame (bytes between RSP and RBP) as a block diagram. Something like this, but with real execution values in the…
Edd Barrett
  • 3,425
  • 2
  • 29
  • 48
2
votes
2 answers

What's so called "Frames" in visual studio?

In the Call Stack window of visual studio, it reports: [Frames below may be incorrect and/or missing, no symbols loaded for IPCamera.ax] What does it mean by Frames, and why missing symbols may cause it incorrect?AFAIK,symbols are just for…
COMer
  • 1,117
  • 4
  • 14
  • 24
2
votes
1 answer

How to write a function which return a pointer to the stack

After reading the following question, I understand that there no such thing exist (at least not 'portable'). However I am starring at the following piece of code from mono code base, which return a pointer to the stack: static void…
malat
  • 12,152
  • 13
  • 89
  • 158
2
votes
1 answer

Is there a class provide function of StackFrame.java in android?

I know com.sun.jdi.StackFrame could provide the ability to access the local variable and parameters of a suspended thread. And I wonder is there a same function in Android?
Hu lv
  • 112
  • 1
  • 8
2
votes
1 answer

What does it mean that decrementing the stack pointer reserves space on the stack?

What exactly does "reserve" mean in this context and how does decrementing the stack pointer reserve space on the stack? Does adjusting the stack pointer register have some side effect? "Reserving space" sounds like memory allocation but memory for…
Praxeolitic
  • 22,455
  • 16
  • 75
  • 126
2
votes
1 answer

what is stack frame lowering in llvm?

I'm working with LLVM and somewhat new to it. I'm having trouble figuring out what LLVM means by stack frame lowering. Can someone explain what it is? Any help is appreciated
flashburn
  • 4,180
  • 7
  • 54
  • 109
2
votes
1 answer

How to move up and down between stack frames?

Let's say, I obtain a stack frame using sys._getframe(1), which is obviously not the current frame. Now I want to, in some way, move to the outer stack frame and execute a statement, like maybe x=10, so as to create a variable in that frame. I…
bendtherules
  • 372
  • 4
  • 12
2
votes
1 answer

Construct FrameNode with ASM api

I succeeded in implementing bytecode method inline optimization and the generated code seems OK for me. Yet, the verification fails with message: java.lang.VerifyError: Expecting a stackmap frame at branch target 47 Exception Details: Location: …
2
votes
2 answers

Static global variables vs global variables C

I have the program below. If i declare variables a,b,c static global variables, it gives segmentation fault, but if i declare them non-static global or as local variables, it won't give segmentation fault. Why does it behave in such a way? I know…
Neo
  • 349
  • 5
  • 18
2
votes
2 answers

Identifying a function call in a python script line in runtime

I have a python script that I run with 'exec'. When a function is called by the script, I would like it to know the line number and offset in line for that call. Here is an example. If my script is: foo1(); foo2(); foo1() foo3() And if I have code…
Dani
  • 73
  • 8
2
votes
1 answer

What happens to EBP when calling a function

This is the program: #include void test_function(int a, int b, int c, int d){ int flag; flag = 31337; } int main(){ test_function(1,2,3,4); } From GDB: Breakpoint 1, main () at stack_example.c:14 14 …
Quaxton Hale
  • 2,460
  • 5
  • 40
  • 71
2
votes
4 answers

c/c++ passing argument by pointer/argument by reference stack frame layout

Will the compiler produce the same code for both of these statements? foo1(int* val){(*val)++;} foo2(int &val){val++;} Will it simply write a pointer into the parameter part of foo's stack frame? Or, in the second case, will the callers' and foos'…
Mat
  • 11,263
  • 10
  • 45
  • 48
2
votes
1 answer

would there ever be sharing parts of caller/callee stack frames?

I was wondering Are these scenarios ever possible for a compiler to do? first we define SomeDataType as: struct SomeDataType{ public: int a; int b; int c; }; Scenario #1_regarding a callee function having reference parameter like this: void…
Pooria
  • 2,017
  • 1
  • 19
  • 37
2
votes
2 answers

The basic structure of stack frames

I'm currently playing around, examining stack frames, trying to get an idea of how this works. After reading a few articles that always explained that the general structure would be: local vars <--- SP low address old BP <---…
user2239930
  • 270
  • 1
  • 3
  • 9
2
votes
1 answer

stack frame size when I insert new instructions to assembly x86?

If I insert a new functions and instructions that within the stack frame to assembly x86 code, is it necessary to increase the stack size? if yes by how much? sub 0x4, %esp push %eax ;;new instruction ... call fun ;;…
hamb
  • 159
  • 1
  • 2
  • 11