From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11829 invoked by alias); 28 Jun 2002 08:41:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11788 invoked from network); 28 Jun 2002 08:41:51 -0000 Received: from unknown (HELO harvester.transas.com) (193.125.200.2) by sources.redhat.com with SMTP; 28 Jun 2002 08:41:51 -0000 Received: from localhost (localhost [127.0.0.1]) by harvester.transas.com (Postfix) with SMTP id 9D5606B828; Fri, 28 Jun 2002 12:41:49 +0400 (MSD) Received: from clue.transas.com (clue.transas.com [10.0.0.42]) by harvester.transas.com (Postfix) with ESMTP id 671906B820; Fri, 28 Jun 2002 12:41:49 +0400 (MSD) Received: by clue.transas.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Jun 2002 12:41:49 +0400 Message-ID: <2E74F312D6980D459F3A05492BA40F8D0101CF84@clue.transas.com> From: Andrew Volkov To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: RE: [RFA/RFC] blockframe.c Fix errorneous addr check Date: Fri, 28 Jun 2002 01:41:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" X-SW-Source: 2002-06/txt/msg00565.txt.bz2 >On Jun 27, 10:58pm, Andrew Volkov wrote: > >> >> current_source_end_addr = start_addr + size; >> >> >> >> but must be: >> >> >> >> current_source_end_addr = start_addr + size + ; >> >> >> >> As I understand, since machine address size is not known at >> >time of parsing >> >> coff file, then we have big trouble :(. >> > >> >Could you explain why you need to add in the size of an address? >> >> It's not necessarily must be addr sizeof, it may be 1, but, I think, >> will be better, if current_source_end_addr will contain correct >> value for target. > >What I'd like to understand is why (start_addr + size) is insufficient. >I.e, why do we need to add 1 or some other small value to compute the >correct ending address? > >Kevin Because start_addr + size is last_addr in block, hence all gdb parts, wich assume that highpc is first addr after block, will work improperly. Ex. this check always failed: if (addr >= lowpc && addr < highpc) .... when addr = last_addr_in_block. While I bump with this problem when work with h8300 coff file. Andrey