From patchwork Mon Nov 17 13:20:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3778 Received: (qmail 5494 invoked by alias); 17 Nov 2014 13:20:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 5481 invoked by uid 89); 17 Nov 2014 13:20:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Nov 2014 13:20:48 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XqMEX-00001f-2L from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 17 Nov 2014 05:20:45 -0800 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Mon, 17 Nov 2014 05:20:44 -0800 From: Yao Qi To: Subject: [PATCH] [arm] Fix fails in dw2-compdir-oldgcc.exp Date: Mon, 17 Nov 2014 21:20:25 +0800 Message-ID: <1416230425-19468-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch fixes two fails in dw2-compdir-oldgcc.exp I've seen on arm target thumb mode. FAIL: gdb.dwarf2/dw2-compdir-oldgcc.exp: info source gcc42 FAIL: gdb.dwarf2/dw2-compdir-oldgcc.exp: info source gcc43 When fill in DW_AT_low_pc, the label should be used rather than the function, otherwise, the LSB bit of the address in DW_AT_low_pc is set and the debug info is wrong. This patch is to add two labels for functions gcc42 and gcc43 respectively, and use them. These two fails are fixed. gdb/testsuite: 2014-11-17 Yao Qi * gdb.dwarf2/dw2-compdir-oldgcc.S: Define label .Lgcc42_procstart and .Lgcc43_procstart. Use .Lgcc42_procstart instead of gcc42. Use .Lgcc43_procstart instead of gcc43. --- gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S index c0a5545..c07ecb2 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S @@ -19,12 +19,14 @@ main: .globl main gcc42: .globl gcc42 +.Lgcc42_procstart: .int 0 .type gcc42, %function .size gcc42, . - gcc42 .Lgcc42_procend: gcc43: .globl gcc43 +.Lgcc43_procstart: .int 0 .type gcc43, %function .size gcc43, . - gcc43 @@ -43,7 +45,7 @@ gcc43: .globl gcc43 .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ .4byte .Lgcc42_begin /* DW_AT_stmt_list */ - .4byte gcc42 /* DW_AT_low_pc */ + .4byte .Lgcc42_procstart /* DW_AT_low_pc */ .4byte .Lgcc42_procend /* DW_AT_high_pc */ .ascii "/dir/d/dw2-compdir-oldgcc42.S\0" /* DW_AT_name */ .ascii "GNU C 4.2.0\0" /* DW_AT_producer */ @@ -54,7 +56,7 @@ gcc43: .globl gcc43 .byte 1 /* DW_AT_decl_file */ .byte 1 /* DW_AT_decl_line */ .ascii "gcc42\0" /* DW_AT_name */ - .4byte gcc42 /* DW_AT_low_pc */ + .4byte .Lgcc42_procstart /* DW_AT_low_pc */ .4byte .Lgcc42_procend /* DW_AT_high_pc */ .byte 0 /* End of children of CU */ @@ -70,7 +72,7 @@ gcc43: .globl gcc43 .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ .4byte .Lgcc43_begin /* DW_AT_stmt_list */ - .4byte gcc43 /* DW_AT_low_pc */ + .4byte .Lgcc43_procstart /* DW_AT_low_pc */ .4byte .Lgcc43_procend /* DW_AT_high_pc */ .ascii "/dir/d/dw2-compdir-oldgcc43.S\0" /* DW_AT_name */ .ascii "GNU C 4.3.0\0" /* DW_AT_producer */ @@ -81,7 +83,7 @@ gcc43: .globl gcc43 .byte 1 /* DW_AT_decl_file */ .byte 1 /* DW_AT_decl_line */ .ascii "gcc43\0" /* DW_AT_name */ - .4byte gcc43 /* DW_AT_low_pc */ + .4byte .Lgcc43_procstart /* DW_AT_low_pc */ .4byte .Lgcc43_procend /* DW_AT_high_pc */ .byte 0 /* End of children of CU */