Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: Re: [Cygwin] Fix for: detaching crashes the inferior.
Date: Tue, 10 Apr 2007 21:40:00 -0000	[thread overview]
Message-ID: <461C0415.6060404@portugalmail.pt> (raw)
In-Reply-To: <20070410051535.GA11134@ednor.casa.cgf.cx>

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]


>> Pedro Alves wrote:
>>
>> The current code uses delete_command to remove breakpoints, but
>> that leaves the internal breakpoints behind - not something
>> we want.  Is there a case where we can get to to_detach
>> without remove_breakpoints being called?  I don't think there
>> is - we always get here through normal_stop, right?
>> If there isn't, I'll just remove the call to it I'm
>> introducing in the patch.
>>     

Here is the updated patch that removes the call to delete_command.

OK?

Cheers,
Pedro Alves


[-- Attachment #2: win32_detach.diff --]
[-- Type: text/x-diff, Size: 857 bytes --]

2007-04-10  Pedro Alves  <pedro_alves@portugalmail.pt>

	* win32-nat.c (win32_detach): Remove delete_command call.
	Resume inferior with win32_resume instead of win32_continue.

---
 gdb/win32-nat.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: src/gdb/win32-nat.c
===================================================================
--- src.orig/gdb/win32-nat.c	2007-04-08 12:11:22.000000000 +0100
+++ src/gdb/win32-nat.c	2007-04-10 21:31:02.000000000 +0100
@@ -1775,8 +1775,9 @@ win32_detach (char *args, int from_tty)
 
   if (has_detach_ability ())
     {
-      delete_command (NULL, 0);
-      win32_continue (DBG_CONTINUE, -1);
+      ptid_t ptid = {-1};
+      win32_resume (ptid, 0, TARGET_SIGNAL_0);
+
       if (!DebugActiveProcessStop (current_event.dwProcessId))
 	{
 	  error (_("Can't detach process %lu (error %lu)"),

  parent reply	other threads:[~2007-04-10 21:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-08 11:37 Pedro Alves
2007-04-08 23:03 ` Pedro Alves
2007-04-09  2:08   ` Pedro Alves
2007-04-09  7:06     ` Eli Zaretskii
2007-04-10 10:33       ` Pedro Alves
2007-04-10 12:07         ` Daniel Jacobowitz
2007-04-10 18:35         ` Michael Snyder
2007-04-10 18:58         ` Eli Zaretskii
2007-04-10  5:15     ` Christopher Faylor
2007-04-10  9:31       ` Corinna Vinschen
2007-04-10 10:48         ` Pedro Alves
2007-04-10 10:45       ` Pedro Alves
2007-04-19 12:20         ` Christopher Faylor
2007-04-19 22:06           ` Pedro Alves
2007-04-10 21:40       ` Pedro Alves [this message]
2007-04-13 13:40         ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461C0415.6060404@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox