diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2001-07-16 22:13:38 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2001-07-16 22:13:38 +0000 |
commit | cf33e43b0548709f727d8c376edf7288d87a9682 (patch) | |
tree | 6fb04ffb4310ae01b9092bfaeb1de48a3c653f0f /gdb/tui | |
parent | 774a290f7a1904c836fdf4f661ce8cdfe4c4b1b9 (diff) | |
download | gdb-cf33e43b0548709f727d8c376edf7288d87a9682.tar.gz |
* tuiStack.c: Add missing includes.
(tuiShowFrameInfo): Don't crash when there is no symbol table
associated with the pc.
* tuiSource.c (_hasBreak): Check for null source file.
* tuiWin.c (tuiRefreshAll): Check for null winList[type].
(_tuiSetFocus): Check for null dataWin.
* tuiGeneralWin.c (refreshAll): Check for null list[type].
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/tui/tuiGeneralWin.c | 2 | ||||
-rw-r--r-- | gdb/tui/tuiSource.c | 5 | ||||
-rw-r--r-- | gdb/tui/tuiStack.c | 6 | ||||
-rw-r--r-- | gdb/tui/tuiWin.c | 4 |
5 files changed, 22 insertions, 5 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 7a974b71330..4d66f34fa32 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,5 +1,15 @@ 2001-07-16 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * tuiStack.c: Add missing includes. + (tuiShowFrameInfo): Don't crash when there is no symbol table + associated with the pc. + * tuiSource.c (_hasBreak): Check for null source file. + * tuiWin.c (tuiRefreshAll): Check for null winList[type]. + (_tuiSetFocus): Check for null dataWin. + * tuiGeneralWin.c (refreshAll): Check for null list[type]. + +2001-07-16 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info to disassemble in the curses window. diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c index 0fe352976c7..6535f9117e3 100644 --- a/gdb/tui/tuiGeneralWin.c +++ b/gdb/tui/tuiGeneralWin.c @@ -370,7 +370,7 @@ refreshAll (TuiWinInfoPtr * list) for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++) { - if (list[type]->generic.isVisible) + if (list[type] && list[type]->generic.isVisible) { if (type == SRC_WIN || type == DISASSEM_WIN) { diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c index 4a39e0a2960..2f52fc5608f 100644 --- a/gdb/tui/tuiSource.c +++ b/gdb/tui/tuiSource.c @@ -417,8 +417,9 @@ _hasBreak (char *sourceFileName, int lineNo) (bp != (struct breakpoint *) NULL && bpWithBreak == (struct breakpoint *) NULL); bp = bp->next) - if ((strcmp (sourceFileName, bp->source_file) == 0) && - (lineNo == bp->line_number)) + if (bp->source_file + && (strcmp (sourceFileName, bp->source_file) == 0) + && (lineNo == bp->line_number)) bpWithBreak = bp; return bpWithBreak; diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c index 47a0cd05711..edff5cb988a 100644 --- a/gdb/tui/tuiStack.c +++ b/gdb/tui/tuiStack.c @@ -23,10 +23,13 @@ #include "symtab.h" #include "breakpoint.h" #include "frame.h" +#include "command.h" #include "tui.h" #include "tuiData.h" #include "tuiStack.h" +#include "tuiGeneralWin.h" +#include "tuiSource.h" #include "tuiSourceWin.h" @@ -330,6 +333,9 @@ tuiShowFrameInfo (struct frame_info *fi) s = find_pc_symtab (fi->pc); + if (s == 0) + return; + sourceAlreadyDisplayed = tuiSourceIsDisplayed (s->filename); tuiUpdateLocatorDisplay (fi); for (i = 0; i < (sourceWindows ())->count; i++) diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c index 333a8a6d05e..925e1f4fa71 100644 --- a/gdb/tui/tuiWin.c +++ b/gdb/tui/tuiWin.c @@ -350,7 +350,7 @@ tuiRefreshAll (void) refreshAll (winList); for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++) { - if (winList[type]->generic.isVisible) + if (winList[type] && winList[type]->generic.isVisible) { switch (type) { @@ -680,7 +680,7 @@ The window name specified must be valid and visible.\n"); keypad (cmdWin->generic.handle, (winInfo != cmdWin)); } - if (dataWin->generic.isVisible) + if (dataWin && dataWin->generic.isVisible) tuiRefreshDataWin (); tuiFree (bufPtr); printf_filtered ("Focus set to %s window.\n", |