[EMAIL PROTECTED] writes:
 > Hello Paul,
 > 
 > After I've used the JDB with jde in xemacs, I'm missing this feature
 > (highlight breakpoint yellow and red) 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.

Paul

 > 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

Reply via email to