Index: gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S |
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.S b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S |
similarity index 56% |
copy from gdb/testsuite/gdb.dwarf2/dw2-param-error.S |
copy to gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S |
index 1efb469f5164214d1a32cf40146e8ece02c4a700..36fd465f81531f6b673b09962567a66d3a10cb5e 100644 |
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.S |
+++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S |
@@ -1,4 +1,4 @@ |
-/* Copyright 2011-2012 Free Software Foundation, Inc. |
+/* Copyright 2012-2013 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 |
@@ -14,8 +14,9 @@ |
along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
.text |
-var: .4byte 23 |
- |
+ .globl main |
+main: .byte 0 |
+.Lmain_end: |
.section .debug_info |
debug_start: |
.4byte debug_end - 1f /* Length of Compilation Unit Info */ |
@@ -25,32 +26,67 @@ debug_start: |
.byte 0x4 /* Pointer Size (in bytes) */ |
.uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */ |
.ascii "GNU C 4.4.3\0" /* DW_AT_producer */ |
- .byte 0x1 /* DW_AT_language */ |
+ .byte 0x4 /* DW_AT_language = DW_LANG_C_plus_plus */ |
.ascii "1.c\0" /* DW_AT_name */ |
+ .4byte main /* DW_AT_low_pc */ |
+ .4byte .Lmain_end /* DW_AT_high_pc */ |
.uleb128 0x4 /* (DIE (0x3c) DW_TAG_subprogram) */ |
.ascii "f\0" /* DW_AT_name */ |
- .4byte f_start /* DW_AT_low_pc */ |
- .4byte f_end /* DW_AT_high_pc */ |
+/* Value 0 would require has_section_at_zero != 0 (which is true, though). */ |
+ .4byte main /* DW_AT_low_pc */ |
+ .4byte .Lmain_end /* DW_AT_high_pc */ |
.byte 0x1 /* DW_AT_prototyped */ |
.uleb128 0x5 /* (DIE (0x42) DW_TAG_formal_parameter) */ |
- .ascii "bad\0" /* DW_AT_name */ |
- .4byte type - debug_start /* DW_AT_type */ |
- .byte 2f - 1f /* DW_AT_location */ |
-1: .byte 0x06 /* DW_OP_deref */ |
-2: |
- .uleb128 0x5 /* (DIE (0x??) DW_TAG_formal_parameter) */ |
- .ascii "good\0" /* DW_AT_name */ |
- .4byte type - debug_start /* DW_AT_type */ |
- .byte 2f - 1f /* DW_AT_location */ |
-1: .byte 0x03 /* DW_OP_addr */ |
- .4byte var |
-2: |
+ .4byte .Ltype_sizeof - debug_start /* DW_AT_type */ |
+ .ascii "param_sizeof\0" /* DW_AT_name */ |
+ |
+ .uleb128 0x5 /* (DIE (0x42) DW_TAG_formal_parameter) */ |
+ .4byte .Ltype_opnew - debug_start /* DW_AT_type */ |
+ .ascii "param_opnew\0" /* DW_AT_name */ |
+ |
+ .uleb128 0x5 /* (DIE (0x42) DW_TAG_formal_parameter) */ |
+ .4byte .Ltype_opdelete - debug_start /* DW_AT_type */ |
+ .ascii "param_opdelete\0" /* DW_AT_name */ |
+ .uleb128 0x5 /* (DIE (0x42) DW_TAG_formal_parameter) */ |
+ .4byte .Ltype_opnewarray - debug_start /* DW_AT_type */ |
+ .ascii "param_opnewarray\0" /* DW_AT_name */ |
+ |
+ .uleb128 0x5 /* (DIE (0x42) DW_TAG_formal_parameter) */ |
+ .4byte .Ltype_opdeletearray - debug_start /* DW_AT_type */ |
+ .ascii "param_opdeletearray\0" /* DW_AT_name */ |
.byte 0x0 /* end of children of DIE 0x3c */ |
-type: |
+ |
+.Ltype_sizeof: |
+ .uleb128 3 /* Abbrev: DW_TAG_base_type */ |
+ .ascii "typename<sizeof(int)>\0" /* DW_AT_name */ |
+ .byte 4 /* DW_AT_byte_size */ |
+ .byte 5 /* DW_AT_encoding */ |
+ |
+.Ltype_opnew: |
+ .uleb128 3 /* Abbrev: DW_TAG_base_type */ |
+ .ascii "C::operator new(int)\0" /* DW_AT_name */ |
+ .byte 4 /* DW_AT_byte_size */ |
+ .byte 5 /* DW_AT_encoding */ |
+ |
+.Ltype_opdelete: |
.uleb128 3 /* Abbrev: DW_TAG_base_type */ |
- .ascii "int\0" /* DW_AT_name */ |
+ .ascii "C::operator delete(void *)\0" /* DW_AT_name */ |
+ .byte 4 /* DW_AT_byte_size */ |
+ .byte 5 /* DW_AT_encoding */ |
+ |
+.Ltype_opnewarray: |
+ .uleb128 3 /* Abbrev: DW_TAG_base_type */ |
+ /* The correct new[] syntax is probably unsupported by GDB. */ |
+ .ascii "C::operator new[](int)\0" /* DW_AT_name */ |
+ .byte 4 /* DW_AT_byte_size */ |
+ .byte 5 /* DW_AT_encoding */ |
+ |
+.Ltype_opdeletearray: |
+ .uleb128 3 /* Abbrev: DW_TAG_base_type */ |
+ /* The correct delete[] syntax is probably unsupported by GDB. */ |
+ .ascii "C::operator delete[](void *)\0" /* DW_AT_name */ |
.byte 4 /* DW_AT_byte_size */ |
.byte 5 /* DW_AT_encoding */ |
@@ -68,6 +104,10 @@ debug_end: |
.uleb128 0xb /* (DW_FORM_data1) */ |
.uleb128 0x3 /* (DW_AT_name) */ |
.uleb128 0x8 /* (DW_FORM_string) */ |
+ .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 3 /* Abbrev code */ |
@@ -97,12 +137,10 @@ debug_end: |
.uleb128 0x5 /* (abbrev code) */ |
.uleb128 0x5 /* (TAG: 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 0x02 /* (DW_AT_location) */ |
- .uleb128 0x0a /* (DW_FORM_block1) */ |
+ .uleb128 0x3 /* DW_AT_name */ |
+ .uleb128 0x8 /* DW_FORM_string */ |
.byte 0x0 |
.byte 0x0 |
.byte 0x0 |