From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106019 invoked by alias); 12 Oct 2015 12:18:36 -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 106004 invoked by uid 89); 12 Oct 2015 12:18:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: smtprelay.hostedemail.com Received: from smtprelay0145.hostedemail.com (HELO smtprelay.hostedemail.com) (216.40.44.145) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Oct 2015 12:18:35 +0000 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 563A823413; Mon, 12 Oct 2015 12:18:33 +0000 (UTC) X-Session-Marker: 6A62656E6973746F6E40756B322E6E6574 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,jon@beniston.com,:::::,RULES_HIT:10:41:355:379:541:542:599:800:973:988:989:1155:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1541:1587:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2553:2559:2562:2691:2731:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:3874:4361:4362:4605:5007:7576:8660:8957:9040:9545:10004:10226:10400:10848:11026:11232:11658:11914:12043:12296:12438:12517:12519:12555:12679:12740:13069:13071:13095:13141:13148:13215:13229:13230:13311:13357:13436:13846:14096:14097:21060:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: frog33_2d79560bc8a38 X-Filterd-Recvd-Size: 2516 Received: from LoftPC (cpc22-croy19-2-0-cust300.19-2.cable.virginm.net [82.43.175.45]) (Authenticated sender: jbeniston@uk2.net) by omf02.hostedemail.com (Postfix) with ESMTPA; Mon, 12 Oct 2015 12:18:32 +0000 (UTC) From: "Jon Beniston" To: "'Pedro Alves'" , "'Simon Marchi'" , References: <1444538238-7468-1-git-send-email-simon.marchi@polymtl.ca> <561B952D.8060909@redhat.com> In-Reply-To: <561B952D.8060909@redhat.com> Subject: RE: [PATCH c++ 1/5] lm32: Add (const gdb_byte *) cast Date: Mon, 12 Oct 2015 12:18:00 -0000 Message-ID: <001201d104e8$1cfcd330$56f67990$@beniston.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00153.txt.bz2 Hi Pedro, Yes, I believe people are still using this port. (Probably no one on a host with different byte ordering though!) Regards, Jon -----Original Message----- From: Pedro Alves [mailto:palves@redhat.com] Sent: 12 October 2015 12:11 To: Simon Marchi; gdb-patches@sourceware.org Cc: Jon Beniston Subject: Re: [PATCH c++ 1/5] lm32: Add (const gdb_byte *) cast On 10/11/2015 05:37 AM, Simon Marchi wrote: > There might be a cleaner sequence of function calls to do what is done > here (I don't know), but since I don't want to risk breaking anything, > it's safer to just add the required cast. > > gdb/ChangeLog: > > * lm32-tdep.c (lm32_push_dummy_call): Add cast. > --- > gdb/lm32-tdep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index 25a7e1e..a0defad > 100644 > --- a/gdb/lm32-tdep.c > +++ b/gdb/lm32-tdep.c > @@ -289,7 +289,7 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, > regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val); > else > { > - write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type)); > + write_memory (sp, (const gdb_byte *) &val, TYPE_LENGTH > +(arg_type)); This reveals that the code has a host-dependency. It is assuming the byte order of the target is the same as host's. Please replace this with a call to write_memory_unsigned_integer. Looks like this port hasn't been touched ever since it was originally contributed. Jon, is there still interest in this port? Thanks, Pedro Alves