uchen-ml / codeart-binexplore

VSCode extension for analyzing compiled binaries
MIT License
0 stars 1 forks source link

Editor is slow to open in remote scenarios. #33

Open eugeneo opened 2 months ago

eugeneo commented 2 months ago

Disassembling the larger executable can take up to several seconds on my WSL2 setup. It opens instantly on another machine that's local. I suspect this has to do with SSH.

A way to only transfer relevant data needs to be identified. I believe this ties into a bigger issue where we need to help the users to see the information that's relevant to them.

aharbii commented 2 weeks ago

Hi @eugeneo, with some research, I think the approach we may go for doing this is to provide to user the ability to specify a specific function when requesting a preview, so he can enter some arguments for "--disassemble=" flag or choose to request the full disassembly.

In most of cases, if the user knows what he wants to search for he can directly request the disassembly for this section, and what we can support with, if he enables the option of autosave, we can save the full file assembly in background.

the initial logic for the proposal is pushed to branch 'feature/optimizing_fetching_performance'

SectionPreview.webm

aharbii commented 2 weeks ago

also for the checking the sources used to build a binary, we can use -g argument with object dump, and parse the output to get the binaries.

objdump -g examples/vector_debug > examples/vector_debug_debugging.objdump
objdump -g examples/vector_debug | grep '\.cpp\|\.c\|\.cc' > examples/vector_debug_sources.txt

if you got time, please take a look at the examples folder in the listed branch, and also try those commands with the larger binaries, it's kinda stable with debug builds, but trickey as expected with release ones

eugeneo commented 2 weeks ago

This definitely seems to be the right direction! See what GodBolt does. It shows disassembly that correlates to the lines being hovered over and even highlights the code compiler generates:

https://github.com/user-attachments/assets/d29ea94e-fcc5-4192-aa92-f16ef9065e84