2004-02-06 Andrew Cagney <cagney@redhat.com>
* tui/tui-source.h: Update copyright. Include "tui-data.h". (struct symtab): Declare. (tui_set_source_content): Rename tuiSetSourceContent. (tui_show_symtab_source): Rename tuiShowSource. (tui_source_is_displayed): Rename tuiSourceIsDisplayed. (tui_vertical_source_scroll): Rename tuiVerticalSourceScroll. * tui/tui-source.c: Update copyright. Update references. * tui/tui-win.c, tui/tui-winsource.c: Update references. * tui/tui-stack.c: Update references.
This commit is contained in:
parent
a21fcd8ffb
commit
a358af15d5
@ -1,5 +1,15 @@
|
||||
2004-02-06 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* tui/tui-source.h: Update copyright. Include "tui-data.h".
|
||||
(struct symtab): Declare.
|
||||
(tui_set_source_content): Rename tuiSetSourceContent.
|
||||
(tui_show_symtab_source): Rename tuiShowSource.
|
||||
(tui_source_is_displayed): Rename tuiSourceIsDisplayed.
|
||||
(tui_vertical_source_scroll): Rename tuiVerticalSourceScroll.
|
||||
* tui/tui-source.c: Update copyright. Update references.
|
||||
* tui/tui-win.c, tui/tui-winsource.c: Update references.
|
||||
* tui/tui-stack.c: Update references.
|
||||
|
||||
* tui/tui-win.h: Update copyright. Include "tui-data.h".
|
||||
(struct tui_win_info): Declare.
|
||||
(tui_scroll_forward): Rename tuiScrollForward.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* TUI display source 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.
|
||||
|
||||
@ -45,8 +45,8 @@
|
||||
#endif
|
||||
|
||||
/* Function to display source in the source window. */
|
||||
TuiStatus
|
||||
tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
|
||||
enum tui_status
|
||||
tui_set_source_content (struct symtab *s, int lineNo, int noerror)
|
||||
{
|
||||
TuiStatus ret = TUI_FAILURE;
|
||||
|
||||
@ -300,16 +300,17 @@ tui_set_source_content_nil (TuiWinInfoPtr winInfo, char *warning_string)
|
||||
/* Function to display source in the source window. This function
|
||||
initializes the horizontal scroll to 0. */
|
||||
void
|
||||
tuiShowSource (struct symtab *s, TuiLineOrAddress line, int noerror)
|
||||
tui_show_symtab_source (struct symtab *s, TuiLineOrAddress line, int noerror)
|
||||
{
|
||||
srcWin->detail.sourceInfo.horizontalOffset = 0;
|
||||
tui_update_source_window_as_is (srcWin, s, line, noerror);
|
||||
}
|
||||
|
||||
|
||||
/* Answer whether the source is currently displayed in the source window. */
|
||||
/* Answer whether the source is currently displayed in the source
|
||||
window. */
|
||||
int
|
||||
tuiSourceIsDisplayed (char *fname)
|
||||
tui_source_is_displayed (char *fname)
|
||||
{
|
||||
return (srcWin->generic.contentInUse &&
|
||||
(strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())->
|
||||
@ -319,8 +320,8 @@ tuiSourceIsDisplayed (char *fname)
|
||||
|
||||
/* Scroll the source forward or backward vertically. */
|
||||
void
|
||||
tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
|
||||
int numToScroll)
|
||||
tui_vertical_source_scroll (TuiScrollDirection scrollDirection,
|
||||
int numToScroll)
|
||||
{
|
||||
if (srcWin->generic.content != (OpaquePtr) NULL)
|
||||
{
|
||||
|
@ -1,5 +1,8 @@
|
||||
/* TUI display source 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,17 +22,19 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _TUI_SOURCE_H
|
||||
#define _TUI_SOURCE_H
|
||||
#ifndef TUI_SOURCE_H
|
||||
#define TUI_SOURCE_H
|
||||
|
||||
#include "tui/tui-data.h"
|
||||
|
||||
struct symtab;
|
||||
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);
|
||||
extern int tuiSourceIsDisplayed (char *);
|
||||
extern void tuiVerticalSourceScroll (TuiScrollDirection, int);
|
||||
extern enum tui_status tui_set_source_content (struct symtab *, int, int);
|
||||
extern void tui_show_symtab_source (struct symtab *, union tui_line_or_address, int);
|
||||
extern int tui_source_is_displayed (char *);
|
||||
extern void tui_vertical_source_scroll (enum tui_scroll_direction, int);
|
||||
|
||||
#endif
|
||||
/*_TUI_SOURCE_H*/
|
||||
|
@ -340,7 +340,7 @@ tui_show_frame_info (struct frame_info *fi)
|
||||
find_frame_sal (fi, &sal);
|
||||
|
||||
sourceAlreadyDisplayed = sal.symtab != 0
|
||||
&& tuiSourceIsDisplayed (sal.symtab->filename);
|
||||
&& tui_source_is_displayed (sal.symtab->filename);
|
||||
tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
|
||||
tui_get_function_from_frame (fi),
|
||||
sal.line,
|
||||
|
@ -459,7 +459,7 @@ tui_scroll_forward (TuiWinInfoPtr winToScroll, int numToScroll)
|
||||
** command window do nothing since the term should handle it.
|
||||
*/
|
||||
if (winToScroll == srcWin)
|
||||
tuiVerticalSourceScroll (FORWARD_SCROLL, _numToScroll);
|
||||
tui_vertical_source_scroll (FORWARD_SCROLL, _numToScroll);
|
||||
else if (winToScroll == disassemWin)
|
||||
tui_vertical_disassem_scroll (FORWARD_SCROLL, _numToScroll);
|
||||
else if (winToScroll == dataWin)
|
||||
@ -483,7 +483,7 @@ tui_scroll_backward (TuiWinInfoPtr winToScroll, int numToScroll)
|
||||
** command window do nothing since the term should handle it.
|
||||
*/
|
||||
if (winToScroll == srcWin)
|
||||
tuiVerticalSourceScroll (BACKWARD_SCROLL, _numToScroll);
|
||||
tui_vertical_source_scroll (BACKWARD_SCROLL, _numToScroll);
|
||||
else if (winToScroll == disassemWin)
|
||||
tui_vertical_disassem_scroll (BACKWARD_SCROLL, _numToScroll);
|
||||
else if (winToScroll == dataWin)
|
||||
|
@ -94,7 +94,7 @@ tui_update_source_window_as_is (TuiWinInfoPtr winInfo, struct symtab *s,
|
||||
TuiStatus ret;
|
||||
|
||||
if (winInfo->generic.type == SRC_WIN)
|
||||
ret = tuiSetSourceContent (s, lineOrAddr.lineNo, noerror);
|
||||
ret = tui_set_source_content (s, lineOrAddr.lineNo, noerror);
|
||||
else
|
||||
ret = tui_set_disassem_content (lineOrAddr.addr);
|
||||
|
||||
@ -153,7 +153,7 @@ tui_update_source_windows_with_addr (CORE_ADDR addr)
|
||||
default:
|
||||
sal = find_pc_line (addr, 0);
|
||||
l.lineNo = sal.line;
|
||||
tuiShowSource (sal.symtab, l, FALSE);
|
||||
tui_show_symtab_source (sal.symtab, l, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -190,7 +190,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
|
||||
break;
|
||||
default:
|
||||
l.lineNo = line;
|
||||
tuiShowSource (s, l, FALSE);
|
||||
tui_show_symtab_source (s, l, FALSE);
|
||||
if (currentLayout () == SRC_DISASSEM_COMMAND)
|
||||
{
|
||||
find_line_pc (s, line, &pc);
|
||||
|
Loading…
Reference in New Issue
Block a user