Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2008 18:08:51 -0600
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        "Stephane E. Potvin" <sepotvin@FreeBSD.org>
Cc:        freebsd-eclipse@freebsd.org
Subject:   Re: eclipse-cdt debugging doesn't work on FreeBSD 7.0 amd64?
Message-ID:  <20081111000851.GA64507@keira.kiwi-computer.com>
In-Reply-To: <4918A055.7090505@FreeBSD.org>
References:  <e465331f0811091933p160a05b1u797f54f32feae5da@mail.gmail.com> <49182E34.2010504@FreeBSD.org> <20081110201637.GA56821@keira.kiwi-computer.com> <4918A055.7090505@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081111000851.GA64507>