+2010-07-13 Emmanuel Thomé <Emmanuel.Thome@gmail.com>
+
+ * c-valprint.c (c_val_print): Add embedded_offset to address in
+ call to val_print_array_elements.
+
2010-07-13 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
{
i = 0;
}
- val_print_array_elements (type, valaddr + embedded_offset, address, stream,
+ val_print_array_elements (type, valaddr + embedded_offset,
+ address + embedded_offset, stream,
recurse, original_value, options, i);
fprintf_filtered (stream, "}");
}
+2010-07-13 Tom Tromey <tromey@redhat.com>
+
+ * gdb.python/py-prettyprint.c (struct arraystruct): New struct.
+ (main): Use it.
+ * gdb.python/py-prettyprint.exp (run_lang_tests): Add test.
+
2010-07-13 Tom Tromey <tromey@redhat.com>
* gdb.base/label.exp: New file.
struct s b;
};
+struct arraystruct
+{
+ int y;
+ struct s x[2];
+};
+
struct ns {
const char *null_str;
int length;
{
struct ss ss;
struct ss ssa[2];
+ struct arraystruct arraystruct;
string x = make_string ("this is x");
zzz_type c = make_container ("container");
zzz_type c2 = make_container ("container2");
init_ss(ssa+1, 5, 6);
memset (&nullstr, 0, sizeof nullstr);
+ arraystruct.y = 7;
+ init_s (&arraystruct.x[0], 23);
+ init_s (&arraystruct.x[1], 24);
+
struct ns ns;
ns.null_str = "embedded\0null\0string";
ns.length = 20;
gdb_test "print ssa\[1\]" " = a=< a=<5> b=<$hex>> b=< a=<6> b=<$hex>>"
gdb_test "print ssa" " = {a=< a=<3> b=<$hex>> b=< a=<4> b=<$hex>>, a=< a=<5> b=<$hex>> b=< a=<6> b=<$hex>>}"
+ gdb_test "print arraystruct" " = {$nl *y = 7, *$nl *x = { a=<23> b=<$hex>, a=<24> b=<$hex>} *$nl *}"
+
if {$lang == "c++"} {
gdb_test "print cps" "= a=<8> b=<$hex>"
gdb_test "print cpss" " = {$nl *zss = 9, *$nl *s = a=<10> b=<$hex>$nl}"