aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-10-26 16:00:11 +0800
committerYao Qi <yao@codesourcery.com>2013-11-07 15:08:09 +0800
commit6abde28fa9f6f14e03e3d9414da6423843d5e5c4 (patch)
treeab7bc04e868a926907b6ecac48cb02a1cef9c387
parent27cd387b7c3e45685db2f0dae4e9188f562cb7f0 (diff)
downloadgdb-6abde28fa9f6f14e03e3d9414da6423843d5e5c4.zip
gdb-6abde28fa9f6f14e03e3d9414da6423843d5e5c4.tar.gz
gdb-6abde28fa9f6f14e03e3d9414da6423843d5e5c4.tar.bz2
New field 'la_natural_name' in struct language_defn
This patch adds "natural name" of each supported languages, which will be used by the next patch. gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * language.h (struct language_defn) <la_natural_name>: New field. * ada-lang.c (ada_language_defn): Initialize field 'la_natural_name'. * c-lang.c (c_language_defn): Likewise. (cplus_language_defn, asm_language_defn): Likewise. * d-lang.c (d_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * go-lang.c (go_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * language.c (unknown_language_defn ): Likewise. (auto_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * opencl-lang.c (opencl_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise.
-rw-r--r--gdb/ChangeLog19
-rw-r--r--gdb/ada-lang.c1
-rw-r--r--gdb/c-lang.c4
-rw-r--r--gdb/d-lang.c1
-rw-r--r--gdb/f-lang.c1
-rw-r--r--gdb/go-lang.c1
-rw-r--r--gdb/jv-lang.c1
-rw-r--r--gdb/language.c3
-rw-r--r--gdb/language.h4
-rw-r--r--gdb/m2-lang.c1
-rw-r--r--gdb/objc-lang.c1
-rw-r--r--gdb/opencl-lang.c1
-rw-r--r--gdb/p-lang.c1
13 files changed, 39 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fee6b06..63879fb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,24 @@
2013-11-07 Yao Qi <yao@codesourcery.com>
+ * language.h (struct language_defn) <la_natural_name>: New
+ field.
+ * ada-lang.c (ada_language_defn): Initialize field
+ 'la_natural_name'.
+ * c-lang.c (c_language_defn): Likewise.
+ (cplus_language_defn, asm_language_defn): Likewise.
+ * d-lang.c (d_language_defn): Likewise.
+ * f-lang.c (f_language_defn): Likewise.
+ * go-lang.c (go_language_defn): Likewise.
+ * jv-lang.c (java_language_defn): Likewise.
+ * language.c (unknown_language_defn ): Likewise.
+ (auto_language_defn): Likewise.
+ * m2-lang.c (m2_language_defn): Likewise.
+ * objc-lang.c (objc_language_defn): Likewise.
+ * opencl-lang.c (opencl_language_defn): Likewise.
+ * p-lang.c (pascal_language_defn): Likewise.
+
+2013-11-07 Yao Qi <yao@codesourcery.com>
+
* language.c (language_str): Return const char *.
(add_language): Add const to 'language_names'
* language.h (struct language_defn) <la_name>: Add const.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 75f9fe8..4b55460 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -12799,6 +12799,7 @@ ada_read_var_value (struct symbol *var, struct frame_info *frame)
const struct language_defn ada_language_defn = {
"ada", /* Language name */
+ "Ada",
language_ada,
range_check_off,
case_sensitive_on, /* Yes, Ada is case-insensitive, but
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 7c09029..37b423a 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -812,6 +812,7 @@ const struct exp_descriptor exp_descriptor_c =
const struct language_defn c_language_defn =
{
"c", /* Language name */
+ "C",
language_c,
range_check_off,
case_sensitive_on,
@@ -936,6 +937,7 @@ cplus_language_arch_info (struct gdbarch *gdbarch,
const struct language_defn cplus_language_defn =
{
"c++", /* Language name */
+ "C++",
language_cplus,
range_check_off,
case_sensitive_on,
@@ -978,6 +980,7 @@ const struct language_defn cplus_language_defn =
const struct language_defn asm_language_defn =
{
"asm", /* Language name */
+ "assembly",
language_asm,
range_check_off,
case_sensitive_on,
@@ -1025,6 +1028,7 @@ const struct language_defn asm_language_defn =
const struct language_defn minimal_language_defn =
{
"minimal", /* Language name */
+ "Minimal",
language_minimal,
range_check_off,
case_sensitive_on,
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index b4c8664..3dad91f 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -239,6 +239,7 @@ static const struct op_print d_op_print_tab[] =
static const struct language_defn d_language_defn =
{
"d",
+ "D",
language_d,
range_check_off,
case_sensitive_on,
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index ee52561..36560ce 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -239,6 +239,7 @@ f_make_symbol_completion_list (const char *text, const char *word,
const struct language_defn f_language_defn =
{
"fortran",
+ "Fortran",
language_fortran,
range_check_on,
case_sensitive_off,
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index fd0bae3..4da1af4 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -561,6 +561,7 @@ go_language_arch_info (struct gdbarch *gdbarch,
static const struct language_defn go_language_defn =
{
"go",
+ "Go",
language_go,
range_check_off,
case_sensitive_on,
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 9c2cc13..b154d4a 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -1163,6 +1163,7 @@ const struct exp_descriptor exp_descriptor_java =
const struct language_defn java_language_defn =
{
"java", /* Language name */
+ "Java",
language_java,
range_check_off,
case_sensitive_on,
diff --git a/gdb/language.c b/gdb/language.c
index aa708b9..f1232a1 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -792,6 +792,7 @@ unknown_language_arch_info (struct gdbarch *gdbarch,
const struct language_defn unknown_language_defn =
{
"unknown",
+ "Unknown",
language_unknown,
range_check_off,
case_sensitive_on,
@@ -836,6 +837,7 @@ const struct language_defn unknown_language_defn =
const struct language_defn auto_language_defn =
{
"auto",
+ "Auto",
language_auto,
range_check_off,
case_sensitive_on,
@@ -878,6 +880,7 @@ const struct language_defn auto_language_defn =
const struct language_defn local_language_defn =
{
"local",
+ "Local",
language_auto,
range_check_off,
case_sensitive_on,
diff --git a/gdb/language.h b/gdb/language.h
index 14aedb6..c5f6824 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -134,6 +134,10 @@ struct language_defn
const char *la_name;
+ /* Natural or official name of the language. */
+
+ const char *la_natural_name;
+
/* its symtab language-enum (defs.h). */
enum language la_language;
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index 158ca07..db2ce7c 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -357,6 +357,7 @@ const struct exp_descriptor exp_descriptor_modula2 =
const struct language_defn m2_language_defn =
{
"modula-2",
+ "Modula-2",
language_m2,
range_check_on,
case_sensitive_on,
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index efec3b3..77a61ac 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -355,6 +355,7 @@ static const struct op_print objc_op_print_tab[] =
const struct language_defn objc_language_defn = {
"objective-c", /* Language name */
+ "Objective-C",
language_objc,
range_check_off,
case_sensitive_on,
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index faf88d9..28a2929 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -1103,6 +1103,7 @@ const struct exp_descriptor exp_descriptor_opencl =
const struct language_defn opencl_language_defn =
{
"opencl", /* Language name */
+ "OpenCL C",
language_opencl,
range_check_off,
case_sensitive_on,
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index d239190..bc59030 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -416,6 +416,7 @@ pascal_language_arch_info (struct gdbarch *gdbarch,
const struct language_defn pascal_language_defn =
{
"pascal", /* Language name */
+ "Pascal",
language_pascal,
range_check_on,
case_sensitive_on,