aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dwarf2read.c6
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S2
4 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8368c07..7325047 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ PR symtab/13777
+ * dwarf2read.c (process_full_comp_unit): Set LOCATIONS_VALID only for
+ GCC >=4.5.
+
2012-03-16 Chris January <chris.january@allinea.com>
* tui-tui.win.c (tui_resize_all): Use erase and clearok instead
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7944e0f..2eb5f40 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4868,7 +4868,9 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
/* GCC-4.0 has started to support -fvar-tracking. GCC-3.x still can
produce DW_AT_location with location lists but it can be possibly
- invalid without -fvar-tracking.
+ invalid without -fvar-tracking. Still up to GCC-4.4.x incl. 4.4.0
+ there were bugs in prologue debug info, fixed later in GCC-4.5
+ by "unwind info for epilogues" patch (which is not directly related).
For -gdwarf-4 type units LOCATIONS_VALID indication is fortunately not
needed, it would be wrong due to missing DW_AT_producer there.
@@ -4876,7 +4878,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
Still one can confuse GDB by using non-standard GCC compilation
options - this waits on GCC PR other/32998 (-frecord-gcc-switches).
*/
- if (cu->has_loclist && gcc_4_minor >= 0)
+ if (cu->has_loclist && gcc_4_minor >= 5)
symtab->locations_valid = 1;
if (gcc_4_minor >= 5)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f4a75dd..eacbbba 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ PR symtab/13777
+ * gdb.dwarf2/dw2-skip-prologue.S (DW_AT_producer): Set it to 4.5.0.
+
2012-03-16 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/set_pckd_arr_elt: New testcase.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
index 1d2c006..725c694 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
@@ -30,7 +30,7 @@
.4byte func_start /* DW_AT_low_pc */
.4byte func_end /* DW_AT_high_pc */
.ascii "main.c\0" /* DW_AT_name */
- .ascii "GNU C 4.0.0\0" /* DW_AT_producer must be >= 4.0 */
+ .ascii "GNU C 4.5.0\0" /* DW_AT_producer must be >= 4.5 */
.byte 2 /* DW_AT_language (DW_LANG_C) */
.uleb128 2 /* Abbrev: DW_TAG_subprogram */