What is the process for debugging Wine tests with GDB?

Zebediah Figura z.figura12 at gmail.com
Tue Apr 16 23:31:08 CDT 2019


On 4/17/19 12:33 AM, Jefferson Carpenter wrote:
> On Wed, Apr 17, 2019 at 3:00 AM Zebediah Figura <z.figura12 at gmail.com> wrote:
>>
>>
>> The official answer is "use winedbg --gdb instead". Usually this works
>> well enough.
>>
>> I've also run into some obscure edge cases, though, that have led me to
>> try running wine under gdb instead. The big problem I've encountered is
>> that the preloader bypasses ld and so prevents gdb from being able to
>> load symbol information. This can be worked around by disabling the
>> preloader.
> 
> How does one run winedbg from the build tree?  Running
> 
>      tests $ ../../../loader/wine64 winedbg msxml3_test.exe.so domdoc
>      WineDbg starting on pid 002c
>      couldn't load main module (2)
>      0x000000007bccc465: ret
>      Wine-dbg> r
>      couldn't load main module (2)
>      0x000000007bccc465: ret
> 
> does not appear to allow me to debug with winedbg from the terminal.
> An empty command prompt window shows up (black with a blinking cursor,
> but no prompt). Then
> 
>      Wine-dbg> q
> 
> runs all the tests, outputting stdout to the command prompt window as
> well as my terminal.
> 

I don't know why that would happen; it works fine here. If you're using 
recent enough wine, you may have not msxml3_test.exe.so but 
msxml3_test.exe. Note that (1) you don't use 'r' with winedbg, and (2) 
you probably want to use the --gdb option, since bare winedbg does not 
work very well and has some arcane syntax in places.



More information about the wine-devel mailing list