This is the mail archive of the 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]

How to get remote target to break on memory access (use z-packet)

I have a remote target in which I do not have any sort of symbols
loaded.  I simply launch gdb
and open a remote serial debugging session (target remote /dev/ttyS0).
 However, I am unable
to set any sort of break-on-memory-access breakpoints that take
advantage of the processors
debug registers (the target is i386 architecture).  I have even tried
setting all the attributes that
I can find related to watchpoints or hardware breakpoints (i.e. set
can-use-hw-watchpoints 1,
remote hardware-breakpoint-packet, etc.).  I have a serial port
monitor and I see that it never
attempts to send the Z packet which is what is documented as the way
to set hw breakpoints.
I have tried the mingw version of gdb (v. 6.8), and the gdbs that come
with the distributions of ubuntu,
and fedora. Some of the examples that I have done for setting a
breakpoint are awatch *0x2f3000,
hbreak *0x2f3000, watch *(int*)0x2f3000.  Ubuntu's version of gdb
segfaults after hitting continue,
while the mingw versions and fedora behave the same.  They simply read
the memory location
when setting the breakpoint and no z-packets, even after continuing execution.

Is there something I am doing wrong?  I really would like to be able
to set break-on-access
hardware assisted breakpoints on a memory location, but I am unable to
see any sort of
z-packet sent.  Again this is without using any symbols for the
target.  The target is not using
any executables that have a symbol format that gdb understands
currently (the binaries were
not compiled with gcc or any variant) so symbol information is not
available right now
(although work is being done to add that support).  However, in the
mean time, I would like
to be able to debug the target with the assistance of those hardware
supported breakpoints,
even if the only view I have right now is a simple disassembly view.

Thank you,

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