Hello Will,

I've been trying to get GDB support for hardware watchpoints/breakpoints
going.  I've ported Matthew's GDB patch to current mainline, and am running
this under a 2.6.37-1002-linaro-omap kernel on an IGEPv2 board.

However, something seems to be not quite working:  I'm seeing this kernel
message on boot:
hw-breakpoint: debug architecture 0x4 unsupported.
and then at runtime, the result of a PTRACE_GETHBPREGS call for register 0
is 0x04000106:
debug architecture: 4
watchpoint size: 0
nr. watchpoints: 1
nr. breakpoints: 6

This leads me to a couple of questions:

- It seems odd that the kernel says it doesn't support the debug
architecture, but then reports to user space that 1 watchpoint and 6
breakpoints are supported ...   GDB will never use the watchpoint, because
the maximum watchpoint size is reported as zero, but GDB will attempt to
use the breakpoints.  Setting a breakpoint will appear to succeed, but then
the breakpoint just never triggers.  The kernel should IMO be more
consistent in how unsupported configurations are handled ...

- Why is architecture 0x4 not supported?  This seems to be the variant of
the v7 debug architecture with memory-mapped registers.  Apparently the
IGEP only supports this version ...  Do you know what the
Beagle-/Pandaboard and other clones do?  What would it take to support this
architecture variant?   Given the widespread use of those boards, it would
be really nice if we could support hardware debugging on them ...

- Which hardware *is* supported?  Can you recommend a board I should be
using to verify GDB support is working?

Thanks for your help in getting this working!


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  STSM, GNU compiler and toolchain for Linux on System z and Cell/B.E.
  IBM Deutschland Research & Development GmbH
  Vorsitzender des Aufsichtsrats: Martin Jetter | Geschäftsführung: Dirk
Wittkopp
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294


_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to