VirtualBox

Changeset 19191 in vbox


Ignore:
Timestamp:
Apr 26, 2009 5:31:59 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46517
Message:

Fe/Qt: Make it possible open the debugger window(s) and start the vm automatically. Hacked around resize issue when opening the debugger automatically or starting the vm paused (really ugly).

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r19184 r19191  
    296296    bool isDebuggerAutoShowStatisticsEnabled() const { return mDbgAutoShowStatistics; }
    297297    RTLDRMOD getDebuggerModule() const { return mhVBoxDbg; }
     298
     299    bool isStartPausedEnabled() const { return mStartPaused; }
    298300#else
    299301    bool isDebuggerAutoShowEnabled() const { return false; }
    300302    bool isDebuggerAutoShowCommandLineEnabled() const { return false; }
    301303    bool isDebuggerAutoShowStatisticsEnabled() const { return false; }
     304
     305    bool isStartPausedEnabled() const { false; }
    302306#endif
    303307
     
    875879    /** VBoxDbg module handle. */
    876880    RTLDRMOD mhVBoxDbg;
     881
     882    /** Whether to start the VM in paused state or not. */
     883    bool mStartPaused;
    877884#endif
    878885
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r19134 r19191  
    977977QSize VBoxConsoleView::sizeHint() const
    978978{
     979#ifdef VBOX_WITH_DEBUGGER /** @todo figure out a more proper fix. */
     980    /* HACK ALERT! Really ugly workaround for the resizing to 9x1 done
     981     *             by DevVGA if provoked before power on.  */
     982    QSize fb(mFrameBuf->width(), mFrameBuf->height());
     983    if (    (   fb.width()  < 16
     984             || fb.height() < 16)
     985        &&  (   vboxGlobal().isStartPausedEnabled()
     986             || vboxGlobal().isDebuggerAutoShowEnabled()) )
     987        fb = QSize(640, 480);
     988    return QSize (fb.width() + frameWidth() * 2,
     989                  fb.height() + frameWidth() * 2);
     990#else
    979991    return QSize (mFrameBuf->width() + frameWidth() * 2,
    980992                  mFrameBuf->height() + frameWidth() * 2);
     993#endif
    981994}
    982995
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r19184 r19191  
    999999
    10001000    /* start the VM */
    1001     CProgress progress = vboxGlobal().isDebuggerAutoShowEnabled()
     1001    CProgress progress =    vboxGlobal().isStartPausedEnabled()
     1002                         || vboxGlobal().isDebuggerAutoShowEnabled()
    10021003                       ? cconsole.PowerUpPaused()
    10031004                       : cconsole.PowerUp();
     
    10791080        if (vboxGlobal().isDebuggerAutoShowCommandLineEnabled())
    10801081            dbgShowCommandLine();
     1082
     1083        if (!vboxGlobal().isStartPausedEnabled())
     1084            console->pause (false);
    10811085    }
    10821086#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r19184 r19191  
    53495349    mDbgAutoShow = mDbgAutoShowCommandLine = mDbgAutoShowStatistics
    53505350        = RTEnvExist("VBOX_GUI_DBG_AUTO_SHOW");
     5351    mStartPaused = false;
    53515352#endif
    53525353
     
    54065407            mDbgEnabled = true;
    54075408            mDbgAutoShow = mDbgAutoShowCommandLine = mDbgAutoShowStatistics = true;
     5409            mStartPaused = true;
    54085410        }
    54095411        else if (!::strcmp (arg, "--debug-command-line"))
     
    54115413            mDbgEnabled = true;
    54125414            mDbgAutoShow = mDbgAutoShowCommandLine = true;
     5415            mStartPaused = true;
    54135416        }
    54145417        else if (!::strcmp (arg, "--debug-statistics"))
     
    54165419            mDbgEnabled = true;
    54175420            mDbgAutoShow = mDbgAutoShowStatistics = true;
     5421            mStartPaused = true;
    54185422        }
    54195423        else if (!::strcmp (arg, "-no-debug") || !::strcmp (arg, "--no-debug"))
     
    54235427            mDbgAutoShowCommandLine = false;
    54245428            mDbgAutoShowStatistics = false;
     5429        }
     5430        /* Not quite debug options, but they're only useful with the debugger bits. */
     5431        else if (!::strcmp (arg, "--start-paused"))
     5432        {
     5433            mStartPaused = true;
     5434        }
     5435        else if (!::strcmp (arg, "--start-running"))
     5436        {
     5437            mStartPaused = false;
    54255438        }
    54265439#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r19184 r19191  
    241241            "  --debug-statistics         like --dbg and show statistics window at VM startup\n"
    242242            "  --no-debug                 disable the GUI debug menu and debug windows\n"
     243            "  --start-paused             start the VM in the paused state\n"
     244            "  --start-running            start the VM running (for overriding --debug*)\n"
    243245            "\n"
    244246            "The following environment variables are evaluated:\n"
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