From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8908 invoked by alias); 22 Jul 2013 03:16:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8893 invoked by uid 89); 22 Jul 2013 03:16:59 -0000 X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,TW_DM,TW_TM autolearn=no version=3.3.1 Received: from Unknown (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 22 Jul 2013 03:16:58 +0000 Received: by mail-ob0-f169.google.com with SMTP id up14so7657167obb.0 for ; Sun, 21 Jul 2013 20:16:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type :x-gm-message-state; bh=6kFDOPQ7GCTxRsowrhv5JdO37IOmS7TJnCndL6bBmNQ=; b=cvEJT+VQV8A4Dx9lq+u1/nWDme9BXktM+GDW6M3M5ntMX1RSIxAw/Rc1JqeaYqQPY7 ODuon2Hu72lCvvKbO5b/g+86KWI2wWTS4kU+Fz5Z/Q29mq18NVRNW48euuJFurA5K7nh 7so/8NPiU3nYlhVXGPcM5HC8u0Uw8cGqWPMlSPeO6IQvNEpA2lJ+rQPXuNm8qv47mFC1 p3NvdYXynpHmKnu8RRaSMLuSCokOE6OatJI5JGkNXEpwPlQnZaPCTaDXpy2A7BZaC5A+ uzfoccB+2n3td8stFJYUyDPnG43F9yU/XXYV93T+4GtsRY3W2Sgo6pcXQr3BYDPcjh7z GQOA== 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 03:16:00 -0000 Message-ID: Subject: [PATCH] testsuite/gdb.dwarf2: Enable dw2-error.exp tests for arm targets To: gdb-patches@sourceware.org Cc: patches@linaro.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQm0rtlMhsSVxFK0BrwGrCZkMo7/TgrSCkXbeenjGaDmhWV9Gat+1mqLe/WD68e6ZpXdkfg/ X-SW-Source: 2013-07/txt/msg00482.txt.bz2 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