Changeset 32574 in vbox
- Timestamp:
- Sep 16, 2010 5:44:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r32323 r32574 240 240 241 241 242 /** IOCTL to VBoxGuest to interrupt (cancel) any pending WAITEVENTs and return.243 * Handled inside the guest additions and not seen by the host at all.244 * @see VBOXGUEST_IOCTL_WAITEVENT */245 #define VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS VBOXGUEST_IOCTL_CODE_(5, 0)246 247 248 249 242 /** IOCTL to VBoxGuest to perform a VMM request 250 243 * @remark The data buffer for this IOCtl has an variable size, keep this in mind … … 265 258 #pragma pack() 266 259 260 /** IOCTL to VBoxGuest to interrupt (cancel) any pending WAITEVENTs and return. 261 * Handled inside the guest additions and not seen by the host at all. 262 * @see VBOXGUEST_IOCTL_WAITEVENT */ 263 #define VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS VBOXGUEST_IOCTL_CODE_(5, 0) 264 265 /** IOCTL to VBoxGuest to perform backdoor logging. 266 * The argument is a string buffer of the specified size. */ 267 #define VBOXGUEST_IOCTL_LOG(Size) VBOXGUEST_IOCTL_CODE_(6, (Size)) 267 268 268 269 /** IOCTL to VBoxGuest to check memory ballooning. … … 303 304 AssertCompileSize(VBoxGuestChangeBalloonInfo, 16); 304 305 305 306 /** IOCTL to VBoxGuest to perform backdoor logging. 307 * The argument is a string buffer of the specified size. */ 308 #define VBOXGUEST_IOCTL_LOG(Size) VBOXGUEST_IOCTL_CODE_(6, (Size)) 306 /** IOCTL to VBoxGuest to write guest core. */ 307 #define VBOXGUEST_IOCTL_WRITE_CORE_DUMP VBOXGUEST_IOCTL_CODE(9, sizeof(VBoxGuestWriteCoreDump)) 308 309 /** Input and output buffer layout of the VBOXGUEST_IOCTL_WRITE_CORE 310 * request. */ 311 typedef struct VBoxGuestWriteCoreDump 312 { 313 /** Flags (reserved, MBZ). */ 314 uint32_t fFlags; 315 } VBoxGuestWriteCoreDump; 316 AssertCompileSize(VBoxGuestWriteCoreDump, 4); 309 317 310 318 -
trunk/include/VBox/VBoxGuestLib.h
r31430 r32574 471 471 VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3); 472 472 VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate); 473 /** @} */ 474 475 /** @name Core Dump 476 * @{ */ 477 VBGLR3DECL(int) VbglR3WriteCoreDump(void); 478 473 479 /** @} */ 474 480 -
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r32208 r32574 82 82 GUEST_SHAREDFOLDERS, 83 83 #endif 84 WRITE_CORE_DUMP, 84 85 TAKE_SNAPSHOT, 85 86 SAVE_STATE, … … 132 133 #endif 133 134 135 if (eWhich == WRITE_CORE_DUMP || eWhich == USAGE_ALL) 136 doUsage("", g_pszProgName, "writecoredump"); 134 137 if (eWhich == TAKE_SNAPSHOT || eWhich == USAGE_ALL) 135 138 doUsage("", g_pszProgName, "takesnapshot"); … … 1406 1409 * @callback_method_impl{FNVBOXCTRLCMDHANDLER, Command: takesnapshot} 1407 1410 */ 1411 static RTEXITCODE handleWriteCoreDump(int argc, char *argv[]) 1412 { 1413 int rc = VbglR3WriteCoreDump(); 1414 if (RT_SUCCESS(rc)) 1415 { 1416 RTPrintf("Successfully taking guest core\n"); 1417 return RTEXITCODE_SUCCESS; 1418 } 1419 else 1420 { 1421 VBoxControlError("Error while taking guest core. rc=%Rrc\n", rc); 1422 return RTEXITCODE_FAILURE; 1423 } 1424 } 1425 1426 /** 1427 * @callback_method_impl{FNVBOXCTRLCMDHANDLER, Command: takesnapshot} 1428 */ 1408 1429 static RTEXITCODE handleTakeSnapshot(int argc, char *argv[]) 1409 1430 { … … 1484 1505 #ifdef VBOX_WITH_SHARED_FOLDERS 1485 1506 { "sharedfolder", handleSharedFolder }, 1507 #endif 1508 #if !defined(VBOX_CONTROL_TEST) 1509 { "writecoredump", handleWriteCoreDump }, 1486 1510 #endif 1487 1511 { "takesnapshot", handleTakeSnapshot }, -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r32449 r32574 1990 1990 1991 1991 1992 /** 1993 * Handle a request for writing a core dump of the guest on the host. 1994 * 1995 * @returns VBox status code. 1996 * 1997 * @param pDevExt The device extension. 1998 * @param pInfo The output buffer. 1999 */ 2000 static int VBoxGuestCommonIOCtl_WriteCoreDump(PVBOXGUESTDEVEXT pDevExt, VBoxGuestWriteCoreDump *pInfo) 2001 { 2002 VMMDevReqWriteCoreDump *pReq = NULL; 2003 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump); 2004 if (RT_FAILURE(rc)) 2005 { 2006 Log(("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 2007 sizeof(*pReq), sizeof(*pReq), rc)); 2008 return rc; 2009 } 2010 2011 pReq->fFlags = pInfo->fFlags; 2012 rc = VbglGRPerform(&pReq->header); 2013 if (RT_FAILURE(rc)) 2014 Log(("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc)); 2015 2016 VbglGRFree(&pReq->header); 2017 return rc; 2018 } 2019 2020 1992 2021 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 1993 2022 /** … … 2213 2242 break; 2214 2243 2244 case VBOXGUEST_IOCTL_WRITE_CORE_DUMP: 2245 CHECKRET_MIN_SIZE("WRITE_CORE_DUMP", sizeof(VBoxGuestWriteCoreDump)); 2246 rc = VBoxGuestCommonIOCtl_WriteCoreDump(pDevExt, (VBoxGuestWriteCoreDump *)pvData); 2247 break; 2248 2215 2249 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 2216 2250 case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION: -
trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
r31520 r32574 94 94 VBoxGuestR3LibBalloon.cpp \ 95 95 VBoxGuestR3LibClipboard.cpp \ 96 VBoxGuestR3LibCoreDump.cpp \ 96 97 VBoxGuestR3LibCpuHotPlug.cpp \ 97 98 VBoxGuestR3LibCredentials.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.