From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7629 invoked by alias); 17 Sep 2002 02:51:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7615 invoked from network); 17 Sep 2002 02:51:26 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 17 Sep 2002 02:51:26 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8H2YQd26845; Mon, 16 Sep 2002 22:34:27 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8H2pId25544; Mon, 16 Sep 2002 22:51:24 -0400 Received: from dot.sfbay.redhat.com (dot.sfbay.redhat.com [172.16.24.7]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8H2pIC17229; Mon, 16 Sep 2002 19:51:18 -0700 Received: (from rth@localhost) by dot.sfbay.redhat.com (8.11.6/8.11.6) id g8H2pHA19587; Mon, 16 Sep 2002 19:51:17 -0700 X-Authentication-Warning: dot.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Mon, 16 Sep 2002 19:51:00 -0000 From: Richard Henderson To: Elias Athanasopoulos Cc: Pierre Habraken , binutils@sources.redhat.com, gdb@sources.redhat.com, Richard.Earnshaw@arm.com Subject: Re: [PATCH] Re: Section .debug_info in object file Message-ID: <20020917025117.GG19508@redhat.com> References: <3D806189.7A45FCBA@imag.fr> <20020912220303.A1134@neutrino.particles.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020912220303.A1134@neutrino.particles.org> User-Agent: Mutt/1.4i X-SW-Source: 2002-09/txt/msg00214.txt.bz2 On Thu, Sep 12, 2002 at 10:03:03PM +0300, Elias Athanasopoulos wrote: > * dwarf2dbg.c (out_debug_abbrev): Add support for the DW_AT_name field. > (out_debug_info): Likewise. I committed the following variant. r~ Index: dwarf2dbg.c =================================================================== RCS file: /cvs/src/src/gas/dwarf2dbg.c,v retrieving revision 1.53 diff -c -p -d -r1.53 dwarf2dbg.c *** dwarf2dbg.c 27 Aug 2002 11:09:42 -0000 1.53 --- dwarf2dbg.c 17 Sep 2002 02:32:00 -0000 *************** out_debug_abbrev (abbrev_seg) *** 1149,1154 **** --- 1149,1155 ---- out_abbrev (DW_AT_low_pc, DW_FORM_addr); out_abbrev (DW_AT_high_pc, DW_FORM_addr); } + out_abbrev (DW_AT_name, DW_FORM_string); out_abbrev (DW_AT_comp_dir, DW_FORM_string); out_abbrev (DW_AT_producer, DW_FORM_string); out_abbrev (DW_AT_language, DW_FORM_data2); *************** out_debug_info (info_seg, abbrev_seg, li *** 1223,1228 **** --- 1224,1239 ---- expr.X_add_number = 0; emit_expr (&expr, sizeof_address); } + + /* DW_AT_name. We don't have the actual file name that was present + on the command line, so assume files[1] is the main input file. + We're not supposed to get called unless at least one line number + entry was emitted, so this should always be defined. */ + if (!files || files_in_use < 1) + abort (); + len = strlen (files[1].filename) + 1; + p = frag_more (len); + memcpy (p, files[1].filename, len); /* DW_AT_comp_dir */ comp_dir = getpwd ();