This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TUI build failure and SEG fault


Thanks. I'll follow this up once some other TUI cleanups have gone through.

I've now also checked this in. Thanks!


Andrew


Subject:
TUI build failure and SEG fault
From:
"Joshua Neuheisel" <jneuheisel@msn.com>
Date:
Wed, 24 Dec 2003 09:43:40 -0500
To:
<gdb-patches@sources.redhat.com>

First time patch to gdb...
This simple patch fixes PR 1460 (gdb fails to build with --enable-tui) as
well as a NULL pointer dereference (type 'display' in TUI mode).
Joshua

2004-02-16  Andrew Cagney  <cagney@redhat.com>

	* printcmd.c (display_command): Check that EXP isn't NULL.  Fix
	suggested by Joshua Neuheisel

Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.73
diff -u -r1.73 printcmd.c
--- printcmd.c	10 Feb 2004 19:08:13 -0000	1.73
+++ printcmd.c	16 Feb 2004 19:37:34 -0000
@@ -1364,7 +1364,7 @@
 #if defined(TUI)
   /* NOTE: cagney/2003-02-13 The `tui_active' was previously
      `tui_version'.  */
-  if (tui_active && *exp == '$')
+  if (tui_active && exp != NULL && *exp == '$')
     display_it = (tui_set_layout_for_display_command (exp) == TUI_FAILURE);
 #endif
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]