GDB (xrefs)

Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/go-lang.c File Reference
`#include "defs.h"`
`#include "gdb_obstack.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"`
`#include <ctype.h>`

Go to the source code of this file.

## Enumerations
enum | go_primitive_types { go_primitive_type_void, go_primitive_type_char, go_primitive_type_bool, go_primitive_type_int, go_primitive_type_uint, go_primitive_type_uintptr, go_primitive_type_int8, go_primitive_type_int16, go_primitive_type_int32, go_primitive_type_int64, go_primitive_type_uint8, go_primitive_type_uint16, go_primitive_type_uint32, go_primitive_type_uint64, go_primitive_type_float32, go_primitive_type_float64, go_primitive_type_complex64, go_primitive_type_complex128, nr_go_primitive_types }

## Functions
const char * | go_main_name (void)
static int | gccgo_string_p (struct type *type)
static int | sixg_string_p (struct type *type)
enum go_type | go_classify_struct_type (struct type *type)
static void | unpack_package_and_object (char *buf, const char **packagep, const char **objectp)
static char * | unpack_mangled_go_symbol (const char *mangled_name, const char **packagep, const char **objectp, const char **method_type_packagep, const char **method_type_objectp, int *method_type_is_pointerp)
char * | go_demangle (const char *mangled_name, int options)
static int | go_sniff_from_mangled_name (const char *mangled, char **demangled)
char * | go_symbol_package_name (const struct symbol *sym)
char * | go_block_package_name (const struct block *block)
static void | go_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
static void * | build_go_types (struct gdbarch *gdbarch)
const struct builtin_go_type * | builtin_go_type (struct gdbarch *gdbarch)
void | _initialize_go_language (void)

## Variables
static const char | GO_MAIN_MAIN [] = "main.main"
static const struct op_print | go_op_print_tab []
const struct language_defn | go_language_defn
static struct gdbarch_data * | go_type_data

## Enumeration Type Documentation

## ◆ go_primitive_types

enum go_primitive_types

Enumerator
go_primitive_type_void |
go_primitive_type_char |
go_primitive_type_bool |
go_primitive_type_int |
go_primitive_type_uint |
go_primitive_type_uintptr |
go_primitive_type_int8 |
go_primitive_type_int16 |
go_primitive_type_int32 |
go_primitive_type_int64 |
go_primitive_type_uint8 |
go_primitive_type_uint16 |
go_primitive_type_uint32 |
go_primitive_type_uint64 |
go_primitive_type_float32 |
go_primitive_type_float64 |
go_primitive_type_complex64 |
go_primitive_type_complex128 |
nr_go_primitive_types |

Definition at line 493 of file go-lang.c.

## Function Documentation

## ◆ _initialize_go_language()

void _initialize_go_language | ( | void |  | ) |

Definition at line 675 of file go-lang.c.

References build_go_types(), gdbarch_data_register_post_init(), and go_type_data.

## ◆ build_go_types()

static void* build_go_types | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 619 of file go-lang.c.

References arch_boolean_type(), arch_character_type(), arch_complex_type(), arch_float_type(), arch_integer_type(), arch_type(), builtin_go_type::builtin_bool, builtin_go_type::builtin_char, builtin_go_type::builtin_complex128, builtin_go_type::builtin_complex64, builtin_go_type::builtin_float32, builtin_go_type::builtin_float64, builtin_go_type(), builtin_go_type::builtin_int, builtin_go_type::builtin_int16, builtin_go_type::builtin_int32, builtin_go_type::builtin_int64, builtin_go_type::builtin_int8, builtin_go_type::builtin_uint, builtin_go_type::builtin_uint16, builtin_go_type::builtin_uint32, builtin_go_type::builtin_uint64, builtin_go_type::builtin_uint8, builtin_go_type::builtin_uintptr, builtin_go_type::builtin_void, floatformats_ieee_double, floatformats_ieee_single, gdbarch_int_bit(), GDBARCH_OBSTACK_ZALLOC, gdbarch_ptr_bit(), TARGET_CHAR_BIT, and TYPE_CODE_VOID.

Referenced by _initialize_go_language().

## ◆ builtin_go_type()

const struct builtin_go_type* builtin_go_type | ( | struct gdbarch * | gdbarch | ) |

Definition at line 669 of file go-lang.c.

References gdbarch_data(), and go_type_data.

Referenced by build_go_types(), go_language_arch_info(), and parse_number().

## ◆ gccgo_string_p()

static int gccgo_string_p | ( | struct type * | type | ) |
| static

Definition at line 71 of file go-lang.c.

References check_typedef(), TYPE_CODE, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_NAME, TYPE_NFIELDS, and TYPE_TARGET_TYPE.

Referenced by go_classify_struct_type().

## ◆ go_block_package_name()

char* go_block_package_name | ( | const struct block * | block | ) |

Definition at line 430 of file go-lang.c.

References BLOCK_FUNCTION, BLOCK_SUPERBLOCK, and go_symbol_package_name().

