Working with different compilers

#5 · closed · 2 comments

View on GitHub ↗

Synray

I'm not sure if this plugin only works with a specific compiler, (clang?) but I had to add a lot of hacks to get this with gcc: ![whodis](https://user-images.githubusercontent.com/31429825/41913761-031a589e-7906-11e8-84f8-154d3560c1d4.png) My compile flags were `-ggdb3.` It's exactly what I wanted, despite no source lines First there are some file format differences in whodis.temp.S: - `.file` doesn't end with `\t` anymore, same with `\t.loc\t` - `.Lfunc_begin` and `.Lfunc_end` are `.LFB` and `.LFE` - There aren't comments showing the filename after `.loc`, instead it's `.loc {fileindex} {line_no}`. I temporarily disabled the code that adds corresponding comments to the source data. Other changes I made to get it to work: - changed WhodisKey to `<C-G>a`, since `<C-S-A>` is just `<C-A>` - added `silent!` before commands that changed highlighting, since some highlight groups weren't defined and kept giving errors. Other issues: - the plugin can't parse compile_commands generated from `$ bear make`. I had to use cmake just to get a working compile_commands.json Are there any plans to support gcc/other compilers? If so I can contribute what I've done so far.

Comments

sgraham

Hi, I don't personally have any projects/platforms where I'm using gcc, but if you want to contribute changes that'd be great, thanks.

Synray

I'll keep working on it, I'm looking for documentation on gcc's asm format. Still it's surprising how useful something as simple as this plugin is. I'll make a PR soon.