This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Cygwin] Fix for: detaching crashes the inferior.


On Mon, Apr 09, 2007 at 03:06:20AM +0100, Pedro Alves wrote:
>Pedro Alves wrote:
>>Pedro Alves wrote:
>>>Hi all,
>>>
>>>Detaching on Cygwin often crashes the inferior, either
>>>when gdb attaches to the inferior, or when gdb launches
>>>the inferior as a child.
>>>
>
>Here is a new version.
>
>The real reason for the crashes is that we should be setting
>the context back to the inferior, as gdb's copy contains
>an adjusted PC.  With win32_continue we would resume the
>inferior at the wrong address.  win32_resume takes care of
>that, so the simple fix is to use it when detaching.
>
>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.

Are you sure you aren't seeing problems when you attach/detach more than
once?  I know that there is someplace that isn't getting cleared in that
scenario.  I have thought that I fixed that problem a few times but it
still seems to be there in the latest cygwin release.

Anyway, I'd like Corinna to comment on this if possible since that
particular piece of code that you're patching is hers, I believe.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]