Changeset 56466 in vbox
- Timestamp:
- Jun 16, 2015 11:46:25 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101083
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Makefile.kmk
r56348 r56466 163 163 ## List of refentry files (manpages). 164 164 VBOX_MANUAL_XML_REFENTRY_FILES = \ 165 man_VBoxManage_debugvm.xml \ 165 166 man_VBoxManage_extpack.xml 166 167 … … 458 459 $(eval $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_VBoxManage.xml: $(VBOX_PATH_MANUAL_SRC)/$(lang)/user_VBoxManage.xml \ 459 460 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \ 461 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \ 460 462 $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml )) 461 463 … … 465 467 $(VBOX_PATH_MANUAL_SRC)/% \ 466 468 $$(addprefix $$(@D)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \ 469 $$(addprefix $$(@D)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \ 467 470 $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml \ 468 471 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \ 469 472 $(VBOXMANAGEHELP_PATH) | $$(dir $$@) 470 473 $(call MSG_L1,Pre-processing [2] $(@F) to $@) 471 $(QUIET)$(RM) -f $@ [email protected] [email protected] 474 $(QUIET)$(RM) -f $@ [email protected] [email protected] 475 $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \ 476 $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \ 477 -- \ 478 $(VBOXMANAGEHELP_PATH) --dumpopts 472 479 $(QUIET)$(SED) \ 480 -e ':a' \ 481 -e 'N' \ 482 -e '$(DOLLAR)!ba' \ 483 -e 's/</\<\;/g' \ 484 -e 's/>/\>\;/g' \ 485 -e 's/\n*$(DOLLAR)/<\/screen>/' \ 486 -e 's/^/<screen>/' \ 487 --output [email protected] [email protected] 488 $(QUIET)$(SED) \ 489 -e '/@VBOX_MANAGE_OUTPUT@/{' -e 'r [email protected]' -e 'd' -e '}' \ 490 \ 473 491 -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \ 474 492 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \ … … 480 498 -e 's|@VBOX_PATH_DOCBOOK@|$(VBOX_PATH_DOCBOOK)|g' \ 481 499 -e 's|@VBOX_PATH_MANUAL_SRC@|$(VBOX_PATH_MANUAL_SRC)|g' \ 482 --output [email protected] $< 483 $(QUIET)$(SED) \ 484 -e '1,/\$$VBOX_MANAGE_OUTPUT/!d' \ 485 -e 's/\$$VBOX_MANAGE_OUTPUT.*//' \ 486 --output [email protected] [email protected] 487 $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \ 488 $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \ 489 -- \ 490 $(VBOXMANAGEHELP_PATH) --dumpopts 491 $(QUIET)$(SED) -e 's/</\</g' -e 's/>/\>/g' --append [email protected] [email protected] 492 $(QUIET)$(SED) \ 493 -e '/\$$VBOX_MANAGE_OUTPUT/,$$!d' \ 494 -e 's/.*\$$VBOX_MANAGE_OUTPUT//' \ 495 --append [email protected] [email protected] 496 if 0 # Not currently needed. 497 $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output $@ \ 498 $(VBOX_PATH_MANUAL_SRC)/usage-to-docbook-manual.xsl \ 499 [email protected] 500 else 501 $(QUIET)$(CP) [email protected] $@ 502 endif 503 $(QUIET)$(RM) -f [email protected] [email protected] [email protected] 500 --output "$@" \ 501 "$<" 502 $(QUIET)$(RM) -f [email protected] [email protected] 504 503 505 504 … … 524 523 # Generates the VBoxManage command overview include file (shared between 525 524 # languages) from the refsynopsisdiv section of the man pages. 526 $( VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml: \525 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)): \ 527 526 $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \ 528 $ (addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(filter man_VBoxManage_%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \527 $$(patsubst overview_%,$$(VBOX_PATH_MANUAL_SRC)/en_US/%,$$(notdir $$@)) \ 529 528 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \ 530 529 | $$(dir $$@) 531 $(call MSG_GENERATE,,$@,en_US/man_VBoxManage_*.xml) 532 $(QUIET)$(RM) -f -- "$@" 533 $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output "$@" \ 534 $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \ 535 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(filter man_VBoxManage_%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) 530 $(call MSG_GENERATE,,$@,$(filter %.xml,$^)) 531 $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output "$@" $< $(filter %.xml,$^) 532 533 $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml: $(MAKEFILE_CURRENT) | $$(dir $$@) 534 $(call MSG_GENERATE,,$@,) 535 $(QUIET)$(APPEND) -tn "$@" \ 536 '<?xml version="1.0" encoding="UTF-8"?>' \ 537 '<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">' \ 538 '<remark role="VBoxManage-overview">' \ 539 $(foreach refentry, $(filter man_VBoxManage%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \ 540 , ' <xi:include href="overview_$(refentry)" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />') \ 541 '</remark>' 542 536 543 537 544 … … 646 653 --output $@ [email protected] 647 654 $(QUIET)$(RM) -f [email protected] 655 656 # Useful aliases 657 usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf 658 659 debug-usermanual: 660 $(MAKE) --pretty-command-printing -j1 VBOX_PDFLATEX_INTERACTION=errorstopmode $(PATH_STAGE_BIN)/UserManual.pdf 648 661 649 662 -
trunk/doc/manual/docbook-refentry-to-C-help.xsl
r56444 r56466 40 40 <xsl:template match="refentry"> 41 41 <!-- Assert refetry expectations. --> 42 <xsl:if test="not(./refsynopsisdiv)"> <xsl:message terminate="yes">refentry must have a refsynopsisdiv</xsl:message></xsl:if> 43 <xsl:if test="not(./refentryinfo/title)"> <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message></xsl:if> 44 <xsl:if test="not(./refsect1/title)"> <xsl:message terminate="yes">refentry must have a refsect1 with title</xsl:message></xsl:if> 45 <xsl:if test="not(@id) or @id = ''"> <xsl:message terminate="yes">refentry must have an id attribute</xsl:message></xsl:if> 42 <xsl:if test="not(./refsynopsisdiv)"> 43 <xsl:message terminate="yes">refentry must have a refsynopsisdiv</xsl:message> 44 </xsl:if> 45 <xsl:if test="not(./refentryinfo/title)"> 46 <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message> 47 </xsl:if> 48 <xsl:if test="not(./refmeta/refentrytitle)"> 49 <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message> 50 </xsl:if> 51 <xsl:if test="./refmeta/refentrytitle != ./refnamediv/refname"> 52 <xsl:message terminate="yes">The refmeta/refentrytitle and the refnamediv/refname must be identical</xsl:message> 53 </xsl:if> 54 <xsl:if test="not(./refsect1/title)"> 55 <xsl:message terminate="yes">refentry must have a refsect1 with title</xsl:message> 56 </xsl:if> 57 <xsl:if test="not(@id) or @id = ''"> 58 <xsl:message terminate="yes">refentry must have an id attribute</xsl:message> 59 </xsl:if> 46 60 47 61 <!-- variables --> … … 208 222 <!-- assertions --> 209 223 <xsl:if test="text()"><xsl:message terminate="yes">refsect2 shouldn't contain text</xsl:message></xsl:if> 210 <xsl:if test="count(./cmdsynopsis) > 1"><xsl:message terminate="yes">Only a single cmdsynopsis is currently supported in a refsect2.</xsl:message></xsl:if> 211 <xsl:if test="count(./title) > 1"><xsl:message terminate="yes">Only a single title in refsect2</xsl:message></xsl:if> 224 <xsl:if test="count(./title) != 1"><xsl:message terminate="yes">refsect2 requires a title (<xsl:value-of select="ancestor-or-self::*[@id][1]/@id"/>)</xsl:message></xsl:if> 212 225 213 226 <!-- title / command synopsis - sets the scope. --> … … 216 229 { REFENTRYSTR_SCOPE_SAME, 217 230 "</xsl:text><xsl:call-template name="emit-indentation"/> 218 <xsl:choose> 219 <xsl:when test="name(./*[1]) = 'cmdsynopsis'"> 220 <!--xsl:text>* </xsl:text--> 221 <xsl:apply-templates select="./cmdsynopsis/node()|./cmdsynopsis/@*"/> 222 </xsl:when> 223 <xsl:when test="name(./*[1]) = 'title'"> 224 <xsl:apply-templates select="./title/text()"/> 225 </xsl:when> 226 <xsl:otherwise> 227 <xsl:message terminate="yes">Expected either a title or cmdsynopsis as the first element in a refsect2. 228 (Put scoping remarks after.)</xsl:message> 229 </xsl:otherwise> 230 </xsl:choose> 231 <xsl:apply-templates select="./title/text()"/> 231 232 <xsl:text>" },</xsl:text> 232 233 233 234 <!-- Format the text in the section --> 234 <xsl:apply-templates select="./*[position() > 1]"/> 235 <xsl:for-each select="./*[name() != 'title']"> 236 <xsl:choose> 237 <xsl:when test="self::remark[@scope = 'help-copy-synopsis']"> 238 <xsl:variable name="sSrcId" select="concat('synopsis-', @condition)"/> 239 <xsl:if test="not(/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId])"> 240 <xsl:message terminate="yes">Could not find any cmdsynopsis with id=<xsl:value-of select="$sSrcId"/> in refsynopsisdiv.</xsl:message> 241 </xsl:if> 242 <xsl:apply-templates select="/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId]"/> 243 </xsl:when> 244 <xsl:otherwise> 245 <xsl:apply-templates select="."/> 246 </xsl:otherwise> 247 </xsl:choose> 248 </xsl:for-each> 235 249 236 250 <!-- Add two blank lines, unless we're the last element in this refsect1. --> … … 433 447 434 448 <!-- 449 Fail on misplaced scoping remarks. 450 --> 451 <xsl:template match="remark[@role = 'help-copy-synopsis']"> 452 <xsl:choose> 453 <xsl:when test="parent::refsect2"/> 454 <xsl:otherwise> 455 <xsl:message terminate="yes">Misplaced remark/@role=help-copy-synopsis element. 456 Only supported on: refsect2</xsl:message> 457 </xsl:otherwise> 458 </xsl:choose> 459 </xsl:template> 460 461 <!-- 435 462 Warn about unhandled elements 436 463 --> 437 464 <xsl:template match="*"> 438 <xsl:message terminate="no">Warning: Unhandled element: <xsl:value-of select="name(.)"/></xsl:message> 465 <xsl:message terminate="no">Warning: Unhandled element: <!-- no newline --> 466 <xsl:for-each select="ancestor-or-self::*"> 467 <xsl:text>/</xsl:text> 468 <xsl:value-of select="name(.)"/> 469 <xsl:if test="@id"> 470 <xsl:value-of select="concat('[id=', @id ,']')"/> 471 </xsl:if> 472 </xsl:for-each> 473 </xsl:message> 439 474 </xsl:template> 440 475 -
trunk/doc/manual/docbook-refentry-to-manual-overview.xsl
r56262 r56466 42 42 43 43 <!-- 44 Translate the refsynopsisdiv into a refsect1. There is special handling 45 of this in the HTML CSS and in the latex conversion XSLT. 46 --> 44 Combine all cmdsynopsis lines into a bunch of commands. 45 --> 47 46 <xsl:template match="refsynopsisdiv"> 48 <refsect1> 49 <xsl:apply-templates select="node()|@*"/> 50 </refsect1> 47 <xsl:if test="not(cmdsynopsis)"> 48 <xsl:message terminate="yes">What? No cmdsynopsis in the refsynopsisdiv?</xsl:message> 49 </xsl:if> 50 <xsl:element name="cmdsynopsis"> 51 <xsl:attribute name="id"><xsl:value-of select="/refentry/@id"/><xsl:text>-overview</xsl:text></xsl:attribute> 52 <xsl:for-each select="cmdsynopsis"> 53 <xsl:copy-of select="node()"/> 54 </xsl:for-each> 55 </xsl:element> 51 56 </xsl:template> 52 57 -
trunk/doc/manual/docbook-refentry-to-manual-sect1.xsl
r56441 r56466 89 89 </xsl:template> 90 90 91 <!-- help-copy-synopsis - used in refsect2 to copy synopsis from the refsynopsisdiv. --> 92 <xsl:template match="remark[@role = 'help-copy-synopsis']"> 93 <xsl:if test="not(parent::refsect2)"> 94 <xsl:message terminate="yes">The help-copy-synopsis remark is only applicable in refsect2.</xsl:message> 95 </xsl:if> 96 <xsl:variable name="sSrcId" select="concat('synopsis-',../@id)"/> 97 <xsl:if test="not(/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId])"> 98 <xsl:message terminate="yes">Could not find any cmdsynopsis with id=<xsl:value-of select="$sSrcId"/> in refsynopsisdiv.</xsl:message> 99 </xsl:if> 100 <xsl:element name="cmdsynopsis"> 101 <xsl:copy-of select="/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId]/node()"/> 102 </xsl:element> 103 </xsl:template> 91 104 92 105 <!-- -
trunk/doc/manual/docbook2latex.xsl
r56363 r56466 293 293 <xsl:text>
</xsl:text> 294 294 <xsl:value-of select="$texcmd"/> 295 <xsl:text>[</xsl:text> <!-- for toc --> 296 <xsl:apply-templates /> 297 <xsl:text>]</xsl:text> 295 <xsl:if test="not(contains($texcmd, '*'))"> 296 <xsl:text>[</xsl:text> <!-- for toc --> 297 <xsl:apply-templates /> 298 <xsl:text>]</xsl:text> 299 </xsl:if> 298 300 <xsl:text>{</xsl:text> <!-- for doc --> 299 301 <xsl:text>\raisebox{\ht\strutbox}{\hypertarget{</xsl:text> … … 349 351 <xsl:when test="name(..)='refsect1'"> 350 352 <xsl:call-template name="title-wrapper"> 351 <xsl:with-param name="texcmd">\ paragraph</xsl:with-param>353 <xsl:with-param name="texcmd">\subsection*</xsl:with-param> 352 354 </xsl:call-template> 353 <xsl:text>
\begin{addmargin}{1em}
</xsl:text> <!-- addmargin is ended by refsect1 template way further down. -->354 355 </xsl:when> 355 356 <xsl:when test="name(..)='refsect2'"> 356 357 <xsl:call-template name="title-wrapper"> 357 <xsl:with-param name="texcmd">\sub paragraph</xsl:with-param>358 <xsl:with-param name="texcmd">\subsubsection*</xsl:with-param> 358 359 </xsl:call-template> 359 360 </xsl:when> … … 644 645 <xsl:if test="title"><xsl:message terminate="yes">No title element supported in refsynopsisdiv</xsl:message></xsl:if> 645 646 <xsl:call-template name="xsltprocNewlineOutputHack"/> 646 <xsl:text>
\paragraph{Synopsis} \hfill \\
\begin{addmargin}{1em}
</xsl:text> 647 <xsl:apply-templates /> 648 <xsl:text>\end{addmargin}
</xsl:text> 647 <xsl:text>
\subsection*{Synopsis}</xsl:text> 648 <xsl:if test="name(*[1]) != 'cmdsynopsis'"> <!-- just in case --> 649 <xsl:text>\hfill \\
</xsl:text> 650 </xsl:if> 651 <xsl:text>
</xsl:text> 652 <xsl:apply-templates /> 649 653 </xsl:template> 650 654 … … 652 656 The refsect1 is used for 'Description' and such. Do same as with refsynopsisdiv 653 657 and turn it into a named & indented paragraph. 654 655 Note! If the section has a title, the title template way up above will begin656 the addmargin stuff. We'll just end it here.657 If there is no title, we ASSUME (HACK ALERT) that this is part of the658 VBoxManage Command Overview section in the manual.659 658 --> 660 659 <xsl:template match="refsect1"> 661 <xsl:if test="(name(*[1]) != 'title' and name(*[1]) != 'cmdsynopsis') or not(title) = not(cmdsynopsis)"> 662 <xsl:message terminate="yes">Expected title or cmdsynopsis element as the first child of refsect1.</xsl:message> 663 </xsl:if> 664 <xsl:if test="not(title)"> 665 <xsl:call-template name="xsltprocNewlineOutputHack"/> 666 <xsl:text>
\begin{addmargin}{1em}
</xsl:text> 660 <xsl:if test="name(*[1]) != 'title' or count(title) != 1"> 661 <xsl:message terminate="yes">Expected exactly one title as the first refsect1 element (remarks goes after title!).</xsl:message> 667 662 </xsl:if> 668 663 <xsl:apply-templates/> 669 <xsl:text>
\end{addmargin}
</xsl:text>670 664 </xsl:template> 671 665 … … 677 671 --> 678 672 <xsl:template match="refsect2"> 679 <xsl:if test="(name(*[1]) != 'title' and name(*[1]) != 'cmdsynopsis') or not(title) = not(cmdsynopsis)"> 680 <xsl:message terminate="yes">Expected title or cmdsynopsis element as the first child of refsect2.</xsl:message> 681 </xsl:if> 682 <xsl:if test="not(title)"> 683 <xsl:call-template name="xsltprocNewlineOutputHack"/> 684 <xsl:text>\vspace{1.2em}
</xsl:text> 673 <xsl:if test="name(*[1]) != 'title' or count(title) != 1"> 674 <xsl:message terminate="yes">Expected exactly one title as the first refsect2 element (remarks goes after title!).</xsl:message> 685 675 </xsl:if> 686 676 <xsl:apply-templates/> … … 691 681 <!-- 692 682 Command Synopsis elements. 683 684 We treat each command element inside a cmdsynopsis as the start of 685 a new paragraph. The DocBook HTML converter does so too, but the 686 manpage one doesn't. 687 688 sbr and linebreaks made by latex should be indented from the base 689 command level. This is done by the \hangindent3em\hangafter1 bits. 690 691 We exploit the default paragraph indentation to get each command 692 indented from the left margin. This, unfortunately, doesn't work 693 if we're the first paragraph in a (sub*)section. \noindent cannot 694 counter this due to when latex enforces first paragraph stuff. Since 695 it's tedious to figure out when we're in the first paragraph and when 696 not, we just do \noindent\hspace{1em} everywhere. 693 697 --> 694 698 <xsl:template match="sbr"> 699 <xsl:if test="not(ancestor::cmdsynopsis)"> 700 <xsl:message terminate="yes">sbr only supported inside cmdsynopsis (because of hangindent)</xsl:message> 701 </xsl:if> 695 702 <xsl:text>\linebreak</xsl:text> 696 703 </xsl:template> 704 697 705 <xsl:template match="refentry|refnamediv|refentryinfo|refmeta|refsect3|refsect4|refsect5|synopfragment|synopfragmentref|cmdsynopsis/info"> 698 706 <xsl:message terminate="yes"><xsl:value-of select="name()"/> is not supported</xsl:message> … … 700 708 701 709 <xsl:template match="cmdsynopsis"> 702 <xsl:text>
\noindent\texttt{</xsl:text> 703 <xsl:apply-templates /> 704 <xsl:text>}\linebreak</xsl:text> 705 </xsl:template> 706 707 <xsl:template match="replaceable"> 708 <xsl:choose> 709 <xsl:when test="not(ancestor::cmdsynopsis)"> 710 <xsl:text>\texttt{\textit{</xsl:text> 711 <xsl:apply-templates /> 712 <xsl:text>}}</xsl:text> 713 </xsl:when> 714 <xsl:otherwise> 715 <xsl:text>\textit{</xsl:text> 710 <xsl:if test="preceding-sibling::cmdsynopsis"> 711 <xsl:text>\par%cmdsynopsis</xsl:text> 712 </xsl:if> 713 <xsl:text>
</xsl:text> 714 <xsl:if test="parent::remark[@role='VBoxManage-overview']"> 715 <!-- Overview fontsize trick --> 716 <xsl:text>{\footnotesize</xsl:text> 717 </xsl:if> 718 <xsl:text>\noindent\hspace{1em}</xsl:text> 719 <xsl:text>\hangindent3em\hangafter1\texttt{</xsl:text> 720 <xsl:apply-templates /> 721 <xsl:text>}</xsl:text> 722 <xsl:if test="following-sibling::*"> 723 </xsl:if> 724 725 <!-- For refsect2 subcommand descriptions. --> 726 <xsl:if test="not(following-sibling::cmdsynopsis) and position() != last()"> 727 <xsl:text>\linebreak</xsl:text> 728 </xsl:if> 729 <!-- Special overview trick for the current VBoxManage command overview. --> 730 <xsl:if test="parent::remark[@role='VBoxManage-overview']"> 731 <xsl:text>}\vspace{1em}</xsl:text> 732 </xsl:if> 733 </xsl:template> 734 735 <xsl:template match="command"> 736 <xsl:choose> 737 <xsl:when test="ancestor::cmdsynopsis"> 738 <!-- Trigger a line break if this isn't the first command in a the synopsis --> 739 <xsl:if test="preceding-sibling::command"> 740 <xsl:text>}\par%command
</xsl:text> 741 <xsl:text>\noindent\hspace{1em}</xsl:text> 742 <xsl:text>\hangindent3em\hangafter1\texttt{</xsl:text> 743 </xsl:if> 744 <xsl:apply-templates /> 745 </xsl:when> 746 <xsl:otherwise> 747 <xsl:text>\texttt{</xsl:text> 716 748 <xsl:apply-templates /> 717 749 <xsl:text>}</xsl:text> … … 720 752 </xsl:template> 721 753 722 <xsl:template match="command|option"> 723 <xsl:choose> 724 <xsl:when test="not(ancestor::cmdsynopsis)"> 754 <xsl:template match="option"> 755 <xsl:choose> 756 <xsl:when test="ancestor::cmdsynopsis"> 757 <xsl:apply-templates /> 758 </xsl:when> 759 <xsl:otherwise> 725 760 <xsl:text>\texttt{</xsl:text> 726 761 <xsl:apply-templates /> 727 762 <xsl:text>}</xsl:text> 728 </xsl:when>729 <xsl:otherwise>730 <xsl:apply-templates />731 763 </xsl:otherwise> 732 764 </xsl:choose> … … 760 792 <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>]</xsl:text></xsl:when> 761 793 <xsl:when test="@choice = 'req'"> <xsl:text>}</xsl:text></xsl:when> 794 </xsl:choose> 795 </xsl:template> 796 797 <xsl:template match="replaceable"> 798 <xsl:choose> 799 <xsl:when test="not(ancestor::cmdsynopsis)"> 800 <xsl:text>\texttt{\textit{</xsl:text> 801 <xsl:apply-templates /> 802 <xsl:text>}}</xsl:text> 803 </xsl:when> 804 <xsl:otherwise> 805 <xsl:text>\textit{</xsl:text> 806 <xsl:apply-templates /> 807 <xsl:text>}</xsl:text> 808 </xsl:otherwise> 762 809 </xsl:choose> 763 810 </xsl:template> -
trunk/doc/manual/en_US/man_VBoxManage_debugvm.xml
r56445 r56466 141 141 142 142 <refsect2 id="vboxmanage-debugvm-dumpvmcore"> 143 <cmdsynopsis> 144 <command>VBoxManage debugvm</command> 145 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 146 <arg choice="plain">dumpvmcore</arg> 147 <arg>--filename <replaceable>name</replaceable></arg> 148 </cmdsynopsis> 143 <title>VBoxManage debugvm dumpvmcore</title> 144 <remark role="help-copy-synopsis"/> 149 145 <para> 150 146 Creates a system dump file of the specified VM. This file will have … … 164 160 165 161 <refsect2 id="vboxmanage-debugvm-info"> 166 <cmdsynopsis> 167 <command>VBoxManage debugvm</command> 168 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 169 <arg choice="plain">info</arg> 170 <arg choice="req"><replaceable>item</replaceable></arg> 171 <arg rep="repeat"><replaceable>args</replaceable></arg> 172 </cmdsynopsis> 162 <title>VBoxManage debugvm info</title> 163 <remark role="help-copy-synopsis"/> 173 164 <para> 174 165 Displays info items relating to the VMM, device emulations and … … 199 190 200 191 <refsect2 id="vboxmanage-debugvm-injectnmi"> 201 <cmdsynopsis> 202 <command>VBoxManage debugvm</command> 203 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 204 <arg choice="plain">injectnmi</arg> 205 </cmdsynopsis> 192 <title>VBoxManage debugvm injectnmi</title> 193 <remark role="help-copy-synopsis"/> 206 194 <para> 207 195 Causes a non-maskable interrupt (NMI) to be injected into the guest. This … … 213 201 214 202 <refsect2 id="vboxmanage-debugvm-log"> 215 <cmdsynopsis> 216 <command>VBoxManage debugvm</command> 217 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 218 <arg choice="plain">log</arg> 219 <group><arg>--release</arg><arg>--debug</arg></group> 220 <arg rep="repeat"><replaceable>group-settings</replaceable></arg> 221 </cmdsynopsis> 203 <title>VBoxManage debugvm log</title> 204 <remark role="help-copy-synopsis"/> 222 205 <para> 223 206 TODO … … 226 209 227 210 <refsect2 id="vboxmanage-debugvm-logdest"> 228 <cmdsynopsis> 229 <command>VBoxManage debugvm</command> 230 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 231 <arg choice="plain">logdest</arg> 232 <group><arg>--release</arg><arg>--debug</arg></group> 233 <arg rep="repeat"><replaceable>destinations</replaceable></arg> 234 </cmdsynopsis> 211 <title>VBoxManage debugvm logdest</title> 212 <remark role="help-copy-synopsis"/> 235 213 <para> 236 214 TODO … … 239 217 240 218 <refsect2 id="vboxmanage-debugvm-logflags"> 241 <cmdsynopsis> 242 <command>VBoxManage debugvm</command> 243 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 244 <arg choice="plain">logflags</arg> 245 <group><arg>--release</arg><arg>--debug</arg></group> 246 <arg rep="repeat"><replaceable>flags</replaceable></arg> 247 </cmdsynopsis> 219 <title>VBoxManage debugvm logflags</title> 220 <remark role="help-copy-synopsis"/> 248 221 <para> 249 222 TODO … … 252 225 253 226 <refsect2 id="vboxmanage-debugvm-osdetect"> 254 <cmdsynopsis> 255 <command>VBoxManage debugvm</command> 256 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 257 <arg choice="plain">osdetect</arg> 258 </cmdsynopsis> 227 <title>VBoxManage debugvm osdetect</title> 228 <remark role="help-copy-synopsis"/> 259 229 <para> 260 230 Make the VMM's debugger facility (re)-detect the guest operating system (OS). … … 267 237 268 238 <refsect2 id="vboxmanage-debugvm-osinfo"> 269 <cmdsynopsis> 270 <command>VBoxManage debugvm</command> 271 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 272 <arg choice="plain">osinfo</arg> 273 </cmdsynopsis> 239 <title>VBoxManage debugvm osinfo</title> 240 <remark role="help-copy-synopsis"/> 274 241 <para> 275 242 Displays information about the guest operating system (OS) previously … … 279 246 280 247 <refsect2 id="vboxmanage-debugvm-osdmesg"> 281 <cmdsynopsis> 282 <command>VBoxManage debugvm</command> 283 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 284 <arg choice="plain">osdmesg</arg> 285 <arg>--lines <replaceable>lines</replaceable></arg> 286 </cmdsynopsis> 248 <title>VBoxManage debugvm osdmesg</title> 249 <remark role="help-copy-synopsis"/> 287 250 <para> 288 251 Displays the guest OS kernel log, if detected and supported. … … 298 261 299 262 <refsect2 id="vboxmanage-debugvm-getregisters"> 300 <cmdsynopsis> 301 <command>VBoxManage debugvm</command> 302 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 303 <arg choice="plain">getregisters</arg> 304 <arg>--cpu <replaceable>id</replaceable></arg> 305 <arg rep="repeat"><replaceable>reg-set.reg-name</replaceable></arg> 306 </cmdsynopsis> 263 <title>VBoxManage debugvm getregisters</title> 264 <remark role="help-copy-synopsis"/> 307 265 <para> 308 266 Retrieves register values for guest CPUs and emulated devices. … … 333 291 334 292 <refsect2 id="vboxmanage-debugvm-setregisters"> 335 <cmdsynopsis> 336 <command>VBoxManage debugvm</command> 337 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 338 <arg choice="plain">setregisters</arg> 339 <arg>--cpu <replaceable>id</replaceable></arg> 340 <arg rep="repeat"><replaceable>reg-set.reg-name=value</replaceable></arg> 341 </cmdsynopsis> 293 <title>VBoxManage debugvm setregisters</title> 294 <remark role="help-copy-synopsis"/> 342 295 <para> 343 296 Changes register values for guest CPUs and emulated devices. … … 368 321 369 322 <refsect2 id="vboxmanage-debugvm-show"> 370 <cmdsynopsis> 371 <command>VBoxManage debugvm</command> 372 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 373 <arg choice="plain">show</arg> 374 <group><arg>--human-readable</arg><arg>--sh-export</arg><arg>--sh-eval</arg><arg>--cmd-set</arg></group> 375 <arg rep="repeat"><replaceable>settings-item</replaceable></arg> 376 </cmdsynopsis> 323 <title>VBoxManage debugvm show</title> 324 <remark role="help-copy-synopsis"/> 377 325 <para> 378 326 TODO … … 381 329 382 330 <refsect2 id="vboxmanage-debugvm-statistics"> 383 <cmdsynopsis> 384 <command>VBoxManage debugvm</command> 385 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 386 <arg choice="plain">statistics</arg> 387 <arg>--reset</arg> 388 <arg>--descriptions</arg> 389 <arg>--pattern <replaceable>pattern</replaceable></arg> 390 </cmdsynopsis> 331 <title>VBoxManage debugvm statistics</title> 332 <remark role="help-copy-synopsis"/> 391 333 <para> 392 334 Displays or resets VMM statistics. -
trunk/doc/manual/en_US/man_VBoxManage_extpack.xml
r56434 r56466 52 52 53 53 <refsect2 id="vboxmanage-extpack-install"> 54 <cmdsynopsis> 55 <command>VBoxManage extpack install</command> 56 <arg>--replace</arg> 57 <arg choice="req"><replaceable>tarball</replaceable></arg> 58 </cmdsynopsis> 54 <title>VBoxManage extpack install</title> 55 <remark role="help-copy-synopsis"/> 59 56 <para> 60 57 Installs a new extension pack on the system. This command will fail if an older … … 77 74 78 75 <refsect2 id="vboxmanage-extpack-uninstall"> 79 <cmdsynopsis> 80 <command>VBoxManage extpack uninstall</command> 81 <arg>--force</arg> 82 <arg choice="req"><replaceable>name</replaceable></arg> 83 </cmdsynopsis> 76 <title>VBoxManage extpack uninstall</title> 77 <remark role="help-copy-synopsis"/> 84 78 <para> 85 79 Uninstalls an extension pack from the system. The subcommand will also succeed … … 105 99 106 100 <refsect2 id="vboxmanage-extpack-cleanup"> 107 <cmdsynopsis> 108 <command>VBoxManage extpack cleanup</command> 109 </cmdsynopsis> 101 <title>VBoxManage extpack cleanup</title> 102 <remark role="help-copy-synopsis"/> 110 103 <para> 111 104 Used to remove temporary files and directories that may have been left behind -
trunk/doc/manual/en_US/user_VBoxManage.xml
r56451 r56466 158 158 for the commands available on your particular host.</para> 159 159 160 <screen> $VBOX_MANAGE_OUTPUT</screen>160 <screen>@VBOX_MANAGE_OUTPUT@</screen> <!-- the whole line is replaced later --> 161 161 <xi:include href="../user_VBoxManage_CommandsOverview.xml" xpointer="element(/1)" 162 162 xmlns:xi="http://www.w3.org/2001/XInclude" /> … … 4254 4254 </sect1> 4255 4255 4256 <sect1 id="vboxmanage-debugvm">4257 <title>VBoxManage debugvm</title>4258 4259 <para>The "debugvm" commands are for experts who want to tinker with the4260 exact details of virtual machine execution. Like the VM debugger described4261 in <xref linkend="ts_debugger" />, these commands are only useful if you are4262 very familiar with the details of the PC architecture and how to debug4263 software.</para>4264 4265 <para>The subcommands of "debugvm" all operate on a running virtual4266 machine. The following are available:<itemizedlist>4267 <listitem>4268 <para>With <computeroutput>dumpguestcore --filename4269 <name></computeroutput>, you can create a system dump of the4270 running VM, which will be written into the given file. This file4271 will have the standard ELF core format (with custom sections); see4272 <xref linkend="ts_guest-core-format" />.</para>4273 4274 <para>This corresponds to the4275 <computeroutput>writecore</computeroutput> command in the debugger.4276 </para>4277 </listitem>4278 4279 <listitem>4280 <para>The <computeroutput>info</computeroutput> command is used to4281 display info items relating to the VMM, device emulations and4282 associated drivers. This command takes one or two arguments: the4283 name of the info item, optionally followed by a string containing4284 arguments specific to the info item.4285 The <computeroutput>help</computeroutput> info item provides a4286 listning of the available items and hints about any optional4287 arguments.</para>4288 4289 <para>This corresponds to the <computeroutput>info</computeroutput>4290 command in the debugger.</para>4291 </listitem>4292 4293 <listitem>4294 <para>The <computeroutput>injectnmi</computeroutput> command causes4295 a non-maskable interrupt (NMI) in the guest, which might be useful4296 for certain debugging scenarios. What happens exactly is dependent4297 on the guest operating system, but an NMI can crash the whole guest4298 operating system. Do not use unless you know what you're4299 doing.</para>4300 </listitem>4301 4302 <listitem>4303 <para>The <computeroutput>osdetect</computeroutput> command makes the4304 VMM's debugger facility (re-)detection the guest operation4305 system.</para>4306 4307 <para>This corresponds to the <computeroutput>detect</computeroutput>4308 command in the debugger.</para>4309 </listitem>4310 4311 <listitem>4312 <para>The <computeroutput>osinfo</computeroutput> command is used to4313 display info about the operating system (OS) detected by the VMM's4314 debugger facility.</para>4315 </listitem>4316 4317 <listitem>4318 <para>The <computeroutput>getregisters</computeroutput> command is4319 used to display CPU and device registers. The command takes a list4320 of registers, each having one of the following forms:4321 <itemizedlist>4322 <listitem><para><computeroutput>register-set.register-name.sub-field</computeroutput></para></listitem>4323 <listitem><para><computeroutput>register-set.register-name</computeroutput></para></listitem>4324 <listitem><para><computeroutput>cpu-register-name.sub-field</computeroutput></para></listitem>4325 <listitem><para><computeroutput>cpu-register-name</computeroutput></para></listitem>4326 <listitem><para><computeroutput>all</computeroutput></para></listitem>4327 </itemizedlist>4328 The <computeroutput>all</computeroutput> form will cause all4329 registers to be shown (no sub-fields). The registers names are4330 case-insensitive. When requesting a CPU register the register set4331 can be omitted, it will be selected using the value of the4332 <computeroutput>--cpu</computeroutput> option (defaulting to 0).4333 </para>4334 </listitem>4335 4336 <listitem>4337 <para>The <computeroutput>setregisters</computeroutput> command is4338 used to change CPU and device registers. The command takes a list4339 of register assignments, each having one of the following forms:4340 <itemizedlist>4341 <listitem><para><computeroutput>register-set.register-name.sub-field=value</computeroutput></para></listitem>4342 <listitem><para><computeroutput>register-set.register-name=value</computeroutput></para></listitem>4343 <listitem><para><computeroutput>cpu-register-name.sub-field=value</computeroutput></para></listitem>4344 <listitem><para><computeroutput>cpu-register-name=value</computeroutput></para></listitem>4345 </itemizedlist>4346 The value format should be in the same style as what4347 <computeroutput>getregisters</computeroutput> displays, with the4348 exception that both octal and decimal can be used instead of4349 hexadecimal. The register naming and the default CPU register set4350 are handled the same way as with the4351 <computeroutput>getregisters</computeroutput> command.</para>4352 </listitem>4353 4354 <listitem>4355 <para>The <computeroutput>statistics</computeroutput> command can be4356 used to display VMM statistics on the command line. The4357 <computeroutput>--reset</computeroutput> option will reset4358 statistics. The affected statistics can be filtered with the4359 <computeroutput>--pattern</computeroutput> option, which accepts4360 DOS/NT-style wildcards (<computeroutput>?</computeroutput> and4361 <computeroutput>*</computeroutput>).</para>4362 </listitem>4363 </itemizedlist></para>4364 </sect1>4365 4366 4256 <sect1 id="metrics"> 4367 4257 <title>VBoxManage metrics</title> … … 4632 4522 </sect1> 4633 4523 4524 <xi:include href="man_VBoxManage_debugvm.xml" xpointer="element(/1)" 4525 xmlns:xi="http://www.w3.org/2001/XInclude" /> 4526 4634 4527 <xi:include href="man_VBoxManage_extpack.xml" xpointer="element(/1)" 4635 4528 xmlns:xi="http://www.w3.org/2001/XInclude" /> -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r56422 r56466 156 156 { "extpack", USAGE_EXTPACK, HELP_CMD_EXTPACK, handleExtPack, 0 }, 157 157 { "bandwidthctl", USAGE_BANDWIDTHCONTROL, VBMG_CMD_TODO, handleBandwidthControl, 0 }, 158 { "debugvm", USAGE_DEBUGVM, VBMG_CMD_TODO, handleDebugVM, 0 },158 { "debugvm", USAGE_DEBUGVM, HELP_CMD_DEBUGVM, handleDebugVM, 0 }, 159 159 { "convertfromraw", USAGE_CONVERTFROMRAW, VBMG_CMD_TODO, handleConvertFromRaw, VBMG_CMD_F_NO_COM }, 160 160 { "convertdd", USAGE_CONVERTFROMRAW, VBMG_CMD_TODO, handleConvertFromRaw, VBMG_CMD_F_NO_COM }, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
r56119 r56466 106 106 107 107 default: 108 return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);108 return errorGetOpt(rc, &ValueUnion); 109 109 } 110 110 } 111 111 112 112 if (!cRegisters) 113 return errorSyntax( USAGE_DEBUGVM,"The getregisters sub-command takes at least one register name");113 return errorSyntax("The getregisters sub-command takes at least one register name"); 114 114 return RTEXITCODE_SUCCESS; 115 115 } … … 119 119 * 120 120 * @returns Suitable exit code. 121 * @param a The handler arguments. 122 * @param pDebugger Pointer to the debugger interface. 123 */ 124 static RTEXITCODE handleDebugVM_Info(HandlerArg *a, IMachineDebugger *pDebugger) 125 { 126 if (a->argc < 3 || a->argc > 4) 127 return errorSyntax(USAGE_DEBUGVM, "The inject sub-command takes at one or two arguments"); 128 129 com::Bstr bstrName(a->argv[2]); 130 com::Bstr bstrArgs(a->argv[3]); 121 * @param pArgs The handler arguments. 122 * @param pDebugger Pointer to the debugger interface. 123 */ 124 static RTEXITCODE handleDebugVM_Info(HandlerArg *pArgs, IMachineDebugger *pDebugger) 125 { 126 /* 127 * Parse arguments. 128 */ 129 const char *pszInfo = NULL; 130 const char *pszArgs = NULL; 131 RTGETOPTSTATE GetState; 132 RTGETOPTUNION ValueUnion; 133 int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, NULL, 0, 2, RTGETOPTINIT_FLAGS_OPTS_FIRST); 134 AssertRCReturn(rc, RTEXITCODE_FAILURE); 135 136 while ((rc = RTGetOpt(&GetState, &ValueUnion)) != 0) 137 { 138 switch (rc) 139 { 140 case VINF_GETOPT_NOT_OPTION: 141 if (!pszInfo) 142 pszInfo = ValueUnion.psz; 143 else if (!pszArgs) 144 pszArgs = ValueUnion.psz; 145 else 146 return errorTooManyParameters(&pArgs->argv[GetState.iNext - 1]); 147 break; 148 default: 149 return errorGetOpt(rc, &ValueUnion); 150 } 151 } 152 153 if (!pszInfo) 154 return errorSyntax("Must specify info item to display"); 155 156 /* 157 * Do the work. 158 */ 159 com::Bstr bstrName(pszInfo); 160 com::Bstr bstrArgs(pszArgs); 131 161 com::Bstr bstrInfo; 132 162 CHECK_ERROR2I_RET(pDebugger, Info(bstrName.raw(), bstrArgs.raw(), bstrInfo.asOutParam()), RTEXITCODE_FAILURE); … … 145 175 { 146 176 if (a->argc != 2) 147 return error Syntax(USAGE_DEBUGVM, "The inject sub-command does not take any arguments");177 return errorTooManyParameters(&a->argv[1]); 148 178 CHECK_ERROR2I_RET(pDebugger, InjectNMI(), RTEXITCODE_FAILURE); 149 179 return RTEXITCODE_SUCCESS; … … 263 293 case 'c': 264 294 if (pszCompression) 265 return errorSyntax( USAGE_DEBUGVM,"The --compression option has already been given");295 return errorSyntax("The --compression option has already been given"); 266 296 pszCompression = ValueUnion.psz; 267 297 break; 268 298 case 'f': 269 299 if (pszFilename) 270 return errorSyntax( USAGE_DEBUGVM,"The --filename option has already been given");300 return errorSyntax("The --filename option has already been given"); 271 301 pszFilename = ValueUnion.psz; 272 302 break; 273 303 default: 274 return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);304 return errorGetOpt(rc, &ValueUnion); 275 305 } 276 306 } 277 307 278 308 if (!pszFilename) 279 return errorSyntax( USAGE_DEBUGVM,"The --filename option is required");309 return errorSyntax("The --filename option is required"); 280 310 281 311 /* … … 303 333 { 304 334 if (a->argc != 2) 305 return error Syntax(USAGE_DEBUGVM, "The osdetect sub-command does not take any arguments");335 return errorTooManyParameters(&a->argv[1]); 306 336 307 337 com::Bstr bstrIgnore; … … 325 355 { 326 356 if (a->argc != 2) 327 return error Syntax(USAGE_DEBUGVM, "The osinfo sub-command does not take any arguments");357 return errorTooManyParameters(&a->argv[1]); 328 358 329 359 com::Bstr bstrName; … … 361 391 { 362 392 case 'n': uMaxMessages = ValueUnion.u32; break; 363 default: return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);393 default: return errorGetOpt(rc, &ValueUnion); 364 394 } 365 395 … … 410 440 const char *pszEqual = strchr(ValueUnion.psz, '='); 411 441 if (!pszEqual) 412 return errorSyntax( USAGE_DEBUGVM,"setregisters expects input on the form 'register=value' got '%s'", ValueUnion.psz);442 return errorSyntax("setregisters expects input on the form 'register=value' got '%s'", ValueUnion.psz); 413 443 try 414 444 { … … 428 458 429 459 default: 430 return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);460 return errorGetOpt(rc, &ValueUnion); 431 461 } 432 462 } 433 463 434 464 if (!aBstrNames.size()) 435 return errorSyntax( USAGE_DEBUGVM,"The setregisters sub-command takes at least one register name");465 return errorSyntax("The setregisters sub-command takes at least one register name"); 436 466 437 467 /* … … 590 620 rcExit = handleDebugVM_Show_LogRelSettings(pDebugger, fFlags); 591 621 else 592 rcExit = errorSyntax( USAGE_DEBUGVM,"The show sub-command has no idea what '%s' might be", ValueUnion.psz);622 rcExit = errorSyntax("The show sub-command has no idea what '%s' might be", ValueUnion.psz); 593 623 if (rcExit != RTEXITCODE_SUCCESS) 594 624 return rcExit; … … 597 627 598 628 default: 599 return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);629 return errorGetOpt(rc, &ValueUnion); 600 630 } 601 631 } … … 640 670 case 'p': 641 671 if (pszPattern) 642 return errorSyntax( USAGE_DEBUGVM,"Multiple --pattern options are not permitted");672 return errorSyntax("Multiple --pattern options are not permitted"); 643 673 pszPattern = ValueUnion.psz; 644 674 break; … … 649 679 650 680 default: 651 return errorGetOpt( USAGE_DEBUGVM,rc, &ValueUnion);681 return errorGetOpt(rc, &ValueUnion); 652 682 } 653 683 } 654 684 655 685 if (fReset && fWithDescriptions) 656 return errorSyntax( USAGE_DEBUGVM,"The --reset and --descriptions options does not mix");686 return errorSyntax("The --reset and --descriptions options does not mix"); 657 687 658 688 /* … … 685 715 */ 686 716 if (pArgs->argc < 2) 687 return error Syntax(USAGE_DEBUGVM, "Too few parameters");717 return errorNoSubcommand(); 688 718 ComPtr<IMachine> ptrMachine; 689 719 CHECK_ERROR2I_RET(pArgs->virtualBox, FindMachine(com::Bstr(pArgs->argv[0]).raw(), ptrMachine.asOutParam()), RTEXITCODE_FAILURE); … … 708 738 */ 709 739 const char *pszSubCmd = pArgs->argv[1]; 710 if (!strcmp(pszSubCmd, "dumpguestcore")) 740 if (!strcmp(pszSubCmd, "dumpvmcore")) 741 { 742 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_DUMPVMCORE); 711 743 rcExit = handleDebugVM_DumpVMCore(pArgs, ptrDebugger); 744 } 712 745 else if (!strcmp(pszSubCmd, "getregisters")) 746 { 747 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_GETREGISTERS); 713 748 rcExit = handleDebugVM_GetRegisters(pArgs, ptrDebugger); 749 } 714 750 else if (!strcmp(pszSubCmd, "info")) 751 { 752 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_INFO); 715 753 rcExit = handleDebugVM_Info(pArgs, ptrDebugger); 754 } 716 755 else if (!strcmp(pszSubCmd, "injectnmi")) 756 { 757 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_INJECTNMI); 717 758 rcExit = handleDebugVM_InjectNMI(pArgs, ptrDebugger); 759 } 718 760 else if (!strcmp(pszSubCmd, "log")) 761 { 762 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOG); 719 763 rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd); 764 } 720 765 else if (!strcmp(pszSubCmd, "logdest")) 766 { 767 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOGDEST); 721 768 rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd); 769 } 722 770 else if (!strcmp(pszSubCmd, "logflags")) 771 { 772 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOGFLAGS); 723 773 rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd); 774 } 724 775 else if (!strcmp(pszSubCmd, "osdetect")) 776 { 777 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSDETECT); 725 778 rcExit = handleDebugVM_OSDetect(pArgs, ptrDebugger); 779 } 726 780 else if (!strcmp(pszSubCmd, "osinfo")) 781 { 782 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSINFO); 727 783 rcExit = handleDebugVM_OSInfo(pArgs, ptrDebugger); 784 } 728 785 else if (!strcmp(pszSubCmd, "osdmesg")) 786 { 787 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSDMESG); 729 788 rcExit = handleDebugVM_OSDmesg(pArgs, ptrDebugger); 789 } 730 790 else if (!strcmp(pszSubCmd, "setregisters")) 791 { 792 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_SETREGISTERS); 731 793 rcExit = handleDebugVM_SetRegisters(pArgs, ptrDebugger); 794 } 732 795 else if (!strcmp(pszSubCmd, "show")) 796 { 797 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_SHOW); 733 798 rcExit = handleDebugVM_Show(pArgs, ptrDebugger); 799 } 734 800 else if (!strcmp(pszSubCmd, "statistics")) 801 { 802 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_STATISTICS); 735 803 rcExit = handleDebugVM_Statistics(pArgs, ptrDebugger); 804 } 736 805 else 737 error Syntax(USAGE_DEBUGVM, "Invalid parameter '%s'", pArgs->argv[1]);806 errorUnknownSubcommand(pszSubCmd); 738 807 } 739 808 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r56366 r56466 399 399 return RTEXITCODE_SUCCESS; 400 400 } 401 else if (!strcmp(papszArgs[i], "--")) 402 break; 401 403 402 404 return errorSyntax("Too many parameters"); … … 1326 1328 " --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |\n" 1327 1329 " --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]\n" 1328 # if !defined(RT_OS_SOLARIS) 1330 # if !defined(RT_OS_SOLARIS) || defined(VBOX_ONLY_DOCS) 1329 1331 " create |\n" 1330 1332 " remove <name>\n"
Note:
See TracChangeset
for help on using the changeset viewer.