gdb/go-lang.h - gdb

Data types defined

Macros defined

Source code

  1. /* Go language support definitions for GDB, the GNU debugger.

  2.    Copyright (C) 2012-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #if !defined (GO_LANG_H)
  15. #define GO_LANG_H 1

  16. struct type_print_options;

  17. #include "gdbtypes.h"
  18. #include "symtab.h"
  19. #include "value.h"

  20. struct parser_state;

  21. struct builtin_go_type
  22. {
  23.   struct type *builtin_void;
  24.   struct type *builtin_char;
  25.   struct type *builtin_bool;
  26.   struct type *builtin_int;
  27.   struct type *builtin_uint;
  28.   struct type *builtin_uintptr;
  29.   struct type *builtin_int8;
  30.   struct type *builtin_int16;
  31.   struct type *builtin_int32;
  32.   struct type *builtin_int64;
  33.   struct type *builtin_uint8;
  34.   struct type *builtin_uint16;
  35.   struct type *builtin_uint32;
  36.   struct type *builtin_uint64;
  37.   struct type *builtin_float32;
  38.   struct type *builtin_float64;
  39.   struct type *builtin_complex64;
  40.   struct type *builtin_complex128;
  41. };

  42. enum go_type
  43. {
  44.   GO_TYPE_NONE, /* Not a Go object.  */
  45.   GO_TYPE_STRING
  46. };

  47. /* Defined in go-exp.y.  */

  48. extern int go_parse (struct parser_state *);

  49. extern void go_error (char *);

  50. /* Defined in go-lang.c.  */

  51. extern const char *go_main_name (void);

  52. extern enum go_type go_classify_struct_type (struct type *type);

  53. extern char *go_demangle (const char *mangled, int options);

  54. extern char *go_symbol_package_name (const struct symbol *sym);

  55. extern char *go_block_package_name (const struct block *block);

  56. extern const struct builtin_go_type *builtin_go_type (struct gdbarch *);

  57. /* Defined in go-typeprint.c.  */

  58. extern void go_print_type (struct type *type, const char *varstring,
  59.                            struct ui_file *stream, int show, int level,
  60.                            const struct type_print_options *flags);

  61. /* Defined in go-valprint.c.  */

  62. extern void go_val_print (struct type *type, const gdb_byte *valaddr,
  63.                           int embedded_offset, CORE_ADDR address,
  64.                           struct ui_file *stream, int recurse,
  65.                           const struct value *val,
  66.                           const struct value_print_options *options);

  67. #endif /* !defined (GO_LANG_H) */