Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » setup for use with FreeBSD ports(How best to configure CDT for debugging a freebsd port)
setup for use with FreeBSD ports [message #1109090] Sat, 14 September 2013 22:31 Go to next message
Gary Aitken is currently offline Gary AitkenFriend
Messages: 11
Registered: July 2009
Junior Member
I've only used eclipse for "stand-alone" java projects, meaning ones written from the ground up where everything about them is understood, so I probably need a lot of guidance here. It's been a while; I'm having to relearn due to lost brain cells. This has probably been answered before but I didn't find what I was looking for with a search.

I'm trying to use CDT to debug a C++ port under FreeBSD. These ports all reside under /usr/ports/<category>/<portname>/ and have their own Makefiles with the usual bazillions of dependencies, includes, and build-time defines.

When the port is expanded from its tarball, the subdirectory work/<xxx>/src is where the main C++, C, and headers sit, with subdirs under that.

In a crude attempt, I set up a project and set the source to /usr/ports/<category>/<portname>/work/<xxx>/src by adding a reference in the wizard; or at least that's what I *think* I did.

Questions:

1. When I look at the project properties, I don't see where the source is anywhere.
Where do I see the location of source files in the UI? What happens when I specify the source as a reference to some other directory?

2. When I tried an initial debug compile, I got boatloads of errors and have manually added each of the header file locations to the compile -I path. Is there a better way to do this?

3. Is there any way to actually use the Makefile structure already set up in the ports tree?

4. If instead of trying to build everything in CDT, I do debug builds within the ports make structure (e.g. cd dir, make WITH_DEBUG=yes), how do I set up CDT for use as a debugger without having it try to build everything itself?

Any and all help and suggestions welcome.
Thanks.
Re: setup for use with FreeBSD ports [message #1109214 is a reply to message #1109090] Sun, 15 September 2013 03:28 Go to previous messageGo to next message
Gary Aitken is currently offline Gary AitkenFriend
Messages: 11
Registered: July 2009
Junior Member
Answer to #1:
In the project explorer, under the project name, the source is listed under the sub-tree item "src". I think everybody knows that...
Right click on "src" and select "Properties" from the popup menu.
The dialog displayed, "Properties for src", comes up by default with the "Resource" item selected on the left.
On the right the third and fourth items are "Location:" and "Resolved location:"

Anyone have answers for #2-4?
Re: setup for use with FreeBSD ports [message #1110025 is a reply to message #1109214] Mon, 16 September 2013 08:53 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1967
Registered: July 2009
Senior Member
Quote:
2. When I tried an initial debug compile, I got boatloads of errors and have manually added each of the header file locations to the compile -I path. Is there a better way to do this?

Are these system include paths?

Quote:
4. If instead of trying to build everything in CDT, I do debug builds within the ports make structure (e.g. cd dir, make WITH_DEBUG=yes), how do I set up CDT for use as a debugger without having it try to build everything itself?

http://help.eclipse.org/kepler/topic/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm?cp=9_3_5_1_0
You can define the executable in the debug config.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: setup for use with FreeBSD ports [message #1110235 is a reply to message #1110025] Mon, 16 September 2013 15:29 Go to previous message
Gary Aitken is currently offline Gary AitkenFriend
Messages: 11
Registered: July 2009
Junior Member
Quote:
Quote:
2. When I tried an initial debug compile, I got boatloads of errors and have manually added each of the header file locations to the compile -I path. Is there a better way to do this?


Are these system include paths?


Yes and no.
They are hierarchies specific to the application being built,
not on a system path;
and hierarchies rooted at a standard system location.

e.g.
/usr/ports/graphics/lprof-devel/work/lprof/src
/usr/ports/graphics/lprof-devel/work/lprof/src/libqtlcmswidgets

/usr/local/include
/usr/local/include/Qt4
/usr/local/include/Qt4/Qt

Quote:
Quote:

4. If instead of trying to build everything in CDT, I do debug builds within the ports make structure (e.g. cd dir, make WITH_DEBUG=yes), how do I set up CDT for use as a debugger without having it try to build everything itself?


http://help.eclipse.org/kepler/topic/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm?cp=9_3_5_1_0
You can define the executable in the debug config.


Thanks.
The most recent freebsd port is indigo 3.7, but switching to help for that
and interpreting (the help does not match the dialog I get) seemed to work,
at least for starters.
Previous Topic:Unresolved symbols
Next Topic:Logs of cdt-tests-runner
Goto Forum:
  


Current Time: Mon Nov 24 09:44:21 GMT 2014

Powered by FUDForum. Page generated in 0.04115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software