From patchwork Wed May 1 18:43:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32477 Received: (qmail 49425 invoked by alias); 1 May 2019 18:44:07 -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 49393 invoked by uid 89); 1 May 2019 18:44:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=Declare, HX-Languages-Length:1658, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 May 2019 18:44:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5ACA1117514; Wed, 1 May 2019 14:44:04 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id k4BVHVgVPDZ4; Wed, 1 May 2019 14:44:04 -0400 (EDT) Received: from murgatroyd.Home (97-122-168-123.hlrn.qwest.net [97.122.168.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 066CD1173B3; Wed, 1 May 2019 14:44:03 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/4] Don't declare read_unsigned_leb128 in defs.h Date: Wed, 1 May 2019 12:43:59 -0600 Message-Id: <20190501184402.4030-2-tromey@adacore.com> In-Reply-To: <20190501184402.4030-1-tromey@adacore.com> References: <20190501184402.4030-1-tromey@adacore.com> MIME-Version: 1.0 I noticed that read_unsigned_leb128 is declared in defs.h. There's no reason this should be here, so this patch moves it to dwarf2read.h. gdb/ChangeLog 2019-05-01 Tom Tromey * dwarf2loc.c: Include dwarf2read.h. * defs.h (read_unsigned_leb128): Don't declare. * dwarf2read.h (read_unsigned_leb128): Declare. --- gdb/ChangeLog | 6 ++++++ gdb/defs.h | 4 ---- gdb/dwarf2loc.c | 1 + gdb/dwarf2read.h | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index a44e186907d..673a200d5d0 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -582,10 +582,6 @@ extern void copy_integer_to_size (gdb_byte *dest, int dest_size, extern int watchdog; -/* From dwarf2read.c */ - -ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *); - /* Hooks for alternate command interfaces. */ /* * The name of the interpreter if specified on the command line. */ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index bd630ee0588..fd2368c43a9 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -36,6 +36,7 @@ #include "dwarf2.h" #include "dwarf2expr.h" #include "dwarf2loc.h" +#include "dwarf2read.h" #include "dwarf2-frame.h" #include "compile/compile.h" #include "common/selftest.h" diff --git a/gdb/dwarf2read.h b/gdb/dwarf2read.h index 34c66167b5b..82bf6397ea1 100644 --- a/gdb/dwarf2read.h +++ b/gdb/dwarf2read.h @@ -403,4 +403,6 @@ struct signatured_type typedef struct signatured_type *sig_type_ptr; DEF_VEC_P (sig_type_ptr); +ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *); + #endif /* DWARF2READ_H */