aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-06 22:42:18 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-06 22:42:18 +0000
commitf80bda8efddc42d85ad3c5830324afd3e6abd3a8 (patch)
treeb09d05c80a46c25bf167e6e1c27e7c84685928e4
parent9fbfb822017ec85391b58313c8668efcb521e447 (diff)
downloadgdb-f80bda8efddc42d85ad3c5830324afd3e6abd3a8.zip
gdb-f80bda8efddc42d85ad3c5830324afd3e6abd3a8.tar.gz
gdb-f80bda8efddc42d85ad3c5830324afd3e6abd3a8.tar.bz2
2004-02-06 Andrew Cagney <cagney@redhat.com>
* tui/tui-source.h: Do not include "defs.h". (struct tui_win_info): Declare. (tui_set_source_content_nil): Declare. * tui/tui-data.h (struct tui_win_info): Rename _TuiWinInfo. (union tui_line_or_address): Rename _TuiLineOrAddress. * tui/tui-winsource.h: Update copyright. Include "tui-data.h". (tui_update_source_window): Rename tuiUpdateSourceWindow. (tui_update_source_window_as_is): Rename tuiUpdateSourceWindowAsIs. (tui_update_source_windows_with_addr): Rename tuiUpdateSourceWindowsWithAddr. (tui_update_source_windows_with_line): Rename tuiUpdateSourceWindowsWithLine. (tui_clear_source_content): Rename tuiClearSourceContent. (tui_erase_source_content): Rename tuiEraseSourceContent. (tui_set_source_content_nil): Rename tuiSetSourceContentNil. (tui_show_source_content): Rename tuiShowSourceContent. (tui_horizontal_source_scroll): Rename tuiHorizontalSourceScroll. (tui_set_exec_info_content): Rename tuiSetExecInfoContent. (tui_show_exec_info_content): Rename tuiShowExecInfoContent. (tui_erase_exec_info_content): Rename tuiEraseExecInfoContent. (tui_clear_exec_info_content): Rename tuiClearExecInfoContent. (tui_update_exec_info): Rename tuiUpdateExecInfo. (tui_set_is_exec_point_at): Rename tuiSetIsExecPointAt. (tui_alloc_source_buffer): Rename tuiAllocSourceBuffer. (tui_line_is_displayed): Rename tuiLineIsDisplayed. (tui_addr_is_displayed): Rename tuiAddrIsDisplayed. (struct tui_win_info): Declare. * tui/tui-stack.c: Update references. * tui/tui-layout.c, tui/tui-winsource.c: Ditto. * tui/tui-win.c, tui/tui-source.c: Ditto. * tui/tui.c, tui/tui-disasm.c: Ditto.
-rw-r--r--gdb/ChangeLog35
-rw-r--r--gdb/tui/tui-data.h4
-rw-r--r--gdb/tui/tui-disasm.c8
-rw-r--r--gdb/tui/tui-layout.c8
-rw-r--r--gdb/tui/tui-source.c10
-rw-r--r--gdb/tui/tui-source.h4
-rw-r--r--gdb/tui/tui-stack.c18
-rw-r--r--gdb/tui/tui-win.c27
-rw-r--r--gdb/tui/tui-winsource.c161
-rw-r--r--gdb/tui/tui-winsource.h83
-rw-r--r--gdb/tui/tui.c4
11 files changed, 181 insertions, 181 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5f10e41..fff616c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,38 @@
+2004-02-06 Andrew Cagney <cagney@redhat.com>
+
+ * tui/tui-source.h: Do not include "defs.h".
+ (struct tui_win_info): Declare.
+ (tui_set_source_content_nil): Declare.
+ * tui/tui-data.h (struct tui_win_info): Rename _TuiWinInfo.
+ (union tui_line_or_address): Rename _TuiLineOrAddress.
+ * tui/tui-winsource.h: Update copyright. Include "tui-data.h".
+ (tui_update_source_window): Rename tuiUpdateSourceWindow.
+ (tui_update_source_window_as_is): Rename
+ tuiUpdateSourceWindowAsIs.
+ (tui_update_source_windows_with_addr): Rename
+ tuiUpdateSourceWindowsWithAddr.
+ (tui_update_source_windows_with_line): Rename
+ tuiUpdateSourceWindowsWithLine.
+ (tui_clear_source_content): Rename tuiClearSourceContent.
+ (tui_erase_source_content): Rename tuiEraseSourceContent.
+ (tui_set_source_content_nil): Rename tuiSetSourceContentNil.
+ (tui_show_source_content): Rename tuiShowSourceContent.
+ (tui_horizontal_source_scroll): Rename tuiHorizontalSourceScroll.
+ (tui_set_exec_info_content): Rename tuiSetExecInfoContent.
+ (tui_show_exec_info_content): Rename tuiShowExecInfoContent.
+ (tui_erase_exec_info_content): Rename tuiEraseExecInfoContent.
+ (tui_clear_exec_info_content): Rename tuiClearExecInfoContent.
+ (tui_update_exec_info): Rename tuiUpdateExecInfo.
+ (tui_set_is_exec_point_at): Rename tuiSetIsExecPointAt.
+ (tui_alloc_source_buffer): Rename tuiAllocSourceBuffer.
+ (tui_line_is_displayed): Rename tuiLineIsDisplayed.
+ (tui_addr_is_displayed): Rename tuiAddrIsDisplayed.
+ (struct tui_win_info): Declare.
+ * tui/tui-stack.c: Update references.
+ * tui/tui-layout.c, tui/tui-winsource.c: Ditto.
+ * tui/tui-win.c, tui/tui-source.c: Ditto.
+ * tui/tui.c, tui/tui-disasm.c: Ditto.
+
2004-02-06 Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Fix calculation
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 6657fcd..ba37acf 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -150,7 +150,7 @@ typedef enum tui_register_display_type
TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr;
/* Structure describing source line or line address */
-typedef union _TuiLineOrAddress
+typedef union tui_line_or_address
{
int lineNo;
CORE_ADDR addr;
@@ -284,7 +284,7 @@ TuiCommandInfo, *TuiCommandInfoPtr;
/* This defines information about each logical window */
-typedef struct _TuiWinInfo
+typedef struct tui_win_info
{
TuiGenWinInfo generic; /* general window information */
union
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 7b12275..be4387b 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -190,7 +190,7 @@ tui_set_disassem_content (CORE_ADDR pc)
if (pc == 0)
return TUI_FAILURE;
- ret = tuiAllocSourceBuffer (disassemWin);
+ ret = tui_alloc_source_buffer (disassemWin);
if (ret != TUI_SUCCESS)
return ret;
@@ -280,7 +280,7 @@ tui_show_disassem (CORE_ADDR startAddr)
val.addr = startAddr;
tui_add_win_to_layout (DISASSEM_WIN);
- tuiUpdateSourceWindow (disassemWin, s, val, FALSE);
+ tui_update_source_window (disassemWin, s, val, FALSE);
/*
** if the focus was in the src win, put it in the asm win, if the
** source view isn't split
@@ -309,7 +309,7 @@ tui_show_disassem_and_update_source (CORE_ADDR startAddr)
*/
sal = find_pc_line (startAddr, 0);
val.lineNo = sal.line;
- tuiUpdateSourceWindow (srcWin, sal.symtab, val, TRUE);
+ tui_update_source_window (srcWin, sal.symtab, val, TRUE);
if (sal.symtab)
{
set_current_source_symtab_and_line (&sal);
@@ -398,6 +398,6 @@ tui_vertical_disassem_scroll (enum tui_scroll_direction scrollDirection,
dir = (scrollDirection == FORWARD_SCROLL) ? maxLines : - maxLines;
val.addr = tui_find_disassembly_address (pc, dir);
- tuiUpdateSourceWindowAsIs (disassemWin, s, val, FALSE);
+ tui_update_source_window_as_is (disassemWin, s, val, FALSE);
}
}
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 249f5d7..fad4e37 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -248,7 +248,7 @@ tui_set_layout (enum tui_layout_type layoutType,
newLayout == DISASSEM_DATA_COMMAND))
tuiDisplayAllData ();
- tuiUpdateSourceWindowsWithAddr (addr);
+ tui_update_source_windows_with_addr (addr);
}
if (regsPopulate)
{
@@ -799,7 +799,7 @@ _showSourceDisassemCommand (void)
{
TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- tuiShowSourceContent (srcWin);
+ tui_show_source_content (srcWin);
if (m_winPtrIsNull (disassemWin))
{
_makeDisassemWindow (&disassemWin, asmHeight, srcHeight - 1);
@@ -843,7 +843,7 @@ _showSourceDisassemCommand (void)
disassemWin->detail.sourceInfo.hasLocator = TRUE;
m_beVisible (locator);
tui_show_locator_content ();
- tuiShowSourceContent (disassemWin);
+ tui_show_source_content (disassemWin);
if (m_winPtrIsNull (cmdWin))
_makeCommandWindow (&cmdWin,
@@ -1114,7 +1114,7 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType)
(*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE;
m_beVisible (locator);
tui_show_locator_content ();
- tuiShowSourceContent (*winInfoPtr);
+ tui_show_source_content (*winInfoPtr);
if (m_winPtrIsNull (cmdWin))
{
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index f2d3762..ecfeb93 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -56,7 +56,7 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
register int i, desc, c, lineWidth, nlines;
register char *srcLine = 0;
- if ((ret = tuiAllocSourceBuffer (srcWin)) == TUI_SUCCESS)
+ if ((ret = tui_alloc_source_buffer (srcWin)) == TUI_SUCCESS)
{
lineWidth = srcWin->generic.width - 1;
/* Take hilite (window border) into account, when calculating
@@ -229,11 +229,11 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
/* elz: this function sets the contents of the source window to empty
except for a line in the middle with a warning message about the
source not being available. This function is called by
- tuiEraseSourceContents, which in turn is invoked when the source files
- cannot be accessed */
+ tuiEraseSourceContents, which in turn is invoked when the source
+ files cannot be accessed. */
void
-tuiSetSourceContentNil (TuiWinInfoPtr winInfo, char *warning_string)
+tui_set_source_content_nil (TuiWinInfoPtr winInfo, char *warning_string)
{
int lineWidth;
int nLines;
@@ -303,7 +303,7 @@ void
tuiShowSource (struct symtab *s, TuiLineOrAddress line, int noerror)
{
srcWin->detail.sourceInfo.horizontalOffset = 0;
- tuiUpdateSourceWindowAsIs(srcWin, s, line, noerror);
+ tui_update_source_window_as_is (srcWin, s, line, noerror);
}
diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h
index 96cf865..7b5e4ea 100644
--- a/gdb/tui/tui-source.h
+++ b/gdb/tui/tui-source.h
@@ -22,7 +22,9 @@
#ifndef _TUI_SOURCE_H
#define _TUI_SOURCE_H
-#include "defs.h"
+struct tui_win_info;
+
+extern void tui_set_source_content_nil (struct tui_win_info *, char *);
extern TuiStatus tuiSetSourceContent (struct symtab *, int, int);
extern void tuiShowSource (struct symtab *, TuiLineOrAddress, int);
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index c7210a1..7fac047 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -374,12 +374,12 @@ tui_show_frame_info (struct frame_info *fi)
TuiLineOrAddress l;
l.lineNo = startLine;
if (!(sourceAlreadyDisplayed
- && tuiLineIsDisplayed (item->locator.lineNo, winInfo, TRUE)))
- tuiUpdateSourceWindow (winInfo, sal.symtab, l, TRUE);
+ && tui_line_is_displayed (item->locator.lineNo, winInfo, TRUE)))
+ tui_update_source_window (winInfo, sal.symtab, l, TRUE);
else
{
l.lineNo = item->locator.lineNo;
- tuiSetIsExecPointAt (l, winInfo);
+ tui_set_is_exec_point_at (l, winInfo);
}
}
else
@@ -388,16 +388,16 @@ tui_show_frame_info (struct frame_info *fi)
{
TuiLineOrAddress a;
a.addr = low;
- if (!tuiAddrIsDisplayed (item->locator.addr, winInfo, TRUE))
- tuiUpdateSourceWindow (winInfo, sal.symtab, a, TRUE);
+ if (!tui_addr_is_displayed (item->locator.addr, winInfo, TRUE))
+ tui_update_source_window (winInfo, sal.symtab, a, TRUE);
else
{
a.addr = item->locator.addr;
- tuiSetIsExecPointAt (a, winInfo);
+ tui_set_is_exec_point_at (a, winInfo);
}
}
}
- tuiUpdateExecInfo (winInfo);
+ tui_update_exec_info (winInfo);
}
}
else
@@ -407,8 +407,8 @@ tui_show_frame_info (struct frame_info *fi)
for (i = 0; i < (sourceWindows ())->count; i++)
{
winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiUpdateExecInfo (winInfo);
+ tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
+ tui_update_exec_info (winInfo);
}
}
}
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index fa9f574..4af9e8a 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -524,7 +524,7 @@ tuiScrollLeft (TuiWinInfoPtr winToScroll, int numToScroll)
** command window do nothing since the term should handle it.
*/
if (winToScroll == srcWin || winToScroll == disassemWin)
- tuiHorizontalSourceScroll (winToScroll, LEFT_SCROLL, _numToScroll);
+ tui_horizontal_source_scroll (winToScroll, LEFT_SCROLL, _numToScroll);
}
return;
} /* tuiScrollLeft */
@@ -549,7 +549,7 @@ tuiScrollRight (TuiWinInfoPtr winToScroll, int numToScroll)
** command window do nothing since the term should handle it.
*/
if (winToScroll == srcWin || winToScroll == disassemWin)
- tuiHorizontalSourceScroll (winToScroll, RIGHT_SCROLL, _numToScroll);
+ tui_horizontal_source_scroll (winToScroll, RIGHT_SCROLL, _numToScroll);
}
return;
} /* tuiScrollRight */
@@ -602,10 +602,10 @@ tuiRefreshAll (void)
{
case SRC_WIN:
case DISASSEM_WIN:
- tuiShowSourceContent (winList[type]);
+ tui_show_source_content (winList[type]);
checkAndDisplayHighlightIfNeeded (winList[type]);
- tuiEraseExecInfoContent (winList[type]);
- tuiUpdateExecInfo (winList[type]);
+ tui_erase_exec_info_content (winList[type]);
+ tui_update_exec_info (winList[type]);
break;
case DATA_WIN:
tuiRefreshDataWin ();
@@ -689,7 +689,7 @@ tuiResizeAll (void)
_makeVisibleWithNewHeight (firstWin);
_makeVisibleWithNewHeight (cmdWin);
if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (firstWin, EMPTY_SOURCE_PROMPT);
break;
default:
if (curLayout == SRC_DISASSEM_COMMAND)
@@ -755,9 +755,9 @@ tuiResizeAll (void)
_makeVisibleWithNewHeight (secondWin);
_makeVisibleWithNewHeight (cmdWin);
if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (firstWin, EMPTY_SOURCE_PROMPT);
if (secondWin->generic.contentSize <= 0)
- tuiEraseSourceContent (secondWin, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (secondWin, EMPTY_SOURCE_PROMPT);
break;
}
/*
@@ -1185,7 +1185,7 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
_makeVisibleWithNewHeight (winInfo);
_makeVisibleWithNewHeight (primaryWinInfo);
if (srcWinInfo->generic.contentSize <= 0)
- tuiEraseSourceContent (srcWinInfo, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (srcWinInfo, EMPTY_SOURCE_PROMPT);
}
else
{
@@ -1286,9 +1286,9 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
_makeVisibleWithNewHeight (secondWin);
_makeVisibleWithNewHeight (firstWin);
if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (firstWin, EMPTY_SOURCE_PROMPT);
if (secondWin->generic.contentSize <= 0)
- tuiEraseSourceContent (secondWin, EMPTY_SOURCE_PROMPT);
+ tui_erase_source_content (secondWin, EMPTY_SOURCE_PROMPT);
}
}
}
@@ -1389,8 +1389,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
lineOrAddr.addr =
winInfo->detail.sourceInfo.startLineOrAddr.addr;
freeWinContent (&winInfo->generic);
- tuiUpdateSourceWindow (winInfo,
- cursal.symtab, lineOrAddr, TRUE);
+ tui_update_source_window (winInfo, cursal.symtab, lineOrAddr, TRUE);
}
else if (deprecated_selected_frame != (struct frame_info *) NULL)
{
@@ -1405,7 +1404,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
{
find_line_pc (s, cursal.line, &line.addr);
}
- tuiUpdateSourceWindow (winInfo, s, line, TRUE);
+ tui_update_source_window (winInfo, s, line, TRUE);
}
if (m_hasLocator (winInfo))
{
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index e4f620a..29a92c7 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -60,7 +60,7 @@ tui_display_main (void)
{
struct symtab_and_line sal;
- tuiUpdateSourceWindowsWithAddr (addr);
+ tui_update_source_windows_with_addr (addr);
sal = find_pc_line (addr, 0);
if (sal.symtab)
tui_update_locator_filename (sal.symtab->filename);
@@ -72,30 +72,24 @@ tui_display_main (void)
-/*
- ** tuiUpdateSourceWindow().
- ** Function to display source in the source window. This function
- ** initializes the horizontal scroll to 0.
- */
+/* Function to display source in the source window. This function
+ initializes the horizontal scroll to 0. */
void
-tuiUpdateSourceWindow (TuiWinInfoPtr winInfo, struct symtab *s,
- TuiLineOrAddress lineOrAddr, int noerror)
+tui_update_source_window (TuiWinInfoPtr winInfo, struct symtab *s,
+ TuiLineOrAddress lineOrAddr, int noerror)
{
winInfo->detail.sourceInfo.horizontalOffset = 0;
- tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror);
+ tui_update_source_window_as_is (winInfo, s, lineOrAddr, noerror);
return;
-} /* tuiUpdateSourceWindow */
+}
-/*
- ** tuiUpdateSourceWindowAsIs().
- ** Function to display source in the source/asm window. This
- ** function shows the source as specified by the horizontal offset.
- */
+/* Function to display source in the source/asm window. This function
+ shows the source as specified by the horizontal offset. */
void
-tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
- TuiLineOrAddress lineOrAddr, int noerror)
+tui_update_source_window_as_is (TuiWinInfoPtr winInfo, struct symtab *s,
+ TuiLineOrAddress lineOrAddr, int noerror)
{
TuiStatus ret;
@@ -106,14 +100,14 @@ tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
if (ret == TUI_FAILURE)
{
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiClearExecInfoContent (winInfo);
+ tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
+ tui_clear_exec_info_content (winInfo);
}
else
{
tui_update_breakpoint_info (winInfo, 0);
- tuiShowSourceContent (winInfo);
- tuiUpdateExecInfo (winInfo);
+ tui_show_source_content (winInfo);
+ tui_update_exec_info (winInfo);
if (winInfo->generic.type == SRC_WIN)
{
struct symtab_and_line sal;
@@ -134,16 +128,13 @@ tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
return;
-} /* tuiUpdateSourceWindowAsIs */
+}
-/*
- ** tuiUpdateSourceWindowsWithAddr().
- ** Function to ensure that the source and/or disassemly windows
- ** reflect the input address.
- */
+/* Function to ensure that the source and/or disassemly windows
+ reflect the input address. */
void
-tuiUpdateSourceWindowsWithAddr (CORE_ADDR addr)
+tui_update_source_windows_with_addr (CORE_ADDR addr)
{
if (addr != 0)
{
@@ -174,21 +165,18 @@ tuiUpdateSourceWindowsWithAddr (CORE_ADDR addr)
{
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiClearExecInfoContent (winInfo);
+ tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
+ tui_clear_exec_info_content (winInfo);
}
}
return;
} /* tuiUpdateSourceWindowsWithAddr */
-/*
- ** tuiUpdateSourceWindowsWithLine().
- ** Function to ensure that the source and/or disassemly windows
- ** reflect the input address.
- */
+/* Function to ensure that the source and/or disassemly windows
+ reflect the input address. */
void
-tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
+tui_update_source_windows_with_line (struct symtab *s, int line)
{
CORE_ADDR pc;
TuiLineOrAddress l;
@@ -198,7 +186,7 @@ tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
find_line_pc (s, line, &pc);
- tuiUpdateSourceWindowsWithAddr (pc);
+ tui_update_source_windows_with_addr (pc);
break;
default:
l.lineNo = line;
@@ -212,20 +200,17 @@ tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
}
return;
-} /* tuiUpdateSourceWindowsWithLine */
+}
-/*
- ** tuiClearSourceContent().
- */
void
-tuiClearSourceContent (TuiWinInfoPtr winInfo, int displayPrompt)
+tui_clear_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
{
if (m_winPtrNotNull (winInfo))
{
register int i;
winInfo->generic.contentInUse = FALSE;
- tuiEraseSourceContent (winInfo, displayPrompt);
+ tui_erase_source_content (winInfo, displayPrompt);
for (i = 0; i < winInfo->generic.contentSize; i++)
{
TuiWinElementPtr element =
@@ -239,11 +224,8 @@ tuiClearSourceContent (TuiWinInfoPtr winInfo, int displayPrompt)
} /* tuiClearSourceContent */
-/*
- ** tuiEraseSourceContent().
- */
void
-tuiEraseSourceContent (TuiWinInfoPtr winInfo, int displayPrompt)
+tui_erase_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
{
int xPos;
int halfWidth = (winInfo->generic.width - 2) / 2;
@@ -274,7 +256,7 @@ tuiEraseSourceContent (TuiWinInfoPtr winInfo, int displayPrompt)
to refresh, do display
the correct stuff, and not the old image */
- tuiSetSourceContentNil (winInfo, noSrcStr);
+ tui_set_source_content_nil (winInfo, noSrcStr);
}
tuiRefreshWin (&winInfo->generic);
}
@@ -307,11 +289,8 @@ tui_show_source_line (TuiWinInfoPtr winInfo, int lineno)
}
}
-/*
- ** tuiShowSourceContent().
- */
void
-tuiShowSourceContent (TuiWinInfoPtr winInfo)
+tui_show_source_content (TuiWinInfoPtr winInfo)
{
if (winInfo->generic.contentSize > 0)
{
@@ -321,7 +300,7 @@ tuiShowSourceContent (TuiWinInfoPtr winInfo)
tui_show_source_line (winInfo, lineno);
}
else
- tuiEraseSourceContent (winInfo, TRUE);
+ tui_erase_source_content (winInfo, TRUE);
checkAndDisplayHighlightIfNeeded (winInfo);
tuiRefreshWin (&winInfo->generic);
@@ -329,14 +308,11 @@ tuiShowSourceContent (TuiWinInfoPtr winInfo)
}
-/*
- ** tuiHorizontalSourceScroll().
- ** Scroll the source forward or backward horizontally
- */
+/* Scroll the source forward or backward horizontally. */
void
-tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
- TuiScrollDirection direction,
- int numToScroll)
+tui_horizontal_source_scroll (TuiWinInfoPtr winInfo,
+ TuiScrollDirection direction,
+ int numToScroll)
{
if (winInfo->generic.content != (OpaquePtr) NULL)
{
@@ -358,12 +334,10 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
offset = 0;
}
winInfo->detail.sourceInfo.horizontalOffset = offset;
- tuiUpdateSourceWindowAsIs (
- winInfo,
- s,
- ((TuiWinElementPtr)
- winInfo->generic.content[0])->whichElement.source.lineOrAddr,
- FALSE);
+ tui_update_source_window_as_is (winInfo, s,
+ ((TuiWinElementPtr)
+ winInfo->generic.content[0])->whichElement.source.lineOrAddr,
+ FALSE);
}
return;
@@ -372,7 +346,7 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
/* Set or clear the hasBreak flag in the line whose line is lineNo. */
void
-tuiSetIsExecPointAt (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
+tui_set_is_exec_point_at (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
{
int changed = 0;
int i;
@@ -414,7 +388,7 @@ tui_update_all_breakpoint_info ()
if (tui_update_breakpoint_info (win, FALSE))
{
- tuiUpdateExecInfo (win);
+ tui_update_exec_info (win);
}
}
}
@@ -565,14 +539,11 @@ tuiShowExecInfoContent (TuiWinInfoPtr winInfo)
execInfo->contentInUse = TRUE;
return;
-} /* tuiShowExecInfoContent */
+}
-/*
- ** tuiEraseExecInfoContent().
- */
void
-tuiEraseExecInfoContent (TuiWinInfoPtr winInfo)
+tui_erase_exec_info_content (TuiWinInfoPtr winInfo)
{
TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo;
@@ -580,33 +551,27 @@ tuiEraseExecInfoContent (TuiWinInfoPtr winInfo)
tuiRefreshWin (execInfo);
return;
-} /* tuiEraseExecInfoContent */
+}
-/*
- ** tuiClearExecInfoContent().
- */
void
-tuiClearExecInfoContent (TuiWinInfoPtr winInfo)
+tui_clear_exec_info_content (TuiWinInfoPtr winInfo)
{
winInfo->detail.sourceInfo.executionInfo->contentInUse = FALSE;
- tuiEraseExecInfoContent (winInfo);
+ tui_erase_exec_info_content (winInfo);
return;
-} /* tuiClearExecInfoContent */
+}
-/*
- ** tuiUpdateExecInfo().
- ** Function to update the execution info window
- */
+/* Function to update the execution info window. */
void
-tuiUpdateExecInfo (TuiWinInfoPtr winInfo)
+tui_update_exec_info (TuiWinInfoPtr winInfo)
{
tuiSetExecInfoContent (winInfo);
tuiShowExecInfoContent (winInfo);
} /* tuiUpdateExecInfo */
-TuiStatus
-tuiAllocSourceBuffer (TuiWinInfoPtr winInfo)
+enum tui_status
+tui_alloc_source_buffer (struct tui_win_info *winInfo)
{
register char *srcLineBuf;
register int i, lineWidth, maxLines;
@@ -652,14 +617,11 @@ tuiAllocSourceBuffer (TuiWinInfoPtr winInfo)
} /* tuiAllocSourceBuffer */
-/*
- ** tuiLineIsDisplayed().
- ** Answer whether the a particular line number or address is displayed
- ** in the current source window.
- */
+/* Answer whether the a particular line number or address is displayed
+ in the current source window. */
int
-tuiLineIsDisplayed (int line, TuiWinInfoPtr winInfo,
- int checkThreshold)
+tui_line_is_displayed (int line, TuiWinInfoPtr winInfo,
+ int checkThreshold)
{
int isDisplayed = FALSE;
int i, threshold;
@@ -678,16 +640,13 @@ tuiLineIsDisplayed (int line, TuiWinInfoPtr winInfo,
}
return isDisplayed;
-} /* tuiLineIsDisplayed */
+}
-/*
- ** tuiLineIsDisplayed().
- ** Answer whether the a particular line number or address is displayed
- ** in the current source window.
- */
+/* Answer whether the a particular line number or address is displayed
+ in the current source window. */
int
-tuiAddrIsDisplayed (CORE_ADDR addr, TuiWinInfoPtr winInfo,
+tui_addr_is_displayed (CORE_ADDR addr, TuiWinInfoPtr winInfo,
int checkThreshold)
{
int isDisplayed = FALSE;
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index cb00449..e64589b 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -1,5 +1,8 @@
/* TUI display source/assembly window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software
+ Foundation, Inc.
+
Contributed by Hewlett-Packard Company.
This file is part of GDB.
@@ -19,50 +22,52 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TUI_SOURCEWIN_H
-#define _TUI_SOURCEWIN_H
+#ifndef TUI_SOURCEWIN_H
+#define TUI_SOURCEWIN_H
+
+#include "tui/tui-data.h"
+
+struct tui_win_info;
-/* Update the execution windows to show the active breakpoints.
- This is called whenever a breakpoint is inserted, removed or
- has its state changed. */
+/* Update the execution windows to show the active breakpoints. This
+ is called whenever a breakpoint is inserted, removed or has its
+ state changed. */
extern void tui_update_all_breakpoint_info (void);
-/* Scan the source window and the breakpoints to update the
- hasBreak information for each line.
- Returns 1 if something changed and the execution window
- must be refreshed. */
-extern int tui_update_breakpoint_info (TuiWinInfoPtr win, int current_only);
+/* Scan the source window and the breakpoints to update the hasBreak
+ information for each line. Returns 1 if something changed and the
+ execution window must be refreshed. */
+extern int tui_update_breakpoint_info (struct tui_win_info * win,
+ int current_only);
/* Function to display the "main" routine. */
extern void tui_display_main (void);
-extern void tuiUpdateSourceWindow (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
- int);
-extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
- int);
-extern void tuiUpdateSourceWindowsWithAddr (CORE_ADDR);
-extern void tuiUpdateSourceWindowsWithLine (struct symtab *, int);
-extern void tuiClearSourceContent (TuiWinInfoPtr, int);
-extern void tuiEraseSourceContent (TuiWinInfoPtr, int);
-extern void tuiSetSourceContentNil (TuiWinInfoPtr, char *);
-extern void tuiShowSourceContent (TuiWinInfoPtr);
-extern void tuiHorizontalSourceScroll (TuiWinInfoPtr, TuiScrollDirection,
- int);
-extern TuiStatus tuiSetExecInfoContent (TuiWinInfoPtr);
-extern void tuiShowExecInfoContent (TuiWinInfoPtr);
-extern void tuiEraseExecInfoContent (TuiWinInfoPtr);
-extern void tuiClearExecInfoContent (TuiWinInfoPtr);
-extern void tuiUpdateExecInfo (TuiWinInfoPtr);
-
-extern void tuiSetIsExecPointAt (TuiLineOrAddress, TuiWinInfoPtr);
-extern TuiStatus tuiAllocSourceBuffer (TuiWinInfoPtr);
-extern int tuiLineIsDisplayed (int, TuiWinInfoPtr, int);
-extern int tuiAddrIsDisplayed (CORE_ADDR, TuiWinInfoPtr, int);
-
-
-/*
- ** Constant definitions
- */
+extern void tui_update_source_window (struct tui_win_info *, struct symtab *,
+ union tui_line_or_address, int);
+extern void tui_update_source_window_as_is (struct tui_win_info *,
+ struct symtab *,
+ union tui_line_or_address, int);
+extern void tui_update_source_windows_with_addr (CORE_ADDR);
+extern void tui_update_source_windows_with_line (struct symtab *, int);
+extern void tui_clear_source_content (struct tui_win_info *, int);
+extern void tui_erase_source_content (struct tui_win_info *, int);
+extern void tui_show_source_content (struct tui_win_info *);
+extern void tui_horizontal_source_scroll (struct tui_win_info *,
+ enum tui_scroll_direction, int);
+extern enum tui_status tui_set_exec_info_content (struct tui_win_info *);
+extern void tui_show_exec_info_content (struct tui_win_info *);
+extern void tui_erase_exec_info_content (struct tui_win_info *);
+extern void tui_clear_exec_info_content (struct tui_win_info *);
+extern void tui_update_exec_info (struct tui_win_info *);
+
+extern void tui_set_is_exec_point_at (union tui_line_or_address,
+ struct tui_win_info *);
+extern enum tui_status tui_alloc_source_buffer (struct tui_win_info *);
+extern int tui_line_is_displayed (int, struct tui_win_info *, int);
+extern int tui_addr_is_displayed (CORE_ADDR, struct tui_win_info *, int);
+
+
+/* Constant definitions. */
#define SCROLL_THRESHOLD 2 /* threshold for lazy scroll */
#endif
-/*_TUI_SOURCEWIN_H */
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 83ac52b..8f16d0f 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -565,7 +565,7 @@ tui_show_source (const char *file, int line)
/* make sure that the source window is displayed */
tui_add_win_to_layout (SRC_WIN);
- tuiUpdateSourceWindowsWithLine (cursal.symtab, line);
+ tui_update_source_windows_with_line (cursal.symtab, line);
tui_update_locator_filename (file);
}
@@ -573,7 +573,7 @@ void
tui_show_assembly (CORE_ADDR addr)
{
tui_add_win_to_layout (DISASSEM_WIN);
- tuiUpdateSourceWindowsWithAddr (addr);
+ tui_update_source_windows_with_addr (addr);
}
int