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
4
votes
1 answer

Why Slime's debugger is not evaluating this specific expression in the selected frame?

I am trying to learn Common Lisp with the book Common Lisp: A gentle introduction to Symbolic Computation. In addition, I am using SBCL, Emacs, and Slime. By the end of chapter 10, the author discuss the useful break function. In order to provide a…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
4
votes
2 answers

Logging filename, line number in logs. Do I need to pass the StackFrame?

Currently, I pass the StackFrame to grab the current file/line number: Log.Message(new StackFrame(0, true), "FAILED to start cooling."); Where in the Log class is: public void Message(StackFrame Callstack, string message) { string logMessage =…
Ryan R
  • 8,342
  • 15
  • 84
  • 111
4
votes
0 answers

can mat(memory analyze tool) display primitive types in a heapdump

I want to see the stack frame of a method from a heapdump using mat. But I can't see any primitive type in the callstack, but types like String can be displayed from the threadDetail. public int fun(int x, int y) { int d = this.hashCode(); …
Xinli Niu
  • 471
  • 1
  • 4
  • 6
4
votes
3 answers

Why Java compiler generates weird local vars & stack map frames and how can I use them to reliably determine variable types?

I'm creating Java byte code instrumentation tool with the help of ASM framework, and need to determine and possibly change the type of local variables of a method. Very quickly I encountered a simple case where variables and stack map nodes look…
noop
  • 320
  • 4
  • 9
4
votes
1 answer

Unsed local variables Java 8 - java.lang.VerifyError: Inconsistent stackmap frames

I have recently upgraded my project to Java 1.8 from 1.7. I get an exception for inconsistent stackmap for a method in one of my Classes. Initializing some unassigned local variables in the method resolved it, but can somebody please explain why…
Rk R Bairi
  • 1,289
  • 7
  • 15
  • 39
4
votes
1 answer

How does `gdb` compute the bounds of a stack frame?

I am debugging a new thread library, in which I set the stack register rsp manually (to switch to a user-managed stack), and then invoke a function which never returns. When I try to get a backtrace in gdb, I get the following output. (gdb) bt #0 …
merlin2011
  • 71,677
  • 44
  • 195
  • 329
4
votes
1 answer

How can I force update the Python locals() dictionary of a different stack frame?

In Python 2 (not sure about 3), the locals dictionary only gets updated when you actually call locals(). So e.g. l=locals() x=2 l['x'] fails because l doesn't have the key "x" in it, but l=locals() x=2 locals() l['x'] returns 2. I'm looking for a…
marius
  • 1,352
  • 1
  • 13
  • 29
4
votes
2 answers

Listing variables in current and higher frames

I'm trying to debug a script with perl -d .... After I break where I want, I'd like to print out the current environment and the environment from higher frames. I see the stack via T. Now, if I try V, I get a list of everything, which is pretty much…
viraptor
  • 33,322
  • 10
  • 107
  • 191
4
votes
1 answer

Find buffer address to create shell code

In my program I am trying to modify the EIP to point to buffer base address which contains shell code example: 0xbffff5f3 is an address on stack which points to code[80] = "\x90\x90\x90\x90\x90\x31\xc0\x31\xdb\x31\xc9\" I create a pointer ret and…
RootPhoenix
  • 1,626
  • 1
  • 22
  • 40
4
votes
1 answer

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

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…
Jason Lee
  • 3,200
  • 1
  • 34
  • 71
4
votes
2 answers

Visual Studio loses first stack frames on StackOverflowException

I am running a web crawler and parsing the page content with HtmlAgilityPack and randomly get a StackOverflowException in that C# library, but when I try to see the Call Stack list up to my code, I get: "The maximum number of stack frames supported…
4
votes
1 answer

Evaluating if a stack overflow error is possible in a tree traversal recursive algorithm (Java)

What is the best way to determine theoretically (i.e., without actually executing it) the circumstances in which a certain tree traversal recursive algorithm will produce a stack overflow in Java? In order to clarify my question, consider the…
Sergio
  • 8,532
  • 11
  • 52
  • 94
4
votes
2 answers

Portable function in C (with no assembly) that returns the size of its stack frame

Write a portable function in C (with no assembly) that returns the size of its stack frame int stackframe_size() { } Attempted solving it as below - This function returns 228 bytes when compiled with VS 2010. Is there a way to verify its…
Electrix
  • 510
  • 3
  • 14
4
votes
1 answer

Using x86's ENTER instruction with a non-zero nesting level?

Consider the x86 instruction ENTER. From Intel's instruction set reference. Creates a stack frame for a procedure. The first operand (size operand) specifies the size of the stack frame (that is, the number of bytes of dynamic storage allocated on…
newbie
  • 1,230
  • 1
  • 12
  • 21
4
votes
1 answer

stack unwinding from middle of stack

I'm learning gdb debugger and one question I cannot answer is: new function calls result in additional stack frames allocated for them and call stack grows downward; stack frame is deallocated and returned to unused memory. is it possible that a…
J.Zhuo
  • 43
  • 3