VirtualBox

Changeset 36669 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Apr 14, 2011 12:21:43 PM (14 years ago)
Author:
vboxsync
Message:

PATM: Record trampoline patches in the target to update the displacement on a patch refresh. (see xTracker #5593 for further information)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/PATMInternal.h

    r35348 r36669  
    241241} PATCHINFOTEMP, *PPATCHINFOTEMP;
    242242
     243/** Forward declaration for a pointer to a trampoline patch record. */
     244typedef struct TRAMPREC *PTRAMPREC;
     245
    243246typedef struct _PATCHINFO
    244247{
     
    298301    R3PTRTYPE(PPATCHINFOTEMP) pTempInfo;
    299302
     303    /* List of trampoline patches referencing this patch.
     304     * Used when refreshing the patch. (Only for function duplicates) */
     305    R3PTRTYPE(PTRAMPREC)      pTrampolinePatchesHead;
     306
    300307    /* Count the number of writes to the corresponding guest code. */
    301308    uint32_t        cCodeWrites;
     
    312319    /* First opcode byte, that's overwritten when a patch is marked dirty. */
    313320    uint8_t         bDirtyOpcode;
    314     uint8_t         Alignment2[7];      /**< Align the structure size on a 8-byte boundary. */
     321    uint8_t         Alignment2[HC_ARCH_BITS == 64 ? 7 : 3];      /**< Align the structure size on a 8-byte boundary. */
    315322} PATCHINFO, *PPATCHINFO;
    316323
     
    330337    PATCHINFO  patch;
    331338} PATMPATCHREC, *PPATMPATCHREC;
     339
     340/**
     341 * Record for a trampoline patch.
     342 */
     343typedef struct TRAMPREC
     344{
     345    /** Pointer to the next trampoline patch. */
     346    struct TRAMPREC    *pNext;
     347    /** Pointer to the trampoline patch record. */
     348    PPATMPATCHREC       pPatchTrampoline;
     349} TRAMPREC;
    332350
    333351/** Increment for allocating room for pointer array */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette