From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26859 invoked by alias); 25 Jul 2002 23:30:23 -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 26846 invoked from network); 25 Jul 2002 23:30:21 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 25 Jul 2002 23:30:21 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C7D3D3EB7; Thu, 25 Jul 2002 19:30:20 -0400 (EDT) Message-ID: <3D408A0C.90605@ges.redhat.com> Date: Thu, 25 Jul 2002 16:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Howard Cc: gdb-patches@sources.redhat.com Subject: Re: Another memattr tweak References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00522.txt.bz2 > The following patch allows gdb to display upper bounds of memory regions > correctly when the upper bound wraps to zero. A zero upper bound is a > special case that indicates that the memory region extends to the top of > the target's memory space. > > > 2002-07-08 Don Howard > > * memattr.c (mem_info_command): Print special case of upper bound > as max CORE_ADDR + 1. Yes, ok. Andrew > Index: memattr.c > =================================================================== > RCS file: /cvs/src/src/gdb/memattr.c,v > retrieving revision 1.12 > diff -p -u -w -r1.12 memattr.c > --- memattr.c 24 Jun 2002 22:08:30 -0000 1.12 > +++ memattr.c 8 Jul 2002 18:35:30 -0000 > @@ -235,7 +235,6 @@ mem_info_command (char *args, int from_t > > for (m = mem_region_chain; m; m = m->next) > { > - CORE_ADDR hi; > char *tmp; > printf_filtered ("%-3d %-3c\t", > m->number, > @@ -246,12 +245,21 @@ mem_info_command (char *args, int from_t > tmp = local_hex_string_custom ((unsigned long) m->lo, "016l"); > > printf_filtered ("%s ", tmp); > - hi = (m->hi == 0 ? ~0 : m->hi); > > if (TARGET_ADDR_BIT <= 32) > - tmp = local_hex_string_custom ((unsigned long) hi, "08l"); > + { > + if (m->hi == 0) > + tmp = "0x100000000"; > else > - tmp = local_hex_string_custom ((unsigned long) hi, "016l"); > + tmp = local_hex_string_custom ((unsigned long) m->hi, "08l"); > + } > + else > + { > + if (m->hi == 0) > + tmp = "0x10000000000000000"; > + else > + tmp = local_hex_string_custom ((unsigned long) m->hi, "016l"); > + } > > printf_filtered ("%s ", tmp);