This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


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

Minor memory display cleanups


Hello,

The attatched fixes some minor problems with the memory display window -
corrects the comment and a test.

	Andrew
Thu Nov 18 19:03:28 1999  Andrew Cagney  <cagney@b1.cygnus.com>

	* gdbtk-cmds.c (gdb_get_mem): Document nbr parameter.  Fix check
 	on nbr and nbytes parameters.

Index: gdbtk-cmds.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-cmds.c,v
retrieving revision 2.63
diff -p -r2.63 gdbtk-cmds.c
*** gdbtk-cmds.c	1999/11/10 00:03:04	2.63
--- gdbtk-cmds.c	1999/11/18 10:41:24
*************** gdb_loc (clientData, interp, objc, objv)
*** 3173,3189 ****
  /* This implements the Tcl command 'gdb_get_mem', which 
   * dumps a block of memory 
   * Arguments:
!  *   gdb_get_mem addr form size num aschar
   *
   *   addr: address of data to dump
   *   form: a char indicating format
   *   size: size of each element; 1,2,4, or 8 bytes
!  *   num: the number of bytes to read 
!  *   acshar: an optional ascii character to use in ASCII dump
   * 
   * Return:
!  * a list of elements followed by an optional ASCII dump 
!  */
  
  static int
  gdb_get_mem (clientData, interp, objc, objv)
--- 3173,3190 ----
  /* This implements the Tcl command 'gdb_get_mem', which 
   * dumps a block of memory 
   * Arguments:
!  *   gdb_get_mem addr form size nbytes bpr aschar
   *
   *   addr: address of data to dump
   *   form: a char indicating format
   *   size: size of each element; 1,2,4, or 8 bytes
!  *   nbytes: the number of bytes to read 
!  *   bpr: bytes per row
!  *   aschar: if present, an ASCII dump of the row is included.  ASCHAR
!  *   used for unprintable characters.
   * 
   * Return:
!  * a list of elements followed by an optional ASCII dump */
  
  static int
  gdb_get_mem (clientData, interp, objc, objv)
*************** gdb_get_mem (clientData, interp, objc, o
*** 3223,3229 ****
        result_ptr->flags |= GDBTK_IN_TCL_RESULT;
        return TCL_ERROR;
      }
!   else if (size <= 0)
      {
        Tcl_SetStringObj (result_ptr->obj_ptr,
  			"Invalid number of bytes, must be > 0",
--- 3224,3230 ----
        result_ptr->flags |= GDBTK_IN_TCL_RESULT;
        return TCL_ERROR;
      }
!   else if (nbytes <= 0)
      {
        Tcl_SetStringObj (result_ptr->obj_ptr,
  			"Invalid number of bytes, must be > 0",
*************** gdb_get_mem (clientData, interp, objc, o
*** 3236,3242 ****
        result_ptr->flags |= GDBTK_IN_TCL_RESULT;
        return TCL_ERROR;
      }
!   else if (size <= 0)
      {
        Tcl_SetStringObj (result_ptr->obj_ptr,
  			"Invalid bytes per row, must be > 0", -1);
--- 3237,3243 ----
        result_ptr->flags |= GDBTK_IN_TCL_RESULT;
        return TCL_ERROR;
      }
!   else if (bpr <= 0)
      {
        Tcl_SetStringObj (result_ptr->obj_ptr,
  			"Invalid bytes per row, must be > 0", -1);

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