From patchwork Fri Jul 18 16:03:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 2108 Received: (qmail 31998 invoked by alias); 18 Jul 2014 16:03:35 -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 31978 invoked by uid 89); 18 Jul 2014 16:03:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Jul 2014 16:03:33 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6IG3W71004762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 18 Jul 2014 12:03:32 -0400 Received: from barimba.redhat.com (ovpn-113-27.phx2.redhat.com [10.3.113.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6IG3Vnt015161; Fri, 18 Jul 2014 12:03:31 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] make exec_ops static Date: Fri, 18 Jul 2014 10:03:27 -0600 Message-Id: <1405699407-32457-1-git-send-email-tromey@redhat.com> While working on some target stack changes, I noticed that exec_ops is only used from exec.c. This patch makes it "static". This is cleaner and makes it simpler to reason about the use of the target. Tested by rebuilding. I'm checking this in as obvious. 2014-07-18 Tom Tromey * exec.c (exec_ops): Now static. * exec.h (exec_ops): Don't declare. --- gdb/ChangeLog | 5 +++++ gdb/exec.c | 2 +- gdb/exec.h | 2 -- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/exec.c b/gdb/exec.c index 5176bf1..7ba2720 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -61,7 +61,7 @@ void _initialize_exec (void); /* The target vector for executable files. */ -struct target_ops exec_ops; +static struct target_ops exec_ops; /* True if the exec target is pushed on the stack. */ static int using_exec_ops; diff --git a/gdb/exec.h b/gdb/exec.h index 304310f..1d77e24 100644 --- a/gdb/exec.h +++ b/gdb/exec.h @@ -29,8 +29,6 @@ struct target_ops; struct bfd; struct objfile; -extern struct target_ops exec_ops; - #define exec_bfd current_program_space->ebfd #define exec_bfd_mtime current_program_space->ebfd_mtime #define exec_filename current_program_space->pspace_exec_filename