From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 95BFE386197D for ; Tue, 17 Aug 2021 22:13:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95BFE386197D Date: Tue, 17 Aug 2021 18:13:37 -0400 From: Mike Frysinger To: Andrew Burgess Cc: =?utf-8?B?5Lu75bu65Yab?= , gdb@sourceware.org Subject: Re: Enable simulator on gdb Message-ID: Mail-Followup-To: Andrew Burgess , =?utf-8?B?5Lu75bu65Yab?= , gdb@sourceware.org References: <279bc44e.74a.17aad71c848.Coremail.ronren@yeah.net> <20210729084942.GB9094@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210729084942.GB9094@embecosm.com> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, BODY_8BITS, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 22:13:46 -0000 On 29 Jul 2021 09:49, Andrew Burgess wrote: > * 任建军 via Gdb [2021-07-16 11:52:33 +0800]: > > > I have a complie question, An help me answer it? > > I use binutils-gdb source code to build gdb for aarch64,the version is “gdb-9.2-release”, and complie command line is "./configure --target=aarch64 --enable-sim". > > Compile is completed, but when i enter gdb and type command "target sim" , gdb said "Undefined target command: "sim": ..." , am i missed someting when i complie gdb? > > The problem is that in gdb/configure.tgt there is no link to the > compiled simulator. The patch below adds this link for aarch64-elf > targets. > > I believe the reason for this is that the aarch64 simulator is > considered deprecated in favour of using QEMU. Or it could just be an > oversight that this link is missing. while i love QEMU, i'm not sure it should be relevant wrt decisions about the GNU sim and its integration in places. > Either way, this should get it working for you. > > --- a/gdb/configure.tgt > +++ b/gdb/configure.tgt > @@ -117,6 +117,7 @@ case "${targ}" in > aarch64*-*-elf | aarch64*-*-rtems*) > # Target: AArch64 embedded system > gdb_target_obs="aarch64-newlib-tdep.o" > + gdb_sim=../sim/arm/libsim.a guessing you meant aarch64 there and not arm ? -mike