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]

[RFC] An initial patch for PR/1961


Hello all,

I did some initial analysis against PR/1961 (Pls add a test for command 
input of "-(" ).  I found this SEGV error will also pop when issuing "+)", 
"<)", ">(" and so on under gdbtui. 

My intial patch is attached as follows.  Please review.  Thanks.

2005-06-20  Wu Zhou  <woodzltc@cn.ibm.com>

	* tui/tui-win.c (parse_scrolling_args): Fix SEGV error with invalid
	scroll command.

Index: tui/tui-win.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
retrieving revision 1.25
diff -c -p -r1.25 tui-win.c
*** tui/tui-win.c	24 Feb 2005 13:51:36 -0000	1.25
--- tui/tui-win.c	20 Jun 2005 01:43:59 -0000
*************** parse_scrolling_args (char *arg, struct 
*** 1543,1549 ****
  
  	  if (*win_to_scroll == (struct tui_win_info *) NULL ||
  	      !(*win_to_scroll)->generic.is_visible)
! 	    warning (_("Invalid window specified. \n\
  The window name specified must be valid and visible.\n"));
  	  else if (*win_to_scroll == TUI_CMD_WIN)
  	    *win_to_scroll = (struct tui_win_info *) (tui_source_windows ())->list[0];
--- 1543,1549 ----
  
  	  if (*win_to_scroll == (struct tui_win_info *) NULL ||
  	      !(*win_to_scroll)->generic.is_visible)
! 	    error (_("Invalid window specified. \n\
  The window name specified must be valid and visible.\n"));
  	  else if (*win_to_scroll == TUI_CMD_WIN)
  	    *win_to_scroll = (struct tui_win_info *) (tui_source_windows ())->list[0];


Cheers
- Wu Zhou


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