RE: [PATCH 2/5] arc: Set section to ".text" when disassembling

Anton Kolesov
2017-02-16T16:35:19Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 630 bytes --]

Hi Yao,

> info->section should be valid, but why must it be ".text"? Can I
> info->disassembly
> instructions in .plt section? How about using find_pc_section (addr) to get
> the right section? like mep_gdb_print_insn.

Actual section doesn't matter here because opcodes really need elf header, which is
just obtained through a section. I've used .text simply because it is the section that is
very likely to exist. Using find_pc_section seems to be a much better solution, I wasn't
aware of it. Will change this in second version of the patch.

Anton

>
> --
> Yao (é½å°§)
\x16º&Öéj×!zÊÞ¶êç×~ôëÙb²Ö«r\x18\x1dn–­r\x17¬