This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Disassembly improvements
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Doug Evans <dje at google dot com>, "Abid, Hafiz" <Hafiz_Abid at mentor dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Mirza, Taimoor" <Taimoor_Mirza at mentor dot com>
- Date: Fri, 18 Oct 2013 19:25:30 +0100
- Subject: Re: [patch] Disassembly improvements
- Authentication-results: sourceware.org; auth=none
- References: <EB3B29AD43CA924DA27099BC85192376E0705106 at EU-MBX-03 dot mgc dot mentorg dot com> <CADPb22RShPCFWpZhgfv6-ZDtSA=6PK+qwVaetth4tKM1LJLnjA at mail dot gmail dot com> <525C02E5 dot 2060601 at redhat dot com> <21085 dot 59640 dot 697075 dot 435874 at ruffy dot mtv dot corp dot google dot com> <525E4596 dot 70503 at codesourcery dot com> <525E81B8 dot 90003 at redhat dot com> <52610BF7 dot 8000605 at codesourcery dot com>
On 10/18/2013 11:22 AM, Yao Qi wrote:
> On 10/16/2013 08:08 PM, Pedro Alves wrote:
>> Yeah, adding the new target object part is straightforward. What
>> may not be, is either adjusting the dcache.c to the specifics of
>> disassembly, and range limiting, and making sure the cache is bounded
>> correctly, and flushed at the appropriate times. It's one of those
>> "must try it to tell" things, I think.
>
> Pedro,
> I start to think about it today. I don't see we have to adjust dcache.c
> for disassembly and worry about the range. From GDB's point of view,
> the process of reading a piece of stack memory should be identical to
> reading a piece of code memory. We are using '
> target_dcache' to cache stack memory, so we can also reuse it to cache
> code memory. Am I missing something?
Hmm, the idea was that having "disassemble $foo, $bar" read outside
[$foo,$bar) might not be safe (particularly so if the line size is
set large), as it might trip on memory mapped registers, which
might have side effects when read. I guess I could be convinced that
this is overzealous?
BTW, how will your "Read memory in multiple lines in dcache_xfer_memory"
series help disassembly if the disassembler, today, without that other
patch that caches things in disasm.c, fetches memory from the target
instruction by instruction? Seems to me it'll end up always fetching
a single line at a time.
--
Pedro Alves