This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: [HELP]Can GDB for ARM set hard breakpoint when native debugging?
- From: "Will Deacon" <will dot deacon at arm dot com>
- To: "'Karthikeyan S'" <ks at nvidia dot com>, "Matthew Gretton-Dann" <Matthew dot Gretton-Dann at arm dot com>, "xingxing pan" <forandom at gmail dot com>
- Cc: <gdb at sourceware dot org>
- Date: Tue, 1 Jun 2010 10:06:16 +0100
- Subject: RE: [HELP]Can GDB for ARM set hard breakpoint when native debugging?
- References: <AANLkTinHIdHmkoXyou1g_CfkOIvKdOFND_tlvYqdvuzb@mail.gmail.com> <1275038883.23133.51.camel@e102319-lin.cambridge.arm.com> <113ACA888B71994BB56E5CF3704953486BAA6A18D8@BGMAIL02.nvidia.com>
Hi Karthik,
> I started out at implementing hardware watchpoint support for armv7 in gdb. For a start, I added the
> necessary functions in gdb for armv7 architecture. Also made the kernel changes for "context id based
> watchpoint".
I've had a go at implementing a backend for hardware watchpoints and breakpoints in the Kernel:
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011170.html
I'm hoping to submit a newer version of this patchset against 2.6.35.
I'll add you on CC when I post it to the list. The main changes will be:
- Only allowing ptrace interaction with the framework
- Changing the ptrace API to mirror the ARMv7 architected control registers
- Updated to work with the latest HW-breakpoint framework in the Kernel
It's worth noting that using the context-id based watchpoint will almost
certainly break in the case of ASID rollover for a process. It also won't
allow you to install watchpoints on a per-thread basis afaict.
The HW-breakpoint framework inserts/removes breakpoints on context switch
so the need for hardware assisted context id matching is removed.
Thanks,
Will