Hello Jim, Thank you for your comment. From: Jim Blandy Subject: Re: [RFC] checking the Z-packet support on gdbserver Date: Thu, 13 Sep 2007 10:05:50 -0700 > Emi SUZUKI writes: > > Would anyone give me any comments how it should be treated as a whole? > > Defines another packet for it? Applies as proposed and notes "it > > might not work with older versions of gdbserver" ? > > I wonder, would it make sense to have GDB assume that hardware > watchpoints are *not* available on remote targets, and then have > gdbserver send a 'qSupported' packet stubfeature that tells GDB that > hardware watchpoints are okay? Well, I understood casually that the answer of 'qSupported' packet would tell the support for the other 'q' packets from the current implementaion... According to the description in the info, definitely it would make sense. How about the attached? Meanwhile, I've found the definition below in gdb/config/nm-i386.h. #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1 TARGET_CAN_USE_HARDWARE_WATCHPOINT is used in watch_command_1 for checking if the support of hardware watchpoints are available on the target. If it is not defined, the target vector function 'to_can_use_hw_breakpoint' would be called. So, the above implies that GDB built for the x86 native target is not supposed to debug the remote target. But it should be, to debug a target running on a remote machine which is the same architecture to the local host, shouldn't it? (Although it would not be much necessary in practice...) Best regards, -- Emi SUZUKI / emi-suzuki at tjsys.co.jp