aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/tui/tui-data.h2
-rw-r--r--gdb/tui/tui-disasm.c44
-rw-r--r--gdb/tui/tui-disasm.h30
-rw-r--r--gdb/tui/tui-layout.c6
-rw-r--r--gdb/tui/tui-win.c4
-rw-r--r--gdb/tui/tui-winsource.c14
-rw-r--r--gdb/tui/tui.h7
8 files changed, 65 insertions, 60 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e69c38a..e483d6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,23 @@
2004-01-20 Andrew Cagney <cagney@redhat.com>
+ * tui/tui-disasm.h: Update copyright. Include "tui.h" and
+ "tui-data.h".
+ (tui_set_disassem_content): Rename tuiSetDisassemContent.
+ (tui_show_disassem): Rename tuiShowDisassem.
+ (tui_show_disassem_and_update_source): Rename
+ tuiVerticalDisassemScroll.
+ (tui_vertical_disassem_scroll): Rename tuiVerticalDisassemScroll.
+ (tui_get_begin_asm_address): Rename tuiGetBeginAsmAddress.
+ * tui/tui.h: Update copyright.
+ (enum tui_status): Define.
+ * tui/tui-data.h (enum tui_scroll_direction): Define.
+ * tui/tui-disasm.c: Update copyright. Update references.
+ * tui/tui-winsource.c: Update copyright. Update references.
+ * tui/tui-win.c: Update references.
+ * tui/tui-layout.c: Update references.
+
+2004-01-20 Andrew Cagney <cagney@redhat.com>
+
* mi/mi-cmd-stack.c (list_args_or_locals): Move declaration of
sym2 to start of block.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index b75de9d..ea7c786 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -96,7 +96,7 @@ TuiGenWinInfo, *TuiGenWinInfoPtr;
#define TUI_GENERAL_SPECIAL_REGS_NAME_LOWER "$regs"
/* Scroll direction enum */
-typedef enum
+typedef enum tui_scroll_direction
{
FORWARD_SCROLL,
BACKWARD_SCROLL,
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 763d81e..99143a4 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -1,7 +1,7 @@
/* Disassembly 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.
@@ -172,8 +172,8 @@ tui_find_disassembly_address (CORE_ADDR pc, int from)
}
/* Function to set the disassembly window's content. */
-TuiStatus
-tuiSetDisassemContent (CORE_ADDR pc)
+enum tui_status
+tui_set_disassem_content (CORE_ADDR pc)
{
TuiStatus ret = TUI_FAILURE;
register int i;
@@ -270,12 +270,9 @@ tuiSetDisassemContent (CORE_ADDR pc)
}
-/*
- ** tuiShowDisassem().
- ** Function to display the disassembly window with disassembled code.
- */
+/* Function to display the disassembly window with disassembled code. */
void
-tuiShowDisassem (CORE_ADDR startAddr)
+tui_show_disassem (CORE_ADDR startAddr)
{
struct symtab *s = find_pc_symtab (startAddr);
TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
@@ -292,19 +289,16 @@ tuiShowDisassem (CORE_ADDR startAddr)
tuiSetWinFocusTo (disassemWin);
return;
-} /* tuiShowDisassem */
+}
-/*
- ** tuiShowDisassemAndUpdateSource().
- ** Function to display the disassembly window.
- */
+/* Function to display the disassembly window. */
void
-tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
+tui_show_disassem_and_update_source (CORE_ADDR startAddr)
{
struct symtab_and_line sal;
- tuiShowDisassem (startAddr);
+ tui_show_disassem (startAddr);
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
TuiLineOrAddress val;
@@ -326,13 +320,10 @@ tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
}
return;
-} /* tuiShowDisassemAndUpdateSource */
+}
-/*
- ** tuiGetBeginAsmAddress().
- */
CORE_ADDR
-tuiGetBeginAsmAddress (void)
+tui_get_begin_asm_address (void)
{
TuiGenWinInfoPtr locator;
TuiLocatorElementPtr element;
@@ -361,7 +352,7 @@ tuiGetBeginAsmAddress (void)
addr = element->addr;
return addr;
-} /* tuiGetBeginAsmAddress */
+}
/* Determine what the low address will be to display in the TUI's
disassembly window. This may or may not be the same as the
@@ -381,13 +372,10 @@ tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
return pc;
}
-/*
- ** tuiVerticalDisassemScroll().
- ** Scroll the disassembly forward or backward vertically
- */
+/* Scroll the disassembly forward or backward vertically. */
void
-tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
- int numToScroll)
+tui_vertical_disassem_scroll (enum tui_scroll_direction scrollDirection,
+ int numToScroll)
{
if (disassemWin->generic.content != (OpaquePtr) NULL)
{
diff --git a/gdb/tui/tui-disasm.h b/gdb/tui/tui-disasm.h
index 6728425..e72aba1 100644
--- a/gdb/tui/tui-disasm.h
+++ b/gdb/tui/tui-disasm.h
@@ -1,5 +1,8 @@
/* Disassembly display.
- 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,23 +22,16 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TUI_DISASSEM_H
-#define _TUI_DISASSEM_H
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
+#ifndef TUI_DISASM_H
+#define TUI_DISASM_H
+#include "tui/tui.h" /* For enum tui_status. */
+#include "tui/tui-data.h" /* For enum tui_scroll_direction. */
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern TuiStatus tuiSetDisassemContent (CORE_ADDR);
-extern void tuiShowDisassem (CORE_ADDR);
-extern void tuiShowDisassemAndUpdateSource (CORE_ADDR);
-extern void tuiVerticalDisassemScroll (TuiScrollDirection, int);
-extern CORE_ADDR tuiGetBeginAsmAddress (void);
+extern enum tui_status tui_set_disassem_content (CORE_ADDR);
+extern void tui_show_disassem (CORE_ADDR);
+extern void tui_show_disassem_and_update_source (CORE_ADDR);
+extern void tui_vertical_disassem_scroll (enum tui_scroll_direction, int);
+extern CORE_ADDR tui_get_begin_asm_address (void);
#endif
-/*_TUI_DISASSEM_H*/
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index d1920ff..e4093c1 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -193,7 +193,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = tuiGetBeginAsmAddress ();
+ addr = tui_get_begin_asm_address ();
tuiSetWinFocusTo (disassemWin);
layoutDef->displayMode = DISASSEM_WIN;
layoutDef->split = FALSE;
@@ -206,7 +206,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = tuiGetBeginAsmAddress ();
+ addr = tui_get_begin_asm_address ();
if (winWithFocus == srcWin)
tuiSetWinFocusTo (srcWin);
else
@@ -229,7 +229,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = tuiGetBeginAsmAddress ();
+ addr = tui_get_begin_asm_address ();
if (winWithFocus != dataWin)
tuiSetWinFocusTo (disassemWin);
else
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 860b956..a7d35ce 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -467,7 +467,7 @@ tuiScrollForward (TuiWinInfoPtr winToScroll, int numToScroll)
if (winToScroll == srcWin)
tuiVerticalSourceScroll (FORWARD_SCROLL, _numToScroll);
else if (winToScroll == disassemWin)
- tuiVerticalDisassemScroll (FORWARD_SCROLL, _numToScroll);
+ tui_vertical_disassem_scroll (FORWARD_SCROLL, _numToScroll);
else if (winToScroll == dataWin)
tuiVerticalDataScroll (FORWARD_SCROLL, _numToScroll);
}
@@ -497,7 +497,7 @@ tuiScrollBackward (TuiWinInfoPtr winToScroll, int numToScroll)
if (winToScroll == srcWin)
tuiVerticalSourceScroll (BACKWARD_SCROLL, _numToScroll);
else if (winToScroll == disassemWin)
- tuiVerticalDisassemScroll (BACKWARD_SCROLL, _numToScroll);
+ tui_vertical_disassem_scroll (BACKWARD_SCROLL, _numToScroll);
else if (winToScroll == dataWin)
tuiVerticalDataScroll (BACKWARD_SCROLL, _numToScroll);
}
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index c799550..87609b4 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -1,7 +1,7 @@
/* TUI display source/assembly 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.
@@ -55,7 +55,7 @@ tui_display_main (void)
{
CORE_ADDR addr;
- addr = tuiGetBeginAsmAddress ();
+ addr = tui_get_begin_asm_address ();
if (addr != (CORE_ADDR) 0)
{
struct symtab_and_line sal;
@@ -102,7 +102,7 @@ tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
if (winInfo->generic.type == SRC_WIN)
ret = tuiSetSourceContent (s, lineOrAddr.lineNo, noerror);
else
- ret = tuiSetDisassemContent (lineOrAddr.addr);
+ ret = tui_set_disassem_content (lineOrAddr.addr);
if (ret == TUI_FAILURE)
{
@@ -154,10 +154,10 @@ tuiUpdateSourceWindowsWithAddr (CORE_ADDR addr)
{
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
- tuiShowDisassem (addr);
+ tui_show_disassem (addr);
break;
case SRC_DISASSEM_COMMAND:
- tuiShowDisassemAndUpdateSource (addr);
+ tui_show_disassem_and_update_source (addr);
break;
default:
sal = find_pc_line (addr, 0);
@@ -206,7 +206,7 @@ tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);
- tuiShowDisassem (pc);
+ tui_show_disassem (pc);
}
break;
}
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index c627b86..03d036d 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -1,5 +1,8 @@
/* External/Public TUI Header File.
- 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.
@@ -53,7 +56,7 @@ Opaque (*OpaqueFuncPtr) (va_list);
extern void strcat_to_buf (char *, int, const char *);
/* Types of error returns */
- typedef enum
+ typedef enum tui_status
{
TUI_SUCCESS,
TUI_FAILURE