Skip to content

Reasons why Ghidra fails to inline a function.  #3091

@marsfan

Description

@marsfan

What are the reasons that the Decompiler might fail to inline a function?

Example

I have been working on reverse-engineering an Arm Cortex-M I have a function that is called twice in a row in the code. However, the decompiler is only able to inline the first call to the function. As the two calls are nearly identical (a single register is changed), I don't see why the inlining would fail in the second case.

Disassembly of function calls

image

Decompilation of function calls (no inlining)

image

Decompilation of function calls (with inlining)

image

Disassembly of called function

image

Decompilation of called function

image

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