New field 'la_natural_name' in struct language_defn
authorYao Qi <yao@codesourcery.com>
Sat, 26 Oct 2013 08:00:11 +0000 (16:00 +0800)
committerYao Qi <yao@codesourcery.com>
Thu, 7 Nov 2013 07:08:09 +0000 (15:08 +0800)
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.

13 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/c-lang.c
gdb/d-lang.c
gdb/f-lang.c
gdb/go-lang.c
gdb/jv-lang.c
gdb/language.c
gdb/language.h
gdb/m2-lang.c
gdb/objc-lang.c
gdb/opencl-lang.c
gdb/p-lang.c

index fee6b06c1be619a11584cc18c43f6239129b01a0..63879fba7ee05f627623073cdf241914870a93af 100644 (file)
@@ -1,3 +1,22 @@
+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 *.
index 75f9fe8916b6194e29fa58e6b668229bef6cef60..4b554608d8dce78a5439f4d259660d7fb05c5ec8 100644 (file)
@@ -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
index 7c09029f25ab9b6dfc9bd2d41d590bb61e0e0182..37b423a10cee3dbbb4755fe6829a475db452567d 100644 (file)
@@ -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,
index b4c866407ed68512af70c7ec3cac72b82626b354..3dad91f1c52127030a3f9fe635b9b848bd1215c2 100644 (file)
@@ -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,
index ee525618b5586bdc59474c5968c3be0edf59c806..36560cec8a983dcc1b116e60bb62f560d9268937 100644 (file)
@@ -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,
index fd0bae3c51f5d55d7f4be11213cfe5f832cc0d27..4da1af4478beed98e15c0806e6be14bfbd6782ef 100644 (file)
@@ -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,
index 9c2cc13376721f90a8402ff2aeab1bcedc77b531..b154d4ac9205227de53adfa3765190ceb62531c8 100644 (file)
@@ -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,
index aa708b983a570a309e004d6cc26bb2b5134bad2b..f1232a1c1a81cafca29cce7263b2ea156d1b83fc 100644 (file)
@@ -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,
index 14aedb615d3418cc9b38998f44a44dd1493be73d..c5f6824800355a82693903621619357cec3c5edc 100644 (file)
@@ -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;
index 158ca07061299653509d6e68929c848d76686f38..db2ce7cf6ec3e610fece016e976f5dcd02e3a8fe 100644 (file)
@@ -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,
index efec3b3e0159fa0398731b039be64892c21ce7df..77a61acc0579f2a20b080837417b9d6b301fdd7d 100644 (file)
@@ -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,
index faf88d98f35ecbb5441ced3ff8d493299e8625e8..28a29294a43ba51d0c201b65051b221e9a80ae7e 100644 (file)
@@ -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,
index d23919066b55148973cbfa9db0645b1c0d89cc27..bc5903006fb85fac70a967ee186a82b895cb4268 100644 (file)
@@ -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,