On 07/16/2013 05:21 AM, Tilmann Scheller wrote:> Hi Reed, > > I’ve used Eclipse for a long time to do LLVM development on Linux (both for code navigation/editing and debugging), any recent Linux distribution and version of Eclipse should be fine (even older versions should be good enough as this has been working for many years). > > Xcode works fine as well, I started to use Xcode exclusively when I switched to OS X. > > The key to make this work is to use CMake to generate project files for Eclipse/Xcode, you can do this by specifying the appropriate generator on the command line e.g. -G Xcode or -G "Eclipse CDT4 - Unix Makefiles”. Then you can just open the generated project file. Mind you, the generated projects are kind of ugly e.g. the Xcode project has like more than 200 targets but apart from that they are working fine. > > In terms of key bindings both Eclipse and Xcode ship with Emacs key bindings and there are plugins which allow you to use vim key bindings as well. With Eclipse I’ve been using the Viable plugin for that and for Xcode there is Xvim. > > Hope this helps :) > > Regards, > > Tilmann >The source browsing is way better this way. This following pointer may be useful to others to complete the importing of the project. http://www.vtk.org/Wiki/Eclipse_CDT4_Generator How are you setting up the debugger? For example, if you want to run from clang but debug the back end code generation ? Which process launcher? Protocol == mi? BTW: do you do builds inside of eclipse. Seems to be kind of slow. Tia. Reed> On Jul 16, 2013, at 1:05 PM, reed kotler <rkotler at mips.com> wrote: > >> Is anyone using Eclipse and gdb to debug llvm/clang? >> If so, which version of Eclipse, gdb and linux flavor. >> >> I just use gdb currently. >> >> I'm going to try using my mac also. >> Is anyone using xcode/lldb to debug llvm/clang? >> >> Tia. >> >> Reed >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
I made wiki pages on this. https://dmz-portal.mips.com/wiki/Building_with_Cmake_to_create_an_Eclipse_Project https://dmz-portal.mips.com/wiki/Importing_the_Project_into_Eclipse On 07/16/2013 02:10 PM, Reed Kotler wrote:> On 07/16/2013 05:21 AM, Tilmann Scheller wrote: >> Hi Reed, >> >> I’ve used Eclipse for a long time to do LLVM development on Linux >> (both for code navigation/editing and debugging), any recent Linux >> distribution and version of Eclipse should be fine (even older >> versions should be good enough as this has been working for many years). >> >> Xcode works fine as well, I started to use Xcode exclusively when I >> switched to OS X. >> >> The key to make this work is to use CMake to generate project files >> for Eclipse/Xcode, you can do this by specifying the appropriate >> generator on the command line e.g. -G Xcode or -G "Eclipse CDT4 - Unix >> Makefiles”. Then you can just open the generated project file. Mind >> you, the generated projects are kind of ugly e.g. the Xcode project >> has like more than 200 targets but apart from that they are working fine. >> >> In terms of key bindings both Eclipse and Xcode ship with Emacs key >> bindings and there are plugins which allow you to use vim key bindings >> as well. With Eclipse I’ve been using the Viable plugin for that and >> for Xcode there is Xvim. >> >> Hope this helps :) >> >> Regards, >> >> Tilmann >> > > The source browsing is way better this way. > > This following pointer may be useful to others to complete the importing > of the project. > > http://www.vtk.org/Wiki/Eclipse_CDT4_Generator > > How are you setting up the debugger? > > For example, if you want to run from clang but debug the back end code > generation ? > > Which process launcher? > > Protocol == mi? > > BTW: do you do builds inside of eclipse. > Seems to be kind of slow. > > Tia. > > Reed > >> On Jul 16, 2013, at 1:05 PM, reed kotler <rkotler at mips.com> wrote: >> >>> Is anyone using Eclipse and gdb to debug llvm/clang? >>> If so, which version of Eclipse, gdb and linux flavor. >>> >>> I just use gdb currently. >>> >>> I'm going to try using my mac also. >>> Is anyone using xcode/lldb to debug llvm/clang? >>> >>> Tia. >>> >>> Reed >>> >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Jul 16, 2013, at 11:10 PM, Reed Kotler <rkotler at mips.com> wrote:> > The source browsing is way better this way.Definitely! Once I used this for the first time I never wanted to go back to grep for source navigation, it’s so much faster :)> How are you setting up the debugger? > > For example, if you want to run from clang but debug the back end code generation ?I just create a new launch configuration specifying the binary/working directory/command line arguments and run it in debug mode.> BTW: do you do builds inside of eclipse. > Seems to be kind of slow.I actually never did a build with Eclipse, only used it for code navigation and debugging :) I do builds with Xcode from time to time when I want to debug from within Xcode (when I’m not using LLDB on the command line) because I haven’t figured out yet how to use Xcode to debug a binary which was built outside of Xcode. The experience is not that great either though, especially incremental building seems to be kind of broken. E.g. before launching the binary in the debugger it will always build the project first to make sure it’s up to date, so in theory if you run your binary twice and didn’t make any changes to the source code after the first run, then in the second run, you should only have an added overhead of determining that nothing has changed. However, in practice a significant amount of time is spent on just determining that nothing has changed and it also looks like stuff gets rebuilt even though there’s is no need to. I haven’t spent any time to track down what’s actually the problem there but I assume it has to do with the way CMake generates Xcode projects. It’s possible to start debugging without building though so it’s rather easy to workaround :) Regards, Tilmann -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130717/18a64d6b/attachment.html>
On Jul 17, 2013, at 1:19 PM, Tilmann Scheller <tscheller at apple.com> wrote:> I actually never did a build with Eclipse, only used it for code navigation and debugging :)Actually that’s not really true, I did build with Eclipse from time to time to get all the sources TableGen generates automatically. This is really nice because the source navigation works just fine across handwritten and automatically generated files. What I meant to say is that I have two build directories, one for Eclipse/Xcode to have a project file for source navigation and one for my regular build on the console which I use for all the actual development work. Regards, Tilmann -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130717/bf1f67e7/attachment.html>