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
This commit is contained in:
H.J. Lu 2013-12-04 14:53:36 +00:00 committed by H.J. Lu
parent ecd78fc9ab
commit 3bd7b086fd
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2013-12-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.ac: Append gdbasan.in to .gdbinit if CFLAGS contains
-fsanitize=address.
* configure: Regenerated.
* gdbasan.in: New file.
2013-12-04 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/58726

8
gcc/configure vendored
View File

@ -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)'

View File

@ -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)

3
gcc/gdbasan.in Normal file
View File

@ -0,0 +1,3 @@
# Put a breakpoint on __asan_report_error to help with debugging buffer
# overflow.
b __asan_report_error