From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9954 invoked by alias); 15 Jul 2013 10:25: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 9944 invoked by uid 89); 15 Jul 2013 10:25:59 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 15 Jul 2013 10:25:58 +0000 Received: by mail-ob0-f171.google.com with SMTP id dn14so13887056obc.30 for ; Mon, 15 Jul 2013 03:25:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=LyTGLIL1hdqv85R/OefPkPb25rFRnZv+TW5vJiF4GvI=; b=N0WsVbfkJSsRQTh+DFKZrSbFmvVZiHkfDyr3xIQ9jD+SW77qPn2/ltu5aQbEX//DF0 1rRr40JNx6tXgCTRKU4udQN/0quMHhZICE9jzdziMkQXX+ln0wg84eKx5iDfO6pNltRI Yuc7qsUQzr3NMUqjBuSCgbAy2/Hy5FWYjt4VIXJuRyCDXpTw22tKFkeDpUFxOGfsXg33 vVfofBKS38CcUiOwAN7HrTrF9nlRLPpycazEGlLGfGcd3LIANiEkKF8f1OWUrn4X9/Wz X64nq/+Bv5IKJziRCUKlwRwaUxXaPf0ZQUgnaAk33zrZcjM/eTGTk9tz0SSKVA4wArjm GY7w== X-Received: by 10.60.62.238 with SMTP id b14mr14215893oes.90.1373883950913; Mon, 15 Jul 2013 03:25:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.60.135 with HTTP; Mon, 15 Jul 2013 03:25:30 -0700 (PDT) In-Reply-To: References: From: Omair Javaid Date: Mon, 15 Jul 2013 10:25:00 -0000 Message-ID: Subject: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQm0lrwNHcKkPpqgJ0eW6K2b78AQIJW9Y91hlZLxS2afdkuPc0E04q9xAHpHxY7aprZD7s0S X-SW-Source: 2013-07/txt/msg00344.txt.bz2 gdb.dwarf2/dw2-ifort-parameter fails on ARM because the dwarf2 debug information being created by gdb.dwarf2/dw2-ifort-parameter-debug.S gets corrupted because LSB of function addresses is ON in Thumb mode. ARM instructions are word aligned and LSB of instruction address is used to determine whether code being branched to is Thumb or ARM code. This patch solves the problem by decrementing function address by one in thumb mode. This patch has been tested on x86_64 and arm7 machines. gdb/testsuite/ChangeLog: 2013-07-15 Omair Javaid * gdb.dwarf2/dw2-ifort-parameter-debug.S: Updated to use correct function addresses while creating debug info in ARM Thumb mode. =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S,v retrieving revision 1.4 diff -u -p -r1.4 dw2-ifort-parameter-debug.S --- gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S 1 Jan 2013 06:33:28 -0000 1.4 +++ gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S 19 Jun 2013 18:34:44 -0000 @@ -29,15 +29,35 @@ .ascii "file1.txt\0" /* DW_AT_name */ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */ .byte 1 /* DW_AT_language (C) */ + +#ifndef __thumb__ + .4byte func /* DW_AT_low_pc */ .4byte main /* DW_AT_high_pc */ +#else + + .4byte func-1 /* DW_AT_low_pc */ + .4byte main-1 /* DW_AT_high_pc */ + +#endif + .uleb128 2 /* Abbrev: DW_TAG_subprogram */ .byte 1 /* DW_AT_external */ .ascii "func\0" /* DW_AT_name */ + +#ifndef __thumb__ + .4byte func /* DW_AT_low_pc */ .4byte main /* DW_AT_high_pc */ +#else + + .4byte func-1 /* DW_AT_low_pc */ + .4byte main-1 /* DW_AT_high_pc */ + +#endif + .uleb128 3 /* Abbrev: DW_TAG_formal_parameter */ .ascii "param\0" /* DW_AT_name */ .byte 1 /* DW_AT_variable_parameter */