From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21545 invoked by alias); 7 Jan 2003 01:53:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21537 invoked from network); 7 Jan 2003 01:53:54 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 7 Jan 2003 01:53:54 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h071Q8B32590 for ; Mon, 6 Jan 2003 20:26:08 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h071rha27838 for ; Mon, 6 Jan 2003 20:53:43 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h071rgn11152 for ; Mon, 6 Jan 2003 20:53:42 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id F28D1FF79; Mon, 6 Jan 2003 20:58:03 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15898.13355.611979.991969@localhost.redhat.com> Date: Tue, 07 Jan 2003 01:53:00 -0000 To: "Raoul Gough" Cc: gdb-patches@sources.redhat.com Subject: Re: coffread.c extension for DLLs without debugging symbols In-Reply-To: References: <2110-Sat04Jan2003130101+0200-eliz@is.elta.co.il> <15897.47288.570835.988631@localhost.redhat.com> X-SW-Source: 2003-01/txt/msg00257.txt.bz2 Raoul Gough writes: > "Elena Zannoni" wrote in message > news:15897.47288.570835.988631@localhost.redhat.com... > > I am including the plain text of the last version of the patch. > > I have noticed a few functions are using K&R style, please use ISO > C. > > Also the formatting for functions should be > > > > int > > foo (int par1, int par2) > > > > so that grep ^foo will work. > > OK, this is no problem. In fact the K&R style functions are straight > out of pe-dll.c from ld, and I think there are existing bfd_ functions > that do the same thing. I'll fix the code to use the bfd functions > (removing the K&R style functions) and also sort out the other > formatting issues as well. > thanks > > > > (sorry, I have to ask) Do you have a copyright assignment with the > FSF? > > No - I don't mind filling one out, though (at least I think I don't - > I haven't seen one yet :-). Can you email me one, please? > done, i think. > > > > As far as the new code being triggered, could you do it based on the > > existance of some particular section/data in the objfile? I see > that > > you bail out of read_pe_exported_syms if there are no exports, could > > something on the same flavour be done? (like using bfd_get_flavour, > > or bfd_get_section_by_name, etc) > > Not sure what you mean here - it currently uses both the pe_file flag > and bfd_get_target() to check whether to proceed with the processing. > I could also add a get_section_by_name(".edata") I guess. > Usually gdb triggers reading one debug format or another depending on the presence of certain sections names. So here, instead of looking at the target you can look at the existance of .edata. Look at elfread.c and how it finds which debug format is used. It is not using get_section_by_name(), but the idea is similar. > > > > About location of the code, add maybe a coff-pe-read.c? (ulgh) But > > since it deals with reading symbols, I would think it more logical > to > > stay in some object/debug format related file rather than in a > target > > related file. > > I agree - there will still have to be a hook in coffread to call the > new function, though. Does this also mean changing the config somehow > to make it compile the new module under the right circumstances? Any > advice on doing this? > No, I just meant that the functions to manipulate these symbols could be moved into their own file. Gdb always includes all the debug/objfile readers in each build, so no need to tweak configure. Elena