Re: support for BookE hardware debug features

Thiago Jung Bauermann
2009-05-24T19:39:08Z

Hi all,

Em Seg, 2009-03-02 Ã s 17:39 -0300, Thiago Jung Bauermann escreveu:
> Right now GDB just supports one hardware watchpoint in embedded ppc
> processors. We're adding support for:
>
> - one more hardware watchpoint,
> - four hardware breakpoints,
> - support for the two DVCs (Data Value Compare), which enable
> hardware-accelerated conditions for hardware watchpoints,
> - two ranged hardware breakpoints,
> - one ranged hardware watchpoint.

Just to give a status update on this work: up to now we have the
following features implemented and fully functional:

- one more hardware watchpoint,
- four hardware breakpoints,
- one ranged hardware watchpoint.

The above are working for both native GDB and gdbserver, both on Linux.

> We're also working on the kernel side of the equation. We'll test it all
> on the ppc440 processor.

The kernel support is going along nicely, but since it's not ready nor
accepted upstream yet, we can't start posting our GDB patches that are
ready.

> We don't know yet how we'll extend gdb commands to express the ranged
> breakpoints and watchpoints, and the DVCs.

I implemented a "watch-range" command, which takes a start address (or
expression which evaluates to an address) and an end address (or
expression). Not sure if I'll keep it that way or change. Didn't think
much about it yet.

Also, I want GDB to automagically use the ranged watchpoint for big
structs and arrays.

> For the latter maybe we can
> add some intelligence to use the registers if the condition expression
> is simple enough, I didn't think much about this yet.

We are just starting to work on the DVC (conditioned hw watchpoint), but
for now I'm inclined to use it automagically for simple expressions with
just one == or != operator. We're taking into account Joel's comments
and suggestions on this. Thanks Joel for your input!

SÃ©rgio did most of the work here. I don't know if he wants to add
anything to this report...