* Is this a bug? "target remote" doesn't follow "set architecture" @ 2009-12-19 16:26 Michael Snyder 2009-12-21 4:06 ` Daniel Jacobowitz 0 siblings, 1 reply; 5+ messages in thread From: Michael Snyder @ 2009-12-19 16:26 UTC (permalink / raw) To: gdb I built a gdb with target=i686-linux. I also want to use it for remote debugging. I was surprised to find that, even though I told it to "set architecture i386:x86-64", both before and after "target remote", it still tried to interpret the "g" regs packet as 32 bit regs, and to display the 32 bit reg set for "info reg". Am I wrong to expect this to work? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this a bug? "target remote" doesn't follow "set architecture" 2009-12-19 16:26 Is this a bug? "target remote" doesn't follow "set architecture" Michael Snyder @ 2009-12-21 4:06 ` Daniel Jacobowitz 2009-12-21 18:08 ` Michael Snyder 0 siblings, 1 reply; 5+ messages in thread From: Daniel Jacobowitz @ 2009-12-21 4:06 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb On Sat, Dec 19, 2009 at 08:24:12AM -0800, Michael Snyder wrote: > I built a gdb with target=i686-linux. I also want to use it > for remote debugging. Did you configure GDB such that the x86-64 support was built too? It isn't by default. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this a bug? "target remote" doesn't follow "set architecture" 2009-12-21 4:06 ` Daniel Jacobowitz @ 2009-12-21 18:08 ` Michael Snyder 2009-12-21 18:22 ` Daniel Jacobowitz 0 siblings, 1 reply; 5+ messages in thread From: Michael Snyder @ 2009-12-21 18:08 UTC (permalink / raw) To: Michael Snyder, gdb Daniel Jacobowitz wrote: > On Sat, Dec 19, 2009 at 08:24:12AM -0800, Michael Snyder wrote: >> I built a gdb with target=i686-linux. I also want to use it >> for remote debugging. > > Did you configure GDB such that the x86-64 support was built too? > It isn't by default. Configure.tgt seems to suggest that it is. And "set archi" offers it as a choice. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this a bug? "target remote" doesn't follow "set architecture" 2009-12-21 18:08 ` Michael Snyder @ 2009-12-21 18:22 ` Daniel Jacobowitz 2010-01-05 7:07 ` Hui Zhu 0 siblings, 1 reply; 5+ messages in thread From: Daniel Jacobowitz @ 2009-12-21 18:22 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb On Mon, Dec 21, 2009 at 10:05:02AM -0800, Michael Snyder wrote: > Daniel Jacobowitz wrote: > >On Sat, Dec 19, 2009 at 08:24:12AM -0800, Michael Snyder wrote: > >>I built a gdb with target=i686-linux. I also want to use it > >>for remote debugging. > > > >Did you configure GDB such that the x86-64 support was built too? > >It isn't by default. > > Configure.tgt seems to suggest that it is. if test "x$enable_64_bit_bfd" = "xyes"; then # Target: GNU/Linux x86-64 gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o ${gdb_target_obs}" fi Is --enable-64-bit-bfd set? > And "set archi" offers it as a choice. That's the BFD architecture list, GDB doesn't have its own. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this a bug? "target remote" doesn't follow "set architecture" 2009-12-21 18:22 ` Daniel Jacobowitz @ 2010-01-05 7:07 ` Hui Zhu 0 siblings, 0 replies; 5+ messages in thread From: Hui Zhu @ 2010-01-05 7:07 UTC (permalink / raw) To: Michael Snyder, gdb Hi, I tried with "--enable-targets=all --enable-64-bits-bfd". But my gdb still cannot read the x8664 file. For example: head config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was $ ../src/configure --disable-sid --disable-rda --disable-binutils --disable-gas --disable-ld --disable-gprof --enable-targets=all --enable-64-bits-bfd ## --------- ## ## Platform. ## teawater@pek-hzhu:~/gdb/cvs/bgdball$ file vmlinux vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped teawater@pek-hzhu:~/gdb/cvs/bgdball$ gdb/gdb vmlinux This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... "/home/teawater/gdb/cvs/bgdball/vmlinux": not in executable format: File format not recognized (gdb) quit teawater@pek-hzhu:~/gdb/cvs/bgdball$ file arm arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped teawater@pek-hzhu:~/gdb/cvs/bgdball$ gdb/gdb arm GNU gdb (GDB) 7.0.50.20100105-cvs Copyright (C) 2010 Free Software Foundation, Inc. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... "/home/teawater/gdb/cvs/bgdball/arm": not in executable format: File format is ambiguous head bfd/config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was $ /home/teawater/gdb/cvs/src/bfd/configure --cache-file=./config.cache --with-system-zlib --disable-sid --disable-rda --disable-binutils --disable-gas --disable-ld --disable-gprof --enable-targets=all --enable-64-bits-bfd --program-transform-name=s,y,y, --disable-option-checking --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --srcdir=../../src/bfd build_alias=i686-pc-linux-gnu host_alias=i686-pc-linux-gnu target_alias=i686-pc-linux-gnu CC=gcc CFLAGS=-g -O2 LDFLAGS= --no-create --no-recursion Looks --enable-targets=all didn't help anything. :( Hui On Tue, Dec 22, 2009 at 02:22, Daniel Jacobowitz <drow@false.org> wrote: > On Mon, Dec 21, 2009 at 10:05:02AM -0800, Michael Snyder wrote: >> Daniel Jacobowitz wrote: >> >On Sat, Dec 19, 2009 at 08:24:12AM -0800, Michael Snyder wrote: >> >>I built a gdb with target=i686-linux. I also want to use it >> >>for remote debugging. >> > >> >Did you configure GDB such that the x86-64 support was built too? >> >It isn't by default. >> >> Configure.tgt seems to suggest that it is. > > if test "x$enable_64_bit_bfd" = "xyes"; then > # Target: GNU/Linux x86-64 > gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o > ${gdb_target_obs}" > fi > > Is --enable-64-bit-bfd set? > >> And "set archi" offers it as a choice. > > That's the BFD architecture list, GDB doesn't have its own. > > > -- > Daniel Jacobowitz > CodeSourcery > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-05 7:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-12-19 16:26 Is this a bug? "target remote" doesn't follow "set architecture" Michael Snyder 2009-12-21 4:06 ` Daniel Jacobowitz 2009-12-21 18:08 ` Michael Snyder 2009-12-21 18:22 ` Daniel Jacobowitz 2010-01-05 7:07 ` Hui Zhu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox