Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
5f6f98da
Commit
5f6f98da
authored
Nov 26, 2010
by
Arvid Ephraim Picciani
Browse files
lldb: remove runlock
preventing access to functions while inferior is running, is the job of the gui
parent
d366546a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/lldb/guest/lldbengineguest.cpp
View file @
5f6f98da
...
...
@@ -61,8 +61,7 @@
.arg(QLatin1String(Q_FUNC_INFO))); \
qDebug("%s", Q_FUNC_INFO)
#define SYNC_INFERIOR QMutexLocker locker(&m_runLock)
#define SYNC_INFERIOR_OR(x) if (!m_runLock.tryLock()) { x; } else { m_runLock.unlock(); }; SYNC_INFERIOR
#define SYNC_INFERIOR_OR(x) if (m_running) { x; }
namespace
Debugger
{
...
...
@@ -79,7 +78,6 @@ void LldbEventListener::listen(lldb::SBListener *listener)
LldbEngineGuest
::
LldbEngineGuest
()
:
IPCEngineGuest
()
,
m_runLock
(
QMutex
::
Recursive
)
,
m_running
(
false
)
,
m_worker
(
new
LldbEventListener
)
,
m_lldb
(
new
lldb
::
SBDebugger
)
...
...
@@ -304,7 +302,8 @@ void LldbEngineGuest::executeJumpToLine(const QString &fileName, int lineNumber)
void
LldbEngineGuest
::
activateFrame
(
qint64
token
)
{
DEBUG_FUNC_ENTER
;
SYNC_INFERIOR
;
SYNC_INFERIOR_OR
(
showMessage
(
QLatin1String
(
"activateFrame called while inferior running"
));
return
);
currentFrameChanged
(
token
);
m_localesCache
.
clear
();
...
...
@@ -658,7 +657,6 @@ void LldbEngineGuest::lldbEvent(lldb::SBEvent *ev)
switch
(
m_process
->
GetState
())
{
case
lldb
::
eStateRunning
:
// 5
if
(
!
m_running
)
{
m_runLock
.
lock
();
m_running
=
true
;
}
notifyInferiorPid
(
m_process
->
GetProcessID
());
...
...
@@ -679,7 +677,6 @@ void LldbEngineGuest::lldbEvent(lldb::SBEvent *ev)
break
;
case
lldb
::
eStateExited
:
// 9
if
(
m_running
)
{
m_runLock
.
unlock
();
m_running
=
false
;
}
switch
(
state
())
{
...
...
@@ -700,7 +697,6 @@ void LldbEngineGuest::lldbEvent(lldb::SBEvent *ev)
break
;
case
lldb
::
eStateStopped
:
// 4
if
(
m_running
)
{
m_runLock
.
unlock
();
m_running
=
false
;
}
switch
(
state
())
{
...
...
@@ -720,7 +716,6 @@ void LldbEngineGuest::lldbEvent(lldb::SBEvent *ev)
break
;
case
lldb
::
eStateCrashed
:
// 7
if
(
m_running
)
{
m_runLock
.
unlock
();
m_running
=
false
;
}
switch
(
state
())
{
...
...
src/plugins/debugger/lldb/guest/lldbengineguest.h
View file @
5f6f98da
...
...
@@ -35,7 +35,6 @@
#include
<QtCore/QQueue>
#include
<QtCore/QVariant>
#include
<QtCore/QThread>
#include
<QtCore/QMutex>
#include
<QtCore/QStringList>
#include
<lldb/API/LLDB.h>
...
...
@@ -99,7 +98,6 @@ public:
const
WatchUpdateFlags
&
flags
);
private:
QMutex
m_runLock
;
bool
m_running
;
QList
<
QByteArray
>
m_arguments
;
...
...
@@ -133,3 +131,4 @@ private slots:
}
// namespace Debugger
#endif // DEBUGGER_LLDBENGINE_H
#define SYNC_INFERIOR
src/plugins/debugger/lldb/lldbenginehost.cpp
View file @
5f6f98da
...
...
@@ -96,6 +96,7 @@ LldbEngineHost::LldbEngineHost(const DebuggerStartParameters &startParameters)
LldbEngineHost
::~
LldbEngineHost
()
{
showMessage
(
QLatin1String
(
"tear down qtcreator-lldb"
));
disconnect
(
m_guestProcess
,
SIGNAL
(
finished
(
int
,
QProcess
::
ExitStatus
)),
this
,
SLOT
(
finished
(
int
,
QProcess
::
ExitStatus
)));
m_guestProcess
->
terminate
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment