Changeset 61673 in vbox
- Timestamp:
- Jun 13, 2016 11:50:22 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/man_VBoxManage-debugvm.xml
r56568 r61673 38 38 <arg choice="plain">dumpvmcore</arg> 39 39 <arg>--filename=<replaceable>name</replaceable></arg> 40 </cmdsynopsis> 41 <cmdsynopsis id="synopsis-vboxmanage-debugvm-dumpgueststack"> 42 <command>VBoxManage debugvm</command> 43 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 44 <arg choice="plain">dumpgueststack</arg> 45 <arg>--cpu=<replaceable>id</replaceable></arg> 40 46 </cmdsynopsis> 41 47 <cmdsynopsis id="synopsis-vboxmanage-debugvm-info"> -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r60025 r61673 1662 1662 /* Refer to the correct partition and use offset 0. */ 1663 1663 char *psz; 1664 #if defined(RT_OS_LINUX)1665 1664 /* 1666 1665 * Check whether raw disk ends with a digit. In that case … … 1673 1672 if (RT_C_IS_DIGIT(pszRawName[cchRawDisk - 1])) 1674 1673 RTStrAPrintf(&psz, 1675 "%s p%u",1674 "%s%c%u", 1676 1675 rawdisk.c_str(), 1676 # if defined(RT_OS_LINUX) 1677 'p', 1678 # else 1679 's', 1680 # endif 1677 1681 partitions.aPartitions[i].uIndex); 1678 1682 else … … 1681 1685 rawdisk.c_str(), 1682 1686 partitions.aPartitions[i].uIndex); 1683 #elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)1684 RTStrAPrintf(&psz,1685 "%ss%u",1686 rawdisk.c_str(),1687 partitions.aPartitions[i].uIndex);1688 #endif1689 1687 if (!psz) 1690 1688 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
r58212 r61673 713 713 } 714 714 715 /** 716 * Handles the dumpgueststack sub-command. 717 * 718 * @returns Suitable exit code. 719 * @param pArgs The handler arguments. 720 * @param pDebugger Pointer to the debugger interface. 721 */ 722 static RTEXITCODE handleDebugVM_DumpGuestStack(HandlerArg *pArgs, IMachineDebugger *pDebugger) 723 { 724 ULONG idCpu = 0; 725 726 RTGETOPTSTATE GetState; 727 RTGETOPTUNION ValueUnion; 728 static const RTGETOPTDEF s_aOptions[] = 729 { 730 { "--cpu", 'c', RTGETOPT_REQ_UINT32 }, 731 }; 732 int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, RTGETOPTINIT_FLAGS_OPTS_FIRST); 733 AssertRCReturn(rc, RTEXITCODE_FAILURE); 734 735 while ((rc = RTGetOpt(&GetState, &ValueUnion)) != 0) 736 { 737 switch (rc) 738 { 739 case 'c': 740 idCpu = ValueUnion.u32; 741 break; 742 743 default: 744 return errorGetOpt(rc, &ValueUnion); 745 } 746 } 747 748 com::Bstr bstrGuestStack; 749 CHECK_ERROR2I_RET(pDebugger, DumpGuestStack(idCpu, bstrGuestStack.asOutParam()), 750 RTEXITCODE_FAILURE); 751 752 RTPrintf("%ls\n", bstrGuestStack.raw()); 753 754 return RTEXITCODE_SUCCESS; 755 } 756 715 757 RTEXITCODE handleDebugVM(HandlerArg *pArgs) 716 758 { … … 809 851 rcExit = handleDebugVM_Statistics(pArgs, ptrDebugger); 810 852 } 853 else if (!strcmp(pszSubCmd, "dumpgueststack")) 854 { 855 setCurrentSubcommand(HELP_SCOPE_DEBUGVM_DUMPGUESTSTACK); 856 rcExit = handleDebugVM_DumpGuestStack(pArgs, ptrDebugger); 857 } 811 858 else 812 859 errorUnknownSubcommand(pszSubCmd); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r61483 r61673 1279 1279 "%s debugvm %s <uuid|vmname>\n" 1280 1280 " dumpvmcore --filename <name> |\n" 1281 " dumpgueststack [--cpu <id>]\n" 1281 1282 " info <item> [args] |\n" 1282 1283 " injectnmi |\n"
Note:
See TracChangeset
for help on using the changeset viewer.