radare2's debugger being debugged inside Visual Studio 2017
At first I'd like to thank my mentors Maijin and Xvilka for advising me during this Google Summer of Code. I'd also like to thank Pancake for his help on radare2 understanding. This GSoC was a great experience. I did not manage to finish everything I planned to do, however windows support has been greatly improv ed during this summer. There's a lot of work remaining and we are translating the current testsuite so it can run smoothly on Windows. With this done it will be a lot easier to see what does not work on Windows and fix it.
The commits below are ordered by date in each category.
This is the major work of this GSoC. Radare2 was already windows compatible through mingw, however a lot of code was not portable to MSVC. This include the use of meson to build radare2 under windows using MSVC. As you can see on the screenshot above, having MSVC is very handy because it makes radare2 being a completely Windows native application, which can be debugged and developed using Visual Studio.
- Modified windows build script (take care of configure exit code)
- Improved msvc support
- Trying new appveyor configuration
- Fix appveyor script (msvc)
- Fixing appveyor build
- Fixing appveyor msvc build
- Appveyor test
- Modifed scripts for easier windows install
- Moved meson bat script + better meson.build file
- Fixed meson r_version.h
- Fixing appveyor build
- Fixed windows segfault
- Ignore meson scripts
- Windows fixes
- Windows environment fix
- Adding files to meson + windows env refactor
- msvc compile with /MT to include redistributables into binaries
- Windows -nn fix
- Windows environment fix (buffer too small + handle return value)
- Better release handling
- Adding msvc 32bits to appveyor
- Reorganized meson version grabbing
- Set windows meson default to static libraries
- Windows XP support test
- Fixed meson r_version creation + reorder
- Fix msvc build
- Meson builds generates sdb files (+build clean)
- Fix meson install script (missing SDB files)
- Better meson build
- Moving /MT modifier to release build
- Fix meson build
- Adding windbg debug plugin to meson
- Fixing meson build
- Fix again meson...
- Meson fixes (SDB, linux, added io_ar)
PDB support was already in radare2 before this summer, however there is still some work to do to enhance it.
- Added idpd to download pdb file and automated idp
- Tiny fix (pdb windows)
- Pdb parsing fixes + typos
- Added msvc demangle for pdb information Fix#2540
- PDB Autoloading when debugging
We had big discussions on how to implement libraries debugging on radare2. We finally decided to implement library function calling using rarun2, which will allow us later to automatically put a breakpoint on the called function.
Windbg support was broken, so I fixed it, however it is not yet suitable for proper use. The fact is nobody never fully reversed engineered the Windbg protocol. Reversing the protocol was not fitting in this GSoC.
This was not planned in my initial planning, however this is usefull to generate zignatures on .lib files.
Windows users can now use the windows installer which makes it very easy to install.
- More flexible install script
- Fix PATH variable deletion. No admin rights required
- No default version (forces to call with /DMyAppVersion=1.6.0-git_xxxx)
As said above, we are translating the current testsuite so it runs faster on both linux and windows. Here you can find some work I did, and of course some usual regression tests I added.
- Better r2r.js tests for asm
- Added tests for fuzz
- Fixed pdb tests
- Added a test for PE32+ DLL exports
- Added node tests to make -k all
- Changed js tests order
- Refactor node fuzzing tests (added timeout)
- Added a few ar tests
- Fix asm tests parser (node)
- Node testsuite: dont run tests if arg
- Added asm.cpu handling for node db/asm
- Added text for easier grepping and refactor node
- Fix asm.cpu for dalvik and other archs
- node asm testsuite fix
- Hide broken asm tests on travis
- Better output for travis
- Hide broken tests on Appveyor too