Disable -lmcheck in the development builds.

- Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
This commit is contained in:
Jan Kratochvil 2012-06-06 19:23:02 +02:00
parent 500c813e17
commit c382081360
4 changed files with 151 additions and 1 deletions

24
gdb-disable-mcheck.patch Normal file
View File

@ -0,0 +1,24 @@
diff -dup -rup gdb-7.4.50.20120603-orig/gdb/configure gdb-7.4.50.20120603/gdb/configure
--- gdb-7.4.50.20120603-orig/gdb/configure 2012-06-06 19:08:32.824824699 +0200
+++ gdb-7.4.50.20120603/gdb/configure 2012-06-06 19:12:12.346992423 +0200
@@ -2706,7 +2706,7 @@ fi
# Provide more thorough testing by -lmcheck.
# Set it to 'true' for development snapshots, 'false' for releases or
# pre-releases.
-development=true
+development=false
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
diff -dup -rup gdb-7.4.50.20120603-orig/gdb/configure.ac gdb-7.4.50.20120603/gdb/configure.ac
--- gdb-7.4.50.20120603-orig/gdb/configure.ac 2012-06-06 19:08:32.817824693 +0200
+++ gdb-7.4.50.20120603/gdb/configure.ac 2012-06-06 19:12:05.545987227 +0200
@@ -26,7 +26,7 @@ AM_MAINTAINER_MODE
# Provide more thorough testing by -lmcheck.
# Set it to 'true' for development snapshots, 'false' for releases or
# pre-releases.
-development=true
+development=false
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS

60
gdb-index-assert.patch Normal file
View File

@ -0,0 +1,60 @@
http://sourceware.org/ml/gdb-patches/2012-06/msg00109.html
Subject: [RFA] Fix inconsistency in blockvector addrmap vs non-addrmap handling
Hi.
I was seeing the assert in dw2_find_pc_sect_psymtab trigger
and traced it to the fact that when pending_addrmap_interesting gets
set blockvector.map is used instead of blockvector.block.
The difference is that blockvector.block contains entries for the global
and static blocks whereas pending_addrmap doesn't.
This patch fixes this by making them consistent.
I suspect more work is necessary (e.g. can symtabs "overlap" even though
the individual pieces do not?).
But I first want to fix the regression introduced by the change
to dw2_find_pc_sect_psymtab: There is more code in a symtab than is
documented by function and lexical block pc ranges (e.g. C++ method thunks).
Regression tested on amd64-linux, and by verifying the assert no longer
triggers in the testcase I was using.
Ok to commit?
Note that this obviates the need for the patch in:
http://sourceware.org/ml/gdb-patches/2012-05/msg00958.html
Also note that this accompanies this patch:
http://sourceware.org/ml/gdb-patches/2012-06/msg00105.html
2012-06-04 Doug Evans <dje@google.com>
* buildsym.c (end_symtab): Add the range of the static block to
the pending addrmap.
Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.97
diff -u -p -r1.97 buildsym.c
--- ./gdb/buildsym.c 29 May 2012 20:23:17 -0000 1.97
+++ ./gdb/buildsym.c 5 Jun 2012 00:26:01 -0000
@@ -1024,8 +1027,15 @@ end_symtab (CORE_ADDR end_addr, struct o
{
/* Define the STATIC_BLOCK & GLOBAL_BLOCK, and build the
blockvector. */
- finish_block (0, &file_symbols, 0, last_source_start_addr,
- end_addr, objfile);
+ struct block *static_block;
+
+ static_block = finish_block (0, &file_symbols, 0,
+ last_source_start_addr, end_addr,
+ objfile);
+ /* Mark the range of the static block so that if we end up using
+ blockvector.map then find_block_in_blockvector behaves identically
+ regardless of whether the addrmap is present. */
+ record_block_range (static_block, last_source_start_addr, end_addr - 1);
finish_block_internal (0, &global_symbols, 0, last_source_start_addr,
end_addr, objfile, 1);
blockvector = make_blockvector (objfile);

View File

@ -237,3 +237,57 @@ http://sourceware.org/ml/gdb-cvs/2012-06/msg00012.html
not_null_var_address my_global_symbol
not_null_var_address my_static_symbol
not_null_var_address my_global_func
http://sourceware.org/ml/gdb-cvs/2012-06/msg00047.html
### src/gdb/ChangeLog 2012/06/06 06:04:42 1.14330
### src/gdb/ChangeLog 2012/06/06 16:57:34 1.14331
## -1,3 +1,8 @@
+2012-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * configure.ac: Move development=true below AC_INIT.
+ * configure: Regenerate.
+
2012-06-05 Stan Shebs <stan@codesourcery.com>
* mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from
--- src/gdb/configure 2012/06/01 18:20:18 1.366
+++ src/gdb/configure 2012/06/06 16:57:36 1.367
@@ -2683,6 +2683,11 @@
+# Provide more thorough testing by -lmcheck.
+# Set it to 'true' for development snapshots, 'false' for releases or
+# pre-releases.
+development=true
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--- src/gdb/configure.ac 2012/06/01 18:20:18 1.177
+++ src/gdb/configure.ac 2012/06/06 16:57:38 1.178
@@ -18,16 +18,16 @@
dnl Process this file with autoconf to produce a configure script.
-dnl Provide more thorough testing by -lmcheck.
-dnl Set it to 'true' for development snapshots, 'false' for releases or
-dnl pre-releases.
-development=true
-
AC_PREREQ(2.59)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
AM_MAINTAINER_MODE
+# Provide more thorough testing by -lmcheck.
+# Set it to 'true' for development snapshots, 'false' for releases or
+# pre-releases.
+development=true
+
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
ACX_LARGEFILE

View File

@ -35,7 +35,7 @@ Version: 7.4.50.%{snap}
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@ -561,6 +561,12 @@ Patch692: gdb-dejagnu-go.patch
# Revert recent breakage of UNIX objfiles order for symbols lookup.
Patch693: gdb-objfile-order.patch
# Disable -lmcheck in the development builds.
Patch694: gdb-disable-mcheck.patch
# Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
Patch695: gdb-index-assert.patch
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
@ -847,6 +853,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch690 -p1
%patch692 -p1
%patch693 -p1
%patch694 -p1
%patch695 -p1
%patch393 -p1
%if 0%{!?el5:1} || 0%{?scl:1}
@ -1336,6 +1344,10 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog
* Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18
- Disable -lmcheck in the development builds.
- Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
* Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18
- Fix Release.
- Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg.