6.2.0 based devel/powerpc64-gcc rejects sys/powerpc/powerpc/db_trace.c for very old code
John Baldwin
jhb at freebsd.org
Mon Jan 2 16:09:08 UTC 2017
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
More information about the freebsd-ppc
mailing list