This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 00/26] Make GDB -Wpointer-sign clean.


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]