Giter Club home page Giter Club logo

Comments (2)

cyrus-and avatar cyrus-and commented on May 13, 2024

I'm glad that you prefer the Stack module over the native implementation and I totally see your point, but I started this project with some principles/ideas in mind; in particular I didn't want to make it another GDB frontend nor a tool which would have imposed some specific workflow to programmers. So I always tried to not add additional commands, in fact everything can be done via the dashboard sub/command.

Nevertheless, I wanted it to be as easy hackable as possible so in general your approach it does work, but in this case it might be more convenient to play a bit with the internals and use something like this:

define stack
    # create the module
    python stack = Stack()
    # initialize *all* its attributes
    python stack.limit = 0
    python stack.show_arguments = True
    python stack.show_locals = True
    # print the output
    python print('\n'.join(stack.lines(False)))
end

This approach has the advantage to avoid unnecessary re-displays of the dashboard and also doesn't clash with your default settings.

You should be able to use something similar to this with any other modules, just take care of reusing the object instead of creating a new one each time if the module is a stateful one (e.g., the list of watched expressions) for example replacing:

python module = Module()

with:

python module = locals().get('module', Module())

Please let me know if this may fix your issue and if you have any questions please do not hesitate to ask.

from gdb-dashboard.

orivej avatar orivej commented on May 13, 2024

That is exactly the command I need, thank you!

from gdb-dashboard.

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.