From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20045 invoked by alias); 11 Jun 2014 19:01:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20032 invoked by uid 89); 11 Jun 2014 19:01:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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 ESMTP; Wed, 11 Jun 2014 19:01:19 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BJ1H4g007310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Jun 2014 15:01:18 -0400 Received: from barimba (ovpn-113-103.phx2.redhat.com [10.3.113.103]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5BJ1GQv022728 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 11 Jun 2014 15:01:16 -0400 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] "$ gdb PROGRAM" vs "(gdb) file PROGRAM" difference; warn on failure to remove breakpoint. References: <1402323778-27849-1-git-send-email-palves@redhat.com> Date: Wed, 11 Jun 2014 19:01:00 -0000 In-Reply-To: <1402323778-27849-1-git-send-email-palves@redhat.com> (Pedro Alves's message of "Mon, 9 Jun 2014 15:22:58 +0100") Message-ID: <87mwdjuv7o.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-06/txt/msg00474.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Turns out there's a difference between loading the program with "gdb Pedro> PROGRAM", vs loading it with "(gdb) file PROGRAM". The latter results Pedro> in the objfile ending up with OBJF_USERLOADED set, while not with the Pedro> former. (That difference seems bogus, but still that's not the point Pedro> of this patch. We can revisit that afterwards.) [...] Pedro> 2014-06-09 Pedro Alves Pedro> * breakpoint.c (insert_bp_location, remove_breakpoint_1): Adjust. Pedro> (disable_breakpoints_in_freed_objfile): Skip objfiles that don't Pedro> have OBJF_SHARED set. Pedro> * objfiles.c (userloaded_objfile_contains_address_p): Rename to... Pedro> (shared_objfile_contains_address_p): ... this. Check OBJF_SHARED Pedro> instead of OBJF_USERLOADED. Pedro> * objfiles.h (OBJF_SHARED): Update comment. Pedro> (userloaded_objfile_contains_address_p): Rename to ... Pedro> (shared_objfile_contains_address_p): ... this, and update Pedro> comments. Pedro> * symfile.c (add_symbol_file_command): Also set OBJF_SHARED in the Pedro> new objfile. Pedro> (remove_symbol_file_command): Skip objfiles that don't have Pedro> OBJF_SHARED set. FWIW I read through this and it looks reasonable to me. Tom