From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Buettner To: Stephen Smith , 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 12:33:00 -0000 Message-id: <1010716193231.ZM31023@ocotillo.lan> References: <3B4CD85B.C35AE862@home.com> <3B4F4AA0.E5C079C8@home.com> <200107132140.RAA22631@greed.delorie.com> <3B4F7039.6B441974@home.com> <3B53374C.98CC3BFB@home.com> X-SW-Source: 2001-07/msg00181.html On Jul 16, 11:49am, Stephen Smith wrote: > 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'm not convinced this was the best idea, but it was certainly worth a try. > 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. It appears to me that you can't build a cross debugger where cygwin is the target. This is unfortunate, but it appears that the shared library support requires that you run a native GDB. > 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. I think you should abandon the ``gdb_target=cygwin'' approach. The shared library support in win32-nat.c will not do what you want for a cross debugger. I've glanced over the code and it does not look easy to fix it for your purposes either. This is why it's in win32-nat.c instead of somewhere else. Ideally though, I think it would be a good idea for the solib support to be migrated to solib-win32 or somesuch. That way it could make use of the existing (common) solib machinery, though it would still not support cross debugging without some significant rewriting and cooperation from gdbserver. For your purposes, I think it'd be better to just use ``gdb_target=embed''. You'll avoid the shared library nightmares that way. If you find that you need some sort of shared library support, you'll have to implement it separately. (This'll likely mean creating a new *.mt file, a new tm-*.h file, and a new solib-*.c file which'll have the shared library support that you need.) Kevin