From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115677 invoked by alias); 30 Apr 2015 10:53:55 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 115659 invoked by uid 89); 30 Apr 2015 10:53:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 30 Apr 2015 10:53:54 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 5A429AC7A5 for ; Thu, 30 Apr 2015 10:53:53 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3UArnRm024625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 30 Apr 2015 06:53:52 -0400 Date: Thu, 30 Apr 2015 10:53:00 -0000 From: Jan Kratochvil To: Phil Muldoon Cc: gdb@sourceware.org Subject: Re: compile: objfiles lifetime UI Message-ID: <20150430105349.GA6260@host1.jankratochvil.net> References: <20150429135735.GA16974@host1.jankratochvil.net> <55420463.10400@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55420463.10400@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00054.txt.bz2 On Thu, 30 Apr 2015 12:30:59 +0200, Phil Muldoon wrote: > I'm not sure we need a UI at all? I suppose I am trying to think of a > reason why the user would want to manage an object's life-cycle, and > not let GDB dispose of it according to the following rules: > > * Object files involved in an expression should be discarded after > the expression evaluation; > > * Object files created by the "compile code" command should be > discarded after the execution of the injected code; > > * Object files created by "fast" breakpoints (where the evaluation > of whether the inferior should be stopped is determined by the > return value of an injected piece of code) should be deleted > when the breakpoint is deleted. > > Of the three examples above, only the last requires the object file to > be held for an indefinite time. Note I am not against a user interface, > I just want to envision when a user would need to use it. What about that 2nd case example of: (gdb) compile code str = "bar"; That can be also typed as the 1st case: (gdb) compile print str = "bar" Obviously "bar" remains the GDB-mmap()ed memory. For C++ one will be able to similarly assign whole new objects residing in the GDB-mmap()ed memory. This is all a light variant of the possible far future feature "fix&continue", that one tries to modify the inferior's behavior some way and continue its execution. Jan