This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH obv] Fix some comments in varobj.{c,h}
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Sun, 31 Jan 2016 22:25:59 -0500
- Subject: [PATCH obv] Fix some comments in varobj.{c,h}
- Authentication-results: sourceware.org; auth=none
FYI, I just pushed this as obvious.
A few typos. The comment about varobj_create has been misplaced since
the dawn of time.
gdb/ChangeLog:
* varobj.h (struct varobj): Fix typos in comments.
(struct lang_varobj_ops): Likewise.
* varobj.c (VAROBJ_TABLE_SIZE): Likewise.
(varobj_create): Move misplaced comment.
---
gdb/ChangeLog | 7 +++++++
gdb/varobj.c | 6 +++---
gdb/varobj.h | 6 +++---
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 635202a..fe8c2fb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2016-01-31 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * varobj.h (struct varobj): Fix typos in comments.
+ (struct lang_varobj_ops): Likewise.
+ * varobj.c (VAROBJ_TABLE_SIZE): Likewise.
+ (varobj_create): Move misplaced comment.
+
2016-01-29 Simon Marchi <simon.marchi@ericsson.com>
* aarch64-tdep.c (aarch64_record_asimd_load_store): Add braces
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 8116a5b..b846ac0 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -220,7 +220,7 @@ static int format_code[] = { 0, 't', 'd', 'x', 'o', 'z' };
static struct varobj_root *rootlist;
/* Prime number indicating the number of buckets in the hash table. */
-/* A prime large enough to avoid too many colisions. */
+/* A prime large enough to avoid too many collisions. */
#define VAROBJ_TABLE_SIZE 227
/* Pointer to the varobj hash table (built at run time). */
@@ -246,8 +246,6 @@ varobj_ensure_python_env (const struct varobj *var)
}
#endif
-/* Creates a varobj (not its children). */
-
/* Return the full FRAME which corresponds to the given CORE_ADDR
or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
@@ -280,6 +278,8 @@ find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
return NULL;
}
+/* Creates a varobj (not its children). */
+
struct varobj *
varobj_create (char *objname,
char *expression, CORE_ADDR frame, enum varobj_type type)
diff --git a/gdb/varobj.h b/gdb/varobj.h
index ddf60e5..66399fd 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -53,7 +53,7 @@ enum varobj_scope_status
/* String representations of gdb's format codes (defined in varobj.c). */
extern char *varobj_format_string[];
-/* Struct thar describes a variable object instance. */
+/* Struct that describes a variable object instance. */
struct varobj;
@@ -107,7 +107,7 @@ struct varobj
int index;
/* The type of this variable. This can be NULL
- for artifial variable objects -- currently, the "accessibility"
+ for artificial variable objects -- currently, the "accessibility"
variable objects in C++. */
struct type *type;
@@ -198,7 +198,7 @@ struct lang_varobj_ops
reported by -var-update. Return zero if -var-update should never
report changes of such values. This makes sense for structures
(since the changes in children values will be reported separately),
- or for artifical objects (like 'public' pseudo-field in C++).
+ or for artificial objects (like 'public' pseudo-field in C++).
Return value of 0 means that gdb need not call value_fetch_lazy
for the value of this variable object. */
--
2.7.0