]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 19 Jul 2011 20:25:14 +0000 (20:25 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 19 Jul 2011 20:25:14 +0000 (20:25 +0000)
* dwarf2loc.c (indirect_pieced_value): Use check_typedef for VALUE's
type.

gdb/testsuite/
* gdb.dwarf2/implptr.S: Rebuilt.
* gdb.dwarf2/implptr.c (intp, intpp, intppp): New typedefs.
(bar): Use them for j, k, l.
* gdb.dwarf2/implptr.exp: New variable opts.  Support runtest parameter
COMPILE.
(print j in implptr:bar): Update for the intp typedef.
(print p[0].x in implptr:foo): Use more exact regex.

gdb/ChangeLog
gdb/dwarf2loc.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/implptr.S
gdb/testsuite/gdb.dwarf2/implptr.c
gdb/testsuite/gdb.dwarf2/implptr.exp

index 4e6f35fcf2f92540c033af69ec97d4108f550e89..debc803015e9abcffde7f9b835af4c2d65198bd9 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf2loc.c (indirect_pieced_value): Use check_typedef for VALUE's
+       type.
+
 2011-07-19  Gary Benson  <gbenson@redhat.com>
 
        * infrun.c (struct execution_control_state): New member
index fc9a4173156c40e6271efbfc8ea42e27e57fb456..9d4aa8dc41de550e6c9eb88622bdbc2466236cde 100644 (file)
@@ -967,7 +967,7 @@ indirect_pieced_value (struct value *value)
   struct value *result;
   LONGEST byte_offset;
 
-  type = value_type (value);
+  type = check_typedef (value_type (value));
   if (TYPE_CODE (type) != TYPE_CODE_PTR)
     return NULL;
 
index 1acccd52b785baf581e42528335fa7457b23fc69..2d60ff195f01687440d165a3665d3b232dabba5b 100644 (file)
@@ -1,3 +1,13 @@
+2011-07-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.dwarf2/implptr.S: Rebuilt.
+       * gdb.dwarf2/implptr.c (intp, intpp, intppp): New typedefs.
+       (bar): Use them for j, k, l.
+       * gdb.dwarf2/implptr.exp: New variable opts.  Support runtest parameter
+       COMPILE.
+       (print j in implptr:bar): Update for the intp typedef.
+       (print p[0].x in implptr:foo): Use more exact regex.
+
 2011-07-18  Tom Tromey  <tromey@redhat.com>
 
        * gdb.cp/static-method.exp: Add missing single quote.
index 8ea793ccc1d86dd0077240ac4f3156f9b60f7852..1672c68e9935cce5827878b0a2bac65ce566b405 100644 (file)
@@ -6,7 +6,7 @@
        .type   foo, @function
 foo:
 .LFB1:
-       .file 1 "implptr.c"
+       .file 1 "gdb.dwarf2/implptr.c"
        .loc 1 45 0
        .cfi_startproc
 .LVL0:
@@ -50,41 +50,44 @@ foo:
        .type   bar, @function
 bar:
 .LFB2:
-       .loc 1 57 0
+       .loc 1 61 0
        .cfi_startproc
 .LVL7:
-       .loc 1 61 0
+       .loc 1 65 0
        movl    4(%esp), %eax
        addl    $1, %eax
-       .loc 1 63 0
+       .loc 1 67 0
        ret
        .cfi_endproc
 .LFE2:
        .size   bar, .-bar
+       .section        .text.startup,"ax",@progbits
        .p2align 4,,15
        .globl  main
        .type   main, @function
 main:
 .LFB3:
-       .loc 1 66 0
+       .loc 1 70 0
        .cfi_startproc
        pushl   %ebx
        .cfi_def_cfa_offset 8
        .cfi_offset 3, -8
        subl    $4, %esp
        .cfi_def_cfa_offset 12
-       .loc 1 67 0
+       .loc 1 71 0
        movl    $5, (%esp)
        call    bar
+.LVL8:
        movl    $23, (%esp)
        movl    %eax, %ebx
        call    foo
-       .loc 1 68 0
+.LVL9:
+       .loc 1 72 0
        addl    $4, %esp
        .cfi_def_cfa_offset 8
-       .loc 1 67 0
+       .loc 1 71 0
        addl    %ebx, %eax
-       .loc 1 68 0
+       .loc 1 72 0
        popl    %ebx
        .cfi_def_cfa_offset 4
        .cfi_restore 3
@@ -93,268 +96,268 @@ main:
 .LFE3:
        .size   main, .-main
        .comm   u,24,4
+       .text
 .Letext0:
-       .section        .debug_types,"G",@progbits,wt.ade46b36db7edab6,comdat
-       .long   0x46
+       .section        .debug_info,"",@progbits
+.Ldebug_info0:
+       .long   0x217
        .value  0x4
        .long   .Ldebug_abbrev0
        .byte   0x4
-       .byte   0xad
-       .byte   0xe4
-       .byte   0x6b
-       .byte   0x36
-       .byte   0xdb
-       .byte   0x7e
-       .byte   0xda
-       .byte   0xb6
-       .long   0x1d
        .uleb128 0x1
+       .long   .LASF4
        .byte   0x1
+       .long   .LASF5
+       .long   .LASF6
+       .long   .Ldebug_ranges0+0
+       .long   0
        .long   .Ldebug_line0
        .uleb128 0x2
        .string "S"
        .byte   0x8
        .byte   0x1
        .byte   0x18
-       .long   0x3c
+       .long   0x44
        .uleb128 0x3
        .string "x"
        .byte   0x1
        .byte   0x1a
-       .long   0x3c
+       .long   0x44
        .byte   0
        .uleb128 0x3
        .string "y"
        .byte   0x1
        .byte   0x1a
-       .long   0x42
+       .long   0x4a
        .byte   0x4
        .byte   0
        .uleb128 0x4
        .byte   0x4
-       .long   0x42
+       .long   0x4a
        .uleb128 0x5
        .byte   0x4
        .byte   0x5
        .string "int"
-       .byte   0
-       .section        .debug_info,"",@progbits
-.Ldebug_info0:
-       .long   0x1b6
-       .value  0x4
-       .long   .Ldebug_abbrev0
-       .byte   0x4
+       .uleb128 0x6
+       .long   .LASF0
+       .byte   0x1
+       .byte   0x37
+       .long   0x44
        .uleb128 0x6
        .long   .LASF1
        .byte   0x1
-       .long   .LASF2
-       .long   .LASF3
-       .long   .Ltext0
-       .long   .Letext0
-       .long   .Ldebug_line0
+       .byte   0x38
+       .long   0x67
        .uleb128 0x4
        .byte   0x4
-       .long   0x2b
-       .uleb128 0x5
+       .long   0x51
+       .uleb128 0x6
+       .long   .LASF2
+       .byte   0x1
+       .byte   0x39
+       .long   0x78
+       .uleb128 0x4
        .byte   0x4
-       .byte   0x5
-       .string "int"
+       .long   0x5c
        .uleb128 0x7
        .string "add"
        .byte   0x1
        .byte   0x20
        .byte   0x3
-       .long   0x5a
+       .long   0xa6
        .uleb128 0x8
        .string "a"
        .byte   0x1
        .byte   0x20
-       .long   0x5a
+       .long   0xa6
        .uleb128 0x8
        .string "b"
        .byte   0x1
        .byte   0x20
-       .long   0x5a
+       .long   0xa6
        .uleb128 0x8
        .string "c"
        .byte   0x1
        .byte   0x20
-       .long   0x2b
+       .long   0x4a
        .byte   0
-       .uleb128 0x9
+       .uleb128 0x4
        .byte   0x4
-       .byte   0xad
-       .byte   0xe4
-       .byte   0x6b
-       .byte   0x36
-       .byte   0xdb
-       .byte   0x7e
-       .byte   0xda
-       .byte   0xb6
-       .uleb128 0xa
+       .long   0x25
+       .uleb128 0x9
        .string "foo"
        .byte   0x1
        .byte   0x2c
-       .long   0x2b
+       .long   0x4a
        .long   .LFB1
        .long   .LFE1
        .uleb128 0x1
        .byte   0x9c
-       .long   0xff
-       .uleb128 0xb
+       .long   0x147
+       .uleb128 0xa
        .string "i"
        .byte   0x1
        .byte   0x2c
-       .long   0x2b
+       .long   0x4a
        .long   .LLST0
-       .uleb128 0xc
+       .uleb128 0xb
        .string "j"
        .byte   0x1
        .byte   0x2e
-       .long   0x2b
+       .long   0x4a
        .long   .LLST1
-       .uleb128 0xc
+       .uleb128 0xb
        .string "p"
        .byte   0x1
        .byte   0x2f
-       .long   0xff
+       .long   0x147
        .long   .LLST2
-       .uleb128 0xd
-       .long   0x32
+       .uleb128 0xc
+       .long   0x7e
        .long   .LBB6
        .long   .LBE6
        .byte   0x1
        .byte   0x30
-       .long   0xd3
-       .uleb128 0xe
-       .long   0x50
+       .long   0x11b
+       .uleb128 0xd
+       .long   0x9c
        .byte   0
-       .uleb128 0xf
-       .long   0x47
+       .uleb128 0xe
+       .long   0x93
        .uleb128 0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 8
-       .uleb128 0x10
-       .long   0x3e
+       .uleb128 0xf
+       .long   0x8a
        .long   .LLST3
        .byte   0
-       .uleb128 0x11
-       .long   0x32
+       .uleb128 0x10
+       .long   0x7e
        .long   .LBB8
        .long   .LBE8
        .byte   0x1
        .byte   0x33
-       .uleb128 0xe
-       .long   0x50
+       .uleb128 0xd
+       .long   0x9c
        .byte   0x3
-       .uleb128 0xf
-       .long   0x47
+       .uleb128 0xe
+       .long   0x93
        .uleb128 0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 8
-       .uleb128 0x10
-       .long   0x3e
+       .uleb128 0xf
+       .long   0x8a
        .long   .LLST4
        .byte   0
        .byte   0
+       .uleb128 0x11
+       .long   0x25
+       .long   0x157
        .uleb128 0x12
-       .byte   0xad
-       .byte   0xe4
-       .byte   0x6b
-       .byte   0x36
-       .byte   0xdb
-       .byte   0x7e
-       .byte   0xda
-       .byte   0xb6
-       .long   0x113
-       .uleb128 0x13
-       .long   0x113
+       .long   0x157
        .byte   0x1
        .byte   0
-       .uleb128 0x14
+       .uleb128 0x13
        .byte   0x4
        .byte   0x7
-       .long   .LASF0
-       .uleb128 0xa
+       .long   .LASF3
+       .uleb128 0x9
        .string "bar"
        .byte   0x1
-       .byte   0x38
-       .long   0x2b
+       .byte   0x3c
+       .long   0x4a
        .long   .LFB2
        .long   .LFE2
        .uleb128 0x1
        .byte   0x9c
-       .long   0x170
-       .uleb128 0x15
+       .long   0x1b4
+       .uleb128 0x14
        .string "i"
        .byte   0x1
-       .byte   0x38
-       .long   0x2b
+       .byte   0x3c
+       .long   0x4a
        .uleb128 0x2
        .byte   0x91
        .sleb128 0
-       .uleb128 0x16
+       .uleb128 0x15
        .string "j"
        .byte   0x1
-       .byte   0x3a
-       .long   0x25
+       .byte   0x3e
+       .long   0x51
        .uleb128 0x6
        .byte   0xf2
-       .long   .Ldebug_info0+307
+       .long   .Ldebug_info0+375
        .sleb128 0
-       .uleb128 0x16
+       .uleb128 0x15
        .string "k"
        .byte   0x1
-       .byte   0x3b
-       .long   0x170
+       .byte   0x3f
+       .long   0x5c
        .uleb128 0x6
        .byte   0xf2
-       .long   .Ldebug_info0+319
+       .long   .Ldebug_info0+387
        .sleb128 0
-       .uleb128 0x16
+       .uleb128 0x15
        .string "l"
        .byte   0x1
-       .byte   0x3c
-       .long   0x176
+       .byte   0x40
+       .long   0x6d
        .uleb128 0x6
        .byte   0xf2
-       .long   .Ldebug_info0+335
+       .long   .Ldebug_info0+403
        .sleb128 0
        .byte   0
-       .uleb128 0x4
-       .byte   0x4
-       .long   0x25
-       .uleb128 0x4
-       .byte   0x4
-       .long   0x170
-       .uleb128 0x17
-       .long   .LASF4
+       .uleb128 0x16
+       .long   .LASF7
        .byte   0x1
-       .byte   0x41
-       .long   0x2b
+       .byte   0x45
+       .long   0x4a
        .long   .LFB3
        .long   .LFE3
        .uleb128 0x1
        .byte   0x9c
+       .long   0x1f2
+       .uleb128 0x17
+       .long   .LVL8
+       .long   0x15e
+       .long   0x1e1
        .uleb128 0x18
-       .long   0x2b
-       .long   0x1a1
-       .uleb128 0x13
-       .long   0x113
-       .byte   0x5
+       .uleb128 0x2
+       .byte   0x74
+       .sleb128 0
+       .uleb128 0x1
+       .byte   0x35
        .byte   0
        .uleb128 0x19
+       .long   .LVL9
+       .long   0xac
+       .uleb128 0x18
+       .uleb128 0x2
+       .byte   0x74
+       .sleb128 0
+       .uleb128 0x1
+       .byte   0x47
+       .byte   0
+       .byte   0
+       .uleb128 0x11
+       .long   0x4a
+       .long   0x202
+       .uleb128 0x12
+       .long   0x157
+       .byte   0x5
+       .byte   0
+       .uleb128 0x1a
        .string "u"
        .byte   0x1
        .byte   0x1d
-       .long   0x191
-       .uleb128 0x1a
+       .long   0x1f2
+       .uleb128 0x1b
        .string "u"
        .byte   0x1
        .byte   0x1d
-       .long   0x191
+       .long   0x1f2
        .uleb128 0x5
        .byte   0x3
        .long   u
@@ -362,10 +365,20 @@ main:
        .section        .debug_abbrev,"",@progbits
 .Ldebug_abbrev0:
        .uleb128 0x1
-       .uleb128 0x41
+       .uleb128 0x11
        .byte   0x1
+       .uleb128 0x25
+       .uleb128 0xe
        .uleb128 0x13
        .uleb128 0xb
+       .uleb128 0x3
+       .uleb128 0xe
+       .uleb128 0x1b
+       .uleb128 0xe
+       .uleb128 0x55
+       .uleb128 0x17
+       .uleb128 0x11
+       .uleb128 0x1
        .uleb128 0x10
        .uleb128 0x17
        .byte   0
@@ -421,22 +434,16 @@ main:
        .byte   0
        .byte   0
        .uleb128 0x6
-       .uleb128 0x11
-       .byte   0x1
-       .uleb128 0x25
-       .uleb128 0xe
-       .uleb128 0x13
-       .uleb128 0xb
+       .uleb128 0x16
+       .byte   0
        .uleb128 0x3
        .uleb128 0xe
-       .uleb128 0x1b
-       .uleb128 0xe
-       .uleb128 0x11
-       .uleb128 0x1
-       .uleb128 0x12
-       .uleb128 0x1
-       .uleb128 0x10
-       .uleb128 0x17
+       .uleb128 0x3a
+       .uleb128 0xb
+       .uleb128 0x3b
+       .uleb128 0xb
+       .uleb128 0x49
+       .uleb128 0x13
        .byte   0
        .byte   0
        .uleb128 0x7
@@ -470,15 +477,6 @@ main:
        .byte   0
        .byte   0
        .uleb128 0x9
-       .uleb128 0xf
-       .byte   0
-       .uleb128 0xb
-       .uleb128 0xb
-       .uleb128 0x49
-       .uleb128 0x20
-       .byte   0
-       .byte   0
-       .uleb128 0xa
        .uleb128 0x2e
        .byte   0x1
        .uleb128 0x3f
@@ -499,11 +497,13 @@ main:
        .uleb128 0x1
        .uleb128 0x40
        .uleb128 0x18
+       .uleb128 0x2117
+       .uleb128 0x19
        .uleb128 0x1
        .uleb128 0x13
        .byte   0
        .byte   0
-       .uleb128 0xb
+       .uleb128 0xa
        .uleb128 0x5
        .byte   0
        .uleb128 0x3
@@ -518,7 +518,7 @@ main:
        .uleb128 0x17
        .byte   0
        .byte   0
-       .uleb128 0xc
+       .uleb128 0xb
        .uleb128 0x34
        .byte   0
        .uleb128 0x3
@@ -533,7 +533,7 @@ main:
        .uleb128 0x17
        .byte   0
        .byte   0
-       .uleb128 0xd
+       .uleb128 0xc
        .uleb128 0x1d
        .byte   0x1
        .uleb128 0x31
@@ -550,7 +550,7 @@ main:
        .uleb128 0x13
        .byte   0
        .byte   0
-       .uleb128 0xe
+       .uleb128 0xd
        .uleb128 0x5
        .byte   0
        .uleb128 0x31
@@ -559,7 +559,7 @@ main:
        .uleb128 0xb
        .byte   0
        .byte   0
-       .uleb128 0xf
+       .uleb128 0xe
        .uleb128 0x5
        .byte   0
        .uleb128 0x31
@@ -568,7 +568,7 @@ main:
        .uleb128 0x18
        .byte   0
        .byte   0
-       .uleb128 0x10
+       .uleb128 0xf
        .uleb128 0x5
        .byte   0
        .uleb128 0x31
@@ -577,7 +577,7 @@ main:
        .uleb128 0x17
        .byte   0
        .byte   0
-       .uleb128 0x11
+       .uleb128 0x10
        .uleb128 0x1d
        .byte   0x1
        .uleb128 0x31
@@ -592,16 +592,16 @@ main:
        .uleb128 0xb
        .byte   0
        .byte   0
-       .uleb128 0x12
+       .uleb128 0x11
        .uleb128 0x1
        .byte   0x1
        .uleb128 0x49
-       .uleb128 0x20
+       .uleb128 0x13
        .uleb128 0x1
        .uleb128 0x13
        .byte   0
        .byte   0
-       .uleb128 0x13
+       .uleb128 0x12
        .uleb128 0x21
        .byte   0
        .uleb128 0x49
@@ -610,7 +610,7 @@ main:
        .uleb128 0xb
        .byte   0
        .byte   0
-       .uleb128 0x14
+       .uleb128 0x13
        .uleb128 0x24
        .byte   0
        .uleb128 0xb
@@ -621,7 +621,7 @@ main:
        .uleb128 0xe
        .byte   0
        .byte   0
-       .uleb128 0x15
+       .uleb128 0x14
        .uleb128 0x5
        .byte   0
        .uleb128 0x3
@@ -636,7 +636,7 @@ main:
        .uleb128 0x18
        .byte   0
        .byte   0
-       .uleb128 0x16
+       .uleb128 0x15
        .uleb128 0x34
        .byte   0
        .uleb128 0x3
@@ -651,9 +651,9 @@ main:
        .uleb128 0x18
        .byte   0
        .byte   0
-       .uleb128 0x17
+       .uleb128 0x16
        .uleb128 0x2e
-       .byte   0
+       .byte   0x1
        .uleb128 0x3f
        .uleb128 0x19
        .uleb128 0x3
@@ -670,18 +670,42 @@ main:
        .uleb128 0x1
        .uleb128 0x40
        .uleb128 0x18
+       .uleb128 0x2117
+       .uleb128 0x19
+       .uleb128 0x1
+       .uleb128 0x13
        .byte   0
        .byte   0
-       .uleb128 0x18
-       .uleb128 0x1
+       .uleb128 0x17
+       .uleb128 0x4109
        .byte   0x1
-       .uleb128 0x49
+       .uleb128 0x11
+       .uleb128 0x1
+       .uleb128 0x31
        .uleb128 0x13
        .uleb128 0x1
        .uleb128 0x13
        .byte   0
        .byte   0
+       .uleb128 0x18
+       .uleb128 0x410a
+       .byte   0
+       .uleb128 0x2
+       .uleb128 0x18
+       .uleb128 0x2111
+       .uleb128 0x18
+       .byte   0
+       .byte   0
        .uleb128 0x19
+       .uleb128 0x4109
+       .byte   0x1
+       .uleb128 0x11
+       .uleb128 0x1
+       .uleb128 0x31
+       .uleb128 0x13
+       .byte   0
+       .byte   0
+       .uleb128 0x1a
        .uleb128 0x34
        .byte   0
        .uleb128 0x3
@@ -698,7 +722,7 @@ main:
        .uleb128 0x19
        .byte   0
        .byte   0
-       .uleb128 0x1a
+       .uleb128 0x1b
        .uleb128 0x34
        .byte   0
        .uleb128 0x3
@@ -719,13 +743,13 @@ main:
        .section        .debug_loc,"",@progbits
 .Ldebug_loc0:
 .LLST0:
-       .long   .LVL0-.Ltext0
-       .long   .LVL1-.Ltext0
+       .long   .LVL0
+       .long   .LVL1
        .value  0x2
        .byte   0x91
        .sleb128 0
-       .long   .LVL1-.Ltext0
-       .long   .LFE1-.Ltext0
+       .long   .LVL1
+       .long   .LFE1
        .value  0x6
        .byte   0x91
        .sleb128 0
@@ -736,13 +760,13 @@ main:
        .long   0
        .long   0
 .LLST1:
-       .long   .LVL1-.Ltext0
-       .long   .LVL4-.Ltext0
+       .long   .LVL1
+       .long   .LVL4
        .value  0x2
        .byte   0x91
        .sleb128 0
-       .long   .LVL4-.Ltext0
-       .long   .LFE1-.Ltext0
+       .long   .LVL4
+       .long   .LFE1
        .value  0x6
        .byte   0x91
        .sleb128 0
@@ -753,11 +777,11 @@ main:
        .long   0
        .long   0
 .LLST2:
-       .long   .LVL1-.Ltext0
-       .long   .LVL4-.Ltext0
+       .long   .LVL1
+       .long   .LVL4
        .value  0x20
        .byte   0xf2
-       .long   .Ldebug_info0+125
+       .long   .Ldebug_info0+197
        .sleb128 0
        .byte   0x93
        .uleb128 0x4
@@ -770,7 +794,7 @@ main:
        .byte   0x93
        .uleb128 0x4
        .byte   0xf2
-       .long   .Ldebug_info0+138
+       .long   .Ldebug_info0+210
        .sleb128 0
        .byte   0x93
        .uleb128 0x4
@@ -782,11 +806,11 @@ main:
        .byte   0x9f
        .byte   0x93
        .uleb128 0x4
-       .long   .LVL4-.Ltext0
-       .long   .LFE1-.Ltext0
+       .long   .LVL4
+       .long   .LFE1
        .value  0x20
        .byte   0xf2
-       .long   .Ldebug_info0+138
+       .long   .Ldebug_info0+210
        .sleb128 0
        .byte   0x93
        .uleb128 0x4
@@ -799,7 +823,7 @@ main:
        .byte   0x93
        .uleb128 0x4
        .byte   0xf2
-       .long   .Ldebug_info0+125
+       .long   .Ldebug_info0+197
        .sleb128 0
        .byte   0x93
        .uleb128 0x4
@@ -814,47 +838,47 @@ main:
        .long   0
        .long   0
 .LLST3:
-       .long   .LVL1-.Ltext0
-       .long   .LVL2-.Ltext0
+       .long   .LVL1
+       .long   .LVL2
        .value  0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 0
-       .long   .LVL2-.Ltext0
-       .long   .LVL3-.Ltext0
+       .long   .LVL2
+       .long   .LVL3
        .value  0x2
        .byte   0x30
        .byte   0x9f
-       .long   .LVL3-.Ltext0
-       .long   .LFE1-.Ltext0
+       .long   .LVL3
+       .long   .LFE1
        .value  0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 8
        .long   0
        .long   0
 .LLST4:
-       .long   .LVL4-.Ltext0
-       .long   .LVL5-.Ltext0
+       .long   .LVL4
+       .long   .LVL5
        .value  0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 0
-       .long   .LVL5-.Ltext0
-       .long   .LVL6-.Ltext0
+       .long   .LVL5
+       .long   .LVL6
        .value  0x2
        .byte   0x30
        .byte   0x9f
-       .long   .LVL6-.Ltext0
-       .long   .LFE1-.Ltext0
+       .long   .LVL6
+       .long   .LFE1
        .value  0x6
        .byte   0xf2
-       .long   .Ldebug_info0+151
+       .long   .Ldebug_info0+223
        .sleb128 8
        .long   0
        .long   0
        .section        .debug_aranges,"",@progbits
-       .long   0x1c
+       .long   0x24
        .value  0x2
        .long   .Ldebug_info0
        .byte   0x4
@@ -863,20 +887,36 @@ main:
        .value  0
        .long   .Ltext0
        .long   .Letext0-.Ltext0
+       .long   .LFB3
+       .long   .LFE3-.LFB3
+       .long   0
+       .long   0
+       .section        .debug_ranges,"",@progbits
+.Ldebug_ranges0:
+       .long   .Ltext0
+       .long   .Letext0
+       .long   .LFB3
+       .long   .LFE3
        .long   0
        .long   0
        .section        .debug_line,"",@progbits
 .Ldebug_line0:
        .section        .debug_str,"MS",@progbits,1
-.LASF0:
-       .string "unsigned int"
+.LASF5:
+       .string "gdb.dwarf2/implptr.c"
+.LASF6:
+       .string ""
 .LASF3:
-       .string "/home/tromey/gnu/archer/archer/gdb/testsuite/gdb.dwarf2"
-.LASF4:
+       .string "unsigned int"
+.LASF7:
        .string "main"
 .LASF2:
-       .string "implptr.c"
+       .string "intppp"
+.LASF4:
+       .string "GNU C 4.6.1 20110627 (Red Hat 4.6.1-1)"
+.LASF0:
+       .string "intp"
 .LASF1:
-       .string "GNU C 4.6.0 20101116 (experimental) [trunk revision 166803]"
-       .ident  "GCC: (GNU) 4.6.0 20101116 (experimental) [trunk revision 166803]"
+       .string "intpp"
+       .ident  "GCC: (GNU) 4.6.1 20110627 (Red Hat 4.6.1-1)"
        .section        .note.GNU-stack,"",@progbits
index 64c7076c82ce240b33b1ae6901274565b58ab8d1..9812b7e0c8688a278ebee5b7d562542e03adc091 100644 (file)
@@ -52,12 +52,16 @@ foo (int i)
   return i + j;                        /* foo breakpoint */
 }
 
+typedef int *intp;
+typedef intp *intpp;
+typedef intpp *intppp;
+
 int __attribute__ ((noinline, used, noclone)) 
 bar (int i) 
 {
-  int *j = &i;
-  int **k = &j;
-  int ***l = &k;
+  intj = &i;
+  intpp k = &j;
+  intppp l = &k;
   i++;                         /* bar breakpoint */
   return i;
 }
index e9348e400cc582d8274de8e03cb26565263e3aca..8f9b5fb41b4df54c6bdf063025dbbee22b83609e 100644 (file)
@@ -20,17 +20,23 @@ load_lib dwarf.exp
 if {![dwarf2_support]} {
     return 0  
 }
-# This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
 
 set testfile "implptr"
 set srcfile ${testfile}.S
 set csrcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}.x
+set opts {}
+
+if [info exists COMPILE] {
+    # make check RUNTESTFLAGS='gdb.dwarf2/implptr.exp COMPILE=1 CC_FOR_TARGET=gcc\ -m32'
+    set srcfile ${csrcfile}
+    lappend opts debug optimize=-O2
+} elseif {![is_x86_like_target]} {
+    # This test can only be run on x86 targets.
+    return 0  
+}
 
-if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile $opts]} {
     return -1
 }
 
@@ -45,7 +51,7 @@ proc implptr_test_bar {} {
     gdb_test "break implptr.c:$line" "Breakpoint 2.*" \
        "set bar breakpoint for implptr"
     gdb_continue_to_breakpoint "continue to bar breakpoint for implptr"
-    gdb_test "print j" " = .int .. <synthetic pointer>" "print j in implptr:bar"
+    gdb_test "print j" " = \\(intp\\) <synthetic pointer>" "print j in implptr:bar"
     gdb_test "print *j" " = 5" "print *j in implptr:bar"
     gdb_test "print **k" " = 5" "print **k in implptr:bar"
     gdb_test "print ***l" " = 5" "print ***l in implptr:bar"
@@ -58,7 +64,7 @@ proc implptr_test_foo {} {
     gdb_test "break implptr.c:$line" "Breakpoint 3.*" \
        "set foo breakpoint for implptr"
     gdb_continue_to_breakpoint "continue to foo breakpoint for implptr"
-    gdb_test "print p\[0].x" " = .int .. <synthetic pointer>" \
+    gdb_test "print p\[0].x" " = \\(int \\*\\) <synthetic pointer>" \
        "print p\[0].x in implptr:foo"
     gdb_test "print *p\[0].x" " = 69" \
        "print *p\[0].x in implptr:foo"