From patchwork Mon Feb 1 03:25:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 10678 Received: (qmail 90767 invoked by alias); 1 Feb 2016 03:26:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 90753 invoked by uid 89); 1 Feb 2016 03:26:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=BAYES_20, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=accessibility, 1987, 1077, obv X-HELO: smtp.electronicbox.net Received: from smtp.electronicbox.net (HELO smtp.electronicbox.net) (96.127.255.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Feb 2016 03:26:03 +0000 Received: from localhost.localdomain (cable-192.222.137.139.electronicbox.net [192.222.137.139]) by smtp.electronicbox.net (Postfix) with ESMTP id 7E457440E78; Sun, 31 Jan 2016 22:26:01 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH obv] Fix some comments in varobj.{c,h} Date: Sun, 31 Jan 2016 22:25:59 -0500 Message-Id: <1454297159-29574-1-git-send-email-simon.marchi@polymtl.ca> 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 + + * 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 * 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. */