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: duplicated code in gdb and gdbserver


On Jan 10, 2011, at 9:08 AM, Joel Brobecker wrote:

>> A differently aimed step toward this could be to remove duplication
>> between gdb native and gdbserver by gradually *deprecating gdb native
>> support*.  A library API for the remote protocol would be a natural
>> non-symbolic/process-control programming interface.
> 
> I hope you are not suggesting that we actually do remove native support
> and force native support through gdbserver!

It does sound like that. 

A big problem is that gdbserver support exists only for a few target processors and operating systems.  But in principle it seems reasonable.  Then again, so does the other (making gdb native support be the guts of gdbserver).

I've looked at that since I'm interested in one of the operating systems that isn't well supported in gdbserver, and if the gdb native code could "just be made to work" that seems like a shortcut.  Unfortunately, as has been pointed out, the list of assumptions in the gdb native support seem to make that a large job at best.

Since gdbserver is small and, being a client-server application, is at least somewhat modular, it seems that Frank's suggestion makes sense.  No matter how you slice it, it would take a serious restructuring to have a single instance of the code.

	paul



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