From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Smith To: DJ Delorie , gdb@sourceware.cygnus.com, Kevin Buettner Subject: Re: GDB for PE/Cywin target won't build on linux Date: Mon, 16 Jul 2001 11:49:00 -0000 Message-id: <3B53374C.98CC3BFB@home.com> References: <3B4CD85B.C35AE862@home.com> <3B4F4AA0.E5C079C8@home.com> <200107132140.RAA22631@greed.delorie.com> <3B4F7039.6B441974@home.com> X-SW-Source: 2001-07/msg00179.html Since the embedded target OS is close to windows/cygwin in functionality, I choose to try the config/i386/cygwin.mt file. Therefore, I added the following line to configure.tgt i[3456]86-*-pe*) gdb_target=cygwin ;; I then did the usual configure/make step and recieved the following error sequence. The wierd pard is that the missing symbols are in gdb/win32-nat.c which isn't getting compiled. The file is listed in the ALLDEPFILES, but isn't listed in TSOBS, COMMON_OBS, or ADD_FILES. Am I correct in assuming that it needs to be listed somewhere else? Is there a gdb way, or should I do what looks good. --------------------- error trace ----------------------- make[1]: Entering directory `/usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb' rm -f gdb gcc -g -O2 -o gdb \ main.o libgdb.a cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk- varobj.o gdbtk-wrapper.o ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -lncurses ../libgui/src/libgui.a -L/usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/itcl/itcl/unix -l itcl3.0 -L/usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/itcl/itk/unix -litk3.0 -L/usr/local/cross-com pilers/cross-source/build-insight-i686-pc-pe/tix/unix/tk8.0 -ltix4.1.8.0 -L/usr/local/cross-compilers/cross-source/build -insight-i686-pc-pe/tk/unix -ltk8.0 -L/usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/tcl/unix -ltcl8.0 -L/usr/X11R6/lib -lX11 -ldl -lieee -lm -lm ../libiberty/libiberty.a \ -ldl -rdynamic /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/tcl/unix/libtcl8.0.a(tclUnixPipe.o): In function `TclpCreateTempFile': /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/tcl/unix/../../../insight-20010502/tcl/unix/tclUnixPipe.c:188: the use of `tmpnam' is dangerous, better use `mkstemp' libgdb.a(symfile.o): In function `add_shared_symbol_files_command': /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb/../../insight-20010502/gdb/symfile.c:1559: undefined reference to `dll_symbol_command' libgdb.a(infcmd.o): In function `attach_command': /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb/../../insight-20010502/gdb/infcmd.c:1716: undefined reference to `child_solib_add' libgdb.a(infrun.o): In function `handle_inferior_event': /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb/../../insight-20010502/gdb/infrun.c:1558: undefined reference to `child_solib_add' /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb/../../insight-20010502/gdb/infrun.c:2479: undefined reference to `child_solib_add' libgdb.a(breakpoint.o): In function `bpstat_get_triggered_catchpoints': /usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb/../../insight-20010502/gdb/breakpoint.c:3037: undefined reference to `child_solib_loaded_library_pathname' collect2: ld returned 1 exit status make[1]: *** [gdb] Error 1 make[1]: Leaving directory `/usr/local/cross-compilers/cross-source/build-insight-i686-pc-pe/gdb' make: *** [install-gdb] Error 2 [ssmith@az75-linuxbox cross-source]$ Kevin Buettner wrote: > > You shouldn't need a *.mh file. You might try using > config/i386/embed.mt > and config/i386/tm-embed.h. I.e, just add > > i[3456]86-*-pe*) gdb_target=embed ;; > > to configure.tgt and see where that gets you. > > Kevin Stephen Smith wrote: > No, I'm not targeting cygwin, but an embedded OS that uses the PE executable format. There are a bunch of us > Linux geeks here that would prefer to ditch NT/Cygwin for Linux. > > Currently I cross compile GCC/GDB for x86-cygwin -> powerpc-motorola-elf, > x86-linux -> powerpc-motorola-elf, x86-linux -> x86-pc-pe (gcc only). >