Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Throwing Function
- void throwing() __asm__("throwing");
- void throwing() {
- throw "abc";
- }
- // Assembly function which calls throwing()
- void asm_call() {
- __asm__ __volatile__ (
- "call throwingn"
- );
- }
- // Main calls the assembly function in a try block
- int main() {
- try {
- asm_call();
- } catch (...) {
- std::cout << "caught..." << std::endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment