Hi All, I'm writing a GPL'd ncurses front end to GDB, called CGDB. In newer releases, GDB has a formal language in which it outputs responses to the front end. I have written the bison grammar file which properly parses the output of a GDB response.
The problem I'm having is this. If you are debugging a program using GDB, and the program has segfaulted due to an infinite recursion bug, GDB outputs the entire stack when you type 'backtrace', which can be very very very large. In CGDB, I send each command the user types to GDB, and then get the response from GDB back. If I wait until I get the entire response from GDB and then pass it to bison to parse it, by the time I walk the parse tree to display data to the user, they already think CGDB is broke. It simply takes to long to get all the output, then parse it, and then display the results. I'm wondering how I can design this, so that as I get output from GDB, I can pass it the bison parser in real time. That way, I can cheat by putting hooks into the bison grammar file that call cgdb_display() functions when I detect that the user should see some input at the terminal. Is there any normal design that people are aware of that will allow me to basically pass data to bison as I get it? or do I have to have the entire response from GDB before I can invoke the bison parser in order to keep the design of CGDB reasonable simple? Any advice would be greatly appreciated! Thanks, Bob Rossi _______________________________________________ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison