mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Misc
parent
f007debed4
commit
e5c6efa749
8
Build.md
8
Build.md
@ -91,11 +91,11 @@ are installed into the standard locations for our system, `CMAKE_PREFIX_PATH`
|
||||
is not required.
|
||||
|
||||
A simple `cmake -GNinja -H. -BRelease` (remove `-GNinja` if you don't use
|
||||
Ninja) works for at least the following distributions:
|
||||
Ninja) works for many distributions. The required system packages are:
|
||||
|
||||
* Arch Linux
|
||||
* Fedora Linux
|
||||
* Gentoo Linux
|
||||
* Arch Linux: `clang` `llvm`
|
||||
* Fedora Linux: `clang` `clang-devel` `llvm-devel`
|
||||
* Gentoo Linux: `clang`
|
||||
* Void Linux
|
||||
|
||||
### Prebuilt Clang+LLVM binaries
|
||||
|
17
Debugging.md
17
Debugging.md
@ -36,20 +36,11 @@ done indexing. However, for many other issues, such as project file loading
|
||||
(`project.cc`) and C/C++ parsing and indexing `indexer.cc`, you need to set an
|
||||
early breakpoint to be able to trace the code.
|
||||
|
||||
It is simplest to use [[LC-neovim]] for debugging (even if you use Emacs or
|
||||
VSCode) because it can be started with simple shell command.
|
||||
Export the environment variable `CCLS_TRACEME=1` or `CCLS_TRACEME=s` before starting ccls.
|
||||
Consider using a [shell script wrapper](Install#shell-script-wrapper).
|
||||
|
||||
```vim
|
||||
# vimrc
|
||||
nn ,al :LanguageClientStart<cr>
|
||||
```
|
||||
|
||||
```sh
|
||||
rm -r /tmp/ccls && CCLS_TRACEME=1 nvim a.cc +'normal ,al'
|
||||
```
|
||||
|
||||
The Neovim buffer will hang there because `CCLS_TRACEME=1` causes the `ccls`
|
||||
process to SIGTSTP itself. In another shell, `gdb -p $(pgrep -fn debug/ccls)`
|
||||
`CCLS_TRACEME=1` or `s` causes the `ccls` process to SIGTSTP/SIGSTOP itself.
|
||||
In another shell, `gdb -p $(pgrep -fn ccls)`
|
||||
|
||||
### Poor man's breakpoint
|
||||
|
||||
|
15
FAQ.md
15
FAQ.md
@ -296,7 +296,7 @@ Specify `hierarchy:true` to enable hierarchical view.
|
||||
|
||||
## [`$ccls/member`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_member.cc)
|
||||
|
||||
Recursively list member variables of a record type. 😂 nobody has implemented vscode-ccls UI for the feature. Help wanted!
|
||||
Recursively list member variables of a record type.
|
||||
|
||||
* <code>struct <kbd>A</kbd>:B{void f()override;};</code> lists `B` or `B::f()`
|
||||
|
||||
@ -304,6 +304,19 @@ If parameter `kind:3` is specified, list member functions/functions in a namespa
|
||||
|
||||
* <code>struct <kbd>A</kbd>{void f();};</code> lists `A::f()`
|
||||
|
||||
Sample requests:
|
||||
|
||||
```javascript
|
||||
// member variables / variables in namespaces: kind:0 (default)
|
||||
{"jsonrpc":"2.0","id":1,"method":"$ccls/member","params":{"textDocument":{"uri":"file:///tmp/c/a.cc"},"position":{"line":0,"character":7}}}
|
||||
|
||||
// member functions / functions in namespaces: kind:3
|
||||
{"jsonrpc":"2.0","id":2,"method":"$ccls/member","params":{"textDocument":{"uri":"file:///tmp/c/a.cc"},"position":{"line":0,"character":7},"kind":3}}
|
||||
|
||||
// nested classes / types in namespaces: kind:2
|
||||
{"jsonrpc":"2.0","id":3,"method":"$ccls/member","params":{"textDocument":{"uri":"file:///tmp/c/a.cc"},"position":{"line":0,"character":7},"kind":2}}
|
||||
```
|
||||
|
||||
## Cases
|
||||
|
||||
On a laptop with one (i7-6600U CPU @ 2.60GHz, hyper-threading, `nproc`=4), 4
|
||||
|
Loading…
Reference in New Issue
Block a user