Initial pass at Go language support.
authorDoug Evans <dje@google.com>
Wed, 25 Apr 2012 14:07:23 +0000 (14:07 +0000)
committerDoug Evans <dje@google.com>
Wed, 25 Apr 2012 14:07:23 +0000 (14:07 +0000)
commita766d390bb857383a5f9ae80a102e1f8705f4c2e
tree056e6d8d57aee5d234d9ed4619a27306dfec3dd7
parente65f9ffb8e49431537404712a5b1eed310964cb0
Initial pass at Go language support.
* NEWS: Mention Go.
* Makefile.in (SFILES): Add go-exp.y, go-lang.c, go-typeprint.c,
go-valprint.c.
(COMMON_OBS): Add go-lang.o, go-val.print.o, go-typeprint.o.
(YYFILES): Add go-exp.c.
(YYOBJ): Add go-exp.o.
(local-maintainer-clean): Delete go-exp.c.
* defs.h (enum language): Add language_go.
* dwarf2read.c: #include "go-lang.h".
(fixup_go_packaging): New function.
(process_full_comp_unit): Call it when processing Go CUs.
(dwarf2_physname): Add Go support.
(read_file_scope): Handle missing language spec for GNU Go.
(set_cu_language): Handle DW_LANG_Go.
* go-exp.y: New file.
* go-lang.h: New file.
* go-lang.c: New file.
* go-typeprint.c: New file.
* go-valprint.c: New file.
* symtab.c: #include "go-lang.h".
(symbol_set_language): Handle language_go.
(symbol_find_demangled_name, symbol_set_names): Ditto.
(symbol_natural_name, demangle_for_lookup, find_main_name): Ditto.

testsuite/
* configure.ac: Create gdb.go/Makefile.
* configure: Regenerate.
* gdb.base/default.exp: Add "go" to "set language" testing.
* gdb.go/Makefile.in: New file.
* gdb.go/basic-types.exp: New file.
* gdb.go/chan.exp: New file.
* gdb.go/chan.go: New file.
* gdb.go/handcall.exp: New file.
* gdb.go/handcall.go: New file.
* gdb.go/hello.exp: New file.
* gdb.go/hello.go: New file.
* gdb.go/integers.exp: New file.
* gdb.go/integers.go: New file.
* gdb.go/methods.exp: New file.
* gdb.go/methods.go: New file.
* gdb.go/package.exp: New file.
* gdb.go/package1.go: New file.
* gdb.go/package2.go: New file.
* gdb.go/print.exp: New file.
* gdb.go/strings.exp: New file.
* gdb.go/strings.go: New file.
* gdb.go/types.exp: New file.
* gdb.go/types.go: New file.
* gdb.go/unsafe.exp: New file.
* gdb.go/unsafe.go: New file.
* lib/future.exp: Add Go support.
(gdb_find_go, gdb_find_go_linker): New procs.
(gdb_default_target_compile): Add Go support.
* lib/gdb.exp (skip_go_tests): New proc.
* lib/go.exp: New file.

doc/
* gdb.texinfo (Supported Languages): Add Go.
(Go): New node.
42 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/NEWS
gdb/defs.h
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/dwarf2read.c
gdb/go-exp.y [new file with mode: 0644]
gdb/go-lang.c [new file with mode: 0644]
gdb/go-lang.h [new file with mode: 0644]
gdb/go-typeprint.c [new file with mode: 0644]
gdb/go-valprint.c [new file with mode: 0644]
gdb/symtab.c
gdb/testsuite/ChangeLog
gdb/testsuite/configure
gdb/testsuite/configure.ac
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.go/Makefile.in [new file with mode: 0644]
gdb/testsuite/gdb.go/basic-types.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/chan.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/chan.go [new file with mode: 0644]
gdb/testsuite/gdb.go/handcall.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/handcall.go [new file with mode: 0644]
gdb/testsuite/gdb.go/hello.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/hello.go [new file with mode: 0644]
gdb/testsuite/gdb.go/integers.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/integers.go [new file with mode: 0644]
gdb/testsuite/gdb.go/methods.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/methods.go [new file with mode: 0644]
gdb/testsuite/gdb.go/package.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/package1.go [new file with mode: 0644]
gdb/testsuite/gdb.go/package2.go [new file with mode: 0644]
gdb/testsuite/gdb.go/print.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/strings.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/strings.go [new file with mode: 0644]
gdb/testsuite/gdb.go/types.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/types.go [new file with mode: 0644]
gdb/testsuite/gdb.go/unsafe.exp [new file with mode: 0644]
gdb/testsuite/gdb.go/unsafe.go [new file with mode: 0644]
gdb/testsuite/lib/future.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/go.exp [new file with mode: 0644]