Giter Site home page Giter Site logo

Comments (6)

navnavnav avatar navnavnav commented on August 26, 2024 1

Ah, that's interesting @maximevince. I wasn't aware other GDB servers would do that.

I do see a use for monitor reset without halt, since that allows you to reset the board from the debugger, then exit gdb without halting the target.

I believe Bloom already does this for you. Ending the GDB debug session whilst the target is halted will result in Bloom resuming target execution. And if Bloom is configured to release the debug tool at the end of a debug session, then this will always mean resuming target execution (as detaching from the target will put it back into a running state).

from bloom.

navnavnav avatar navnavnav commented on August 26, 2024

I've been unable to find a way to tell GDB that target execution has resumed. There doesn't seem to be any packet we can send, in response to the qRcmd command packet, to tell GDB that we've resumed execution on the target.

This means we cannot offer users the ability to reset the target and let it run, with a single command. But I don't think this is much of a problem, as the user can just run the continue command right after the reset command:

> monitor reset halt
> continue

For this reason, I don't think there's any need for the halt in the reset command. There will just be one command that triggers a reset and holds the target in a stopped state.

Should be done with this soon.

from bloom.

maximevince avatar maximevince commented on August 26, 2024

IIRC, on ARM targets:

  • monitor reset will reset the board, and continue execution right away. Indeed, GDB is not "in sync" with the running state, but you can just type c / continue manually and you're back "in sync".
  • monitor reset halt will reset the board and keep it halted, requiring the user to manually hit continue before the target is running again.

I do see a use for monitor reset without halt, since that allows you to reset the board from the debugger, then exit gdb without halting the target.

from bloom.

maximevince avatar maximevince commented on August 26, 2024

Is there a way to reset and halt the target now? Can it be done through the Insight UI?

from bloom.

navnavnav avatar navnavnav commented on August 26, 2024

Hi @maximevince

Development for this is mostly complete but it's not yet ready for release. There are some parts of the target resetting implementation that need some tidying. The changes are in the develop branch, for version 0.9.0, but it will be a while before I publish that release. I have a lot more work to do before that release.

In the meantime, you could simply restart the debug session to trigger a target reset. It's not the nicest solution, but should work for the short-term. Bloom will automatically reset the target at the beginning of a new debug session, so killing the session (in GDB) and starting a new one should be enough.

Do you use an IDE? CLion provides a function to reset the target, and it works by doing exactly as described above - it simply ends the GDB remote debug session and starts a new one.

image

If you do go with the above approach, you may want to set releasePostDebugSession to false, in your debugTool config. This way, Bloom won't have to disconnect from the target and debug tool on each reset.

I will let you know when I have a better idea for when 0.9.0 will be published.

from bloom.

navnavnav avatar navnavnav commented on August 26, 2024

Development for this is complete. The changes are in the develop branch. They will be shipped with v0.9.0. See the associated milestone for updates (https://github.com/navnavnav/Bloom/milestone/4).

from bloom.

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.