Index: /trunk/doc/manual/Makefile.kmk
===================================================================
--- /trunk/doc/manual/Makefile.kmk	(revision 56465)
+++ /trunk/doc/manual/Makefile.kmk	(revision 56466)
@@ -163,4 +163,5 @@
 ## List of refentry files (manpages).
 VBOX_MANUAL_XML_REFENTRY_FILES = \
+	man_VBoxManage_debugvm.xml \
 	man_VBoxManage_extpack.xml
 
@@ -458,4 +459,5 @@
 $(eval $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_VBoxManage.xml: $(VBOX_PATH_MANUAL_SRC)/$(lang)/user_VBoxManage.xml \
 	$$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
+	$$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
 	$(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml ))
 
@@ -465,10 +467,26 @@
 		$(VBOX_PATH_MANUAL_SRC)/% \
                $$(addprefix $$(@D)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
+               $$(addprefix $$(@D)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
 		$(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml \
 		$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
 		$(VBOXMANAGEHELP_PATH) | $$(dir $$@)
 	$(call MSG_L1,Pre-processing [2] $(@F) to $@)
-	$(QUIET)$(RM) -f $@ $@.tmp $@.tmp2
+	$(QUIET)$(RM) -f $@ $@.dumpopts $@.screen
+	$(QUIET)$(REDIRECT) -wo $@.dumpopts -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
+		$(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
+		-- \
+		$(VBOXMANAGEHELP_PATH) --dumpopts
 	$(QUIET)$(SED) \
+		-e ':a' \
+		-e 'N' \
+		-e '$(DOLLAR)!ba' \
+		-e 's/</\&lt\;/g' \
+		-e 's/>/\&gt\;/g' \
+		-e 's/\n*$(DOLLAR)/<\/screen>/' \
+		-e 's/^/<screen>/' \
+		--output $@.screen $@.dumpopts
+	$(QUIET)$(SED) \
+		-e '/@VBOX_MANAGE_OUTPUT@/{' -e 'r $@.screen' -e 'd' -e '}' \
+               \
 		-e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
 		-e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
@@ -480,26 +498,7 @@
 		-e 's|@VBOX_PATH_DOCBOOK@|$(VBOX_PATH_DOCBOOK)|g' \
 		-e 's|@VBOX_PATH_MANUAL_SRC@|$(VBOX_PATH_MANUAL_SRC)|g' \
-		--output $@.tmp $<
-	$(QUIET)$(SED) \
-		-e '1,/\$$VBOX_MANAGE_OUTPUT/!d' \
-	        -e 's/\$$VBOX_MANAGE_OUTPUT.*//' \
-	        --output $@.tmp3 $@.tmp
-	$(QUIET)$(REDIRECT) -wo $@.tmp2 -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
-		$(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
-		-- \
-		$(VBOXMANAGEHELP_PATH) --dumpopts
-	$(QUIET)$(SED) -e 's/</\&lt;/g' -e 's/>/\&gt;/g' --append $@.tmp3 $@.tmp2
-	$(QUIET)$(SED) \
-		-e '/\$$VBOX_MANAGE_OUTPUT/,$$!d' \
-		-e 's/.*\$$VBOX_MANAGE_OUTPUT//' \
-		--append $@.tmp3 $@.tmp
-if 0 # Not currently needed.
-	$(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output $@ \
-		$(VBOX_PATH_MANUAL_SRC)/usage-to-docbook-manual.xsl \
-		$@.tmp3
-else
-	$(QUIET)$(CP) $@.tmp3 $@
-endif
-	$(QUIET)$(RM) -f $@.tmp $@.tmp2 $@.tmp3
+		--output "$@" \
+		"$<"
+	$(QUIET)$(RM) -f $@.dumpopts $@.screen
 
 
@@ -524,14 +523,22 @@
 # Generates the VBoxManage command overview include file (shared between
 # languages) from the refsynopsisdiv section of the man pages.
-$(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml: \
+$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)): \
 		$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \
-		$(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(filter man_VBoxManage_%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
+		$$(patsubst overview_%,$$(VBOX_PATH_MANUAL_SRC)/en_US/%,$$(notdir $$@)) \
 		$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
                | $$(dir $$@)
-	$(call MSG_GENERATE,,$@,en_US/man_VBoxManage_*.xml)
-	$(QUIET)$(RM) -f -- "$@"
-	$(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output "$@" \
-		$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \
-		$(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(filter man_VBoxManage_%,$(VBOX_MANUAL_XML_REFENTRY_FILES)))
+	$(call MSG_GENERATE,,$@,$(filter %.xml,$^))
+	$(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output "$@" $< $(filter %.xml,$^)
+
+$(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml: $(MAKEFILE_CURRENT) | $$(dir $$@)
+	$(call MSG_GENERATE,,$@,)
+	$(QUIET)$(APPEND) -tn "$@" \
+		'<?xml version="1.0" encoding="UTF-8"?>' \
+               '<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">' \
+               '<remark role="VBoxManage-overview">' \
+               $(foreach refentry, $(filter man_VBoxManage%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
+		, '  <xi:include href="overview_$(refentry)" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />') \
+               '</remark>'
+
 
 
@@ -646,4 +653,10 @@
 		--output $@ $@.tmp
 	$(QUIET)$(RM) -f $@.tmp
+
+# Useful aliases
+usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf
+
+debug-usermanual:
+	$(MAKE) --pretty-command-printing -j1 VBOX_PDFLATEX_INTERACTION=errorstopmode $(PATH_STAGE_BIN)/UserManual.pdf
 
 
Index: /trunk/doc/manual/docbook-refentry-to-C-help.xsl
===================================================================
--- /trunk/doc/manual/docbook-refentry-to-C-help.xsl	(revision 56465)
+++ /trunk/doc/manual/docbook-refentry-to-C-help.xsl	(revision 56466)
@@ -40,8 +40,22 @@
   <xsl:template match="refentry">
     <!-- Assert refetry expectations. -->
-    <xsl:if test="not(./refsynopsisdiv)">     <xsl:message terminate="yes">refentry must have a refsynopsisdiv</xsl:message></xsl:if>
-    <xsl:if test="not(./refentryinfo/title)"> <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message></xsl:if>
-    <xsl:if test="not(./refsect1/title)">     <xsl:message terminate="yes">refentry must have a refsect1 with title</xsl:message></xsl:if>
-    <xsl:if test="not(@id) or @id = ''">      <xsl:message terminate="yes">refentry must have an id attribute</xsl:message></xsl:if>
+    <xsl:if test="not(./refsynopsisdiv)">
+        <xsl:message terminate="yes">refentry must have a refsynopsisdiv</xsl:message>
+    </xsl:if>
+    <xsl:if test="not(./refentryinfo/title)">
+      <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message>
+    </xsl:if>
+    <xsl:if test="not(./refmeta/refentrytitle)">
+      <xsl:message terminate="yes">refentry must have a refentryinfo with title</xsl:message>
+    </xsl:if>
+    <xsl:if test="./refmeta/refentrytitle != ./refnamediv/refname">
+      <xsl:message terminate="yes">The refmeta/refentrytitle and the refnamediv/refname must be identical</xsl:message>
+    </xsl:if>
+    <xsl:if test="not(./refsect1/title)">
+      <xsl:message terminate="yes">refentry must have a refsect1 with title</xsl:message>
+    </xsl:if>
+    <xsl:if test="not(@id) or @id = ''">
+      <xsl:message terminate="yes">refentry must have an id attribute</xsl:message>
+    </xsl:if>
 
     <!-- variables -->
@@ -208,6 +222,5 @@
     <!-- assertions -->
     <xsl:if test="text()"><xsl:message terminate="yes">refsect2 shouldn't contain text</xsl:message></xsl:if>
-    <xsl:if test="count(./cmdsynopsis) > 1"><xsl:message terminate="yes">Only a single cmdsynopsis is currently supported in a refsect2.</xsl:message></xsl:if>
-    <xsl:if test="count(./title) > 1"><xsl:message terminate="yes">Only a single title in refsect2</xsl:message></xsl:if>
+    <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>
 
     <!-- title / command synopsis - sets the scope. -->
@@ -216,21 +229,22 @@
     {   REFENTRYSTR_SCOPE_SAME,
         "</xsl:text><xsl:call-template name="emit-indentation"/>
-    <xsl:choose>
-      <xsl:when test="name(./*[1]) = 'cmdsynopsis'">
-        <!--xsl:text>* </xsl:text-->
-        <xsl:apply-templates select="./cmdsynopsis/node()|./cmdsynopsis/@*"/>
-      </xsl:when>
-      <xsl:when test="name(./*[1]) = 'title'">
-        <xsl:apply-templates select="./title/text()"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message terminate="yes">Expected either a title or cmdsynopsis as the first element in a refsect2.
-            (Put scoping remarks after.)</xsl:message>
-      </xsl:otherwise>
-    </xsl:choose>
+    <xsl:apply-templates select="./title/text()"/>
     <xsl:text>" },</xsl:text>
 
     <!-- Format the text in the section -->
-    <xsl:apply-templates select="./*[position() > 1]"/>
+    <xsl:for-each select="./*[name() != 'title']">
+      <xsl:choose>
+        <xsl:when test="self::remark[@scope = 'help-copy-synopsis']">
+          <xsl:variable name="sSrcId" select="concat('synopsis-', @condition)"/>
+          <xsl:if test="not(/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId])">
+            <xsl:message terminate="yes">Could not find any cmdsynopsis with id=<xsl:value-of select="$sSrcId"/> in refsynopsisdiv.</xsl:message>
+          </xsl:if>
+          <xsl:apply-templates select="/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
 
     <!-- Add two blank lines, unless we're the last element in this refsect1. -->
@@ -433,8 +447,29 @@
 
   <!--
+    Fail on misplaced scoping remarks.
+    -->
+  <xsl:template match="remark[@role = 'help-copy-synopsis']">
+    <xsl:choose>
+      <xsl:when test="parent::refsect2"/>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">Misplaced remark/@role=help-copy-synopsis element.
+Only supported on: refsect2</xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--
     Warn about unhandled elements
     -->
   <xsl:template match="*">
-    <xsl:message terminate="no">Warning: Unhandled element: <xsl:value-of select="name(.)"/></xsl:message>
+    <xsl:message terminate="no">Warning: Unhandled element: <!-- no newline -->
+      <xsl:for-each select="ancestor-or-self::*">
+        <xsl:text>/</xsl:text>
+        <xsl:value-of select="name(.)"/>
+        <xsl:if test="@id">
+          <xsl:value-of select="concat('[id=', @id ,']')"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:message>
   </xsl:template>
 
Index: /trunk/doc/manual/docbook-refentry-to-manual-overview.xsl
===================================================================
--- /trunk/doc/manual/docbook-refentry-to-manual-overview.xsl	(revision 56465)
+++ /trunk/doc/manual/docbook-refentry-to-manual-overview.xsl	(revision 56466)
@@ -42,11 +42,16 @@
 
 <!--
-  Translate the refsynopsisdiv into a refsect1. There is special handling
-  of this in the HTML CSS and in the latex conversion XSLT.
-  -->
+  Combine all cmdsynopsis lines into a bunch of commands.
+ -->
 <xsl:template match="refsynopsisdiv">
-  <refsect1>
-     <xsl:apply-templates select="node()|@*"/>
-  </refsect1>
+  <xsl:if test="not(cmdsynopsis)">
+    <xsl:message terminate="yes">What? No cmdsynopsis in the refsynopsisdiv?</xsl:message>
+  </xsl:if>
+  <xsl:element name="cmdsynopsis">
+    <xsl:attribute name="id"><xsl:value-of select="/refentry/@id"/><xsl:text>-overview</xsl:text></xsl:attribute>
+    <xsl:for-each select="cmdsynopsis">
+      <xsl:copy-of select="node()"/>
+    </xsl:for-each>
+  </xsl:element>
 </xsl:template>
 
Index: /trunk/doc/manual/docbook-refentry-to-manual-sect1.xsl
===================================================================
--- /trunk/doc/manual/docbook-refentry-to-manual-sect1.xsl	(revision 56465)
+++ /trunk/doc/manual/docbook-refentry-to-manual-sect1.xsl	(revision 56466)
@@ -89,4 +89,17 @@
 </xsl:template>
 
+<!-- help-copy-synopsis - used in refsect2 to copy synopsis from the refsynopsisdiv. -->
+<xsl:template match="remark[@role = 'help-copy-synopsis']">
+  <xsl:if test="not(parent::refsect2)">
+    <xsl:message terminate="yes">The help-copy-synopsis remark is only applicable in refsect2.</xsl:message>
+  </xsl:if>
+  <xsl:variable name="sSrcId" select="concat('synopsis-',../@id)"/>
+  <xsl:if test="not(/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId])">
+    <xsl:message terminate="yes">Could not find any cmdsynopsis with id=<xsl:value-of select="$sSrcId"/> in refsynopsisdiv.</xsl:message>
+  </xsl:if>
+  <xsl:element name="cmdsynopsis">
+    <xsl:copy-of select="/refentry/refsynopsisdiv/cmdsynopsis[@id = $sSrcId]/node()"/>
+  </xsl:element>
+</xsl:template>
 
 <!--
Index: /trunk/doc/manual/docbook2latex.xsl
===================================================================
--- /trunk/doc/manual/docbook2latex.xsl	(revision 56465)
+++ /trunk/doc/manual/docbook2latex.xsl	(revision 56466)
@@ -293,7 +293,9 @@
         <xsl:text>&#x0a;</xsl:text>
         <xsl:value-of select="$texcmd"/>
-        <xsl:text>[</xsl:text> <!-- for toc -->
-        <xsl:apply-templates />
-        <xsl:text>]</xsl:text>
+        <xsl:if test="not(contains($texcmd, '*'))">
+          <xsl:text>[</xsl:text> <!-- for toc -->
+          <xsl:apply-templates />
+          <xsl:text>]</xsl:text>
+        </xsl:if>
         <xsl:text>{</xsl:text> <!-- for doc -->
         <xsl:text>\raisebox{\ht\strutbox}{\hypertarget{</xsl:text>
@@ -349,11 +351,10 @@
       <xsl:when test="name(..)='refsect1'">
         <xsl:call-template name="title-wrapper">
-          <xsl:with-param name="texcmd">\paragraph</xsl:with-param>
+          <xsl:with-param name="texcmd">\subsection*</xsl:with-param>
         </xsl:call-template>
-        <xsl:text>&#x0a;\begin{addmargin}{1em}&#x0a;</xsl:text> <!-- addmargin is ended by refsect1 template way further down. -->
       </xsl:when>
       <xsl:when test="name(..)='refsect2'">
         <xsl:call-template name="title-wrapper">
-          <xsl:with-param name="texcmd">\subparagraph</xsl:with-param>
+          <xsl:with-param name="texcmd">\subsubsection*</xsl:with-param>
         </xsl:call-template>
       </xsl:when>
@@ -644,7 +645,10 @@
     <xsl:if test="title"><xsl:message terminate="yes">No title element supported in refsynopsisdiv</xsl:message></xsl:if>
     <xsl:call-template name="xsltprocNewlineOutputHack"/>
-    <xsl:text>&#x0a;\paragraph{Synopsis} \hfill \\&#x0a;\begin{addmargin}{1em}&#x0a;</xsl:text>
-    <xsl:apply-templates />
-    <xsl:text>\end{addmargin}&#x0a;</xsl:text>
+    <xsl:text>&#x0a;\subsection*{Synopsis}</xsl:text>
+    <xsl:if test="name(*[1]) != 'cmdsynopsis'"> <!-- just in case -->
+      <xsl:text>\hfill \\&#x0a;</xsl:text>
+    </xsl:if>
+    <xsl:text>&#x0a;</xsl:text>
+    <xsl:apply-templates />
   </xsl:template>
 
@@ -652,20 +656,10 @@
     The refsect1 is used for 'Description' and such. Do same as with refsynopsisdiv
     and turn it into a named & indented paragraph.
-
-    Note! If the section has a title, the title template way up above will begin
-          the addmargin stuff.  We'll just end it here.
-          If there is no title, we ASSUME (HACK ALERT) that this is part of the
-          VBoxManage Command Overview section in the manual.
     -->
   <xsl:template match="refsect1">
-    <xsl:if test="(name(*[1]) != 'title' and name(*[1]) != 'cmdsynopsis') or not(title) = not(cmdsynopsis)">
-      <xsl:message terminate="yes">Expected title or cmdsynopsis element as the first child of refsect1.</xsl:message>
-    </xsl:if>
-    <xsl:if test="not(title)">
-      <xsl:call-template name="xsltprocNewlineOutputHack"/>
-      <xsl:text>&#x0a;\begin{addmargin}{1em}&#x0a;</xsl:text>
+    <xsl:if test="name(*[1]) != 'title' or count(title) != 1">
+      <xsl:message terminate="yes">Expected exactly one title as the first refsect1 element (remarks goes after title!).</xsl:message>
     </xsl:if>
     <xsl:apply-templates/>
-    <xsl:text>&#x0a;\end{addmargin}&#x0a;</xsl:text>
   </xsl:template>
 
@@ -677,10 +671,6 @@
     -->
   <xsl:template match="refsect2">
-    <xsl:if test="(name(*[1]) != 'title' and name(*[1]) != 'cmdsynopsis') or not(title) = not(cmdsynopsis)">
-      <xsl:message terminate="yes">Expected title or cmdsynopsis element as the first child of refsect2.</xsl:message>
-    </xsl:if>
-    <xsl:if test="not(title)">
-      <xsl:call-template name="xsltprocNewlineOutputHack"/>
-      <xsl:text>\vspace{1.2em}&#x0a;</xsl:text>
+    <xsl:if test="name(*[1]) != 'title' or count(title) != 1">
+      <xsl:message terminate="yes">Expected exactly one title as the first refsect2 element (remarks goes after title!).</xsl:message>
     </xsl:if>
     <xsl:apply-templates/>
@@ -691,8 +681,26 @@
   <!--
     Command Synopsis elements.
+
+    We treat each command element inside a cmdsynopsis as the start of
+    a new paragraph.  The DocBook HTML converter does so too, but the
+    manpage one doesn't.
+
+    sbr and linebreaks made by latex should be indented from the base
+    command level. This is done by the \hangindent3em\hangafter1 bits.
+
+    We exploit the default paragraph indentation to get each command
+    indented from the left margin.  This, unfortunately, doesn't work
+    if we're the first paragraph in a (sub*)section.  \noindent cannot
+    counter this due to when latex enforces first paragraph stuff. Since
+    it's tedious to figure out when we're in the first paragraph and when
+    not, we just do \noindent\hspace{1em} everywhere.
     -->
   <xsl:template match="sbr">
+    <xsl:if test="not(ancestor::cmdsynopsis)">
+      <xsl:message terminate="yes">sbr only supported inside cmdsynopsis (because of hangindent)</xsl:message>
+    </xsl:if>
     <xsl:text>\linebreak</xsl:text>
   </xsl:template>
+
   <xsl:template match="refentry|refnamediv|refentryinfo|refmeta|refsect3|refsect4|refsect5|synopfragment|synopfragmentref|cmdsynopsis/info">
     <xsl:message terminate="yes"><xsl:value-of select="name()"/> is not supported</xsl:message>
@@ -700,18 +708,42 @@
 
   <xsl:template match="cmdsynopsis">
-    <xsl:text>&#x0a;\noindent\texttt{</xsl:text>
-    <xsl:apply-templates />
-    <xsl:text>}\linebreak</xsl:text>
-  </xsl:template>
-
-  <xsl:template match="replaceable">
-    <xsl:choose>
-      <xsl:when test="not(ancestor::cmdsynopsis)">
-        <xsl:text>\texttt{\textit{</xsl:text>
-        <xsl:apply-templates />
-        <xsl:text>}}</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>\textit{</xsl:text>
+    <xsl:if test="preceding-sibling::cmdsynopsis">
+      <xsl:text>\par%cmdsynopsis</xsl:text>
+    </xsl:if>
+    <xsl:text>&#x0a;</xsl:text>
+    <xsl:if test="parent::remark[@role='VBoxManage-overview']">
+      <!-- Overview fontsize trick -->
+      <xsl:text>{\footnotesize</xsl:text>
+    </xsl:if>
+    <xsl:text>\noindent\hspace{1em}</xsl:text>
+    <xsl:text>\hangindent3em\hangafter1\texttt{</xsl:text>
+    <xsl:apply-templates />
+    <xsl:text>}</xsl:text>
+    <xsl:if test="following-sibling::*">
+    </xsl:if>
+
+    <!-- For refsect2 subcommand descriptions. -->
+    <xsl:if test="not(following-sibling::cmdsynopsis) and position() != last()">
+      <xsl:text>\linebreak</xsl:text>
+    </xsl:if>
+    <!-- Special overview trick for the current VBoxManage command overview. -->
+    <xsl:if test="parent::remark[@role='VBoxManage-overview']">
+      <xsl:text>}\vspace{1em}</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="command">
+    <xsl:choose>
+      <xsl:when test="ancestor::cmdsynopsis">
+        <!-- Trigger a line break if this isn't the first command in a the synopsis -->
+        <xsl:if test="preceding-sibling::command">
+          <xsl:text>}\par%command&#x0a;</xsl:text>
+          <xsl:text>\noindent\hspace{1em}</xsl:text>
+          <xsl:text>\hangindent3em\hangafter1\texttt{</xsl:text>
+        </xsl:if>
+        <xsl:apply-templates />
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>\texttt{</xsl:text>
         <xsl:apply-templates />
         <xsl:text>}</xsl:text>
@@ -720,13 +752,13 @@
   </xsl:template>
 
-  <xsl:template match="command|option">
-    <xsl:choose>
-      <xsl:when test="not(ancestor::cmdsynopsis)">
+  <xsl:template match="option">
+    <xsl:choose>
+      <xsl:when test="ancestor::cmdsynopsis">
+        <xsl:apply-templates />
+      </xsl:when>
+      <xsl:otherwise>
         <xsl:text>\texttt{</xsl:text>
         <xsl:apply-templates />
         <xsl:text>}</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates />
       </xsl:otherwise>
     </xsl:choose>
@@ -760,4 +792,19 @@
       <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>]</xsl:text></xsl:when>
       <xsl:when test="@choice = 'req'">                                 <xsl:text>}</xsl:text></xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="replaceable">
+    <xsl:choose>
+      <xsl:when test="not(ancestor::cmdsynopsis)">
+        <xsl:text>\texttt{\textit{</xsl:text>
+        <xsl:apply-templates />
+        <xsl:text>}}</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>\textit{</xsl:text>
+        <xsl:apply-templates />
+        <xsl:text>}</xsl:text>
+      </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
Index: /trunk/doc/manual/en_US/man_VBoxManage_debugvm.xml
===================================================================
--- /trunk/doc/manual/en_US/man_VBoxManage_debugvm.xml	(revision 56465)
+++ /trunk/doc/manual/en_US/man_VBoxManage_debugvm.xml	(revision 56466)
@@ -141,10 +141,6 @@
 
     <refsect2 id="vboxmanage-debugvm-dumpvmcore">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">dumpvmcore</arg>
-        <arg>--filename <replaceable>name</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm dumpvmcore</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Creates a system dump file of the specified VM.  This file will have
@@ -164,11 +160,6 @@
 
     <refsect2 id="vboxmanage-debugvm-info">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">info</arg>
-        <arg choice="req"><replaceable>item</replaceable></arg>
-        <arg rep="repeat"><replaceable>args</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm info</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Displays info items relating to the VMM, device emulations and
@@ -199,9 +190,6 @@
 
     <refsect2 id="vboxmanage-debugvm-injectnmi">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">injectnmi</arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm injectnmi</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Causes a non-maskable interrupt (NMI) to be injected into the guest. This
@@ -213,11 +201,6 @@
 
     <refsect2 id="vboxmanage-debugvm-log">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">log</arg>
-        <group><arg>--release</arg><arg>--debug</arg></group>
-        <arg rep="repeat"><replaceable>group-settings</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm log</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         TODO
@@ -226,11 +209,6 @@
 
     <refsect2 id="vboxmanage-debugvm-logdest">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">logdest</arg>
-        <group><arg>--release</arg><arg>--debug</arg></group>
-        <arg rep="repeat"><replaceable>destinations</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm logdest</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         TODO
@@ -239,11 +217,6 @@
 
     <refsect2 id="vboxmanage-debugvm-logflags">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">logflags</arg>
-        <group><arg>--release</arg><arg>--debug</arg></group>
-        <arg rep="repeat"><replaceable>flags</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm logflags</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         TODO
@@ -252,9 +225,6 @@
 
     <refsect2 id="vboxmanage-debugvm-osdetect">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">osdetect</arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm osdetect</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Make the VMM's debugger facility (re)-detect the guest operating system (OS).
@@ -267,9 +237,6 @@
 
     <refsect2 id="vboxmanage-debugvm-osinfo">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">osinfo</arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm osinfo</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Displays information about the guest operating system (OS) previously
@@ -279,10 +246,6 @@
 
     <refsect2 id="vboxmanage-debugvm-osdmesg">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">osdmesg</arg>
-        <arg>--lines <replaceable>lines</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm osdmesg</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Displays the guest OS kernel log, if detected and supported.
@@ -298,11 +261,6 @@
 
     <refsect2 id="vboxmanage-debugvm-getregisters">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">getregisters</arg>
-        <arg>--cpu <replaceable>id</replaceable></arg>
-        <arg rep="repeat"><replaceable>reg-set.reg-name</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm getregisters</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Retrieves register values for guest CPUs and emulated devices.
@@ -333,11 +291,6 @@
 
     <refsect2 id="vboxmanage-debugvm-setregisters">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">setregisters</arg>
-        <arg>--cpu <replaceable>id</replaceable></arg>
-        <arg rep="repeat"><replaceable>reg-set.reg-name=value</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm setregisters</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Changes register values for guest CPUs and emulated devices.
@@ -368,11 +321,6 @@
 
     <refsect2 id="vboxmanage-debugvm-show">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">show</arg>
-        <group><arg>--human-readable</arg><arg>--sh-export</arg><arg>--sh-eval</arg><arg>--cmd-set</arg></group>
-        <arg rep="repeat"><replaceable>settings-item</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm show</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         TODO
@@ -381,12 +329,6 @@
 
     <refsect2 id="vboxmanage-debugvm-statistics">
-      <cmdsynopsis>
-        <command>VBoxManage debugvm</command>
-        <arg choice="req"><replaceable>uuid|vmname</replaceable></arg>
-        <arg choice="plain">statistics</arg>
-        <arg>--reset</arg>
-        <arg>--descriptions</arg>
-        <arg>--pattern <replaceable>pattern</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage debugvm statistics</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Displays or resets VMM statistics.
Index: /trunk/doc/manual/en_US/man_VBoxManage_extpack.xml
===================================================================
--- /trunk/doc/manual/en_US/man_VBoxManage_extpack.xml	(revision 56465)
+++ /trunk/doc/manual/en_US/man_VBoxManage_extpack.xml	(revision 56466)
@@ -52,9 +52,6 @@
 
     <refsect2 id="vboxmanage-extpack-install">
-      <cmdsynopsis>
-        <command>VBoxManage extpack install</command>
-        <arg>--replace</arg>
-        <arg choice="req"><replaceable>tarball</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage extpack install</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Installs a new extension pack on the system.  This command will fail if an older
@@ -77,9 +74,6 @@
 
     <refsect2 id="vboxmanage-extpack-uninstall">
-      <cmdsynopsis>
-        <command>VBoxManage extpack uninstall</command>
-        <arg>--force</arg>
-        <arg choice="req"><replaceable>name</replaceable></arg>
-      </cmdsynopsis>
+      <title>VBoxManage extpack uninstall</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Uninstalls an extension pack from the system.  The subcommand will also succeed
@@ -105,7 +99,6 @@
 
     <refsect2 id="vboxmanage-extpack-cleanup">
-      <cmdsynopsis>
-        <command>VBoxManage extpack cleanup</command>
-      </cmdsynopsis>
+      <title>VBoxManage extpack cleanup</title>
+      <remark role="help-copy-synopsis"/>
       <para>
         Used to remove temporary files and directories that may have been left behind
Index: /trunk/doc/manual/en_US/user_VBoxManage.xml
===================================================================
--- /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 56465)
+++ /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 56466)
@@ -158,5 +158,5 @@
     for the commands available on your particular host.</para>
 
-    <screen>$VBOX_MANAGE_OUTPUT</screen>
+    <screen>@VBOX_MANAGE_OUTPUT@</screen> <!-- the whole line is replaced later -->
     <xi:include href="../user_VBoxManage_CommandsOverview.xml" xpointer="element(/1)"
       xmlns:xi="http://www.w3.org/2001/XInclude" />
@@ -4254,114 +4254,4 @@
   </sect1>
 
-  <sect1 id="vboxmanage-debugvm">
-    <title>VBoxManage debugvm</title>
-
-    <para>The "debugvm" commands are for experts who want to tinker with the
-    exact details of virtual machine execution. Like the VM debugger described
-    in <xref linkend="ts_debugger" />, these commands are only useful if you are
-    very familiar with the details of the PC architecture and how to debug
-    software.</para>
-
-    <para>The subcommands of "debugvm" all operate on a running virtual
-    machine. The following are available:<itemizedlist>
-        <listitem>
-          <para>With <computeroutput>dumpguestcore --filename
-          &lt;name&gt;</computeroutput>, you can create a system dump of the
-          running VM, which will be written into the given file. This file
-          will have the standard ELF core format (with custom sections); see
-          <xref linkend="ts_guest-core-format" />.</para>
-
-          <para>This corresponds to the
-          <computeroutput>writecore</computeroutput> command in the debugger.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>info</computeroutput> command is used to
-          display info items relating to the VMM, device emulations and
-          associated drivers.  This command takes one or two arguments: the
-          name of the info item, optionally followed by a string containing
-          arguments specific to the info item.
-          The <computeroutput>help</computeroutput> info item provides a
-          listning of the available items and hints about any optional
-          arguments.</para>
-
-          <para>This corresponds to the <computeroutput>info</computeroutput>
-          command in the debugger.</para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>injectnmi</computeroutput> command causes
-          a non-maskable interrupt (NMI) in the guest, which might be useful
-          for certain debugging scenarios. What happens exactly is dependent
-          on the guest operating system, but an NMI can crash the whole guest
-          operating system. Do not use unless you know what you're
-          doing.</para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>osdetect</computeroutput> command makes the
-          VMM's debugger facility (re-)detection the guest operation
-          system.</para>
-
-          <para>This corresponds to the <computeroutput>detect</computeroutput>
-          command in the debugger.</para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>osinfo</computeroutput> command is used to
-          display info about the operating system (OS) detected by the VMM's
-          debugger facility.</para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>getregisters</computeroutput> command is
-          used to display CPU and device registers.  The command takes a list
-          of registers, each having one of the following forms:
-          <itemizedlist>
-            <listitem><para><computeroutput>register-set.register-name.sub-field</computeroutput></para></listitem>
-            <listitem><para><computeroutput>register-set.register-name</computeroutput></para></listitem>
-            <listitem><para><computeroutput>cpu-register-name.sub-field</computeroutput></para></listitem>
-            <listitem><para><computeroutput>cpu-register-name</computeroutput></para></listitem>
-            <listitem><para><computeroutput>all</computeroutput></para></listitem>
-          </itemizedlist>
-          The <computeroutput>all</computeroutput> form will cause all
-          registers to be shown (no sub-fields).  The registers names are
-          case-insensitive.  When requesting a CPU register the register set
-          can be omitted, it will be selected using the value of the
-          <computeroutput>--cpu</computeroutput> option (defaulting to 0).
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>setregisters</computeroutput> command is
-          used to change CPU and device registers.  The command takes a list
-          of register assignments, each having one of the following forms:
-          <itemizedlist>
-            <listitem><para><computeroutput>register-set.register-name.sub-field=value</computeroutput></para></listitem>
-            <listitem><para><computeroutput>register-set.register-name=value</computeroutput></para></listitem>
-            <listitem><para><computeroutput>cpu-register-name.sub-field=value</computeroutput></para></listitem>
-            <listitem><para><computeroutput>cpu-register-name=value</computeroutput></para></listitem>
-          </itemizedlist>
-          The value format should be in the same style as what
-          <computeroutput>getregisters</computeroutput> displays, with the
-          exception that both octal and decimal can be used instead of
-          hexadecimal.  The register naming and the default CPU register set
-          are handled the same way as with the
-          <computeroutput>getregisters</computeroutput> command.</para>
-        </listitem>
-
-        <listitem>
-          <para>The <computeroutput>statistics</computeroutput> command can be
-          used to display VMM statistics on the command line. The
-          <computeroutput>--reset</computeroutput> option will reset
-          statistics. The affected statistics can be filtered with the
-          <computeroutput>--pattern</computeroutput> option, which accepts
-          DOS/NT-style wildcards (<computeroutput>?</computeroutput> and
-          <computeroutput>*</computeroutput>).</para>
-        </listitem>
-      </itemizedlist></para>
-  </sect1>
-
   <sect1 id="metrics">
     <title>VBoxManage metrics</title>
@@ -4632,4 +4522,7 @@
   </sect1>
 
+  <xi:include href="man_VBoxManage_debugvm.xml" xpointer="element(/1)"
+    xmlns:xi="http://www.w3.org/2001/XInclude" />
+
   <xi:include href="man_VBoxManage_extpack.xml" xpointer="element(/1)"
     xmlns:xi="http://www.w3.org/2001/XInclude" />
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 56465)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 56466)
@@ -156,5 +156,5 @@
     { "extpack",            USAGE_EXTPACK,       HELP_CMD_EXTPACK, handleExtPack,              0 },
     { "bandwidthctl",       USAGE_BANDWIDTHCONTROL, VBMG_CMD_TODO, handleBandwidthControl,     0 },
-    { "debugvm",            USAGE_DEBUGVM,          VBMG_CMD_TODO, handleDebugVM,              0 },
+    { "debugvm",            USAGE_DEBUGVM,       HELP_CMD_DEBUGVM, handleDebugVM,              0 },
     { "convertfromraw",     USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
     { "convertdd",          USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp	(revision 56465)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp	(revision 56466)
@@ -106,10 +106,10 @@
 
             default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+                return errorGetOpt(rc, &ValueUnion);
         }
     }
 
     if (!cRegisters)
-        return errorSyntax(USAGE_DEBUGVM, "The getregisters sub-command takes at least one register name");
+        return errorSyntax("The getregisters sub-command takes at least one register name");
     return RTEXITCODE_SUCCESS;
 }
@@ -119,14 +119,44 @@
  *
  * @returns Suitable exit code.
- * @param   a                   The handler arguments.
- * @param   pDebugger           Pointer to the debugger interface.
- */
-static RTEXITCODE handleDebugVM_Info(HandlerArg *a, IMachineDebugger *pDebugger)
-{
-    if (a->argc < 3 || a->argc > 4)
-        return errorSyntax(USAGE_DEBUGVM, "The inject sub-command takes at one or two arguments");
-
-    com::Bstr bstrName(a->argv[2]);
-    com::Bstr bstrArgs(a->argv[3]);
+ * @param   pArgs               The handler arguments.
+ * @param   pDebugger           Pointer to the debugger interface.
+ */
+static RTEXITCODE handleDebugVM_Info(HandlerArg *pArgs, IMachineDebugger *pDebugger)
+{
+    /*
+     * Parse arguments.
+     */
+    const char    *pszInfo = NULL;
+    const char    *pszArgs = NULL;
+    RTGETOPTSTATE  GetState;
+    RTGETOPTUNION  ValueUnion;
+    int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, NULL, 0, 2, RTGETOPTINIT_FLAGS_OPTS_FIRST);
+    AssertRCReturn(rc, RTEXITCODE_FAILURE);
+
+    while ((rc = RTGetOpt(&GetState, &ValueUnion)) != 0)
+    {
+        switch (rc)
+        {
+            case VINF_GETOPT_NOT_OPTION:
+                if (!pszInfo)
+                    pszInfo = ValueUnion.psz;
+                else if (!pszArgs)
+                    pszArgs = ValueUnion.psz;
+                else
+                    return errorTooManyParameters(&pArgs->argv[GetState.iNext - 1]);
+                break;
+            default:
+                return errorGetOpt(rc, &ValueUnion);
+        }
+    }
+
+    if (!pszInfo)
+        return errorSyntax("Must specify info item to display");
+
+    /*
+     * Do the work.
+     */
+    com::Bstr bstrName(pszInfo);
+    com::Bstr bstrArgs(pszArgs);
     com::Bstr bstrInfo;
     CHECK_ERROR2I_RET(pDebugger, Info(bstrName.raw(), bstrArgs.raw(), bstrInfo.asOutParam()), RTEXITCODE_FAILURE);
@@ -145,5 +175,5 @@
 {
     if (a->argc != 2)
-        return errorSyntax(USAGE_DEBUGVM, "The inject sub-command does not take any arguments");
+        return errorTooManyParameters(&a->argv[1]);
     CHECK_ERROR2I_RET(pDebugger, InjectNMI(), RTEXITCODE_FAILURE);
     return RTEXITCODE_SUCCESS;
@@ -263,19 +293,19 @@
             case 'c':
                 if (pszCompression)
-                    return errorSyntax(USAGE_DEBUGVM, "The --compression option has already been given");
+                    return errorSyntax("The --compression option has already been given");
                 pszCompression = ValueUnion.psz;
                 break;
             case 'f':
                 if (pszFilename)
-                    return errorSyntax(USAGE_DEBUGVM, "The --filename option has already been given");
+                    return errorSyntax("The --filename option has already been given");
                 pszFilename = ValueUnion.psz;
                 break;
             default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+                return errorGetOpt(rc, &ValueUnion);
         }
     }
 
     if (!pszFilename)
-        return errorSyntax(USAGE_DEBUGVM, "The --filename option is required");
+        return errorSyntax("The --filename option is required");
 
     /*
@@ -303,5 +333,5 @@
 {
     if (a->argc != 2)
-        return errorSyntax(USAGE_DEBUGVM, "The osdetect sub-command does not take any arguments");
+        return errorTooManyParameters(&a->argv[1]);
 
     com::Bstr bstrIgnore;
@@ -325,5 +355,5 @@
 {
     if (a->argc != 2)
-        return errorSyntax(USAGE_DEBUGVM, "The osinfo sub-command does not take any arguments");
+        return errorTooManyParameters(&a->argv[1]);
 
     com::Bstr bstrName;
@@ -361,5 +391,5 @@
         {
             case 'n': uMaxMessages = ValueUnion.u32; break;
-            default: return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+            default: return errorGetOpt(rc, &ValueUnion);
         }
 
@@ -410,5 +440,5 @@
                 const char *pszEqual = strchr(ValueUnion.psz, '=');
                 if (!pszEqual)
-                    return errorSyntax(USAGE_DEBUGVM, "setregisters expects input on the form 'register=value' got '%s'", ValueUnion.psz);
+                    return errorSyntax("setregisters expects input on the form 'register=value' got '%s'", ValueUnion.psz);
                 try
                 {
@@ -428,10 +458,10 @@
 
             default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+                return errorGetOpt(rc, &ValueUnion);
         }
     }
 
     if (!aBstrNames.size())
-        return errorSyntax(USAGE_DEBUGVM, "The setregisters sub-command takes at least one register name");
+        return errorSyntax("The setregisters sub-command takes at least one register name");
 
     /*
@@ -590,5 +620,5 @@
                     rcExit = handleDebugVM_Show_LogRelSettings(pDebugger, fFlags);
                 else
-                    rcExit = errorSyntax(USAGE_DEBUGVM, "The show sub-command has no idea what '%s' might be", ValueUnion.psz);
+                    rcExit = errorSyntax("The show sub-command has no idea what '%s' might be", ValueUnion.psz);
                 if (rcExit != RTEXITCODE_SUCCESS)
                     return rcExit;
@@ -597,5 +627,5 @@
 
             default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+                return errorGetOpt(rc, &ValueUnion);
         }
     }
@@ -640,5 +670,5 @@
             case 'p':
                 if (pszPattern)
-                    return errorSyntax(USAGE_DEBUGVM, "Multiple --pattern options are not permitted");
+                    return errorSyntax("Multiple --pattern options are not permitted");
                 pszPattern = ValueUnion.psz;
                 break;
@@ -649,10 +679,10 @@
 
             default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
+                return errorGetOpt(rc, &ValueUnion);
         }
     }
 
     if (fReset && fWithDescriptions)
-        return errorSyntax(USAGE_DEBUGVM, "The --reset and --descriptions options does not mix");
+        return errorSyntax("The --reset and --descriptions options does not mix");
 
     /*
@@ -685,5 +715,5 @@
      */
     if (pArgs->argc < 2)
-        return errorSyntax(USAGE_DEBUGVM, "Too few parameters");
+        return errorNoSubcommand();
     ComPtr<IMachine> ptrMachine;
     CHECK_ERROR2I_RET(pArgs->virtualBox, FindMachine(com::Bstr(pArgs->argv[0]).raw(), ptrMachine.asOutParam()), RTEXITCODE_FAILURE);
@@ -708,32 +738,71 @@
                  */
                 const char *pszSubCmd = pArgs->argv[1];
-                if (!strcmp(pszSubCmd, "dumpguestcore"))
+                if (!strcmp(pszSubCmd, "dumpvmcore"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_DUMPVMCORE);
                     rcExit = handleDebugVM_DumpVMCore(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "getregisters"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_GETREGISTERS);
                     rcExit = handleDebugVM_GetRegisters(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "info"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_INFO);
                     rcExit = handleDebugVM_Info(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "injectnmi"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_INJECTNMI);
                     rcExit = handleDebugVM_InjectNMI(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "log"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOG);
                     rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd);
+                }
                 else if (!strcmp(pszSubCmd, "logdest"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOGDEST);
                     rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd);
+                }
                 else if (!strcmp(pszSubCmd, "logflags"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_LOGFLAGS);
                     rcExit = handleDebugVM_LogXXXX(pArgs, ptrDebugger, pszSubCmd);
+                }
                 else if (!strcmp(pszSubCmd, "osdetect"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSDETECT);
                     rcExit = handleDebugVM_OSDetect(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "osinfo"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSINFO);
                     rcExit = handleDebugVM_OSInfo(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "osdmesg"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_OSDMESG);
                     rcExit = handleDebugVM_OSDmesg(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "setregisters"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_SETREGISTERS);
                     rcExit = handleDebugVM_SetRegisters(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "show"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_SHOW);
                     rcExit = handleDebugVM_Show(pArgs, ptrDebugger);
+                }
                 else if (!strcmp(pszSubCmd, "statistics"))
+                {
+                    setCurrentSubcommand(HELP_SCOPE_DEBUGVM_STATISTICS);
                     rcExit = handleDebugVM_Statistics(pArgs, ptrDebugger);
+                }
                 else
-                    errorSyntax(USAGE_DEBUGVM, "Invalid parameter '%s'", pArgs->argv[1]);
+                    errorUnknownSubcommand(pszSubCmd);
             }
         }
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 56465)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 56466)
@@ -399,4 +399,6 @@
                 return RTEXITCODE_SUCCESS;
             }
+            else if (!strcmp(papszArgs[i], "--"))
+                break;
 
     return errorSyntax("Too many parameters");
@@ -1326,5 +1328,5 @@
                      "                            --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |\n"
                      "                            --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]\n"
-# if !defined(RT_OS_SOLARIS)
+# if !defined(RT_OS_SOLARIS) || defined(VBOX_ONLY_DOCS)
                      "                            create |\n"
                      "                            remove <name>\n"
