GithubHelp home page GithubHelp logo

Comments (6)

korcankaraokcu avatar korcankaraokcu commented on May 25, 2024

languages with no void types

Completely slipped my attention, thanks for the bug report. I'll look into this soon

from pince.

brkzlr avatar brkzlr commented on May 25, 2024

I don't think this has to do with whether a language supports void or not as I tested it on a Go binary, where Go also doesn't have a void type, and no issues occur.

I think this has more to do with gdb's python binding that has poor support for Rust more than the void-ness of a language.

from pince.

korcankaraokcu avatar korcankaraokcu commented on May 25, 2024

Tested with a simple, infinitely looping rust binary with debug info. .format_string().strip('"') doesn't fix anything, GDB can't read the path var at all, printing the variable gives <error reading variable: Cannot access memory at address 0x8>

from pince.

korcankaraokcu avatar korcankaraokcu commented on May 25, 2024

I've solved the void pointer issue with changing this code In ScriptUtils

void_ptr = gdb.lookup_type("void").pointer() to void_ptr = gdb.lookup_type("u8").pointer()

It works if we use u8 instead of void. But again, it fails in many places that uses C-like expressions, such as breakpoints and watchpoints. Maybe it's about the time to refactor the older codebase to use more generalized expressions. However, this might take a while

from pince.

korcankaraokcu avatar korcankaraokcu commented on May 25, 2024

Here's something interesting, none of these issues appear if the target is compiled in release mode

from pince.

korcankaraokcu avatar korcankaraokcu commented on May 25, 2024

Considering all other issues, such as not being able to read string variables and all. I think the best solution would be to make GDB act like it's a release binary instead of trying to fix every single edge case out there

from pince.

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.