diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-30 21:49:49 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-30 21:49:49 +0000 |
commit | 00b90ae2d1bc81209dafda696c81e2f3e6ab373a (patch) | |
tree | d99446cd50461b105e6eba38dd88c9e2d9b62592 /gdb/tui | |
parent | 98427f3550a8eb72c6a697b1e4947c1147ecefa3 (diff) | |
download | gdb-00b90ae2d1bc81209dafda696c81e2f3e6ab373a.zip gdb-00b90ae2d1bc81209dafda696c81e2f3e6ab373a.tar.gz gdb-00b90ae2d1bc81209dafda696c81e2f3e6ab373a.tar.bz2 |
* tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and
current line.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tuiSourceWin.c | 24 |
2 files changed, 20 insertions, 9 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index d0435e7..04e94bf 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,5 +1,10 @@ 2002-08-31 Stephane Carrez <stcarrez@nerim.fr> + * tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and + current line. + +2002-08-31 Stephane Carrez <stcarrez@nerim.fr> + * tuiSource.c (tuiSetSourceContent): Remove old breakpoint code. (_hasBreak): Remove. (tuiShowSource): Fix comment indentation. diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c index 04f778c..93cdbb7 100644 --- a/gdb/tui/tuiSourceWin.c +++ b/gdb/tui/tuiSourceWin.c @@ -375,28 +375,34 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo, } /* tuiHorizontalSourceScroll */ -/* - ** tuiSetHasExecPointAt(). - ** Set or clear the hasBreak flag in the line whose line is lineNo. - */ +/* Set or clear the hasBreak flag in the line whose line is lineNo. */ void tuiSetIsExecPointAt (TuiLineOrAddress l, TuiWinInfoPtr winInfo) { + int changed = 0; int i; TuiWinContent content = (TuiWinContent) winInfo->generic.content; i = 0; while (i < winInfo->generic.contentSize) { + int newState; + if (content[i]->whichElement.source.lineOrAddr.addr == l.addr) - content[i]->whichElement.source.isExecPoint = TRUE; + newState = TRUE; else - content[i]->whichElement.source.isExecPoint = FALSE; + newState = FALSE; + if (newState != content[i]->whichElement.source.isExecPoint) + { + changed++; + content[i]->whichElement.source.isExecPoint = newState; + tui_show_source_line (winInfo, i + 1); + } i++; } - - return; -} /* tuiSetIsExecPointAt */ + if (changed) + tuiRefreshWin (&winInfo->generic); +} /* Update the execution windows to show the active breakpoints. This is called whenever a breakpoint is inserted, removed or |