Ticket #2859 (closed defect: fixed)
ctags support is broken (sigsegv)
Reported by: | yarda | Owned by: | angel_il |
---|---|---|---|
Priority: | major | Milestone: | 4.8.5 |
Component: | mcedit | Version: | 4.8.4 |
Keywords: | Cc: | jnovy@… | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master committed-stable |
Description
ctags support is very useful feature, but unfortunately it seems to be broken for some time. For good user experience it should work out of the box and the functionality should be documented in official docs, but at least it shouldn't segfault.
version (mc -V):
GNU Midnight Commander 4.8.4
Built with GLib 2.32.4
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
How to reproduce:
- on sources: ctags -R .
- with tags in current dir open any file (needn't be C source or headers)
- Alt + - (i.e. alt minus or Esc + -)
Current result:
sigsegv
Expected result:
no sigsegv
Also I am unable to get this functionality to work, Alt + = or Alt + Enter or Esc + = do nothing for me.
Change History
comment:3 Changed 12 years ago by angel_il
- Status changed from new to accepted
- Owner set to angel_il
comment:5 Changed 12 years ago by angel_il
- Branch state changed from no branch to on review
branch: 2859_mcedit_ctags_segfault
comment:6 Changed 12 years ago by andrew_b
- Keywords stable-candidate added
- Votes for changeset set to andrew_b
comment:8 Changed 12 years ago by yarda
Thanks. What about Alt + = or Alt + Enter? Does it work for you out of the box?
comment:10 Changed 12 years ago by yarda
Jump to definition and move forward:
https://www.midnight-commander.org/wiki/doc/editor/codejump
They doesn't work for me out of the box and I cannot found anything specific to ctags navigation in mc docs.
comment:11 Changed 12 years ago by angel_il
ok, step by step
1) create two files (a.h, a.c)
a.c
#include a.h; int aaa; void main () { aaa = 1; }
a.h
extern int aaa;
2) run:
etags --language-force=c or find . -type f -name "*.[ch]" | ctags --c-kinds=+p --fields=+iaS --extra=+q -e -L-
(my version by ctags/etags is Exuberant Ctags 5.9~svn20110310)
3) after that you get the file TAGS
$ ls a.c a.h TAGS
4) open file a.c in mcedit
5) set cursor after word aaa
aaa<here> = 1;
6) select in the editor menu "Command" - "Find declaration M-Enter"
7) you should see the dialog like follow
╔═══════════ aaa ══════════════╗ ║ aaa -> a.c:3 ║ ╚══════════════════════════════╝
8) press enter
9) must open the file a.c on line 3
10) press alt-'-' to jump back
11) press alt-'=' to jump forward
comment:12 follow-up: ↓ 13 Changed 12 years ago by yarda
Thanks, PEBKAC :)
I used ctags:
$ ctags -R
but it requires etags:
$ ctags -R -e
Sorry for noise.
comment:13 in reply to: ↑ 12 Changed 12 years ago by angel_il
comment:14 Changed 12 years ago by slavazanko
- Votes for changeset changed from andrew_b to andrew_b slavazanko
- Branch state changed from on review to approved
comment:15 Changed 12 years ago by angel_il
- Status changed from accepted to testing
- Resolution set to fixed
- Branch state changed from approved to merged
comment:16 Changed 12 years ago by angel_il
- Status changed from testing to closed
fixed in 4.8.1-stable: da9eda40a9e1737fdecebc2c0cfb749646026fe0
comment:18 Changed 12 years ago by angel_il
- Votes for changeset set to committed-master committed-stable