From 3de50895eb021a964d5f5372f150f946b109d630 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 23 Jun 2011 12:36:25 +0200 Subject: [PATCH] debugger: update our gdb patches Change-Id: I1c81b28ab22ec11dcef1f58030b5906f4fc6323c Reviewed-on: http://codereview.qt.nokia.com/652 Reviewed-by: Qt Sanity Bot Reviewed-by: hjk --- share/qtcreator/patches/README | 8 +++----- share/qtcreator/patches/gdb-expand-line-sal-maybe.patch | 16 ++++++++-------- share/qtcreator/patches/gdb-stepping-for-maemo.patch | 14 +++++++------- .../gdb-without-dwarf-name-canonicalization.patch | 2 +- .../patches/gdb-work-around-trk-single-step.patch | 2 +- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/share/qtcreator/patches/README b/share/qtcreator/patches/README index 1837285846..319a0c8305 100644 --- a/share/qtcreator/patches/README +++ b/share/qtcreator/patches/README @@ -1,26 +1,24 @@ +As baseline, d85391173658dc6dcbf1acc5edbe331b1296f572 (Mon Jun 20 17:53:28) +should be used. For Linux: - FSF 7.2 release + gdb-increased-dcache-line-size.patch For MinGW: - FSF 7.2 release + gdb-increased-dcache-line-size.patch + gdb-expand-line-sal-maybe.patch For Maemo targets: (--target=arm-none-linux-gnueabi) - FSF 7.2 release + gdb-increased-dcache-line-size.patch - + gdb-stepping-for-maemo.patch + // Don't use this: + gdb-stepping-for-maemo.patch For Symbian targets: (--target=arm-none-symbianelf) - FSF 7.2 release + gdb-increased-dcache-line-size.patch + gdb-work-around-trk-single-step.patch diff --git a/share/qtcreator/patches/gdb-expand-line-sal-maybe.patch b/share/qtcreator/patches/gdb-expand-line-sal-maybe.patch index dbac26ce3f..326589e738 100644 --- a/share/qtcreator/patches/gdb-expand-line-sal-maybe.patch +++ b/share/qtcreator/patches/gdb-expand-line-sal-maybe.patch @@ -83,7 +83,7 @@ Jan --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -7048,7 +7048,6 @@ expand_line_sal_maybe (struct symtab_and_line sal) +@@ -7532,7 +7532,6 @@ expand_line_sal_maybe (struct symtab_and_line sal) struct symtabs_and_lines expanded; CORE_ADDR original_pc = sal.pc; char *original_function = NULL; @@ -91,7 +91,7 @@ Jan int i; struct cleanup *old_chain; -@@ -7131,17 +7130,8 @@ expand_line_sal_maybe (struct symtab_and_line sal) +@@ -7616,17 +7615,8 @@ expand_line_sal_maybe (struct symtab_and_line sal) return expanded; } @@ -99,11 +99,11 @@ Jan - { - found = 0; - for (i = 0; i < expanded.nelts; ++i) -- if (expanded.sals[i].pc == original_pc) -- { -- found = 1; -- break; -- } +- if (expanded.sals[i].pc == original_pc) +- { +- found = 1; +- break; +- } - gdb_assert (found); - } + /* ORIGINAL_PC may not be found between EXPANDED.SALS. expand_line_sal may @@ -113,7 +113,7 @@ Jan } --- a/gdb/symtab.c +++ b/gdb/symtab.c -@@ -4636,11 +4636,20 @@ expand_line_sal (struct symtab_and_line sal) +@@ -4750,11 +4750,20 @@ expand_line_sal (struct symtab_and_line sal) blocks = alloca (ret.nelts * sizeof (struct block *)); for (i = 0; i < ret.nelts; ++i) { diff --git a/share/qtcreator/patches/gdb-stepping-for-maemo.patch b/share/qtcreator/patches/gdb-stepping-for-maemo.patch index 491bf8b178..755e35de64 100644 --- a/share/qtcreator/patches/gdb-stepping-for-maemo.patch +++ b/share/qtcreator/patches/gdb-stepping-for-maemo.patch @@ -1,17 +1,17 @@ +NOTE: This relates to http://sourceware.org/bugzilla/show_bug.cgi?id=11497 + +Not clear whether the patch is needed at all. + --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -4126,7 +4127,9 @@ infrun: not switching back to stepped thread, it has vanished\n"); +@@ -4627,7 +4627,9 @@ process_event_stop_test: if (execution_direction != EXEC_REVERSE - && ecs->event_thread->step_over_calls == STEP_OVER_UNDEBUGGABLE + && ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE - && in_solib_dynsym_resolve_code (stop_pc)) + && in_solib_dynsym_resolve_code (stop_pc) + && !(ecs->event_thread->step_range_start > 1 + && in_solib_dynsym_resolve_code (ecs->event_thread->step_range_start))) { CORE_ADDR pc_after_resolver = - gdbarch_skip_solib_resolver (gdbarch, stop_pc); - ------------------------------------------------------------------------- - -NOTE: This relates to http://sourceware.org/bugzilla/show_bug.cgi?id=11497 + gdbarch_skip_solib_resolver (gdbarch, stop_pc); diff --git a/share/qtcreator/patches/gdb-without-dwarf-name-canonicalization.patch b/share/qtcreator/patches/gdb-without-dwarf-name-canonicalization.patch index a762d77b8c..701258c572 100644 --- a/share/qtcreator/patches/gdb-without-dwarf-name-canonicalization.patch +++ b/share/qtcreator/patches/gdb-without-dwarf-name-canonicalization.patch @@ -8,7 +8,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a05c946..761fa34 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -9097,7 +9097,7 @@ static char * +@@ -12157,7 +12157,7 @@ static char * dwarf2_canonicalize_name (char *name, struct dwarf2_cu *cu, struct obstack *obstack) { diff --git a/share/qtcreator/patches/gdb-work-around-trk-single-step.patch b/share/qtcreator/patches/gdb-work-around-trk-single-step.patch index 6c4e791d82..069bc82a78 100644 --- a/share/qtcreator/patches/gdb-work-around-trk-single-step.patch +++ b/share/qtcreator/patches/gdb-work-around-trk-single-step.patch @@ -9,7 +9,7 @@ this problem. --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -4754,9 +4754,9 @@ infrun: not switching back to stepped thread, it has vanished\n"); +@@ -5061,9 +5061,9 @@ process_event_stop_test: return; } -- 2.11.0