[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The display margin

From: Kim F. Storm
Subject: Re: The display margin
Date: 25 Nov 2003 23:42:57 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Nick Roberts <address@hidden> writes:

>  > It's not necessary to have a display margin -- as clicking on the left
>  > fringe will also generate an event to toggle the breakpoint ...
>  > provided that the buffer's local-map is setup to the
>  > gud-minor-mode-map.  
>  > 
>  > So once you click in the fringe to set a breakpoint, you can open the
>  > margin.
> Thats interesting. If I try this with M-x gdb (and presumably any other
> debugger in GUD) it doesn't open the margin (as these don't currently display
> breakpoint icons) but it does set a breakpoint. However, clicking at the same
> location on the fringe in this case it doesn't seem to toggle the breakpoint
> but sets another one on the same line.
> Can gdb-mouse-toggle-breakpoint be modified so that it works in the fringe
> for these debuggers too?

Of course, but that's for you to find out :-)

My current implementation of gdb-mouse-toggle-breakpoint was just a
proof of concept, so it cheats by checking whether it is clicked on an
object (blindly assuming that it's a breakpoint icon) or not.  If
there is an object, it clears the breakpoint; otherwise it sets it.

I suppose you will have to improve that so that it consults the list
of breakpoints (somehow) and determines whether there already is a
breakpoint at the current line (and deletes it).

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]