* [PATCH] Remove global traceframe_fun and traceframe_sal
@ 2013-10-24 14:01 Yao Qi
2013-10-24 16:44 ` Pedro Alves
2013-10-24 17:19 ` Tom Tromey
0 siblings, 2 replies; 4+ messages in thread
From: Yao Qi @ 2013-10-24 14:01 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Remove global traceframe_fun and traceframe_sal
2013-10-24 14:01 [PATCH] Remove global traceframe_fun and traceframe_sal Yao Qi
@ 2013-10-24 16:44 ` Pedro Alves
2013-10-25 7:09 ` Yao Qi
2013-10-24 17:19 ` Tom Tromey
1 sibling, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2013-10-24 16:44 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 10/24/2013 02:59 PM, Yao Qi wrote:
> 2013-10-24 Yao Qi <yao@codesourcery.com>
>
> * tracepoint.c (traceframe_fun): Remove.
> (traceframe_sal): Remove.
> (set_traceframe_context): Add local variables.
OK.
Thanks,
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Remove global traceframe_fun and traceframe_sal
2013-10-24 14:01 [PATCH] Remove global traceframe_fun and traceframe_sal Yao Qi
2013-10-24 16:44 ` Pedro Alves
@ 2013-10-24 17:19 ` Tom Tromey
1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2013-10-24 17:19 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> I happen to see traceframe_fun and traceframe_sal are static
Yao> variables, which are not necessary to me. They are only used in
Yao> set_traceframe_context, and they are not stateful. This patch is
Yao> to remove them.
Yao> 2013-10-24 Yao Qi <yao@codesourcery.com>
Yao> * tracepoint.c (traceframe_fun): Remove.
Yao> (traceframe_sal): Remove.
Yao> (set_traceframe_context): Add local variables.
This is ok.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Remove global traceframe_fun and traceframe_sal
2013-10-24 16:44 ` Pedro Alves
@ 2013-10-25 7:09 ` Yao Qi
0 siblings, 0 replies; 4+ messages in thread
From: Yao Qi @ 2013-10-25 7:09 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On 10/25/2013 12:44 AM, Pedro Alves wrote:
>> >2013-10-24 Yao Qi<yao@codesourcery.com>
>> >
>> > * tracepoint.c (traceframe_fun): Remove.
>> > (traceframe_sal): Remove.
>> > (set_traceframe_context): Add local variables.
> OK.
Patch is committed.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-25 7:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 14:01 [PATCH] Remove global traceframe_fun and traceframe_sal Yao Qi
2013-10-24 16:44 ` Pedro Alves
2013-10-25 7:09 ` Yao Qi
2013-10-24 17:19 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox