From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14155 invoked by alias); 17 Dec 2014 19:37:47 -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 14139 invoked by uid 89); 17 Dec 2014 19:37:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-vc0-f170.google.com Received: from mail-vc0-f170.google.com (HELO mail-vc0-f170.google.com) (209.85.220.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 17 Dec 2014 19:37:44 +0000 Received: by mail-vc0-f170.google.com with SMTP id hy4so7490108vcb.1 for ; Wed, 17 Dec 2014 11:37:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1Aq0qJW9zU7tbruLGth69Jwi55WJ8Y94FKa4rr3xOd4=; b=cPBvOQwn58iAT3FEb2OV21j+bAoUQrJeQF/HsrAg8Qglmsz1+tqUiOjwUto3B2EOKq pcTdexVgl1p1kYdvW2fk0AwLiyz16mfwragrQgDDKd4MhrDP9eIdtYUU8vtkjm8RUxZn zBkGUyC0aO1vU6tkq6n+JxoRXf6S2ECbGcG1DYyNrcpJ56/2+3vUeMJDb3o5CJzUhrW/ cE8JAUZqnwlE3I9wKgfprUWwknlyJErc/jRcujjsgGcHWqjQAzY4NHx7j+CLjEFKd8fS 2k8vVj0U5Z1dkC+2HORjptQihz1hNumW4GPCIaTxLJkBilmA6g0Eu01Y+ZmOaEMW6MEv locQ== X-Gm-Message-State: ALoCoQk3Dojkp0S9XWkXGkkJMJYSPk6JsqRua84dJgfu8NBRpJl7GRAnGINjvijdpx0ht5BVUS1r MIME-Version: 1.0 X-Received: by 10.220.102.20 with SMTP id e20mr27094737vco.12.1418845062601; Wed, 17 Dec 2014 11:37:42 -0800 (PST) Received: by 10.52.114.101 with HTTP; Wed, 17 Dec 2014 11:37:42 -0800 (PST) In-Reply-To: <1418842893-21536-1-git-send-email-simon.marchi@ericsson.com> References: <1418842893-21536-1-git-send-email-simon.marchi@ericsson.com> Date: Wed, 17 Dec 2014 19:37:00 -0000 Message-ID: Subject: Re: [PATCH] A few comment cleanups From: Doug Evans To: Simon Marchi Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00498.txt.bz2 On Wed, Dec 17, 2014 at 11:01 AM, Simon Marchi wrote: > I stumbled upon a few comments that I think are outdated. > > Comment for elfread.c (elf_symfile_init): As far as history goes in git, > I don't see anything related to that. > > Comment for elfread.c (elf_symfile_read): References a parameter that was > removed in 1999. > > Comment for struct sym_fns/sym_offsets: References a parameter that was > changed in 1999. > > gdb/ChangeLog: > > * elfread.c (elf_symfile_init): Remove stale comment. > (elf_symfile_read): Same. > * symfile.h (struct sym_fns): Same. Hi. Ok with one nit, below. > --- > gdb/elfread.c | 13 +------------ > gdb/symfile.h | 6 +----- > 2 files changed, 2 insertions(+), 17 deletions(-) > > diff --git a/gdb/elfread.c b/gdb/elfread.c > index b4ec067..93e5045 100644 > --- a/gdb/elfread.c > +++ b/gdb/elfread.c > @@ -1236,10 +1236,6 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, > We have been initialized by a call to elf_symfile_init, which > currently does nothing. > > - SECTION_OFFSETS is a set of offsets to apply to relocate the symbols > - in each section. We simplify it down to a single offset for all > - symbols. FIXME. > - > This function only does the minimum work necessary for letting the > user "name" things symbolically; it does not read the entire symtab. > Instead, it reads the external and static symbols and puts them in partial > @@ -1418,14 +1414,7 @@ elf_symfile_finish (struct objfile *objfile) > dwarf2_free_objfile (objfile); > } > > -/* ELF specific initialization routine for reading symbols. > - > - It is passed a pointer to a struct sym_fns which contains, among other > - things, the BFD for the file whose symbols are being read, and a slot for > - a pointer to "private data" which we can fill with goodies. > - > - For now at least, we have nothing in particular to do, so this function is > - just a stub. */ > +/* ELF specific initialization routine for reading symbols. */ > > static void > elf_symfile_init (struct objfile *objfile) > diff --git a/gdb/symfile.h b/gdb/symfile.h > index 1e8c230..b2cb089 100644 > --- a/gdb/symfile.h > +++ b/gdb/symfile.h > @@ -354,11 +354,7 @@ struct sym_fns > void (*sym_finish) (struct objfile *); > > /* This function produces a file-dependent section_offsets > - structure, allocated in the objfile's storage, and based on the > - parameter. The parameter is currently a CORE_ADDR (FIXME!) for > - backward compatibility with the higher levels of GDB. It should > - probably be changed to a string, where NULL means the default, > - and others are parsed in a file dependent way. */ > + structure, allocated in the objfile's storage. */ > > void (*sym_offsets) (struct objfile *, const struct section_addr_info *); Can I ask you to document what the struct section_addr_info * argument is for?