Add set/show debug dwarf-line.
[deliverable/binutils-gdb.git] / gdb / go-lang.c
index 147a9228d1416e3849291b15856ef8ee29eed769..b48467d838c5fb12a797ce126b076ecc8847d89c 100644 (file)
@@ -1,6 +1,6 @@
 /* Go language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 */
 
 #include "defs.h"
-#include "gdb_assert.h"
 #include "gdb_obstack.h"
-#include "gdb_string.h"
 #include "block.h"
 #include "symtab.h"
 #include "language.h"
+#include "varobj.h"
 #include "go-lang.h"
 #include "c-lang.h"
 #include "parser-defs.h"
@@ -55,10 +54,10 @@ static const char GO_MAIN_MAIN[] = "main.main";
 const char *
 go_main_name (void)
 {
-  struct minimal_symbol *msym;
+  struct bound_minimal_symbol msym;
 
   msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
-  if (msym != NULL)
+  if (msym.minsym != NULL)
     return GO_MAIN_MAIN;
 
   /* No known entry procedure found, the main program is probably not Go.  */
@@ -234,8 +233,8 @@ unpack_mangled_go_symbol (const char *mangled_name,
      libgo_.*: used by gccgo's runtime
 
      Thus we don't support -fgo-prefix (except as used by the runtime).  */
-  if (strncmp (mangled_name, "go.", 3) != 0
-      && strncmp (mangled_name, "libgo_", 6) != 0)
+  if (!startswith (mangled_name, "go.")
+      && !startswith (mangled_name, "libgo_"))
     return NULL;
 
   /* Quick check for whether a search may be fruitful.  */
@@ -560,9 +559,9 @@ go_language_arch_info (struct gdbarch *gdbarch,
 static const struct language_defn go_language_defn =
 {
   "go",
+  "Go",
   language_go,
   range_check_off,
-  type_check_off,
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
@@ -597,6 +596,9 @@ static const struct language_defn go_language_defn =
   c_get_string,
   NULL,
   iterate_over_symbols,
+  &default_varobj_ops,
+  NULL,
+  NULL,
   LANG_MAGIC
 };
 
This page took 0.025686 seconds and 4 git commands to generate.