Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2019 23:20:19 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355374 - head/sys/sparc64/sparc64
Message-ID:  <201912032320.xB3NKJNB023054@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Dec  3 23:20:19 2019
New Revision: 355374
URL: https://svnweb.freebsd.org/changeset/base/355374

Log:
  Pass 0 to __builtin_frame_address() to appease modern GCC.
  
  Modern versions of GCC warn about passing non-zero values to
  __builtin_frame_address().  Passing 1 is a cosmetic change to remove
  the db_trace_self() frame from the printed stack trace.
  
  Reported by:	marius, imp
  Differential Revision:	https://reviews.freebsd.org/D22600

Modified:
  head/sys/sparc64/sparc64/db_trace.c

Modified: head/sys/sparc64/sparc64/db_trace.c
==============================================================================
--- head/sys/sparc64/sparc64/db_trace.c	Tue Dec  3 23:17:54 2019	(r355373)
+++ head/sys/sparc64/sparc64/db_trace.c	Tue Dec  3 23:20:19 2019	(r355374)
@@ -279,7 +279,7 @@ db_trace_self(void)
 {
 
 	db_backtrace(curthread,
-	    (struct frame *)__builtin_frame_address(1), -1);
+	    (struct frame *)__builtin_frame_address(0), -1);
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912032320.xB3NKJNB023054>