This is the mail archive of the 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: [PATCH v4 13/13] Add watchpoint support to gdb simulator interface.

On 28/03/15 08:19, Mike Frysinger wrote:
> On 17 Mar 2015 22:02, Jiri Gaisler wrote:
>> 	Currently, only the sparc sim supports watchpoints. Stubs for the
>> 	watchpoint functions were added to all other built-in sims
>> 	to avoid linking errors.
> i haven't looked too closely here, but we already have common/sim-watch.c.  how 
> does this interact with that ?

This is interesting. The sim-watch.c seems only to define PC watchpoints,
i.e. what I would call (hardware) breakpoints. There does not seem to be any
support for data watchpoints like we have in sis. As far as I can see,
only the ARM simulator also implements data watchpoints but does not
export it to gdb. This is probably because the target_ops structure for gdbsim
does not export the (data) watchpoint functionality.

My patch extends the target_ops structure to include the gdb watchpoint
interface, and provide dummy functions for all simulators to avoid linking
errors. It does not modify or interfere with the sim-watch.c since the
functions are different. Ideally, common/sim-watch.c could be updated
to also support data watchpoints but it is beyond my capability at this
point. The code does not seem to have been touched since 1998 btw.

I propose to add my code as it currently stands in common/sim-watch-remote.c,
but rename it to sim-watch-data.c. By adding the watchpoint interface to
the target_ops, any maintainer could then map potential watchpoint support
in a simulator on the gdb interface. If the sim/common framework is extended
to support this, then more simulators will obviously benefit.

> also missing ChangeLog entries

Will fix.


Attachment: signature.asc
Description: OpenPGP digital signature

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