Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	Eli Zaretskii <eliz@gnu.org>,
	       gdb-patches@sourceware.org
Subject: Re: [patch] [sim] --disable-sim on ppc* by default (for AIX)  [Re: getaddrinfo available on all GDB hosts?]
Date: Thu, 13 Feb 2014 11:39:00 -0000	[thread overview]
Message-ID: <52FCAF01.3040104@redhat.com> (raw)
In-Reply-To: <20140213110449.GA28469@host2.jankratochvil.net>

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 <main+44>
   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 <main+84>
   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


  reply	other threads:[~2014-02-13 11:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 16:54 [PATCH] Add IPv6 support for remote TCP connections Paul Fertser
2014-02-09  8:31 ` Jan Kratochvil
2014-02-09  9:53   ` Paul Fertser
2014-02-09 13:05     ` Jan Kratochvil
2014-02-09 16:35       ` Eli Zaretskii
2014-02-09 16:47         ` Jan Kratochvil
2014-02-09 17:08           ` Paul Fertser
2014-02-09 17:29             ` Jan Kratochvil
     [not found]               ` <1392033768-16793-1-git-send-email-fercerpav@gmail.com>
2014-02-10 16:53                 ` [PATCH v2] " Eli Zaretskii
2014-02-10 17:02                   ` Paul Fertser
2014-02-10 17:45                     ` Eli Zaretskii
2014-02-10 19:58                       ` getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections] Jan Kratochvil
2014-02-11  3:42                         ` Joel Brobecker
2014-02-11 20:05                           ` Jan Kratochvil
2014-02-11 20:33                             ` Stan Shebs
2014-02-12  3:04                               ` Joel Brobecker
2014-02-12  3:00                             ` Joel Brobecker
2014-02-12 12:10                               ` Jan Kratochvil
2014-02-13  7:37                                 ` Joel Brobecker
2014-02-13 10:44                                   ` [patch] [sim] --disable-sim on ppc* by default (for AIX) [Re: getaddrinfo available on all GDB hosts?] Jan Kratochvil
2014-02-13 10:51                                     ` Pedro Alves
2014-02-13 11:04                                       ` Jan Kratochvil
2014-02-13 11:39                                         ` Pedro Alves [this message]
2014-02-13 11:51                                           ` Joel Brobecker
2014-02-13 12:08                                           ` [cancel] " Jan Kratochvil
2014-02-13 11:59                                     ` Joel Brobecker
2014-02-13 14:26                                 ` getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections] Tom Tromey
2014-02-13 11:36                           ` Jan Kratochvil
2014-02-13 11:55                             ` Joel Brobecker
2014-02-11 19:48                         ` [PATCH v3] Add IPv6 support for outgoing remote TCP connections Paul Fertser
2014-02-12 16:53                           ` Jan Kratochvil
2014-02-12 17:32                             ` Paul Fertser
2014-02-12 20:10                               ` Jan Kratochvil
2015-03-22 16:39             ` [PATCH] Add IPv6 support for " Jan Kratochvil
2015-03-22 16:54               ` Eli Zaretskii
2015-03-22 17:09                 ` Jan Kratochvil
2015-03-22 17:48                   ` Eli Zaretskii
2015-03-23 18:02                     ` Pedro Alves
2015-03-23 18:42                       ` Eli Zaretskii
2015-03-23 19:12                         ` Joel Brobecker
2015-03-23 19:18                           ` Eli Zaretskii
2015-04-13 15:12                             ` Pedro Alves
2015-04-13 15:27                               ` Eli Zaretskii
2015-04-13 16:10                                 ` Pedro Alves
2015-03-23 19:19                         ` Pedro Alves
2015-03-23 19:03               ` Corinna Vinschen
2015-03-23 19:12                 ` Pedro Alves
2014-02-09 16:29     ` Eli Zaretskii
2014-02-09 16:25   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FCAF01.3040104@redhat.com \
    --to=palves@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox