[RFA] Add "long long" tests to whatis.exp

Michael Snyder msnyder@cygnus.com
Thu Sep 20 14:36:00 GMT 2001


 
2001-09-20  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/whatis.exp: Add tests for long long.

Index: whatis.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/whatis.c,v
retrieving revision 1.1.1.2
diff -c -3 -p -r1.1.1.2 whatis.c
*** whatis.c	1999/06/28 16:04:24	1.1.1.2
--- whatis.c	2001/09/20 21:34:04
*************** long		v_long;
*** 27,32 ****
--- 27,36 ----
  signed long	v_signed_long;
  unsigned long	v_unsigned_long;
  
+ long long		v_long_long;
+ signed long long	v_signed_long_long;
+ unsigned long long	v_unsigned_long_long;
+ 
  float		v_float;
  double		v_double;
  
*************** long		v_long_array[2];
*** 53,58 ****
--- 57,66 ----
  signed long	v_signed_long_array[2];
  unsigned long	v_unsigned_long_array[2];
  
+ long long		v_long_long_array[2];
+ signed long long	v_signed_long_long_array[2];
+ unsigned long long	v_unsigned_long_long_array[2];
+ 
  float		v_float_array[2];
  double		v_double_array[2];
  
*************** long		*v_long_pointer;
*** 82,87 ****
--- 90,99 ----
  signed long	*v_signed_long_pointer;
  unsigned long	*v_unsigned_long_pointer;
  
+ long long		*v_long_long_pointer;
+ signed long long	*v_signed_long_long_pointer;
+ unsigned long long	*v_unsigned_long_long_pointer;
+ 
  float		*v_float_pointer;
  double		*v_double_pointer;
  
*************** struct t_struct {
*** 92,97 ****
--- 104,110 ----
      short	v_short_member;
      int		v_int_member;
      long	v_long_member;
+     long long	v_long_long_member;
      float	v_float_member;
      double	v_double_member;
  } v_struct1;
*************** struct {
*** 101,106 ****
--- 114,120 ----
      short	v_short_member;
      int		v_int_member;
      long	v_long_member;
+     long long	v_long_long_member;
      float	v_float_member;
      double	v_double_member;
  } v_struct2;
*************** union t_union {
*** 112,117 ****
--- 126,132 ----
      short	v_short_member;
      int		v_int_member;
      long	v_long_member;
+     long long	v_long_long_member;
      float	v_float_member;
      double	v_double_member;
  } v_union;
*************** union {
*** 121,126 ****
--- 136,142 ----
      short	v_short_member;
      int		v_int_member;
      long	v_long_member;
+     long long	v_long_long_member;
      float	v_float_member;
      double	v_double_member;
  } v_union2;
*************** long		v_long_func () { return (0); }
*** 143,148 ****
--- 159,168 ----
  signed long	v_signed_long_func () { return (0); }
  unsigned long	v_unsigned_long_func () { return (0); }
  
+ long long		v_long_long_func () { return (0); }
+ signed long long	v_signed_long_long_func () { return (0); }
+ unsigned long long	v_unsigned_long_long_func () { return (0); }
+ 
  float		v_float_func () { return (0.0); }
  double		v_double_func () { return (0.0); }
  
*************** int main ()
*** 212,217 ****
--- 232,241 ----
    v_signed_long = 10;
    v_unsigned_long = 11;    
    
+   v_long_long = 12;
+   v_signed_long_long = 13;
+   v_unsigned_long_long = 14;    
+   
    v_float = 100.0;
    v_double = 200.0;
  
*************** int main ()
*** 232,237 ****
--- 256,265 ----
    v_signed_long_array[0] = v_signed_long;
    v_unsigned_long_array[0] = v_unsigned_long;
  
+   v_long_long_array[0] = v_long_long;
+   v_signed_long_long_array[0] = v_signed_long_long;
+   v_unsigned_long_long_array[0] = v_unsigned_long_long;
+ 
    v_float_array[0] = v_float;
    v_double_array[0] = v_double;
  
*************** int main ()
*** 250,255 ****
--- 278,287 ----
    v_long_pointer = &v_long;
    v_signed_long_pointer = &v_signed_long;
    v_unsigned_long_pointer = &v_unsigned_long;
+ 
+   v_long_long_pointer = &v_long_long;
+   v_signed_long_long_pointer = &v_signed_long_long;
+   v_unsigned_long_long_pointer = &v_unsigned_long_long;
  
    v_float_pointer = &v_float;
    v_double_pointer = &v_double;
Index: whatis.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/whatis.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 whatis.exp
*** whatis.exp	2001/03/06 08:21:51	1.2
--- whatis.exp	2001/09/20 21:34:04
*************** gdb_test "whatis v_unsigned_long" \
*** 138,143 ****
--- 138,155 ----
      "type = (unsigned long|long unsigned int)" \
      "whatis unsigned long"
  
+ gdb_test "whatis v_long_long" \
+     "type = (long long|long long int)" \
+     "whatis long long"
+ 
+ gdb_test "whatis v_signed_long_long" \
+     "type = (signed |)(long long|long long int)" \
+     "whatis signed long long"
+ 
+ gdb_test "whatis v_unsigned_long_long" \
+     "type = (unsigned long long|long long unsigned int)" \
+     "whatis unsigned long long"
+ 
  gdb_test "whatis v_float" \
      "type = float" \
      "whatis float"
*************** gdb_test "whatis v_unsigned_long_array" 
*** 202,207 ****
--- 214,231 ----
      "type = (unsigned (int|long|long int)|long unsigned int) \\\[2\\\]" \
      "whatis unsigned long array"
  
+ gdb_test "whatis v_long_long_array" \
+     "type = (long long|long long int) \\\[2\\\]" \
+     "whatis long long array"
+ 
+ gdb_test "whatis v_signed_long_long_array" \
+     "type = (signed |)(long long|long long int) \\\[2\\\]" \
+     "whatis signed long long array"
+ 
+ gdb_test "whatis v_unsigned_long_long_array" \
+     "type = (unsigned (long long|long long int)|long long unsigned int) \\\[2\\\]" \
+     "whatis unsigned long long array"
+ 
  gdb_test "whatis v_float_array" \
      "type = float \\\[2\\\]" \
      "whatis float array"
*************** gdb_test "whatis v_unsigned_long_pointer
*** 265,270 ****
--- 289,306 ----
      "type = (unsigned (int|long|long int)|long unsigned int) \\*" \
      "whatis unsigned long pointer"
  
+ gdb_test "whatis v_long_long_pointer" \
+     "type = (long long|long long int) \\*" \
+     "whatis long long pointer"
+ 
+ gdb_test "whatis v_signed_long_long_pointer" \
+     "type = (signed |)(long long|long long int) \\*" \
+     "whatis signed long long pointer"
+ 
+ gdb_test "whatis v_unsigned_long_long_pointer" \
+     "type = (unsigned (long long|long long int)|long long unsigned int) \\*" \
+     "whatis unsigned long long pointer"
+ 
  gdb_test "whatis v_float_pointer" \
      "type = float \\*" \
      "whatis float pointer"
*************** gdb_test "whatis v_signed_long_func" \
*** 360,365 ****
--- 396,413 ----
  gdb_test "whatis v_unsigned_long_func" \
      "type = (unsigned (int|long|long int)|long unsigned int) \\($void\\)" \
      "whatis unsigned long function"
+ 
+ gdb_test "whatis v_long_long_func" \
+     "type = (long long|long long int) \\($void\\)" \
+     "whatis long long function"
+ 
+ gdb_test "whatis v_signed_long_long_func" \
+     "type = (signed |)(long long|long long int) \\($void\\)" \
+     "whatis signed long long function"
+ 
+ gdb_test "whatis v_unsigned_long_long_func" \
+     "type = (unsigned (long long|long long int)|long long unsigned int) \\($void\\)" \
+     "whatis unsigned long long function"
  
  # Sun /bin/cc calls this a function returning double.
  if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"}


More information about the Gdb-patches mailing list