On Tue, 2006-08-29 at 09:32 +1000, Tony Breeds wrote: > On Mon, Aug 28, 2006 at 09:38:08AM -0500, Hollis Blanchard wrote: > > > You probably want to avoid serial_puts() if GDB is attached, no? > > Otherwise, you'll be sending "garbage" (i.e. non-packet data) down > the > > serial line to GDB. > > > > Rather than including gdbstub.h here, you might do something like > this: > > if (in_debugger()) > > debug_puts(sercon_handle, str); > > else > > serial_puts(sercon_handle, str); > > but in_debugger() and debug_puts() need to come from somewhere and > gdbstub.h makes sense or am I missing the point?
Sure, but: a) make it generic (i.e. not called GDB) b) abstract it into a function, so it can be magically compiled out (#define in_debugger() 0) -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-ppc-devel mailing list Xenfirstname.lastname@example.org http://lists.xensource.com/xen-ppc-devel