diff mbox

Change in binutils-gdb[master]: gdb: Update comments that reference VEC or vec.h

Message ID gerrit.1571170449000.Iefd2e903705c3e79cd13b43395c7a1c167f9a088@gnutoolchain-gerrit.osci.io
State New
Headers show

Commit Message

Simon Marchi (Code Review) Oct. 15, 2019, 8:14 p.m. UTC
Andrew Burgess has uploaded a new change for review.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/85
......................................................................

gdb: Update comments that reference VEC or vec.h

With the removal of the old VEC mechanism from the code base, update
comments that still make reference to VECs.  There should be no user
visible changes after this commit.

gdb/ChangeLog:

	* linespec.c (decode_digits_ordinary): Update comment.
	* make-target-delegates: No longer need to handle VEC case.
	* memrange.c (normalize_mem_ranges): Update comment.
	* namespace.c (add_using_directive): Update comment.
	* objc-lang.c (uniquify_strings): Update comment.
	* ppc-linux-nat.c (struct thread_points): Update comment.
	* probe.h (find_probes_in_objfile): Update comment.
	* target.h (enum flash_preserve_mode): Update comment.
	* varobj.c (varobj_restrict_range): Update comment.
	* varobj.h (varobj_list_children): Update comment.

Change-Id: Iefd2e903705c3e79cd13b43395c7a1c167f9a088
---
M gdb/ChangeLog
M gdb/linespec.c
M gdb/make-target-delegates
M gdb/memrange.c
M gdb/namespace.c
M gdb/objc-lang.c
M gdb/ppc-linux-nat.c
M gdb/probe.h
M gdb/target.h
M gdb/varobj.c
M gdb/varobj.h
11 files changed, 29 insertions(+), 22 deletions(-)
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8328a9b..3827c4d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@ 
 2019-10-15  Andrew Burgess  <andrew.burgess@embecosm.com>
 
+	* linespec.c (decode_digits_ordinary): Update comment.
+	* make-target-delegates: No longer need to handle VEC case.
+	* memrange.c (normalize_mem_ranges): Update comment.
+	* namespace.c (add_using_directive): Update comment.
+	* objc-lang.c (uniquify_strings): Update comment.
+	* ppc-linux-nat.c (struct thread_points): Update comment.
+	* probe.h (find_probes_in_objfile): Update comment.
+	* target.h (enum flash_preserve_mode): Update comment.
+	* varobj.c (varobj_restrict_range): Update comment.
+	* varobj.h (varobj_list_children): Update comment.
+
+2019-10-15  Andrew Burgess  <andrew.burgess@embecosm.com>
+
 	* Makefile.in: Remove references to vec.h and vec.c.
 	* aarch64-tdep.c: No longer include vec.h.
 	* ada-lang.c: Likewise.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index ac7d34d..fb6b04e 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -4109,8 +4109,9 @@ 
   return values;
 }
 
-/* A helper for create_sals_line_offset that iterates over the symtabs,
-   adding lines to the VEC.  */
+/* A helper for create_sals_line_offset that iterates over the symtabs
+   associated with LS and returns a vector of corresponding symtab_and_line
+   structures.  */
 
 static std::vector<symtab_and_line>
 decode_digits_ordinary (struct linespec_state *self,
diff --git a/gdb/make-target-delegates b/gdb/make-target-delegates
index 329306d..a7a39b3 100755
--- a/gdb/make-target-delegates
+++ b/gdb/make-target-delegates
@@ -43,11 +43,9 @@ 
 $CP_SYMBOL = qr,[a-zA-Z_][a-zA-Z0-9_<>:]*,;
 # Match the return type when it is "ordinary".
 $SIMPLE_RETURN_PART = qr,((struct|class|enum|union)\s+)?${CP_SYMBOL}+,;
-# Match the return type when it is a VEC.
-$VEC_RETURN_PART = qr,VEC\s*\([^\)]+\),;
 
 # Match a return type.
-$RETURN_PART = qr,((const|volatile)\s+)?(${SIMPLE_RETURN_PART}|${VEC_RETURN_PART})${POINTER_PART},;
+$RETURN_PART = qr,((const|volatile)\s+)?(${SIMPLE_RETURN_PART})${POINTER_PART},;
 
 # Match "virtual".
 $VIRTUAL_PART = qr,virtual\s,;
