I wanted to understand the max stack frames / size in better detail.
function computeMaxCallStackFrames() {
try {
//
//
//
return 1 + computeMaxCallStackFrames();
} catch (e) {
//…
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…
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)
{
…
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
#…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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:…
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…