This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Rename symbol_substitution_name


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f36b6d29fdff5be77ec6dfdac693d5e4b5dee50

commit 6f36b6d29fdff5be77ec6dfdac693d5e4b5dee50
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Aug 10 10:41:37 2018 -0700

    Rename symbol_substitution_name
    
    This patch simply adds a "c_" prefix to symbol_substitution_name to clarify
    that this is a C language-related function.
    
    gdb/ChangeLog:
            * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
            (c_symbol_substitution_name): ... this.
            Update all callers.

Diff:
---
 gdb/ChangeLog                   | 6 ++++++
 gdb/compile/compile-c-symbols.c | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7414f0e..a42e801 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2018-08-10  Keith Seitz  <keiths@redhat.com>
 
+	* compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
+	(c_symbol_substitution_name): ... this.
+	Update all callers.
+
+2018-08-10  Keith Seitz  <keiths@redhat.com>
+
 	* compile/compile-c-support.c (c_compute_program): Use
 	unique_xmalloc_ptr to eliminate cleanup.
 	* compile/compile-c-symbols.c (generate_c_for_variable_locations):
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 6987fa3..9364fc2 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -127,7 +127,7 @@ error_symbol_once (struct compile_c_instance *context,
    address.  */
 
 static gdb::unique_xmalloc_ptr<char>
-symbol_substitution_name (struct symbol *sym)
+c_symbol_substitution_name (struct symbol *sym)
 {
   return gdb::unique_xmalloc_ptr<char>
     (concat ("__", SYMBOL_NATURAL_NAME (sym), "_ptr", (char *) NULL));
@@ -266,7 +266,7 @@ convert_one_symbol (struct compile_c_instance *context,
 	case LOC_LOCAL:
 	substitution:
 	  kind = GCC_C_SYMBOL_VARIABLE;
-	  symbol_name = symbol_substitution_name (sym.symbol);
+	  symbol_name = c_symbol_substitution_name (sym.symbol);
 	  break;
 
 	case LOC_STATIC:
@@ -657,7 +657,7 @@ generate_c_for_for_one_variable (struct compile_c_instance *compiler,
       if (SYMBOL_COMPUTED_OPS (sym) != NULL)
 	{
 	  gdb::unique_xmalloc_ptr<char> generated_name
-	    = symbol_substitution_name (sym);
+	    = c_symbol_substitution_name (sym);
 	  /* We need to emit to a temporary buffer in case an error
 	     occurs in the middle.  */
 	  string_file local_file;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]