From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] Remove global traceframe_fun and traceframe_sal
Date: Thu, 24 Oct 2013 14:01:00 -0000 [thread overview]
Message-ID: <1382623173-17782-1-git-send-email-yao@codesourcery.com> (raw)
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 <yao@codesourcery.com>
* 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
next reply other threads:[~2013-10-24 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 14:01 Yao Qi [this message]
2013-10-24 16:44 ` Pedro Alves
2013-10-25 7:09 ` Yao Qi
2013-10-24 17:19 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382623173-17782-1-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox