Skip to content

bmessage breakpoints fail on methods defined in categories #57

@kastiglione

Description

@kastiglione

I don't know if there was a recent change or regression to lldb, but in order to set breakpoints on methods defined in categories, the category needs to be included in the breakpoint name.

For example, setting a breakpoint on -setFrame: now has to be:

breakpoint set -n '-[UIView(Geometry) setFrame:]'

Currently, bmessage doesn't consider categories when creating the breakpoint and silently fails on methods defined in categories.

I don't know of anyway to find out the category from the objc runtime. If that's indeed not possible the two ways I fixes I can think of are:

  1. Use a regex breakpoint: br s -r '-\[UIView(\(.+\))? setFrame:\]'
  2. Scrape the category out of the symbol table: target modules dump symtab.

Any better ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions