From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17341 invoked by alias); 13 Feb 2014 11:39:52 -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 17331 invoked by uid 89); 13 Feb 2014 11:39:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Feb 2014 11:39:50 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1DBdmPd018685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Feb 2014 06:39:48 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s1DBdjPA015952; Thu, 13 Feb 2014 06:39:46 -0500 Message-ID: <52FCAF01.3040104@redhat.com> Date: Thu, 13 Feb 2014 11:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Jan Kratochvil CC: Joel Brobecker , Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [patch] [sim] --disable-sim on ppc* by default (for AIX) [Re: getaddrinfo available on all GDB hosts?] References: <20140210170244.GO2320@home.lan> <83vbwmuaj8.fsf@gnu.org> <20140210195758.GA16956@host2.jankratochvil.net> <20140211034157.GG5485@adacore.com> <20140211200456.GA22728@host2.jankratochvil.net> <20140212030012.GO5485@adacore.com> <20140212120945.GA2109@host2.jankratochvil.net> <20140213073726.GU5485@adacore.com> <20140213104347.GA27475@host2.jankratochvil.net> <52FCA3A6.3060408@redhat.com> <20140213110449.GA28469@host2.jankratochvil.net> In-Reply-To: <20140213110449.GA28469@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-02/txt/msg00457.txt.bz2 On 02/13/2014 11:04 AM, Jan Kratochvil wrote: > On Thu, 13 Feb 2014 11:51:18 +0100, Pedro Alves wrote: >> On 02/13/2014 10:43 AM, Jan Kratochvil wrote: >> >>> bzip2 -dc gdb-7.7.tar.bz2|tar xf -;cd gdb-7.7;./configure;make >>> gcc -g -O2 -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb -I./../../gdb/config -I. -I../common -I./../common -o gentmap >>> gcc: fatal error: no input files >>> compilation terminated. >>> make: 1254-004 The error code from the last command is 1. >>> >>> (BTW it builds OK on RHEL-5 ppc64.) >>> >>> But I have figured out now it builds with --disable-sim . Maybe to disable >>> ppc* sim by default? >> >> I don't see how that makes sense. This sounds like a host >> issue rather than a target issue? > > The mail was about two unrelated problems: > > (1) GDB by default fails to build on some archs of AIX. > This could be fixed. Currently I do not know how but there is some way. > > (2) The ppc sim target is useless. Therefore it wastes time of people trying > to use it. > > By fixing (2) one also fixes (1) as a side effect. Only if you assume native build. Does the sim build on AIX for other targets? E.g., --target=arm-eabi. Let's not conflate the issues please. > (2) The ppc sim target is useless. Therefore it wastes time of people trying > to use it. ... > But I have figured out now it builds with --disable-sim . Maybe to disable > ppc* sim by default? I have disabled it in Fedora/RHEL in Feb 2008 as already > that time it could not run any binary. This is all arguable. You can't really expect that most of our sims are able to run full GNU/Linux binaries. I just tried the ppc one on gcc110 (gdb built w/ -m32) and I found that it works OK for basic bare-metal debugging, about the same as most other sims -- as documented in its README, it only supports static executables. Often I'll just run a .o file with a sim. E.g., on gcc110/ppc64, gdb built w/ -m32: >./gdb ./gdb.o Reading symbols from ./gdb.o...done. (gdb) tar sim Connected to the simulator. (gdb) load (gdb) b main Breakpoint 1 at 0x1c: file ../../src/gdb/gdb.c, line 29. (gdb) r Starting program: /home/palves/gdb/binutils-gdb/build/gdb/gdb.o Breakpoint 1, main (argc=1, argv=0xfdea0) at ../../src/gdb/gdb.c:29 29 memset (&args, 0, sizeof args); (gdb) disassemble Dump of assembler code for function main: 0x00000000 <+0>: ori r15,r27,28275 0x00000004 <+4>: xoris r12,r27,25856 0x00000008 <+8>: stw r0,52(r1) 0x0000000c <+12>: stw r31,44(r1) 0x00000010 <+16>: mr r31,r1 0x00000014 <+20>: stw r3,24(r31) 0x00000018 <+24>: stw r4,28(r31) => 0x0000001c <+28>: addi r9,r31,8 0x00000020 <+32>: mr r3,r9 0x00000024 <+36>: li r4,0 0x00000028 <+40>: li r5,12 0x0000002c <+44>: bl 0x2c 0x00000030 <+48>: lwz r9,24(r31) 0x00000034 <+52>: stw r9,8(r31) 0x00000038 <+56>: lwz r9,28(r31) 0x0000003c <+60>: stw r9,12(r31) 0x00000040 <+64>: lis r9,0 0x00000044 <+68>: addi r9,r9,0 0x00000048 <+72>: stw r9,16(r31) 0x0000004c <+76>: addi r9,r31,8 0x00000050 <+80>: mr r3,r9 0x00000054 <+84>: bl 0x54 0x00000058 <+88>: mr r9,r3 0x0000005c <+92>: mr r3,r9 0x00000060 <+96>: addi r11,r31,48 0x00000064 <+100>: lwz r0,4(r11) 0x00000068 <+104>: mtlr r0 0x0000006c <+108>: lwz r31,-4(r11) 0x00000070 <+112>: mr r1,r11 0x00000074 <+116>: blr End of assembler dump. (gdb) I'm not seeing what is special about the ppc sim/target in this whole scenario in question. -- Pedro Alves