This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] c++/12506
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 14 Mar 2011 19:36:24 +0100
- Subject: Re: [RFA] c++/12506
- References: <4D6FD0BF.8010700@redhat.com>
On Thu, 03 Mar 2011 18:32:47 +0100, Keith Seitz wrote:
> This patch is an attempt to fix c++/12506. In that bug, gdb is
> unable to set a breakpoint in a method because the compiler has
> output different type dies for the declaration and the definition of
> the subprogram.
>
> However, the compiler has specified DW_AT_specification for the
> method definition. This patch notices (and uses) this while
> computing the physname so that the two method signatures agree.
The declaration DIE uses type `int'.
The definition DIE with DW_AT_low_pc+DW_AT_high_pc uses type `arg_type'.
(`arg_type' is a typedef for `int'.)
The minimal symbol uses type `int'.
I did not understand why specifically declaration or definition should use the
types specific to the linkage. Currently it seems more as a GCC bug the
declaration does not use the `arg_type' typedef.
But the linkage name should rather get the typedefs expanded instead of
choosing this or that DIE:
ISO C++ standard
3.5 Program and linkage
item 10: After all adjustments of types (during which typedefs (7.1.3) are
replaced by their definitions),
I have not reviewed the dwarf2read.c part.
For the testcase part attaching a fix up for compatibility with
[patch] Fix empty PC range psymtab<->symtab discrepancy
http://sourceware.org/ml/gdb-patches/2011-03/msg00739.html
and other minor issues.
# -> /**/ is required for some non-standard arch I do not remember (m68k?).
Thanks,
Jan
gdb/testsuite/
2011-03-14 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/dw2-method-type-spec.exp: Whitespace adjustment.
* gdb.dwarf2/dw2-method-type-spec.S: Use /**/ instead of #.
New .text section with labels cu_text_start and cu_text_end.
(DW_AT_stmt_list, DW_AT_sibling, f2): Remove them all.
(.debug_abbrev): New label .Labbrev1_begin.
Whitespace cleanup.
--- a/gdb/testsuite/gdb.dwarf2/dw2-method-type-spec.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-method-type-spec.S
@@ -18,7 +18,7 @@
/* This exercises c++/12506.
This test was derived from the following source code:
-
+
template<typename types>
class test
{
@@ -26,10 +26,6 @@
void f1 (typename types::arg_type f)
{
}
-
- void f2 (void)
- {
- }
};
class my_types
@@ -40,326 +36,269 @@
*/
+ .text
+cu_text_start:
+ /* GDB requires DW_AT_low_pc < DW_AT_high_pc in read_partial_die. */
+ .byte 0
+cu_text_end:
+
#define OFFSET(LBL) .Ldie_ ## LBL - .Lcu1_begin
.section .debug_info
.Lcu1_begin:
- .4byte .Lcu1_end - .Lcu1_start # Length of Compilation Unit Info
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit Info */
.Lcu1_start:
- .2byte 0x3 # DWARF version number
- .long .Labbrev1_begin # Offset into abbrev section
- .byte 0x4 # Pointer size (in bytes)
+ .2byte 0x3 /* DWARF version number */
+ .long .Labbrev1_begin /* Offset into abbrev section */
+ .byte 0x4 /* Pointer size (in bytes) */
.Ldie_b:
- .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
- .ascii "GNU C++ 4.4.5 20101112 (Red Hat 4.4.5-2)\0" # DW_AT_producer
- .byte 0x4 # DW_AT_language
- .ascii "pr12506.cc\0" # DW_AT_name
- .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
+ .ascii "GNU C++ 4.4.5 20101112 (Red Hat 4.4.5-2)\0" /* DW_AT_producer */
+ .byte 0x4 /* DW_AT_language */
+ .ascii "pr12506.cc\0" /* DW_AT_name */
.Ldie_31:
- .uleb128 0x2 # (DIE (0x31) DW_TAG_class_type)
- .ascii "my_types\0" # DW_AT_name
- .byte 0x1 # DW_AT_byte_size
- .long OFFSET (49) # DW_AT_sibling
+ .uleb128 0x2 /* (DIE (0x31) DW_TAG_class_type) */
+ .ascii "my_types\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_byte_size */
.Ldie_3d:
- .uleb128 0x3 # (DIE (0x3d) DW_TAG_typedef)
- .ascii "arg_type\0" # DW_AT_name
- .long OFFSET (49) # DW_AT_type
- .byte 0x0 # end of children of DIE 0x31
+ .uleb128 0x3 /* (DIE (0x3d) DW_TAG_typedef) */
+ .ascii "arg_type\0" /* DW_AT_name */
+ .long OFFSET (49) /* DW_AT_type */
+ .byte 0x0 /* end of children of DIE 0x31 */
.Ldie_49:
- .uleb128 0x4 # (DIE (0x49) DW_TAG_base_type)
- .byte 0x4 # DW_AT_byte_size
- .byte 0x5 # DW_AT_encoding
- .ascii "int\0" # DW_AT_name
+ .uleb128 0x4 /* (DIE (0x49) DW_TAG_base_type) */
+ .byte 0x4 /* DW_AT_byte_size */
+ .byte 0x5 /* DW_AT_encoding */
+ .ascii "int\0" /* DW_AT_name */
.Ldie_50:
- .uleb128 0x2 # (DIE (0x50) DW_TAG_class_type)
- .ascii "test<my_types>\0" # DW_at_name
- .byte 0x1 # DW_AT_byte_size
- .long OFFSET (8c) # DW_AT_sibling
+ .uleb128 0x2 /* (DIE (0x50) DW_TAG_class_type) */
+ .ascii "test<my_types>\0" /* DW_at_name */
+ .byte 0x1 /* DW_AT_byte_size */
.Ldie_5c:
- .uleb128 0x5 # (DIE (0x5c) DW_TAG_subprogram)
- .byte 0x1 # DW_AT_external
- .ascii "f1\0" # DW_AT_name
- .byte 0x1 # DW_AT_declaration
- .long OFFSET (78) # DW_AT_sibling
+ .uleb128 0x5 /* (DIE (0x5c) DW_TAG_subprogram) */
+ .byte 0x1 /* DW_AT_external */
+ .ascii "f1\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_declaration */
.Ldie_6c:
- .uleb128 0x6 # (DIE (0x6c) DW_TAG_formal_parameter)
- .long OFFSET (8c) # DW_AT_type
- .byte 0x1 # DW_AT_artificial
+ .uleb128 0x6 /* (DIE (0x6c) DW_TAG_formal_parameter) */
+ .long OFFSET (8c) /* DW_AT_type */
+ .byte 0x1 /* DW_AT_artificial */
.Ldie_72:
- .uleb128 0x7 # (DIE (0x72) DW_TAG_formal_parameter)
- .long OFFSET (49) # DW_AT_type
- .byte 0x0 # end of children of DIE 0x5c
-
-.Ldie_78:
- .uleb128 0x8 # (DIE (0x78) DW_TAG_subprogram)
- .byte 0x1 # DW_AT_external
- .ascii "f2\0" # DW_AT_name
- .byte 0x1 # DW_AT_declaration
-
-.Ldie_84:
- .uleb128 0x6 # (DIE (0x84) DW_TAG_formal_parameter)
- .long OFFSET (8c) # DW_AT_type
- .byte 0x1 # DW_AT_artificial
- .byte 0x0 # end of children of DIE 0x78
- .byte 0x0 # end of children of DIE 0x50
+ .uleb128 0x7 /* (DIE (0x72) DW_TAG_formal_parameter) */
+ .long OFFSET (49) /* DW_AT_type */
+ .byte 0x0 /* end of children of DIE 0x5c */
+ .byte 0x0 /* end of children of DIE 0x50 */
.Ldie_8c:
- .uleb128 0x9 # (DIE (0x8c) DW_TAG_pointer_type)
- .byte 0x4 # DW_AT_byte_size
- .long OFFSET (50) # DW_AT_type
+ .uleb128 0x9 /* (DIE (0x8c) DW_TAG_pointer_type) */
+ .byte 0x4 /* DW_AT_byte_size */
+ .long OFFSET (50) /* DW_AT_type */
.Ldie_92:
- .uleb128 0xa # (DIE (0x92) DW_TAG_subprogram)
- .byte 0x1 # DW_AT_external
- .ascii "main\0" # DW_AT_name
- .long OFFSET (49) # DW_AT_type
- .long OFFSET (d3) # DW_AT_sibling
+ .uleb128 0xa /* (DIE (0x92) DW_TAG_subprogram) */
+ .byte 0x1 /* DW_AT_external */
+ .ascii "main\0" /* DW_AT_name */
+ .long OFFSET (49) /* DW_AT_type */
.Ldie_b4:
- .uleb128 0xb # (DIE (0xb4) DW_TAG_lexical_block)
+ .uleb128 0xb /* (DIE (0xb4) DW_TAG_lexical_block) */
.Ldie_c5:
- .uleb128 0xc # (DIE (0xc5) DW_TAG_variable)
- .ascii "t\0" # DW_AT_name
- .long OFFSET (50) # DW_AT_type
- .byte 0x0 # end of children of DIE 0xb4
- .byte 0x0 # end of children of DIE 0x92
+ .uleb128 0xc /* (DIE (0xc5) DW_TAG_variable) */
+ .ascii "t\0" /* DW_AT_name */
+ .long OFFSET (50) /* DW_AT_type */
+ .byte 0x0 /* end of children of DIE 0xb4 */
+ .byte 0x0 /* end of children of DIE 0x92 */
.Ldie_d3:
- .uleb128 0xd # (DIE (0xd3) DW_TAG_subprogram)
- .long OFFSET (5c) # DW_AT_specification
- .4byte cu_text_start # DW_AT_low_pc
- .4byte cu_text_end # DW_AT_high_pc
- .long OFFSET (108) # DW_AT_sibling
+ .uleb128 0xd /* (DIE (0xd3) DW_TAG_subprogram) */
+ .long OFFSET (5c) /* DW_AT_specification */
+ .4byte cu_text_start /* DW_AT_low_pc */
+ .4byte cu_text_end /* DW_AT_high_pc */
.Ldie_ee:
- .uleb128 0xe # (DIE (0xee) DW_TAG_formal_parameter)
- .ascii "this\0" # DW_AT_name
- .long OFFSET (108) # DW_AT_type
- .byte 0x1 # DW_AT_artificial
+ .uleb128 0xe /* (DIE (0xee) DW_TAG_formal_parameter) */
+ .ascii "this\0" /* DW_AT_name */
+ .long OFFSET (108) /* DW_AT_type */
+ .byte 0x1 /* DW_AT_artificial */
.Ldie_fb:
- .uleb128 0xf # (DIE (0xfb) DW_TAG_formal_parameter)
- .ascii "f\0" # DW_AT_name
- .long OFFSET (3d) # DW_AT_type
- .byte 0x0 # end of children of DIE 0xd3
+ .uleb128 0xf /* (DIE (0xfb) DW_TAG_formal_parameter) */
+ .ascii "f\0" /* DW_AT_name */
+ .long OFFSET (3d) /* DW_AT_type */
+ .byte 0x0 /* end of children of DIE 0xd3 */
.Ldie_108:
- .uleb128 0x10 # (DIE (0x108) DW_TAG_const_type)
- .long OFFSET (8c) # DW_AT_type
-
-.Ldie_10d:
- .uleb128 0x11 # (DIE (0x10d) DW_TAG_subprogram)
- .long OFFSET (78) # DW_AT_specification
- .4byte cu_text_start # DW_AT_low_pc
- .4byte cu_text_end # DW_AT_high_pc
-
-.Ldie_124:
- .uleb128 0xe # (DIE (0x124) DW_TAG_formal_parameter)
- .ascii "this\0" # DW_AT_name
- .long OFFSET (108) # DW_AT_type
- .byte 0x1 # DW_AT_artificial
- .byte 0x0 # end of children of DIE 0x10d
- .byte 0x0 # end of children of DIE 0xb
+ .uleb128 0x10 /* (DIE (0x108) DW_TAG_const_type) */
+ .long OFFSET (8c) /* DW_AT_type */
+ .byte 0x0 /* end of children of DIE 0xb */
.Lcu1_end:
/* Abbrev table */
.section .debug_abbrev
- .uleb128 0x1 # (abbrev code)
- .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
- .byte 0x1 # DW_children_yes
- .uleb128 0x25 # (DW_AT_producer)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x13 # (DW_AT_language)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string
- .uleb128 0x10 # (DW_AT_stmt_list)
- .uleb128 0x6 # (DW_FORM_data4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x2 # (abbrev code)
- .uleb128 0x2 # (DW_TAG_class_type)
- .byte 0x1 # DW_children_yes
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0xb # (DW_AT_byte_size)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x1 # (DW_AT_sibling)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x3 # (abbrev code)
- .uleb128 0x16 # (DW_TAG_typedef)
- .byte 0x0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x4 # (abbrev code)
- .uleb128 0x24 # (DW_TAG_base_type)
- .byte 0x0 # DW_children_no
- .uleb128 0xb # (DW_AT_byte_size)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3e # (DW_AT_encoding)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x5 # (abbrev code)
- .uleb128 0x2e # (DW_TAG_subprogram)
- .byte 0x1 # DW_children_yes
- .uleb128 0x3f # (DW_AT_external)
- .uleb128 0xc # (DW_FORM_flag)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x3c # (DW_AT_declaration)
- .uleb128 0xc # (DW_FORM_flag)
- .uleb128 0x1 # (DW_AT_sibling)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x6 # (abbrev code)
- .uleb128 0x5 # (DW_TAG_formal_parameter)
- .byte 0x0 # DW_children_no
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x34 # (DW_AT_artificial)
- .uleb128 0xc # (DW_FORM_flag)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x7 # (abbrev code)
- .uleb128 0x5 # (DW_TAG_formal_parameter)
- .byte 0x0 # DW_children_no
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x8 # (abbrev code)
- .uleb128 0x2e # (DW_TAG_subprogram)
- .byte 0x1 # DW_children_yes
- .uleb128 0x3f # (DW_AT_external)
- .uleb128 0xc # (DW_FORM_flag)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x3c # (DW_AT_declaration)
- .uleb128 0xc # (DW_FORM_flag)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x9 # (abbrev code)
- .uleb128 0xf # (DW_TAG_pointer_type)
- .byte 0x0 # DW_children_no
- .uleb128 0xb # (DW_AT_byte_size)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xa # (abbrev code)
- .uleb128 0x2e # (DW_TAG_subprogram)
- .byte 0x1 # DW_children_yes
- .uleb128 0x3f # (DW_AT_external)
- .uleb128 0xc # (DW_FORM_flag)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x1 # (DW_AT_sibling)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xb # (abbrev code)
- .uleb128 0xb # (DW_TAG_lexical_block)
- .byte 0x1 # DW_children_yes
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xc # (abbrev code)
- .uleb128 0x34 # (DW_TAG_variable)
- .byte 0x0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xd # (abbrev code)
- .uleb128 0x2e # (DW_TAG_subprogram)
- .byte 0x1 # DW_children_yes
- .uleb128 0x47 # (DW_AT_specification)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x11 # (DW_AT_low_pc)
- .uleb128 0x1 # (DW_FORM_addr)
- .uleb128 0x12 # (DW_AT_high_pc)
- .uleb128 0x1 # (DW_FORM_addr)
- .uleb128 0x1 # (DW_AT_sibling)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xe # (abbrev code)
- .uleb128 0x5 # (DW_TAG_formal_parameter)
- .byte 0x0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x34 # (DW_AT_artificial)
- .uleb128 0xc # (DW_FORM_flag)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0xf # (abbrev code)
- .uleb128 0x5 # (DW_TAG_formal_parameter)
- .byte 0x0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x10 # (abbrev code)
- .uleb128 0x26 # (DW_TAG_const_type)
- .byte 0x0 # DW_children_no
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0x0
- .byte 0x0
-
- .uleb128 0x11 # (abbrev code)
- .uleb128 0x2e # (DW_TAG_subprogram)
- .byte 0x1 # DW_children_yes
- .uleb128 0x47 # (DW_AT_specification)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x11 # (DW_AT_low_pc)
- .uleb128 0x1 # (DW_FORM_addr)
- .uleb128 0x12 # (DW_AT_high_pc)
- .uleb128 0x1 # (DW_FORM_addr)
- .byte 0x0
- .byte 0x0
-
+.Labbrev1_begin:
+
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x25 /* (DW_AT_producer) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x13 /* (DW_AT_language) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x2 /* (abbrev code) */
+ .uleb128 0x2 /* (DW_TAG_class_type) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x3 /* (abbrev code) */
+ .uleb128 0x16 /* (DW_TAG_typedef) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x4 /* (abbrev code) */
+ .uleb128 0x24 /* (DW_TAG_base_type) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3e /* (DW_AT_encoding) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x5 /* (abbrev code) */
+ .uleb128 0x2e /* (DW_TAG_subprogram) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x3f /* (DW_AT_external) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3c /* (DW_AT_declaration) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x6 /* (abbrev code) */
+ .uleb128 0x5 /* (DW_TAG_formal_parameter) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x34 /* (DW_AT_artificial) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x7 /* (abbrev code) */
+ .uleb128 0x5 /* (DW_TAG_formal_parameter) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x9 /* (abbrev code) */
+ .uleb128 0xf /* (DW_TAG_pointer_type) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xa /* (abbrev code) */
+ .uleb128 0x2e /* (DW_TAG_subprogram) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x3f /* (DW_AT_external) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xb /* (abbrev code) */
+ .uleb128 0xb /* (DW_TAG_lexical_block) */
+ .byte 0x1 /* DW_children_yes */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xc /* (abbrev code) */
+ .uleb128 0x34 /* (DW_TAG_variable) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xd /* (abbrev code) */
+ .uleb128 0x2e /* (DW_TAG_subprogram) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x47 /* (DW_AT_specification) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x11 /* (DW_AT_low_pc) */
+ .uleb128 0x1 /* (DW_FORM_addr) */
+ .uleb128 0x12 /* (DW_AT_high_pc) */
+ .uleb128 0x1 /* (DW_FORM_addr) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xe /* (abbrev code) */
+ .uleb128 0x5 /* (DW_TAG_formal_parameter) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x34 /* (DW_AT_artificial) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0xf /* (abbrev code) */
+ .uleb128 0x5 /* (DW_TAG_formal_parameter) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x10 /* (abbrev code) */
+ .uleb128 0x26 /* (DW_TAG_const_type) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0x0
+ .byte 0x0
+
.byte 0x0
.byte 0x0
--- a/gdb/testsuite/gdb.dwarf2/dw2-method-type-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-method-type-spec.exp
@@ -28,8 +28,8 @@ set srcfile $testfile.S
set executable $testfile.x
if {[gdb_compile [file join $srcdir $subdir $srcfile] \
- [file join $objdir $subdir $executable] \
- object {nodebug}] != ""} {
+ [file join $objdir $subdir $executable] \
+ object {nodebug}] != ""} {
return -1
}