Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement showing map names with "dm" on Windows #22707

Closed
xdp0 opened this issue Mar 17, 2024 · 6 comments
Closed

Implement showing map names with "dm" on Windows #22707

xdp0 opened this issue Mar 17, 2024 · 6 comments
Labels
Windows Microsoft Windows platform support issues

Comments

@xdp0
Copy link

xdp0 commented Mar 17, 2024

It would be nice if dm command on Windows showed module names and mapped file names.

I guess there was such a feature before. From radare2/libr/debug/p/native/maps/windows_maps.c:

/* get process modules list */
RList *mod_list = NULL; // r_w32_dbg_modules (dbg);

And one more line from the same file:

DWORD len = 0; // r_w32_GetMappedFileName (h_proc, mbi->BaseAddress, f_name, MAX_PATH);

But it's commented now. What was the reason for commenting it?

@trufae
Copy link
Collaborator

trufae commented Mar 17, 2024

I think the reason was because it was causing segfaults on some windows if the api was not available or the abi changed between mingw and msvc. But thats just from memory didnt git blamed to find the actual commit. Feel free to try uncommenting and testing again because the toolchains has changes over time and maybe this issue is gone now

@xdp0
Copy link
Author

xdp0 commented Mar 17, 2024

OK I will. The actual is commit is 3e03207 btw. Don't you remember the Windows version/arch where it segfaulted?

@trufae
Copy link
Collaborator

trufae commented Mar 18, 2024

I use to test wxp 32bit and w11 x64. W95 was working at some point but im not sure whats the state of it now

@trufae trufae added this to the 5.9.2 - codename neatrunner milestone Apr 5, 2024
@trufae trufae added the Windows Microsoft Windows platform support issues label Apr 16, 2024
@trufae
Copy link
Collaborator

trufae commented Apr 16, 2024

@xdp0 anyupdate here? can you submit a pr fixing that and test if it works with latest code from git? thanks!

@xdp0
Copy link
Author

xdp0 commented Apr 16, 2024 via email

@trufae
Copy link
Collaborator

trufae commented Apr 16, 2024

Just tested your proposal and it seems to work at least on w10.
IMG_8210
IMG_8209

@trufae trufae closed this as completed in d3558a3 Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Microsoft Windows platform support issues
Projects
None yet
Development

No branches or pull requests

2 participants