Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Architecture: x86_64h #46

Open
chennbnbnb opened this issue Aug 30, 2024 · 1 comment
Open

Unknown Architecture: x86_64h #46

chennbnbnb opened this issue Aug 30, 2024 · 1 comment

Comments

@chennbnbnb
Copy link

Hello, I have installed lldb15,

lldb-1500.0.200.58
Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)

and I get the following error when using llef

Architecture set to: x86_64h-apple-macosx-.
(lldb) si
(lldb) [+] Unknown Architecture: x86_64h
Traceback (most recent call last):
  File "/Users/chenhaohao/Downloads/chrome/llef-main/handlers/stop_hook.py", line 37, in handle_stop
    self.context_handler.display_context(exe_ctx, True)
  File "/Users/chenhaohao/Downloads/chrome/llef-main/common/context_handler.py", line 449, in display_context
    self.refresh(exe_ctx)
  File "/Users/chenhaohao/Downloads/chrome/llef-main/common/context_handler.py", line 434, in refresh
    self.arch = get_arch(self.target)
  File "/Users/chenhaohao/Downloads/chrome/llef-main/arch/__init__.py", line 33, in get_arch
    return get_arch_from_str(arch)
  File "/Users/chenhaohao/Downloads/chrome/llef-main/arch/__init__.py", line 42, in get_arch_from_str
    raise TypeError(f"Unknown target architecture: {arch}")
TypeError: Unknown target architecture: x86_64h
Process 35072 stopped
* thread #1, name = 'CrRendererMain', queue = 'com.apple.main-thread', stop reason = instruction step into
    frame #0: 0x00007ff80df846cd libsystem_kernel.dylib`mach_msg2_internal + 78
Target 0: (ME Helper (Renderer)) stopped.

How to solve this problem?

@joseph-f0
Copy link
Collaborator

Hi, thanks for raising the issue.

This is because LLEF doesn't currently have support for the x86_64h target architecture.

It looks like the x86_64h ISA is the same as x86_64, so adding support might be as simple as adding an alias in the supported architectures list.

This can be done by adding the following on line 26 of arch/__init__.py:

supported_arch = {
   ...
   "x86_64h": X86_64,
   ...
}

I've included a git patch that contains these changes.

patch.diff.txt

I haven't been able to test this as I don't have a target device to hand, so please let me know how you get on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants