This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Disassembly improvements


On 10/16/2013 08:51 AM, Yao Qi wrote:
> On 10/16/2013 09:16 AM, Doug Evans wrote:
>>   > If I were to try one, I think it would be along the lines of
>>   > a new TARGET_OBJECT_DISASM_MEMORY, and somehow pass more info down
>>   > the target_xfer interface so that the the core memory reading code
>>   > handles the caching.  Probably, that'd be done with a new pair of
>>   > 'begin/end code caching' functions that would be called at the
>>   > appropriate places.  The new code in dis_asm_read_memory would
>>   > then be pushed to target.c, close to where stack cache is handled.
>>
>> How hard would it be to do that now?
> 
> AFAICS, it is not hard.  We've already had TARGET_OBJECT_STACK_MEMORY, 
> so it is straightforward to add TARGET_OBJECT_CODE_MEMORY, and disas and 
> skip_prologue can use it.

Are you going to give it a try?  That'd be great.

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 Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]