Patchwork [1/4] Rename traceframe_info variable to current_traceframe_info

login
register
mail settings
Submitter Simon Marchi
Date Oct. 10, 2017, 6:03 p.m.
Message ID <1507658593-28825-1-git-send-email-simon.marchi@ericsson.com>
Download mbox | patch
Permalink /patch/23428/
State New
Headers show

Comments

Simon Marchi - Oct. 10, 2017, 6:03 p.m.
From: Simon Marchi <simon.marchi@polymtl.ca>

... so it doesn't shadow the traceframe_info type.  It think it's a
clearer name anyway.

gdb/ChangeLog:

	* tracepoint.c (traceframe_info): Rename to...
	(current_traceframe_info): ...this.
	(clear_traceframe_info): Adjust.
	(get_traceframe_info): Adjust.
---
 gdb/tracepoint.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Simon Marchi - Oct. 14, 2017, 12:52 p.m.
On 2017-10-10 02:03 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> ... so it doesn't shadow the traceframe_info type.  It think it's a
> clearer name anyway.
> 
> gdb/ChangeLog:
> 
> 	* tracepoint.c (traceframe_info): Rename to...
> 	(current_traceframe_info): ...this.
> 	(clear_traceframe_info): Adjust.
> 	(get_traceframe_info): Adjust.
> ---
>  gdb/tracepoint.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
> index 72e920b..2f1b7a0 100644
> --- a/gdb/tracepoint.c
> +++ b/gdb/tracepoint.c
> @@ -133,7 +133,7 @@ static int tracepoint_number;
>     yet attempted to fetch it, or if the target does not support
>     fetching this object, or if we're not inspecting a traceframe
>     presently.  */
> -static struct traceframe_info *traceframe_info;
> +static struct traceframe_info *current_traceframe_info;
>  
>  /* Tracing command lists.  */
>  static struct cmd_list_element *tfindlist;
> @@ -211,8 +211,8 @@ free_traceframe_info (struct traceframe_info *info)
>  static void
>  clear_traceframe_info (void)
>  {
> -  free_traceframe_info (traceframe_info);
> -  traceframe_info = NULL;
> +  free_traceframe_info (current_traceframe_info);
> +  current_traceframe_info = NULL;
>  }
>  
>  /* Set traceframe number to NUM.  */
> @@ -4101,10 +4101,10 @@ parse_traceframe_info (const char *tframe_info)
>  struct traceframe_info *
>  get_traceframe_info (void)
>  {
> -  if (traceframe_info == NULL)
> -    traceframe_info = target_traceframe_info ();
> +  if (current_traceframe_info == NULL)
> +    current_traceframe_info = target_traceframe_info ();
>  
> -  return traceframe_info;
> +  return current_traceframe_info;
>  }
>  
>  /* If the target supports the query, return in RESULT the set of
> 

I pushed these in.

Simon

Patch

diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 72e920b..2f1b7a0 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -133,7 +133,7 @@  static int tracepoint_number;
    yet attempted to fetch it, or if the target does not support
    fetching this object, or if we're not inspecting a traceframe
    presently.  */
-static struct traceframe_info *traceframe_info;
+static struct traceframe_info *current_traceframe_info;
 
 /* Tracing command lists.  */
 static struct cmd_list_element *tfindlist;
@@ -211,8 +211,8 @@  free_traceframe_info (struct traceframe_info *info)
 static void
 clear_traceframe_info (void)
 {
-  free_traceframe_info (traceframe_info);
-  traceframe_info = NULL;
+  free_traceframe_info (current_traceframe_info);
+  current_traceframe_info = NULL;
 }
 
 /* Set traceframe number to NUM.  */
@@ -4101,10 +4101,10 @@  parse_traceframe_info (const char *tframe_info)
 struct traceframe_info *
 get_traceframe_info (void)
 {
-  if (traceframe_info == NULL)
-    traceframe_info = target_traceframe_info ();
+  if (current_traceframe_info == NULL)
+    current_traceframe_info = target_traceframe_info ();
 
-  return traceframe_info;
+  return current_traceframe_info;
 }
 
 /* If the target supports the query, return in RESULT the set of