* 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].
This commit is contained in:
parent
a8080b7fbf
commit
75fd9bc1ec
5 changed files with 22 additions and 5 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
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>
|
2001-07-16 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||||
|
|
||||||
* tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
|
* tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
|
||||||
|
|
|
@ -370,7 +370,7 @@ refreshAll (TuiWinInfoPtr * list)
|
||||||
|
|
||||||
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
|
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)
|
if (type == SRC_WIN || type == DISASSEM_WIN)
|
||||||
{
|
{
|
||||||
|
|
|
@ -417,8 +417,9 @@ _hasBreak (char *sourceFileName, int lineNo)
|
||||||
(bp != (struct breakpoint *) NULL &&
|
(bp != (struct breakpoint *) NULL &&
|
||||||
bpWithBreak == (struct breakpoint *) NULL);
|
bpWithBreak == (struct breakpoint *) NULL);
|
||||||
bp = bp->next)
|
bp = bp->next)
|
||||||
if ((strcmp (sourceFileName, bp->source_file) == 0) &&
|
if (bp->source_file
|
||||||
(lineNo == bp->line_number))
|
&& (strcmp (sourceFileName, bp->source_file) == 0)
|
||||||
|
&& (lineNo == bp->line_number))
|
||||||
bpWithBreak = bp;
|
bpWithBreak = bp;
|
||||||
|
|
||||||
return bpWithBreak;
|
return bpWithBreak;
|
||||||
|
|
|
@ -23,10 +23,13 @@
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "breakpoint.h"
|
#include "breakpoint.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
#include "command.h"
|
||||||
|
|
||||||
#include "tui.h"
|
#include "tui.h"
|
||||||
#include "tuiData.h"
|
#include "tuiData.h"
|
||||||
#include "tuiStack.h"
|
#include "tuiStack.h"
|
||||||
|
#include "tuiGeneralWin.h"
|
||||||
|
#include "tuiSource.h"
|
||||||
#include "tuiSourceWin.h"
|
#include "tuiSourceWin.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,6 +333,9 @@ tuiShowFrameInfo (struct frame_info *fi)
|
||||||
|
|
||||||
|
|
||||||
s = find_pc_symtab (fi->pc);
|
s = find_pc_symtab (fi->pc);
|
||||||
|
if (s == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
sourceAlreadyDisplayed = tuiSourceIsDisplayed (s->filename);
|
sourceAlreadyDisplayed = tuiSourceIsDisplayed (s->filename);
|
||||||
tuiUpdateLocatorDisplay (fi);
|
tuiUpdateLocatorDisplay (fi);
|
||||||
for (i = 0; i < (sourceWindows ())->count; i++)
|
for (i = 0; i < (sourceWindows ())->count; i++)
|
||||||
|
|
|
@ -350,7 +350,7 @@ tuiRefreshAll (void)
|
||||||
refreshAll (winList);
|
refreshAll (winList);
|
||||||
for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++)
|
for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++)
|
||||||
{
|
{
|
||||||
if (winList[type]->generic.isVisible)
|
if (winList[type] && winList[type]->generic.isVisible)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -680,7 +680,7 @@ The window name specified must be valid and visible.\n");
|
||||||
keypad (cmdWin->generic.handle, (winInfo != cmdWin));
|
keypad (cmdWin->generic.handle, (winInfo != cmdWin));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataWin->generic.isVisible)
|
if (dataWin && dataWin->generic.isVisible)
|
||||||
tuiRefreshDataWin ();
|
tuiRefreshDataWin ();
|
||||||
tuiFree (bufPtr);
|
tuiFree (bufPtr);
|
||||||
printf_filtered ("Focus set to %s window.\n",
|
printf_filtered ("Focus set to %s window.\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue