* parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:08:33 +0000 (14:08 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:08:33 +0000 (14:08 +0000)
and DATA_SYMBOL_TYPE arguments.
* parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
DATA_SYMBOL_TYPE arguments.  Replace use of builtin_type_CORE_ADDR.
(write_dollar_variable): Update call.

* ada-exp.y (write_var_or_type): Update call.
* c-exp.y: Likewise.
* f-exp.y: Likewise.
* jv-exp.y: Likewise.
* m2-exp.y: Likewise.
* objc-exp.y: Likewise.
* p-exp.y: Likewise.

gdb/ChangeLog
gdb/ada-exp.y
gdb/c-exp.y
gdb/f-exp.y
gdb/jv-exp.y
gdb/m2-exp.y
gdb/objc-exp.y
gdb/p-exp.y
gdb/parse.c
gdb/parser-defs.h

index 178b5478c1245b20bb67633a968823b90a9a5f7b..d427f529f408706292cf2039bf4432fe9e1d3b22 100644 (file)
@@ -1,3 +1,19 @@
+2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
+       and DATA_SYMBOL_TYPE arguments.
+       * parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
+       DATA_SYMBOL_TYPE arguments.  Replace use of builtin_type_CORE_ADDR.
+       (write_dollar_variable): Update call.
+
+       * ada-exp.y (write_var_or_type): Update call.
+       * c-exp.y: Likewise.
+       * f-exp.y: Likewise.
+       * jv-exp.y: Likewise.
+       * m2-exp.y: Likewise.
+       * objc-exp.y: Likewise.
+       * p-exp.y: Likewise.
+
 2008-09-10  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-lang.c (ada_parent_type): Add handling of the case where
index c146baf1e2b1f6d4f3cf808a09393de1316dd04a..e44cc683bcc05b3209684f162f884fd7347c05cb 100644 (file)
@@ -1370,8 +1370,7 @@ write_var_or_type (struct block *block, struct stoken name0)
                = ada_lookup_simple_minsym (encoded_name);
              if (msym != NULL)
                {
-                 write_exp_msymbol (msym, lookup_function_type (type_int ()),
-                                    type_int ());
+                 write_exp_msymbol (msym);
                  /* Maybe cause error here rather than later? FIXME? */
                  write_selectors (encoded_name + tail_index);
                  return NULL;
index bd04dc28b6a2bfacb7f3e4de8ce71c7e0bbfcb6d..7ebefcbd9df0920d1f3ee18261a83e0f2eea78f3 100644 (file)
@@ -700,16 +700,11 @@ variable: qualified_name
 
                          msymbol = lookup_minimal_symbol (name, NULL, NULL);
                          if (msymbol != NULL)
-                           {
-                             write_exp_msymbol (msymbol,
-                                                lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
-                                                builtin_type (current_gdbarch)->builtin_int);
-                           }
+                           write_exp_msymbol (msymbol);
+                         else if (!have_full_symbols () && !have_partial_symbols ())
+                           error ("No symbol table is loaded.  Use the \"file\" command.");
                          else
-                           if (!have_full_symbols () && !have_partial_symbols ())
-                             error ("No symbol table is loaded.  Use the \"file\" command.");
-                           else
-                             error ("No symbol \"%s\" in current context.", name);
+                           error ("No symbol \"%s\" in current context.", name);
                        }
        ;
 
@@ -756,11 +751,7 @@ variable:  name_not_typename
                              msymbol =
                                lookup_minimal_symbol (arg, NULL, NULL);
                              if (msymbol != NULL)
-                               {
-                                 write_exp_msymbol (msymbol,
-                                                    lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
-                                                    builtin_type (current_gdbarch)->builtin_int);
-                               }
+                               write_exp_msymbol (msymbol);
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"file\" command.");
                              else
index 121b2472833a6eb7bcd592a48c1c65018d00c9e8..c50106cc7f1f4ab3014cc13ecd94af8ded130236 100644 (file)
@@ -510,11 +510,7 @@ variable:  name_not_typename
                              msymbol =
                                lookup_minimal_symbol (arg, NULL, NULL);
                              if (msymbol != NULL)
-                               {
-                                 write_exp_msymbol (msymbol,
-                                                    lookup_function_type (builtin_type_int),
-                                                    builtin_type_int);
-                               }
+                               write_exp_msymbol (msymbol);
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"file\" command.");
                              else
index 33cbdf99ab8903dd28cd56133c87b301ccf86631..1ec73ab09517356e5d1c4e8151ad7a7df1730ccc 100644 (file)
@@ -1397,11 +1397,7 @@ push_expression_name (name)
 
       msymbol = lookup_minimal_symbol (tmp, NULL, NULL);
       if (msymbol != NULL)
-       {
-         write_exp_msymbol (msymbol,
-                            lookup_function_type (builtin_type_int),
-                            builtin_type_int);
-       }
+       write_exp_msymbol (msymbol);
       else if (!have_full_symbols () && !have_partial_symbols ())
        error (_("No symbol table is loaded.  Use the \"file\" command"));
       else
index 951f778bf8dae59c2b002a0a7d93f164a45a52d2..bb1c4ea3ad29f02f0b5df2b4e0753c419ca9f5d9 100644 (file)
@@ -630,12 +630,7 @@ variable:  NAME
                              msymbol =
                                lookup_minimal_symbol (arg, NULL, NULL);
                              if (msymbol != NULL)
