RE: Is there any way to debug driver?

2009-06-24 Thread Guan, Xiao-Feng
It works.
Thanks Roderick!

Guan Xiaofeng
AMD Shanghai SW OpenGL Team
021-61601838-25746
xiao-feng.g...@amd.com
 
 

-Original Message-
From: Roderick Colenbrander [mailto:thunderbir...@gmail.com] 
Sent: Wednesday, June 24, 2009 12:23 AM
To: Eric Pouech
Cc: Wang, Robin; Guan, Xiao-Feng; wine-devel; Zhou, Jesse; Sun, Sunny; Boudier, 
Pierre; Jin, Jian-Rong
Subject: Re: Is there any way to debug driver?

It was just mentioned on IRC that the environment variable
WINELOADERNOEXEC=1 needs to be set. After that you can just run 'gdb
wine' and continue the same way as using wine-preloader.

Roderick

On Mon, Jun 22, 2009 at 10:24 PM, Eric Pouech wrote:
> Wang, Robin a écrit :
>>
>> Hi Roderick,
>>
>> Using winedbg, it is OK for us to break into libGL.so. But we cannot set
>> break point in our dri drivers, which is loaded by libGL.so using dlopen().
>>
>>
>
> please send me the output of running
> WINEDEBUG=+dbghelp wine 
>
> and then at debugger prompt
>
> Wine-dbg> break your_func_in_dri_driver
> Wine-dbg> cont
>
> TIA
>
> --
> Eric Pouech
> "The problem with designing something completely foolproof is to
> underestimate the ingenuity of a complete idiot." (Douglas Adams)
>
>
>






Re: Is there any way to debug driver?

2009-06-23 Thread Roderick Colenbrander
It was just mentioned on IRC that the environment variable
WINELOADERNOEXEC=1 needs to be set. After that you can just run 'gdb
wine' and continue the same way as using wine-preloader.

Roderick

On Mon, Jun 22, 2009 at 10:24 PM, Eric Pouech wrote:
> Wang, Robin a écrit :
>>
>> Hi Roderick,
>>
>> Using winedbg, it is OK for us to break into libGL.so. But we cannot set
>> break point in our dri drivers, which is loaded by libGL.so using dlopen().
>>
>>
>
> please send me the output of running
> WINEDEBUG=+dbghelp wine 
>
> and then at debugger prompt
>
> Wine-dbg> break your_func_in_dri_driver
> Wine-dbg> cont
>
> TIA
>
> --
> Eric Pouech
> "The problem with designing something completely foolproof is to
> underestimate the ingenuity of a complete idiot." (Douglas Adams)
>
>
>




Re: Is there any way to debug driver?

2009-06-22 Thread Eric Pouech

Wang, Robin a écrit :

Hi Roderick,

Using winedbg, it is OK for us to break into libGL.so. But we cannot set break 
point in our dri drivers, which is loaded by libGL.so using dlopen().

  

please send me the output of running
WINEDEBUG=+dbghelp wine 

and then at debugger prompt

Wine-dbg> break your_func_in_dri_driver
Wine-dbg> cont

TIA

--
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the 
ingenuity of a complete idiot." (Douglas Adams)






RE: Is there any way to debug driver?

2009-06-22 Thread Wang, Robin
Hi Roderick,

Using winedbg, it is OK for us to break into libGL.so. But we cannot set break 
point in our dri drivers, which is loaded by libGL.so using dlopen().

Thanks,
Robin

-Original Message-
From: Roderick Colenbrander [mailto:thunderbir...@gmail.com] 
Sent: Monday, June 22, 2009 8:15 PM
To: Guan, Xiao-Feng
Cc: Ken Thomases; Wang, Robin; wine-devel; Boudier, Pierre; Zhou, Jesse; Jin, 
Jian-Rong; Sun, Sunny
Subject: Re: Is there any way to debug driver?

At what sort of points did you try to set breakpoints before? Note
that we are loading opengl dynamically which might make debugging a
little bit harder. What about plain winedbg? Today I tried 'winedbg
--gdb notepad' and indeed had some issues but plain winedbg worked
properly. Further 'gdb wine notepad' also worked properly except that
for some reason my back trace didn't include debug symbols.

It might help to explain what commands you are exactly using and what
sort of break points you attempt to set. Then we might be able to help
you better.

Roderick

On Mon, Jun 22, 2009 at 8:52 AM, Guan, Xiao-Feng wrote:
> The gdb way always turns into some SIGTRAP signal from preloader and
> finally terminates the loading process. It seems that the WINE binary
> loader would not co-work with gdb.
>
> We will try another way -- the WINE visual tests, to see if it is enough
> for work.
>
> Thanks very much.
>
> Guan Xiaofeng
> AMD Shanghai SW OpenGL Team
> 021-61601838-25746
> xiao-feng.g...@amd.com
>
>
> -Original Message-
> From: Ken Thomases [mailto:k...@codeweavers.com]
> Sent: Thursday, June 18, 2009 11:34 PM
> To: Wang, Robin; wine-devel
> Cc: Guan, Xiao-Feng; Boudier, Pierre; Zhou, Jesse; Jin, Jian-Rong; Sun,
> Sunny
> Subject: Re: Is there any way to debug driver?
>
> On Jun 17, 2009, at 10:49 AM, Wang, Robin wrote:
>
>> We also have tried using winedbg, but it cannot break into our
>> driver either.
>>
>> The only way we can break into our driver before is using "gdb wine-
>> pthread", but now it is not available.
>>
>> Do you have some suggestion on winedbg configuration to make it able
>> to break into graphics drivers.
>
> As already mentioned by Ben Klein, just try "gdb wine" instead of "gdb
> wine-pthread".  The executable name has changed.  That's all.
>
> Cheers,
> Ken
>
>
>
>
>
>






Re: Is there any way to debug driver?

2009-06-22 Thread Roderick Colenbrander
At what sort of points did you try to set breakpoints before? Note
that we are loading opengl dynamically which might make debugging a
little bit harder. What about plain winedbg? Today I tried 'winedbg
--gdb notepad' and indeed had some issues but plain winedbg worked
properly. Further 'gdb wine notepad' also worked properly except that
for some reason my back trace didn't include debug symbols.

It might help to explain what commands you are exactly using and what
sort of break points you attempt to set. Then we might be able to help
you better.

Roderick

On Mon, Jun 22, 2009 at 8:52 AM, Guan, Xiao-Feng wrote:
> The gdb way always turns into some SIGTRAP signal from preloader and
> finally terminates the loading process. It seems that the WINE binary
> loader would not co-work with gdb.
>
> We will try another way -- the WINE visual tests, to see if it is enough
> for work.
>
> Thanks very much.
>
> Guan Xiaofeng
> AMD Shanghai SW OpenGL Team
> 021-61601838-25746
> xiao-feng.g...@amd.com
>
>
> -Original Message-
> From: Ken Thomases [mailto:k...@codeweavers.com]
> Sent: Thursday, June 18, 2009 11:34 PM
> To: Wang, Robin; wine-devel
> Cc: Guan, Xiao-Feng; Boudier, Pierre; Zhou, Jesse; Jin, Jian-Rong; Sun,
> Sunny
> Subject: Re: Is there any way to debug driver?
>
> On Jun 17, 2009, at 10:49 AM, Wang, Robin wrote:
>
>> We also have tried using winedbg, but it cannot break into our
>> driver either.
>>
>> The only way we can break into our driver before is using "gdb wine-
>> pthread", but now it is not available.
>>
>> Do you have some suggestion on winedbg configuration to make it able
>> to break into graphics drivers.
>
> As already mentioned by Ben Klein, just try "gdb wine" instead of "gdb
> wine-pthread".  The executable name has changed.  That's all.
>
> Cheers,
> Ken
>
>
>
>
>
>




RE: Is there any way to debug driver?

2009-06-22 Thread Guan, Xiao-Feng
The gdb way always turns into some SIGTRAP signal from preloader and
finally terminates the loading process. It seems that the WINE binary
loader would not co-work with gdb.

We will try another way -- the WINE visual tests, to see if it is enough
for work.

Thanks very much.

Guan Xiaofeng
AMD Shanghai SW OpenGL Team
021-61601838-25746
xiao-feng.g...@amd.com
 
 
-Original Message-
From: Ken Thomases [mailto:k...@codeweavers.com] 
Sent: Thursday, June 18, 2009 11:34 PM
To: Wang, Robin; wine-devel
Cc: Guan, Xiao-Feng; Boudier, Pierre; Zhou, Jesse; Jin, Jian-Rong; Sun,
Sunny
Subject: Re: Is there any way to debug driver?

On Jun 17, 2009, at 10:49 AM, Wang, Robin wrote:

