aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-01-19 16:06:04 +0000
committerAndrew Cagney <cagney@redhat.com>2004-01-19 16:06:04 +0000
commit55fb0713929955357385810a187987d919cb9608 (patch)
treeebc87a1fe12175aa9791b5011e69a6717b502ab0 /gdb/tui
parentbcdf15685fdb5cd64dc3026cb0f1ed7fa2e66cbe (diff)
downloadgdb-55fb0713929955357385810a187987d919cb9608.zip
gdb-55fb0713929955357385810a187987d919cb9608.tar.gz
gdb-55fb0713929955357385810a187987d919cb9608.tar.bz2
2004-01-19 Andrew Cagney <cagney@redhat.com>
* tui/tui-regs.h: Include "tui-data.h". (tuiFirstRegElementNoInLine): Delete declaration. (tui_display_registers_from): Rename tuiDisplayRegistersFrom. (tui_last_regs_line_no): Rename tuiLastRegsLineNo. (tui_line_from_reg_element_no): Rename tuiLineFromRegElementNo. (tui_calculate_regs_column_count): Rename tuiCalculateRegsColumnCount. (tui_check_register_values): Rename tuiCheckRegisterValues. (tui_show_registers): Rename tuiShowRegisters. (tui_display_registers_from_line): Rename tuiDisplayRegistersFromLine. (tui_first_reg_element_inline): Rename tuiFirstRegElementInLine. (tui_toggle_float_regs): Rename tuiToggleFloatRegs. (tui_first_reg_element_no_inline): Rename tuiFirstRegElementNoInLine. * tui/tui-data.h: Update copyright. (enum tui_register_display_type): Rename _TuiRegisterDisplayType. * tui/tui-windata.c: Update copyright, update references. * tui/tui-regs.c: Update copyright, update references. * tui/tui-win.c: Update copyright, update references. * tui/tui-layout.c: Update copyright, update references.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-data.h7
-rw-r--r--gdb/tui/tui-layout.c6
-rw-r--r--gdb/tui/tui-regs.c122
-rw-r--r--gdb/tui/tui-regs.h40
-rw-r--r--gdb/tui/tui-win.c6
-rw-r--r--gdb/tui/tui-windata.c20
6 files changed, 87 insertions, 114 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 6fcf875..b75de9d 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -1,5 +1,8 @@
/* TUI data manipulation routines.
- 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.
@@ -135,7 +138,7 @@ typedef enum _TuiDataType
TuiDataType, TuiDataTypePtr;
/* Types of register displays */
-typedef enum _TuiRegisterDisplayType
+typedef enum tui_register_display_type
{
TUI_UNDEFINED_REGS,
TUI_GENERAL_REGS,
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index c1694b2..d1920ff 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -1,7 +1,7 @@
/* TUI layout window management.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -258,7 +258,7 @@ tuiSetLayout (TuiLayoutType layoutType,
layoutDef->regsDisplayType =
(regsDisplayType == TUI_UNDEFINED_REGS ?
TUI_GENERAL_REGS : regsDisplayType);
- tuiShowRegisters (layoutDef->regsDisplayType);
+ tui_show_registers (layoutDef->regsDisplayType);
}
}
}
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 588f5c3..68520b9 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -1,7 +1,7 @@
/* TUI display registers in window.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -105,13 +105,10 @@ static void _tuiScrollRegsBackward_command (char *, int);
** PUBLIC FUNCTIONS **
******************************************/
-/*
- ** tuiLastRegsLineNo()
- ** Answer the number of the last line in the regs display.
- ** If there are no registers (-1) is returned.
- */
+/* Answer the number of the last line in the regs display. If there
+ are no registers (-1) is returned. */
int
-tuiLastRegsLineNo (void)
+tui_last_regs_line_no (void)
{
register int numLines = (-1);
@@ -124,17 +121,14 @@ tuiLastRegsLineNo (void)
numLines++;
}
return numLines;
-} /* tuiLastRegsLineNo */
+}
-/*
- ** tuiLineFromRegElementNo()
- ** Answer the line number that the register element at elementNo is
- ** on. If elementNo is greater than the number of register elements
- ** there are, -1 is returned.
- */
+/* Answer the line number that the register element at elementNo is
+ on. If elementNo is greater than the number of register elements
+ there are, -1 is returned. */
int
-tuiLineFromRegElementNo (int elementNo)
+tui_line_from_reg_element_no (int elementNo)
{
if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
{
@@ -154,16 +148,13 @@ tuiLineFromRegElementNo (int elementNo)
}
else
return (-1);
-} /* tuiLineFromRegElementNo */
+}
-/*
- ** tuiFirstRegElementNoInLine()
- ** Answer the index of the first element in lineNo. If lineNo is
- ** past the register area (-1) is returned.
- */
+/* Answer the index of the first element in lineNo. If lineNo is past
+ the register area (-1) is returned. */
int
-tuiFirstRegElementNoInLine (int lineNo)
+tui_first_reg_element_no_inline (int lineNo)
{
if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount)
<= dataWin->detail.dataDisplayInfo.regsContentCount)
@@ -172,7 +163,7 @@ tuiFirstRegElementNoInLine (int lineNo)
dataWin->detail.dataDisplayInfo.regsColumnCount;
else
return (-1);
-} /* tuiFirstRegElementNoInLine */
+}
/*
@@ -192,13 +183,10 @@ tuiLastRegElementNoInLine (int lineNo)
} /* tuiLastRegElementNoInLine */
-/*
- ** tuiCalculateRegsColumnCount
- ** Calculate the number of columns that should be used to display
- ** the registers.
- */
+/* Calculate the number of columns that should be used to display the
+ registers. */
int
-tuiCalculateRegsColumnCount (TuiRegisterDisplayType dpyType)
+tui_calculate_regs_column_count (TuiRegisterDisplayType dpyType)
{
int colCount, colWidth;
@@ -217,14 +205,11 @@ tuiCalculateRegsColumnCount (TuiRegisterDisplayType dpyType)
} /* tuiCalulateRegsColumnCount */
-/*
- ** tuiShowRegisters().
- ** Show the registers int the data window as indicated by dpyType.
- ** If there is any other registers being displayed, then they are
- ** cleared. What registers are displayed is dependent upon dpyType.
- */
+/* Show the registers int the data window as indicated by dpyType. If
+ there is any other registers being displayed, then they are
+ cleared. What registers are displayed is dependent upon dpyType. */
void
-tuiShowRegisters (TuiRegisterDisplayType dpyType)
+tui_show_registers (TuiRegisterDisplayType dpyType)
{
TuiStatus ret = TUI_FAILURE;
int refreshValuesOnly = FALSE;
@@ -286,18 +271,15 @@ tuiShowRegisters (TuiRegisterDisplayType dpyType)
(tuiLayoutDef ())->regsDisplayType = dpyType;
return;
-} /* tuiShowRegisters */
+}
-/*
- ** tuiDisplayRegistersFrom().
- ** Function to display the registers in the content from
- ** 'startElementNo' until the end of the register content or the
- ** end of the display height. No checking for displaying past
- ** the end of the registers is done here.
- */
+/* Function to display the registers in the content from
+ 'startElementNo' until the end of the register content or the end
+ of the display height. No checking for displaying past the end of
+ the registers is done here. */
void
-tuiDisplayRegistersFrom (int startElementNo)
+tui_display_registers_from (int startElementNo)
{
if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
dataWin->detail.dataDisplayInfo.regsContentCount > 0)
@@ -374,7 +356,7 @@ tuiDisplayRegistersFrom (int startElementNo)
}
return;
-} /* tuiDisplayRegistersFrom */
+}
/*
@@ -397,7 +379,7 @@ tuiDisplayRegElementAtLine (int startElementNo, int startLineNo)
{
register int lastLineNo, firstLineOnLastPage;
- lastLineNo = tuiLastRegsLineNo ();
+ lastLineNo = tui_last_regs_line_no ();
firstLineOnLastPage = lastLineNo - (dataWin->generic.height - 2);
if (firstLineOnLastPage < 0)
firstLineOnLastPage = 0;
@@ -408,9 +390,9 @@ tuiDisplayRegElementAtLine (int startElementNo, int startLineNo)
*/
if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0 &&
startLineNo > firstLineOnLastPage)
- elementNo = tuiFirstRegElementNoInLine (firstLineOnLastPage);
+ elementNo = tui_first_reg_element_no_inline (firstLineOnLastPage);
}
- tuiDisplayRegistersFrom (elementNo);
+ tui_display_registers_from (elementNo);
}
return;
@@ -418,14 +400,11 @@ tuiDisplayRegElementAtLine (int startElementNo, int startLineNo)
-/*
- ** tuiDisplayRegistersFromLine().
- ** Function to display the registers starting at line lineNo in
- ** the data window. Answers the line number that the display
- ** actually started from. If nothing is displayed (-1) is returned.
- */
+/* Function to display the registers starting at line lineNo in the
+ data window. Answers the line number that the display actually
+ started from. If nothing is displayed (-1) is returned. */
int
-tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
+tui_display_registers_from_line (int lineNo, int forceDisplay)
{
if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
{
@@ -438,9 +417,9 @@ tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
** If we must display regs (forceDisplay is true), then make
** sure that we don't display off the end of the registers.
*/
- if (lineNo >= tuiLastRegsLineNo ())
+ if (lineNo >= tui_last_regs_line_no ())
{
- if ((line = tuiLineFromRegElementNo (
+ if ((line = tui_line_from_reg_element_no (
dataWin->detail.dataDisplayInfo.regsContentCount - 1)) < 0)
line = 0;
}
@@ -450,7 +429,7 @@ tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
else
line = lineNo;
- elementNo = tuiFirstRegElementNoInLine (line);
+ elementNo = tui_first_reg_element_no_inline (line);
if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
tuiDisplayRegElementAtLine (elementNo, line);
else
@@ -460,23 +439,20 @@ tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
}
return (-1); /* nothing was displayed */
-} /* tuiDisplayRegistersFromLine */
+}
-/*
- ** tuiCheckRegisterValues()
- ** This function check all displayed registers for changes in
- ** values, given a particular frame. If the values have changed,
- ** they are updated with the new value and highlighted.
- */
+/* This function check all displayed registers for changes in values,
+ given a particular frame. If the values have changed, they are
+ updated with the new value and highlighted. */
void
-tuiCheckRegisterValues (struct frame_info *frame)
+tui_check_register_values (struct frame_info *frame)
{
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
{
if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0 &&
dataWin->detail.dataDisplayInfo.displayRegs)
- tuiShowRegisters ((tuiLayoutDef ())->regsDisplayType);
+ tui_show_registers ((tuiLayoutDef ())->regsDisplayType);
else
{
int i, j;
@@ -524,7 +500,7 @@ tuiCheckRegisterValues (struct frame_info *frame)
}
}
return;
-} /* tuiCheckRegisterValues */
+}
/*
@@ -543,7 +519,7 @@ tuiToggleFloatRegs (void)
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible &&
(dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_SFLOAT_REGS ||
dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_DFLOAT_REGS))
- tuiShowRegisters (layoutDef->floatRegsDisplayType);
+ tui_show_registers (layoutDef->floatRegsDisplayType);
return;
} /* tuiToggleFloatRegs */
@@ -889,7 +865,7 @@ _tuiSetRegsContent (int startRegNum, int endRegNum,
!allocatedHere && refreshValuesOnly);
}
dataWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (dpyType);
+ tui_calculate_regs_column_count (dpyType);
#ifdef LATER
if (dataWin->detail.dataDisplayInfo.dataContentCount > 0)
{
@@ -978,7 +954,7 @@ _tui_vShowRegisters_commandSupport (TuiRegisterDisplayType dpyType)
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
{ /* Data window already displayed, show the registers */
if (dataWin->detail.dataDisplayInfo.regsDisplayType != dpyType)
- tuiShowRegisters (dpyType);
+ tui_show_registers (dpyType);
}
else
(tuiLayoutDef ())->regsDisplayType = dpyType;
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index 8fbfbbf..19703a2 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -1,5 +1,8 @@
/* TUI display registers in window.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+ Inc.
+
Contributed by Hewlett-Packard Company.
This file is part of GDB.
@@ -19,29 +22,20 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TUI_REGS_H
-#define _TUI_REGS_H
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
+#ifndef TUI_REGS_H
+#define TUI_REGS_H
+#include "tui/tui-data.h" /* For TuiRegisterDisplayType. */
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern void tuiCheckRegisterValues (struct frame_info *);
-extern void tuiShowRegisters (TuiRegisterDisplayType);
-extern void tuiDisplayRegistersFrom (int);
-extern int tuiDisplayRegistersFromLine (int, int);
-extern int tuiLastRegsLineNo (void);
-extern int tuiFirstRegElementInLine (int);
-extern int tuiLastRegElementInLine (int);
-extern int tuiLineFromRegElementNo (int);
-extern void tuiToggleFloatRegs (void);
-extern int tuiCalculateRegsColumnCount (TuiRegisterDisplayType);
-extern int tuiFirstRegElementNoInLine (int lineno);
+extern void tui_check_register_values (struct frame_info *);
+extern void tui_show_registers (enum tui_register_display_type);
+extern void tui_display_registers_from (int);
+extern int tui_display_registers_from_line (int, int);
+extern int tui_last_regs_line_no (void);
+extern int tui_first_reg_element_inline (int);
+extern int tui_line_from_reg_element_no (int);
+extern void tui_toggle_float_regs (void);
+extern int tui_calculate_regs_column_count (enum tui_register_display_type);
+extern int tui_first_reg_element_no_inline (int lineno);
#endif
-/*_TUI_REGS_H*/
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index d0125c6..860b956 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1,7 +1,7 @@
/* TUI window generic functions.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -722,7 +722,7 @@ tuiResizeAll (void)
if (firstWin == dataWin && widthDiff != 0)
firstWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (
+ tui_calculate_regs_column_count (
firstWin->detail.dataDisplayInfo.regsDisplayType);
locator->width += widthDiff;
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index b01acce..f504f7f 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -1,7 +1,7 @@
/* Data/register window display.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -87,7 +87,7 @@ tuiFirstDataElementNoInLine (int lineNo)
** First see if there is a register on lineNo, and if so, set the
** first element number
*/
- if ((firstElementNo = tuiFirstRegElementNoInLine (lineNo)) == -1)
+ if ((firstElementNo = tui_first_reg_element_no_inline (lineNo)) == -1)
{ /*
** Looking at the general data, the 1st element on lineNo
*/
@@ -161,7 +161,7 @@ tuiDisplayAllData (void)
tuiEraseDataContent ((char *) NULL);
tuiDeleteDataContentWindows ();
checkAndDisplayHighlightIfNeeded (dataWin);
- tuiDisplayRegistersFrom (0);
+ tui_display_registers_from (0);
/*
** Then display the other data
*/
@@ -192,15 +192,15 @@ tuiDisplayDataFromLine (int lineNo)
/* there is no general data, force regs to display (if there are any) */
if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0)
- tuiDisplayRegistersFromLine (_lineNo, TRUE);
+ tui_display_registers_from_line (_lineNo, TRUE);
else
{
int elementNo, startLineNo;
- int regsLastLine = tuiLastRegsLineNo ();
+ int regsLastLine = tui_last_regs_line_no ();
/* display regs if we can */
- if (tuiDisplayRegistersFromLine (_lineNo, FALSE) < 0)
+ if (tui_display_registers_from_line (_lineNo, FALSE) < 0)
{ /*
** _lineNo is past the regs display, so calc where the
** start data element is
@@ -234,7 +234,7 @@ tuiDisplayDataFrom (int elementNo, int reuseWindows)
int firstLine = (-1);
if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- firstLine = tuiLineFromRegElementNo (elementNo);
+ firstLine = tui_line_from_reg_element_no (elementNo);
else
{ /* calculate the firstLine from the element number */
}
@@ -278,7 +278,7 @@ tuiRefreshDataWin (void)
void
tuiCheckDataValues (struct frame_info *frame)
{
- tuiCheckRegisterValues (frame);
+ tui_check_register_values (frame);
/* Now check any other data values that there are */
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
@@ -320,7 +320,7 @@ tuiVerticalDataScroll (TuiScrollDirection scrollDirection, int numToScroll)
firstElementNo = tuiFirstDataItemDisplayed ();
if (firstElementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- firstLine = tuiLineFromRegElementNo (firstElementNo);
+ firstLine = tui_line_from_reg_element_no (firstElementNo);
else
{ /* calculate the first line from the element number which is in
** the general data content