This is the mail archive of the gdb@sourceware.org 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]

RE: [HELP]Can GDB for ARM set hard breakpoint when native debugging?


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



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