[PATCH]: Improve TUI breakpoint display

Stephane Carrez stcarrez@nerim.fr
Sun Aug 25 14:34:00 GMT 2002


Hi!

The TUI displays very basic information about breakpoints.  Only a '*' is displayed
to mark a line with a breakpoint.  It's detection of which lines have a breakpoint
is also implemented in two places and differently.

The following patch improves this to:

   - have a single place to detect if a source line has a breakpoint
   - display more info about breakpoints.
     The following type marker is displayed (only one of them):

           b    Breakpoint at line, never hit
           B    Breakpoint at line, hit > 0
           h    Hardware breakpoint, never hit
           H    Hardware breakpoint, hit > 0

     In addition, a '+' is displayed for breakpoints that are enabled
     and a '-' is displayed for those disabled.

     We can now see:  'B+' or 'b-' instead of '*' in the execution window.

This patch is not yet committed.  I'll commit it in a few days (before 5.3 branch)
unless there are objections not to do so.

	Stephane

2002-08-26  Stephane Carrez  <stcarrez@nerim.fr>

	* tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
	(tui_update_breakpoint_info): Declare.
	(tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
	
	* tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint
	information using tui_update_breakpoint_info.
	(tui_update_all_breakpoint_info): New function to refresh all
	execution windows.
	(tui_update_breakpoint_info): New function to recompute the status
	of exec info window from breakpoints.
	(tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
	(tuiSetExecInfoContent): Use the exec info flags computed by
	tui_update_breakpoint_info to display a short status about breakpoints.

	* tuiData.h (TuiExecInfoContent): New for exec info string.
	(TuiWhichElement): Use it.
	(TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines.
	(TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines.
	(TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise.
	(TUI_EXECINFO_SIZE): Likewise.
	* tuiData.c (initContentElement): Clear exec info string.

	* tui-hooks.c (get_breakpoint): Remove.
	(tui_event_create_breakpoint): Call tui_update_all_breakpoint_info.
	(tui_event_delete_breakpoint): Likewise.
	(tui_event_modify_breakpoint): Likewise.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tui-breakpoints.diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020825/44319387/attachment.ksh>


More information about the Gdb-patches mailing list