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 1/7/11 7:23 AM, Yao Qi wrote:
I noticed that sharing code of GDB and GDBServer is discussed in 2010
GCC Summit.
http://sourceware.org/gdb/wiki/2010_GCC_Summit_BoF

I think everybody generally agrees that sharing code is good, and we should take opportunities to do so.


Where it's likely to get complicated is in areas like stop handling. GDB's native code can make casual references into breakpoint definitions, set/show variables, which is no big deal when you're in the same address space, but GDBserver needs to be either be preloaded with that information or pass the buck to GDB.

One thing that we could be doing in addition to moving code is to scrutinize gdb/*-nat.c and friends, and abstract out some API for any in-GDB-itself assumptions. Hopefully that will help to minimize the need for #ifdef GDBSERVER hacks as we refactor the code.

Stan


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