CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2....

22
CDT: Latest & Greatest Tooling for C/C++ Jonah Graham, Kichwa Coders EclipseCon France 2016

Transcript of CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2....

Page 1: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

CDT: Latest & Greatest Tooling for C/C++

Jonah Graham, Kichwa Coders

EclipseCon France 2016

Page 2: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

CDT: The Open Source IDE for C/C++

• Demo of Features

• New & Noteworthy

• Future Plans

Page 3: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

CDT Indexer: 5 facts

1. CDT index is over 10 years old

2. CDT’s indices hold a complete model of the code.

3. The model is paged in from disk lazily.

4. Most operations are faster in CDT than in JDT.

5. The new faster JDT Index is based on CDT’s index

(Reference: https://docs.google.com/document/d/1w3-ufZyISbqH8jxYv689Exjm0haAGufdcSvEAgl2HQ4/edit#)

Page 4: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

DEMO

Page 5: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

ALSO NEW & NOTEWORTHY

Page 6: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Removal of CDI

Page 7: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

If you are still using CDI...

1. Migrate to DSF

– More powerful, asynchronous debug framework

2. Consider maintaining your own fork of CDI

– It’s all open source!

• Reach out to the community for help (cdt-dev forum)

• Reach out to Kichwa Coders to discuss migration options

Page 8: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Improved Source Lookup

• Now using gdb’s ‘set-substitute-path’ backend to handle source mappings

• Avoids this problem:

Page 9: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Improved Source Lookup

• Users can now configure a path mapping which means source lookup will always work

Page 10: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Use Cases– Linux

Use Case Mars Neon

Compilation path is absolute and canonical (no ..) gcc -o elf /path/to/file.c Compilation path is absolute and non-canonical (contains ..) gcc -o elf

/path/other/../to/file.c

Compilation path is relative and canonical (no ..) gcc -o elf to/file.c Compilation path is relative and non-canonical (contains ..) gcc -o elf ../to/file.c

Page 11: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Use Cases– MingGW Compile and Linux Debug

Use Case Mars Neon

Compilation path is absolute and canonical (no ..) gcc -o elf /path/to/file.c

Compilation path is absolute and non-canonical (contains ..) gcc -o elf

/path/other/../to/file.c

Compilation path is relative and canonical (no ..) gcc -o elf to/file.c Compilation path is relative and non-canonical (contains ..) gcc -o elf ../to/file.c

Page 12: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Use Cases– MingGW Compile and Linux Debug – UNC Paths

Use Case Mars Neon

Compilation path is UNC and canonical gcc -o elf \\machine\share\path\to\file.c

Compilation path is UNC and non-canonical gcc -o elf

\\machine\share\path\other\..\to\

file.c

Page 13: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Use Cases– Cygwin

Use Case Mars Neon

Compilation path is absolute and canonical (no ..) gcc -o elf /path/to/file.c

Compilation path is absolute and non-canonical (contains ..) gcc -o elf

/path/other/../to/file.c

Compilation path is relative and canonical (no ..) gcc -o elf to/file.c Compilation path is relative and non-canonical (contains ..) gcc -o elf ../to/file.c

Page 14: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Use Cases – Cygwin – UNC Paths

Use Case Mars Neon

Compilation path is UNC and canonical gcc -o elf \\machine\share\path\to\file.c

Compilation path is UNC and non-canonical gcc -o elf

\\machine\share\path\other\..\to\

file.c

Page 15: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

CDT: ONGOING FEATURES

Page 16: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

CDT Docker Support

Page 17: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Full GDB Console

Full GDB command line behaviour in Eclipse

Based on GDB 7.12 for CDT 9.1

Page 18: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Groups Threads

• control groups of elements

• Better support for multicore e.g

– Step groups of threads or processes

– Set breakpoint on a subset of thread

– Resume any set of multiple cores

Page 19: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Macro Support

• Visual Studio like Macro behaviour

• Based on EASE project

• Using Python

• Allows for future Python GDB Integration

• Works with launch to customize multicore debug launches

Page 20: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

New Build System

• In the works

• Improved support for CMake, QT

• Ongoing discussions

Page 21: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Improved Multicore Breakpoints

• Show where breakpoint actually applies i.e which target, core, thread, etc

• Allow users to easily control where breakpoints should apply

• Persistence of breakpoints applicability • Support for multiple breakpoints at the same

location configured differently • Synchronization with the GDB console should

work in all cases • Get Involved: Call on the 14th June

Page 22: CDT: Latest & Greatest Tooling for C/C++CDT Indexer: 5 facts 1. CDT index is over 10 years old 2. CDT’s indices hold a complete model of the code. 3. The model is paged in from disk

Conclusions

CDT has lots of great features for C/C++ development at scale.

More great features coming soon.

It’s a good time to get involved with the community!