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: [RFA 3/5] New port: CR16: gdb port


On 01/23/2013 02:22 PM, Kaushik Phatak wrote:
>> > How about exporting a function that hides these opcodes details?  
>> > I don't even pretend to understand what the code is trying to do, 
>> > and it'd be an opportunity to comment it in the function description.
>> >   /* Take BUF, do something with it, and write length
>> >        to LENGTH.  Blah, blah.  */
>> >    cr16_do_something (buf, *length, ...);
> I think this can be done and it will make this code look cleaner.
> An exported function in bfd would make my code look like this,
> ...
>    target_read_memory (pc, buf, 6);
>    cr16_get_insn_length (buf, *length, ...);
>    next_pc = pc + length;
>     ...
> 

If it's the instruction length you need, then did you
try gdb_buffered_insn_length or gdb_insn_length?

-- 
Pedro Alves


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