From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20574 invoked by alias); 24 Oct 2013 14:01:06 -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 20558 invoked by uid 89); 24 Oct 2013 14:01:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Oct 2013 14:01:03 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VZLT9-0002WM-OR from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 24 Oct 2013 07:00:59 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 24 Oct 2013 07:00:59 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Thu, 24 Oct 2013 07:00:59 -0700 From: Yao Qi To: Subject: [PATCH] Remove global traceframe_fun and traceframe_sal Date: Thu, 24 Oct 2013 14:01:00 -0000 Message-ID: <1382623173-17782-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00753.txt.bz2 I happen to see traceframe_fun and traceframe_sal are static variables, which are not necessary to me. They are only used in set_traceframe_context, and they are not stateful. This patch is to remove them. gdb: 2013-10-24 Yao Qi * tracepoint.c (traceframe_fun): Remove. (traceframe_sal): Remove. (set_traceframe_context): Add local variables. --- gdb/tracepoint.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index c086587..a7ccb50 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -132,12 +132,6 @@ static int traceframe_number; /* Tracepoint for last traceframe collected. */ static int tracepoint_number; -/* Symbol for function for last traceframe collected. */ -static struct symbol *traceframe_fun; - -/* Symtab and line for last traceframe collected. */ -static struct symtab_and_line traceframe_sal; - /* The traceframe info of the current traceframe. NULL if we haven't yet attempted to fetch it, or if the target does not support fetching this object, or if we're not inspecting a traceframe @@ -268,6 +262,8 @@ static void set_traceframe_context (struct frame_info *trace_frame) { CORE_ADDR trace_pc; + struct symbol *traceframe_fun; + struct symtab_and_line traceframe_sal; /* Save as globals for internal use. */ if (trace_frame != NULL -- 1.7.7.6