diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2013-12-04 14:53:36 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2013-12-04 06:53:36 -0800 |
commit | 3bd7b086fdd32ce44e735929351bfbc832e5bfaa (patch) | |
tree | 4b10e399d12e88199b5297e69184574fb0ede80d | |
parent | ecd78fc9ab2350579bfdcd25676a2864bbf4b04b (diff) | |
download | gcc-3bd7b086fdd32ce44e735929351bfbc832e5bfaa.zip gcc-3bd7b086fdd32ce44e735929351bfbc832e5bfaa.tar.gz gcc-3bd7b086fdd32ce44e735929351bfbc832e5bfaa.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rwxr-xr-x | gcc/configure | 8 | ||||
-rw-r--r-- | gcc/configure.ac | 8 | ||||
-rw-r--r-- | gcc/gdbasan.in | 3 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 081787c..b34c5f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/configure b/gcc/configure index fdf0cd0..9e92c63 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 91a22d5..5cf3825 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 0000000..cf05825 --- /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 |