What is the proper way to debug wineboot and services.exe in order to find out what is causing the error outputted by wineserver below?

err:wineboot:start_services_process Couldn't start services.exe: error 1359
wine: failed to update /winearm/winehome with /winearm/bin/../share/wine/wine.inf: No such file or directory

My problem is that doing:

gdb /winearm/bin/wine C:\\windows\\system32\\wineboot.exe --init

will yield the code flow to start_wineboot() again because peb->ProcessParameters->ImagePathName.Buffer is NULL

    if (peb->ProcessParameters->ImagePathName.Buffer)
    {
        strcpyW( main_exe_name, peb->ProcessParameters->ImagePathName.Buffer );
    }
    else
    {
       <deleted code>
       start_wineboot( boot_events );
    }

So it looks like running GDB on wineboot by itself is not good enough because something from the original process is missing, causing it to think it needs to start wineboot again.  The reason I had to start it under its own GDB process is because the original GDB process will not follow the fork() in start_wineboot.


How do you guys debug all the processes being fork'ed off when GDB can't follow to the child process?

Thanks in advance

Roger R. Cruz