This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch for PR 10728
- From: Tom Tromey <tromey at redhat dot com>
- To: Chris Moller <cmoller at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Jan 2010 11:09:44 -0700
- Subject: Re: Patch for PR 10728
- References: <4B6096D9.1060606@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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