From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Wei-cheng Wang <cole945@gmail.com>
Subject: Re: [PATCH] Fix memory-region overlapping checking
Date: Thu, 02 Aug 2012 08:10:00 -0000 [thread overview]
Message-ID: <3341505.ZtLsQODebp@qiyao.dyndns.org> (raw)
In-Reply-To: <CAPmZyH4To-k4X6kSAYAg03if8Cz9eD-RC13_xbUXuK-dxyGO-g@mail.gmail.com>
On Thursday, August 02, 2012 02:10:40 PM Wei-cheng Wang wrote:
> Hi,
>
> After adding a memory-region with <hi addr> as max CORE_ADDR+1,
> no more memory-region can be added. It always complains about
> "overlapping"
Thanks for reporting this problem, and drafting a patch to fix it.
>
> For example,
>
> (gdb) mem 0x50 0x80 ro
> (gdb) mem 0xffffff00 0x100000000 ro
However, the real problem is that we don't do range checking for inputs in
command 'mem'. The expected behavior is, on a 32-bit target, when user types
0x100000000, gdb should emit an error saying that it is out of the range of
CORE_ADDR, or something like that.
> (gdb) info mem
> Using user-defined memory regions.
> Num Enb Low Addr High Addr Attrs
> 1 y 0x00000050 0x00000080 ro nocache
> 2 y 0xffffff00 0x100000000 ro nocache
> (gdb) mem 0x100 0x200 ro
> overlapping memory region
>
> When checking whether the new memory-region includes a previous one,
> it should take care special case, where hi == 0 means max CORE_ADDR+1.
The case you gave works well on my x86_64-linux.
--
Yao (齐尧)
next prev parent reply other threads:[~2012-08-02 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 6:11 Wei-cheng Wang
2012-08-02 8:10 ` Yao Qi [this message]
2012-08-02 10:00 ` Wei-cheng Wang
2012-08-03 10:54 ` Yao Qi
2012-08-07 2:35 ` Wei-cheng Wang
2012-08-07 2:48 ` Yao Qi
2012-08-07 6:02 ` Wei-cheng Wang
2012-08-08 10:31 ` Yao Qi
2012-08-16 10:03 ` Wei-cheng Wang
2012-08-24 11:18 ` Pedro Alves
2012-08-24 11:47 ` Wei-cheng Wang
2012-08-24 15:12 ` Pedro Alves
2012-08-27 2:22 ` Wei-cheng Wang
2012-08-27 8:58 ` Pedro Alves
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=3341505.ZtLsQODebp@qiyao.dyndns.org \
--to=yao@codesourcery.com \
--cc=cole945@gmail.com \
--cc=gdb-patches@sourceware.org \
/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