From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13733 invoked by alias); 16 Apr 2015 11:34:00 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 13719 invoked by uid 89); 16 Apr 2015 11:33:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.7 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,GARBLED_FROM,GARBLED_SUBJECT,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 16 Apr 2015 11:33:59 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3GBXslm003175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 Apr 2015 07:33:54 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3GBXoiP001468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Apr 2015 07:33:53 -0400 Date: Thu, 16 Apr 2015 11:34:00 -0000 From: Jan Kratochvil To: =?utf-8?B?6auY5Zu96IOc?= Cc: "gdb@sourceware.org" , Phil Muldoon Subject: Re: =?utf-8?B?562U5aSN?= =?utf-8?Q?=3A?= How to use compile & execute function in GDB Message-ID: <20150416113349.GA31239@host1.jankratochvil.net> References: <0CEE46EB9C50E44486A861D738D3E20645F9C073@rsex2.realsil.com.cn> <20150415154836.GA10538@host1.jankratochvil.net> <0CEE46EB9C50E44486A861D738D3E20645F9C2E0@rsex2.realsil.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0CEE46EB9C50E44486A861D738D3E20645F9C2E0@rsex2.realsil.com.cn> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00029.txt.bz2 On Thu, 16 Apr 2015 05:35:04 +0200, 高国胜 wrote: > Ok,it works now. Great. > Can the compile & execute function be used for cross debugging in embed > system? You do not say the target triple. It requires gdbarch_infcall_mmap() which is currently implemented only by linux-tdep.c, by looking up the "mmap64" symbol. If you do not have it you should get This target does not support inferior memory allocation by mmap. or evaluation of this expression requires the program to have a function "mmap64". Either your target uses linux-tdep.c and it is enough to provide suitable "mmap64" function in your target inferior or you need to implement appropriate gdbarch_infcall_mmap() in your tdep GDB file. Jan