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
c1ddd714
Commit
c1ddd714
authored
Jul 28, 2009
by
Friedemann Kleint
Browse files
CDB: Start up correctly if no working directory is specified.
parent
3629e091
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/cdb/cdbdebugengine.cpp
View file @
c1ddd714
...
...
@@ -635,7 +635,12 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *
imagePath
+=
QLatin1Char
(
';'
);
imagePath
+=
m_d
->
m_baseImagePath
;
}
m_d
->
m_cif
.
debugSymbols
->
SetImagePathWide
(
reinterpret_cast
<
PCWSTR
>
(
imagePath
.
utf16
()));
HRESULT
hr
=
m_d
->
m_cif
.
debugSymbols
->
SetImagePathWide
(
reinterpret_cast
<
PCWSTR
>
(
imagePath
.
utf16
()));
if
(
FAILED
(
hr
))
{
*
errorMessage
=
tr
(
"Unable to set the image path to %1: %2"
).
arg
(
imagePath
,
msgComFailed
(
"SetImagePathWide"
,
hr
));
return
false
;
}
if
(
debugCDB
)
qDebug
()
<<
Q_FUNC_INFO
<<
'\n'
<<
filename
<<
imagePath
;
...
...
@@ -653,12 +658,15 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *
envData
=
Core
::
Utils
::
AbstractProcess
::
createWinEnvironment
(
Core
::
Utils
::
AbstractProcess
::
fixWinEnvironment
(
sp
->
environment
));
env
=
reinterpret_cast
<
PCWSTR
>
(
envData
.
data
());
}
const
HRESULT
hr
=
m_d
->
m_cif
.
debugClient
->
CreateProcess2Wide
(
NULL
,
reinterpret_cast
<
PWSTR
>
(
const_cast
<
ushort
*>
(
cmd
.
utf16
())),
&
dbgopts
,
sizeof
(
dbgopts
),
reinterpret_cast
<
PCWSTR
>
(
sp
->
workingDir
.
utf16
()),
env
);
// The working directory cannot be empty.
PCWSTR
workingDirC
=
0
;
const
QString
workingDir
=
sp
->
workingDir
.
isEmpty
()
?
QString
()
:
QDir
::
toNativeSeparators
(
sp
->
workingDir
);
if
(
!
workingDir
.
isEmpty
())
workingDirC
=
workingDir
.
utf16
();
hr
=
m_d
->
m_cif
.
debugClient
->
CreateProcess2Wide
(
NULL
,
reinterpret_cast
<
PWSTR
>
(
const_cast
<
ushort
*>
(
cmd
.
utf16
())),
&
dbgopts
,
sizeof
(
dbgopts
),
workingDirC
,
env
);
if
(
FAILED
(
hr
))
{
*
errorMessage
=
tr
(
"Unable to create a process '%1': %2"
).
arg
(
cmd
,
msgDebugEngineComResult
(
hr
));
m_d
->
m_debuggerManagerAccess
->
notifyInferiorExited
();
...
...
Write
Preview
Supports
Markdown
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