Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
70f696d0
Commit
70f696d0
authored
Oct 13, 2009
by
Oswald Buddenhagen
Browse files
-gdb-exit has a special return code as well
parent
98b477fc
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/attachgdbadapter.cpp
View file @
70f696d0
...
...
@@ -130,7 +130,7 @@ void AttachGdbAdapter::shutdown()
case
InferiorShutDown
:
setState
(
AdapterShuttingDown
);
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
CB
(
handleExit
));
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
GdbEngine
::
ExitRequest
,
CB
(
handleExit
));
return
;
default:
...
...
src/plugins/debugger/gdb/coregdbadapter.cpp
View file @
70f696d0
...
...
@@ -192,7 +192,7 @@ void CoreGdbAdapter::shutdown()
case
InferiorUnrunnable
:
case
InferiorShutDown
:
setState
(
AdapterShuttingDown
);
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
CB
(
handleExit
));
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
GdbEngine
::
ExitRequest
,
CB
(
handleExit
));
return
;
default:
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
70f696d0
...
...
@@ -803,10 +803,12 @@ void GdbEngine::handleResultRecord(const GdbResponse &response)
responseWithCookie
.
cookie
=
cmd
.
cookie
;
if
(
response
.
resultClass
!=
GdbResultError
&&
response
.
resultClass
!=
((
cmd
.
flags
&
RunRequest
)
?
GdbResultRunning
:
GdbResultDone
))
{
debugMessage
(
_
(
"UNEXPECTED RESPONSE %1 TO COMMAND %2"
)
.
arg
(
_
(
GdbResponse
::
stringFromResultClass
(
response
.
resultClass
)))
.
arg
(
cmd
.
command
));
response
.
resultClass
!=
((
cmd
.
flags
&
RunRequest
)
?
GdbResultRunning
:
(
cmd
.
flags
&
ExitRequest
)
?
GdbResultExit
:
GdbResultDone
))
{
QString
rsp
=
_
(
GdbResponse
::
stringFromResultClass
(
response
.
resultClass
));
qWarning
()
<<
"UNEXPECTED RESPONSE "
<<
rsp
<<
" TO COMMAND"
<<
cmd
.
command
<<
" AT "
__FILE__
":"
STRINGIFY
(
__LINE__
);
debugMessage
(
_
(
"UNEXPECTED RESPONSE %1 TO COMMAND %2"
).
arg
(
rsp
).
arg
(
cmd
.
command
));
}
else
{
if
(
cmd
.
callback
)
(
this
->*
cmd
.
callback
)(
responseWithCookie
);
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
70f696d0
...
...
@@ -177,7 +177,8 @@ public: // otherwise the Qt flag macros are unhappy
RebuildModel
=
4
,
// Trigger model rebuild when no such commands are pending any more
WatchUpdate
=
Discardable
|
RebuildModel
,
EmbedToken
=
8
,
// Expand %1 in the command to the command token
RunRequest
=
16
// Callback expect GdbResultRunning instead of GdbResultDone
RunRequest
=
16
,
// Callback expect GdbResultRunning instead of GdbResultDone
ExitRequest
=
32
// Callback expect GdbResultExit instead of GdbResultDone
};
Q_DECLARE_FLAGS
(
GdbCommandFlags
,
GdbCommandFlag
)
...
...
src/plugins/debugger/gdb/plaingdbadapter.cpp
View file @
70f696d0
...
...
@@ -177,7 +177,7 @@ void PlainGdbAdapter::shutdown()
case
InferiorShutDown
:
setState
(
AdapterShuttingDown
);
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
CB
(
handleExit
));
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
GdbEngine
::
ExitRequest
,
CB
(
handleExit
));
return
;
/*
...
...
@@ -192,7 +192,7 @@ void PlainGdbAdapter::shutdown()
.arg(state()));
m_gdbProc.kill();
}
m_engine->postCommand(_("-gdb-exit"), CB(handleExit));
m_engine->postCommand(_("-gdb-exit"),
GdbEngine::ExitRequest,
CB(handleExit));
return;
*/
default:
...
...
src/plugins/debugger/gdb/remotegdbadapter.cpp
View file @
70f696d0
...
...
@@ -248,7 +248,7 @@ void RemoteGdbAdapter::shutdown()
case
InferiorStartFailed
:
case
InferiorShutDown
:
setState
(
AdapterShuttingDown
);
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
CB
(
handleExit
));
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
GdbEngine
::
ExitRequest
,
CB
(
handleExit
));
return
;
}
...
...
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
70f696d0
...
...
@@ -2015,7 +2015,7 @@ void TrkGdbAdapter::shutdown()
case
InferiorShutDown
:
setState
(
AdapterShuttingDown
);
cleanup
();
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
CB
(
handleExit
));
m_engine
->
postCommand
(
_
(
"-gdb-exit"
),
GdbEngine
::
ExitRequest
,
CB
(
handleExit
));
return
;
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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