rizin
rizin copied to clipboard
rz-gg: sflib files does not exist for windows-x86-32
Work environment
| Questions | Answers |
|---|---|
| OS/arch/bits (mandatory) | Windows 11 25H2 Build 26200.6899 x64 |
| File format of the file you reverse (mandatory) | Compiling a C file |
| Architecture/bits of the file (mandatory) | x86/32 |
rizin -v full output, not truncated (mandatory) |
rizin 0.9.0 @ windows-x86-64 commit: f8fa5b45b079cc722c7a978e354cc4fd9e627f16 |
Expected behavior
The file include\librz/sflib/windows-x86-32/sflib.h is supposed to exist since it is used by gcc to compile the c file.
Actual behavior
File does not exist
Steps to reproduce the behavior
- This is related to issue #5518
- Command executed:
rz-gg -a x86 -b32 test.c - Contents of
test.c
int main() {
write(1, "Hello World\n", 13);
return 0;
}
Additional Logs, screenshots, source code, configuration dump, ...
Output of the command is
'gcc' -fPIC -fPIE -pie -fpic -m32 -fno-stack-protector -nostdinc -include 'C:\Users\abinr\Desktop\repos\rz\include\librz/sflib'/'windows-x86-32'/sflib.h -z execstack -fomit-frame-pointer -finline-functions -fno-zero-initialized-in-bss -o 'test.c.tmp' -S 'test.c'
''gcc'' is not recognized as an internal or external command,
operable program or batch file.
ERROR: egg: failure while parsing 'test.c'
ERROR: rz-gg: cannot load file "test.c"
You can see it tries to include a file 'C:\Users\abinr\Desktop\repos\rz\include\librz/sflib'/'windows-x86-32'/sflib.h which does not exist.
hey @Rot127 @dotslashinit-sh I have submitted a fix for this issue in PR: #5530 The problem was caused by rz-gg trying to include the non-existent path:
include/librz/sflib/windows-x86-32/sflib.h
My PR adds a fallback to use the existing windows-x86 directory instead.
Please assign this issue to me.