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

Yao Qi
2013-04-12T09:32:30Z

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