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: support C/C++ identifiers named with non-ASCII characters




Paul.Koning@dell.com 於 2018/5/22 上午2:03 寫道:

Not all byte strings are valid UTF-8 strings.  When a byte string is delivered from the outside, it makes sense to validate if it's a valid encoding before it is used.  Or you can assume that inputs are valid and rely on "symbol not found" as the general way to handle anything that doesn't match.  For gdb, that may be good enough.

I preferred the latter(I.e. assume all non-ASCII characters are valid and rely on "symbol not found"), and it's actually what the patch does. Although a compiler has to be strict with validity of non-ASCII characters, but for GDB, the latter solution is just good enough - Checking only ASCII characters makes GDB work well with all ASCII-compliant encodings.


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