On Mon, Aug 22, 2005 at 11:17:57AM -0700, Dan Mick wrote:
> Michael Shapiro wrote:
> >>On Fri, Aug 19, 2005 at 05:50:52PM -0700, Dan Mick wrote:
> >>
> >>>John Weekley wrote:
> >>>
> >>>>No, no errors at all.  That's why I kept making the same mistake.
> >>>>'Nother bug?
> >>>
> >>>:b is a valid command (set a breakpoint at ".").
> >>>:bp, :bpr, :bprfqoiuer all appear to be accepted.  That seems to be a
> >>>command-parsing bug.  (the remaining characters are treated as an 
> >>>argument to :b).
> >>
> >>I'm fairly sure this is an ADB-compatibility thing.  Though it might make
> >>sense to change the behavior when not in compatibility mode.
> >>
> >>CCing mdb-discuss.
> >>
> >>Cheers,
> >>- jonathan
> >
> >
> >That was required for compatibility with adb(1).  :bfoo means breakpoint
> >at foo because adb's "parser" only looked at one character after the colon.
> >Use ::bp with mdb and you'll get sensible behavior.  I can't change the
> >behavior of :b because it would break legacy scripts.
> 
> Well, it at least seems like "prfqoiuer: symbol not found" should result 
> from that last one...

The problem is that usage of :b is:

        addr :b cmd

addr is the text address of the breakpoint, and cmd is the command
to be run when the breakpoint is hit.  Since cmd is not evaluated until
the breakpoint happens, there's no way to reliably syntax check it.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to