Date: Thu, 28 Nov 2024 23:53:32 +0100
The return address is not necessarily a function pointer.
Typically the return address is within a function with the stackframe set up, etc.
Those functions - as you show them - would be called from within the function, which would return, itself?
If you intend to first go to a different function and then jumping back to the original calling function, why not specifying this directly? Or first call the intermediate function and then return?
-----Ursprüngliche Nachricht-----
Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Do 28.11.2024 23:17
Betreff:Re: [std-proposals] #include <debug>
An:std-proposals_at_[hidden];
CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>;
On Thu, Nov 28, 2024 at 5:39 PM Thiago Macieira wrote:
>
> That makes even less sense. How can you have a reference to a register?
Having put more thought into it, it would have to be two separate functions:
auto get_return_address(void) -> void (*)(void);
void set_return_address( void (*)(void) );
You mentioned Control Flow Enforcement -- which by the way I've never
encountered -- but of course you would turn that off when debugging.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2024-11-28 22:55:01