From patchwork Mon Jul 22 03:16:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omair Javaid X-Patchwork-Id: 18460 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6BBC426EE8 for ; Mon, 22 Jul 2013 03:16:53 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id q12sf8045387vbe.9 for ; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :mime-version:from:date:message-id:subject:to:cc:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=6kFDOPQ7GCTxRsowrhv5JdO37IOmS7TJnCndL6bBmNQ=; b=PnStOgIV7L7TEWj3dD7dCK42KtYgWRGIjfhnDVVP/79B1ph65tl4lRgool4i3otVQT GzYkLCUuJbTP4HuQnMiY0rB38YLYTW+8SxwDfSKd/aygDKrb07qgDgfbLZBEvpUpu+k0 oNU9di6RJjXu3dnRUQ/Xqx2qqmnLrmtjHdB5TVyOO49GzlW5ZyEaXp3ALVfKshVK5HjI 7ULyCAjzxXrmHpJLAzfTdAkfTC193IxZNcMQ5ODCpeF1R9JsUZt8yxlmHRZ+gBpiBhVu T6+OWEvNL2VcHTzL0rdlrJDKCHGi/YsY/u31GYuNZhipNgYqJdWI387QVYdxkYJFvwSa x95A== X-Received: by 10.236.156.234 with SMTP id m70mr13315938yhk.37.1374463012436; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.118.227 with SMTP id kp3ls2484352qeb.19.gmail; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) X-Received: by 10.52.23.49 with SMTP id j17mr7428108vdf.56.1374463012248; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id xb6si6569421vdb.120.2013.07.21.20.16.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Jul 2013 20:16:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id gf11so333247vcb.25 for ; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) X-Received: by 10.52.27.172 with SMTP id u12mr7226995vdg.64.1374463012140; Sun, 21 Jul 2013 20:16:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp35718veb; Sun, 21 Jul 2013 20:16:51 -0700 (PDT) X-Received: by 10.182.60.2 with SMTP id d2mr19210266obr.75.1374463011438; Sun, 21 Jul 2013 20:16:51 -0700 (PDT) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx.google.com with ESMTPS id x4si14857085oej.21.2013.07.21.20.16.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Jul 2013 20:16:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.173 is neither permitted nor denied by best guess record for domain of omair.javaid@linaro.org) client-ip=209.85.214.173; Received: by mail-ob0-f173.google.com with SMTP id wc20so7563267obb.18 for ; Sun, 21 Jul 2013 20:16:50 -0700 (PDT) X-Received: by 10.60.41.66 with SMTP id d2mr25522865oel.28.1374463010799; Sun, 21 Jul 2013 20:16:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.60.135 with HTTP; Sun, 21 Jul 2013 20:16:30 -0700 (PDT) From: Omair Javaid Date: Mon, 22 Jul 2013 08:16:30 +0500 Message-ID: Subject: [PATCH] testsuite/gdb.dwarf2: Enable dw2-error.exp tests for arm targets To: gdb-patches@sourceware.org Cc: patches@linaro.org X-Gm-Message-State: ALoCoQk1/fN+psUBwuv+4TxjUgFQYg+/WZivU8aE0DyNxUmM2Kq6vhH5PuqfljapMKjQ+KVPWL3D X-Original-Sender: omair.javaid@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , dw2-error.exp is not run for arm targets because this test has been written in x86 assembly language. This patch adds ARM version of assembly code required to run dw2-error.exp tests on arm targets. Attached patch is tested on ARMv7 and x86_64 targets. gdb/testsuite/ChangeLog: 2013-07-22 Omair Javaid * gdb.dwarf2/dw2-error.S: Adding ARM assembly code. Index: gdb/testsuite/gdb.dwarf2/dw2-error.S =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-error.S,v retrieving revision 1.2 diff -u -p -r1.2 dw2-error.S --- gdb/testsuite/gdb.dwarf2/dw2-error.S 12 Feb 2013 18:27:29 -0000 1.2 +++ gdb/testsuite/gdb.dwarf2/dw2-error.S 22 Jul 2013 02:57:06 -0000 @@ -18,6 +18,8 @@ */ +#ifndef __arm__ + .file "dw2-error.c" .text .Ltext0: @@ -158,3 +160,177 @@ main: .string "dw2-error.c" .ident "GCC: (GNU) 4.6.3 20120306 (Red Hat 4.6.3-2)" .section .note.GNU-stack,"",@progbits + +#else + + .file "dw2-error.c" + .text +.Ltext0: + .cfi_sections .debug_frame + .align 2 + .global main + .type main, %function +main: +.LFB0: + .file 1 "dw2-error.c" + @ dw2-error.c:19 + .loc 1 19 0 + .cfi_startproc + @ args = 0, pretend = 0, frame = 0 + @ frame_needed = 1, uses_anonymous_args = 0 + @ link register save eliminated. +@ BLOCK 2 seq:0 +@ PRED: ENTRY (fallthru) + str fp, [sp, #-4]! +.LCFI0: + .cfi_def_cfa_offset 4 + .cfi_offset 11, -4 + add fp, sp, #0 +.LCFI1: + .cfi_def_cfa_register 11 + @ dw2-error.c:20 + .loc 1 20 0 + mov r3, #23 + @ dw2-error.c:21 + .loc 1 21 0 + mov r0, r3 +@ SUCC: EXIT [100.0%] + add sp, fp, #0 + ldmfd sp!, {fp} + bx lr + .cfi_endproc +.LFE0: + .size main, .-main +.Letext0: + .section .debug_info,"",%progbits +.Ldebug_info0: + .4byte 0x42 @ Length of Compilation Unit Info + .2byte 0x99 @ DWARF version number + .4byte .Ldebug_abbrev0 @ Offset Into Abbrev. Section + .byte 0x4 @ Pointer Size (in bytes) + .uleb128 0x1 @ (DIE (0xb) DW_TAG_compile_unit) + .4byte .LASF0 @ DW_AT_producer: "GNU C 4.7.3" + .byte 0x1 @ DW_AT_language + .4byte .LASF1 @ DW_AT_name: "dw2-error.c" + .4byte .LASF2 @ DW_AT_comp_dir: "/tmp" + .4byte .Ltext0 @ DW_AT_low_pc + .4byte .Letext0 @ DW_AT_high_pc + .4byte .Ldebug_line0 @ DW_AT_stmt_list + .uleb128 0x2 @ (DIE (0x25) DW_TAG_subprogram) + .byte 0x1 @ DW_AT_external + .4byte .LASF3 @ DW_AT_name: "main" + .byte 0x1 @ DW_AT_decl_file (dw2-error.c) + .byte 0x12 @ DW_AT_decl_line + .4byte 0x3e @ DW_AT_type + .4byte .LFB0 @ DW_AT_low_pc + .4byte .LFE0 @ DW_AT_high_pc + .4byte .LLST0 @ DW_AT_frame_base + .byte 0x1 @ DW_AT_GNU_all_call_sites + .uleb128 0x3 @ (DIE (0x3e) DW_TAG_base_type) + .byte 0x4 @ DW_AT_byte_size + .byte 0x5 @ DW_AT_encoding + .ascii "int\0" @ DW_AT_name + .byte 0 @ end of children of DIE 0xb + .section .debug_abbrev,"",%progbits +.Ldebug_abbrev0: + .uleb128 0x1 @ (abbrev code) + .uleb128 0x11 @ (TAG: DW_TAG_compile_unit) + .byte 0x1 @ DW_children_yes + .uleb128 0x25 @ (DW_AT_producer) + .uleb128 0xe @ (DW_FORM_strp) + .uleb128 0x13 @ (DW_AT_language) + .uleb128 0xb @ (DW_FORM_data1) + .uleb128 0x3 @ (DW_AT_name) + .uleb128 0xe @ (DW_FORM_strp) + .uleb128 0x1b @ (DW_AT_comp_dir) + .uleb128 0xe @ (DW_FORM_strp) + .uleb128 0x11 @ (DW_AT_low_pc) + .uleb128 0x1 @ (DW_FORM_addr) + .uleb128 0x12 @ (DW_AT_high_pc) + .uleb128 0x1 @ (DW_FORM_addr) + .uleb128 0x10 @ (DW_AT_stmt_list) + .uleb128 0x6 @ (DW_FORM_data4) + .byte 0 + .byte 0 + .uleb128 0x2 @ (abbrev code) + .uleb128 0x2e @ (TAG: DW_TAG_subprogram) + .byte 0 @ DW_children_no + .uleb128 0x3f @ (DW_AT_external) + .uleb128 0xc @ (DW_FORM_flag) + .uleb128 0x3 @ (DW_AT_name) + .uleb128 0xe @ (DW_FORM_strp) + .uleb128 0x3a @ (DW_AT_decl_file) + .uleb128 0xb @ (DW_FORM_data1) + .uleb128 0x3b @ (DW_AT_decl_line) + .uleb128 0xb @ (DW_FORM_data1) + .uleb128 0x49 @ (DW_AT_type) + .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 0x40 @ (DW_AT_frame_base) + .uleb128 0x6 @ (DW_FORM_data4) + .uleb128 0x2117 @ (DW_AT_GNU_all_call_sites) + .uleb128 0xc @ (DW_FORM_flag) + .byte 0 + .byte 0 + .uleb128 0x3 @ (abbrev code) + .uleb128 0x24 @ (TAG: DW_TAG_base_type) + .byte 0 @ 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 0 + .byte 0 + .byte 0 + .section .debug_loc,"",%progbits +.Ldebug_loc0: +.LLST0: + .4byte .LFB0-.Ltext0 @ Location list begin address (*.LLST0) + .4byte .LCFI0-.Ltext0 @ Location list end address (*.LLST0) + .2byte 0x2 @ Location expression size + .byte 0x7d @ DW_OP_breg13 + .sleb128 0 + .4byte .LCFI0-.Ltext0 @ Location list begin address (*.LLST0) + .4byte .LCFI1-.Ltext0 @ Location list end address (*.LLST0) + .2byte 0x2 @ Location expression size + .byte 0x7d @ DW_OP_breg13 + .sleb128 4 + .4byte .LCFI1-.Ltext0 @ Location list begin address (*.LLST0) + .4byte .LFE0-.Ltext0 @ Location list end address (*.LLST0) + .2byte 0x2 @ Location expression size + .byte 0x7b @ DW_OP_breg11 + .sleb128 4 + .4byte 0 @ Location list terminator begin (*.LLST0) + .4byte 0 @ Location list terminator end (*.LLST0) + .section .debug_aranges,"",%progbits + .4byte 0x1c @ Length of Address Ranges Info + .2byte 0x2 @ DWARF Version + .4byte .Ldebug_info0 @ Offset of Compilation Unit Info + .byte 0x4 @ Size of Address + .byte 0 @ Size of Segment Descriptor + .2byte 0 @ Pad to 8 byte boundary + .2byte 0 + .4byte .Ltext0 @ Address + .4byte .Letext0-.Ltext0 @ Length + .4byte 0 + .4byte 0 + .section .debug_line,"",%progbits +.Ldebug_line0: + .section .debug_str,"MS",%progbits,1 +.LASF0: + .ascii "GNU C 4.7.3\000" +.LASF2: + .ascii "/tmp\000" +.LASF3: + .ascii "main\000" +.LASF1: + .ascii "dw2-error.c\000" + .ident "GCC: (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3" + .section .note.GNU-stack,"",%progbits + +#endif