Subject: port-arm26/14618: DDB breakpoints on arm26 behave badly
To: None <gnats-bugs@gnats.netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: netbsd-bugs
Date: 11/17/2001 19:05:22
>Number:         14618
>Category:       port-arm26
>Synopsis:       DDB breakpoints on arm26 behave badly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm26-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 17 11:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ben Harris
>Release:        2001-11-17
>Organization:
>Environment:
NetBSD/arm26

>Description:
When asked to set a breakpoint on a function, DDB puts an undefined
instruction in place of the first instruction of the function.  This means
that when the function is called, R14_svc gets corrupted, and Bad Things
ensue.

>How-To-Repeat:
db> b ubc_fault
db> c
[ catch breakpoint ]
db> c
[ note panic ]

>Fix:
Workaround is to manually place the breakpoint after the function
prologue, so:

db> b ubc_fault+0t12
db> c
[ catch breakpoint ]
db> c
[ note absence of panic ]

Better would be if DDB could do this automatically, but it currently lacks
suitable hooks.

>Release-Note:
>Audit-Trail:
>Unformatted: