Forums  > Software  > Debugging with GDB under WSL  
     
Page 1 of 1
Display using:  

Cheng


Total Posts: 2870
Joined: Feb 2005
 
Posted: 2020-07-19 10:06
So I installed WSL to debug some legacy code that comes as an .exe for which I don't have sources (yet) and a .dll which I can access. The whole thing has been built using mingw32 tools and I figured that it should be easier to work with the *ix (DWARF or whatever) debug symbols instead of messing around trying to convert those to PDB but I might be wrong...

Now I want to debug the dll using gdb under the WSL (Ubuntu 20.04 in case that is relevant). I can load the dll, load the symbols, set a breakpoint somewhere, load the exe and run. Then I get the following messages

warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64
warning: Architecture rejected target-supplied description
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x1234567

and won't get any further. The dll itself is compiled for arch=i586.

Funny enough, if I try the same with a dummy program I get the same warning but can proceed normally.

Any ideas?

"He's man, he's a kid / Wanna bang with you / Headbanging man" (Grave Digger, Headbanging Man)

jslade


Total Posts: 1222
Joined: Feb 2007
 
Posted: 2020-07-27 22:54
I think your WSL dll is 32 bit. I don't know how to jury rig gdb to deal with it, but you should be able to.

"Learning, n. The kind of ignorance distinguishing the studious."
Previous Thread :: Next Thread 
Page 1 of 1