VBoxDbgConsole.cpp revision 20e679981773e64a87a10aef7107d697712dffbc
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * VBox Debugger GUI - Console.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Copyright (C) 2006-2014 Oracle Corporation
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * available from http://www.virtualbox.org. This file is free software;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * you can redistribute it and/or modify it under the terms of the GNU
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * General Public License (GPL) as published by the Free Software
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*******************************************************************************
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync* Header Files *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync*******************************************************************************/
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * V B o x D b g C o n s o l e O u t p u t
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * V B o x D b g C o n s o l e O u t p u t
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * V B o x D b g C o n s o l e O u t p u t
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncVBoxDbgConsoleOutput::VBoxDbgConsoleOutput(QWidget *pParent/* = NULL*/, const char *pszName/* = NULL*/)
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync : QTextEdit(pParent), m_uCurLine(0), m_uCurPos(0), m_hGUIThread(RTThreadNativeSelf())
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync setTextInteractionFlags(Qt::TextBrowserInteraction);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Create actions for font menu items.
delete pMenu;
#ifdef Q_WS_MAC
VBoxDbgConsoleInput::VBoxDbgConsoleInput(QWidget *pParent/* = NULL*/, const char *pszName/* = NULL*/)
setEditable(true);
setAutoCompletion(false);
if (pEdit)
bool fNeedsAppending = true;
if (iLastItem > 0)
fNeedsAppending = false;
if (fNeedsAppending)
removeItem(0);
--iLastItem;
: VBoxDbgBaseWindow(a_pDbgGui, a_pParent), m_pOutput(NULL), m_pInput(NULL), m_fInputRestoreFocus(false),
QLabel *pLabel = new QLabel( "11111111111111111111111111111111111111111111111111111111111111111111111111111112222222222", this);
delete pLabel;
connect(m_pInput, SIGNAL(commandSubmitted(const QString &)), this, SLOT(commandSubmitted(const QString &)));
rc = RTThreadCreate(&m_Thread, backThread, this, 0, RTTHREADTYPE_DEBUGGER, RTTHREADFLAGS_WAITABLE, "VBoxDbgC");
delete m_pTimer;
m_EventSem = 0;
if (m_pszInputBuf)
m_cbInputBuf = 0;
m_cbInputBufAlloc = 0;
delete m_pFocusToInput;
delete m_pFocusToOutput;
lock();
if (!pv)
unlock();
Log(("VBoxDbgConsole::commandSubmitted: %s (input-enabled=%RTbool)\n", psz, m_pInput->isEnabled()));
unlock();
lock();
m_fUpdatePending = false;
if (m_cbOutputBuf)
m_pOutput->appendText(QString::fromUtf8((const char *)m_pszOutputBuf, (int)m_cbOutputBuf), false /*fClearSelection*/);
m_cbOutputBuf = 0;
unlock();
bool fRc = true;
return fRc;
if (pcbRead)
*pcbRead = 0;
if (*psz)
return rc;
if (!pv)
if (pcbWritten)
*pcbWritten = 0;
return VERR_NO_MEMORY;
if (pcbWritten)
return rc;
if (fReady)
* @param pvUser Pointer to the VBoxDbgConsole object.s
LogFlow(("backThread: returns %Rrc (m_fTerminate=%RTbool)\n", rc, ASMAtomicUoReadBool(&pThis->m_fTerminate)));
return rc;
lock();
if (!m_fUpdatePending)
m_fUpdatePending = true;
unlock();
if ( m_fInputRestoreFocus
m_fInputRestoreFocus = false;
close();
if (m_fThreadTerminated)