Giter Site home page Giter Site logo

Comments (7)

pnasrat avatar pnasrat commented on July 21, 2024

I wonder if we should be looking up dr7 with PEEKUSR - see for example

http://lxr.free-electrons.com/source/tools/testing/selftests/breakpoints/breakpoint_test.c#L84

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/gdbserver/linux-x86-low.c;h=2c3fccca8118a98bce500faa9d82e8e40c18ea57;hb=HEAD#l533

from delve.

derekparker avatar derekparker commented on July 21, 2024

Hmm.. we likely should be reading the original value in order to preserve the control bits set for other regs aside from the one we are currently setting - however I'm not sure if this is what is causing the failure above.

Along with this is a bug of the current implementation - it currently is setting dr7 bits for the base register DR0, and is not setting the values correctly for DR1-3.

from delve.

pnasrat avatar pnasrat commented on July 21, 2024

If you're happy to wait a bit I can try come up with a fix over weekend/Monday, else happy to test proposed fixes

from delve.

derekparker avatar derekparker commented on July 21, 2024

Check out http://en.wikipedia.org/wiki/X86_debug_register#DR7_-_Debug_control for more info on what I described above, also you may want to have a look at the intel manual: http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf specifically chapter 17.

from delve.

derekparker avatar derekparker commented on July 21, 2024

@pnasrat yeah definitely, that's no problem.

from delve.

ebfe avatar ebfe commented on July 21, 2024

Maybe an alignment issue? The hw breakpoints are set with DR_LEN_8 which I
seem to remember requires the address to be 8-byte aligned.

Here's my attempt to fix this, enable dr1-dr3 usage and to generally be more
careful with the control bits ebfe/delve@c0b84352f1

from delve.

pnasrat avatar pnasrat commented on July 21, 2024

I can confirm that at ebfe/delve@c0b8435 when I run

go test -v .

On the box in question it all passes - I suggest you amend the commit message to add a fixes line in the commit for this issue as per

https://help.github.com/articles/closing-issues-via-commit-messages/

before sending the pull request. Thanks, sorry not to have had time this evening to look at.

from delve.

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.