-                               {
-                                 write_exp_msymbol
-                                   (msymbol,
-                                    lookup_function_type (builtin_type_int),
-                                    builtin_type_int);
-                               }
+                               write_exp_msymbol (msymbol);
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"symbol-file\" command.");
                              else
index 367b53515d000b8dd8fc96299758c46f5edbb2bc..cde056c2a6484ebb4eac2d8cbf566a3ed65834af 100644 (file)
@@ -715,16 +715,11 @@ variable: qualified_name
 
                          msymbol = lookup_minimal_symbol (name, NULL, NULL);
                          if (msymbol != NULL)
-                           {
-                             write_exp_msymbol (msymbol,
-                                                lookup_function_type (builtin_type_int),
-                                                builtin_type_int);
-                           }
+                           write_exp_msymbol (msymbol);
+                         else if (!have_full_symbols () && !have_partial_symbols ())
+                           error ("No symbol table is loaded.  Use the \"file\" command.");
                          else
-                           if (!have_full_symbols () && !have_partial_symbols ())
-                             error ("No symbol table is loaded.  Use the \"file\" command.");
-                           else
-                             error ("No symbol \"%s\" in current context.", name);
+                           error ("No symbol \"%s\" in current context.", name);
                        }
        ;
 
@@ -771,11 +766,7 @@ variable:  name_not_typename
                              msymbol =
                                lookup_minimal_symbol (arg, NULL, NULL);
                              if (msymbol != NULL)
-                               {
-                                 write_exp_msymbol (msymbol,
-                                                    lookup_function_type (builtin_type_int),
-                                                    builtin_type_int);
-                               }
+                               write_exp_msymbol (msymbol);
                              else if (!have_full_symbols () && 
                                       !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"file\" command.");
index 95ccdf11d89612a5fec137d6aeedcfd1010df478..0988481a7db2de575c3bcad231288403fa857ebc 100644 (file)
@@ -654,16 +654,11 @@ variable: qualified_name
 
                          msymbol = lookup_minimal_symbol (name, NULL, NULL);
                          if (msymbol != NULL)
-                           {
-                             write_exp_msymbol (msymbol,
-                                                lookup_function_type (builtin_type_int),
-                                                builtin_type_int);
-                           }
+                           write_exp_msymbol (msymbol);
+                         else if (!have_full_symbols () && !have_partial_symbols ())
+                           error ("No symbol table is loaded.  Use the \"file\" command.");
                          else
-                           if (!have_full_symbols () && !have_partial_symbols ())
-                             error ("No symbol table is loaded.  Use the \"file\" command.");
-                           else
-                             error ("No symbol \"%s\" in current context.", name);
+                           error ("No symbol \"%s\" in current context.", name);
                        }
        ;
 
@@ -725,11 +720,7 @@ variable:  name_not_typename
                              msymbol =
                                lookup_minimal_symbol (arg, NULL, NULL);
                              if (msymbol != NULL)
-                               {
-                                 write_exp_msymbol (msymbol,
-                                                    lookup_function_type (builtin_type_int),
-                                                    builtin_type_int);
-                               }
+                               write_exp_msymbol (msymbol);
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"file\" command.");
                              else
index ccd39570ff8a7d4c5d6d0a12ff42dd5cec5a7983..6b32d00a26da7e83ddda38c7bb15897e0ba6f9a2 100644 (file)
@@ -400,16 +400,10 @@ write_exp_bitstring (struct stoken str)
 }
 
 /* Add the appropriate elements for a minimal symbol to the end of
-   the expression.  The rationale behind passing in text_symbol_type and
-   data_symbol_type was so that Modula-2 could pass in WORD for
-   data_symbol_type.  Perhaps it still is useful to have those types vary
-   based on the language, but they no longer have names like "int", so
-   the initial rationale is gone.  */
+   the expression.  */
 
 void
-write_exp_msymbol (struct minimal_symbol *msymbol, 
-                  struct type *text_symbol_type, 
-                  struct type *data_symbol_type)
+write_exp_msymbol (struct minimal_symbol *msymbol)
 {
   struct objfile *objfile = msymbol_objfile (msymbol);
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -436,7 +430,7 @@ write_exp_msymbol (struct minimal_symbol *msymbol,
 
   write_exp_elt_opcode (OP_LONG);
   /* Let's make the type big enough to hold a 64-bit address.  */
-  write_exp_elt_type (builtin_type_CORE_ADDR);
+  write_exp_elt_type (builtin_type (gdbarch)->builtin_core_addr);
   write_exp_elt_longcst ((LONGEST) addr);
   write_exp_elt_opcode (OP_LONG);
 
@@ -576,9 +570,7 @@ write_dollar_variable (struct stoken str)
   msym = lookup_minimal_symbol (copy_name (str), NULL, NULL);
   if (msym)
     {
-      write_exp_msymbol (msym,
-                        lookup_function_type (builtin_type_int),
-                        builtin_type_int);
+      write_exp_msymbol (msym);
       return;
     }
 
index f49ff9e76aa53db543303f92099ed0dc23fe16f8..28cd02e082174ab9435f630d13e141e63db379fc 100644 (file)
@@ -133,8 +133,7 @@ extern void write_exp_elt_block (struct block *);
 
 extern void write_exp_elt_objfile (struct objfile *objfile);
 
-extern void write_exp_msymbol (struct minimal_symbol *,
-                              struct type *, struct type *);
+extern void write_exp_msymbol (struct minimal_symbol *);
 
 extern void write_dollar_variable (struct stoken str);
 
This page took 0.03565 seconds and 4 git commands to generate.