Changeset 12663 in vbox
- Timestamp:
- Sep 23, 2008 10:16:45 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 36956
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dbgf.h
r9387 r12663 50 50 * @{ 51 51 */ 52 53 /**54 * \#DB (Debug event) handler.55 *56 * @returns VBox status code.57 * VINF_SUCCESS means we completely handled this trap,58 * other codes are passed execution to host context.59 *60 * @param pVM The VM handle.61 * @param pRegFrame Pointer to the register frame for the trap.62 * @param uDr6 The DR6 register value.63 */64 52 DBGFGCDECL(int) DBGFGCTrap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6); 65 66 /**67 * \#BP (Breakpoint) handler.68 *69 * @returns VBox status code.70 * VINF_SUCCESS means we completely handled this trap,71 * other codes are passed execution to host context.72 *73 * @param pVM The VM handle.74 * @param pRegFrame Pointer to the register frame for the trap.75 */76 53 DBGFGCDECL(int) DBGFGCTrap03Handler(PVM pVM, PCPUMCTXCORE pRegFrame); 77 78 54 /** @} */ 79 55 #endif … … 84 60 * @{ 85 61 */ 86 87 /**88 * \#DB (Debug event) handler.89 *90 * @returns VBox status code.91 * VINF_SUCCESS means we completely handled this trap,92 * other codes are passed execution to host context.93 *94 * @param pVM The VM handle.95 * @param pRegFrame Pointer to the register frame for the trap.96 * @param uDr6 The DR6 register value.97 */98 62 DBGFR0DECL(int) DBGFR0Trap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6); 99 100 /**101 * \#BP (Breakpoint) handler.102 *103 * @returns VBox status code.104 * VINF_SUCCESS means we completely handled this trap,105 * other codes are passed execution to host context.106 *107 * @param pVM The VM handle.108 * @param pRegFrame Pointer to the register frame for the trap.109 */110 63 DBGFR0DECL(int) DBGFR0Trap03Handler(PVM pVM, PCPUMCTXCORE pRegFrame); 111 112 64 /** @} */ 113 65 #endif … … 116 68 117 69 /** 118 * 70 * Mixed address. 119 71 */ 120 72 typedef struct DBGFADDRESS … … 172 124 /** @} */ 173 125 174 /**175 * Creates a mixed address from a Sel:off pair.176 *177 * @returns VBox status code.178 * @param pVM The VM handle.179 * @param pAddress Where to store the mixed address.180 * @param Sel The selector part.181 * @param off The offset part.182 */183 126 DBGFR3DECL(int) DBGFR3AddrFromSelOff(PVM pVM, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off); 184 185 /**186 * Creates a mixed address from a flat address.187 *188 * @returns pAddress.189 * @param pVM The VM handle.190 * @param pAddress Where to store the mixed address.191 * @param FlatPtr The flat pointer.192 */193 127 DBGFR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr); 194 195 /**196 * Creates a mixed address from a guest physical address.197 *198 * @param pVM The VM handle.199 * @param pAddress Where to store the mixed address.200 * @param PhysAddr The guest physical address.201 */202 128 DBGFR3DECL(void) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr); 203 204 /**205 * Checks if the specified address is valid (checks the structure pointer too).206 *207 * @returns true if valid.208 * @returns false if invalid.209 * @param pVM The VM handle.210 * @param pAddress The address to validate.211 */212 129 DBGFR3DECL(bool) DBGFR3AddrIsValid(PVM pVM, PCDBGFADDRESS pAddress); 213 130 … … 366 283 #endif 367 284 368 /** 369 * Initializes the DBGF. 370 * 371 * @returns VBox status code. 372 * @param pVM VM handle. 373 */ 374 DBGFR3DECL(int) DBGFR3Init(PVM pVM); 375 376 /** 377 * Termiantes and cleans up resources allocated by the DBGF. 378 * 379 * @returns VBox status code. 380 * @param pVM VM Handle. 381 */ 382 DBGFR3DECL(int) DBGFR3Term(PVM pVM); 383 384 /** 385 * Applies relocations to data and code managed by this 386 * component. This function will be called at init and 387 * whenever the VMM need to relocate it self inside the GC. 388 * 389 * @param pVM VM handle. 390 * @param offDelta Relocation delta relative to old location. 391 */ 392 DBGFR3DECL(void) DBGFR3Relocate(PVM pVM, RTGCINTPTR offDelta); 393 394 /** 395 * Forced action callback. 396 * The VMM will call this from it's main loop when VM_FF_DBGF is set. 397 * 398 * The function checks and executes pending commands from the debugger. 399 * 400 * @returns VINF_SUCCESS normally. 401 * @returns VERR_DBGF_RAISE_FATAL_ERROR to pretend a fatal error happend. 402 * @param pVM VM Handle. 403 */ 404 DBGFR3DECL(int) DBGFR3VMMForcedAction(PVM pVM); 405 406 /** 407 * Send a generic debugger event which takes no data. 408 * 409 * @returns VBox status. 410 * @param pVM The VM handle. 411 * @param enmEvent The event to send. 412 */ 413 DBGFR3DECL(int) DBGFR3Event(PVM pVM, DBGFEVENTTYPE enmEvent); 414 415 /** 416 * Send a debugger event which takes the full source file location. 417 * 418 * @returns VBox status. 419 * @param pVM The VM handle. 420 * @param enmEvent The event to send. 421 * @param pszFile Source file. 422 * @param uLine Line number in source file. 423 * @param pszFunction Function name. 424 * @param pszFormat Message which accompanies the event. 425 * @param ... Message arguments. 426 */ 427 DBGFR3DECL(int) DBGFR3EventSrc(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszFile, unsigned uLine, const char *pszFunction, const char *pszFormat, ...); 428 429 /** 430 * Send a debugger event which takes the full source file location. 431 * 432 * @returns VBox status. 433 * @param pVM The VM handle. 434 * @param enmEvent The event to send. 435 * @param pszFile Source file. 436 * @param uLine Line number in source file. 437 * @param pszFunction Function name. 438 * @param pszFormat Message which accompanies the event. 439 * @param args Message arguments. 440 */ 441 DBGFR3DECL(int) DBGFR3EventSrcV(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszFile, unsigned uLine, const char *pszFunction, const char *pszFormat, va_list args); 442 443 /** 444 * Send a debugger event which takes the two assertion messages. 445 * 446 * @returns VBox status. 447 * @param pVM The VM handle. 448 * @param enmEvent The event to send. 449 * @param pszMsg1 First assertion message. 450 * @param pszMsg2 Second assertion message. 451 */ 452 DBGFR3DECL(int) DBGFR3EventAssertion(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszMsg1, const char *pszMsg2); 453 454 /** 455 * Breakpoint was hit somewhere. 456 * Figure out which breakpoint it is and notify the debugger. 457 * 458 * @returns VBox status. 459 * @param pVM The VM handle. 460 * @param enmEvent DBGFEVENT_BREAKPOINT_HYPER or DBGFEVENT_BREAKPOINT. 461 */ 462 DBGFR3DECL(int) DBGFR3EventBreakpoint(PVM pVM, DBGFEVENTTYPE enmEvent); 463 464 /** 465 * Attaches a debugger to the specified VM. 466 * 467 * Only one debugger at a time. 468 * 469 * @returns VBox status code. 470 * @param pVM VM Handle. 471 */ 472 DBGFR3DECL(int) DBGFR3Attach(PVM pVM); 473 474 /** 475 * Detaches a debugger from the specified VM. 476 * 477 * Caller must be attached to the VM. 478 * 479 * @returns VBox status code. 480 * @param pVM VM Handle. 481 */ 482 DBGFR3DECL(int) DBGFR3Detach(PVM pVM); 483 484 /** 485 * Wait for a debug event. 486 * 487 * @returns VBox status. Will not return VBOX_INTERRUPTED. 488 * @param pVM VM handle. 489 * @param cMillies Number of millies to wait. 490 * @param ppEvent Where to store the event pointer. 491 */ 492 DBGFR3DECL(int) DBGFR3EventWait(PVM pVM, unsigned cMillies, PCDBGFEVENT *ppEvent); 493 494 /** 495 * Halts VM execution. 496 * 497 * After calling this the VM isn't actually halted till an DBGFEVENT_HALT_DONE 498 * arrives. Until that time it's not possible to issue any new commands. 499 * 500 * @returns VBox status. 501 * @param pVM VM handle. 502 */ 503 DBGFR3DECL(int) DBGFR3Halt(PVM pVM); 504 505 /** 506 * Checks if the VM is halted by the debugger. 507 * 508 * @returns True if halted. 509 * @returns False if not halted. 510 * @param pVM VM handle. 511 */ 512 DBGFR3DECL(bool) DBGFR3IsHalted(PVM pVM); 513 514 /** 515 * Checks if the the debugger can wait for events or not. 516 * 517 * This function is only used by lazy, multiplexing debuggers. :-) 518 * 519 * @returns True if waitable. 520 * @returns False if not waitable. 521 * @param pVM VM handle. 522 */ 523 DBGFR3DECL(bool) DBGFR3CanWait(PVM pVM); 524 525 /** 526 * Resumes VM execution. 527 * 528 * There is no receipt event on this command. 529 * 530 * @returns VBox status. 531 * @param pVM VM handle. 532 */ 533 DBGFR3DECL(int) DBGFR3Resume(PVM pVM); 534 535 /** 536 * Step Into. 537 * 538 * A single step event is generated from this command. 539 * The current implementation is not reliable, so don't rely on the event comming. 540 * 541 * @returns VBox status. 542 * @param pVM VM handle. 543 */ 544 DBGFR3DECL(int) DBGFR3Step(PVM pVM); 545 546 /** 547 * Call this to single step rawmode or recompiled mode. 548 * 549 * You must pass down the return code to the EM loop! That's 550 * where the actual single stepping take place (at least in the 551 * current implementation). 552 * 553 * @returns VINF_EM_DBG_STEP 554 * @thread EMT 555 */ 556 DBGFR3DECL(int) DBGFR3PrgStep(PVM pVM); 285 DBGFR3DECL(int) DBGFR3Init(PVM pVM); 286 DBGFR3DECL(int) DBGFR3Term(PVM pVM); 287 DBGFR3DECL(void) DBGFR3Relocate(PVM pVM, RTGCINTPTR offDelta); 288 DBGFR3DECL(int) DBGFR3VMMForcedAction(PVM pVM); 289 DBGFR3DECL(int) DBGFR3Event(PVM pVM, DBGFEVENTTYPE enmEvent); 290 DBGFR3DECL(int) DBGFR3EventSrc(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszFile, unsigned uLine, const char *pszFunction, const char *pszFormat, ...); 291 DBGFR3DECL(int) DBGFR3EventSrcV(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszFile, unsigned uLine, const char *pszFunction, const char *pszFormat, va_list args); 292 DBGFR3DECL(int) DBGFR3EventAssertion(PVM pVM, DBGFEVENTTYPE enmEvent, const char *pszMsg1, const char *pszMsg2); 293 DBGFR3DECL(int) DBGFR3EventBreakpoint(PVM pVM, DBGFEVENTTYPE enmEvent); 294 DBGFR3DECL(int) DBGFR3Attach(PVM pVM); 295 DBGFR3DECL(int) DBGFR3Detach(PVM pVM); 296 DBGFR3DECL(int) DBGFR3EventWait(PVM pVM, unsigned cMillies, PCDBGFEVENT *ppEvent); 297 DBGFR3DECL(int) DBGFR3Halt(PVM pVM); 298 DBGFR3DECL(bool) DBGFR3IsHalted(PVM pVM); 299 DBGFR3DECL(bool) DBGFR3CanWait(PVM pVM); 300 DBGFR3DECL(int) DBGFR3Resume(PVM pVM); 301 DBGFR3DECL(int) DBGFR3Step(PVM pVM); 302 DBGFR3DECL(int) DBGFR3PrgStep(PVM pVM); 557 303 558 304 … … 637 383 638 384 639 /** 640 * Sets a breakpoint (int 3 based). 641 * 642 * @returns VBox status code. 643 * @param pVM The VM handle. 644 * @param pAddress The address of the breakpoint. 645 * @param iHitTrigger The hit count at which the breakpoint start triggering. 646 * Use 0 (or 1) if it's gonna trigger at once. 647 * @param iHitDisable The hit count which disables the breakpoint. 648 * Use ~(uint64_t) if it's never gonna be disabled. 649 * @param piBp Where to store the breakpoint id. (optional) 650 * @thread Any thread. 651 */ 652 DBGFR3DECL(int) DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp); 653 654 /** 655 * Sets a register breakpoint. 656 * 657 * @returns VBox status code. 658 * @param pVM The VM handle. 659 * @param pAddress The address of the breakpoint. 660 * @param iHitTrigger The hit count at which the breakpoint start triggering. 661 * Use 0 (or 1) if it's gonna trigger at once. 662 * @param iHitDisable The hit count which disables the breakpoint. 663 * Use ~(uint64_t) if it's never gonna be disabled. 664 * @param fType The access type (one of the X86_DR7_RW_* defines). 665 * @param cb The access size - 1,2,4 or 8 (the latter is AMD64 long mode only. 666 * Must be 1 if fType is X86_DR7_RW_EO. 667 * @param piBp Where to store the breakpoint id. (optional) 668 * @thread Any thread. 669 */ 670 DBGFR3DECL(int) DBGFR3BpSetReg(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, 671 uint8_t fType, uint8_t cb, PRTUINT piBp); 672 673 /** 674 * Sets a recompiler breakpoint. 675 * 676 * @returns VBox status code. 677 * @param pVM The VM handle. 678 * @param pAddress The address of the breakpoint. 679 * @param iHitTrigger The hit count at which the breakpoint start triggering. 680 * Use 0 (or 1) if it's gonna trigger at once. 681 * @param iHitDisable The hit count which disables the breakpoint. 682 * Use ~(uint64_t) if it's never gonna be disabled. 683 * @param piBp Where to store the breakpoint id. (optional) 684 * @thread Any thread. 685 */ 686 DBGFR3DECL(int) DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp); 687 688 /** 689 * Clears a breakpoint. 690 * 691 * @returns VBox status code. 692 * @param pVM The VM handle. 693 * @param iBp The id of the breakpoint which should be removed (cleared). 694 * @thread Any thread. 695 */ 696 DBGFR3DECL(int) DBGFR3BpClear(PVM pVM, RTUINT iBp); 697 698 /** 699 * Enables a breakpoint. 700 * 701 * @returns VBox status code. 702 * @param pVM The VM handle. 703 * @param iBp The id of the breakpoint which should be enabled. 704 * @thread Any thread. 705 */ 706 DBGFR3DECL(int) DBGFR3BpEnable(PVM pVM, RTUINT iBp); 707 708 /** 709 * Disables a breakpoint. 710 * 711 * @returns VBox status code. 712 * @param pVM The VM handle. 713 * @param iBp The id of the breakpoint which should be disabled. 714 * @thread Any thread. 715 */ 716 DBGFR3DECL(int) DBGFR3BpDisable(PVM pVM, RTUINT iBp); 385 DBGFR3DECL(int) DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp); 386 DBGFR3DECL(int) DBGFR3BpSetReg(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, 387 uint8_t fType, uint8_t cb, PRTUINT piBp); 388 DBGFR3DECL(int) DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp); 389 DBGFR3DECL(int) DBGFR3BpClear(PVM pVM, RTUINT iBp); 390 DBGFR3DECL(int) DBGFR3BpEnable(PVM pVM, RTUINT iBp); 391 DBGFR3DECL(int) DBGFR3BpDisable(PVM pVM, RTUINT iBp); 717 392 718 393 /** … … 728 403 typedef FNDBGFBPENUM *PFNDBGFBPENUM; 729 404 730 /** 731 * Enumerate the breakpoints. 732 * 733 * @returns VBox status code. 734 * @param pVM The VM handle. 735 * @param pfnCallback The callback function. 736 * @param pvUser The user argument to pass to the callback. 737 * @thread Any thread but the callback will be called from EMT. 738 */ 739 DBGFR3DECL(int) DBGFR3BpEnum(PVM pVM, PFNDBGFBPENUM pfnCallback, void *pvUser); 740 741 742 /** 743 * Gets the hardware breakpoint configuration as DR7. 744 * 745 * @returns DR7 from the DBGF point of view. 746 * @param pVM The VM handle. 747 */ 748 DBGFDECL(RTGCUINTREG) DBGFBpGetDR7(PVM pVM); 749 750 /** 751 * Gets the address of the hardware breakpoint number 0. 752 * 753 * @returns DR0 from the DBGF point of view. 754 * @param pVM The VM handle. 755 */ 756 DBGFDECL(RTGCUINTREG) DBGFBpGetDR0(PVM pVM); 757 758 /** 759 * Gets the address of the hardware breakpoint number 1. 760 * 761 * @returns DR1 from the DBGF point of view. 762 * @param pVM The VM handle. 763 */ 764 DBGFDECL(RTGCUINTREG) DBGFBpGetDR1(PVM pVM); 765 766 /** 767 * Gets the address of the hardware breakpoint number 2. 768 * 769 * @returns DR2 from the DBGF point of view. 770 * @param pVM The VM handle. 771 */ 772 DBGFDECL(RTGCUINTREG) DBGFBpGetDR2(PVM pVM); 773 774 /** 775 * Gets the address of the hardware breakpoint number 3. 776 * 777 * @returns DR3 from the DBGF point of view. 778 * @param pVM The VM handle. 779 */ 780 DBGFDECL(RTGCUINTREG) DBGFBpGetDR3(PVM pVM); 781 782 /** 783 * Returns single stepping state 784 * 785 * @returns stepping or not 786 * @param pVM The VM handle. 787 */ 788 DBGFDECL(bool) DBGFIsStepping(PVM pVM); 405 DBGFR3DECL(int) DBGFR3BpEnum(PVM pVM, PFNDBGFBPENUM pfnCallback, void *pvUser); 406 DBGFDECL(RTGCUINTREG) DBGFBpGetDR7(PVM pVM); 407 DBGFDECL(RTGCUINTREG) DBGFBpGetDR0(PVM pVM); 408 DBGFDECL(RTGCUINTREG) DBGFBpGetDR1(PVM pVM); 409 DBGFDECL(RTGCUINTREG) DBGFBpGetDR2(PVM pVM); 410 DBGFDECL(RTGCUINTREG) DBGFBpGetDR3(PVM pVM); 411 DBGFDECL(bool) DBGFIsStepping(PVM pVM); 412 413 789 414 790 415 … … 870 495 /** @} */ 871 496 872 873 /**874 * Register a info handler owned by a device.875 *876 * @returns VBox status code.877 * @param pVM VM handle.878 * @param pszName The identifier of the info.879 * @param pszDesc The description of the info and any arguments the handler may take.880 * @param pfnHandler The handler function to be called to display the info.881 * @param pDevIns The device instance owning the info.882 */883 497 DBGFR3DECL(int) DBGFR3InfoRegisterDevice(PVM pVM, const char *pszName, const char *pszDesc, PFNDBGFHANDLERDEV pfnHandler, PPDMDEVINS pDevIns); 884 885 /**886 * Register a info handler owned by a driver.887 *888 * @returns VBox status code.889 * @param pVM VM handle.890 * @param pszName The identifier of the info.891 * @param pszDesc The description of the info and any arguments the handler may take.892 * @param pfnHandler The handler function to be called to display the info.893 * @param pDrvIns The driver instance owning the info.894 */895 498 DBGFR3DECL(int) DBGFR3InfoRegisterDriver(PVM pVM, const char *pszName, const char *pszDesc, PFNDBGFHANDLERDRV pfnHandler, PPDMDRVINS pDrvIns); 896 897 /**898 * Register a info handler owned by an internal component.899 *900 * @returns VBox status code.901 * @param pVM VM handle.902 * @param pszName The identifier of the info.903 * @param pszDesc The description of the info and any arguments the handler may take.904 * @param pfnHandler The handler function to be called to display the info.905 */906 499 DBGFR3DECL(int) DBGFR3InfoRegisterInternal(PVM pVM, const char *pszName, const char *pszDesc, PFNDBGFHANDLERINT pfnHandler); 907 908 /**909 * Register a info handler owned by an internal component.910 *911 * @returns VBox status code.912 * @param pVM VM handle.913 * @param pszName The identifier of the info.914 * @param pszDesc The description of the info and any arguments the handler may take.915 * @param pfnHandler The handler function to be called to display the info.916 * @param fFlags Flags, see the DBGFINFO_FLAGS_*.917 */918 500 DBGFR3DECL(int) DBGFR3InfoRegisterInternalEx(PVM pVM, const char *pszName, const char *pszDesc, PFNDBGFHANDLERINT pfnHandler, uint32_t fFlags); 919 920 /**921 * Register a info handler owned by an external component.922 *923 * @returns VBox status code.924 * @param pVM VM handle.925 * @param pszName The identifier of the info.926 * @param pszDesc The description of the info and any arguments the handler may take.927 * @param pfnHandler The handler function to be called to display the info.928 * @param pvUser User argument to be passed to the handler.929 */930 501 DBGFR3DECL(int) DBGFR3InfoRegisterExternal(PVM pVM, const char *pszName, const char *pszDesc, PFNDBGFHANDLEREXT pfnHandler, void *pvUser); 931 932 /**933 * Deregister one(/all) info handler(s) owned by a device.934 *935 * @returns VBox status code.936 * @param pVM VM Handle.937 * @param pDevIns Device instance.938 * @param pszName The identifier of the info. If NULL all owned by the device.939 */940 502 DBGFR3DECL(int) DBGFR3InfoDeregisterDevice(PVM pVM, PPDMDEVINS pDevIns, const char *pszName); 941 942 /**943 * Deregister one(/all) info handler(s) owned by a driver.944 *945 * @returns VBox status code.946 * @param pVM VM Handle.947 * @param pDrvIns Driver instance.948 * @param pszName The identifier of the info. If NULL all owned by the driver.949 */950 503 DBGFR3DECL(int) DBGFR3InfoDeregisterDriver(PVM pVM, PPDMDRVINS pDrvIns, const char *pszName); 951 952 /**953 * Deregister a info handler owned by an internal component.954 *955 * @returns VBox status code.956 * @param pVM VM Handle.957 * @param pszName The identifier of the info. If NULL all owned by the device.958 */959 504 DBGFR3DECL(int) DBGFR3InfoDeregisterInternal(PVM pVM, const char *pszName); 960 961 /**962 * Deregister a info handler owned by an external component.963 *964 * @returns VBox status code.965 * @param pVM VM Handle.966 * @param pszName The identifier of the info. If NULL all owned by the device.967 */968 505 DBGFR3DECL(int) DBGFR3InfoDeregisterExternal(PVM pVM, const char *pszName); 969 970 /**971 * Display a piece of info writing to the supplied handler.972 *973 * @returns VBox status code.974 * @param pVM VM handle.975 * @param pszName The identifier of the info to display.976 * @param pszArgs Arguments to the info handler.977 * @param pHlp The output helper functions. If NULL the logger will be used.978 */979 506 DBGFR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp); 980 507 … … 996 523 #endif 997 524 998 999 /**1000 * Changes the logger group settings.1001 *1002 * @returns VBox status code.1003 * @param pVM The VM handle.1004 * @param pszGroupSettings The group settings string. (VBOX_LOG)1005 */1006 DBGFR3DECL(int) DBGFR3LogModifyGroups(PVM pVM, const char *pszGroupSettings);1007 1008 /**1009 * Changes the logger flag settings.1010 *1011 * @returns VBox status code.1012 * @param pVM The VM handle.1013 * @param pszFlagSettings The flag settings string. (VBOX_LOG_FLAGS)1014 */1015 DBGFR3DECL(int) DBGFR3LogModifyFlags(PVM pVM, const char *pszFlagSettings);1016 1017 /**1018 * Changes the logger destination settings.1019 *1020 * @returns VBox status code.1021 * @param pVM The VM handle.1022 * @param pszDestSettings The destination settings string. (VBOX_LOG_DEST)1023 */1024 DBGFR3DECL(int) DBGFR3LogModifyDestinations(PVM pVM, const char *pszDestSettings);1025 1026 1027 525 /** 1028 526 * Enumeration callback for use with DBGFR3InfoEnum. … … 1039 537 typedef FNDBGFINFOENUM *PFNDBGFINFOENUM; 1040 538 1041 /**1042 * Enumerate all the register info handlers.1043 *1044 * @returns VBox status code.1045 * @param pVM VM handle.1046 * @param pfnCallback Pointer to callback function.1047 * @param pvUser User argument to pass to the callback.1048 */1049 539 DBGFR3DECL(int) DBGFR3InfoEnum(PVM pVM, PFNDBGFINFOENUM pfnCallback, void *pvUser); 1050 1051 /**1052 * Gets the logger info helper.1053 * The returned info helper will unconditionally write all output to the log.1054 *1055 * @returns Pointer to the logger info helper.1056 */1057 540 DBGFR3DECL(PCDBGFINFOHLP) DBGFR3InfoLogHlp(void); 1058 1059 /**1060 * Gets the release logger info helper.1061 * The returned info helper will unconditionally write all output to the release log.1062 *1063 * @returns Pointer to the release logger info helper.1064 */1065 541 DBGFR3DECL(PCDBGFINFOHLP) DBGFR3InfoLogRelHlp(void); 542 543 544 545 DBGFR3DECL(int) DBGFR3LogModifyGroups(PVM pVM, const char *pszGroupSettings); 546 DBGFR3DECL(int) DBGFR3LogModifyFlags(PVM pVM, const char *pszFlagSettings); 547 DBGFR3DECL(int) DBGFR3LogModifyDestinations(PVM pVM, const char *pszDestSettings); 1066 548 1067 549 … … 1106 588 typedef const DBGFLINE *PCDBGFLINE; 1107 589 1108 1109 /** 1110 * Load debug info, optionally related to a specific module. 1111 * 1112 * @returns VBox status. 1113 * @param pVM VM Handle. 1114 * @param pszFilename Path to the file containing the symbol information. 1115 * This can be the executable image, a flat symbol file of some kind or stripped debug info. 1116 * @param AddressDelta The value to add to the loaded symbols. 1117 * @param pszName Short hand name for the module. If not related to a module specify NULL. 1118 * @param Address Address which the image is loaded at. This will be used to reference the module other places in the api. 1119 * Ignored when pszName is NULL. 1120 * @param cbImage Size of the image. 1121 * Ignored when pszName is NULL. 1122 */ 1123 DBGFR3DECL(int) DBGFR3ModuleLoad(PVM pVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage); 1124 1125 /** 1126 * Interface used by PDMR3LdrRelocate for telling us that a GC module has been relocated. 1127 * 1128 * @param pVM The VM handle. 1129 * @param OldImageBase The old image base. 1130 * @param NewImageBase The new image base. 1131 * @param cbImage The image size. 1132 * @param pszFilename The image filename. 1133 * @param pszName The module name. 1134 */ 1135 DBGFR3DECL(void) DBGFR3ModuleRelocate(PVM pVM, RTGCUINTPTR OldImageBase, RTGCUINTPTR NewImageBase, unsigned cbImage, 1136 const char *pszFilename, const char *pszName); 1137 1138 /** 1139 * Adds a symbol to the debug info manager. 1140 * 1141 * @returns VBox status. 1142 * @param pVM VM Handle. 1143 * @param ModuleAddress Module address. Use 0 if no module. 1144 * @param SymbolAddress Symbol address 1145 * @param cbSymbol Size of the symbol. Use 0 if info not available. 1146 * @param pszSymbol Symbol name. 1147 */ 1148 DBGFR3DECL(int) DBGFR3SymbolAdd(PVM pVM, RTGCUINTPTR ModuleAddress, RTGCUINTPTR SymbolAddress, RTUINT cbSymbol, const char *pszSymbol); 1149 1150 /** 1151 * Find symbol by address (nearest). 1152 * 1153 * @returns VBox status. 1154 * @param pVM VM handle. 1155 * @param Address Address. 1156 * @param poffDisplacement Where to store the symbol displacement from Address. 1157 * @param pSymbol Where to store the symbol info. 1158 */ 1159 DBGFR3DECL(int) DBGFR3SymbolByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFSYMBOL pSymbol); 1160 1161 /** 1162 * Find symbol by name (first). 1163 * 1164 * @returns VBox status. 1165 * @param pVM VM handle. 1166 * @param pszSymbol Symbol name. 1167 * @param pSymbol Where to store the symbol info. 1168 */ 1169 DBGFR3DECL(int) DBGFR3SymbolByName(PVM pVM, const char *pszSymbol, PDBGFSYMBOL pSymbol); 1170 1171 /** 1172 * Find symbol by address (nearest), allocate return buffer. 1173 * 1174 * @returns Pointer to the symbol. Must be freed using DBGFR3SymbolFree(). 1175 * @returns NULL if the symbol was not found or if we're out of memory. 1176 * @param pVM VM handle. 1177 * @param Address Address. 1178 * @param poffDisplacement Where to store the symbol displacement from Address. 1179 */ 590 DBGFR3DECL(int) DBGFR3ModuleLoad(PVM pVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage); 591 DBGFR3DECL(void) DBGFR3ModuleRelocate(PVM pVM, RTGCUINTPTR OldImageBase, RTGCUINTPTR NewImageBase, unsigned cbImage, 592 const char *pszFilename, const char *pszName); 593 DBGFR3DECL(int) DBGFR3SymbolAdd(PVM pVM, RTGCUINTPTR ModuleAddress, RTGCUINTPTR SymbolAddress, RTUINT cbSymbol, const char *pszSymbol); 594 DBGFR3DECL(int) DBGFR3SymbolByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFSYMBOL pSymbol); 595 DBGFR3DECL(int) DBGFR3SymbolByName(PVM pVM, const char *pszSymbol, PDBGFSYMBOL pSymbol); 1180 596 DBGFR3DECL(PDBGFSYMBOL) DBGFR3SymbolByAddrAlloc(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement); 1181 1182 /**1183 * Find symbol by name (first), allocate return buffer.1184 *1185 * @returns Pointer to the symbol. Must be freed using DBGFR3SymbolFree().1186 * @returns NULL if the symbol was not found or if we're out of memory.1187 * @param pVM VM handle.1188 * @param pszSymbol Symbol name.1189 * @param ppSymbol Where to store the pointer to the symbol info.1190 */1191 597 DBGFR3DECL(PDBGFSYMBOL) DBGFR3SymbolByNameAlloc(PVM pVM, const char *pszSymbol); 1192 1193 /** 1194 * Frees a symbol returned by DBGFR3SymbolbyNameAlloc() or DBGFR3SymbolByAddressAlloc(). 1195 * 1196 * @param pSymbol Pointer to the symbol. 1197 */ 1198 DBGFR3DECL(void) DBGFR3SymbolFree(PDBGFSYMBOL pSymbol); 1199 1200 /** 1201 * Find line by address (nearest). 1202 * 1203 * @returns VBox status. 1204 * @param pVM VM handle. 1205 * @param Address Address. 1206 * @param poffDisplacement Where to store the line displacement from Address. 1207 * @param pLine Where to store the line info. 1208 */ 1209 DBGFR3DECL(int) DBGFR3LineByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine); 1210 1211 /** 1212 * Find line by address (nearest), allocate return buffer. 1213 * 1214 * @returns Pointer to the line. Must be freed using DBGFR3LineFree(). 1215 * @returns NULL if the line was not found or if we're out of memory. 1216 * @param pVM VM handle. 1217 * @param Address Address. 1218 * @param poffDisplacement Where to store the line displacement from Address. 1219 */ 1220 DBGFR3DECL(PDBGFLINE) DBGFR3LineByAddrAlloc(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement); 1221 1222 /** 1223 * Frees a line returned by DBGFR3LineByAddressAlloc(). 1224 * 1225 * @param pLine Pointer to the line. 1226 */ 1227 DBGFR3DECL(void) DBGFR3LineFree(PDBGFLINE pLine); 598 DBGFR3DECL(void) DBGFR3SymbolFree(PDBGFSYMBOL pSymbol); 599 DBGFR3DECL(int) DBGFR3LineByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine); 600 DBGFR3DECL(PDBGFLINE) DBGFR3LineByAddrAlloc(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement); 601 DBGFR3DECL(void) DBGFR3LineFree(PDBGFLINE pLine); 602 1228 603 1229 604 /** … … 1260 635 } DBGFRETURNTYPE; 1261 636 1262 1263 637 /** 1264 638 * Figures the size of the return state on the stack. … … 1365 739 /** @} */ 1366 740 1367 /**1368 * Begins a stack walk.1369 * This will construct and obtain the first frame.1370 *1371 * @returns VINF_SUCCESS on success.1372 * @returns VERR_NO_MEMORY if we're out of memory.1373 * @param pVM The VM handle.1374 * @param pFrame The stack frame info structure.1375 * On input this structure must be memset to zero.1376 * If wanted, the AddrPC, AddrStack and AddrFrame fields may be set1377 * to valid addresses after memsetting it. Any of those fields not set1378 * will be fetched from the guest CPU state.1379 * On output the structure will contain all the information we were able to1380 * obtain about the stack frame.1381 */1382 741 DBGFR3DECL(int) DBGFR3StackWalkBeginGuest(PVM pVM, PDBGFSTACKFRAME pFrame); 1383 1384 /**1385 * Begins a stack walk.1386 * This will construct and obtain the first frame.1387 *1388 * @returns VINF_SUCCESS on success.1389 * @returns VERR_NO_MEMORY if we're out of memory.1390 * @param pVM The VM handle.1391 * @param pFrame The stack frame info structure.1392 * On input this structure must be memset to zero.1393 * If wanted, the AddrPC, AddrStack and AddrFrame fields may be set1394 * to valid addresses after memsetting it. Any of those fields not set1395 * will be fetched from the hypervisor CPU state.1396 * On output the structure will contain all the information we were able to1397 * obtain about the stack frame.1398 */1399 742 DBGFR3DECL(int) DBGFR3StackWalkBeginHyper(PVM pVM, PDBGFSTACKFRAME pFrame); 1400 1401 /**1402 * Gets the next stack frame.1403 *1404 * @returns VINF_SUCCESS1405 * @returns VERR_NO_MORE_FILES if not more stack frames.1406 * @param pVM The VM handle.1407 * @param pFrame Pointer to the current frame on input, content is replaced with the next frame on successful return.1408 */1409 743 DBGFR3DECL(int) DBGFR3StackWalkNext(PVM pVM, PDBGFSTACKFRAME pFrame); 1410 1411 /**1412 * Ends a stack walk process.1413 *1414 * This *must* be called after a successful first call to any of the stack1415 * walker functions. If not called we will leak memory or other resources.1416 *1417 * @param pVM The VM handle.1418 * @param pFrame The stackframe as returned by the last stack walk call.1419 */1420 744 DBGFR3DECL(void) DBGFR3StackWalkEnd(PVM pVM, PDBGFSTACKFRAME pFrame); 1421 745 … … 1442 766 #define DBGF_SEL_FLAT 1 1443 767 1444 /**1445 * Disassembles the one instruction according to the specified flags and address.1446 *1447 * @returns VBox status code.1448 * @param pVM VM handle.1449 * @param Sel The code selector. This used to determin the 32/16 bit ness and1450 * calculation of the actual instruction address.1451 * Use DBGF_SEL_FLAT for specifying a flat address.1452 * @param GCPtr The code address relative to the base of Sel.1453 * @param fFlags Flags controlling where to start and how to format.1454 * A combination of the DBGF_DISAS_FLAGS_* #defines.1455 * @param pszOutput Output buffer.1456 * @param cchOutput Size of the output buffer.1457 * @param pcbInstr Where to return the size of the instruction.1458 */1459 768 DBGFR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, RTSEL Sel, RTGCPTR GCPtr, unsigned fFlags, char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr); 1460 1461 /**1462 * Disassembles the current instruction.1463 * Addresses will be tried resolved to symbols1464 *1465 * @returns VBox status code.1466 * @param pVM VM handle.1467 * @param Sel The code selector. This used to determin the 32/16 bit ness and1468 * calculation of the actual instruction address.1469 * Use DBGF_SEL_FLAT for specifying a flat address.1470 * @param GCPtr The code address relative to the base of Sel.1471 * @param pszOutput Output buffer.1472 * @param cbOutput Size of the output buffer.1473 */1474 769 DBGFR3DECL(int) DBGFR3DisasInstr(PVM pVM, RTSEL Sel, RTGCPTR GCPtr, char *pszOutput, uint32_t cbOutput); 1475 1476 /**1477 * Disassembles the current instruction.1478 * All registers and data will be displayed. Addresses will be attempted resolved to symbols1479 *1480 * @returns VBox status code.1481 * @param pVM VM handle.1482 * @param pszOutput Output buffer.1483 * @param cbOutput Size of the output buffer.1484 */1485 770 DBGFR3DECL(int) DBGFR3DisasInstrCurrent(PVM pVM, char *pszOutput, uint32_t cbOutput); 1486 1487 /**1488 * Disassembles the current guest context instruction and writes it to the log.1489 * All registers and data will be displayed. Addresses will be attempted resolved to symbols.1490 *1491 * @returns VBox status code.1492 * @param pVM VM handle.1493 * @param pszPrefix Short prefix string to the dissassembly string. (optional)1494 */1495 771 DBGFR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVM pVM, const char *pszPrefix); 1496 772 … … 1509 785 #endif 1510 786 1511 /**1512 * Disassembles the specified guest context instruction and writes it to the log.1513 * Addresses will be attempted resolved to symbols.1514 *1515 * @returns VBox status code.1516 * @param pVM VM handle.1517 * @param Sel The code selector. This used to determin the 32/16 bit-ness and1518 * calculation of the actual instruction address.1519 * @param GCPtr The code address relative to the base of Sel.1520 */1521 787 DBGFR3DECL(int) DBGFR3DisasInstrLogInternal(PVM pVM, RTSEL Sel, RTGCPTR GCPtr); 1522 788 … … 1692 958 1693 959 #endif 960 -
trunk/src/VBox/VMM/DBGF.cpp
r11820 r12663 21 21 22 22 23 /** @page pg_dbgf DBGC - The Debugger Facility 24 * 25 * The purpose of the DBGC is to provide an interface for debuggers to manipulate 26 * the VMM without having to mess up the source code for each of them. The DBGF 27 * is always built in and will always work when a debugger attaches to the VM. 28 * The DBGF provides the basic debugger features, such as halting execution, 29 * handling breakpoints and single step execution. 23 /** @page pg_dbgf DBGF - The Debugger Facility 24 * 25 * The purpose of the DBGF is to provide an interface for debuggers to 26 * manipulate the VMM without having to mess up the source code for each of 27 * them. The DBGF is always built in and will always work when a debugger 28 * attaches to the VM. The DBGF provides the basic debugger features, such as 29 * halting execution, handling breakpoints, single step execution, instruction 30 * disassembly, info querying, OS specific diggers, symbol and module 31 * management. 30 32 * 31 33 * The interface is working in a manner similar to the win32, linux and os2 32 34 * debugger interfaces. It interface has an asynchronous nature. This comes from 33 * the fact that the VMM and the Debugger are running in different threads. 34 * They are refered to as the "emulation thread" and the "debugger thread", 35 * or as the "ping thread" and the "pong thread, respectivly. (The last set 36 * of names comes from the use of the Ping-Pong synchronization construct from 37 * the RTSem API.) 38 * 39 * 40 * 41 * @section sec_dbgf_scenario Debugger Scenario 35 * the fact that the VMM and the Debugger are running in different threads. They 36 * are refered to as the "emulation thread" and the "debugger thread", or as the 37 * "ping thread" and the "pong thread, respectivly. (The last set of names comes 38 * from the use of the Ping-Pong synchronization construct from the RTSem API.) 39 * 40 * 41 * 42 * @section sec_dbgf_scenario Usage Scenario 42 43 * 43 44 * The debugger starts by attaching to the VM. For pratical reasons we limit the 44 * number of concurrently attached debuggers to 1 per VM. The action of attaching45 * to the VM causes the VM to check and generate debug events.45 * number of concurrently attached debuggers to 1 per VM. The action of 46 * attaching to the VM causes the VM to check and generate debug events. 46 47 * 47 48 * The debugger then will wait/poll for debug events and issue commands. … … 53 54 * An event can be a respons to an command issued previously, the hitting of a 54 55 * breakpoint, or running into a bad/fatal VMM condition. The debugger now have 55 * the ping and must respond to the event at hand - the VMM is waiting. 56 * the ping and must respond to the event at hand - the VMM is waiting. This 56 57 * usually means that the user of the debugger must do something, but it doesn't 57 58 * have to. The debugger is free to call any DBGF function (nearly at least) … … 62 63 * 63 64 * When the user eventually terminates the debugging session or selects another 64 * VM, the debugger detaches from the VM. This means that breakpoints are disabled 65 * and that the emulation thread no longer polls for debugger commands. 66 * 67 */ 68 65 * VM, the debugger detaches from the VM. This means that breakpoints are 66 * disabled and that the emulation thread no longer polls for debugger commands. 67 * 68 */ 69 69 70 70 … … 93 93 * Internal Functions * 94 94 *******************************************************************************/ 95 static int dbgf r3VMMWait(PVM pVM);96 static int dbgf r3VMMCmd(PVM pVM, DBGFCMD enmCmd, PDBGFCMDDATA pCmdData, bool *pfResumeExecution);95 static int dbgfR3VMMWait(PVM pVM); 96 static int dbgfR3VMMCmd(PVM pVM, DBGFCMD enmCmd, PDBGFCMDDATA pCmdData, bool *pfResumeExecution); 97 97 98 98 … … 104 104 * @param enmCmd The command. 105 105 */ 106 DECLINLINE(DBGFCMD) dbgf r3SetCmd(PVM pVM, DBGFCMD enmCmd)106 DECLINLINE(DBGFCMD) dbgfR3SetCmd(PVM pVM, DBGFCMD enmCmd) 107 107 { 108 108 DBGFCMD rc; … … 189 189 */ 190 190 DBGFCMDDATA CmdData = pVM->dbgf.s.VMMCmdData; 191 DBGFCMD enmCmd = dbgf r3SetCmd(pVM, DBGFCMD_NO_COMMAND);191 DBGFCMD enmCmd = dbgfR3SetCmd(pVM, DBGFCMD_NO_COMMAND); 192 192 if (enmCmd != DBGFCMD_NO_COMMAND) 193 193 { 194 194 bool fResumeExecution = false; 195 rc = dbgf r3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution);195 rc = dbgfR3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution); 196 196 if (enmCmd == DBGFCMD_DETACH_DEBUGGER) 197 197 break; … … 304 304 bool fResumeExecution; 305 305 DBGFCMDDATA CmdData = pVM->dbgf.s.VMMCmdData; 306 DBGFCMD enmCmd = dbgf r3SetCmd(pVM, DBGFCMD_NO_COMMAND);307 rc = dbgf r3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution);306 DBGFCMD enmCmd = dbgfR3SetCmd(pVM, DBGFCMD_NO_COMMAND); 307 rc = dbgfR3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution); 308 308 if (!fResumeExecution) 309 rc = dbgf r3VMMWait(pVM);309 rc = dbgfR3VMMWait(pVM); 310 310 } 311 311 return rc; … … 410 410 int rc = RTSemPing(&pVM->dbgf.s.PingPong); 411 411 if (VBOX_SUCCESS(rc)) 412 rc = dbgf r3VMMWait(pVM);412 rc = dbgfR3VMMWait(pVM); 413 413 414 414 pVM->dbgf.s.fStoppedInHyper = false; … … 582 582 * @param pVM VM handle. 583 583 */ 584 static int dbgf r3VMMWait(PVM pVM)585 { 586 LogFlow(("dbgf r3VMMWait:\n"));584 static int dbgfR3VMMWait(PVM pVM) 585 { 586 LogFlow(("dbgfR3VMMWait:\n")); 587 587 588 588 /** @todo stupid GDT/LDT sync hack. go away! */ … … 605 605 if (rc != VERR_TIMEOUT) 606 606 { 607 LogFlow(("dbgf r3VMMWait: returns %Vrc\n", rc));607 LogFlow(("dbgfR3VMMWait: returns %Vrc\n", rc)); 608 608 return rc; 609 609 } … … 611 611 if (VM_FF_ISSET(pVM, VM_FF_REQUEST)) 612 612 { 613 LogFlow(("dbgf r3VMMWait: Processes requests...\n"));613 LogFlow(("dbgfR3VMMWait: Processes requests...\n")); 614 614 rc = VMR3ReqProcessU(pVM->pUVM); 615 LogFlow(("dbgf r3VMMWait: VMR3ReqProcess -> %Vrc rcRet=%Vrc\n", rc, rcRet));615 LogFlow(("dbgfR3VMMWait: VMR3ReqProcess -> %Vrc rcRet=%Vrc\n", rc, rcRet)); 616 616 if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST) 617 617 { … … 628 628 case VINF_EM_TERMINATE: 629 629 case VINF_EM_OFF: 630 LogFlow(("dbgf r3VMMWait: returns %Vrc\n", rc));630 LogFlow(("dbgfR3VMMWait: returns %Vrc\n", rc)); 631 631 return rc; 632 632 … … 648 648 else if (VBOX_FAILURE(rc)) 649 649 { 650 LogFlow(("dbgf r3VMMWait: returns %Vrc\n", rc));650 LogFlow(("dbgfR3VMMWait: returns %Vrc\n", rc)); 651 651 return rc; 652 652 } … … 659 659 bool fResumeExecution; 660 660 DBGFCMDDATA CmdData = pVM->dbgf.s.VMMCmdData; 661 DBGFCMD enmCmd = dbgf r3SetCmd(pVM, DBGFCMD_NO_COMMAND);662 int rc = dbgf r3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution);661 DBGFCMD enmCmd = dbgfR3SetCmd(pVM, DBGFCMD_NO_COMMAND); 662 int rc = dbgfR3VMMCmd(pVM, enmCmd, &CmdData, &fResumeExecution); 663 663 if (fResumeExecution) 664 664 { … … 669 669 && (rc < rcRet || rcRet == VINF_SUCCESS)) 670 670 rcRet = rc; 671 LogFlow(("dbgf r3VMMWait: returns %Vrc\n", rcRet));671 LogFlow(("dbgfR3VMMWait: returns %Vrc\n", rcRet)); 672 672 return rcRet; 673 673 } … … 687 687 * @param pfResumeExecution Where to store the resume execution / continue waiting indicator. 688 688 */ 689 static int dbgf r3VMMCmd(PVM pVM, DBGFCMD enmCmd, PDBGFCMDDATA pCmdData, bool *pfResumeExecution)689 static int dbgfR3VMMCmd(PVM pVM, DBGFCMD enmCmd, PDBGFCMDDATA pCmdData, bool *pfResumeExecution) 690 690 { 691 691 bool fSendEvent; … … 847 847 if (pVM->dbgf.s.PingPong.enmSpeaker == RTPINGPONGSPEAKER_PONG) 848 848 { 849 enmCmd = dbgf r3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER);849 enmCmd = dbgfR3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER); 850 850 int rc = RTSemPong(&pVM->dbgf.s.PingPong); 851 851 if (VBOX_FAILURE(rc)) … … 858 858 else 859 859 { 860 enmCmd = dbgf r3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER);860 enmCmd = dbgfR3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER); 861 861 LogFunc(("enmCmd=%d (ping)\n", enmCmd)); 862 862 } … … 948 948 * Send command. 949 949 */ 950 dbgf r3SetCmd(pVM, DBGFCMD_HALT);950 dbgfR3SetCmd(pVM, DBGFCMD_HALT); 951 951 952 952 return VINF_SUCCESS; … … 1020 1020 * Send the ping back to the emulation thread telling it to run. 1021 1021 */ 1022 dbgf r3SetCmd(pVM, DBGFCMD_GO);1022 dbgfR3SetCmd(pVM, DBGFCMD_GO); 1023 1023 int rc = RTSemPong(&pVM->dbgf.s.PingPong); 1024 1024 AssertRC(rc); … … 1056 1056 * Send the ping back to the emulation thread telling it to run. 1057 1057 */ 1058 dbgf r3SetCmd(pVM, DBGFCMD_SINGLE_STEP);1058 dbgfR3SetCmd(pVM, DBGFCMD_SINGLE_STEP); 1059 1059 int rc = RTSemPong(&pVM->dbgf.s.PingPong); 1060 1060 AssertRC(rc); -
trunk/src/VBox/VMM/DBGFAddr.cpp
r8819 r12663 158 158 return true; 159 159 } 160 -
trunk/src/VBox/VMM/DBGFBp.cpp
r11311 r12663 56 56 57 57 58 58 59 /** 59 60 * Initialize the breakpoint stuff. -
trunk/src/VBox/VMM/DBGFDisas.cpp
r9846 r12663 42 42 43 43 /******************************************************************************* 44 * Internal Functions*44 * Structures and Typedefs * 45 45 *******************************************************************************/ 46 static DECLCALLBACK(int) dbgfR3DisasInstrRead(RTUINTPTR pSrc, uint8_t *pDest, uint32_t size, void *pvUserdata);47 48 49 46 /** 50 47 * Structure used when disassembling and instructions in DBGF. … … 80 77 81 78 79 /******************************************************************************* 80 * Internal Functions * 81 *******************************************************************************/ 82 static DECLCALLBACK(int) dbgfR3DisasInstrRead(RTUINTPTR pSrc, uint8_t *pDest, uint32_t size, void *pvUserdata); 83 84 82 85 83 86 /** -
trunk/src/VBox/VMM/DBGFInfo.cpp
r8155 r12663 390 390 391 391 392 393 392 /** 394 393 * Register a info handler owned by an external component. … … 631 630 } 632 631 632 633 633 /** 634 634 * Deregister a info handler owned by an internal component. -
trunk/src/VBox/VMM/DBGFInternal.h
r8802 r12663 84 84 { 85 85 uint32_t uDummy; 86 87 86 } DBGFCMDDATA; 88 87 /** Pointer to DBGF Command Data. */ … … 205 204 * Set if a debugger is attached, elsewise it's clear. 206 205 */ 207 volatile boolfAttached;206 bool volatile fAttached; 208 207 209 208 /** Stopped in the Hypervisor. … … 211 210 * the hypervisor and have to restrict the available operations. 212 211 */ 213 volatile boolfStoppedInHyper;212 bool volatile fStoppedInHyper; 214 213 215 214 /** … … 232 231 * when it have processed it. 233 232 */ 234 volatile DBGFCMDenmVMMCmd;233 DBGFCMD volatile enmVMMCmd; 235 234 /** The Command data. 236 235 * Not all commands take data. */ -
trunk/src/VBox/VMM/DBGFLog.cpp
r8155 r12663 19 19 * additional information or have any questions. 20 20 */ 21 22 21 23 22 -
trunk/src/VBox/VMM/DBGFStack.cpp
r8155 r12663 64 64 65 65 66 67 68 66 /** 69 67 * Internal worker routine. … … 76 74 * 4 return address 77 75 * 0 old ebp; current ebp points here 76 * 77 * @todo Add AMD64 support (needs teaming up with the module management for 78 * unwind tables). 78 79 */ 79 80 static int dbgfR3StackWalk(PVM pVM, PDBGFSTACKFRAME pFrame) -
trunk/src/VBox/VMM/DBGFSym.cpp
r9182 r12663 49 49 #include <stdio.h> /* for fopen(). */ /** @todo use iprt/stream.h! */ 50 50 #include <stdlib.h> 51 52 51 53 52 -
trunk/src/VBox/VMM/VMMGC/DBGFGC.cpp
r9212 r12663 2 2 /** @file 3 3 * DBGF - Debugger Facility, GC part. 4 * 5 * Almost identical to DBGFR0.cpp, except for the fInHyper stuff. 4 6 */ 5 7 -
trunk/src/VBox/VMM/VMMR0/DBGFR0.cpp
r11311 r12663 2 2 /** @file 3 3 * DBGF - Debugger Facility, R0 part. 4 * 5 * Almost identical to DBGFGC.cpp, except for the fInHyper stuff. 4 6 */ 5 7
Note:
See TracChangeset
for help on using the changeset viewer.