summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-04-27 00:02:04 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-04-27 00:02:04 +0000
commite8894b80e71798af60f5fe36a46fbd63fd477928 (patch)
tree5c14c0bc545e885b733784549e5aeda25c5d3f13 /share
parentf2c2ff6db58333f01653fa656b88a921a8e76d88 (diff)
add support for -msave-args in gcc on amd64
i got sick of not having arguments in ddb stack traces on amd64, which is because amd64 passes arguments in registers, and it's impossible to figure out where they go without dwarf info, and when you have dwarf info it is complicated. solaris has a simple solution for this. they tweaked their compilers to accept an -msave-args option which makes functions store their arguments on the stack, while maintaining compatability with the System V AMD64 ABI. tools (eg, ddb) can then look at the stack to get access to function arguments in traces. this ports their changes to gcc 3 to our gcc. ok deraadt@
Diffstat (limited to 'share')
-rw-r--r--share/man/man1/gcc-local.112
1 files changed, 10 insertions, 2 deletions
diff --git a/share/man/man1/gcc-local.1 b/share/man/man1/gcc-local.1
index 83e16db1717..63729a177c1 100644
--- a/share/man/man1/gcc-local.1
+++ b/share/man/man1/gcc-local.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gcc-local.1,v 1.51 2017/02/14 12:50:15 jmc Exp $
+.\" $OpenBSD: gcc-local.1,v 1.52 2017/04/27 00:02:03 dlg Exp $
.\"
.\" Copyright (c) 2002 Marc Espie
.\" Copyright (c) 2003 Anil Madhavapeddy
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 14 2017 $
+.Dd $Mdocdate: April 27 2017 $
.Dt GCC-LOCAL 1
.Os
.Sh NAME
@@ -160,6 +160,14 @@ which includes additional functions to be protected \(em those that
have local array definitions
or have references to local frame addresses.
.It
+On amd64,
+.Fl msave-args
+can be passed to the compiler to have functions save their register
+arguments on the stack, while maintaining compatability with the
+System 5 AMD64 ABI.
+This enables tools and debuggers that understand this semantic to
+trivially generate stack traces that include function arguments.
+.It
On the alpha, amd64, arm, hppa, i386, mips64, powerpc, sh and sparc64
architectures,
.Nm gcc