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 2/2] Teach GDB that wchar_t is a built-in type in C++ mode


On 03/30/2017 06:34 PM, Pedro Alves wrote:

> Unlike char16_t/char32_t, unfortunately, the underlying type of
> wchar_t is implementation dependent, both size and signness.  So this
> requires adding a couple new gdbarch hooks.
> 
> Looking at the GCC code base, it seems to me that the majority of the
> ABIs have a 4-byte signed wchar_t, so that's what I made the default
> for GDB too.
> 
> I know that Windows has a 16-bit unsigned type wchar_t, so I taught
> GDB about that too.
> 
> I didn't bother with doing a compreensive cross check for all the
> ports that would need tweaking, on grounds that this doesn't really
> affect all that much that I'm aware of (I'm mainly doing this for
> completeness).  If it does, and the new test doesn't expose it, then
> we can take that as the testsuite needing improvement.

Bah, I hate leaving a job half done.  I've cross-checked the types
against GCC now, and adjusted all ports in GDB accordingly.  I'll send a
v2 shortly.

Thanks,
Pedro Alves


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