Giter Site home page Giter Site logo

Comments (2)

mikesart avatar mikesart commented on June 22, 2024

start_gdb() in cgdb.cpp does the following:

tgdb_initialize() ...
tgdb_request_current_location()...

tgdb_initialize winds up calling down into a2_initialize(), which does:

commands_issue_command( .... ANNOTATE_INFO_BREAKPOINTS .... )

When process_commands() gets the TGDB_UPDATE_BREAKPOINTS response, it's before the TGDB_UPDATE_FILE_POSITION response comes in, so we don't have any source information yet and the breakpoint info is dropped.

I added a a2_get_current_location() call right before the INFO_BREAKPOINTS call in a2_initialize and it fixed the issue, but I'm not sure it's the best fix. Need to have Bob review this one...

diff --git a/lib/tgdb/annotate-two/a2-tgdb.cpp b/lib/tgdb/annotate-two/a2-tgdb.cpp
index 76bca13..7e2c17a 100644
--- a/lib/tgdb/annotate-two/a2-tgdb.cpp
+++ b/lib/tgdb/annotate-two/a2-tgdb.cpp
@@ -220,6 +220,12 @@ int a2_initialize(void *ctx,

     a2_open_new_tty(a2, inferior_stdin, inferior_stdout);

+    /* Need to get source information before breakpoint information otherwise
+     * the TGDB_UPDATE_BREAKPOINTS event will be ignored in process_commands()
+     * because there are no source files to add the breakpoints to.
+     */
+    a2_get_current_location(a2, 1);
+
     /* gdb may already have some breakpoints when it starts. This could happen
      * if the user puts breakpoints in there .gdbinit.
      * This makes sure that TGDB asks for the breakpoints on start up.

from cgdb.

brasko avatar brasko commented on June 22, 2024

Thanks to Michael Sartain, this has been fixed in master.

A release will most likely be done in a month or two.

from cgdb.

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.