Skip to content

Undefining a function should remove associated symbol #1910

@yrp604

Description

@yrp604

I have a bndb with some code I'm trying to understand. As part of this process, I'm moving a function boundary between two chunks of code. For example, if I have:

0x1000: func_a
...
0x2000: func_b

If I want to move func_b to start at 0x1800, my workflow is to create a new function at 0x1800, undefine func_b, then rename sub_1800 to func_b. This mostly works, except it sometimes leaves the old symbol for func_b, (especially if I've modified the argument list/type?) in my bv.symbols. If I'm moving function boundaries around a lot, these can build up and be annoying.

As a workaround, they can be manually deleted with bv.undefine_user_symbol(bv.symbols['sym_name']), but they should probably be deleted automatically with function undefine?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreIssue needs changes to the coreEffort: TrivialIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaround

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions