Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
kdlibcpp
kdlibcpp
Commits
b1e208b5
Commit
b1e208b5
authored
Mar 20, 2020
by
ussrhero
Browse files
fixed closeDump routine affected some tests
parent
e1bceada
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
kdlib/source/net/net.cpp
kdlib/source/net/net.cpp
+12
-4
kdlib/source/win/dbgeng.cpp
kdlib/source/win/dbgeng.cpp
+3
-3
No files found.
kdlib/source/net/net.cpp
View file @
b1e208b5
...
...
@@ -187,9 +187,13 @@ DebugCallbackResult ClrDebugManagerImpl::onProcessStart(PROCESS_DEBUG_ID process
{
boost
::
recursive_mutex
::
scoped_lock
lock
(
m_processLock
);
PROCESS_ID
pid
=
TargetProcess
::
getById
(
processid
)
->
getSystemId
()
;
auto
process
=
TargetProcess
::
getById
(
processid
);
m_processMap
[
pid
]
=
0
;
if
(
!
process
->
isKernelDebugging
())
{
PROCESS_ID
pid
=
TargetProcess
::
getById
(
processid
)
->
getSystemId
();
m_processMap
[
pid
]
=
0
;
}
return
DebugCallbackNoChange
;
}
...
...
@@ -198,9 +202,13 @@ DebugCallbackResult ClrDebugManagerImpl::onProcessStart(PROCESS_DEBUG_ID process
DebugCallbackResult
ClrDebugManagerImpl
::
onProcessExit
(
PROCESS_DEBUG_ID
processid
,
ProcessExitReason
reason
,
unsigned
long
exitCode
)
{
PROCESS_ID
pid
=
TargetProcess
::
getById
(
processid
)
->
getSystemId
()
;
auto
process
=
TargetProcess
::
getById
(
processid
);
m_processMap
.
erase
(
pid
);
if
(
!
process
->
isKernelDebugging
())
{
PROCESS_ID
pid
=
TargetProcess
::
getById
(
processid
)
->
getSystemId
();
m_processMap
.
erase
(
pid
);
}
return
DebugCallbackNoChange
;
}
...
...
kdlib/source/win/dbgeng.cpp
View file @
b1e208b5
...
...
@@ -403,7 +403,7 @@ PROCESS_DEBUG_ID loadDump( const std::wstring &fileName )
if
(
FAILED
(
hres
)
)
throw
DbgEngException
(
L"IDebugSystemObjects::GetCurrentProcessId"
,
hres
);
//
ProcessMonitor::processStart(processId);
ProcessMonitor
::
processStart
(
processId
);
return
processId
;
}
...
...
@@ -422,12 +422,12 @@ void closeDump( PROCESS_DEBUG_ID processId )
throw
DbgEngException
(
L"IDebugSystemObjects::SetCurrentProcessId"
,
hres
);
}
ProcessMonitor
::
processStop
(
processId
,
ProcessDetach
,
0
);
hres
=
g_dbgMgr
->
client
->
TerminateCurrentProcess
();
if
(
FAILED
(
hres
)
)
throw
DbgEngException
(
L"IDebugClient::TerminateCurrentProcess"
,
hres
);
// ProcessMonitor::processStop(processId, ProcessDetach, 0);
if
(
ProcessMonitor
::
getNumberProcesses
()
==
0
)
g_dbgMgr
->
ChangeEngineState
(
DEBUG_CES_EXECUTION_STATUS
,
DEBUG_STATUS_NO_DEBUGGEE
);
...
...
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