Referenced by classify_name().

## ◆ go_classify_struct_type()

enum go_type go_classify_struct_type | ( | struct type * | type | ) |

Definition at line 120 of file go-lang.c.

References check_typedef(), gccgo_string_p(), GO_TYPE_NONE, GO_TYPE_STRING, and sixg_string_p().

Referenced by go_val_print().

## ◆ go_demangle()

char* go_demangle | ( | const char * | mangled_name,
|  | int | options
| ) |  |

Definition at line 336 of file go-lang.c.

References obstack_grow_str, obstack_grow_str0, tempbuf, unpack_mangled_go_symbol(), and xfree().

Referenced by demangle_for_lookup(), and go_sniff_from_mangled_name().

## ◆ go_language_arch_info()

static void go_language_arch_info | ( | struct gdbarch * | gdbarch,
|  | struct language_arch_info * | lai
| ) |  |
| static

Definition at line 516 of file go-lang.c.

References language_arch_info::bool_type_default, language_arch_info::bool_type_symbol, builtin_go_type::builtin_bool, builtin_go_type::builtin_char, builtin_go_type::builtin_complex128, builtin_go_type::builtin_complex64, builtin_go_type::builtin_float32, builtin_go_type::builtin_float64, builtin_go_type(), builtin_go_type::builtin_int, builtin_go_type::builtin_int16, builtin_go_type::builtin_int32, builtin_go_type::builtin_int64, builtin_go_type::builtin_int8, builtin_go_type::builtin_uint, builtin_go_type::builtin_uint16, builtin_go_type::builtin_uint32, builtin_go_type::builtin_uint64, builtin_go_type::builtin_uint8, builtin_go_type::builtin_uintptr, builtin_go_type::builtin_void, GDBARCH_OBSTACK_CALLOC, go_primitive_type_bool, go_primitive_type_char, go_primitive_type_complex128, go_primitive_type_complex64, go_primitive_type_float32, go_primitive_type_float64, go_primitive_type_int, go_primitive_type_int16, go_primitive_type_int32, go_primitive_type_int64, go_primitive_type_int8, go_primitive_type_uint, go_primitive_type_uint16, go_primitive_type_uint32, go_primitive_type_uint64, go_primitive_type_uint8, go_primitive_type_uintptr, go_primitive_type_void, nr_go_primitive_types, language_arch_info::primitive_type_vector, and language_arch_info::string_char_type.

## ◆ go_main_name()

const char* go_main_name | ( | void |  | ) |

Definition at line 55 of file go-lang.c.

References GO_MAIN_MAIN, and lookup_minimal_symbol().

Referenced by find_main_name().

## ◆ go_sniff_from_mangled_name()

static int go_sniff_from_mangled_name | ( | const char * | mangled,
|  | char ** | demangled
| ) |  |
| static

Definition at line 391 of file go-lang.c.

References go_demangle().

## ◆ go_symbol_package_name()

char* go_symbol_package_name | ( | const struct symbol * | sym | ) |

Definition at line 401 of file go-lang.c.

References gdb_assert, language_go, SYMBOL_LANGUAGE, SYMBOL_LINKAGE_NAME, unpack_mangled_go_symbol(), and xfree().

Referenced by fixup_go_packaging(), and go_block_package_name().

## ◆ sixg_string_p()

static int sixg_string_p | ( | struct type * | type | ) |
| static

Definition at line 106 of file go-lang.c.

References TYPE_NFIELDS, and TYPE_TAG_NAME.

Referenced by go_classify_struct_type().

## ◆ unpack_mangled_go_symbol()

static char* unpack_mangled_go_symbol | ( | const char * | mangled_name,
|  | const char ** | packagep,
|  | const char ** | objectp,
|  | const char ** | method_type_packagep,
|  | const char ** | method_type_objectp,
|  | int * | method_type_is_pointerp
| ) |  |
| static

Definition at line 183 of file go-lang.c.

References gdb_assert, startswith(), and unpack_package_and_object().

Referenced by go_demangle(), and go_symbol_package_name().

## ◆ unpack_package_and_object()

static void unpack_package_and_object | ( | char * | buf,
|  | const char ** | packagep,
|  | const char ** | objectp
| ) |  |
| static

Definition at line 139 of file go-lang.c.

References gdb_assert.

Referenced by unpack_mangled_go_symbol().

## Variable Documentation

## ◆ go_language_defn

const struct language_defn go_language_defn

## ◆ GO_MAIN_MAIN

const char GO_MAIN_MAIN[] = "main.main"
| static

Definition at line 47 of file go-lang.c.

Referenced by go_main_name().

## ◆ go_op_print_tab

const struct op_print go_op_print_tab[]
| static

Definition at line 459 of file go-lang.c.

## ◆ go_type_data

struct gdbarch_data* go_type_data
| static

Definition at line 666 of file go-lang.c.

Referenced by _initialize_go_language(), and builtin_go_type().