Hi, I am working on extending gdb's printing capabilities and I have noticed that sometimes the "valaddr" (+embedded_offset) and "address" arguments to val_print get out of sync.
To me it looks like common_val_print should add value_offset(val) to the result of VALUE_ADDRESS, but I could be wrong. The call in question is the second call print_pair below. The value type in question is std::pair<int,std::string> in case it matters. value_offset is 20 for me; value_embedded_offset is (from memory) zero. I have been working with gdb 6.5 (on i386), but common_val_print appears unchanged in 6.6. Morten static void print_pair (struct ui_file *stream, struct value *v, int format, int deref_ref, int recurse, enum val_prettyprint pretty) { fputs_filtered ("<", stream); common_val_print (value_struct_elt (&v, NULL, "first", NULL, NULL), stream, format, deref_ref, recurse, pretty); fputs_filtered (",", stream); common_val_print (value_struct_elt (&v, NULL, "second", NULL, NULL), stream, format, deref_ref, recurse, pretty); fputs_filtered (">", stream); } _______________________________________________ bug-gdb mailing list bug-gdb@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gdb