This is the mail archive of the
mailing list for the GDB project.
GDB code reuse for gdbserver?
- From: Paul Koning <paul_koning at dell dot com>
- To: gdb at sourceware dot org
- Date: Thu, 7 Oct 2010 14:37:25 -0400
- Subject: GDB code reuse for gdbserver?
I'm wondering about a different approach to gdbserver.
Right now gdbserver is a target side remote-protocol machine (server.c) plus a separately developed version of target debugging machinery. The latter duplicates what's in the main gdb directory, but only for a small number of platforms, possibly with reduced functionality, etc.
Rather than develop things twice, would it make sense to view gdbserver as the target machinery of gdb, connected to the rest of gdb by a remote-protocol pipe? What that would actually mean is that gdbserver/server.c would talk to gdb target_ops methods. So gdbserver would consist of the protocol code specific to gdbserver, plus target code from main gdb, plus bits of infrastructure sufficient to support the above.
Does this make sense? (In other words, would such an approach be welcomed?)