renderdoc icon indicating copy to clipboard operation
renderdoc copied to clipboard

Handle preloaders in GetExecutableFilename

Open Joshua-Ashton opened this issue 1 year ago • 1 comments

Description

Uses /proc/self/cmdline instead of /proc/self/exe for GetExecutableFilename to correctly handle preloaders, such as the Wine preloader.

Additionally handles removing leading directories with Windows style \s if it detects this is the Wine preloader.

This is intended to make things cleaner for developers using the new RenderDoc functionality in the SteamOS Devkit Client.

Joshua-Ashton avatar Aug 19 '22 02:08 Joshua-Ashton

For the FEX-Emu comment here, behaviour changes depending on how something is getting captured.

  1. Capturing using x86-64/x86 Renderdoc This is used for capturing applications without using native AArch64 Vulkan/GL thunks. This means /proc/self/exe and /proc/self/cmdline get captured by our emulation code and FEXInterpreter gets hidden from these files.

  2. Capture using AArch64 Renderdoc This is ussed for capturing applications that use native AArch64 Vulkan/GL thunks. In this case, renderdoc wouldn't hit FEX's emulation of these files so FEXInterpreter would be visible in the files.

In the future we would like to resolve this binfmt_misc oversight in the kernel with a new option there. This way if a binfmt_misc option opts it, it would be more similar to how the Linux kernel resolves this situation with PT_INTERP, hiding the interpreter from these options. Sadly this would require someone to deal with kernel so it is unlikely to get fixed anytime soon.

Sonicadvance1 avatar Aug 27 '22 01:08 Sonicadvance1

Closing this due to lack of activity.

baldurk avatar Oct 10 '22 09:10 baldurk

We still need to solve this. I can come back to it this week if you are still open to it.

Joshua-Ashton avatar Oct 10 '22 13:10 Joshua-Ashton

Yes if you want to resume work on it you can reopen the PR. I closed it because I'd asked questions/given review feedback and it hadn't been addressed or replied to.

baldurk avatar Oct 10 '22 13:10 baldurk

I am not able to re open it because you closed it.

Joshua-Ashton avatar Oct 10 '22 21:10 Joshua-Ashton

Ah OK. Yeh then open a new PR when you're ready to work on it again, not much in this one anyway.

baldurk avatar Oct 10 '22 21:10 baldurk