mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
Remove dead code from windows_nat_target::detach
windows_nat_target::detach has a variable 'detached' that is only set after a call to 'error'. However, this can't happen because 'error' throws an exception. This patch removes the dead code.
This commit is contained in:
@ -1912,21 +1912,15 @@ windows_nat_target::attach (const char *args, int from_tty)
|
|||||||
void
|
void
|
||||||
windows_nat_target::detach (inferior *inf, int from_tty)
|
windows_nat_target::detach (inferior *inf, int from_tty)
|
||||||
{
|
{
|
||||||
int detached = 1;
|
|
||||||
|
|
||||||
ptid_t ptid = minus_one_ptid;
|
ptid_t ptid = minus_one_ptid;
|
||||||
resume (ptid, 0, GDB_SIGNAL_0);
|
resume (ptid, 0, GDB_SIGNAL_0);
|
||||||
|
|
||||||
if (!DebugActiveProcessStop (windows_process.current_event.dwProcessId))
|
if (!DebugActiveProcessStop (windows_process.current_event.dwProcessId))
|
||||||
{
|
|
||||||
error (_("Can't detach process %u (error %u)"),
|
error (_("Can't detach process %u (error %u)"),
|
||||||
(unsigned) windows_process.current_event.dwProcessId,
|
(unsigned) windows_process.current_event.dwProcessId,
|
||||||
(unsigned) GetLastError ());
|
(unsigned) GetLastError ());
|
||||||
detached = 0;
|
|
||||||
}
|
|
||||||
DebugSetProcessKillOnExit (FALSE);
|
DebugSetProcessKillOnExit (FALSE);
|
||||||
|
|
||||||
if (detached)
|
|
||||||
target_announce_detach (from_tty);
|
target_announce_detach (from_tty);
|
||||||
|
|
||||||
x86_cleanup_dregs ();
|
x86_cleanup_dregs ();
|
||||||
|
Reference in New Issue
Block a user