From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: "Insight (GDB GUI)" Subject: Minor memory display cleanups Date: Thu, 18 Nov 1999 02:46:00 -0000 Message-id: <3833D8F3.D3BDB236@cygnus.com> X-SW-Source: 1999-q4/msg00057.html 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 * 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);