public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: 任建军 <ronren@yeah.net>
Cc: gdb@sourceware.org
Subject: Re: Enable simulator on gdb
Date: Thu, 29 Jul 2021 09:49:42 +0100	[thread overview]
Message-ID: <20210729084942.GB9094@embecosm.com> (raw)
In-Reply-To: <279bc44e.74a.17aad71c848.Coremail.ronren@yeah.net>

* 任建军 via Gdb <gdb@sourceware.org> [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.

Either way, this should get it working for you.

Thanks,
Andrew

--

diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 5f66cda6b78..5dcf67a662f 100644
--- 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
 	;;
 
 aarch64*-*-freebsd*)

  reply	other threads:[~2021-07-29  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  3:52 任建军
2021-07-29  8:49 ` Andrew Burgess [this message]
2021-08-17 22:13   ` Mike Frysinger
2021-08-19 10:32     ` Andrew Burgess
2021-08-19 22:13       ` Mike Frysinger

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=20210729084942.GB9094@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb@sourceware.org \
    --cc=ronren@yeah.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).