Questions tagged [stack-unwinding]

Stack-unwind will pop the top frame of the stack, depending on the language it may occur e.g. at the end of a code block, when returning from a called function, or during exception handling.

Stack-unwind will pop the top frame of the stack. Depending on the language this may occur e.g. at the end of a code block, when returning from a called function, or during exception handling.

Related tags: .

Related Q/A:

References:

128 questions
0
votes
1 answer

How to uninstall RtlInstallFunctionTableCallback?

What is the reverse of the RtlInstallFunctionTableCallback function ? I have been looking at it to avoid the rather slow RtlAddFunctionTable/RtlDeleteFunctionTable for transient JIT'ed math expressions, but I could not find a way to uninstall a…
Eric Grange
  • 5,931
  • 1
  • 39
  • 61
0
votes
0 answers

Do I need to call unlock() at the end of the loop (for a local unique_lock)?

Is this: std::mutex mutex; for () { std::unique_lock lock(mutex); // do something lock.unlock(); } Equivalent to this in terms of releasing and acquiring the lock every iteration of the for loop? std::mutex mutex; for () { …
Evandro Coan
  • 8,560
  • 11
  • 83
  • 144
0
votes
2 answers

How can I debug x64 windows exceptions?

I'm curious how Windows handles exceptions. More exactly, how Windows find the catch block of a try / catch. I saw that the compiler makes a separate function in assembly for catch block. Since the catch block was represented by another function in…
Maco
  • 21
  • 5
0
votes
1 answer

RBP register value in windbg windows stack

If i have code flow like main()--> a()--> b()-->c(), if I break in debugger(windbg) at c() and dump register values of all frames in debugger as ".frame /r frame_number"......do i see correct value for RBP every frame ? From documentation, i see RBP…
Naveen
  • 91
  • 1
  • 7
0
votes
3 answers

RAII and Stack unwinding

TIL that my notions of the 'inter-twining' (for the lack of a better word) of RAII & stack-unwinding are/were quite(if not completely) wrong. My understanding was that using RAII, guarded against any/all resource leaks - even ones potentially caused…
decimus phostle
  • 1,040
  • 2
  • 13
  • 28
0
votes
1 answer

Manipulating x64 Unwind Info To Match Assembly Hook

Edit: I appear to have been mistaken, the backtrace works wonderfully from anywhere on Linux -- it is only when remote debugging from gdb on ubuntu to remote windows that the stacktrace gets absolutely destroyed after entering one of the memory…
user6567423
  • 353
  • 4
  • 9
0
votes
0 answers

How unwind back trace works internally?

This question is just for understanding purpose. What does _Unwind_Backtrace do internally to keep track of stack of function calls called. Does some of unwind library code executes internally every time we call a function to keep track of the…
Pendyala
  • 585
  • 1
  • 6
  • 17
0
votes
0 answers

Is there a Windows kernel function to unwind the stack?

I was wondering if there's a function available from a Windows kernel driver that can unwind the stack to get (nested) function addresses that called the current function? This stuff:
MikeF
  • 1,021
  • 9
  • 29
0
votes
0 answers

Some calls cause stack unwinding, though no C++ exception is thrown

I use Visual Studio Native Unit Test Framework for C++. When an assertion fails, next statements aren't executed and local objects destructors are called, so it seems like an exception is thrown, but I can't catch any C++ exception by catch (...)…
undermind
  • 1,779
  • 13
  • 33
0
votes
0 answers

Reference Arguments on Exception Stack Unwinding

At a point in my code, I pass a *this to a method foo(const MyClass& arg). An exception is thrown deep inside this foo, but although a syntactically correct try-catch block exists up the stack, it gets neither handled (a message should have been…
corsel
  • 315
  • 2
  • 12
0
votes
1 answer

Understanding Java's stack unwinding on thrown exception

During a discussion and some research regarding using exceptions vs returning values, the following caught my mind: It is cheaper and provides better performance to return a value, whereas throwing an exception requires the creation of a new object…
PentaKon
  • 4,139
  • 5
  • 43
  • 80
0
votes
0 answers

Restoring SIMD registers on Windows x64 during unwinding

On Windows x86-64, how are callee-saved SIMD registers restored during unwinding? If one was writing assembly code, how would one ensure that this happened properly?
Demi
  • 3,535
  • 5
  • 29
  • 45
0
votes
1 answer

Place critical functions in destructor to "enhance atomicity"?

Say I have two C++ functions foo1() and foo2(), and I want to minimize the likelihood that that foo1() starts execution but foo2() is not called due to some external event. I don't mind if neither is called, but foo2() must execute if foo1() was…
0
votes
1 answer

Setting up a Quit button in an iOS app

I have a simple game app that I developed in Swift. I have a button in an options screen that will allow the user to quit the current game and return to the start screen. I have looked into several ways to do this, but I'm not sure which way is the…
icekomo
  • 9,328
  • 7
  • 31
  • 59
0
votes
1 answer

Display TopBar NavigationController when unwinding

Currently I'm using Unwind to get to the Main View of its Path. This is the code I've on the Sender ViewController: - (IBAction)showRecents:(UIStoryboardSegue *)segue { [self.navigationController.tabBarController setSelectedIndex:1]; NSLog(@"Root…
1 2 3
8
9