From: "Gabe Black" <gabebblack@gmail.com>
To: gdb@sourceware.org
Subject: How to get remote target to break on memory access (use z-packet)
Date: Thu, 21 Aug 2008 03:08:00 -0000 [thread overview]
Message-ID: <8a15eb2b0808200957g5fd46a96xb2e69ac60074103a@mail.gmail.com> (raw)
Hi,
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,
Gabe
next reply other threads:[~2008-08-20 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 3:08 Gabe Black [this message]
2008-08-21 10:37 ` Daniel Jacobowitz
2008-08-21 21:35 ` Gabe Black
2008-08-22 8:36 ` Gabe Black
2008-08-22 11:24 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a15eb2b0808200957g5fd46a96xb2e69ac60074103a@mail.gmail.com \
--to=gabebblack@gmail.com \
--cc=gabe@blackfam.net \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox