Commit 81857b73 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Minor cleanups.

parent 163f5ab9
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
processes/threads from a Windows point of view. processes/threads from a Windows point of view.
</para> </para>
<para> <para>
Each Windows' thread is implemented as a Unix process (under Each Windows' thread is implemented as a Unix thread, meaning
Linux using the <function>clone</function> syscall), meaning
that all threads of a same Windows' process share the same that all threads of a same Windows' process share the same
(unix) address space. (unix) address space.
</para> </para>
...@@ -102,15 +101,16 @@ ...@@ -102,15 +101,16 @@
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para> <para>
Wine implements most of the Windows' debugging API (the Wine implements most of the Windows' debugging API. The
part in <filename>KERNEL32.DLL</filename>, not the one in first part of the debugging APIs (in
<filename>IMAGEHLP.DLL</filename>), and allows any program <filename>KERNEL32.DLL</filename>) allows a W-process, called
(emulated or Winelib) using that API to debug a the debugger, to control the execution of another W-process,
<varname>W-process</varname>. the debuggee. To control means stopping/resuming execution,
</para> enabling/disabling single stepping, setting breakpoints,
<para> reading/writing debuggee memory... Another part of the
Wine also implements <filename>DBGHELP.DLL</filename> which debugging APIs resides in <filename>DBGHELP.DLL</filename>
allows to look into symbols and types from any module (if (and its ancestor <filename>IMAGEHLP.DLL</filename>) and lets
a debugger look into symbols and types from any module (if
the module has been compiled with the proper options). the module has been compiled with the proper options).
</para> </para>
<para> <para>
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</para> </para>
<screen> <screen>
winedbg telnet.exe winedbg telnet.exe
winedbg "hl.exe -windowed" winedbg hl.exe -windowed
</screen> </screen>
</sect2> </sect2>
...@@ -201,7 +201,7 @@ winedbg "hl.exe -windowed" ...@@ -201,7 +201,7 @@ winedbg "hl.exe -windowed"
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>continue:</term> <term>continue</term>
<listitem> <listitem>
<para> <para>
the debugger had the ability to correct what's the debugger had the ability to correct what's
...@@ -211,7 +211,7 @@ winedbg "hl.exe -windowed" ...@@ -211,7 +211,7 @@ winedbg "hl.exe -windowed"
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>pass:</term> <term>pass</term>
<listitem> <listitem>
<para> <para>
the debugger couldn't correct the cause of the the debugger couldn't correct the cause of the
...@@ -462,7 +462,7 @@ winedbg "hl.exe -windowed" ...@@ -462,7 +462,7 @@ winedbg "hl.exe -windowed"
</sect2> </sect2>
<sect2> <sect2>
<title>Disassembling programs:</title> <title>Disassembling programs</title>
<para> <para>
You may also try to disassemble the offending program to You may also try to disassemble the offending program to
...@@ -538,7 +538,7 @@ call KERNEL.LSTRLEN ...@@ -538,7 +538,7 @@ call KERNEL.LSTRLEN
</sect2> </sect2>
<sect2> <sect2>
<title>Sample debugging session:</title> <title>Sample debugging session</title>
<para> <para>
Let's debug the infamous Word <filename>SHARE.EXE</filename> Let's debug the infamous Word <filename>SHARE.EXE</filename>
...@@ -821,7 +821,7 @@ Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff ...@@ -821,7 +821,7 @@ Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff
</sect2> </sect2>
<sect2> <sect2>
<title>Some basic debugger usages:</title> <title>Some basic debugger usages</title>
<para> <para>
After starting your program with After starting your program with
...@@ -968,7 +968,7 @@ wine -debug myprog.exe ...@@ -968,7 +968,7 @@ wine -debug myprog.exe
</para> </para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>Debugger:</term> <term>Debugger</term>
<listitem> <listitem>
<para> <para>
this is the command line used to launch the debugger this is the command line used to launch the debugger
...@@ -985,7 +985,7 @@ wine -debug myprog.exe ...@@ -985,7 +985,7 @@ wine -debug myprog.exe
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>Auto:</term> <term>Auto</term>
<listitem> <listitem>
<para> <para>
if this value is zero, a message box will ask the if this value is zero, a message box will ask the
...@@ -1041,7 +1041,7 @@ wine -debug myprog.exe ...@@ -1041,7 +1041,7 @@ wine -debug myprog.exe
per user basis. The key is (in <emphasis>my</emphasis> registry) per user basis. The key is (in <emphasis>my</emphasis> registry)
</para> </para>
<programlisting> <programlisting>
[eric\\Software\\Wine\\WineDbg] [HKCU\\Software\\Wine\\WineDbg]
</programlisting> </programlisting>
<para> <para>
Those options can be read/written while inside Those options can be read/written while inside
...@@ -1897,7 +1897,7 @@ set $BreakAllThreadsStartup = 1 ...@@ -1897,7 +1897,7 @@ set $BreakAllThreadsStartup = 1
</entry> </entry>
</row> </row>
<row> <row>
<entry><command>info&nbsp;share;</command></entry> <entry><command>info&nbsp;share</command></entry>
<entry> <entry>
lists all the dynamic libraries loaded in the lists all the dynamic libraries loaded in the
debugged program (including .so files, NE and PE debugged program (including .so files, NE and PE
...@@ -1907,7 +1907,7 @@ set $BreakAllThreadsStartup = 1 ...@@ -1907,7 +1907,7 @@ set $BreakAllThreadsStartup = 1
<row> <row>
<entry> <entry>
<command> <command>
info&nbsp;share&nbsp;&lt;N&gt;; info&nbsp;share&nbsp;&lt;N&gt;
</command> </command>
</entry> </entry>
<entry> <entry>
...@@ -1915,14 +1915,14 @@ set $BreakAllThreadsStartup = 1 ...@@ -1915,14 +1915,14 @@ set $BreakAllThreadsStartup = 1
</entry> </entry>
</row> </row>
<row> <row>
<entry><command>info regs;</command></entry> <entry><command>info regs</command></entry>
<entry> <entry>
prints the value of the CPU registers prints the value of the CPU registers
</entry> </entry>
</row> </row>
<row> <row>
<entry> <entry>
<command>info segment &lt;N&gt;;</command> <command>info segment &lt;N&gt;</command>
</entry> </entry>
<entry> <entry>
prints information on segment &lt;N&gt; (i386 prints information on segment &lt;N&gt; (i386
...@@ -1931,20 +1931,20 @@ set $BreakAllThreadsStartup = 1 ...@@ -1931,20 +1931,20 @@ set $BreakAllThreadsStartup = 1
</row> </row>
<row> <row>
<entry> <entry>
<command>info&nbsp;segment;</command> <command>info&nbsp;segment</command>
</entry> </entry>
<entry> <entry>
lists all allocated segments (i386 only) lists all allocated segments (i386 only)
</entry> </entry>
</row> </row>
<row> <row>
<entry><command>info&nbsp;stack;</command></entry> <entry><command>info&nbsp;stack</command></entry>
<entry> <entry>
prints the values on top of the stack prints the values on top of the stack
</entry> </entry>
</row> </row>
<row> <row>
<entry><command>info&nbsp;map;</command></entry> <entry><command>info&nbsp;map</command></entry>
<entry> <entry>
lists all virtual mappings used by the debugged lists all virtual mappings used by the debugged
program program
...@@ -1952,7 +1952,7 @@ set $BreakAllThreadsStartup = 1 ...@@ -1952,7 +1952,7 @@ set $BreakAllThreadsStartup = 1
</row> </row>
<row> <row>
<entry> <entry>
<command>info&nbsp;map&nbsp;&lt;N&gt;</command> <command>info&nbsp;map&nbsp;&lt;N&gt</command>
</entry> </entry>
<entry> <entry>
lists all virtual mappings used by the program of lists all virtual mappings used by the program of
...@@ -1961,7 +1961,7 @@ set $BreakAllThreadsStartup = 1 ...@@ -1961,7 +1961,7 @@ set $BreakAllThreadsStartup = 1
</row> </row>
<row> <row>
<entry> <entry>
<command>info&nbsp;wnd&nbsp;&lt;N&gt;</command> <command>info&nbsp;wnd&nbsp;&lt;N&gt</command>
</entry> </entry>
<entry> <entry>
prints information of Window of handle &lt;N&gt; prints information of Window of handle &lt;N&gt;
...@@ -2221,13 +2221,31 @@ kdbg -r localhost:32878 wine ...@@ -2221,13 +2221,31 @@ kdbg -r localhost:32878 wine
</para> </para>
<note> <note>
<para> <para>
Even if latest <command>gdb</command> implements the If you plan to used <command>gdb</command> for a
notion of threads, it won't work with Wine because the multi-threaded Wine application (native or Winelib), then
thread abstraction used for implementing Windows' thread <command>gdb</command> will be able to handle the multiple
is not 100% mapped onto the Linux POSIX threads threads directly only if:
implementation. It means that you'll have to spawn a <itemizedlist>
different <command>gdb</command> session for each Windows' <listitem>
thread you wish to debug. <para>
Wine is running on the pthread model (it won't work
in the kthread one). See the Wine architecture
documentation for further details.
</para>
</listitem>
<listitem>
<para>
<command>gdb</command> supports the multi-threading
(you need gdb at least 5.0 for that).
</para>
</listitem>
</itemizedlist>
In the unfortunate case (no direct thread support in
<command>gdb</command> because one of the above conditions
is false), you'll have to spawn a different
<command>gdb</command> session for each Windows' thread
you wish to debug (which means no synchronization for
debugging purposes between the various threads).
</para> </para>
</note> </note>
...@@ -2340,24 +2358,6 @@ $ gdb wine ...@@ -2340,24 +2358,6 @@ $ gdb wine
</sect2> </sect2>
</sect1> </sect1>
<sect1 id="dbg-limits">
<title>Limitations</title>
<itemizedlist>
<listitem>
<para>
16 bit processes are not supported (but calls to 16 bit
code in 32 bit applications are).
</para>
</listitem>
<listitem>
<para>
Function call in expression is no longer supported
</para>
</listitem>
</itemizedlist>
</sect1>
</chapter> </chapter>
<!-- Keep this comment at the end of the file <!-- Keep this comment at the end of the file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment