Giter VIP home page Giter VIP logo

Comments (2)

justfoxing avatar justfoxing commented on June 3, 2024 1

Cool! I left that assert in to try and pick up cases of dual-callable and iterable objects. Having a look, it looks like this is actually being caused by trying to reference the ghidra.program.model.mem.Memory class - it's not actually executing the getByte method.

So, on the plus side, thanks for the test case - I'll use that to work out how I should handle iterable callables, and hopefully fix it when I get round to the next update.

Even better news for you though - your code snippet isn't actually how to get a byte (ghidra.program.model.mem.Memory is an interface that isn't meant to be referenced directly). You need to get an object that implements the Memory interface - currentProgram.getMemory() is probably the easiest. Try your snippet as:

function = getFunctionContaining(address)
body = function.getBody()
addr = body.getMinAddress()
b = currentProgram.getMemory().getByte(addr)

Hope that gets you going again!

from ghidra_bridge.

justfoxing avatar justfoxing commented on June 3, 2024

Decided the easiest way to handle the case of Jython classes with the iter function (like ghidra.program.model.mem.Memory) is to special case them (they'll just be BridgedCallables). Leaving the assert in place to detect other instances of iter + callable, and I'll come up with a better solution then if required.

from ghidra_bridge.

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.