From e9ae5755d3e70272c36bf5a1fefcdb3010035925 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sat, 24 Aug 2002 10:15:54 +0000 Subject: [PATCH] * tuiSourceWin.c (tuiSrcWinIsDisplayed): Remove. (tuiAsmWinIsDisplayed): Remove. (tuiShowAllSourceWinsContent): Remove. (tuiUpdateOnEnd): Remove. * tuiGeneralWin.c (scrollWinForward): Remove. (scrollWinBackward): Remove. (_winResize): Don't declare. * tui.h (tuiUpdateOnEnd): Don't declare. (vcatch_errors, va_catch_errors): Likewise. * tuiSourceWin.h (tuiUpdateOnEnd): Likewise. (tuiShowAllSourceWinsContent): Likewise. * tuiGeneralWin.h (scrollWinForward): Likewise. (scrollWinBackward): Likewise. --- gdb/tui/ChangeLog | 16 ++++++ gdb/tui/tui.h | 4 -- gdb/tui/tuiGeneralWin.c | 90 -------------------------------- gdb/tui/tuiGeneralWin.h | 2 - gdb/tui/tuiSourceWin.c | 134 ------------------------------------------------ gdb/tui/tuiSourceWin.h | 3 -- 6 files changed, 16 insertions(+), 233 deletions(-) diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 0891030..1a2c668 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,5 +1,21 @@ 2002-08-24 Stephane Carrez + * tuiSourceWin.c (tuiSrcWinIsDisplayed): Remove. + (tuiAsmWinIsDisplayed): Remove. + (tuiShowAllSourceWinsContent): Remove. + (tuiUpdateOnEnd): Remove. + * tuiGeneralWin.c (scrollWinForward): Remove. + (scrollWinBackward): Remove. + (_winResize): Don't declare. + * tui.h (tuiUpdateOnEnd): Don't declare. + (vcatch_errors, va_catch_errors): Likewise. + * tuiSourceWin.h (tuiUpdateOnEnd): Likewise. + (tuiShowAllSourceWinsContent): Likewise. + * tuiGeneralWin.h (scrollWinForward): Likewise. + (scrollWinBackward): Likewise. + +2002-08-24 Stephane Carrez + * tuiRegs.c (_tuiRegisterFormat): Use gdbarch_print_registers_info. 2002-08-18 Daniel Jacobowitz diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index fcea91a..d250208 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -48,9 +48,6 @@ Opaque (*OpaqueFuncPtr) (va_list); */ typedef OpaqueFuncPtr TuiOpaqueFuncPtr; -extern Opaque vcatch_errors (OpaqueFuncPtr, ...); -extern Opaque va_catch_errors (OpaqueFuncPtr, va_list); - extern void strcat_to_buf (char *, int, char *); extern void strcat_to_buf_with_fmt (char *, int, char *, ...); @@ -131,7 +128,6 @@ extern TuiStatus tui_set_layout (const char *); /* tuiSourceWin.c */ extern void tuiDisplayMainFunction (void); extern void tuiUpdateAllExecInfos (void); -extern void tuiUpdateOnEnd (void); extern void tui_vAllSetHasBreakAt (va_list); extern void tui_vUpdateSourceWindowsWithAddr (va_list); diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c index b3f8b91..7b60068 100644 --- a/gdb/tui/tuiGeneralWin.c +++ b/gdb/tui/tuiGeneralWin.c @@ -45,12 +45,6 @@ #include "tuiGeneralWin.h" #include "tuiWin.h" -/* - ** local support functions - */ -static void _winResize (void); - - /*********************** ** PUBLIC FUNCTIONS ***********************/ @@ -297,90 +291,6 @@ makeAllVisible (int visible) return; } /* makeAllVisible */ - -/* - ** scrollWinForward - */ -void -scrollWinForward (TuiGenWinInfoPtr winInfo, int numLines) -{ - if (winInfo->content != (OpaquePtr) NULL && - winInfo->lastVisibleLine < winInfo->contentSize - 1) - { - int i, firstLine, newLastLine; - - firstLine = winInfo->lastVisibleLine - winInfo->viewportHeight + 1; - if (winInfo->lastVisibleLine + numLines > winInfo->contentSize) - newLastLine = winInfo->contentSize - 1; - else - newLastLine = winInfo->lastVisibleLine + numLines - 1; - - for (i = (newLastLine - winInfo->viewportHeight); - (i <= newLastLine); i++) - { - TuiWinElementPtr line; - int lineHeight; - - line = (TuiWinElementPtr) winInfo->content[i]; - if (line->highlight) - wstandout (winInfo->handle); - mvwaddstr (winInfo->handle, - i - (newLastLine - winInfo->viewportHeight), - 1, - displayableWinContentOf (winInfo, line)); - if (line->highlight) - wstandend (winInfo->handle); - lineHeight = winElementHeight (winInfo, line); - newLastLine += (lineHeight - 1); - } - winInfo->lastVisibleLine = newLastLine; - } - - return; -} /* scrollWinForward */ - - -/* - ** scrollWinBackward - */ -void -scrollWinBackward (TuiGenWinInfoPtr winInfo, int numLines) -{ - if (winInfo->content != (OpaquePtr) NULL && - (winInfo->lastVisibleLine - winInfo->viewportHeight) > 0) - { - int i, newLastLine, firstLine; - - firstLine = winInfo->lastVisibleLine - winInfo->viewportHeight + 1; - if ((firstLine - numLines) < 0) - newLastLine = winInfo->viewportHeight - 1; - else - newLastLine = winInfo->lastVisibleLine - numLines + 1; - - for (i = newLastLine - winInfo->viewportHeight; (i <= newLastLine); i++) - { - TuiWinElementPtr line; - int lineHeight; - - line = (TuiWinElementPtr) winInfo->content[i]; - if (line->highlight) - wstandout (winInfo->handle); - mvwaddstr (winInfo->handle, - i - (newLastLine - winInfo->viewportHeight), - 1, - displayableWinContentOf (winInfo, line)); - if (line->highlight) - wstandend (winInfo->handle); - lineHeight = winElementHeight (winInfo, line); - newLastLine += (lineHeight - 1); - } - winInfo->lastVisibleLine = newLastLine; - } - - return; -} /* scrollWinBackward */ - - /* ** refreshAll(). ** Function to refresh all the windows currently displayed diff --git a/gdb/tui/tuiGeneralWin.h b/gdb/tui/tuiGeneralWin.h index 60c54f1..2016199 100644 --- a/gdb/tui/tuiGeneralWin.h +++ b/gdb/tui/tuiGeneralWin.h @@ -29,8 +29,6 @@ extern void tuiClearWin (TuiGenWinInfoPtr); extern void unhighlightWin (TuiWinInfoPtr); extern void makeVisible (TuiGenWinInfoPtr, int); extern void makeAllVisible (int); -extern void scrollWinForward (TuiGenWinInfoPtr, int); -extern void scrollWinBackward (TuiGenWinInfoPtr, int); extern void makeWindow (TuiGenWinInfoPtr, int); extern TuiWinInfoPtr copyWin (TuiWinInfoPtr); extern void boxWin (TuiGenWinInfoPtr, int); diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c index 7563c94..5f19ba6 100644 --- a/gdb/tui/tuiSourceWin.c +++ b/gdb/tui/tuiSourceWin.c @@ -66,44 +66,6 @@ extern int current_source_line; extern struct symtab *current_source_symtab; - -/***************************************** -** STATIC LOCAL FUNCTIONS FORWARD DECLS ** -******************************************/ - -/***************************************** -** STATIC LOCAL DATA ** -******************************************/ - - -/***************************************** -** PUBLIC FUNCTIONS ** -******************************************/ - -/********************************* -** SOURCE/DISASSEM FUNCTIONS ** -*********************************/ - -/* - ** tuiSrcWinIsDisplayed(). - */ -int -tuiSrcWinIsDisplayed (void) -{ - return (m_winPtrNotNull (srcWin) && srcWin->generic.isVisible); -} /* tuiSrcWinIsDisplayed */ - - -/* - ** tuiAsmWinIsDisplayed(). - */ -int -tuiAsmWinIsDisplayed (void) -{ - return (m_winPtrNotNull (disassemWin) && disassemWin->generic.isVisible); -} /* tuiAsmWinIsDisplayed */ - - /* ** tuiDisplayMainFunction(). ** Function to display the "main" routine" @@ -402,21 +364,6 @@ tuiShowSourceContent (TuiWinInfoPtr winInfo) /* - ** tuiShowAllSourceWinsContent() - */ -void -tuiShowAllSourceWinsContent (void) -{ - int i; - - for (i = 0; i < (sourceWindows ())->count; i++) - tuiShowSourceContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]); - - return; -} /* tuiShowAllSourceWinsContent */ - - -/* ** tuiHorizontalSourceScroll(). ** Scroll the source forward or backward horizontally */ @@ -686,22 +633,6 @@ tuiEraseExecInfoContent (TuiWinInfoPtr winInfo) return; } /* tuiEraseExecInfoContent */ - -/* - ** tuiEraseAllExecInfosContent() - */ -void -tuiEraseAllExecInfosContent (void) -{ - int i; - - for (i = 0; i < (sourceWindows ())->count; i++) - tuiEraseExecInfoContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]); - - return; -} /* tuiEraseAllExecInfosContent */ - - /* ** tuiClearExecInfoContent(). */ @@ -714,22 +645,6 @@ tuiClearExecInfoContent (TuiWinInfoPtr winInfo) return; } /* tuiClearExecInfoContent */ - -/* - ** tuiClearAllExecInfosContent() - */ -void -tuiClearAllExecInfosContent (void) -{ - int i; - - for (i = 0; i < (sourceWindows ())->count; i++) - tuiClearExecInfoContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]); - - return; -} /* tuiClearAllExecInfosContent */ - - /* ** tuiUpdateExecInfo(). ** Function to update the execution info window @@ -756,55 +671,6 @@ tuiUpdateAllExecInfos (void) return; } /* tuiUpdateAllExecInfos */ - - -/* tuiUpdateOnEnd() - ** elz: This function clears the execution info from the source windows - ** and resets the locator to display no line info, procedure info, pc - ** info. It is called by stack_publish_stopped_with_no_frame, which - ** is called then the target terminates execution - */ -void -tuiUpdateOnEnd (void) -{ - int i; - TuiGenWinInfoPtr locator; - char *filename; - TuiWinInfoPtr winInfo; - - locator = locatorWinInfoPtr (); - - /* for all the windows (src, asm) */ - for (i = 0; i < (sourceWindows ())->count; i++) - { - TuiLineOrAddress l; - - winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i]; - - l.addr = -1; - l.lineNo = -1; - tuiSetIsExecPointAt (l, winInfo); /* the target is'n running */ - /* -1 should not match any line number or pc */ - tuiSetExecInfoContent (winInfo); /*set winInfo so that > is'n displayed */ - tuiShowExecInfoContent (winInfo); /* display the new contents */ - } - - /*now update the locator */ - tuiClearLocatorDisplay (); - tuiGetLocatorFilename (locator, &filename); - tuiSetLocatorInfo ( - filename, - (char *) NULL, - 0, - (CORE_ADDR) 0, - &((TuiWinElementPtr) locator->content[0])->whichElement.locator); - tuiShowLocatorContent (); - - return; -} /* tuiUpdateOnEnd */ - - - TuiStatus tuiAllocSourceBuffer (TuiWinInfoPtr winInfo) { diff --git a/gdb/tui/tuiSourceWin.h b/gdb/tui/tuiSourceWin.h index ced01f7..391077b 100644 --- a/gdb/tui/tuiSourceWin.h +++ b/gdb/tui/tuiSourceWin.h @@ -36,11 +36,8 @@ extern void tuiEraseSourceContent (TuiWinInfoPtr, int); extern void tuiEraseAllSourceWinsContent (int); extern void tuiSetSourceContentNil (TuiWinInfoPtr, char *); extern void tuiShowSourceContent (TuiWinInfoPtr); -extern void tuiShowAllSourceWinsContent (void); extern void tuiHorizontalSourceScroll (TuiWinInfoPtr, TuiScrollDirection, int); -extern void tuiUpdateOnEnd (void); - extern TuiStatus tuiSetExecInfoContent (TuiWinInfoPtr); extern void tuiShowExecInfoContent (TuiWinInfoPtr); extern void tuiShowAllExecInfosContent (void); -- 2.7.4