forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LdScript,C,C++: make ref tag entries for sections in __attribute__((s…
…ection("SECTION"))) found in C/C++ code input.c: extern void f0 (void) __attribute__ ((section ("sec"))); tags: sec input-1.c \ /^extern void f0 (void) __attribute__ ((section ("sec")));$/;" \ kind:inputSection line:1 language:LdScript \ roles:destination Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
20 changed files
with
188 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--sort=no | ||
--kinds-C=+p | ||
--param-CPreProcessor._expand=1 | ||
--fields-C=+{section}{macrodef} | ||
--fields=+S | ||
--fields=+rl | ||
--extras=+r | ||
--languages=-LdScript |
5 changes: 5 additions & 0 deletions
5
Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
f input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" v language:C typeref:typename:char[] roles:def section:__ksymtab_strings | ||
a input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_A | ||
b input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_B | ||
stack input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" v language:C typeref:typename:char[10000] roles:def section:STACK | ||
init_data input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" v language:C typeref:typename:int roles:def section:INITDATA |
8 changes: 8 additions & 0 deletions
8
Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/input.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Variables */ | ||
char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1))); | ||
|
||
/* Taken form gcc's info document. */ | ||
struct duart a __attribute__ ((section ("DUART_A"))) = { 0 }; | ||
struct duart b __attribute__ ((section ("DUART_B"))) = { 0 }; | ||
char stack[10000] __attribute__ ((section ("STACK"))) = { 0 }; | ||
int init_data __attribute__ ((section ("INITDATA"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
--param-CPreProcessor._expand=1 | ||
--fields-C=+{section}{macrodef} | ||
--fields=+S | ||
--fields=+r | ||
--fields=+rl | ||
--extras=+r |
57 changes: 37 additions & 20 deletions
57
Units/parser-cxx.r/attribute-sections.cpp.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
f input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" v typeref:typename:char[] roles:def section:__ksymtab_strings | ||
a input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" v typeref:struct:duart roles:def section:DUART_A | ||
b input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" v typeref:struct:duart roles:def section:DUART_B | ||
stack input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" v typeref:typename:char[10000] roles:def section:STACK | ||
init_data input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" v typeref:typename:int roles:def section:INITDATA | ||
COMMAND_LINE_SIZE input-0.c /^#define COMMAND_LINE_SIZE /;" d file: roles:def macrodef:127 | ||
__section input-0.c /^#define __section(section) __attribute__((__section_/;" d file: signature:(section) roles:def macrodef:__attribute__((__section__(section))) | ||
__initdata input-0.c /^#define __initdata /;" d file: roles:def macrodef:__section(".init.data") | ||
b0 input-0.c /^char __initdata b0[COMMAND_LINE_SIZE];$/;" v typeref:typename:char[127] roles:def section:.init.data | ||
b1 input-0.c /^char b1[COMMAND_LINE_SIZE] __initdata;$/;" v typeref:typename:char[127] roles:def section:.init.data | ||
f0 input-1.c /^extern void f0 (void) __attribute__ ((section ("bar0p")));$/;" p typeref:typename:void file: signature:(void) roles:def section:bar0p | ||
f0 input-1.c /^void f0 (void) __attribute__ ((section ("bar0")))$/;" f typeref:typename:void signature:(void) roles:def section:bar0 | ||
f1 input-1.c /^extern void __attribute__ ((section ("bar1p"))) f1 (void);$/;" p typeref:typename:void file: signature:(void) roles:def section:bar1p | ||
f1 input-1.c /^void __attribute__ ((section ("bar1"))) f1 (void)$/;" f typeref:typename:void signature:(void) roles:def section:bar1 | ||
f2 input-1.c /^extern __attribute__ ((section ("bar2p"))) void f2 (void);$/;" p typeref:typename:void file: signature:(void) roles:def section:bar2p | ||
f2 input-1.c /^__attribute__ ((section ("bar2"))) void f2 (void)$/;" f typeref:typename:void signature:(void) roles:def section:bar2 | ||
f3 input-1.c /^__attribute__ ((section ("bar3p"))) extern void f3 (void);$/;" p typeref:typename:void file: signature:(void) roles:def section:bar3p | ||
f3 input-1.c /^__attribute__ ((section ("bar3"))) extern void f3 (void)$/;" f typeref:typename:void signature:(void) roles:def section:bar3 | ||
f4 input-1.c /^__attribute__ ((section ("bar4p"))) static void f4 (void);$/;" p typeref:typename:void file: signature:(void) roles:def section:bar4p | ||
f4 input-1.c /^__attribute__ ((section ("bar4"))) static void f4 (void)$/;" f typeref:typename:void file: signature:(void) roles:def section:bar4 | ||
__ksymtab_strings input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" i language:LdScript roles:destination | ||
f input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" v language:C typeref:typename:char[] roles:def section:__ksymtab_strings | ||
DUART_A input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" i language:LdScript roles:destination | ||
a input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_A | ||
DUART_B input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" i language:LdScript roles:destination | ||
b input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_B | ||
STACK input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" i language:LdScript roles:destination | ||
stack input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" v language:C typeref:typename:char[10000] roles:def section:STACK | ||
INITDATA input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" i language:LdScript roles:destination | ||
init_data input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" v language:C typeref:typename:int roles:def section:INITDATA | ||
COMMAND_LINE_SIZE input-0.c /^#define COMMAND_LINE_SIZE /;" d language:C file: roles:def macrodef:127 | ||
__section input-0.c /^#define __section(section) __attribute__((__section_/;" d language:C file: signature:(section) roles:def macrodef:__attribute__((__section__(section))) | ||
__initdata input-0.c /^#define __initdata /;" d language:C file: roles:def macrodef:__section(".init.data") | ||
.init.data input-0.c /^char __initdata b0[COMMAND_LINE_SIZE];$/;" i language:LdScript roles:destination | ||
b0 input-0.c /^char __initdata b0[COMMAND_LINE_SIZE];$/;" v language:C typeref:typename:char[127] roles:def section:.init.data | ||
.init.data input-0.c /^char b1[COMMAND_LINE_SIZE] __initdata;$/;" i language:LdScript roles:destination | ||
b1 input-0.c /^char b1[COMMAND_LINE_SIZE] __initdata;$/;" v language:C typeref:typename:char[127] roles:def section:.init.data | ||
bar0p input-1.c /^extern void f0 (void) __attribute__ ((section ("bar0p")));$/;" i language:LdScript roles:destination | ||
f0 input-1.c /^extern void f0 (void) __attribute__ ((section ("bar0p")));$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar0p | ||
bar0 input-1.c /^{$/;" i language:LdScript roles:destination | ||
f0 input-1.c /^void f0 (void) __attribute__ ((section ("bar0")))$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar0 | ||
bar1p input-1.c /^extern void __attribute__ ((section ("bar1p"))) f1 (void);$/;" i language:LdScript roles:destination | ||
f1 input-1.c /^extern void __attribute__ ((section ("bar1p"))) f1 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar1p | ||
bar1 input-1.c /^{$/;" i language:LdScript roles:destination | ||
f1 input-1.c /^void __attribute__ ((section ("bar1"))) f1 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar1 | ||
bar2p input-1.c /^extern __attribute__ ((section ("bar2p"))) void f2 (void);$/;" i language:LdScript roles:destination | ||
f2 input-1.c /^extern __attribute__ ((section ("bar2p"))) void f2 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar2p | ||
bar2 input-1.c /^{$/;" i language:LdScript roles:destination | ||
f2 input-1.c /^__attribute__ ((section ("bar2"))) void f2 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar2 | ||
bar3p input-1.c /^__attribute__ ((section ("bar3p"))) extern void f3 (void);$/;" i language:LdScript roles:destination | ||
f3 input-1.c /^__attribute__ ((section ("bar3p"))) extern void f3 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar3p | ||
bar3 input-1.c /^{$/;" i language:LdScript roles:destination | ||
f3 input-1.c /^__attribute__ ((section ("bar3"))) extern void f3 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar3 | ||
bar4p input-1.c /^__attribute__ ((section ("bar4p"))) static void f4 (void);$/;" i language:LdScript roles:destination | ||
f4 input-1.c /^__attribute__ ((section ("bar4p"))) static void f4 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar4p | ||
bar4 input-1.c /^{$/;" i language:LdScript roles:destination | ||
f4 input-1.c /^__attribute__ ((section ("bar4"))) static void f4 (void)$/;" f language:C typeref:typename:void file: signature:(void) roles:def section:bar4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _ctags-lang-ldscript(7): | ||
|
||
============================================================== | ||
ctags-lang-ldscript | ||
============================================================== | ||
|
||
Random notes about tagging LdScript source code with Universal Ctags | ||
|
||
:Version: 6.0.0 | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **ctags** ... --languages=+LdScript ... | ||
| **ctags** ... --language-force=LdScript ... | ||
| **ctags** ... --map-LdScript=+.lds ... | ||
| **ctags** ... --map-LdScript=+.lds.S ... | ||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging LdScript source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New role ``destination`` for ``inputSection`` kind | ||
|
||
SEE ALSO | ||
-------- | ||
:ref:`ctags(1) <ctags(1)>`, | ||
:ref:`ctags-lang-c(7) <ctags-lang-c(7)>`, | ||
:ref:`ctags-lang-c++(7) <ctags-lang-c++(7)>`, | ||
:ref:`ctags-lang-cuda(7) <ctags-lang-cuda(7)>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _ctags-lang-ldscript(7): | ||
|
||
============================================================== | ||
ctags-lang-ldscript | ||
============================================================== | ||
--------------------------------------------------------------------- | ||
Random notes about tagging LdScript source code with Universal Ctags | ||
--------------------------------------------------------------------- | ||
:Version: @VERSION@ | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --languages=+LdScript ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --language-force=LdScript ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-LdScript=+.lds ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-LdScript=+.lds.S ... | ||
|
||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging LdScript source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New role ``destination`` for ``inputSection`` kind | ||
|
||
SEE ALSO | ||
-------- | ||
ctags(1), | ||
ctags-lang-c(7), | ||
ctags-lang-c++(7), | ||
ctags-lang-cuda(7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters