This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/26] Make GDB -Wpointer-sign clean.
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 12 Apr 2013 17:32:27 +0800
- Subject: Re: [PATCH 00/26] Make GDB -Wpointer-sign clean.
- References: <20130411225847 dot 16791 dot 29283 dot stgit at brno dot lan>
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 (éå)