From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2819 invoked by alias); 12 Apr 2013 09:32:30 -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 2809 invoked by uid 89); 12 Apr 2013 09:32:30 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 12 Apr 2013 09:32:29 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UQaLL-0002Gb-L2 from Yao_Qi@mentor.com ; Fri, 12 Apr 2013 02:32:27 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 12 Apr 2013 02:32:27 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Fri, 12 Apr 2013 02:32:26 -0700 Message-ID: <5167D4AB.9040205@codesourcery.com> Date: Fri, 12 Apr 2013 14:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 00/26] Make GDB -Wpointer-sign clean. References: <20130411225847.16791.29283.stgit@brno.lan> In-Reply-To: <20130411225847.16791.29283.stgit@brno.lan> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-04/txt/msg00373.txt.bz2 On 04/12/2013 06:58 AM, Pedro Alves wrote: > The main idea came out as reviewing a new port a few months ago, and > pointing out for the Nth time to use gdb_byte[] instead of char[]. > The bad uses were of course coming in through copy/paste, so at the > time I grepped and fixed all I found. Later, I noticed that gdb_byte and char is misused probably because we don't have guidelines on using them. People have to reference how they are used somewhere else. After reading related patches recently, I have some in my mind, and please complete them. - Use gdb_byte for the raw data of target either from the inferior or from the BFD. - Use 'char *' for string, such as file name and path name. We need to document them somewhere, for example gdb internals, IMO. -- Yao (齐尧)