From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12060 invoked by alias); 9 Oct 2013 13:23:59 -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 12050 invoked by uid 89); 9 Oct 2013 13:23:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.3 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, 09 Oct 2013 13:23:57 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r99DNsIx024506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Oct 2013 09:23:55 -0400 Received: from host2.jankratochvil.net (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r99DNnjb016057 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 9 Oct 2013 09:23:52 -0400 Date: Wed, 09 Oct 2013 13:23:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Doug Evans , gdb-patches@sourceware.org Subject: [commit] [patch] OBJF_NOT_FILENAME [Re: [RFC] Record objfile->original_name as an absolute path] Message-ID: <20131009132349.GA3031@host2.jankratochvil.net> References: <20130926084713.GA11031@host2.jankratochvil.net> <87siwqcayo.fsf@fleche.redhat.com> <20131008182301.GA27355@host2.jankratochvil.net> <87hacrfrev.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87hacrfrev.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00270.txt.bz2 On Tue, 08 Oct 2013 22:18:00 +0200, Tom Tromey wrote: > Jan> I will integrate it with add-ons to the Doug's patch. > > Thanks, Jan. > It looks good. Just one nit: Checked in, Doug's patch conflicts on top of it but I guess I will be the one updating the Doug's patch anyway. > Jan> +/* ORIGINAL_NAME and OBFD->FILENAME correspong to text description unrelated to > > Typo, "correspond". Fixed. Thanks, Jan https://sourceware.org/ml/gdb-cvs/2013-10/msg00054.html --- src/gdb/ChangeLog 2013/10/08 19:56:14 1.16084 +++ src/gdb/ChangeLog 2013/10/09 13:22:35 1.16085 @@ -1,3 +1,17 @@ +2013-10-09 Jan Kratochvil + + New flag OBJF_NOT_FILENAME. + * auto-load.c (auto_load_objfile_script): Check also OBJF_NOT_FILENAME. + * jit.c (jit_object_close_impl): Use OBJF_NOT_FILENAME for + allocate_objfile. + (jit_bfd_try_read_symtab): Use OBJF_NOT_FILENAME for + symbol_file_add_from_bfd. + * jv-lang.c (get_dynamics_objfile): Use OBJF_NOT_FILENAME for + allocate_objfile. + * objfiles.c (allocate_objfile): Assert OBJF_NOT_FILENAME if NAME is + NULL. + * objfiles.h (OBJF_NOT_FILENAME): New. + 2013-10-08 Tom Tromey * Makefile.in (SFILES): Add build-id.c. --- src/gdb/auto-load.c 2013/09/24 13:57:36 1.22 +++ src/gdb/auto-load.c 2013/10/09 13:22:35 1.23 @@ -840,7 +840,7 @@ void load_auto_scripts_for_objfile (struct objfile *objfile) { - if (!global_auto_load) + if (!global_auto_load || (objfile->flags & OBJF_NOT_FILENAME) != 0) return; if (auto_load_gdb_scripts) --- src/gdb/jit.c 2013/09/24 14:00:06 1.56 +++ src/gdb/jit.c 2013/10/09 13:22:36 1.57 @@ -785,7 +785,8 @@ priv_data = cb->priv_data; - objfile = allocate_objfile (NULL, "<< JIT compiled code >>", 0); + objfile = allocate_objfile (NULL, "<< JIT compiled code >>", + OBJF_NOT_FILENAME); objfile->per_bfd->gdbarch = target_gdbarch (); terminate_minimal_symbol_table (objfile); @@ -926,7 +927,7 @@ /* This call does not take ownership of SAI. */ make_cleanup_bfd_unref (nbfd); objfile = symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd), 0, sai, - OBJF_SHARED, NULL); + OBJF_SHARED | OBJF_NOT_FILENAME, NULL); do_cleanups (old_cleanups); add_objfile_entry (objfile, entry_addr); --- src/gdb/jv-lang.c 2013/09/24 14:00:06 1.112 +++ src/gdb/jv-lang.c 2013/10/09 13:22:36 1.113 @@ -118,7 +118,8 @@ /* Mark it as shared so that it is cleared when the inferior is re-run. */ - dynamics_objfile = allocate_objfile (NULL, NULL, OBJF_SHARED); + dynamics_objfile = allocate_objfile (NULL, NULL, + OBJF_SHARED | OBJF_NOT_FILENAME); dynamics_objfile->per_bfd->gdbarch = gdbarch; data = XCNEW (struct jv_per_objfile_data); --- src/gdb/objfiles.c 2013/10/07 19:40:38 1.170 +++ src/gdb/objfiles.c 2013/10/09 13:22:36 1.171 @@ -289,6 +289,7 @@ if (name == NULL) { gdb_assert (abfd == NULL); + gdb_assert ((flags & OBJF_NOT_FILENAME) != 0); name = "<>"; } objfile->original_name = obstack_copy0 (&objfile->objfile_obstack, name, --- src/gdb/objfiles.h 2013/10/07 19:40:38 1.114 +++ src/gdb/objfiles.h 2013/10/09 13:22:36 1.115 @@ -429,6 +429,11 @@ #define OBJF_MAINLINE (1 << 5) +/* ORIGINAL_NAME and OBFD->FILENAME correspond to text description unrelated to + filesystem names. It can be for example "". */ + +#define OBJF_NOT_FILENAME (1 << 6) + /* Declarations for functions defined in objfiles.c */ extern struct objfile *allocate_objfile (bfd *, const char *name, int);