foundryzero / llef

LLEF is a plugin for LLDB to make it more useful for RE and VR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MacOS Support Issue

datalocaltmp opened this issue · comments

Awesome tool!

I have it installed on my Mac Mini running latest MacOS and seem to be getting an error with the pattern commands on Python3.8. I've added a few debugging statements to llef.py and get the following:

[!] Add command from commands list
invalid command command container.
[!] Add command from commands list
error: command script add requires one argument
[!] Add command from commands list
error: command script add requires one argument
[*] next stage
[*] Add handler from handlers
Stop hook #1 added.
(lldb)

llef.py looks like the following (truncated):

def __lldb_init_module(debugger: SBDebugger, _: Dict[Any, Any]) -> None:
    commands: List[Union[Type[BaseCommand], Type[BaseContainer]]] = [
        PatternContainer,
        PatternCreateCommand,
        PatternSearchCommand,
    ]

    handlers = [StopHookHandler]

    for command in commands:
        print("[!] Add command from commands list")
        command.lldb_self_register(debugger, "llef")

    print("[*] next stage")
    for handler in handlers:
        print("[*] Add handler from handlers")
        handler.lldb_self_register(debugger, "llef")

While the pattern commands do not work everything else seems to work perfect on MacOS.

Happy to take some direction and attempt a fix myself tomorrow; thanks!

commented

Thanks for the report.

What version of LLDB do you have installed?

What model of Mac mini do you have? Is it a Intel or an ARM model?

Currently running macOS 12.3 on ARM

% lldb --version

lldb-1316.0.9.46
Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
commented

I believe your issue is caused by using a version of LLDB lower than the required 15+.

macOS labels their versions of lldb a bit differently, but they can be seenhere

You’ll need version 1403 or later which comes with XCode 14.3+