/* Go language support routines for GDB, the GNU debugger.
- Copyright (C) 2012-2013 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"
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. */
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. */
NULL,
iterate_over_symbols,
&default_varobj_ops,
+ NULL,
+ NULL,
LANG_MAGIC
};