Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Delete program spaces directly when removing inferiors
Date: Wed, 08 Jul 2015 18:51:00 -0000	[thread overview]
Message-ID: <559D7113.5000809@redhat.com> (raw)
In-Reply-To: <559D6E89.5040709@ericsson.com>

On 07/08/2015 07:40 PM, Simon Marchi wrote:
> On 15-07-08 02:17 PM, Pedro Alves wrote:
>> Hmm, I think it'll fix a bug, actually.  There should always
>> be an inferior.  And that deletes it.  So I assume
>> that after closing the monitor target, GDB crashes as soon as
>> it refers to the current inferior...
>>
>> In the original multi-process support (~7.0), that was not the
>> case -- if you were not debugging a process, there's be
>> no inferior.  Seems like this code has bit rotten.
> 
> Ok, I had this intuition as well (about deleting the last inferior).
> 
>> I guess this suggests that no one's been using these monitor
>> targets for a long while?
> 
> Or they don't mind/notice that it crashes at exit.
> 
>>>
>>> Is there any way to test that code path relatively easily on x86?
>>>
>>
>> Don't think so.  You could stick a:
>>
>>   delete_inferior_silent (ptid_get_pid (monitor_ptid));
>>
>> call in remote.c:remote_close and see what happens there though.
> 
> I tried something similar (monitor_ptid is not available there), and
> bad things happen indeed.
> 
> I'll try to update my patch to use discard_all_inferiors, but it will
> be a "theoretical" fix, since there's no way to test.

The patch is preapproved.  Meanwhile I sent a mail to gdb@ about
deleting monitor.c and friends.

Thanks,
Pedro Alves


  reply	other threads:[~2015-07-08 18:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 20:33 Simon Marchi
2014-10-20 17:46 ` Simon Marchi
2014-12-01 13:25   ` Simon Marchi
2015-07-06 17:46     ` Simon Marchi
2015-07-08 12:05 ` Pedro Alves
2015-07-08 15:34   ` Simon Marchi
2015-07-08 15:43     ` Simon Marchi
2015-07-08 15:59       ` Pedro Alves
2015-07-08 18:10         ` Simon Marchi
2015-07-08 18:17           ` Pedro Alves
2015-07-08 18:40             ` Simon Marchi
2015-07-08 18:51               ` Pedro Alves [this message]
2015-07-08 19:44                 ` Simon Marchi
2015-07-08 19:49                   ` Simon Marchi

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=559D7113.5000809@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    /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