This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: host=Windows/Cygwin/X11; target=Windows, Insight possible?


Joćo Cadamuro Junior wrote:
> 
> Kai Ruottu wrote:
> 
> > > Antti-Pekka Virjonen wrote:
> > >
> > > > Please take a look at the Cygwin project. It will make your life much easier. I am
> > > > running the Cygwin on my Windows 2000 system and have compiled cross-gcc for it and
> > > > use it to compile binaries for use on our PowerPC platform. http://www.cygwin.com
> > > > It is like using a Linux shell on Windows... you can also run X-windows over Cygwin.
> >
> >  I asked this same on the Insight-list, but got no replies...
> >
> >  I prefer to use a real Unix, not a Unix-layer over Windoze... But if X11 works over Cygwin,
> > has someone build Insight/GDB for X11 and for Win32-target ?
> 
> I have used Insight under cygwin (for target "powerpc-eabi"). To run insight you don't need
> cygwin and X11, because Insight for cygwin includes its own tcl/tk, tix and other stuff to run
> directly over Windoze.

 That isn't what I thought having asked... I have built Win32-hosted Insights for years, even
for Mingw/Win32 and Mingw/Win3.1x/Win32s host, using the default Win32(s)-API. But the possibility
to produce a Insight for Win32 using the X11-API was unclear...

 There may be some very basic issue like Windoze not being multi-user, ie. no telnet-sessions, no
rsh, no ssh etc. being possible and the thought about Windoze with Cygwin/X11 working with X11-
'client' applications giving the control of the apps to 'X11-servers' on other hosts, might be
somehow impossible... Anyone knows if this is the case ?

 Of course I can do with this issue like I did with the Mingw/Win32 and Mingw/Win32s cases, when
nobody else had done these ports, I did the ports myself. Of course all the thread-support etc.
in later GDBs forced to leave the Win3.1x/Win32s-port in gdb-4.18/Insight-1998/99 GUI-level...
A little clumsy if compared to the current Insights. And all the BSD-sockets code made for Cygwin
must still be converted to Winsock, while the serial-port connections using the 'ser-win32s.c'
from the older 'WinGDB' ('GDB for Windows') port (from Cygnus), seem to work quite well... Using
the 'Nokia-way' of letting the customers to test the products, not having the possibility to test
them myself, I put 10 Mingw-hosted Insights built for different targets for download and then heard
how they did work... This happened during 1999-2000... BTW, one reason for this was to show that
it is possible (people writing that it is impossible to produce a Mingw-hosted Insight and nobody
should even think Win32s with this), is always a challenge when one thinks otherwise. But the word
'impossible' usually means "don't ever think that I would try to do it", ie. the idea about the
person or some company doing it without a payment is impossible, while the idea itself isn't...

 When so many people seem to be knowing about BSD-sockets, X11 etc. 'Unix'-things, and so few know
anything about the Win32-API things, as the 'Insight for Mingw/native-Win32'-case has showed, I
thought someone could have tried the "Insight for X11 on Cygwin and controlling it remotely from
Linux" before... Even 'just for a fun', or some clever professor putting students to learn about
X11-things, sockets etc. in very 'useful' way... At least one person has asked about the possibility
to use only Linux in the Win32-target development. The debug-phase has forced one to use the 'evil'
MS-opsys and the native Insight there. The X11-based one would also be a 'native' application, but
using it remotely from a non-Windoze system should be possible.

 Doing this vice-versa, ie. controlling a X11-based Insight running on a Linux, Solaris2, Irix etc.
hosts, from a Windoze-system with a X11-based 'server' should also be possible, the 'gdbserver'
approach doesn't look just as good.  But my thought is that the 'X11-server' on Windoze is still
a big problem.  Anyway doing the native-app debugging from some remote host in both cases would
be nice... 

 If one builds a 'Linux-x-Cygwin' cross-toolkit with binutils and GCC, a 'Linux-x-Cygwin' remote-
GDB would be the obvious next phase... Funny but I really built one recently, running on Linux host,
but forgot to test it in any way because thinking that it cannot be used in any sane way... But
there are some things like :

 - does it load a Win32-app compiled with '-g' and show the source in the 'Source Window' ?

 - must the run-time DLLs ('cygwin1.dll', 'kernel32.dll' etc.) be present ?

 - is there a 'GDB-stub' available for the 'embedded Windoze system' ?  Could the 'remote
   serial', 'remote ip-port' etc. be used with it somehow ?

 Extracting stuff from 'gdb/win32-nat.c' into 'gdb/win32-tdep.c' and including the built object
to the needed ones for the Win32-target, enabled the 'impossible' build...

    # Can't build gdb for Cygwin if not native.
    case "${host}" in
      *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
         ;;
    esac
    ;;

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]