> We also have tried using winedbg, but it cannot break into our  
> driver either.
>
> The only way we can break into our driver before is using "gdb wine- 
> pthread", but now it is not available.
>
> Do you have some suggestion on winedbg configuration to make it able  
> to break into graphics drivers.

As already mentioned by Ben Klein, just try "gdb wine" instead of "gdb  
wine-pthread".  The executable name has changed.  That's all.

Cheers,
Ken







Re: Is there any way to debug driver?

2009-06-18 Thread Ken Thomases

On Jun 17, 2009, at 10:49 AM, Wang, Robin wrote:

We also have tried using winedbg, but it cannot break into our  
driver either.


The only way we can break into our driver before is using "gdb wine- 
pthread", but now it is not available.


Do you have some suggestion on winedbg configuration to make it able  
to break into graphics drivers.


As already mentioned by Ben Klein, just try "gdb wine" instead of "gdb  
wine-pthread".  The executable name has changed.  That's all.


Cheers,
Ken





Re: Is there any way to debug driver?

2009-06-17 Thread Stefan Dösinger
Am Wednesday 17 June 2009 21:56:14 schrieb Roderick Colenbrander:
> Have you tried: winedbg --gdb appname.exe? It will use gdb then and
> still see win32 symbols I think.
You can also start the app, put a Sleep(1) somewhere into the early 
wined3d init code, then attach gdb to the running process




Re: Is there any way to debug driver?

2009-06-17 Thread Roderick Colenbrander
Have you tried: winedbg --gdb appname.exe? It will use gdb then and
still see win32 symbols I think.

Roderick


On Wed, Jun 17, 2009 at 5:49 PM, Wang, Robin wrote:
> We also have tried using winedbg, but it cannot break into our driver either.
>
> The only way we can break into our driver before is using "gdb wine-pthread", 
> but now it is not available.
>
> Do you have some suggestion on winedbg configuration to make it able to break 
> into graphics drivers.
>
> Thanks
>
> -Original Message-
> From: Henri Verbeet [mailto:hverb...@gmail.com]
> Sent: Wednesday, June 17, 2009 9:27 PM
> To: Guan, Xiao-Feng
> Cc: wine-devel@winehq.org; Wang, Robin; Zhou, Jesse; Jin, Jian-Rong; Sun, 
> Sunny; Boudier, Pierre
> Subject: Re: Is there any way to debug driver?
>
> 2009/6/17 Guan, Xiao-Feng :
>>   As we can see that, from version 1.1.23, all application fails to start on
>> AMD card. We are going to investigate why it happens. If it is necessary,
>> Would you please let us know a little more about the changes of this
>> version?
>>
> There's a bug for that specific issue filed at
> http://ati.cchtml.com/show_bug.cgi?id=1571. It contains an explanation
> and test case. Current git versions of Wine avoid the bug by just not
> attaching compressed and depth formats to an FBO, since they're not
> supposed to be color-renderable anyway.
>
> I'm afraid I can't help much with getting gdb working with Wine, I
> don't use/like debuggers much. I think you're supposed to use winedbg
> for Wine debugging though.
>
> Henri
>
>
>




RE: Is there any way to debug driver?

2009-06-17 Thread Wang, Robin
We also have tried using winedbg, but it cannot break into our driver either.

The only way we can break into our driver before is using "gdb wine-pthread", 
but now it is not available.

Do you have some suggestion on winedbg configuration to make it able to break 
into graphics drivers.

Thanks

-Original Message-
From: Henri Verbeet [mailto:hverb...@gmail.com] 
Sent: Wednesday, June 17, 2009 9:27 PM
To: Guan, Xiao-Feng
Cc: wine-devel@winehq.org; Wang, Robin; Zhou, Jesse; Jin, Jian-Rong; Sun, 
Sunny; Boudier, Pierre
Subject: Re: Is there any way to debug driver?

2009/6/17 Guan, Xiao-Feng :
>   As we can see that, from version 1.1.23, all application fails to start on
> AMD card. We are going to investigate why it happens. If it is necessary,
> Would you please let us know a little more about the changes of this
> version?
>
There's a bug for that specific issue filed at
http://ati.cchtml.com/show_bug.cgi?id=1571. It contains an explanation
and test case. Current git versions of Wine avoid the bug by just not
attaching compressed and depth formats to an FBO, since they're not
supposed to be color-renderable anyway.

