From: Yao Qi <qiyaoltc@gmail.com>
To: Andy Wingo <wingo@igalia.com>
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com,
sanjoyd@sourceware.org
Subject: Re: Missing test cases for jit-reader interface
Date: Wed, 25 Feb 2015 22:39:00 -0000 [thread overview]
Message-ID: <54EE4EFD.3060406@gmail.com> (raw)
In-Reply-To: <87egpeufib.fsf@igalia.com>
On 02/25/2015 04:23 PM, Andy Wingo wrote:
> The test is arch-specific because it has a simple x86 "jit". See
> jithost.c.
>
If jithost.c has arch-specific stuff, let us move all arch-specific
stuff there, like,
#if defined __x86_64__
code[0] = 0xcc; /* SIGTRAP */
code[1] = 0xc3; /* RET */
#else
#error "don't know what instructions to generate"
#endif
in jit-reader.exp, if jithost.c is compiled successfully, do the tests,
otherwise, emit UNSUPPORTED and return. In this way, once some one
wants to extend jit-reader.exp for other targets, he or she needs
to change this part in jithost.c to generate corresponding instructions,
breakpoint instruction and return instruction, right?
jitreader.c needs the same treatment too, but I am fine to leave it
as-is now.
>>> >> +if { ![isnative] } {
>>> >> + return -1
>>> >> +}
>> >
>> > and remove it too.
> Does it not need to be this way? If you are debugging from a big-endian
> host, you will read the addresses wrong from the inferior, as the
> jit-reader .so reads the values directly. (Seems to me anyway.)
>
My understanding is that jitreader accesses inferior through GDB, no?
--
Yao
next prev parent reply other threads:[~2015-02-25 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 10:23 Andy Wingo
2015-02-23 13:11 ` Andy Wingo
2015-02-25 7:38 ` Sanjoy Das
2015-02-25 15:50 ` Yao Qi
2015-02-25 16:23 ` Andy Wingo
2015-02-25 22:39 ` Yao Qi [this message]
2015-02-26 9:02 ` Andy Wingo
2016-06-17 18:56 ` [pushed] " 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=54EE4EFD.3060406@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=sanjoyd@sourceware.org \
--cc=wingo@igalia.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