Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Don Howard <dhoward@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Another memattr tweak
Date: Thu, 25 Jul 2002 16:36:00 -0000	[thread overview]
Message-ID: <3D408A0C.90605@ges.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0207081105300.2913-100000@theotherone>

> 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  <dhoward@redhat.com>
> 
> 	* 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);



  reply	other threads:[~2002-07-25 23:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08 11:45 Don Howard
2002-07-25 16:36 ` Andrew Cagney [this message]
2002-08-09 15:51   ` Don Howard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D408A0C.90605@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=dhoward@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox