On Wed, Jul 26, 2017 at 10:26 PM, Ian Lance Taylor <[email protected]> wrote:
> On Sat, Jul 22, 2017 at 11:08 AM, Uros Bizjak <[email protected]> wrote:
>>> This patch to the gotools Makefile adds tests to `make check`. We now
>>> test the runtime package using the newly built go tool, and test that
>>> cgo works by running the misc/cgo/test and misc/cgo/testcarchive
>>> tests. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
>>> Committed to mainline.
>>
>> There is now only one remaining gotools testsuite failure on alpha:
>>
>> FAIL: TestBreakpoint
>> crash_test.go:106: testprog Breakpoint exit status: exit status 2
>> crash_test.go:310: output:
>> SIGTRAP: trace trap
>> PC=2199039253124 m=0 sigcode=0
>>
>> goroutine 1 [running]:
>>
>> goroutine 3 [runnable]:
>> created by runtime.SetFinalizer
>>
>> /space/homedirs/uros/gcc-svn/trunk/libgo/go/runtime/mfinal.go:355
>> +1280
>>
>>
>>
>> want output containing: runtime.Breakpoint
>>
>> I would like to debug this one failure only. Is there a way to run
>> only one gotools test? Can you perhaps give a hint where to look in
>> the source?
>
> The test is TestBreakpoint in libgo/go/runtime/crash_test.go. It is
> testing that if it runs a program that calls `runtime.Breakpoint`,
> then `runtime.Breakpoint` will appear in the stack trace that the
> program emits.
>
> It does this by building a test program. The easy way to do this
> yourself is to run `make install` in your GCC build directory, set
> LD_LIBRARY_PATH if needed to include the newly installed libgo.so, and
> then do
>
> cd SRCDIR/libgo/go/runtime/testdata/testprog
> go build # run the `go` program installed from gotools, building
> ./testprog; you can use `go build -o /tmp/x` if you like
> ./testprog Breakpoint
>
> On my x86_64 system that prints the appended, which includes the
> desired `runtime.Breakpoint` string. On your system it fails to print
> a stack trace, but I don't know why.
>
> Ian
>
>
>
> SIGILL: illegal instruction
> PC=140647499814795 m=0 sigcode=2
On a related note, the above is printed from:
go/runtime/signal_sighandler.go: print("PC=", hex(sigpc), "
m=", _g_.m.id, " sigcode=", c.sigcode(), "\n")
with the intention that PC is printed in the hex notation, but this is
not the case in the dumps.
I suspect hex(...) function is not working properly.
Uros.