This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/7] Remove vlang_unknown
- From: Yao Qi <yao at codesourcery dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Doug Evans <dje at google dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 4 Oct 2013 16:30:22 +0800
- Subject: Re: [PATCH 2/7] Remove vlang_unknown
- Authentication-results: sourceware.org; auth=none
- References: <1379512482-31773-1-git-send-email-yao at codesourcery dot com> <1379512482-31773-3-git-send-email-yao at codesourcery dot com> <20131001100742 dot GC2840 at adacore dot com> <524ACF04 dot 2050904 at codesourcery dot com> <CADPb22Q0CQcp39tcs7rS_oAn5Ke=30qS9EDx7e2B5aj1wOo7QA at mail dot gmail dot com> <20131002093248 dot GB2971 at adacore dot com>
On 10/02/2013 05:32 PM, Joel Brobecker wrote:
> I agree. I think the patch is OK to go with a quick comment added,
> explaining that we want to be able to index arrays using this enum,
> so we make its first enum explicitly zero (despite the fact that
> this is the default, this prevents someone else just accidently
> setting the first enum's value to nonzero for other reasons).
Comments are added in the patch below. It is obvious to me, and I'll
commit it.
--
Yao (éå)
gdb:
2013-10-04 Yao Qi <yao@codesourcery.com>
* varobj.h: Add comments to enum varobj_languages.
---
gdb/varobj.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gdb/varobj.h b/gdb/varobj.h
index 5f6eb88..c794085 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -52,7 +52,8 @@ enum varobj_scope_status
/* String representations of gdb's format codes (defined in varobj.c). */
extern char *varobj_format_string[];
-/* Languages supported by this variable objects system. */
+/* Languages supported by this variable objects system. This enum is used
+ to index arrays so we make its first enum explicitly zero. */
enum varobj_languages
{
vlang_c = 0, vlang_cplus, vlang_java, vlang_ada, vlang_end
--
1.7.7.6