aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiWin.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-09-30 00:52:27 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-09-30 00:52:27 +0000
commit52575520c355764fe525e7c6ceeede0c7dfc3706 (patch)
tree75e7305195e8b37e8a20a893315d04f8b10a40e6 /gdb/tui/tuiWin.c
parentb62460894d21d427c8c231caa6010b9935d5f9fb (diff)
downloadgdb-52575520c355764fe525e7c6ceeede0c7dfc3706.zip
gdb-52575520c355764fe525e7c6ceeede0c7dfc3706.tar.gz
gdb-52575520c355764fe525e7c6ceeede0c7dfc3706.tar.bz2
2002-09-29 Elena Zannoni <ezannoni@redhat.com>
* tui.c (tui_show_source): Don't access current_source_symtab, use accessor function instead. Include source.h and symtab.h * tuiDisassem.c (tuiShowDisassemAndUpdateSource, tuiVerticalDisassemScroll): Use accessor functions for current source line and symtab. Include source.h. * tuiLayout.c (_extractDisplayStartAddr): Use accessor functions for current source line and symtab. Include source.h. * tuiWin.c (_makeVisibleWithNewHeight): Ditto. * tuiSourceWin.c (tuiUpdateSourceWindowAsIs, tuiHorizontalSourceScroll): Ditto. * tuiSource.c (tuiVerticalSourceScroll): Ditto.
Diffstat (limited to 'gdb/tui/tuiWin.c')
-rw-r--r--gdb/tui/tuiWin.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index fe3b8e0..38283b5 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -53,6 +53,7 @@
#include "frame.h"
#include "cli/cli-cmds.h"
#include "top.h"
+#include "source.h"
#include "tui.h"
#include "tuiData.h"
@@ -1364,6 +1365,8 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
if (winInfo->generic.content != (OpaquePtr) NULL)
{
TuiLineOrAddress lineOrAddr;
+ struct symtab_and_line cursal
+ = get_current_source_symtab_and_line ();
if (winInfo->generic.type == SRC_WIN)
lineOrAddr.lineNo =
@@ -1373,19 +1376,20 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
winInfo->detail.sourceInfo.startLineOrAddr.addr;
freeWinContent (&winInfo->generic);
tuiUpdateSourceWindow (winInfo,
- current_source_symtab, lineOrAddr, TRUE);
+ cursal.symtab, lineOrAddr, TRUE);
}
else if (selected_frame != (struct frame_info *) NULL)
{
TuiLineOrAddress line;
- extern int current_source_line;
+ struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+
s = find_pc_symtab (selected_frame->pc);
if (winInfo->generic.type == SRC_WIN)
- line.lineNo = current_source_line;
+ line.lineNo = cursal.line;
else
{
- find_line_pc (s, current_source_line, &line.addr);
+ find_line_pc (s, cursal.line, &line.addr);
}
tuiUpdateSourceWindow (winInfo, s, line, TRUE);
}