Writing a full-screen debugger.
I've thought about writing my own little custom IDE in Gtk, most of the functions seem simple enough: a text editor + the abililty to call gcc thru a shell. But the most useful feature of IDEs, step-through-debugging, is still elusive to me. I don't mean a command-line gdb as in Emacs, but the full screen walkthrough available in Rhide or the old Xwpe... Does anyone here know (basically) how full-screen debuggers work? 1. Do they reference the standard Linux gdb somehow, or would their authors have had to write new debuggers from scratch, to make stepping-through interact with their GUI? 2. What is the technical principle of a debugger, is it an interpreter that treats machine language as a sort of bytecode and runs it in a 'virtual' environment? Or something else? And... If writing a full-screen debugger does require starting from scratch (can't use gdb), are there some nice libraries out there with most of the debugging functions already written? Thanks in advance, jca ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Writing a full-screen debugger.
This is rather off-topic for gtk-list, but I'll answer a bit here anyways. jca [EMAIL PROTECTED] writes: I've thought about writing my own little custom IDE in Gtk, most of the functions seem simple enough: a text editor + the abililty to call gcc thru a shell. But the most useful feature of IDEs, step-through-debugging, is still elusive to me. I don't mean a command-line gdb as in Emacs, but the full screen walkthrough available in Rhide or the old Xwpe... Does anyone here know (basically) how full-screen debuggers work? 1. Do they reference the standard Linux gdb somehow, or would their authors have had to write new debuggers from scratch, to make stepping-through interact with their GUI? There are various approaches: - Talk to gdb using a pipe, as if your full-screen debugger was a user. (examples. - kgdb, ddd) - Link directly to gdb. (example - the Insight debugger. Quite a nice tool ... you should definitely look at this one.) - New in gdb 5.0, gdb has a secondary interface called GDB/MI which is described in the info pages pretty completely. MI == machine interface, and is meant for interaction with a GUI debugger. This one is most likely the best way to go. Again you talk to a gdb process via a pipe, but the command language is designed for the task rather than for human interaction. 2. What is the technical principle of a debugger, is it an interpreter that treats machine language as a sort of bytecode and runs it in a 'virtual' environment? Or something else? It attaches to the running process using kernel and processor features. And... If writing a full-screen debugger does require starting from scratch (can't use gdb), are there some nice libraries out there with most of the debugging functions already written? Not really. (libbfd sort of falls into the general category, but it is not nice and only has tiny fraction of the functionality there.) Owen ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Writing a full-screen debugger.
jca wrote: And... If writing a full-screen debugger does require starting from scratch (can't use gdb), are there some nice libraries out there with most of the debugging functions already written? Someone has already done the work - ddd is available from http://www.gnu.org/software/ddd/. It is a very nice debugger for running on X displays. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "Love not the world, neither the things that are in the world. If any man love the world, the love of the Father is not in him."I John 2:15 ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Writing a full-screen debugger.
To complete Owen's detailled answer, the GtkAda team is currently working on Odd, the Other Display Debugger, which is a new graphical front-end for debuggers written using GtkAda. It is a very flexible and extensible front-end that will both be provided as an executable, and as a Gtk+ widget (we will provide a C binding for it ;-), so that it can also be integrated in existing Gtk IDEs. This project is not complete yet, but we expect to start a beta period soon, as well as setting up a web page (that will be linked to http://gtkada.eu.org, so you can check this periodically). I'll post an announcement when this is done. The very nice thing about Odd is that it is very easy to add support for new debuggers/protocols, as well as new languages. Well, in the spirit of Gtk+/Gnome I would say. Odd contains very powerful features such as a nice data display window (probably superior to ddd data display, but I guess this is a matter of taste) and support for multiprocess and multithreaded applications. Arno ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list