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
1
vote
1 answer

Insight into v8 max stack frames / size

I wanted to understand the max stack frames / size in better detail. function computeMaxCallStackFrames() { try { // // // return 1 + computeMaxCallStackFrames(); } catch (e) { //…
AJP
  • 26,547
  • 23
  • 88
  • 127
1
vote
1 answer

Retrieve FormatException Argument

I'm using a closed-source third-party library like this: object val = SomeClass.ExtractValue( someObject ); Now somewhere further down the road, the third-party library tries to parse a DateTime value that has an unexpected format and throws a…
Andreas
  • 23
  • 2
1
vote
1 answer

StackFrame does not get all of frames

for effective debugging of my program, I tried to write function that gets an exception and emails me detailed reporting about the exception. c# code: public static bool SendExceptionMail(Exception ex, string[] mail, string title) { …
Rachel Fishbein
  • 818
  • 2
  • 12
  • 29
1
vote
0 answers

How to deep copy Python's Stack Frame Object

I'm looking to perform a deep copy of python's stack frame as I'm making changes to Python's debugger (PDB). curframe = self.get_stack(self.__f, self.__t)[0][self.curindex][0] curframe_locals = copy.deepcopy(curframe.f_locals) # This line fails #…
nnegrey
  • 66
  • 5
1
vote
4 answers

How to print the current executing method name via an auxiliary method?

ExecutingMethodName is intended to print the method name of the caller. For example: static void Main(string[] args){Auxiliary.ExecutingMethodName();} should print Main. static void Foo(){Auxiliary.ExecutingMethodName();} should print Foo. static…
Second Person Shooter
  • 14,188
  • 21
  • 90
  • 165
1
vote
1 answer

Reference to return value of function

I am confused whether in the following snippet foo is guaranteed to be valid, i.e., whether I am allowed to store function return values as const references? I am asking because the return value is stored on a stack-frame, which might be invalid…
user695652
  • 4,105
  • 7
  • 40
  • 58
1
vote
0 answers

Why doesn't this overflow correctly?

I'm trying to over the following function: void function(int param){ char overflow[32]; gets(overflow); } I'd like to gain control of the integer parameter. This is an x86 platform. This is what I'm giving as the string to overflow: python…
0x23hgww45
  • 21
  • 4
1
vote
1 answer

C++ Is destructor behavior standard for function argument temporaries?

I have a somewhat specific question regarding destructors in C++. It's far easier to explain what I'm asking through code. Basically I want to do something similar (but not exactly) to this: foo( bar().ptr ); In this example the pointer points to…
Tom
  • 11
  • 2
1
vote
1 answer

Is Powershell's stack trace broken?

I am writing a simple unit test harness in powershell I designed the harness such that its assert functions takes a script-block as a parameter to allow the harness to run the code from within the assert function and treat any exceptions are thrown…
Willbill
  • 4,673
  • 6
  • 24
  • 25
1
vote
0 answers

Get the contents of a frames stack

I'm parsing some Python bytecode to get the name of the variable an expression is assigned to. I think that this would be much easier if I could read the contents of the stack of a Python frame. I've tried it with this C extension, but I always get…
Niklas R
  • 16,299
  • 28
  • 108
  • 203
1
vote
2 answers

How to Convert StackFrame Collection to String?

I have a IEnumerable frames for store some custom StackFrame. I want to convert that to the string type like StackTrace.ToString() format. for example: at TestStackTrace.Form1.button2_Click(Object sender, EventArgs…
Behzad
  • 3,502
  • 4
  • 36
  • 63
1
vote
0 answers

StackFrame of an Iterator Block in C#

I am using an iterator block as coroutine, that is, I have an enumerator IEnumerator e; e was initialized, and in the middle of an iterator block, yield return 1; was used to hold the execution of the coroutine temporarily. For the purpose of…
Jahwan Kim
  • 59
  • 3
1
vote
1 answer

Why do static functions sometimes have non standard stack frames?

In the wikibook x86 Disassembly, it is written that sometimes there are subroutines that do not set up standard stack frames. One such case is when we declare a static function in C. The following lines have been written in the book. When an…
1
vote
0 answers

How to read arguments sent to method in another stack frame?

I'm trying to read arguments value and type as they were sent to a method prior to me in call stack. I've read you couldn't do that in .Net so I've looked around and found this class which is supposed to provide me the values I need:…
Maya G
  • 170
  • 10
1
vote
2 answers

Doesn't the frame pointer make the stack pointer redundant?

As far as I understand it, the stack pointer points to the "free" memory on the stack, and "pushing" data on the stack writes to the location pointed by the stack pointer and increments/decrements it. But isn't it possible to use offsets from the…
user3735658