From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80401 invoked by alias); 25 Feb 2015 22:39:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 80357 invoked by uid 89); 25 Feb 2015 22:39:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wg0-f46.google.com Received: from mail-wg0-f46.google.com (HELO mail-wg0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 25 Feb 2015 22:39:17 +0000 Received: by wghl18 with SMTP id l18so6575810wgh.7; Wed, 25 Feb 2015 14:39:14 -0800 (PST) X-Received: by 10.181.25.232 with SMTP id it8mr2232087wid.63.1424903954446; Wed, 25 Feb 2015 14:39:14 -0800 (PST) Received: from [192.168.1.138] (host-2-102-217-78.as13285.net. [2.102.217.78]) by mx.google.com with ESMTPSA id s19sm27048584wik.18.2015.02.25.14.38.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 14:39:13 -0800 (PST) Message-ID: <54EE4EFD.3060406@gmail.com> Date: Wed, 25 Feb 2015 22:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andy Wingo CC: gdb-patches@sourceware.org, jan.kratochvil@redhat.com, sanjoyd@sourceware.org Subject: Re: Missing test cases for jit-reader interface References: <87oaolx6xy.fsf@igalia.com> <87k2z8ydq4.fsf@igalia.com> <86y4nmvvme.fsf@gmail.com> <87egpeufib.fsf@igalia.com> In-Reply-To: <87egpeufib.fsf@igalia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00725.txt.bz2 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