I'm afraid I can't help much with getting gdb working with Wine, I
don't use/like debuggers much. I think you're supposed to use winedbg
for Wine debugging though.

Henri




Re: Is there any way to debug driver?

2009-06-17 Thread Roderick Colenbrander
Well as Henri mentioned a bug report has been posted to the
(un)official amd bugzilla for it with details on the crash. It was
just related to the enabling of FBOs by default and some FBO related
tests.

Regarding debugging I would try to use winedbg and if it isn't
sufficient winedbg offers a gdb proxy method which could be useful as
well. Further it might also be useful to use the Wine ddraw/d3d8/d3d9
test suites. The tests consist of both conformance tests to windows
behavior and they also test tricky d3d functionality which popular
games require. Various tests fail at this point on the AMD drivers (on
windows some also don't always work) and before (on catalyst <=9.3 or
it was <=9.2) some tests even caused a system crash. It would be
useful if the tests could be run as they illustrate a lot of tricky
d3d9 situations.

Regards,
Roderick Colenbrander

On Wed, Jun 17, 2009 at 5:38 PM, Damjan Jovanovic wrote:
> On Wed, Jun 17, 2009 at 11:01 AM, Guan, Xiao-Feng 
> wrote:
>> Hello,
>>
>>   As we can see that, from version 1.1.23, all application fails to start on
>> AMD card. We are going to investigate why it happens. If it is necessary,
>> Would you please let us know a little more about the changes of this
>> version?
>
> If it worked for you before and doesn't work in 1.1.23, it sounds like
> you should do a regression test to find the patch that broke it:
> http://wiki.winehq.org/RegressionTesting
>
>>
>>
>> Thanks & regards.
>>
>>
>>
>> Guan Xiaofeng
>>
>> OpenGL Software Engineer,
>>
>> Graphic Product Group
>>
>> Shanghai R&D Center, AMD Cop.
>>
>> xiao-feng.g...@amd.com
>>
>> Tel 86 021 61601838 ext 25746
>>
>>
>>
>
> Regards and good luck
> Damjan Jovanovic
>
>
>




Re: Is there any way to debug driver?

2009-06-17 Thread Damjan Jovanovic
On Wed, Jun 17, 2009 at 11:01 AM, Guan, Xiao-Feng wrote:
> Hello,
>
>   As we can see that, from version 1.1.23, all application fails to start on
> AMD card. We are going to investigate why it happens. If it is necessary,
> Would you please let us know a little more about the changes of this
> version?

If it worked for you before and doesn't work in 1.1.23, it sounds like
you should do a regression test to find the patch that broke it:
http://wiki.winehq.org/RegressionTesting

>
>
> Thanks & regards.
>
>
>
> Guan Xiaofeng
>
> OpenGL Software Engineer,
>
> Graphic Product Group
>
> Shanghai R&D Center, AMD Cop.
>
> xiao-feng.g...@amd.com
>
> Tel 86 021 61601838 ext 25746
>
>
>

Regards and good luck
Damjan Jovanovic




Re: Is there any way to debug driver?

2009-06-17 Thread Ben Klein
2009/6/17 Guan, Xiao-Feng :
> Hello,
>
>
>
>   I’m AMD driver developer and would like to ask a question. This issue
> blocks us from making a better driver for WINE.
>
>
>
>   Recently we have difficulty in debugging our driver with WINE. We used to
> start wine-pthread in gdb to debug the applications. Or else we cannot break
> into our driver. However, now we cannot build this executable any more in
> wine-1.1.23 or git repository. I wonder if there is any other method to get
> all symbols right in gdb.

wine-pthread and wine-kthread got rolled together into a single "wine"
loader a few versions ago.




Re: Is there any way to debug driver?

2009-06-17 Thread Henri Verbeet
2009/6/17 Guan, Xiao-Feng :
>   As we can see that, from version 1.1.23, all application fails to start on
> AMD card. We are going to investigate why it happens. If it is necessary,
> Would you please let us know a little more about the changes of this
> version?
>
There's a bug for that specific issue filed at
http://ati.cchtml.com/show_bug.cgi?id=1571. It contains an explanation
and test case. Current git versions of Wine avoid the bug by just not
attaching compressed and depth formats to an FBO, since they're not
supposed to be color-renderable anyway.

I'm afraid I can't help much with getting gdb working with Wine, I
don't use/like debuggers much. I think you're supposed to use winedbg
for Wine debugging though.

Henri