GithubHelp home page GithubHelp logo

Comments (7)

zorgiepoo avatar zorgiepoo commented on September 26, 2024

In what way / context exactly?

Rosetta 2 translates the x86_64 executable to arm64 one ahead of time so the actual code that gets executed and can be debugged is arm64. Bit Slicer does not support 'mapping back' to x86_64 instruction set like lldb can (and I don't know how to implement such a thing).

from bit-slicer.

notahacker8 avatar notahacker8 commented on September 26, 2024

Let's say I find a function in memory. In x86_64, the first bytes are usually 55 48 89 e5...., which represent x86_64 instructions. Bit slicer however, assumes that it is an arm64 executable, and disassembles completely wrong instructions.

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on September 26, 2024

You might be looking at the untranslated code. How are you "finding" the function, by doing a scan of "known bytes" or by setting a watchpoint (watching for accesses) or debugger breakpoint?

I suppose Bit Slicer can switch between disassembling x86_64 and arm64 depending on what region is being viewed. I don't know how tricky that is. Barring implementing that, arm64 is the right default still for debugging running code.

On another note all of this will go away when games become apple silicon native.. Rosetta 2 support isn't the best. Same thing happened with Rosetta 1 support back in the day..

from bit-slicer.

notahacker8 avatar notahacker8 commented on September 26, 2024

It would be nice if there was an option to select an architecture to debug with.

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on September 26, 2024

I think the correct way is to use x86_64 disassembler if the instructions are in a mapped mach-o segment.

However, this doesn't sound extremely useful to me anyway. Most likely, any changes there will have no effect since the real arm64 code being executed is somewhere else.

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on September 26, 2024

I will address this in #80. First the "automatic" mode should be smarter about picking the right architecture depending on the memory address being looked at. Then there's an option to change disassembly interpretation in the Debug menu to either Intel or ARM.

from bit-slicer.

zorgiepoo avatar zorgiepoo commented on September 26, 2024

Landed in 1.7.12 Alpha 1

from bit-slicer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.