This is the mail archive of the 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: [RFA-v3] Allow explicit 16 or 32 char in 'x /s'

Pierre Muller wrote:

> 2010-04-08  Pierre Muller  <>
> 	* gdb.base/charset.c (Strin16, String32): New variables.
> 	* gdb.base/charset.exp (gdb_test): Test correct display
> 	of 16 or 32 bit strings.

> +proc string_display { var_name set_prefix x_size x_type} {
> +  gdb_test "set ${var_name} = ${set_prefix}\"Test String\\0with zeroes\""

This test required that malloc is present in the inferior; if target
code is statically linked, we need to make sure the routine gets
pulled in (just like other testcases already do).

Tested on spu-elf, committed to mainline.



	* gdb.base/charset.c (main): Make sure malloc gets linked in.

Index: gdb/testsuite/gdb.base/charset.c
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/charset.c,v
retrieving revision 1.13
diff -u -p -r1.13 charset.c
--- gdb/testsuite/gdb.base/charset.c	21 Apr 2010 23:21:04 -0000	1.13
+++ gdb/testsuite/gdb.base/charset.c	11 Jun 2010 16:43:07 -0000
@@ -120,6 +120,11 @@ int main ()
+  /* charset.exp wants to allocate memory for constants.  So make sure malloc
+     gets linked into the program.  */
+  malloc (1);
   /* Initialize ascii_string.  */
   init_string (ascii_string,

  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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