From patchwork Tue Feb 25 05:15:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 38296 Received: (qmail 104970 invoked by alias); 25 Feb 2020 05:16:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 104962 invoked by uid 89); 25 Feb 2020 05:16:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_SOFTFAIL autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2020 05:16:01 +0000 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id TFsi24Ng3Tw84bP5 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Feb 2020 00:15:58 -0500 (EST) Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 8C1C3441B21; Tue, 25 Feb 2020 00:15:58 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] Move dwarf2_get_die_type declaration to dwarf2/read.h Date: Tue, 25 Feb 2020 00:15:58 -0500 Message-Id: <20200225051558.93949-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-IsSubscribed: yes Since its implementation is in dwarf2/read.c, its declaration belongs in dwarf2/read.h. Move the documentation to the .h at the same time. gdb/ChangeLog: * loc.h (dwarf2_get_die_type): Move to... * read.h (dwarf2_get_die_type): ... here. * read.c (dwarf2_get_die_type): Move doc to header. --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2/loc.h | 3 --- gdb/dwarf2/read.c | 3 +-- gdb/dwarf2/read.h | 6 ++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 52dfa33aefd2..01cd38d01a99 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-02-25 Simon Marchi + + * loc.h (dwarf2_get_die_type): Move to... + * read.h (dwarf2_get_die_type): ... here. + * read.c (dwarf2_get_die_type): Move doc to header. + 2020-02-25 Joel Brobecker * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and diff --git a/gdb/dwarf2/loc.h b/gdb/dwarf2/loc.h index 4514fa93c7b7..ab071c21b344 100644 --- a/gdb/dwarf2/loc.h +++ b/gdb/dwarf2/loc.h @@ -59,9 +59,6 @@ extern const gdb_byte *dwarf2_fetch_constant_bytes (sect_offset, struct type *dwarf2_fetch_die_type_sect_off (sect_offset, struct dwarf2_per_cu_data *); -struct type *dwarf2_get_die_type (cu_offset die_offset, - struct dwarf2_per_cu_data *per_cu); - /* Find the frame base information for FRAMEFUNC at PC. START is an out parameter which is set to point to the DWARF expression to compute. LENGTH is an out parameter which is set to the length of diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index d97956ecb6ac..8c40ddb727af 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -22510,8 +22510,7 @@ dwarf2_fetch_die_type_sect_off (sect_offset sect_off, return die_type (die, cu); } -/* Return the type of the DIE at DIE_OFFSET in the CU named by - PER_CU. */ +/* See read.h. */ struct type * dwarf2_get_die_type (cu_offset die_offset, diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index f7e740c3e9ec..640e19e4a0e6 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -523,6 +523,12 @@ struct dwz_file extern struct dwz_file *dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile); +/* Return the type of the DIE at DIE_OFFSET in the CU named by + PER_CU. */ + +struct type *dwarf2_get_die_type (cu_offset die_offset, + struct dwarf2_per_cu_data *per_cu); + /* When non-zero, dump line number entries as they are read in. */ extern unsigned int dwarf_line_debug;