diff --git a/gdb/memrange.c b/gdb/memrange.c
index 0f99981..0c4b415 100644
--- a/gdb/memrange.c
+++ b/gdb/memrange.c
@@ -44,10 +44,6 @@ 
 void
 normalize_mem_ranges (std::vector<mem_range> *memory)
 {
-  /* This function must not use any VEC operation on RANGES that
-     reallocates the memory block as that invalidates the RANGES
-     pointer, which callers expect to remain valid.  */
-
   if (!memory->empty ())
     {
       std::vector<mem_range> &m = *memory;
diff --git a/gdb/namespace.c b/gdb/namespace.c
index 04b49ef..e08d4f7 100644
--- a/gdb/namespace.c
+++ b/gdb/namespace.c
@@ -30,8 +30,8 @@ 
    it is NULL.  EXCLUDES is a list of names not to import from an
    imported module or NULL.  If COPY_NAMES is non-zero, then the
    arguments are copied into newly allocated memory so they can be
-   temporaries.  For EXCLUDES the VEC pointers are copied but the
-   pointed to characters are not copied.  */
+   temporaries.  For EXCLUDES the contents of the vector are copied,
+   but the pointed to characters are not copied.  */
 
 void
 add_using_directive (struct using_direct **using_directives,
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index ab40e54..fbf0dab 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1063,7 +1063,7 @@ 
     }
 }
 
-/* Uniquify a VEC of strings.  */
+/* Uniquify a vector of strings.  */
 
 static void
 uniquify_strings (std::vector<const char *> *strings)
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 53406f6..0d66ade 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1575,9 +1575,9 @@ 
   struct ppc_hw_breakpoint *hw_break;
 };
 
-/* This is an internal VEC created to store information about *points inserted
-   for each thread.  This is used when PowerPC HWDEBUG ptrace interface is
-   available.  */
+/* This is an internal vector created to store information about *points
+   inserted for each thread.  This is used when PowerPC HWDEBUG ptrace
+   interface is available.  */
 struct thread_points
   {
     /* The TID to which this *point relates.  */
diff --git a/gdb/probe.h b/gdb/probe.h
index 7410c5a..4227bd4 100644
--- a/gdb/probe.h
+++ b/gdb/probe.h
@@ -274,7 +274,7 @@ 
 extern struct bound_probe find_probe_by_pc (CORE_ADDR pc);
 
 /* Search OBJFILE for a probe with the given PROVIDER, NAME.  Return a
-   VEC of all probes that were found.  If no matching probe is found,
+   vector of all probes that were found.  If no matching probe is found,
    return an empty vector.  */
 
 extern std::vector<probe *> find_probes_in_objfile (struct objfile *objfile,
diff --git a/gdb/target.h b/gdb/target.h
index 91e8a83..1bb7276 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1535,7 +1535,7 @@ 
    that supports writing to flash memory, and it should be used for
    all cases where access to flash memory is desirable.
 
-   REQUESTS is the vector (see vec.h) of memory_write_request.
+   REQUESTS is the vector of memory_write_request.
    PRESERVE_FLASH_P indicates what to do with blocks which must be
      erased, but not completely rewritten.
    PROGRESS_CB is a function that will be periodically called to provide
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 6265b2f..37a522b 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -597,10 +597,9 @@ 
   return var->frozen;
 }
 
-/* A helper function that restricts a range to what is actually
-   available in a VEC.  This follows the usual rules for the meaning
-   of FROM and TO -- if either is negative, the entire range is
-   used.  */
+/* A helper function that updates the contents of FROM and TO based on the
+   size of the vector CHILDREN.  If the contents of either FROM or TO are
+   negative the entire range is used.  */
 
 void
 varobj_restrict_range (const std::vector<varobj *> &children,
diff --git a/gdb/varobj.h b/gdb/varobj.h
index eb01da1..66db780 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -286,7 +286,7 @@ 
    indicating the range of children to return.  If either *FROM or *TO
    is less than zero on entry, then all children will be returned.  On
    return, *FROM and *TO will be updated to indicate the real range
-   that was returned.  The resulting VEC will contain at least the
+   that was returned.  The resulting vector will contain at least the
    children from *FROM to just before *TO; it might contain more
    children, depending on whether any more were available.  */
 extern const std::vector<varobj *> &