Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Anton Kolesov <Anton.Kolesov@synopsys.com>
To: Pedro Alves <palves@redhat.com>, Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Francois Bedard	<Francois.Bedard@synopsys.com>
Subject: RE: [PATCH 2/5] arc: Set section to ".text" when disassembling
Date: Wed, 15 Mar 2017 15:16:00 -0000	[thread overview]
Message-ID: <39A54937CC95F24AA2F794E2D2B66B13582A81E4@DE02WEMBXB.internal.synopsys.com> (raw)
In-Reply-To: <d38ec97b-91fe-e852-70a5-df5b6ed9d434@redhat.com>

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

> 
> On 02/16/2017 04:35 PM, Anton Kolesov wrote:
> > 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.
> 
> And even better approach would be to include the right arch in the xml
> target description, in the (existing) <architecture> element, and then
> somehow pass that info down to opcodes here...

In our BFD ARC EM and ARC HS are treated as same processor (ARC v2) and
differ via flags in private ELF header, so changing BFD arch will not work.
I'd need to change opcodes, so that it will accept processor as an argument,
instead of always reading ELF header. That would take a while, so I will
remove this patch from the series and will resubmit it later, separately
from prologue analysis.  The only downside is that several architecture
specific test cases will not pass for ARC HS processor for the time being.

Anton

> 
> Thanks,
> Pedro Alves

\x16º&Öéj×!zÊÞ¶êç×~úÓ™b²Ö«r\x18\x1dn–­r\x17¬

  reply	other threads:[~2017-03-15 15:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 10:01 [PATCH 1/5] arc: Align internal regnums with architectural regnums Anton Kolesov
2017-02-14 10:01 ` [PATCH 4/5] arc: Add disassembler helper Anton Kolesov
2017-02-14 15:50   ` Eli Zaretskii
2017-02-17 13:00   ` Pedro Alves
2017-02-17 13:01   ` Pedro Alves
2017-02-14 10:01 ` [PATCH 5/5] arc: Add prologue analysis Anton Kolesov
2017-02-14 15:51   ` Eli Zaretskii
2017-02-17 13:25   ` Pedro Alves
2017-03-15 15:18     ` [PATCH 5/5 v2] " Anton Kolesov
2017-03-15 15:59       ` Eli Zaretskii
2017-03-27 14:20       ` Anton Kolesov
2017-03-28 13:28         ` Pedro Alves
2017-02-14 10:01 ` [PATCH 2/5] arc: Set section to ".text" when disassembling Anton Kolesov
2017-02-15 22:27   ` Yao Qi
2017-02-16 16:35     ` Anton Kolesov
2017-02-17 12:31       ` Pedro Alves
2017-03-15 15:16         ` Anton Kolesov [this message]
2017-02-14 10:01 ` [PATCH 3/5] arc: Add "maintenance print arc" command prefix Anton Kolesov
2017-02-17 13:02   ` Pedro Alves
2017-02-17 13:26 ` [PATCH 1/5] arc: Align internal regnums with architectural regnums Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39A54937CC95F24AA2F794E2D2B66B13582A81E4@DE02WEMBXB.internal.synopsys.com \
    --to=anton.kolesov@synopsys.com \
    --cc=Francois.Bedard@synopsys.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox