From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31646 invoked by alias); 28 Jan 2010 18:09:55 -0000 Received: (qmail 31636 invoked by uid 22791); 28 Jan 2010 18:09:54 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jan 2010 18:09:49 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0SI9mBV019786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Jan 2010 13:09:48 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0SI9lsr023045; Thu, 28 Jan 2010 13:09:47 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o0SI9kLk019412; Thu, 28 Jan 2010 13:09:47 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 51409379970; Thu, 28 Jan 2010 11:09:46 -0700 (MST) From: Tom Tromey To: Chris Moller Cc: gdb-patches@sourceware.org Subject: Re: Patch for PR 10728 References: <4B6096D9.1060606@redhat.com> Reply-To: tromey@redhat.com Date: Thu, 28 Jan 2010 18:09:00 -0000 In-Reply-To: <4B6096D9.1060606@redhat.com> (Chris Moller's message of "Wed, 27 Jan 2010 14:41:13 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00608.txt.bz2 >>>>> "Chris" == Chris Moller 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