From owner-freebsd-eclipse@FreeBSD.ORG Mon Nov 10 04:01:14 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 CFE251065686 for ; Mon, 10 Nov 2008 04:01:14 +0000 (UTC) (envelope-from rumuru@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7458FC12 for ; Mon, 10 Nov 2008 04:01:14 +0000 (UTC) (envelope-from rumuru@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so1409885qwb.7 for ; Sun, 09 Nov 2008 20:01:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=s9oivxK8WSy9lUbiSYt4XPeGcQmUz7kR28l1AIcuPzU=; b=CQUsEWC/TyiJr9ppQNCFMTptNVEgceSsRzNAasOL3ybv6OGeB0+xrBluqE/UftANle ByYQ+8cLxw53ArN/cAkmWvHBCiRJISQdGDwZpe/OTmr49XUwvqF7k+uKwcmnjS/GkuGS EhVJThdKSdX4KKu6nIPZMk2kFyD0r85RzPIuk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=nu0iE6kzqLnDuWphNUHp+owL84CJOnPhBXNZgO6DT3itYpTo3u1qsqBy7JdThgaO5E zXQ6LHfFQ+J4LKrHFNs6OA0ZUOdleT+Mxr1AK31MNwC5jQWsTzB4eAnpAZ6gDaJ/h2EC lOn68FbFjqVIvWG9z513Dodq4NKQZAU6RhGqs= Received: by 10.215.101.2 with SMTP id d2mr6026801qam.238.1226287998009; Sun, 09 Nov 2008 19:33:18 -0800 (PST) Received: by 10.215.41.10 with HTTP; Sun, 9 Nov 2008 19:33:17 -0800 (PST) Message-ID: Date: Sun, 9 Nov 2008 22:33:17 -0500 From: "Mungyung Ryu" To: freebsd-eclipse@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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 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: Mon, 10 Nov 2008 04:01:14 -0000 Hello BSD guys, My system information is like this. - FreeBSD 7.0-RELEASE amd64 - gcc 4.2.1 - gdb 6.1.1 - eclipse-cdt-3.1.2_1 I used ports tree to compile and install eclipse-cdt-3.1.2_1. Running eclipse and compiling my C++ project are fine. But, when I try to debug, an error dialog box pops up and says 'Target selection failed'. The verbose console mode of the debugger option prints below. 46-gdb-set confirm off 46^done (gdb) 47-gdb-set width 0 47^done (gdb) 48-gdb-set height 0 48^done (gdb) 49-interpreter-exec console echo 49^done (gdb) 50-gdb-show prompt 50^done,value="(gdb) " (gdb) 51-gdb-set auto-solib-add on 51^done (gdb) 52-gdb-set stop-on-solib-events 0 52^done (gdb) 53-gdb-set stop-on-solib-events 1 53^done (gdb) 54-gdb-set remotebaud 115200 54^done (gdb) 55-target-select remote /dev/ttyS0 &"/dev/ttyS0: No such file or directory.\n" /dev/ttyS0: No such file or directory. 55^error,msg="/dev/ttyS0: No such file or directory." (gdb) 56-gdb-exit 56^exit The default debugger option of the eclipse is below. Debugger: gdbserver Debugger GDB debugger: gdb GDB command file: .gdbinit GDB command set: Standard Protocol: mi Connection Type: Serial Device: /dev/ttyS0 Speed: 115200 As the error message says, there is no file or directory at /dev/ttyS0 in my system. I've also tried another debugger connection option like below. Connection Type: TCP Host name or IP address: localhost Port number: 10000 It prints message like this. 68-gdb-set confirm off 68^done (gdb) 69-gdb-set width 0 69^done (gdb) 70-gdb-set height 0 70^done (gdb) 71-interpreter-exec console echo 71^done (gdb) 72-gdb-show prompt 72^done,value="(gdb) " (gdb) 73-gdb-set auto-solib-add on 73^done (gdb) 74-gdb-set stop-on-solib-events 0 74^done (gdb) 75-gdb-set stop-on-solib-events 1 75^done (gdb) 76-target-select remote localhost:10000 &"localhost:10000: Connection refused.\n" localhost:10000: Connection refused. 76^error,msg="localhost:10000: Connection refused." (gdb) 77-gdb-exit 77^exit I'm using PF for a firewall and opened TCP connection for port 10000 and I even disabled PF, but it has same error. There is anybody who've had and solved this kind of problem of eclipse? I'll really appreciate your solution. Going back to the command line gdb is quite miserable. I really wanna use eclipse for C++ debugging. Thanks. From owner-freebsd-eclipse@FreeBSD.ORG Mon Nov 10 06:16: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 AE373106564A for ; Mon, 10 Nov 2008 06:16:53 +0000 (UTC) (envelope-from mbowie@buzmo.com) Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5EB8FC08 for ; Mon, 10 Nov 2008 06:16:53 +0000 (UTC) (envelope-from mbowie@buzmo.com) X-VirusChecked: Checked X-Env-Sender: mbowie@buzmo.com X-Msg-Ref: server-6.tower-191.messagelabs.com!1226297803!40791068!1 X-StarScan-Version: 5.5.12.14.2; banners=-,-,- X-Originating-IP: [69.12.11.76] Received: (qmail 1596 invoked from network); 10 Nov 2008 06:16:44 -0000 Received: from smtp0.dfw.fabriclabs.com (HELO smtp0.dfw.fabriclabs.com) (69.12.11.76) by server-6.tower-191.messagelabs.com with AES256-SHA encrypted SMTP; 10 Nov 2008 06:16:44 -0000 Received: from Macintosh.sv.fabriclabs.net ([99.7.126.96]) (authenticated bits=0) by smtp0.dfw.fabriclabs.com (8.13.7/8.13.6) with ESMTP id mAA6Gxsx081394; Mon, 10 Nov 2008 00:17:00 -0600 (CST) (envelope-from mbowie@buzmo.com) Message-ID: <4917D1D0.5020304@buzmo.com> Date: Sun, 09 Nov 2008 22:16:48 -0800 From: Mike Bowie User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Mungyung Ryu References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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: Mon, 10 Nov 2008 06:16:53 -0000 Mungyung Ryu wrote: > Hello BSD guys, > > My system information is like this. > - FreeBSD 7.0-RELEASE amd64 > - gcc 4.2.1 > - gdb 6.1.1 > - eclipse-cdt-3.1.2_1 > > I used ports tree to compile and install eclipse-cdt-3.1.2_1. > Running eclipse and compiling my C++ project are fine. > But, when I try to debug, an error dialog box pops up and says 'Target > selection failed'. > The verbose console mode of the debugger option prints below. > ==== snip ==== > > I'm using PF for a firewall and opened TCP connection for port 10000 and > I even disabled PF, but it has same error. > > There is anybody who've had and solved this kind of problem of eclipse? > I'll really appreciate your solution. > Going back to the command line gdb is quite miserable. > I really wanna use eclipse for C++ debugging. > > Thanks. > _______________________________________________ > freebsd-eclipse@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-eclipse > To unsubscribe, send any mail to "freebsd-eclipse-unsubscribe@freebsd.org" Hi Mungyung, I seem to recall installing CDT from the update site in recent times; although I've not used it extensively, nor for debugging... might I suggest building a shiny new port from eclipse or eclipse-devel (Ganymede) and seeing if installing via the update manager yields a improved result? My suggestion isn't really based on any kind of facts; simply an alternate approach. Best of luck, Mike. -- "You don't see FreeBSD developers sitting in a smoke-filled room plotting the overthrow of Microsoft. We sit in light, airy rooms and plot where to get the best drinks." - Michael Lucas From owner-freebsd-eclipse@FreeBSD.ORG Mon Nov 10 12:51:01 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 EA6631065670 for ; Mon, 10 Nov 2008 12:51:01 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id B88FE8FC16 for ; Mon, 10 Nov 2008 12:51:01 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [10.0.0.247] ([67.70.237.74]) by VL-MH-MR002.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0KA400CKKBP0UO90@VL-MH-MR002.ip.videotron.ca> for freebsd-eclipse@freebsd.org; Mon, 10 Nov 2008 07:51:00 -0500 (EST) Message-id: <49182E34.2010504@FreeBSD.org> Date: Mon, 10 Nov 2008 07:51:00 -0500 From: "Stephane E. Potvin" Organization: FreeBSD User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) To: Mungyung Ryu References: In-reply-to: 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 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: Mon, 10 Nov 2008 12:51:02 -0000 Mungyung Ryu wrote: > Hello BSD guys, > > My system information is like this. > - FreeBSD 7.0-RELEASE amd64 > - gcc 4.2.1 > - gdb 6.1.1 > - eclipse-cdt-3.1.2_1 > > I used ports tree to compile and install eclipse-cdt-3.1.2_1. > Running eclipse and compiling my C++ project are fine. > But, when I try to debug, an error dialog box pops up and says 'Target > selection failed'. > The verbose console mode of the debugger option prints below. > [...gdb messages...] > > The default debugger option of the eclipse is below. > > Debugger: gdbserver Debugger > GDB debugger: gdb > GDB command file: .gdbinit > GDB command set: Standard > Protocol: mi > Connection > Type: Serial > Device: /dev/ttyS0 > Speed: 115200 > > As the error message says, there is no file or directory at /dev/ttyS0 in my > system. > > I've also tried another debugger connection option like below. > Connection > Type: TCP > Host name or IP address: localhost > Port number: 10000 > > It prints message like this. > [...gdb messages...] > > I'm using PF for a firewall and opened TCP connection for port 10000 and > I even disabled PF, but it has same error. > > There is anybody who've had and solved this kind of problem of eclipse? > I'll really appreciate your solution. > Going back to the command line gdb is quite miserable. > I really wanna use eclipse for C++ debugging. > Hi Mungyung, You might want to try eclipse-devel (ganymede) with cdt installed via Eclipse update (not via ports). Make sure you select the "Linux Toolchain" when creating your project and debugging should work fine. Bug me if something doesn't work. Steph From owner-freebsd-eclipse@FreeBSD.ORG Mon Nov 10 20:43:19 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 C526B106567B for ; Mon, 10 Nov 2008 20:43:19 +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 579A18FC1A for ; Mon, 10 Nov 2008 20:43:19 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 57186 invoked by uid 2001); 10 Nov 2008 20:16:37 -0000 Date: Mon, 10 Nov 2008 14:16:37 -0600 From: "Rick C. Petty" To: "Stephane E. Potvin" Message-ID: <20081110201637.GA56821@keira.kiwi-computer.com> References: <49182E34.2010504@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49182E34.2010504@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: Mon, 10 Nov 2008 20:43:19 -0000 On Mon, Nov 10, 2008 at 07:51:00AM -0500, Stephane E. Potvin wrote: > > You might want to try eclipse-devel (ganymede) with cdt installed via > Eclipse update (not via ports). Make sure you select the "Linux > Toolchain" when creating your project and debugging should work fine. > Bug me if something doesn't work. Unlike the original poster, I'm on FreeBSD 7.1-PRERELEASE for i386. 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? Here are the two things that don't seem to be working correctly for me: - 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. - 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. *** My installed software *** FreeBSD Eclipse SDK 3.4.1.1 (build id: M20080911-1700) CDT GNU Toolchain Build Support 5.0.1.200809120802 CDT GNU Toolchain Debug Support 5.0.1.200809120802 Eclipse C/C++++ Development Tools 5.0.1.200809120802 LR Parser 5.0.1.200809120802 -- Rick C. Petty From owner-freebsd-eclipse@FreeBSD.ORG Mon Nov 10 20:57:59 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 9E0341065672 for ; Mon, 10 Nov 2008 20:57:59 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7005B8FC16 for ; Mon, 10 Nov 2008 20:57:59 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [10.0.0.247] ([67.70.237.74]) by VL-MO-MR002.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0KA4004V0Y8M6750@VL-MO-MR002.ip.videotron.ca> for freebsd-eclipse@freebsd.org; Mon, 10 Nov 2008 15:57:58 -0500 (EST) Message-id: <4918A055.7090505@FreeBSD.org> Date: Mon, 10 Nov 2008 15:57:57 -0500 From: "Stephane E. Potvin" Organization: FreeBSD User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) To: rick-freebsd2008@kiwi-computer.com References: <49182E34.2010504@FreeBSD.org> <20081110201637.GA56821@keira.kiwi-computer.com> In-reply-to: <20081110201637.GA56821@keira.kiwi-computer.com> 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 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: Mon, 10 Nov 2008 20:57:59 -0000 Rick C. Petty wrote: > On Mon, Nov 10, 2008 at 07:51:00AM -0500, Stephane E. Potvin wrote: >> You might want to try eclipse-devel (ganymede) with cdt installed via >> Eclipse update (not via ports). Make sure you select the "Linux >> Toolchain" when creating your project and debugging should work fine. >> Bug me if something doesn't work. > > Unlike the original poster, I'm on FreeBSD 7.1-PRERELEASE for i386. > > 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. > Here are the two things that don't seem to be working correctly for me: > > - 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? > - 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. > > *** My installed software *** > > FreeBSD Eclipse SDK 3.4.1.1 (build id: M20080911-1700) > CDT GNU Toolchain Build Support 5.0.1.200809120802 > CDT GNU Toolchain Debug Support 5.0.1.200809120802 > Eclipse C/C++++ Development Tools 5.0.1.200809120802 > LR Parser 5.0.1.200809120802 > > -- Rick C. Petty Steph 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 From owner-freebsd-eclipse@FreeBSD.ORG Tue Nov 11 06:15:22 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 B7CC21065686 for ; Tue, 11 Nov 2008 06:15:22 +0000 (UTC) (envelope-from rumuru@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 6118E8FC16 for ; Tue, 11 Nov 2008 06:15:22 +0000 (UTC) (envelope-from rumuru@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so1830921qwb.7 for ; Mon, 10 Nov 2008 22:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=3qbmzpBgreyKi+LLkBDT9Vag2SjTS9s2iFIQDfXzADc=; b=kyNhQjtDaVfN3Y+6G4NHvmC0p8zodPkXoUBzTLpaty/JujT8QBdP5+fhkXIsiQ9m7K CXkdFP+xURA88qMC6ZgVq8jSs83eaBMcNQxmNWuob5ECV7Ex/C+J+hvV58mOawBHy/eT caocOMZ4g9ApFM77kdVE/vBWIvxfuD/lgKjTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=oKcrrbkGzfIn5X1SskK2Mf86PtO++uZvT/ErHuBeDlL2wsHZTAIXRluOtzKKfFwfxB pqjousUZ2ClVx/5QImJBu/GXHN3RbeTS+P9G2riAJF1Xwqgl6MfJNHJag0+izG81NGXL OGiqoLVPspTrR4+SS7g6XS/tvUpeUmsyPTL30= Received: by 10.214.184.8 with SMTP id h8mr7794342qaf.313.1226384121362; Mon, 10 Nov 2008 22:15:21 -0800 (PST) Received: by 10.215.41.10 with HTTP; Mon, 10 Nov 2008 22:15:21 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 01:15:21 -0500 From: "Moonkyung Ryu" To: "Stephane E. Potvin" In-Reply-To: <491850C1.9080203@FreeBSD.org> MIME-Version: 1.0 References: <49182E34.2010504@FreeBSD.org> <491850C1.9080203@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 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 06:15:22 -0000 Thanks a lot Stephane! I finally installed eclipse-devel and succeeded in debugging. But I have a question. Which debugger option do you usually use? There are 3 debugger options 1. gdb/mi 2. gdb Debugger 3. gdbserver Debugger To me, 3 doesn't work. I guess 3 is for remote debugging. And then, what is the difference between 1 and 2? Thanks. On Mon, Nov 10, 2008 at 10:18 AM, Stephane E. Potvin wrote: > Moonkyung Ryu wrote: > >> Thanks for answers, guys. >> >> I'm pretty new in FreeBSD so, I wanna ask one more question. >> >> What do you mean "try eclipse-devel (ganymede) with cdt installed via >> Eclipse update (not via ports)"? >> >> I guess you're saying not to use ports or pkg_add. >> >> What do you mean "via eclipse update"? >> >> You mean I should go to Eclipse website and download it? >> >> But there is no eclipse for FreeBSD on the official eclipse website. >> >> Thanks. >> >> Hi, > > The eclipse-devel port in FreeBSD's port tree is the version 3.4.1, which > is codenamed "Eclipse Ganymede" by the eclipse project. You should use the > eclipse-devel port to install it. The cdt plugin, unfortunately, has not > been updated yet in the FreeBSD port tree to a version that works with > eclipse-devel. Thus, you should use the built-in capabilities of Eclipse to > install plugins to install cdt. To do that, just go to "Help->Software > Updates...", you'll then need to add a new update site in the "Available > Software" tab. Select "Add Site..." and use the following address " > http://download.eclipse.org/releases/ganymede/". You should now be able to > select the "C and C++ Development" checkbox and install it with the > "Install..." button. > > Hope this helps... > > Steph > -- ****************************************************************************** Mungyung Ryu Ph.D. Student. College of Computing Georgia Institute of Technology, Atlanta ****************************************************************************** From owner-freebsd-eclipse@FreeBSD.ORG Tue Nov 11 16:46:39 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 2C966106567C for ; Tue, 11 Nov 2008 16:46:39 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0C08FC08 for ; Tue, 11 Nov 2008 16:46:38 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [10.0.0.247] ([67.70.237.74]) by VL-MO-MR003.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0KA600EHDH94F530@VL-MO-MR003.ip.videotron.ca> for freebsd-eclipse@freebsd.org; Tue, 11 Nov 2008 11:46:17 -0500 (EST) Message-id: <4919B6D7.7040501@FreeBSD.org> Date: Tue, 11 Nov 2008 11:46:15 -0500 From: "Stephane E. Potvin" Organization: FreeBSD User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) To: rick-freebsd2008@kiwi-computer.com References: <49182E34.2010504@FreeBSD.org> <20081110201637.GA56821@keira.kiwi-computer.com> <4918A055.7090505@FreeBSD.org> <20081111000851.GA64507@keira.kiwi-computer.com> In-reply-to: <20081111000851.GA64507@keira.kiwi-computer.com> 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 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 16:46:39 -0000 Rick C. Petty wrote: > 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. > The Eclipse cdt plugin does not provide any C/C++ compiler, it uses the native compiler on the platform. The toolchain selections tells Eclipse how to call the compiler on the platform and how to enable/disable features of the compiler. If you use the "Other toolchain" then as Eclipse doesn't know how to call the compiler on the platform it cannot generate the makefile itself. If you use the linux toolchain then it will be able to create a makefile and will call the compiler/linker as if it were the Linux one. As we use the same compiler/linker as Linux it works correctly most of the time. If you use your own makefiles, this settings should not have any effects. >>> - 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. > Yes, the call to getpt() should be changed to a call to posix_openpt(). The shared library must also be rebuilt to be a native library. The libpty.so and libspawner.so libraries are in the linux fragment which is not installed as the platform doesn't match. Unfortunately, the building process has changed between cdt 4.0 and cdt 5.0 and I was not able to use the eclipse-cdt port as it is right now to build cdt 5.0. I have a port of cdt 5.0 in progress but it's not ready yet. As whether it will be possible to push the changes upstream, I'll try to do it but I don't know if they will be accepted. >>> - 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. > I'll keep you posted if I find something. If you have a small project that reproduce this it would probably help a lot. > Thanks for all your help, > You're welcome! Steph From owner-freebsd-eclipse@FreeBSD.ORG Tue Nov 11 16:58:23 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 F3E441065678 for ; Tue, 11 Nov 2008 16:58:22 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id D415A8FC30 for ; Tue, 11 Nov 2008 16:58:22 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [10.0.0.247] ([67.70.237.74]) by VL-MO-MR005.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0KA600A3CHM7XWI0@VL-MO-MR005.ip.videotron.ca> for freebsd-eclipse@freebsd.org; Tue, 11 Nov 2008 11:54:09 -0500 (EST) Message-id: <4919B8D6.1040407@FreeBSD.org> Date: Tue, 11 Nov 2008 11:54:46 -0500 From: "Stephane E. Potvin" Organization: FreeBSD User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) To: Moonkyung Ryu References: <49182E34.2010504@FreeBSD.org> <491850C1.9080203@FreeBSD.org> In-reply-to: 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 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 16:58:23 -0000 Moonkyung Ryu wrote: > Thanks a lot Stephane! > > I finally installed eclipse-devel and succeeded in debugging. > But I have a question. > Which debugger option do you usually use? > There are 3 debugger options > 1. gdb/mi > 2. gdb Debugger > 3. gdbserver Debugger > > To me, 3 doesn't work. I guess 3 is for remote debugging. > And then, what is the difference between 1 and 2? > You're right for #3, gdbserver is used to do remote debugging. As for gdb/mi, it's the machine interface of gdb. It's easier to use programmatically than the human interface. If the gdb you're using supports it (which is the case on FreeBSD), you're better off using gdb/mi with Eclipse. Steph