breakpoint highlighting in source buffer for gdb-mode
| Newsgroups | gmane.emacs.xemacs.general |
|---|---|
| Message-ID | <OFEE3191D7.6C99075C-ONC1256DC5.00363266-C1256DC5.00371B5F@i001.dvg.sko.de> |
Hi there, I'm looking for the extension|configuration for gdb-mode for breakpoint highlighting in source buffer. The JDEE has this feature. I asked Paul, but he isn't aware of such extension for gdb-mode in emacs. Here is his answer: >> Hello Paul, >> >> After I've used the JDB with jde in xemacs, I'm missing this feature >> (highlight breakpoint) in source window in GDB-mode, when >> debugging the C/C++ program. >> >> Can you give me any hint, how to do it, >Hi David, > >You'd have to modify the GDB set breakpoint command to highlight >the line at which a breakpoint occurs. The JDEE uses an Emacs >feature called overlays (or extents in XEmacs) to color the lines. >The JDEE's code for doing this is in the file jde-db.el. You could >look at it for examples of how to implement breakpoint highlighting. > >The JDEE breakpoint command saves the line at which a breakpoint >is set in a list of breakpoints. It colors the line green initially. >If an application is running, it sends a set breakpoint command >to the debugger and colors the line yellow to indicate that >a set breakpoint command has been issued to the debugger. >The JDEE also sets up a process I/O listener that detects >responses from the debugger. If this listener receives a >response from the debugger that a breakpoint has been set, it >looks up the breakpoint in the list of breakpoints and if it >finds it, it changes the color of the highlight to red to >indicate that the breakpoint has been set. To summarize: >green -> Emacs has been asked to set a breakpoint. >yellow -> Emacs has sent the breakpoint request to the debugger >red -> The debugger has confirmed that the breakpoint has been set. >Hope this helps. >> or may be you are aware of some >> hack for gdb to achive that? >> >I'm not aware of any breakpoint highlighting code for gdb. >Paul Any help would be greatly appreciated. David Ostrovsky