Eugen Morjolic
Eugen Morjolic
I would also want this feature, any update on this?
Is there a similar plugin on VSCode?
thank you
Have you tried the weak attribute? In this way you mock a function without moving it to other file
weak attribute is standard gcc, similar to ld wrap, is possible to create a macro and build twice, with and without weak attribute, when weak is enabled you can mock...
I don't think I understand very well how EXTERN/undefined ld option works in HIDE_FUNCTION. According to this link seems to work only for libraries and not for functions from same...
So if you want to mock a function (from same unit) but also call the original you need to have two builds, right?
> I wrote a tool because I was observing the same issue, that with --wrap you cannot wrap symbols in the same compilation unit. For this I wrote a simple...
starting from @wafgo python LIEF interface I have copied functions (only those for which I have created a wrapper) from compilation units to __orig_, then I made the functions undefined...