This is the mail archive of the mailing list for the binutils 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] [ARC] Pass arc_opcode to GDB as an architecture specific data

On Fri, Sep 30, 2016 at 6:33 PM, Anton Kolesov
<> wrote:
> To do prologue analysis GDB needs to know a lot of information about
> instructions that is not provided by generic disassemble_info structure.  For
> example, disassemble_info doesn't provide information about instruction
> operands, or whether instruction is has is a predicated (which means that it is
> effectively a branch and in general prologue analysis halts immediately on
> branches).  To close the information gap between disassembly and GDB it is
> required to pass architecture-specific structure "arc_opcode" to GDB as a value
> of "private_data" field of disassemble_info structure. Structure "arc_opcode"
> contains most of the information needed by GDB.

How do you use disassemble_info in prologue analysis?  I am not sure
disassemble_info can be used for something other than disassembly.

> Alternative solution would be to do a complete instruction decoding in GDB
> instead of using opcodes, however that would create a lot of unnecessary
> duplication, which would be especially problematic because ARC doesn't have a
> clear instruction encoding format organization, so handling all of the various
> instruction formats is quite a task.

Right, alternatively, you can add a new api, like arc_decode_insn, and it
returns structure "arc_opcode", so that GDB can use it in prologue
analysis and somewhere else if instruction decoding is needed.  We
did the same in aarch64, see how aarch64_decode_insn is used in

Yao (齐尧)

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