diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-10-20 22:14:08 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-10-20 22:14:08 +0000 |
commit | a9481b588959832d21b76f8e87758d1a6bae648e (patch) | |
tree | f4f9427b94ea941bcb1f6bdf3ff30c0aa9219bec /binutils | |
parent | 38b774d28cc047b9b1838ed533e86a149b6f0a9b (diff) | |
download | gdb-a9481b588959832d21b76f8e87758d1a6bae648e.zip gdb-a9481b588959832d21b76f8e87758d1a6bae648e.tar.gz gdb-a9481b588959832d21b76f8e87758d1a6bae648e.tar.bz2 |
Add an objdump test on compress debug sections
* binutils-all/compress.exp: Add an objdump test.
* binutils-all/dw2-1.W: New file.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/testsuite/ChangeLog | 23 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/compress.exp | 12 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/dw2-1.W | 104 |
3 files changed, 130 insertions, 9 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 276f0cf..06dae33 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-10-20 H.J. Lu <hongjiu.lu@intel.com> + + * binutils-all/compress.exp: Add an objdump test. + * binutils-all/dw2-1.W: New file. + 2012-08-17 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/ar.exp (long_filenames): Remove extra verbose @@ -15,15 +20,15 @@ (thin_archive_with_nested): Likewise. 2012-08-13 Ian Bolton <ian.bolton@arm.com> - Laurent Desnogues <laurent.desnogues@arm.com> - Jim MacArthur <jim.macarthur@arm.com> - Marcus Shawcroft <marcus.shawcroft@arm.com> - Nigel Stephens <nigel.stephens@arm.com> - Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> - Richard Earnshaw <rearnsha@arm.com> - Sofiane Naci <sofiane.naci@arm.com> - Tejas Belagod <tejas.belagod@arm.com> - Yufeng Zhang <yufeng.zhang@arm.com> + Laurent Desnogues <laurent.desnogues@arm.com> + Jim MacArthur <jim.macarthur@arm.com> + Marcus Shawcroft <marcus.shawcroft@arm.com> + Nigel Stephens <nigel.stephens@arm.com> + Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> + Richard Earnshaw <rearnsha@arm.com> + Sofiane Naci <sofiane.naci@arm.com> + Tejas Belagod <tejas.belagod@arm.com> + Yufeng Zhang <yufeng.zhang@arm.com> * objdump.exp: Add AArch64. diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp index 3b0b485..420794b 100644 --- a/binutils/testsuite/binutils-all/compress.exp +++ b/binutils/testsuite/binutils-all/compress.exp @@ -134,6 +134,18 @@ if ![string match "" $got] then { } } +set testname "objdump compress debug sections" +set got [remote_exec host "$OBJDUMP -W $compressedfile" "" "/dev/null" "objdump.out"] +if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + fail "$testname" + send_log "$got\n" +} +if { [regexp_diff objdump.out $srcdir/$subdir/dw2-1.W] } then { + fail "$testname" +} else { + pass "$testname" +} + set testfile tmpdir/dw2-emty.o if { ![binutils_assemble_flags $srcdir/$subdir/dw2-empty.S $testfile --nocompress-debug-sections] } then { diff --git a/binutils/testsuite/binutils-all/dw2-1.W b/binutils/testsuite/binutils-all/dw2-1.W new file mode 100644 index 0000000..9b9c844 --- /dev/null +++ b/binutils/testsuite/binutils-all/dw2-1.W @@ -0,0 +1,104 @@ + +.*dw2-1-compressed.o: file format .* + +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x4e \(32-bit\) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0><b>: Abbrev Number: 1 \(DW_TAG_compile_unit\) + <c> DW_AT_stmt_list : 0x0 + <10> DW_AT_high_pc : 0x8 + <14> DW_AT_low_pc : 0x4 + <18> DW_AT_name : file1.txt + <22> DW_AT_producer : GNU C 3.3.3 + <2e> DW_AT_language : 1 \(ANSI C\) + <1><2f>: Abbrev Number: 2 \(DW_TAG_subprogram\) + <30> DW_AT_external : 1 + <31> DW_AT_decl_file : 1 + <32> DW_AT_decl_line : 2 + <33> DW_AT_name : func_cu1 + <3c> DW_AT_type : <0x4a> + <40> DW_AT_low_pc : 0x4 + <44> DW_AT_high_pc : 0x8 + <48> DW_AT_frame_base : 1 byte block: 55 \(DW_OP_reg5 \(rdi\)\) + <1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\) + <4b> DW_AT_name : int + <4f> DW_AT_byte_size : 4 + <50> DW_AT_encoding : 5 \(signed\) + <1><51>: Abbrev Number: 0 + +Raw dump of debug contents of section .debug_line: + + Offset: 0x0 + Length: 62 + DWARF Version: 2 + Prologue Length: 35 + Minimum Instruction Length: 1 + Initial value of 'is_stmt': 1 + Line Base: 1 + Line Range: 1 + Opcode Base: 16 + + Opcodes: + Opcode 1 has 0 args + Opcode 2 has 1 args + Opcode 3 has 1 args + Opcode 4 has 1 args + Opcode 5 has 1 args + Opcode 6 has 0 args + Opcode 7 has 0 args + Opcode 8 has 0 args + Opcode 9 has 1 args + Opcode 10 has 0 args + Opcode 11 has 0 args + Opcode 12 has 1 args + Opcode 13 has 0 args + Opcode 14 has 0 args + Opcode 15 has 0 args + + The Directory Table is empty. + + The File Name Table: + Entry Dir Time Size Name + 1 0 0 0 file1.txt + + Line Number Statements: + Extended opcode 2: set Address to 0x4 + Advance Line by 3 to 4 + Copy + Copy + Extended opcode 2: set Address to 0x8 + Extended opcode 1: End of Sequence + + +Contents of the .debug_abbrev section: + + Number TAG \(0x0\) + 1 DW_TAG_compile_unit \[has children\] + DW_AT_stmt_list DW_FORM_data4 + DW_AT_high_pc DW_FORM_addr + DW_AT_low_pc DW_FORM_addr + DW_AT_name DW_FORM_string + DW_AT_producer DW_FORM_string + DW_AT_language DW_FORM_data1 + DW_AT value: 0 DW_FORM value: 0 + 2 DW_TAG_subprogram \[no children\] + DW_AT_external DW_FORM_flag + DW_AT_decl_file DW_FORM_data1 + DW_AT_decl_line DW_FORM_data1 + DW_AT_name DW_FORM_string + DW_AT_type DW_FORM_ref4 + DW_AT_low_pc DW_FORM_addr + DW_AT_high_pc DW_FORM_addr + DW_AT_frame_base DW_FORM_block1 + DW_AT value: 0 DW_FORM value: 0 + 3 DW_TAG_base_type \[no children\] + DW_AT_name DW_FORM_string + DW_AT_byte_size DW_FORM_data1 + DW_AT_encoding DW_FORM_data1 + DW_AT value: 0 DW_FORM value: 0 + +#pass |