From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3782 invoked by alias); 8 Jul 2003 02:53:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3773 invoked from network); 8 Jul 2003 02:53:36 -0000 Received: from unknown (HELO mail03.idc.renesas.com) (202.234.163.13) by sources.redhat.com with SMTP; 8 Jul 2003 02:53:36 -0000 Received: from mail03.idc.renesas.com (localhost [127.0.0.1]) by mail03.idc.renesas.com with ESMTP id h682rYeM025193 for ; Tue, 8 Jul 2003 11:53:35 +0900 (JST) Received: from guardian03.idc.renesas.com ([172.20.8.134]) by mail03.idc.renesas.com with ESMTP id h682rYUc025188 for ; Tue, 8 Jul 2003 11:53:34 +0900 (JST) Received: (from root@localhost) by guardian03.idc.renesas.com with id h682rVfB025486 for gdb-patches@sources.redhat.com; Tue, 8 Jul 2003 11:53:31 +0900 (JST) Received: from unknown [172.20.8.73] by guardian03.idc.renesas.com with SMTP id MAA25485 ; Tue, 8 Jul 2003 11:53:31 +0900 Received: from mta05.idc.renesas.com (localhost [127.0.0.1]) by mta05.idc.renesas.com with ESMTP id h682rXgO013035 for ; Tue, 8 Jul 2003 11:53:33 +0900 (JST) Received: from rnsmtp01.hoku_r.renesas.com ([10.145.246.51]) by mta05.idc.renesas.com with ESMTP id h682rW8I013032 for ; Tue, 8 Jul 2003 11:53:32 +0900 (JST) Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id LAA02141 for ; Tue, 8 Jul 2003 11:53:32 +0900 (JST) Received: from KEI (unknown [10.145.105.81]) by mrkaisv.hoku.renesas.com (Postfix) with SMTP id ECBD879849A for ; Tue, 8 Jul 2003 11:53:31 +0900 (JST) Message-ID: <014401c344fc$7b0972d0$5169910a@KEI> From: "Kei Sakamoto" To: Subject: [patch/testcase] fix gdb.base/relocate.c Date: Tue, 08 Jul 2003 02:53:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0141_01C34547.EABD1280" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-07/txt/msg00149.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0141_01C34547.EABD1280 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-length: 1013 The attached patch fixes gdb.base/relocate.c. "relocate.exp: get address of function_bar" fails with m32r-elf-gdb as the following: print &function_bar $6 = (int (*)(void)) 0xc (gdb) FAIL: gdb.base/relocate.exp: get address of function_bar (unknown output) Both function_bar and global_bar have the same address, 0xc. Though they belong to different sections, gdb considers they are the same and prints global_bar's data instead of function_bar's. The same error happens with i386 if line 4 and 5 of relocate.c are modified as the following: short global_foo = 3; short global_bar = 4; I guess this is not gdb's bug but a feature and the testcase should be modified. So I made a patch file. The attached patch inserts a definition of a dummy array so that global_bar and function_bar should not have the same address. Kei 2003-07-08 Kei Sakamoto * gdb.base/relocate.c : Add a dummy array to make global_bar and function_bar have different addresses. ------=_NextPart_000_0141_01C34547.EABD1280 Content-Type: application/octet-stream; name="relocate.c.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="relocate.c.patch" Content-length: 402 --- insight-20030703.orig/src/gdb/testsuite/gdb.base/relocate.c Fri Apr 5 = 11:45:48 2002=0A= +++ insight-20030703/src/gdb/testsuite/gdb.base/relocate.c Mon Jul 7 16:56= :47 2003=0A= @@ -1,6 +1,8 @@=0A= static int static_foo =3D 1;=0A= static int static_bar =3D 2;=0A= =20=0A= +int dummy[] =3D {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};=0A= +=0A= int global_foo =3D 3;=0A= int global_bar =3D 4;=0A= =20=0A= ------=_NextPart_000_0141_01C34547.EABD1280--