This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gotools patch committed: Test runtime, misc/cgo/{test,testcarchive}
- From: Ian Lance Taylor <iant at golang dot org>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Fri, 4 Aug 2017 06:46:42 -0700
- Subject: Re: gotools patch committed: Test runtime, misc/cgo/{test,testcarchive}
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4bgd_YPe+yp2bwy5ShTLq4C78xeJ3_99o=+w5oFTFThDQ@mail.gmail.com> <CAOyqgcX7XbP6Gi0-DaGSx0ioaExHJ7L972QvVW1hP5n_xSo=Rw@mail.gmail.com> <CAFULd4YCdQOf2fwj_JzzJCCxqfd7K79_eS_7kLqv_N54Ec4hYQ@mail.gmail.com>
On Fri, Aug 4, 2017 at 3:54 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> The problem was following:
>
> runtime.Breakpoint comprises only call to __builtin_trap (), which in
> case of alpha maps to "call_pall 0x81". Since __builtin_trap () is a
> noreturn function, no other instructions are emitted after call_pal.
>
> However, when call_pal insn is executed, alpha updates program counter
> before the signal is raised. As call_pal was the last insn, updated PC
> points outside of the function boundaries, and backtrace (and gdb,
> FWIW) failed to found enclosing function.
>
> The solution is to emit nop after call_pal insn, so PC will always
> remain between function boundaries.
>
> Attached patch implements dumpregs function for alpha.
Thanks for analyzing the problem.
I committed the dump-registers patch to mainline.
Ian