Commit Graph

2 Commits

Author SHA1 Message Date
Andreas Arnez 04ff1e612e GDB tests for Go language support: remove unnecessary first breakpoint
On s390x targets some of the Go test cases fail because the first
breakpoint happens to be at the same spot as the breakpoint at
main.main.  When such a test case tries to continue to the first
breakpoint, the program runs until the end instead, and the test fails
like this:

FAIL: gdb.go/handcall.exp: Going to first breakpoint (the program exited)

This patch removes all the handling related to the first breakpoint in
those cases.  After applying the patch, the tests run successfully on
s390x.

gdb/testsuite/ChangeLog:

	* gdb.go/handcall.exp: Remove all logic related to the first
	breakpoint and rely on go_runto_main instead.
	* gdb.go/strings.exp: Likewise.
	* gdb.go/unsafe.exp: Likewise.
	* gdb.go/hello.exp: Likewise.  Also rename the remaining
	breakpoint marker to "breakpoint 1".
	* gdb.go/handcall.go: Remove comment "set breakpoint 1 here".
	* gdb.go/strings.go: Likewise.
	* gdb.go/unsafe.go: Likewise.
	* gdb.go/hello.go: Likewise.  Also remove the second occurrence of
	"set breakpoint 2 here" and rename the remaining breakpoint marker
	to "breakpoint 1".
2015-04-16 13:03:47 +02:00
Doug Evans a766d390bb 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.
2012-04-25 14:07:23 +00:00