GDBserver ports cleanup

Pedro Alves palves@redhat.com
Wed May 13 12:01:21 GMT 2020


On 5/12/20 9:26 PM, Christian Biesinger via Gdb-patches wrote:
> On Tue, May 12, 2020 at 11:48 AM Simon Marchi via Gdb-patches

>> About Windows support for ARM, I don't really know about it.  I think that our port
>> was targeting Windows CE [2], which can probably be considered obsolete.  However,
>> Windows 10 supposedly runs on ARM [3], so it might be relevant to keep it?  I don't really
>> know if the current GDBserver code would help for that or not.  In doubt, I won't propose
>> to remove it.
> 
> If indeed the win32-arm support handles Windows 10, I think it would
> be good to keep it, but I am not sure it does -- win32-arm-low.cc does
> have these lines:
> /* Correct in either endianness.  We do not support Thumb yet.  */
> static const unsigned long arm_wince_breakpoint = 0xe6000010;
> #define arm_wince_breakpoint_len 4
> 
> Note mention of WinCE. Also, I am not so familiar with Thumb but I
> believe that's widely used on ARM these days?
> 
> So my vote would be to remove this for now and if someone wants to
> revive it there's the git history.
win32-arm support in gdbserver is only for Windows CE.  I was the one
who wrote it, it was the reason I got into GDB hacking in the first
place.  :-)  There was no Windows for ARM back then.  

I don't object removing it.  I haven't built a compiler or gdbserver
for WinCE in years, and I doubt anyone else has^W^W^W^W^W^W^W^W^W^W^W^W
Wow, I just found out that someone forked my old cegcc project, and
updated it based on a much more modern GCC:
https://max.kellermann.name/projects/cegcc/
I had no idea.  Look like he has some local GDB in his github, though
dated from 2016/2018.

If you do remove it, then you'll want to remove all the code guarded under
_WIN32_WCE in win32-low.cc, and also wincecompat.c.  There's also
ARM WinCE support on the GDB side, in arm-wince-tdep.c.

I'm not sure there's that much salvageable for an eventual Windows for ARM
port.  For example, Windows for ARM is strictly Thumb-2, while I don't recall
ever considering Thumb-2 back then.  WinCE was FPA, I believe, while Windows
for ARM is VFP.  The ABIs are just different, and WinCE is weird beyond belief.
(no "errno", no concept for "current directory", etc.).

Other than nostalgia for being what got me into GDB, I really won't miss it
myself.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list