VirtualBox

Changeset 35253 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Dec 20, 2010 4:47:38 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69100
Message:

Debugger: Fixed memory editing commands.

Location:
trunk/src/VBox/Debugger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp

    r35163 r35253  
    37473747{
    37483748    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     3749    unsigned iArg;
    37493750
    37503751    /*
    37513752     * Validate input.
    37523753     */
    3753     if (     cArgs >= 2
     3754    if (     cArgs < 2
    37543755        ||  !DBGCVAR_ISPOINTER(paArgs[0].enmType))
    37553756        return DBGCCmdHlpFail(pCmdHlp, pCmd, "internal error: The parser doesn't do its job properly yet... It might help to use the '%%' operator.\n");
    3756     for (unsigned iArg = 2; iArg < cArgs; iArg++)
     3757    for (iArg = 1; iArg < cArgs; iArg++)
    37573758        if (paArgs[iArg].enmType != DBGCVAR_TYPE_NUMBER)
    37583759            return DBGCCmdHlpFail(pCmdHlp, pCmd, "internal error: The parser doesn't do its job properly yet: Arg #%u is not a number.\n", iArg);
     
    37773778     */
    37783779    DBGCVAR Addr = paArgs[0];
    3779     unsigned iArg = 1;
    3780     for (;;)
     3780    for (iArg = 1;;)
    37813781    {
    37823782        size_t cbWritten;
  • trunk/src/VBox/Debugger/DBGPlugInSolaris.cpp

    r33467 r35253  
    166166AssertCompileSize(SOL64v9_modctl_t, 0x80);
    167167
     168typedef struct SOL32v4_modctl
     169{
     170    uint32_t    mod_next;               /**<  0 */
     171    uint32_t    mod_prev;               /**<  4 */
     172    int32_t     mod_id;                 /**<  8 */
     173    uint32_t    mod_mp;                 /**<  c Pointer to the kernel runtime loader bits. */
     174    uint32_t    mod_inprogress_thread;  /**< 10 */
     175    uint32_t    mod_modinfo;            /**< 14 */
     176    uint32_t    mod_linkage;            /**< 18 */
     177    uint32_t    mod_filename;           /**< 1c */
     178    uint32_t    mod_modname;            /**< 20 */
     179    int32_t     mod_busy;               /**< 24 */
     180    int32_t     mod_stub;               /**< 28 */
     181    uint32_t    mod_loaded:1;           /**< 2c DIFF 1 */
     182    uint32_t    mod_installed:1;        /**< 2c */
     183    uint32_t    mod_uninstalled:1;      /**< 2c */
     184    uint32_t    mod_noautounload:1;     /**< 2c */
     185    int8_t      mod_want;               /**< 30 DIFF 2 */
     186    char        mod_padding1[3];
     187    uint32_t    mod_requisites;         /**< 34 */
     188    uint32_t    mod_dependents;         /**< 38 */
     189    int32_t     mod_loadcnt;            /**< 3c */
     190                                             /* DIFF 3: 8 bytes added in v9 */
     191} SOL32v4_modctl_t;
     192AssertCompileSize(SOL32v4_modctl_t, 0x40);
     193
    168194typedef union SOL_modctl
    169195{
     196    SOL32v4_modctl_t    v4;
    170197    SOL32v9_modctl_t    v9_32;
    171198    SOL32v11_modctl_t   v11_32;
     
    963990        }
    964991
     992        /* v4 - 32bit only */
     993        {
     994            DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v4_modctl_t, mod_loadcnt));
     995            SOL32v4_modctl_t ModCtlv4;
     996            rc = DBGFR3MemRead(pVM, 0, &ModCtlAddr, &ModCtlv4, sizeof(ModCtlv4));
     997            if (RT_SUCCESS(rc))
     998            {
     999                if (    SOL32_VALID_ADDRESS(ModCtlv4.mod_next)
     1000                    &&  SOL32_VALID_ADDRESS(ModCtlv4.mod_prev)
     1001                    &&  ModCtlv4.mod_id == 0
     1002                    &&  SOL32_VALID_ADDRESS(ModCtlv4.mod_mp)
     1003                    &&  SOL32_VALID_ADDRESS(ModCtlv4.mod_filename)
     1004                    &&  SOL32_VALID_ADDRESS(ModCtlv4.mod_modname)
     1005                    &&  ModCtlv4.mod_requisites == 0
     1006                    &&  (ModCtlv4.mod_loadcnt == 1   || ModCtlv4.mod_loadcnt == 0) )
     1007                {
     1008                    char szUnix[5];
     1009                    DBGFADDRESS NameAddr;
     1010                    DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtlv4.mod_modname);
     1011                    rc = DBGFR3MemRead(pVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
     1012                    if (RT_SUCCESS(rc))
     1013                    {
     1014                        if (!strcmp(szUnix, "unix"))
     1015                        {
     1016                            pThis->AddrUnixModCtl = ModCtlAddr;
     1017                            pThis->iModCtlVer = 4;
     1018                            cbModCtl = sizeof(ModCtlv4);
     1019                            break;
     1020                        }
     1021                        Log(("sol32 mod_name=%.*s v4\n", sizeof(szUnix), szUnix));
     1022                    }
     1023                }
     1024            }
     1025        }
     1026
    9651027        /* next */
    9661028        DBGFR3AddrFromFlat(pVM, &CurAddr, HitAddr.FlatPtr + cbExpr);
     
    10391101
    10401102    /* 32-bit search range. */
    1041     DBGFR3AddrFromFlat(pVM, &Addr, 0xfe800000);
    1042     RTGCUINTPTR cbRange = 0xfec00000 - 0xfe800000;
     1103    DBGFR3AddrFromFlat(pVM, &Addr, 0xe0010000 /*0xfe800000*/);
     1104    RTGCUINTPTR cbRange = 4 * 1024 * 1024; // 0xfec00000 - 0xfe800000;
    10431105
    10441106    DBGFADDRESS HitAddr;
Note: See TracChangeset for help on using the changeset viewer.

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