BrowseX
SourceForge Logo
BrowseX
 Home
 News
 Download
 Features
 Demos
 
 API
 SQLite
 TML
 Dballoc
 Javascript
 Mailer
 Address
 Mimetypes
 Portal
 DynDNS
 Talk
 ZipView
 TDB
 Packaging
 Passman
 Thin
 
 Press
 Docs
 Bugs
 FAQ
 Pros
 Why
 License
 Contacts

Search
Links
 Scriptics
 Tkhtml
 Postgres
 OpenSSL
 Img
 Baremetal

Contact
peter@browsex.com

TDB: A Debugging GUI

TDB: A Debugging GUI

TDB is a simple, ultra-light debugger GUI frontend for GDB.

TDB is in the spirit of Emacs and DDD but far lighter: about 1200 lines of Tcl, plus support widgets borrowed from BrowseX . TDB is written entirely in Tcl, and is dynamically configurable. It even works on Windows, by running it from Cygwin's bash. The latest version of TDB, 1.3, can be downloaded from http://browsex.com/download/v1.6/tdb-1.3.tar.gz.

Here is a screenshot: .

To start TDB, use "./tdb a.out" on unix or "wish84 tdb a.exe" on Windows. After the file name, you may optionally give a process id to attach to, or "core" for a core file to read. With no arguments, you will need to go to the File menu and use Debug-Program. You may also, open as many new debugger windows as you like.

TDB will take application parameters on the command line to pass to the program at startup. Use a -- to indicate begin of program parms. For example:


   tdb a.out -- -test 1 -debug 5

TDB displays current source in the upper window, commands and output below. With it you can single step, view variables, and even edit source. Try clicking Make, and it auto-saves changes, calls make and then reruns the program (this assumes a working Makefile). If there's an error, it will take you to the error file/line where you can edit, and Make again. Double-clicking toggles breakpoints. Highlight a variable, and click Print or Display to view. All gdb commands are available directly via the command/display window. Or use, Auto-next to animate-execute your program, hitting Escape to stop.

While debugging, the current line is shown in light blue. Breakpoints are in red, or orange if they are also the current line. In fact, the file viewer is actually a simple but functional editor. It even includes undo, find/replace, and lets you change the font and colors. All options are read from .tdbcnf in both your home directory and the current directory.

TDB even has a simple project style interface. It is used mostly as a way to generate makefiles automatically. make is still used for rebuilding. However, it also stores the accessed files. So to enable in a directory, just use Build/Edit Projects/Save.

TDB may be easily extend with the .tdbrc file, again in either or both directories. Here is an example .tdbcnf file that adds an item to the build main menu:

      proc tdb_newpost v {
          upvar ::brx::ptdb$v pd
          $pd(menu:build) add command -label Test -command {puts [exec ls]}
      }

Dynamic Configuration

Like BrowseX , TDB is dynamically configurable. You can change the configuration of any widget in TDB by using SHIFT-CONTROL-B1. This brings up the widget config dialog and lets you change virtually anything. Click on the widget name at the top to bring up the widget hierarchy dialog and browse through, and change all widgets.

If you require even more flexability, use Help/Diag-Console. It brings up a console that lets you enter any Tcl commands directly.

TDB is also written in a way to support front-ending other debuggers, but this are not yet available.

TDB has the same copyright as BrowseX : Artistic License. See http://www.browsex.com for details

Copyright © 1999-2001   Browsex Systems Inc   http://BrowseX.com