945-948.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 217 行
HTML
217 行
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:The Wine Project</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=59//-->
<!--PAGES=945-948//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="942-945.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="948-951.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading11"></A><FONT COLOR="#000077">Using Command-Line Options</FONT></H4>
<P>The Wine command line has the following format:
</P>
<!-- CODE SNIP //-->
<PRE>
wine wine_<I>options program program_options</I>.
</PRE>
<!-- END CODE SNIP //-->
<P>For example:
</P>
<!-- CODE SNIP //-->
<PRE>
bash# /usr/wine/wine -debugmsg +all /c/windows/winmine.exe
</PRE>
<!-- END CODE SNIP //-->
<P>Table 59.1 shows command-line options available with Wine.
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 59.1.</B> Wine command-line options.
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TH WIDTH="30%" ALIGN="LEFT">Option
<TH WIDTH="75%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD VALIGN="TOP"><TT>-depth <I>n</I></TT>
<TD>Change the depth to use for multiple-depth screens. This configures Wine to use other than the default number of colors. (8 bitplanes is 256 colors and usually the only acceptable answer.)
<TR>
<TD VALIGN="TOP"><TT>-desktop geom</TT>
<TD>Run an MS-Windows application with a desktop of the size specified. For example, 850×620 would create a window of 850 by 620. Running with a desktop also eliminates the modal, or stuck-on-top, behavior of Wine applications.
<TR>
<TD VALIGN="TOP"><TT>-display <I>name</I></TT>
<TD>Use an X display other than the default. This enables users to run an MS-Windows application on another X device over an attached network.
<TR>
<TD VALIGN="TOP"><TT>-iconic</TT>
<TD>Start application as an icon rather than full-screen. This is same functionality as run minimized from the Program Manager under native MS-Windows.
<TR>
<TD><TT>-debug</TT>
<TD>Enter debugger before starting application.
<TR>
<TD VALIGN="TOP"><TT>-name <I>name</I></TT>
<TD>Set the application name. This is useful for telling the X Window manager a meaningful name for the application. The default name is <TT>wine</TT>.
<TR>
<TD VALIGN="TOP"><TT>-privatemap</TT>
<TD>Use a private color map. This is useful for applications that make extensive use of color. Running an application this way causes the colors of other X applications to look weird while the Wine session is the selected window.
<TR>
<TD VALIGN="TOP"><TT>-synchronous</TT>
<TD>Turn on synchronous display mode. This can severely slow down applications because it causes X Window to wait for the completion of each command before sending the next one. X applications can send commands to an X server that may or may not be on the same machine. Under some applications, synchronization is necessary so that graphics operations do not get optimized away by the X server.
<TR>
<TD VALIGN="TOP"><TT>-backingstore</TT>
<TD>This is an optimization that enables an X server to handle <TT>expose</TT> events without interrupting the client program.
<TR>
<TD VALIGN="TOP"><TT>-spy <I>file</I></TT>
<TD>Turn on message spying to the specified file. This can also be done by output redirection.
<TR>
<TD VALIGN="TOP"><TT>-debugmsg <I>name</I></TT>
<TD>Turn specific debugging information on or off. To get a current list of debug message types, enter the following command: <TT>wine -debugmsg help help</TT>.
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading12"></A><FONT COLOR="#000077">The Wine Debugger</FONT></H4>
<P>Wine has a built-in debugger that is useful for uncovering problems within the program. When an MS-Windows program exits due to a problem, the debugger starts in the <TT>xterm</TT> from which Wine was started. If you are not interested in troubleshooting Wine, simply type <TT>quit</TT> at the prompt and skip to the next section of this chapter.</P>
<P>The Wine debugger is similar to the GNU debugger <TT>gdb</TT>. Breakpoints can be set; examination and modification of registers as well as memory locations are possible. However, the following is a minimal debugger that includes only the commands listed in Table 59.2.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 59.2.</B> Wine debugger commands.
<TR>
<TH COLSPAN="3"><HR>
<TR>
<TH WIDTH="25%" ALIGN="LEFT">Command
<TH COLSPAN="2" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="3"><HR>
<TR>
<TD VALIGN="TOP"><TT>break</TT>
<TD COLSPAN="2">Set a breakpoint at a specified address or symbolic value. Wine will stop before executing instructions at this address. For example, <TT>break * GDI_Ordinal_24</TT> sets a breakpoint at the start of Windows Ellipse function known internally as GDI.24.
<TR>
<TD VALIGN="TOP"><TT>bt</TT>
<TD COLSPAN="2">Backtrace, or show the history of Wine calls leading to the current place. The addresses shown are the return addresses, not the calling addresses.
<TR>
<TD VALIGN="TOP"><TT>cont</TT>
<TD COLSPAN="2">Continue program execution until a breakpoint or error condition is reached.
<TR>
<TD VALIGN="TOP"><TT>define</TT>
<TD COLSPAN="2">Equates a symbol to a value. For example: define <TT>myproc 0x000001c6</TT>.
<TR>
<TD VALIGN="TOP"><TT>disable</TT>
<TD COLSPAN="2">Disable a specific breakpoint. Breakpoints defined by the <TT>break</TT> command are stored by breakpoint numbers. To disable a breakpoint, find the breakpoint number with the <TT>info</TT> command. To disable breakpoint number 1, simply type <TT>disable 1</TT>.
<TR>
<TD VALIGN="TOP"><TT>enable</TT>
<TD COLSPAN="2">Enables a breakpoint number, the opposite of <TT>disable</TT>. To enable the previously disabled breakpoint number 1, simply type <TT>enable 1</TT>.
<TR>
<TD><TT>help</TT>
<TD COLSPAN="2">Prints a help text of the available commands.
<TR>
<TD><TT>info</TT>
<TD COLSPAN="2">Provides information on the following:
<TR>
<TD>
<TD COLSPAN="2"><TT>reg</TT> registers information.
<TR>
<TD>
<TD COLSPAN="2"><TT>stack</TT> dumps the current stack.
<TR>
<TD>
<TD COLSPAN="2"><TT>break</TT> shows the current breakpoints and whether they are enabled.
<TR>
<TD>
<TD COLSPAN="2"><TT>segments</TT> shows information about memory segments in use.
<TR>
<TD><TT>mode</TT>
<TD COLSPAN="2">Switches between 16- and 32-bit modes.
<TR>
<TD><TT>print</TT>
<TD COLSPAN="2">Prints out values of expressions given.
<TR>
<TD VALIGN="TOP"><TT>quit</TT>
<TD COLSPAN="2">Exits debugger and ends any MS-Windows program in progress.
<TR>
<TD><TT>set</TT>
<TD COLSPAN="2">Enables depositing of values in registers and memory.
<TR>
<TD VALIGN="TOP"><TT>symbolfile</TT>
<TD COLSPAN="2">Loads a symbol file containing symbolic values. The file <TT>wine.sym</TT> is created as part of the Wine build.
<TR>
<TD VALIGN="TOP"><TT>x</TT>
<TD COLSPAN="2">Examines memory values in several different formats. The format of <TT>x</TT> is <TT>x / format address</TT>, where <TT>format</TT> can be one of the following:
<TR>
<TD>
<TD WIDTH="10%"><TT>x</TT>
<TD WIDTH="65%">longword hexadecimal (32-bit integer)
<TR>
<TD>
<TD><TT>d</TT>
<TD>longword decimal
<TR>
<TD>
<TD><TT>w</TT>
<TD>word hexadecimal
<TR>
<TD>
<TD><TT>b</TT>
<TD>byte
<TR>
<TD>
<TD><TT>c</TT>
<TD>single character
<TR>
<TD>
<TD><TT>s</TT>
<TD>null-terminated ASCII string
<TR>
<TD>
<TD><TT>I</TT>
<TD>i386 instruction
<TR>
<TD>
<TD COLSPAN="2">A number can be specified before the <TT>format</TT> to indicate a repeating group. For example, listing 10 instructions after a given address would be <TT>x / 10 I 0x000001cd</TT>.
<TR>
<TD COLSPAN="3"><HR>
</TABLE>
<P>In order to benefit from using the Wine debugger, an understanding of debugging i386 assembly is essential. If you are serious about debugging Wine, an assembly language output from GCC is essential.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="942-945.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="948-951.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?