From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18919 invoked by alias); 22 Oct 2013 06:20:25 -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 18908 invoked by uid 89); 22 Oct 2013 06:20:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 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; Tue, 22 Oct 2013 06:20:23 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9M6KLk1000367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Oct 2013 02:20:22 -0400 Received: from [10.34.4.133] (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9M6KKCA026068; Tue, 22 Oct 2013 02:20:20 -0400 Message-ID: <52661923.4050405@redhat.com> Date: Tue, 22 Oct 2013 06:20:00 -0000 From: Ondrej Oprala User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH 17/18] fix gdbarch buglet References: <1382369846-5817-1-git-send-email-ooprala@redhat.com> <1382369846-5817-18-git-send-email-ooprala@redhat.com> <52654F94.3040204@redhat.com> In-Reply-To: <52654F94.3040204@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00675.txt.bz2 On 10/21/2013 06:00 PM, Pedro Alves wrote: > It looks like the patch is about implicit int <-> enum > conversions, which a C++ compiler would complain about. > But the subject talks about a buglet -- what's the bug this > fixes? I'm not entirely sure TBH, this is the subject Tom gave it, so he can probably tell us more. > > Please always include a rationale for a change in the body > of the email. > > On 10/21/2013 04:37 PM, Ondrej Oprala wrote: >> From: Tom Tromey >> >> gdb/ChangeLog: >> >> 2013-10-09 Tom Tromey >> >> * gdbarch.c: Regenerate. >> (byte_order_for_code): Likewise. > This "Likewise" doesn't make sense when you read this > entry sequentially (as one should and will). My bad, that line should have been omitted, as should the others under regenerated files (fixed below). > >> (gdbarch_byte_order): Change type of the return value. >> (gdbarch_byte_order_for_code): Likewise. >> * gdbarch.h: Regenerate. >> * gdbarch.sh (byte_order): Change the return type. >> (byte_order_for_code): Likewise. From: Tom Tromey gdb/ChangeLog 2013-10-09 Tom Tromey * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (byte_order): Change the return type. (byte_order_for_code): Likewise. --- gdb/gdbarch.c | 8 ++++---- gdb/gdbarch.h | 4 ++-- gdb/gdbarch.sh | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 396bb67..3b82605 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -99,8 +99,8 @@ struct gdbarch /* basic architectural information. */ const struct bfd_arch_info * bfd_arch_info; - int byte_order; - int byte_order_for_code; + enum bfd_endian byte_order; + enum bfd_endian byte_order_for_code; enum gdb_osabi osabi; const struct target_desc * target_desc; @@ -1444,7 +1444,7 @@ gdbarch_bfd_arch_info (struct gdbarch *gdbarch) return gdbarch->bfd_arch_info; } -int +enum bfd_endian gdbarch_byte_order (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); @@ -1453,7 +1453,7 @@ gdbarch_byte_order (struct gdbarch *gdbarch) return gdbarch->byte_order; } -int +enum bfd_endian gdbarch_byte_order_for_code (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index b58efc8..92e3ddf 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -91,10 +91,10 @@ typedef int (iterate_over_objfiles_in_search_order_cb_ftype) extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch); /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */ -extern int gdbarch_byte_order (struct gdbarch *gdbarch); +extern enum bfd_endian gdbarch_byte_order (struct gdbarch *gdbarch); /* set_gdbarch_byte_order() - not applicable - pre-initialized. */ -extern int gdbarch_byte_order_for_code (struct gdbarch *gdbarch); +extern enum bfd_endian gdbarch_byte_order_for_code (struct gdbarch *gdbarch); /* set_gdbarch_byte_order_for_code() - not applicable - pre-initialized. */ extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index fa9731d..2fe535e 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -340,8 +340,8 @@ function_list () cat <printable_name # -i:int:byte_order:::BFD_ENDIAN_BIG -i:int:byte_order_for_code:::BFD_ENDIAN_BIG +i:enum bfd_endian:byte_order:::BFD_ENDIAN_BIG +i:enum bfd_endian:byte_order_for_code:::BFD_ENDIAN_BIG # i:enum gdb_osabi:osabi:::GDB_OSABI_UNKNOWN # -- 1.8.3.1