Page MenuHomeFreeBSD

sys/ddb: Add hardware breakpoint support to ddb
ClosedPublic

Authored by andrew on Oct 30 2019, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 6, 11:56 PM
Unknown Object (File)
Fri, May 3, 6:58 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Thu, May 2, 12:36 AM

Details

Summary

As with hardware watchpoints add support for hardware breakpoints. The
command is only enabled on architectures that report support for them.
Currently no architectures do, however arm64 will add support in a
future change.

Sponsored by: Arm Ltd
Sponsored by: Innovate UK

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27273
Build 25536: arc lint + arc unit

Event Timeline

All your "stub functions" return (0), when in fact they probably should return an error? Or what happens if someone tries to set a (hw)breakpoint on these architectures?

In D22191#484972, @bz wrote:

All your "stub functions" return (0), when in fact they probably should return an error? Or what happens if someone tries to set a (hw)breakpoint on these architectures?

They are identical to the equivalent watchpoint functions, these also return 0 when not implementing hardware watchpoints.

imp added inline comments.
sys/arm/arm/db_trace.c
141

Shouldn't the stubs return failure?

sys/arm/arm/db_trace.c
141

I copied the hardware watchpoint stubs. These all return 0 when not implemented.

andrew retitled this revision from Add hardware breakpoint support to ddb to sys/ddb: Add hardware breakpoint support to ddb.Mar 14 2024, 3:21 PM
andrew edited the summary of this revision. (Show Details)
  • Rebase
  • Split out arm64 changes to new reviews
  • Limit the hw breakpoint commands to architectures that support them
This revision is now accepted and ready to land.Mar 19 2024, 5:28 PM
sys/ddb/db_break.c
299

You don't need the count for removing the breakpoint. The intention in DDB is that the count is the "skip count" similar to 'c 10' or the like in GDB.

andrew added inline comments.
sys/ddb/db_break.c
299

I've reworked the breakpoint handling code to support this correctly

This revision now requires review to proceed.Mar 21 2024, 3:45 PM

Add missing HAS_HW_BREAKPOINT check

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Apr 12, 9:38 AM
This revision was automatically updated to reflect the committed changes.