diff --git a/gdb-6.3-rh-testversion-20041202.patch b/gdb-6.3-rh-testversion-20041202.patch
index cf25bcd..25a1357 100644
--- a/gdb-6.3-rh-testversion-20041202.patch
+++ b/gdb-6.3-rh-testversion-20041202.patch
@@ -11,8 +11,8 @@ Index: gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
pass "printed version with cast"
}
-+ -re ".\[0-9\]+ = .Fedora \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
-+ pass "printed version Fedora only"
++ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
++ pass "printed version Fedora or Red Hat Enterprise Linux only"
+ }
-re ".*$gdb_prompt $" { fail "printed version" }
timeout { fail "(timeout) printed version" }
diff --git a/gdb-6.8-inlining-addon.patch b/gdb-6.8-inlining-addon.patch
index 4edcd1a..7e899ca 100644
--- a/gdb-6.8-inlining-addon.patch
+++ b/gdb-6.8-inlining-addon.patch
@@ -236,19 +236,19 @@ Index: gdb-6.8.91.20090917/gdb/breakpoint.c
{
int value_is_zero = 0;
-@@ -3383,6 +3398,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
- bs->print = 0;
- }
- bs->commands = copy_command_lines (bs->commands);
+@@ -3399,6 +3399,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+ bs->print = 0;
+ }
+ bs->commands = copy_command_lines (bs->commands);
+
-+ /* Display the innermost inlined frame at a breakpont as it gives to
-+ most of the available information. */
-+ if (b->type != bp_until && b->type != bp_finish)
-+ while (inline_skipped_frames (ptid))
-+ step_into_inline_frame (ptid);
- }
++ /* Display the innermost inlined frame at a breakpont as it gives to
++ most of the available information. */
++ if (b->type != bp_until && b->type != bp_finish)
++ while (inline_skipped_frames (ptid))
++ step_into_inline_frame (ptid);
+ }
- /* Print nothing for this entry if we dont stop or if we dont print. */
+ /* Print nothing for this entry if we dont stop or if we dont print. */
@@ -5572,9 +5593,9 @@ set_momentary_breakpoint (struct gdbarch
{
struct breakpoint *b;
diff --git a/gdb-archer.patch b/gdb-archer.patch
index 330c50d..8986b25 100644
--- a/gdb-archer.patch
+++ b/gdb-archer.patch
@@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/ArcherBranchManagement
GIT snapshot:
-commit 16276c1aad1366b92e687c72cab30192280e1906
+commit 200516d5be8a1cab02f0b18d607d1c1fb9cfa3e7
branch `archer' - the merge of branches:
archer-tromey-call-frame-cfa
@@ -7626,7 +7626,7 @@ index 6e79d4a..198bae3 100644
default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
elf_symfile_segments, /* sym_segments: Get segment information from
diff --git a/gdb/eval.c b/gdb/eval.c
-index 2926465..4c6de78 100644
+index 2926465..b53f895 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -39,8 +39,12 @@
@@ -7767,17 +7767,23 @@ index 2926465..4c6de78 100644
}
else if (op == OP_VAR_VALUE)
{
-@@ -1549,7 +1601,10 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -1549,6 +1601,8 @@ evaluate_subexp_standard (struct type *expect_type,
/* First determine the type code we are dealing with. */
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ old_chain = make_cleanup (null_cleanup, 0);
+ object_address_set (value_raw_address (arg1));
type = check_typedef (value_type (arg1));
-+ do_cleanups (old_chain);
code = TYPE_CODE (type);
- if (code == TYPE_CODE_PTR)
+@@ -1569,6 +1623,7 @@ evaluate_subexp_standard (struct type *expect_type,
+ code = TYPE_CODE (type);
+ }
+ }
++ do_cleanups (old_chain);
+
+ switch (code)
+ {
@@ -1716,6 +1771,37 @@ evaluate_subexp_standard (struct type *expect_type,
error (_("non-pointer-to-member value used in pointer-to-member construct"));
}
@@ -7858,7 +7864,10 @@ index 2926465..4c6de78 100644
- offset_item = subscript_array[ndimensions - 1];
+ offset_item = 0;
+ offset_byte = 0;
-+
+
+- for (i = ndimensions - 1; i > 0; --i)
+- offset_item =
+- array_size_array[i - 1] * offset_item + subscript_array[i - 1];
+ for (i = ndimensions - 1; i >= 0; --i)
+ {
+ offset_item *= array_size_array[i];
@@ -7867,10 +7876,7 @@ index 2926465..4c6de78 100644
+ else
+ offset_byte += subscript_array[i] * byte_stride_array[i];
+ }
-
-- for (i = ndimensions - 1; i > 0; --i)
-- offset_item =
-- array_size_array[i - 1] * offset_item + subscript_array[i - 1];
++
+ element_size = TYPE_LENGTH (TYPE_TARGET_TYPE (tmp_type));
+ offset_byte += offset_item * element_size;
@@ -7885,7 +7891,74 @@ index 2926465..4c6de78 100644
}
case BINOP_LOGICAL_AND:
-@@ -2598,7 +2705,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
+@@ -2291,14 +2398,22 @@ evaluate_subexp_standard (struct type *expect_type,
+ if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
+ expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
+ arg1 = evaluate_subexp (expect_type, exp, pos, noside);
++ old_chain = make_cleanup (null_cleanup, 0);
++ object_address_set (value_raw_address (arg1));
+ type = check_typedef (value_type (arg1));
+ if (TYPE_CODE (type) == TYPE_CODE_METHODPTR
+ || TYPE_CODE (type) == TYPE_CODE_MEMBERPTR)
+ error (_("Attempt to dereference pointer to member without an object"));
+ if (noside == EVAL_SKIP)
+- goto nosideret;
++ {
++ do_cleanups (old_chain);
++ goto nosideret;
++ }
+ if (unop_user_defined_p (op, arg1))
+- return value_x_unop (arg1, op, noside);
++ {
++ do_cleanups (old_chain);
++ return value_x_unop (arg1, op, noside);
++ }
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ {
+ type = check_typedef (value_type (arg1));
+@@ -2307,12 +2422,18 @@ evaluate_subexp_standard (struct type *expect_type,
+ /* In C you can dereference an array to get the 1st elt. */
+ || TYPE_CODE (type) == TYPE_CODE_ARRAY
+ )
+- return value_zero (TYPE_TARGET_TYPE (type),
+- lval_memory);
++ {
++ do_cleanups (old_chain);
++ return value_zero (TYPE_TARGET_TYPE (type),
++ lval_memory);
++ }
+ else if (TYPE_CODE (type) == TYPE_CODE_INT)
+- /* GDB allows dereferencing an int. */
+- return value_zero (builtin_type (exp->gdbarch)->builtin_int,
+- lval_memory);
++ {
++ do_cleanups (old_chain);
++ /* GDB allows dereferencing an int. */
++ return value_zero (builtin_type (exp->gdbarch)->builtin_int,
++ lval_memory);
++ }
+ else
+ error (_("Attempt to take contents of a non-pointer value."));
+ }
+@@ -2322,9 +2443,14 @@ evaluate_subexp_standard (struct type *expect_type,
+ do. "long long" variables are rare enough that
+ BUILTIN_TYPE_LONGEST would seem to be a mistake. */
+ if (TYPE_CODE (type) == TYPE_CODE_INT)
+- return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
+- (CORE_ADDR) value_as_address (arg1));
+- return value_ind (arg1);
++ {
++ do_cleanups (old_chain);
++ return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
++ (CORE_ADDR) value_as_address (arg1));
++ }
++ arg1 = value_ind (arg1);
++ do_cleanups (old_chain);
++ return arg1;
+
+ case UNOP_ADDR:
+ /* C++: check for and handle pointer to members. */
+@@ -2598,7 +2724,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
(*pos) += 5 + BYTES_TO_EXP_ELEM (tem + 1);
x = value_aggregate_elt (exp->elts[pc + 1].type,
&exp->elts[pc + 3].string,
@@ -7894,7 +7967,7 @@ index 2926465..4c6de78 100644
if (x == NULL)
error (_("There is no field named %s"), &exp->elts[pc + 3].string);
return x;
-@@ -2643,7 +2750,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -2643,7 +2769,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
{
enum exp_opcode op;
int pc;
@@ -7903,7 +7976,7 @@ index 2926465..4c6de78 100644
struct symbol *var;
struct type *type;
-@@ -2654,12 +2761,17 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -2654,12 +2780,17 @@ evaluate_subexp_with_coercion (struct expression *exp,
{
case OP_VAR_VALUE:
var = exp->elts[pc + 2].symbol;
@@ -7922,7 +7995,7 @@ index 2926465..4c6de78 100644
return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
val);
}
-@@ -2711,9 +2823,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
+@@ -2711,9 +2842,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
case OP_VAR_VALUE:
(*pos) += 4;
@@ -20541,6 +20614,590 @@ index 0000000..98b2e79
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */
+diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
+new file mode 100644
+index 0000000..83faaf6
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
+@@ -0,0 +1,457 @@
++ .file "x86_64-vla-pointer.c"
++ .section .debug_abbrev,"",@progbits
++.Ldebug_abbrev0:
++ .section .debug_info,"",@progbits
++.Ldebug_info0:
++ .section .debug_line,"",@progbits
++.Ldebug_line0:
++ .text
++.Ltext0:
++.globl foo
++ .type foo, @function
++foo:
++.LFB2:
++ .file 1 "x86_64-vla-pointer.c"
++ .loc 1 22 0
++ pushq %rbp
++.LCFI0:
++ movq %rsp, %rbp
++.LCFI1:
++ subq $64, %rsp
++.LCFI2:
++ movl %edi, -36(%rbp)
++ .loc 1 22 0
++ movq %rsp, %rax
++ movq %rax, -48(%rbp)
++ .loc 1 23 0
++ movl -36(%rbp), %edx
++ movslq %edx,%rax
++ subq $1, %rax
++ movq %rax, -24(%rbp)
++ .loc 1 24 0
++ movslq %edx,%rax
++ addq $15, %rax
++ addq $15, %rax
++ shrq $4, %rax
++ salq $4, %rax
++ subq %rax, %rsp
++ movq %rsp, -56(%rbp)
++ movq -56(%rbp), %rax
++ addq $15, %rax
++ shrq $4, %rax
++ salq $4, %rax
++ movq %rax, -56(%rbp)
++ movq -56(%rbp), %rax
++ movq %rax, -16(%rbp)
++ .loc 1 27 0
++ movl $0, -4(%rbp)
++ jmp .L2
++.L3:
++ .loc 1 28 0
++ movl -4(%rbp), %esi
++ movl -4(%rbp), %eax
++ movl %eax, %ecx
++ movq -16(%rbp), %rdx
++ movslq %esi,%rax
++ movb %cl, (%rdx,%rax)
++ .loc 1 27 0
++ addl $1, -4(%rbp)
++.L2:
++ movl -4(%rbp), %eax
++ cmpl -36(%rbp), %eax
++ jl .L3
++ .loc 1 30 0
++ .globl break_here
++break_here:
++ movq -16(%rbp), %rax
++ movb $0, (%rax)
++ movq -48(%rbp), %rsp
++ .loc 1 31 0
++ leave
++ ret
++.LFE2:
++ .size foo, .-foo
++ .section .debug_frame,"",@progbits
++.Lframe0:
++ .long .LECIE0-.LSCIE0
++.LSCIE0:
++ .long 0xffffffff
++ .byte 0x1
++ .string ""
++ .uleb128 0x1
++ .sleb128 -8
++ .byte 0x10
++ .byte 0xc
++ .uleb128 0x7
++ .uleb128 0x8
++ .byte 0x90
++ .uleb128 0x1
++ .align 8
++.LECIE0:
++.LSFDE0:
++ .long .LEFDE0-.LASFDE0
++.LASFDE0:
++ .long .Lframe0
++ .quad .LFB2
++ .quad .LFE2-.LFB2
++ .byte 0x4
++ .long .LCFI0-.LFB2
++ .byte 0xe
++ .uleb128 0x10
++ .byte 0x86
++ .uleb128 0x2
++ .byte 0x4
++ .long .LCFI1-.LCFI0
++ .byte 0xd
++ .uleb128 0x6
++ .align 8
++.LEFDE0:
++ .section .eh_frame,"a",@progbits
++.Lframe1:
++ .long .LECIE1-.LSCIE1
++.LSCIE1:
++ .long 0x0
++ .byte 0x1
++ .string "zR"
++ .uleb128 0x1
++ .sleb128 -8
++ .byte 0x10
++ .uleb128 0x1
++ .byte 0x3
++ .byte 0xc
++ .uleb128 0x7
++ .uleb128 0x8
++ .byte 0x90
++ .uleb128 0x1
++ .align 8
++.LECIE1:
++.LSFDE1:
++ .long .LEFDE1-.LASFDE1
++.LASFDE1:
++ .long .LASFDE1-.Lframe1
++ .long .LFB2
++ .long .LFE2-.LFB2
++ .uleb128 0x0
++ .byte 0x4
++ .long .LCFI0-.LFB2
++ .byte 0xe
++ .uleb128 0x10
++ .byte 0x86
++ .uleb128 0x2
++ .byte 0x4
++ .long .LCFI1-.LCFI0
++ .byte 0xd
++ .uleb128 0x6
++ .align 8
++.LEFDE1:
++ .text
++.Letext0:
++ .section .debug_loc,"",@progbits
++.Ldebug_loc0:
++.LLST0:
++ .quad .LFB2-.Ltext0
++ .quad .LCFI0-.Ltext0
++ .value 0x2
++ .byte 0x77
++ .sleb128 8
++ .quad .LCFI0-.Ltext0
++ .quad .LCFI1-.Ltext0
++ .value 0x2
++ .byte 0x77
++ .sleb128 16
++ .quad .LCFI1-.Ltext0
++ .quad .LFE2-.Ltext0
++ .value 0x2
++ .byte 0x76
++ .sleb128 16
++ .quad 0x0
++ .quad 0x0
++ .section .debug_info
++.Ldebug_relative:
++ .long .Ldebug_end - .Ldebug_start
++.Ldebug_start:
++ .value 0x2
++ .long .Ldebug_abbrev0
++ .byte 0x8
++ .uleb128 0x1
++ .long .LASF2
++ .byte 0x1
++ .long .LASF3
++ .long .LASF4
++ .quad .Ltext0
++ .quad .Letext0
++ .long .Ldebug_line0
++ .uleb128 0x2
++ .byte 0x1
++ .string "foo"
++ .byte 0x1
++ .byte 0x16
++ .byte 0x1
++ .quad .LFB2
++ .quad .LFE2
++ .long .LLST0
++ .long .Ltype_int - .Ldebug_relative
++ .uleb128 0x3
++ .long .LASF5
++ .byte 0x1
++ .byte 0x15
++ .long .Ltype_int - .Ldebug_relative
++ .byte 0x2
++ .byte 0x91
++ .sleb128 -52
++.Ltag_pointer:
++ .uleb128 0x4
++ .byte 0x8 /* DW_AT_byte_size */
++ .long .Ltag_array_type - .debug_info /* DW_AT_type */
++ .uleb128 0x5 /* Abbrev Number: 5 (DW_TAG_variable) */
++ .long .LASF0
++ .byte 0x1
++ .byte 0x18
++#if 1
++ .long .Ltag_pointer - .debug_info
++#else
++ /* Debugging only: Skip the typedef indirection. */
++ .long .Ltag_array_type - .debug_info
++#endif
++ /* DW_AT_location: DW_FORM_block1: start */
++ .byte 0x3
++ .byte 0x91
++ .sleb128 -32
++#if 0
++ .byte 0x6 /* DW_OP_deref */
++#else
++ .byte 0x96 /* DW_OP_nop */
++#endif
++ /* DW_AT_location: DW_FORM_block1: end */
++ .uleb128 0x6
++ .string "i"
++ .byte 0x1
++ .byte 0x19
++ .long .Ltype_int - .Ldebug_relative
++ .byte 0x2
++ .byte 0x91
++ .sleb128 -20
++ .byte 0x0
++.Ltype_int:
++ .uleb128 0x7
++ .byte 0x4
++ .byte 0x5
++ .string "int"
++.Ltag_array_type:
++ .uleb128 0x8 /* Abbrev Number: 8 (DW_TAG_array_type) */
++ .long .Ltype_char - .Ldebug_relative
++ .long .Ltype_ulong - .Ldebug_relative /* DW_AT_sibling: DW_FORM_ref4 */
++1: /* DW_AT_data_location: DW_FORM_block1: start */
++ .byte 2f - 3f /* length */
++3:
++ .byte 0x97 /* DW_OP_push_object_address */
++#if 1
++ .byte 0x6 /* DW_OP_deref */
++#else
++ .byte 0x96 /* DW_OP_nop */
++#endif
++2: /* DW_AT_data_location: DW_FORM_block1: end */
++ .uleb128 0x9
++ .long .Ltype_char - .Ldebug_relative /* DW_AT_type: DW_FORM_ref4 */
++ .byte 0x3
++ .byte 0x91
++ .sleb128 -40
++ .byte 0x6
++ .byte 0x0
++.Ltype_ulong:
++ .uleb128 0xa
++ .byte 0x8
++ .byte 0x7
++.Ltype_char:
++ .uleb128 0xb
++ .byte 0x1
++ .byte 0x6
++ .long .LASF1
++ .byte 0x0
++.Ldebug_end:
++ .section .debug_abbrev
++ .uleb128 0x1
++ .uleb128 0x11
++ .byte 0x1
++ .uleb128 0x25
++ .uleb128 0xe
++ .uleb128 0x13
++ .uleb128 0xb
++ .uleb128 0x3
++ .uleb128 0xe
++ .uleb128 0x1b
++ .uleb128 0xe
++ .uleb128 0x11
++ .uleb128 0x1
++ .uleb128 0x12
++ .uleb128 0x1
++ .uleb128 0x10
++ .uleb128 0x6
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x2
++ .uleb128 0x2e
++ .byte 0x1
++ .uleb128 0x3f
++ .uleb128 0xc
++ .uleb128 0x3
++ .uleb128 0x8
++ .uleb128 0x3a
++ .uleb128 0xb
++ .uleb128 0x3b
++ .uleb128 0xb
++ .uleb128 0x27
++ .uleb128 0xc
++ .uleb128 0x11
++ .uleb128 0x1
++ .uleb128 0x12
++ .uleb128 0x1
++ .uleb128 0x40
++ .uleb128 0x6
++ .uleb128 0x1
++ .uleb128 0x13
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x3
++ .uleb128 0x5
++ .byte 0x0
++ .uleb128 0x3
++ .uleb128 0xe
++ .uleb128 0x3a
++ .uleb128 0xb
++ .uleb128 0x3b
++ .uleb128 0xb
++ .uleb128 0x49
++ .uleb128 0x13
++ .uleb128 0x2
++ .uleb128 0xa
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x4 /* .Ltag_pointer abbrev */
++ .uleb128 0x0f /* DW_TAG_pointer_type */
++ .byte 0x0
++ .uleb128 0x0b
++ .uleb128 0xb
++ .uleb128 0x49
++ .uleb128 0x13
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x5
++ .uleb128 0x34
++ .byte 0x0
++ .uleb128 0x3
++ .uleb128 0xe
++ .uleb128 0x3a
++ .uleb128 0xb
++ .uleb128 0x3b
++ .uleb128 0xb
++ .uleb128 0x49
++ .uleb128 0x13
++ .uleb128 0x2
++ .uleb128 0xa
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x6
++ .uleb128 0x34
++ .byte 0x0
++ .uleb128 0x3
++ .uleb128 0x8
++ .uleb128 0x3a
++ .uleb128 0xb
++ .uleb128 0x3b
++ .uleb128 0xb
++ .uleb128 0x49
++ .uleb128 0x13
++ .uleb128 0x2
++ .uleb128 0xa
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x7
++ .uleb128 0x24
++ .byte 0x0
++ .uleb128 0xb
++ .uleb128 0xb
++ .uleb128 0x3e
++ .uleb128 0xb
++ .uleb128 0x3
++ .uleb128 0x8
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x8 /* Abbrev Number: 8 (DW_TAG_array_type) */
++ .uleb128 0x1
++ .byte 0x1
++ .uleb128 0x49 /* DW_AT_type */
++ .uleb128 0x13 /* DW_FORM_ref4 */
++ .uleb128 0x1 /* DW_AT_sibling */
++ .uleb128 0x13 /* DW_FORM_ref4 */
++ .uleb128 0x50 /* DW_AT_data_location */
++ .uleb128 0xa /* DW_FORM_block1 */
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0x9
++ .uleb128 0x21
++ .byte 0x0
++ .uleb128 0x49 /* DW_AT_type */
++ .uleb128 0x13 /* DW_FORM_ref4 */
++ .uleb128 0x2f
++ .uleb128 0xa
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0xa
++ .uleb128 0x24
++ .byte 0x0
++ .uleb128 0xb
++ .uleb128 0xb
++ .uleb128 0x3e
++ .uleb128 0xb
++ .byte 0x0
++ .byte 0x0
++ .uleb128 0xb
++ .uleb128 0x24
++ .byte 0x0
++ .uleb128 0xb
++ .uleb128 0xb
++ .uleb128 0x3e
++ .uleb128 0xb
++ .uleb128 0x3
++ .uleb128 0xe
++ .byte 0x0
++ .byte 0x0
++ .byte 0x0
++ .section .debug_pubnames,"",@progbits
++ .long 0x16
++ .value 0x2
++ .long .Ldebug_info0
++ .long 0xa8
++ .long 0x2d
++ .string "foo"
++ .long 0x0
++ .section .debug_aranges,"",@progbits
++ .long 0x2c
++ .value 0x2
++ .long .Ldebug_info0
++ .byte 0x8
++ .byte 0x0
++ .value 0x0
++ .value 0x0
++ .quad .Ltext0
++ .quad .Letext0-.Ltext0
++ .quad 0x0
++ .quad 0x0
++ .section .debug_str,"MS",@progbits,1
++.LASF0:
++ .string "array"
++.LASF5:
++ .string "size"
++.LASF3:
++ .string "x86_64-vla-pointer.c"
++.LASF6:
++ .string "array_t"
++.LASF1:
++ .string "char"
++.LASF4:
++ .string "gdb.arch"
++.LASF2:
++ .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
++ .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
++ .section .note.GNU-stack,"",@progbits
+diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
+new file mode 100644
+index 0000000..fe2c8f7
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
+@@ -0,0 +1,43 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2009 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see . */
++
++#if 0
++
++void
++foo (int size)
++{
++ typedef char array_t[size];
++ array_t array;
++ int i;
++
++ for (i = 0; i < size; i++)
++ array[i] = i;
++
++ array[0] = 0; /* break-here */
++}
++
++#else
++
++int
++main (void)
++{
++ foo (26);
++ foo (78);
++ return 0;
++}
++
++#endif
+diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
+new file mode 100644
+index 0000000..d243cf1
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
+@@ -0,0 +1,66 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see .
++
++if ![istarget "x86_64-*-*"] then {
++ verbose "Skipping over gdb.arch/x86_64-vla-pointer.exp test made only for x86_64."
++ return
++}
++
++set testfile x86_64-vla-pointer
++set srcasmfile ${testfile}-foo.S
++set srcfile ${testfile}.c
++set binfile ${objdir}/${subdir}/${testfile}
++set binobjfile ${objdir}/${subdir}/${testfile}-foo.o
++if { [gdb_compile "${srcdir}/${subdir}/${srcasmfile}" "${binobjfile}" object {}] != "" } {
++ untested "Couldn't compile test program"
++ return -1
++}
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${binobjfile}" "${binfile}" executable {debug}] != "" } {
++ untested "Couldn't compile test program"
++ return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++if ![runto_main] {
++ untested x86_64-vla-pointer
++ return -1
++}
++
++gdb_breakpoint "break_here"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "first: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[26\\\]" "first: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[26\\\]" "first: whatis *array"
++gdb_test "ptype *array" "type = char \\\[26\\\]" "first: ptype *array"
++
++gdb_test "p (*array)\[1\]" "\\$\[0-9\] = 1 '\\\\001'"
++gdb_test "p (*array)\[2\]" "\\$\[0-9\] = 2 '\\\\002'"
++gdb_test "p (*array)\[3\]" "\\$\[0-9\] = 3 '\\\\003'"
++gdb_test "p (*array)\[4\]" "\\$\[0-9\] = 4 '\\\\004'"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "second: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[78\\\]" "second: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[78\\\]" "second: whatis *array"
++gdb_test "ptype *array" "type = char \\\[78\\\]" "second: ptype *array"
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
new file mode 100644
index 0000000..66f7a39
diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch
new file mode 100644
index 0000000..39cac0d
--- /dev/null
+++ b/gdb-bz533176-fortran-omp-step.patch
@@ -0,0 +1,115 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4
+
+I find it a bug in DWARF and gdb behaves correctly according to it. From the
+current DWARF's point of view the is a function call which you skip by "next".
+
+If you hide any /usr/lib/debug such as using:
+gdb -nx -ex 'set debug-file-directory /qwe' -ex 'file ./tpcommon_gfortran44'
+and use "step" command instead of "next" there it will work.
+(You need to hide debuginfo from libgomp as you would step into libgomp sources
+to maintain the threads for execution.)
+
+There should be some DWARF extension for it, currently tried to detect
+substring ".omp_fn." as this function is called "MAIN__.omp_fn.0" and do not
+consider such sub-function as a skippable by "next".
+
+Another problem is that with "set scheduler-locking" being "off" (default
+upstream) or "step" (default in F/RHEL) the simultaneous execution of the
+threads is inconvenient. Setting it to "on" will lockup the debugging as the
+threads need to get synchronized at some point. This is a more general
+debugging problem of GOMP outside of the scope of this Bug.
+
+
+
+--- ./gdb/infrun.c 2009-12-09 22:03:33.000000000 +0100
++++ ./gdb/infrun.c 2009-12-09 22:29:56.000000000 +0100
+@@ -3994,6 +3994,12 @@ infrun: not switching back to stepped th
+
+ if (ecs->event_thread->step_over_calls == STEP_OVER_ALL)
+ {
++ struct symbol *stop_fn = find_pc_function (stop_pc);
++
++ if (stop_fn == NULL
++ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
++{ /* ".omp_fn." */
++
+ /* We're doing a "next".
+
+ Normal (forward) execution: set a breakpoint at the
+@@ -4020,6 +4026,7 @@ infrun: not switching back to stepped th
+
+ keep_going (ecs);
+ return;
++} /* ".omp_fn." */
+ }
+
+ /* If we are in a function call trampoline (a stub between the
+--- ./gdb/testsuite/gdb.fortran/omp-step.exp 1970-01-01 01:00:00.000000000 +0100
++++ ./gdb/testsuite/gdb.fortran/omp-step.exp 2009-12-09 22:31:04.000000000 +0100
+@@ -0,0 +1,31 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see .
++
++set testfile "omp-step"
++set srcfile ${testfile}.f90
++if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
++ return -1
++}
++
++if ![runto [gdb_get_line_number "start-here"]] {
++ perror "Couldn't run to start-here"
++ return 0
++}
++
++gdb_test "next" {!\$omp parallel} "step closer"
++gdb_test "next" {a\(omp_get_thread_num\(\) \+ 1\) = 1} "step into omp"
++
++gdb_breakpoint [gdb_get_line_number "success"]
++gdb_continue_to_breakpoint "success" ".*success.*"
+--- ./gdb/testsuite/gdb.fortran/omp-step.f90 1970-01-01 01:00:00.000000000 +0100
++++ ./gdb/testsuite/gdb.fortran/omp-step.f90 2009-12-09 22:25:35.000000000 +0100
+@@ -0,0 +1,32 @@
++! Copyright 2009 Free Software Foundation, Inc.
++
++! This program is free software; you can redistribute it and/or modify
++! it under the terms of the GNU General Public License as published by
++! the Free Software Foundation; either version 3 of the License, or
++! (at your option) any later version.
++!
++! This program is distributed in the hope that it will be useful,
++! but WITHOUT ANY WARRANTY; without even the implied warranty of
++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++! GNU General Public License for more details.
++!
++! You should have received a copy of the GNU General Public License
++! along with this program. If not, see .
++
++ use omp_lib
++ integer nthreads, i, a(1000)
++ nthreads = omp_get_num_threads()
++ if (nthreads .gt. 1000) call abort
++
++ do i = 1, nthreads
++ a(i) = 0
++ end do
++ print *, "start-here"
++!$omp parallel
++ a(omp_get_thread_num() + 1) = 1
++!$omp end parallel
++ do i = 1, nthreads
++ if (a(i) .ne. 1) call abort
++ end do
++ print *, "success"
++ end
diff --git a/gdb-bz538626-bp_location-accel-bp-cond.patch b/gdb-bz538626-bp_location-accel-bp-cond.patch
index f734d51..e53bf3c 100644
--- a/gdb-bz538626-bp_location-accel-bp-cond.patch
+++ b/gdb-bz538626-bp_location-accel-bp-cond.patch
@@ -1,89 +1,264 @@
-Index: gdb-7.0/gdb/breakpoint.c
-===================================================================
---- gdb-7.0.orig/gdb/breakpoint.c 2009-11-25 10:24:49.000000000 +0100
-+++ gdb-7.0/gdb/breakpoint.c 2009-11-25 10:28:35.000000000 +0100
-@@ -337,14 +337,21 @@ static int executing_startup;
- B ? (TMP=B->next, 1): 0; \
- B = TMP)
-
--/* Similar iterator for the low-level breakpoints. SAFE variant is not
-- provided so update_global_location_list must not be called while executing
-- the block of ALL_BP_LOCATIONS. */
--
--#define ALL_BP_LOCATIONS(B,BP_TMP) \
-- for (BP_TMP = bp_location; \
-- BP_TMP < bp_location + bp_location_count && (B = *BP_TMP); \
-- BP_TMP++)
-+/* Similar iterator for the low-level breakpoints. This iterator
-+ requires a defined BP_LOCATION array and BP_LOCATION_COUNT. */
-+
-+#define ALL_BP_LOCATIONS_FROM(B,BP_TMP,BP_LOCATION,BP_LOCATION_COUNT) \
-+ for (BP_TMP = BP_LOCATION; \
-+ BP_TMP < BP_LOCATION + BP_LOCATION_COUNT && (B = *BP_TMP); \
-+ BP_TMP++)
-+
-+/* Iterator that calls ALL_BP_LOCATIONS_FROM with the global
-+ bp_locations and bp_location_count variables. SAFE variant is not
-+ provided so update_global_location_list must not be called while
-+ executing the block of ALL_BP_LOCATIONS. */
-+
-+#define ALL_BP_LOCATIONS(B,BP_TMP) \
-+ ALL_BP_LOCATIONS_FROM(B,BP_TMP,bp_location, bp_location_count)
-
- /* Iterator for tracepoints only. */
-
-@@ -3313,6 +3320,7 @@ bpstat_check_breakpoint_conditions (bpst
- bpstat
- bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid)
- {
-+ struct cleanup *old_chain;
- struct breakpoint *b = NULL;
- struct bp_location *bl, **blp_tmp;
- struct bp_location *loc;
-@@ -3322,8 +3330,14 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+http://sourceware.org/ml/gdb-patches/2009-12/msg00180.html
+Subject: [patch] Fix a regression by me on breakpoint-cond-infcall
+
+Hi,
+
+GDB has now a regression since:
+ Re: [patch] Performance optimize large bp_location count
+ http://sourceware.org/ml/gdb-patches/2009-10/msg00632.html
+ =
+ 2009-10-25 Jan Kratochvil
+ Performance optimize large bp_location count.
+
+on breakpoints with conditions calling inferior.
+
+Bringing the code back to the state before my acceleration patch.
+
+The code before already assumed no breakpoints or their bp_locations can
+change across the inferior call which should be true - trying to do some:
+ break a if b()
+ break b
+ command 1
+ delete 2
+ end
+or similar cannot work as inside "if b()" evaluation no breakpoints can be
+added or removed.
+
+update_global_location_list also does not removed/add `struct bp_location's
+themselves but only pointers to them in the bp_location array. As the new
+iteration no longer uses the bp_location array it is no longer a problem.
+
+Original problem was found by and fixed differently by Phil Muldoon.
+
+No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
+
+
+Thanks,
+Jan
+
+
+gdb/
+2009-12-13 Jan Kratochvil
+
+ * breakpoint.c (bpstat_stop_status): Iterate using ALL_BREAKPOINTS and
+ the B->LOC list. Remove gdb_assert on B. Change bp_hardware_watchpoint
+ continue to break. Remove variable update_locations. Remove HIT_COUNT
+ increment protection by an ENABLE_STATE check. Inline the delayed
+ update_global_location_list call.
+
+gdb/testsuite/
+2009-12-13 Jan Kratochvil
+ Phil Muldoon
+
+ * gdb.base/condbreak.exp: Put breakpoint on marker3 and marker4.
+ (bp_location13, bp_location14, bp_location17, bp_location18)
+ (marker3_proto, marker4_proto): New variables.
+ (breakpoint info): Update output.
+ (run until breakpoint at marker3, run until breakpoint at marker4): New
+ tests.
+
+[ Backported for F-12. ]
+
+--- ./gdb/breakpoint.c 2009-12-14 00:25:55.000000000 +0100
++++ ./gdb/breakpoint.c 2009-12-14 00:32:32.000000000 +0100
+@@ -3298,93 +3298,93 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+ /* Pointer to the last thing in the chain currently. */
bpstat bs = root_bs;
int ix;
- int need_remove_insert, update_locations = 0;
-+ struct bp_location **saved_bp_location;
-+ int saved_bp_location_count = bp_location_count;
+- int need_remove_insert, update_locations = 0;
++ int need_remove_insert;
- ALL_BP_LOCATIONS (bl, blp_tmp)
-+ saved_bp_location = xmalloc (sizeof (*bp_location) * bp_location_count);
-+ memcpy (saved_bp_location, bp_location, sizeof (*bp_location) * bp_location_count);
-+ old_chain = make_cleanup (xfree, saved_bp_location);
+- {
+- bpstat bs_prev = bs;
++ /* ALL_BP_LOCATIONS iteration would break across
++ update_global_location_list possibly executed by
++ bpstat_check_breakpoint_conditions's inferior call. */
+
+- b = bl->owner;
+- gdb_assert (b);
+- if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
+- continue;
+-
+- /* For hardware watchpoints, we look only at the first location.
+- The watchpoint_check function will work on entire expression,
+- not the individual locations. For read watchopints, the
+- watchpoints_triggered function have checked all locations
+- alrea
+- */
+- if (b->type == bp_hardware_watchpoint && bl != b->loc)
+- continue;
+-
+- if (!bpstat_check_location (bl, bp_addr))
+- continue;
+-
+- /* Come here if it's a watchpoint, or if the break address matches */
+-
+- bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
+- gdb_assert (bs_prev->next == bs);
+-
+- /* Assume we stop. Should we find watchpoint that is not actually
+- triggered, or if condition of breakpoint is false, we'll reset
+- 'stop' to 0. */
+- bs->stop = 1;
+- bs->print = 1;
++ ALL_BREAKPOINTS (b)
++ {
++ if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
++ continue;
+
+- if (!bpstat_check_watchpoint (bs))
+- {
+- /* Ensure bpstat_explains_signal stays false if this BL could not be
+- the cause of this trap. */
++ for (bl = b->loc; bl != NULL; bl = bl->next)
++ {
++ bpstat bs_prev = bs;
+
-+ ALL_BP_LOCATIONS_FROM (bl, blp_tmp, saved_bp_location, saved_bp_location_count)
- {
- bpstat bs_prev = bs;
++ /* For hardware watchpoints, we look only at the first location.
++ The watchpoint_check function will work on entire expression,
++ not the individual locations. For read watchopints, the
++ watchpoints_triggered function have checked all locations
++ alrea
++ */
++ if (b->type == bp_hardware_watchpoint && bl != b->loc)
++ break;
-@@ -3460,6 +3474,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
- insert_breakpoints ();
- }
+- gdb_assert (bs->print_it == print_it_noop);
+- gdb_assert (!bs->stop);
+- xfree (bs);
+- bs = bs_prev;
+- bs->next = NULL;
+- continue;
+- }
++ if (!bpstat_check_location (bl, bp_addr))
++ continue;
-+ do_cleanups (old_chain);
- return root_bs->next;
- }
-
-Index: gdb-7.0/gdb/testsuite/gdb.base/condbreak.exp
-===================================================================
---- gdb-7.0.orig/gdb/testsuite/gdb.base/condbreak.exp 2009-01-03 06:58:03.000000000 +0100
-+++ gdb-7.0/gdb/testsuite/gdb.base/condbreak.exp 2009-11-25 10:27:50.000000000 +0100
-@@ -68,6 +68,8 @@ set bp_location1 [gdb_get_line_number "
+- if (b->type == bp_thread_event || b->type == bp_overlay_event
+- || b->type == bp_longjmp_master || b->type == bp_exception_master)
+- /* We do not stop for these. */
+- bs->stop = 0;
+- else
+- bpstat_check_breakpoint_conditions (bs, ptid);
+-
+- if (bs->stop)
+- {
+- if (b->enable_state != bp_disabled)
+- ++(b->hit_count);
++ /* Come here if it's a watchpoint, or if the break address matches */
+
+- /* We will stop here */
+- if (b->disposition == disp_disable)
+- {
+- if (b->enable_state != bp_permanent)
+- b->enable_state = bp_disabled;
+- update_locations = 1;
+- }
+- if (b->silent)
+- bs->print = 0;
+- bs->commands = b->commands;
+- if (bs->commands
+- && (strcmp ("silent", bs->commands->line) == 0
+- || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
+- {
+- bs->commands = bs->commands->next;
+- bs->print = 0;
+- }
+- bs->commands = copy_command_lines (bs->commands);
+- }
++ bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
++ gdb_assert (bs_prev->next == bs);
+
+- /* Print nothing for this entry if we dont stop or if we dont print. */
+- if (bs->stop == 0 || bs->print == 0)
+- bs->print_it = print_it_noop;
+- }
++ /* Assume we stop. Should we find watchpoint that is not actually
++ triggered, or if condition of breakpoint is false, we'll reset
++ 'stop' to 0. */
++ bs->stop = 1;
++ bs->print = 1;
+
+- /* Delay this call which would break the ALL_BP_LOCATIONS iteration above. */
+- if (update_locations)
+- update_global_location_list (0);
++ if (!bpstat_check_watchpoint (bs))
++ {
++ /* Ensure bpstat_explains_signal stays false if this BL could not be
++ the cause of this trap. */
++
++ gdb_assert (bs->print_it == print_it_noop);
++ gdb_assert (!bs->stop);
++ xfree (bs);
++ bs = bs_prev;
++ bs->next = NULL;
++ continue;
++ }
++
++ if (b->type == bp_thread_event || b->type == bp_overlay_event
++ || b->type == bp_longjmp_master || b->type == bp_exception_master)
++ /* We do not stop for these. */
++ bs->stop = 0;
++ else
++ bpstat_check_breakpoint_conditions (bs, ptid);
++
++ if (bs->stop)
++ {
++ ++(b->hit_count);
++
++ /* We will stop here */
++ if (b->disposition == disp_disable)
++ {
++ if (b->enable_state != bp_permanent)
++ b->enable_state = bp_disabled;
++ update_global_location_list (0);
++ }
++ if (b->silent)
++ bs->print = 0;
++ bs->commands = b->commands;
++ if (bs->commands
++ && (strcmp ("silent", bs->commands->line) == 0
++ || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
++ {
++ bs->commands = bs->commands->next;
++ bs->print = 0;
++ }
++ bs->commands = copy_command_lines (bs->commands);
++ }
++
++ /* Print nothing for this entry if we dont stop or if we dont print. */
++ if (bs->stop == 0 || bs->print == 0)
++ bs->print_it = print_it_noop;
++ }
++ }
+
+ for (ix = 0; VEC_iterate (bp_location_p, moribund_locations, ix, loc); ++ix)
+ {
+--- ./gdb/testsuite/gdb.base/condbreak.exp 2009-01-03 06:58:03.000000000 +0100
++++ ./gdb/testsuite/gdb.base/condbreak.exp 2009-12-14 00:27:21.000000000 +0100
+@@ -68,8 +68,12 @@ set bp_location1 [gdb_get_line_number "
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
-+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
-+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
++set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
++set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
++set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
++set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
-@@ -110,15 +112,23 @@ gdb_test "break marker2 if (a==43)" \
+ #
+ # test break at function
+@@ -110,15 +114,29 @@ gdb_test "break marker2 if (a==43)" \
"Breakpoint.*at.* file .*$srcfile1, line.*"
#
+# Check break involving inferior function call.
++# Ensure there is at least one additional breakpoint with higher VMA.
+#
-+gdb_test "break marker4 if (multi_line_if_conditional(1,1,1)==0)" \
++gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \
++ "Breakpoint.*at.* file .*$srcfile1, line.*"
++gdb_test "break marker4" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
+
+#
@@ -93,42 +268,50 @@ Index: gdb-7.0/gdb/testsuite/gdb.base/condbreak.exp
if {$hp_aCC_compiler} {
set marker1_proto "\\(void\\)"
set marker2_proto "\\(int\\)"
++ # Not checked.
++ set marker3_proto "\\(char \\*, char \\*\\)"
+ set marker4_proto "\\(long\\)"
} else {
set marker1_proto ""
set marker2_proto ""
++ set marker3_proto ""
+ set marker4_proto ""
}
gdb_test "info break" \
-@@ -129,7 +139,9 @@ gdb_test "info break" \
+@@ -129,7 +147,10 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[\t \]+stop only if \\(1==1\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
-\[\t \]+stop only if \\(a==43\\).*" \
+\[\t \]+stop only if \\(a==43\\).*
-+\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*
-+\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*" \
++\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).*
++\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
++\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \
"breakpoint info"
-@@ -220,3 +232,19 @@ gdb_expect {
+@@ -220,3 +241,23 @@ gdb_expect {
fail "(timeout) run until breakpoint at marker2"
}
}
+
-+send_gdb "continue\n"
-+gdb_expect {
-+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*" {
-+ pass "run until breakpoint at marker4"
++set test "run until breakpoint at marker3"
++gdb_test_multiple "continue" $test {
++ -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
++ pass $test
+ }
-+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*" {
-+ xfail "run until breakpoint at marker4"
-+ }
-+ -re "$gdb_prompt $" {
-+ fail "run until breakpoint at marker4"
-+ }
-+ timeout {
-+ fail "(timeout) run until breakpoint at marker4"
++ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
++ xfail $test
++ }
++}
++
++set test "run until breakpoint at marker4"
++gdb_test_multiple "continue" $test {
++ -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
++ pass $test
++ }
++ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
++ xfail $test
+ }
+}
diff --git a/gdb.spec b/gdb.spec
index a906cfc..ceb6fe8 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -4,6 +4,18 @@
# --with upstream: No Fedora specific patches get applied.
# --without python: No python support.
+# RHEL-5 was the last not providing `/etc/rpm/macros.dist'.
+%if 0%{!?dist:1}
+%define rhel 5
+%define dist .el5
+%define el5 1
+%define gnat_version 4.1
+%define gcj_version 7rh
+%else
+%define gnat_version 4.4
+%define gcj_version 10
+%endif
+
Summary: A GNU source-level debugger for C, C++, Java and other languages
Name: gdb%{?_with_debug:-debug}
@@ -14,7 +26,7 @@ Version: 7.0
# 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: 9%{?_with_upstream:.upstream}%{?dist}
+Release: 10%{?_with_upstream:.upstream}%{dist}
License: GPLv3+
Group: Development/Debuggers
@@ -372,7 +384,7 @@ Patch385: gdb-bz528668-symfile-multi.patch
# Support GNU IFUNCs - indirect functions (BZ 539590).
Patch387: gdb-bz539590-gnu-ifunc.patch
-# Fix bp conditionals [bp_location-accel] regression (Phil Muldoon, BZ 538626).
+# Fix bp conditionals [bp_location-accel] regression (BZ 538626).
Patch388: gdb-bz538626-bp_location-accel-bp-cond.patch
# Fix callback-mode readline-6.0 regression for CTRL-C.
@@ -381,6 +393,9 @@ Patch390: gdb-readline-6.0-signal.patch
# Fix syscall restarts for amd64->i386 biarch.
Patch391: gdb-x86_64-i386-syscall-restart.patch
+# Fix stepping with OMP parallel Fortran sections (BZ 533176).
+Patch392: gdb-bz533176-fortran-omp-step.patch
+
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
Requires: readline
BuildRequires: readline-devel
@@ -400,25 +415,34 @@ BuildRequires: libstdc++
BuildRequires: sharutils dejagnu
# gcc-objc++ is not covered by the GDB testsuite.
BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc glibc-static
+# Prelink is broken on sparcv9/sparc64
+%ifnarch sparcv9 sparc64
+BuildRequires: prelink
+%endif
%if 0%{!?rhel:1}
BuildRequires: fpc
%endif
+%if 0%{?el5:1}
+BuildRequires: gcc44 gcc44-gfortran
+%endif
# Ensure the devel libraries are installed for both multilib arches.
%define multilib_64_archs sparc64 ppc64 s390x x86_64
# Copied from gcc-4.1.2-32
%ifarch %{ix86} x86_64 ia64 ppc alpha
BuildRequires: gcc-gnat
%ifarch %{multilib_64_archs} ppc
-BuildRequires: %{_exec_prefix}/lib64/libgnat-4.4.so %{_exec_prefix}/lib/libgnat-4.4.so
+BuildRequires: %{_exec_prefix}/lib64/libgnat-%{gnat_version}.so %{_exec_prefix}/lib/libgnat-%{gnat_version}.so
%endif
%endif
%ifarch %{multilib_64_archs} sparc sparcv9 ppc
BuildRequires: /lib/libc.so.6 %{_exec_prefix}/lib/libc.so /lib64/libc.so.6 %{_exec_prefix}/lib64/libc.so
BuildRequires: /lib/libgcc_s.so.1 /lib64/libgcc_s.so.1
BuildRequires: %{_exec_prefix}/lib/libstdc++.so.6 %{_exec_prefix}/lib64/libstdc++.so.6
-BuildRequires: %{_exec_prefix}/lib64/libgcj.so.10 %{_exec_prefix}/lib/libgcj.so.10
+BuildRequires: %{_exec_prefix}/lib64/libgcj.so.%{gcj_version} %{_exec_prefix}/lib/libgcj.so.%{gcj_version}
# multilib glibc-static is open Bug 488472:
-#BuildRequires: %{_exec_prefix}/lib64/libc.a %{_exec_prefix}/lib/libc.a
+%if 0%{?el5:1}
+BuildRequires: %{_exec_prefix}/lib64/libc.a %{_exec_prefix}/lib/libc.a
+%endif
# for gcc-java:
BuildRequires: %{_exec_prefix}/lib64/libz.so %{_exec_prefix}/lib/libz.so
%endif
@@ -427,11 +451,6 @@ BuildRequires: %{_exec_prefix}/lib64/libz.so %{_exec_prefix}/lib/libz.so
%ifarch ia64
BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
Requires: libunwind >= 0.99-0.1.frysk20070405cvs
-%else
-# Prelink is broken on sparcv9/sparc64
-%ifnarch sparcv9 sparc64
-BuildRequires: prelink
-%endif
%endif
Requires(post): /sbin/install-info
@@ -479,6 +498,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch383 -p1
%patch384 -p1
%patch385 -p1
+%patch388 -p1
%patch124 -p1
%patch1 -p1
%patch3 -p1
@@ -582,10 +602,10 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch381 -p1
%patch382 -p1
%patch387 -p1
-%patch388 -p1
%patch389 -p1
%patch390 -p1
%patch391 -p1
+%patch392 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@@ -594,6 +614,8 @@ find -name "*.orig" | xargs rm -f
# Change the version that gets printed at GDB startup, so it is Fedora
# specific.
+# Fedora (%{version}-%{release})
+# Red Hat Enterprise Linux (%{version}-%{release})
cat > gdb/version.in << _FOO
Fedora (%{version}-%{release})
_FOO
@@ -659,9 +681,8 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
--without-python \
%endif
$(: Workaround rpm.org#76, BZ 508193 on recent OSes. ) \
-$(: RHEL-5 was the last not providing %{dist}. ) \
$(: RHEL-5 librpm has incompatible API. ) \
-%if 0%{!?dist:1}
+%if 0%{?el5:1}
--without-rpm \
%else
--with-rpm=librpm.so.0 \
@@ -890,6 +911,13 @@ fi
%endif
%changelog
+* Mon Dec 14 2009 Jan Kratochvil - 7.0-10.fc12
+- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
+- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.
+- [vla] Fix compatibility of dynamic arrays with iFort (BZ 514287).
+- Fix stepping through OMP parallel Fortran sections (BZ 533176).
+- New fix of bp conditionals [bp_location-accel] regression (BZ 538626).
+
* Mon Dec 7 2009 Jan Kratochvil - 7.0-9.fc12
- Replace the PIE (Position Indepdent Executable) support patch by a new one.
- Drop gdb-6.3-nonthreaded-wp-20050117.patch as fuzzy + redundant.