Re: Enable simulator on gdb
Mike Frysinger via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <YR7XpCvHziBO4xaK@vapier> |
On 19 Aug 2021 11:32, Andrew Burgess wrote: > * Mike Frysinger <[email protected]> [2021-08-17 18:13:37 -0400]: > > On 29 Jul 2021 09:49, Andrew Burgess wrote: > > > * 任建军 via Gdb <[email protected]> [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 ? > > Yes I did. Thanks. gotcha. posted a patch to turn it on for aarch64 & cris. -mike