public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: <Paul_Koning@Dell.com>
To: <palves@redhat.com>
Cc: <kevinb@redhat.com>, <gdb-patches@sourceware.org>,
	<vogt@linux.vnet.ibm.com>
Subject: Re: [PATCH 0/2] Fix invalid left shift of negative value.
Date: Tue, 17 Nov 2015 17:33:00 -0000	[thread overview]
Message-ID: <780E2D34-AC5A-4054-BA78-D9DBADFD6F6E@dell.com> (raw)
In-Reply-To: <564B3609.6040008@redhat.com>


> On Nov 17, 2015, at 9:13 AM, Pedro Alves <palves@redhat.com> wrote:
> 
> On 11/17/2015 05:09 AM, Kevin Buettner wrote:
> 
>> ...
>> Is this something that we really want to fix?  Can anyone think of a
>> host which can't run GDB (and upon which we'd like to run GDB) due the
>> fact that it uses something other than the two's complement
>> representation for signed integers?
> 
> Can't think of one.

Agreed.  One's complement is seriously obsolete.  I can't think of any architecture in current use (in actual hardware) that uses it.  You can of course easily find any number of examples supported in simulators like SIMH, but that isn't significant.  None of those are likely to become GDB targets.

>> My opinion:  Assumptions about two's complement in GDB should not be
>> fixed.  I can't think of any architecture that I'd care to use which
>> uses something other than two's complement.  My limited research on
>> the matter shows that really archaic machines used one's complement or
>> signed magnitude representations.
>> 
>> If we all agree that this is something we don't want to fix, then I
>> think we should remove that FIXME and assert somewhere that GDB is
>> expected to be hosted on platforms which use two's complement
>> representation for signed integers.
> 
> Agreed.  If someone wants to port gdb to such a host, then we can
> worry about it then.

I remember reading a claim that C requires two's complement (at least ANSI C), so it's not likely that this will ever happen, and if it does, GDB will be the least of the port developer's worries.

	paul

  reply	other threads:[~2015-11-17 17:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 11:16 Dominik Vogt
2015-11-10 11:17 ` [PATCH 1/2] " Dominik Vogt
2015-11-10 11:18 ` [PATCH 2/2] " Dominik Vogt
2015-11-10 22:42 ` [PATCH 0/2] " Kevin Buettner
2015-11-11 17:23   ` Ulrich Weigand
2015-11-11 19:27     ` Kevin Buettner
2015-11-17  5:09       ` Kevin Buettner
2015-11-17 14:13         ` Pedro Alves
2015-11-17 17:33           ` Paul_Koning [this message]
2015-11-17 15:10 ` [PATCH 3/2] " Dominik Vogt
2015-11-17 17:49   ` Kevin Buettner
2015-11-30  8:54   ` Dominik Vogt
2015-12-06 14:17     ` [SIM patch] " Joel Brobecker
2015-12-15 13:15       ` Andreas Arnez

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=780E2D34-AC5A-4054-BA78-D9DBADFD6F6E@dell.com \
    --to=paul_koning@dell.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=palves@redhat.com \
    --cc=vogt@linux.vnet.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).