From: H.J. Lu Date: Wed, 4 Dec 2013 14:53:36 +0000 (+0000) Subject: Put a breakpoint on __asan_report_error for ASAN X-Git-Tag: releases/gcc-4.9.0~2289 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3bd7b086fdd32ce44e735929351bfbc832e5bfaa;p=thirdparty%2Fgcc.git Put a breakpoint on __asan_report_error for ASAN * configure.ac: Append gdbasan.in to .gdbinit if CFLAGS contains -fsanitize=address. * configure: Regenerated. * gdbasan.in: New file. From-SVN: r205669 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 081787c094fd..b34c5f80af7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2013-12-04 H.J. Lu + + * configure.ac: Append gdbasan.in to .gdbinit if CFLAGS contains + -fsanitize=address. + * configure: Regenerated. + + * gdbasan.in: New file. + 2013-12-04 Jakub Jelinek PR rtl-optimization/58726 diff --git a/gcc/configure b/gcc/configure index fdf0cd0819b3..9e92c6390c51 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27508,6 +27508,14 @@ fi echo "source ${srcdir}/gdbinit.in" >> .gdbinit echo "python import sys; sys.path.append('${srcdir}'); import gdbhooks" >> .gdbinit +# Put a breakpoint on __asan_report_error to help with debugging buffer +# overflow. +case "$CFLAGS" in +*-fsanitize=address*) + echo "source ${srcdir}/gdbasan.in" >> .gdbinit + ;; +esac + gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' diff --git a/gcc/configure.ac b/gcc/configure.ac index 91a22d58cf75..5cf3825cda7c 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5245,6 +5245,14 @@ fi echo "source ${srcdir}/gdbinit.in" >> .gdbinit echo "python import sys; sys.path.append('${srcdir}'); import gdbhooks" >> .gdbinit +# Put a breakpoint on __asan_report_error to help with debugging buffer +# overflow. +case "$CFLAGS" in +*-fsanitize=address*) + echo "source ${srcdir}/gdbasan.in" >> .gdbinit + ;; +esac + gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' AC_SUBST(gcc_tooldir) AC_SUBST(dollar) diff --git a/gcc/gdbasan.in b/gcc/gdbasan.in new file mode 100644 index 000000000000..cf05825395b9 --- /dev/null +++ b/gcc/gdbasan.in @@ -0,0 +1,3 @@ +# Put a breakpoint on __asan_report_error to help with debugging buffer +# overflow. +b __asan_report_error