diff -uNr gdb-7.11.orig/fsf-gdb-wrapper gdb-7.11/fsf-gdb-wrapper --- gdb-7.11.orig/fsf-gdb-wrapper 1969-12-31 19:00:00.000000000 -0500 +++ gdb-7.11/fsf-gdb-wrapper 2016-03-02 10:18:12.000000000 -0500 @@ -0,0 +1,31 @@ +#!/bin/bash +# Shell wrapper for FSF gdb + +if [ $UID != 0 ]; then + codesign --verify @FINKPREFIX@/lib/fsf-gdb/fsf-gdb + if [ $? -eq 1 ]; then + echo "" + echo "The fsf-gdb binary must be codesigned to run as non-root." + echo "If Keychain certificate has been created as described in" + echo "the DescUsage section of the gdb.info packaging file," + echo "execute 'sudo codesign -s gdb-cert @FINKPREFIX@/lib/fsf-gdb/fsf-gdb'." + exit 1 + fi + if [ "`uname -r | cut -d. -f1`" -ge "12" ]; then + plistfile=/System/Library/LaunchDaemons/com.apple.taskgated.plist + if [ !`grep "-sp" $plistfile` ] && [ !`grep "-ps" $plistfile` ] ; then + echo "Non-root gdb use requires /System/Library/LaunchDaemons/com.apple.taskgated.plist" + echo "to pass -p. Change the line..." + echo " string>-s" + echo "to...\n" + echo " string>-sp" + echo "A restart is required due to kernel caching for the change to take effect." + if [ "`uname -r | cut -d. -f1`" -ge "15" ]; then + echo "SIP will need to be temporarily disabled to edit this file." + fi + exit 1 + fi + fi +fi + +exec @FINKPREFIX@/lib/fsf-gdb/fsf-gdb "${@}" diff -uNr gdb-7.11.orig/gdb/compile/compile-loc2c.c gdb-7.11/gdb/compile/compile-loc2c.c --- gdb-7.11.orig/gdb/compile/compile-loc2c.c 2016-02-09 22:19:39.000000000 -0500 +++ gdb-7.11/gdb/compile/compile-loc2c.c 2016-03-02 10:18:54.000000000 -0500 @@ -668,7 +668,7 @@ while (op_ptr < op_end) { enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr; - uint64_t uoffset, reg; + uint64_t uoffset = 0, reg; int64_t offset; print_spaces (indent - 2, stream);