sys/types.h cleanup
[deliverable/binutils-gdb.git] / gdb / go-exp.y
index 730b22b0273133398f82262a9b37a5e29dc8bdd9..50b9cc217b4b088984a56325dbc5e3a72b707a55 100644 (file)
@@ -1,6 +1,6 @@
 /* YACC parser for Go expressions, for GDB.
 
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -52,7 +52,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
@@ -158,7 +158,7 @@ void yyerror (char *);
 
 %{
 /* YYSTYPE gets defined by %union.  */
-static int parse_number (char *, int, int, YYSTYPE *);
+static int parse_number (const char *, int, int, YYSTYPE *);
 static int parse_go_float (struct gdbarch *gdbarch, const char *p, int len,
                           DOUBLEST *d, struct type **t);
 %}
@@ -616,12 +616,12 @@ variable: name_not_typename
                            }
                          else
                            {
-                             struct minimal_symbol *msymbol;
+                             struct bound_minimal_symbol msymbol;
                              char *arg = copy_name ($1.stoken);
 
                              msymbol =
-                               lookup_minimal_symbol (arg, NULL, NULL);
-                             if (msymbol != NULL)
+                               lookup_bound_minimal_symbol (arg);
+                             if (msymbol.minsym != NULL)
                                write_exp_msymbol (msymbol);
                              else if (!have_full_symbols ()
                                       && !have_partial_symbols ())
@@ -704,7 +704,7 @@ parse_go_float (struct gdbarch *gdbarch, const char *p, int len,
    as our YYSTYPE is different than c-exp.y's  */
 
 static int
-parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
+parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere)
 {
   /* FIXME: Shouldn't these be unsigned?  We don't deal with negative values
      here, and we do kind of silly things like cast to unsigned.  */
@@ -908,8 +908,8 @@ static int tempbuf_init;
    number of host characters in the literal.  */
 
 static int
-parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value,
-                     int *host_chars)
+parse_string_or_char (const char *tokptr, const char **outptr,
+                     struct typed_stoken *value, int *host_chars)
 {
   int quote;
 
@@ -1049,7 +1049,7 @@ lex_one_token (void)
   int c;
   int namelen;
   unsigned int i;
-  char *tokstart;
+  const char *tokstart;
   int saw_structop = last_was_structop;
   char *copy;
 
@@ -1143,7 +1143,7 @@ lex_one_token (void)
       {
        /* It's a number.  */
        int got_dot = 0, got_e = 0, toktype;
-       char *p = tokstart;
+       const char *p = tokstart;
        int hex = input_radix > 10;
 
        if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
@@ -1190,7 +1190,7 @@ lex_one_token (void)
 
     case '@':
       {
-       char *p = &tokstart[1];
+       const char *p = &tokstart[1];
        size_t len = strlen ("entry");
 
        while (isspace (*p))
@@ -1283,7 +1283,8 @@ lex_one_token (void)
       && strncmp (tokstart, "thread", namelen) == 0
       && (tokstart[namelen] == ' ' || tokstart[namelen] == '\t'))
     {
-      char *p = tokstart + namelen + 1;
+      const char *p = tokstart + namelen + 1;
+
       while (*p == ' ' || *p == '\t')
        p++;
       if (*p >= '0' && *p <= '9')
This page took 0.027098 seconds and 4 git commands to generate.