Giter Site home page Giter Site logo

RIP size on x86-64 about gdbstub HOT 7 CLOSED

daniel5151 avatar daniel5151 commented on May 5, 2024
RIP size on x86-64

from gdbstub.

Comments (7)

bet4it avatar bet4it commented on May 5, 2024 3

I will fix it in a following PR ( with another way ) , wait for me😅

from gdbstub.

daniel5151 avatar daniel5151 commented on May 5, 2024 1

@gz I assume you meant read/write_register (as opposed to read/write_registers)?

If so, then you might find this discussion from the initial implementation PR interesting: #22 (comment)

Though now that I'm re-reading this idea a year later, I realize that there might be some easier approaches to pull off something similar... I certainly wouldn't be opposed to having stricter type-safety in these APIs, so I'm open to any ideas!

from gdbstub.

daniel5151 avatar daniel5151 commented on May 5, 2024 1

@gz if this is something you'd like fixed sooner, feel free to send a quick fixup PR. Otherwise, a fix for this will land alongside some other changes to read_register in #85

from gdbstub.

gz avatar gz commented on May 5, 2024 1

Sent pull request, yes would be nice to have this fixed, thanks!

from gdbstub.

gz avatar gz commented on May 5, 2024

random thought: it might be nice to statically type-encode the size of the registers when when they're passed to the read/write_registers. One way could be to move the val: &[u8] and dst: &mut [u8] in some enum with the RegId and encode the length explicitly (specify as &[u8; 8] etc.)?

I'm thinking that might save some slice length checks when implementing these functions. But not sure if even possible just a thought :)

from gdbstub.

daniel5151 avatar daniel5151 commented on May 5, 2024

And as for the original issue: yes, rip having a size of 4 seems like an oversight in the initial #34 implementation.

Pinging @keiichiw, since this might translate to a subtle correctness issue in your implementation.

from gdbstub.

gz avatar gz commented on May 5, 2024

Yes I meant the single register writes with the dynamic val and dst slices.

from gdbstub.

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.