Hi
I'm trying to figure out how to single step through the code. I've looked at the winedbg and gdb information on winehq, but still can't figure out what to do. I normally run tests by issuing:
$ ../../../tools/runtest name_of_test
Is there a way to run the test in a debugger, so that I can single step through the functions that the test calls?
Thanks, Michael Mc Donnell
On Friday 24 June 2011 11:53:22 Michael Mc Donnell wrote:
$ ../../../tools/runtest name_of_test
Is there a way to run the test in a debugger, so that I can single step through the functions that the test calls?
../../../wine winedbg foo_test.exe.so should work.
On Fri, Jun 24, 2011 at 1:30 PM, Stefan Dösinger stefandoesinger@gmx.at wrote:
On Friday 24 June 2011 11:53:22 Michael Mc Donnell wrote:
$ ../../../tools/runtest name_of_test
Is there a way to run the test in a debugger, so that I can single step through the functions that the test calls?
../../../wine winedbg foo_test.exe.so should work.
Thanks. My next question is now how I use a graphical debugger. I'm trying to run d3dx9_36_test.exe.so, so I use the command:
$ ../../../wine winedbg --gdb --no-start d3dx9_36_test.exe.so mesh
It then starts and prints out what port to connect on. Something like:
target remote localhost:57380
Now I want to connect my graphical debugger. I enter "target remote localhost:57380" in ddd's command line and it connects. But how do I attach the source code and so on (I'm use to debugging in Eclipse and VS)?
On Friday 24 June 2011 14:44:10 Michael Mc Donnell wrote:
Now I want to connect my graphical debugger. I enter "target remote localhost:57380" in ddd's command line and it connects. But how do I attach the source code and so on (I'm use to debugging in Eclipse and VS)?
I'm not sure about that, I never used any graphical debuggers with Wine. But gdb(and winedbg) always found the Wine source, my assumption was that the path to it is stored in the binaries, so ddd should automatically find it.
Also note that you don't have to use winedbg, you can also use gdb directly(ie, "gdb wine", then "start foo.exe.so"). This only works with a Wine binary created by make install, because the wine executable in the build tree is actually a shell script. You can also attach gdb to a running Wine process.
On Fri, Jun 24, 2011 at 2:56 PM, Stefan Dösinger stefandoesinger@gmx.at wrote:
On Friday 24 June 2011 14:44:10 Michael Mc Donnell wrote:
Now I want to connect my graphical debugger. I enter "target remote localhost:57380" in ddd's command line and it connects. But how do I attach the source code and so on (I'm use to debugging in Eclipse and VS)?
I'm not sure about that, I never used any graphical debuggers with Wine. But gdb(and winedbg) always found the Wine source, my assumption was that the path to it is stored in the binaries, so ddd should automatically find it.
Well I guess I can go old school with the command line version instead :-)
I can set a break point at test_convert_point_reps_to_adjacency (my new test) and it stops there. I can also set a break point for ID3DXMeshImpl_ConvertPointRepsToAdjacency but it just goes past it.
Here are the commands I used: b test_convert_point_reps_to_adjacency cont b ID3DXMeshImpl_ConvertAdjacencyToPointReps cont
Any idea what I'm doing wrong?
On 24 June 2011 15:24, Michael Mc Donnell michael@mcdonnell.dk wrote:
I can set a break point at test_convert_point_reps_to_adjacency (my new test) and it stops there. I can also set a break point for ID3DXMeshImpl_ConvertPointRepsToAdjacency but it just goes past it.
Here are the commands I used: b test_convert_point_reps_to_adjacency cont b ID3DXMeshImpl_ConvertAdjacencyToPointReps cont
Any idea what I'm doing wrong?
Is that a typo, or did you really mean "ID3DXMeshImpl_ConvertAdjacencyToPointReps" there?
On Fri, Jun 24, 2011 at 3:55 PM, Henri Verbeet hverbeet@gmail.com wrote:
On 24 June 2011 15:24, Michael Mc Donnell michael@mcdonnell.dk wrote:
I can set a break point at test_convert_point_reps_to_adjacency (my new test) and it stops there. I can also set a break point for ID3DXMeshImpl_ConvertPointRepsToAdjacency but it just goes past it.
Here are the commands I used: b test_convert_point_reps_to_adjacency cont b ID3DXMeshImpl_ConvertAdjacencyToPointReps cont
Any idea what I'm doing wrong?
Is that a typo, or did you really mean "ID3DXMeshImpl_ConvertAdjacencyToPointReps" there?
Doh! It should have been ID3DXMeshImpl_ConvertPointRepsToAdjacency. Thanks Henri for spotting that one. It now works as expected :-)
On Fri, Jun 24, 2011 at 3:24 PM, Michael Mc Donnell michael@mcdonnell.dk wrote:
On Fri, Jun 24, 2011 at 2:56 PM, Stefan Dösinger stefandoesinger@gmx.at wrote:
On Friday 24 June 2011 14:44:10 Michael Mc Donnell wrote:
Now I want to connect my graphical debugger. I enter "target remote localhost:57380" in ddd's command line and it connects. But how do I attach the source code and so on (I'm use to debugging in Eclipse and VS)?
I'm not sure about that, I never used any graphical debuggers with Wine. But gdb(and winedbg) always found the Wine source, my assumption was that the path to it is stored in the binaries, so ddd should automatically find it.
Well I guess I can go old school with the command line version instead :-)
So much for going old school. It does work, but it's next to useless for the stuff I'm doing. I really miss having a list of all the variables in the stack frame with their values, and seeing the code as I step through it.
I tried again to follow the instructions from http://www.winehq.org/docs/winedev-guide/dbg-others but I could not get ddd nor kdbg to work. ddd comes up with "A syntax error in expression, near `0x681f2fbd'." and an empty source view. kdbg comes up and it does not find the sources either. The following error message is displayed "Unknown or malformed query Attached" when the test is run. After a few exceptions the test runs to the end.
Does anyone use a graphical debugger?