eric pouech eric.pouech@wanadoo.fr writes:
well, this has a major holes:
- since the process creation in Wine knows the created process is not
a PE image, it doesn't set the info on the server side for the newly created process ; after the exec in the shell script, the info cannot be retrieved from the parent, hence an error
What makes you think that? Of course the info is set for non-PE binaries too, otherwise you could never debug a Winelib app.
perhaps, the best fix would be to merge the init_process/new_process server calls
I don't see how you could possibly do that. new_process is done by the parent, and init_process by the child; they serve very different purposes.
ok. I finally found out what's wrong let's say process A launches thru CreateProcess a shell script /home/me/foo
this shell script, in turn does an exec winedbg $* to launch the debugger
what happens is that, in the server, the created process name is set to /home/me/foo, whereas, when the debugger starts, argv[0] is set to winedbg
what the process creation (open_winelib_app) gets from the server is the /home/me/foo filename, which is wrong because of the exec
as I understand the code, it's better to use the name from the server because it may be a windows style one (whereas argv[0] is always a unix one)
apart, from always using argv[0] (and transposing it to a windows filename when needed), is there another fix ?
A+