Date: Wed, 8 Jan 97 11:13:57 GMT Message-Id: <9701081113.AA20324@leopard.proteon.com> From: Neil Jarvis To: Laurent DOT CHARLES AT st DOT com Cc: djgpp AT delorie DOT com Subject: Re: Remote GDB Reply-To: Neil DOT Jarvis AT proteon DOT com Mime-Version: 1.0 (generated by tm-edit 7.43) Content-Type: text/plain; charset=US-ASCII > 3) All this is because I cannot find a reliable (and actually usable) > way to use djgpp-gdb under msdos to debug cross-compiled > applications (sun to go32). I cannot find a system/dos box > (msdos/windows3/Win95/WinNT) which allows me to have long filename > access, breakpoints, fast access to files on breakpoints... > > 4) Is there any of you who work with cross compiler as I do? Do not > hesitate to send me a little mail to describe your working > environment, or if you want to share experience. Laurent, I have been using a SunOS->DJGPP cross development environment successfully for about 14 months now. I don't appear to be having your problems with GDB (although I am also looking for a remote version for other reasons). On one DOS PC I use Beame & Whiteside's NFS client for DOS. I then mount the sources and executable from the SunOS box as a DOS drive. I do stick to a 8.3 naming convention on the Sun. This is a bit of a pain, but it makes everything else work smoother. The whole V2.01 DJGPP suite is also mounted on the machine from the Sun. Given this environment a program cross-compiled on the Sun (remembering to include the gcc -g) option, allows me to use GDB on the DOS machine to debug the program. You can specify the directories for the sources using the GDB command 'dir p:/source/tree' if they are not in the same directories as the executable. GDB then works as normal. Please note that the inclusion of a drive letter in the dir command *only* works with the latest DJGPP GDB released (V2.01). Earlier releases of GDB did not understand the drive letter, and you had to make sure that you mounted all your sources and executables on the same DOS drive. I also have a Windows 95 setup, which allows long filename to work. I use the SAMBA server on the Suns. It is a free SMB server, SMB being the protocol used by Windows 95/NetBIOS to share disks across the network. Check out http://lake.canberra.edu.au/pub/samba/samba.html I use this to export the Sun disks. I then use Map Network Drive under Windows 95 to create a new disk with the sources/executables. GDB (again mounted via SAMBA) can then run in a DOS box (I use 4DOS, but vanilla DOS should also work), and access the Sun sources/executable using long filenames. It does work! Hope some of this helps, I've included a sample Windows 95 session below. -Neil ========== helloWorld.c (on the Sun) ========== main() { printf("Happy New Year!\n"); } ========== Cross compiled on the Sun ========== > i386-msdos-dpmi-gcc -g -O helloWorld.c -o helloWorld ========== GDB session under Windows 95 ========== i:\tmp\djgpp\test>gdb helloWorld GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (go32), Copyright 1996 Free Software Foundation, Inc... (gdb) b main Breakpoint 1 at 0x1566: file helloWorld.c, line 3. (gdb) r Starting program: i:/tmp/djgpp/test/helloWorld Breakpoint 1, main () at helloWorld.c:3 3 printf("Happy New Year\n"); (gdb) c Continuing. Happy New Year Program exited normally. 0x10 in ?? () (gdb) q i:\tmp\djgpp\test>type helloWorld.c main() { printf("Happy New Year\n"); } i:\tmp\djgpp\test>dir Volume in drive I is NAJ Directory of I:\tmp\djgpp\test\* 1-08-97 11:04 . 1-08-97 10:55 .. 1-08-97 11:08 818 capture.txt 1-08-97 10:56 83,733 helloWorld 1-08-97 10:55 39 helloWorld.c 1-08-97 10:56 85,781 helloWorld.exe 170,371 bytes in 4 files and 2 dirs 229,376 bytes allocated 15,925,248 bytes free -- *********************************************************************** Neil Jarvis Proteon International Ltd, R&D, York, UK. Tel: (+44) 1904 693409 Neil DOT Jarvis AT proteon DOT com http://tom.proteon.com:8080/~naj/ *********************************************************************** Thought of the day: Clones are people two. ***********************************************************************