Patch for PR 10728
Tom Tromey
tromey@redhat.com
Thu Jan 28 18:09:00 GMT 2010
>>>>> "Chris" == Chris Moller <cmoller@redhat.com> writes:
Chris> The attached stuff is a patch for PR 10728:
Chris> http://sourceware.org/bugzilla/show_bug.cgi?id=10728 "infinite loop
Chris> evaluating pointer difference w/o complete debug info"
Thanks.
Chris> The bug was in valarith.c : value_ptrdiff--if the type structs showed
Chris> size == 0, things came unstuck. This patch fixes that by issuing a
Chris> warning and assuming size = 1.
This seems reasonable enough to me. Maybe other maintainers would
prefer an error? I think there are precedents either way.
Chris> Index: gdb/testsuite/gdb.cp/pr10728.exp
Chris> + untested psmang.exp
Wrong name here, this occurs a few times.
Chris> +send_gdb "print x->y2 - x->y1\n"
Chris> +
Chris> +gdb_expect {
I think we are trying to avoid send_gdb+gdb_expect, as much as possible.
This test can comfortably be written using gdb_test, so do that.
Tom
More information about the Gdb-patches
mailing list