Date: Mon, 02 Jan 2017 08:07:57 -0800 From: John Baldwin <jhb@freebsd.org> To: freebsd-ppc@freebsd.org Cc: Mark Millard <markmi@dsl-only.net>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: Re: 6.2.0 based devel/powerpc64-gcc rejects sys/powerpc/powerpc/db_trace.c for very old code Message-ID: <12096354.3ltMFWEP1d@ralph.baldwin.cx> In-Reply-To: <B70A01B3-8D44-432F-88E1-26CC0D9DAC81@dsl-only.net> References: <B70A01B3-8D44-432F-88E1-26CC0D9DAC81@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, December 27, 2016 12:37:08 AM Mark Millard wrote:
> I have submitted:
>
> Bug 215600 - devel/powerpc64-gcc based buildkernel: sys/powerpc/powerpc/db_trace.c rejected for: '__builtin_frame_address' with a nonzero argument is unsafe
>
> sys/powerpc/powerpc/db_trace.c -r132070 2004-Jul-12 is when this
> __builtin_frame_address use was introduced:
>
> void
> db_trace_self(void)
> {
> db_addr_t addr;
>
> addr = (db_addr_t)__builtin_frame_address(1);
> db_backtrace(curthread, addr, -1);
> }
>
>
>
> head was at -r310556 for this discovery but with a patch for libdwarf
> in ctfconvert to enable buildkernel to get this far. I have not yet
> updated to the 6.3.0 based devel/powerpc64-gcc .
Try using '0' instead of '1'. You might get an extra frame in the backtrace
compared to before. A simple way to test is to add 'options KDB_TRACE' and
then trigger a panic (e.g. sysctl debug.kdb.panic=1)
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12096354.3ltMFWEP1d>
