From owner-freebsd-eclipse@FreeBSD.ORG Tue Nov 11 00:08:53 2008 Return-Path: Delivered-To: freebsd-eclipse@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E29F11065672 for ; Tue, 11 Nov 2008 00:08:52 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 9371D8FC14 for ; Tue, 11 Nov 2008 00:08:52 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 67786 invoked by uid 2001); 11 Nov 2008 00:08:51 -0000 Date: Mon, 10 Nov 2008 18:08:51 -0600 From: "Rick C. Petty" To: "Stephane E. Potvin" Message-ID: <20081111000851.GA64507@keira.kiwi-computer.com> References: <49182E34.2010504@FreeBSD.org> <20081110201637.GA56821@keira.kiwi-computer.com> <4918A055.7090505@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4918A055.7090505@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-eclipse@freebsd.org Subject: Re: eclipse-cdt debugging doesn't work on FreeBSD 7.0 amd64? X-BeenThere: freebsd-eclipse@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: "FreeBSD users of eclipse EDI, tools, rich client apps & ports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 00:08:53 -0000 On Mon, Nov 10, 2008 at 03:57:57PM -0500, Stephane E. Potvin wrote: > Rick C. Petty wrote: > > > >I've been using ganymede and CDT 5.0.1 via the update site > >(http://download.eclipse.org/tools/cdt/releases/ganymede/) and was able to > >get debugging to work, eventually. It was painful to set up and I don't > >recall my exact steps. I did use the "Other Toolchain" instead of Linux > >Toolchain, but that shouldn't make a difference, right? > > > It depends, If you want to use a managed Makefile project then you'll > have to select a valid Toolchain (Linux being the one closest to us, so > the more likely to work out of the box). If you provide your own > Makefile then it should not make much of a difference as Eclipse won't > control how the compiler/linker will be called anyway. Is the compiler/linker called from Eclipse any faster than run through a standard make operation? I would just like to know what the advantages are for using the Linux toolchain, since things seem to be working for the most part using the native toolchain. > >- Program I/O does not appear in the console, even though a console is > >allocated when the program starts. I am able to step through code but > >nothing appears in the console, even if I use fflush(). Online > >investigation revealed few secrets. > > > stdout and stdin should both work fine. stderr will not work with the > stock cdt plugin. The pty allocation functions are not the same between > Linux and FreeBSD and as such don't really work with the Linux plugin. > The cdt plugin will need to be ported for this to work correctly. Could > you provide me with a small Eclipse project that reproduce this? Aha, I just realized all my output was via stderr. I assume the difference is the change described in ports/java/eclipse-cdt/files/patch-cdt.core-openpty.c which changes a call from getpt() to posix_openpt(O_RDWR). I can't seem to find any reference to getpt() anywhere. I also couldn't find the libpty.so or libspawner.so anywhere in the 5.0.1 CDT jars, so they must have changed this drastically. About the closest things I could find was located in org.eclipse.cdt.core_5.0.1.200809120802.jar: org/eclipse/cdt/utils/pty/ org/eclipse/cdt/utils/pty/PTY$MasterFD.class org/eclipse/cdt/utils/pty/PTY.class org/eclipse/cdt/utils/pty/PTYInputStream.class org/eclipse/cdt/utils/pty/PTYOutputStream.class org/eclipse/cdt/utils/spawner/ org/eclipse/cdt/utils/spawner/EnvironmentReader.class org/eclipse/cdt/utils/spawner/ProcessFactory.class org/eclipse/cdt/utils/spawner/Spawner$1.class org/eclipse/cdt/utils/spawner/Spawner$Reaper.class org/eclipse/cdt/utils/spawner/Spawner.class org/eclipse/cdt/utils/spawner/SpawnerInputStream.class org/eclipse/cdt/utils/spawner/SpawnerOutputStream.class Is there any chance that we could push a patch upstream to the CDT group? I like the idea of using eclipse's software updates over a separate FreeBSD port per project. Also, I'm not sure what to patch at this point since much has changed since CDT 3.1.2. > >- Auto-build does not work as expected. Sometimes when I save files, it > >will run a "make build" (I gave it the "build" target for incremental > >builds). Othertimes (more often than not), it fails to do anything when I > >save changes. I had to disable the auto-build for this project and I have > >to manually build the project, of which I often forget to do. > > Hmm... I never enable this function as I don't want a full > buildworld/buildkernel to kick in each time I save a file so I can't > comment. I'll try to setup a small project and see if I can find something. I've grown accustomed to the autobuild when working with Java that I'd like to see it work here too. Thanks for all your help, -- Rick C. Petty