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.
C,C++: add section field to store __attribute__((section("SECTION")))__
input.c: extern void f0 (void) __attribute__ ((section ("sec"))); tags output: f0 input-1.c \ /^extern void f0 (void) __attribute__ ((section ("sec")));$/;" \ kind:prototype line:1 language:C typeref:typename:void \ file: signature:(void) roles:def extras:fileScope end:1 \ section:sec properties:extern Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
25 changed files
with
466 additions
and
0 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
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,7 @@ | ||
--sort=no | ||
--kinds-C=+p | ||
--param-CPreProcessor._expand=1 | ||
--fields-C=+{section}{macrodef} | ||
--fields=+S | ||
--fields=+r | ||
--extras=+r |
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,20 @@ | ||
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 |
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,6 @@ | ||
/* --param-CPreProcessor._expand=1 */ | ||
#define COMMAND_LINE_SIZE 127 | ||
#define __section(section) __attribute__((__section__(section))) | ||
#define __initdata __section(".init.data") | ||
char __initdata b0[COMMAND_LINE_SIZE]; | ||
char b1[COMMAND_LINE_SIZE] __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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
extern void f0 (void) __attribute__ ((section ("bar0p"))); | ||
void f0 (void) __attribute__ ((section ("bar0"))) | ||
{ | ||
} | ||
|
||
extern void __attribute__ ((section ("bar1p"))) f1 (void); | ||
void __attribute__ ((section ("bar1"))) f1 (void) | ||
{ | ||
} | ||
|
||
extern __attribute__ ((section ("bar2p"))) void f2 (void); | ||
__attribute__ ((section ("bar2"))) void f2 (void) | ||
{ | ||
} | ||
|
||
__attribute__ ((section ("bar3p"))) extern void f3 (void); | ||
__attribute__ ((section ("bar3"))) extern void f3 (void) | ||
{ | ||
} | ||
|
||
__attribute__ ((section ("bar4p"))) static void f4 (void); | ||
__attribute__ ((section ("bar4"))) static void f4 (void) | ||
{ | ||
} |
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
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,38 @@ | ||
.. _ctags-lang-c++(7): | ||
|
||
============================================================== | ||
ctags-lang-c++ | ||
============================================================== | ||
|
||
Random notes about tagging C++ source code with Universal Ctags | ||
|
||
:Version: 6.0.0 | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **ctags** ... --languages=+C++ ... | ||
| **ctags** ... --language-force=C++ ... | ||
| **ctags** ... --map-C++=+.c++ ... | ||
| **ctags** ... --map-C++=+.cc ... | ||
| **ctags** ... --map-C++=+.cpp ... | ||
| **ctags** ... --map-C++=+.h ... | ||
| ... | ||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging C++ source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New field ``section`` | ||
|
||
SEE ALSO | ||
-------- | ||
:ref:`ctags(1) <ctags(1)>`, | ||
`The new C/C++ parser <https://docs.ctags.io/en/latest/parser-cxx.html>`_ (https://docs.ctags.io/en/latest/parser-cxx.html) |
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,35 @@ | ||
.. _ctags-lang-cuda(7): | ||
|
||
============================================================== | ||
ctags-lang-cuda | ||
============================================================== | ||
|
||
Random notes about tagging CUDA source code with Universal Ctags | ||
|
||
:Version: 6.0.0 | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **ctags** ... --languages=+CUDA ... | ||
| **ctags** ... --language-force=CUDA ... | ||
| **ctags** ... --map-CUDA=+.cu ... | ||
| **ctags** ... --map-CUDA=+.cuh ... | ||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging CUDA source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New field ``section`` | ||
|
||
SEE ALSO | ||
-------- | ||
:ref:`ctags(1) <ctags(1)>`, | ||
`The new C/C++ parser <https://docs.ctags.io/en/latest/parser-cxx.html>`_ (https://docs.ctags.io/en/latest/parser-cxx.html) |
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,38 @@ | ||
.. _ctags-lang-c++(7): | ||
|
||
============================================================== | ||
ctags-lang-c++ | ||
============================================================== | ||
--------------------------------------------------------------------- | ||
Random notes about tagging C++ source code with Universal Ctags | ||
--------------------------------------------------------------------- | ||
:Version: @VERSION@ | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --languages=+C++ ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --language-force=C++ ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-C++=+.c++ ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-C++=+.cc ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-C++=+.cpp ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-C++=+.h ... | ||
| ... | ||
|
||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging C++ source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New field ``section`` | ||
|
||
SEE ALSO | ||
-------- | ||
ctags(1), | ||
`The new C/C++ parser <https://docs.ctags.io/en/latest/parser-cxx.html>`_ (https://docs.ctags.io/en/latest/parser-cxx.html) |
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,35 @@ | ||
.. _ctags-lang-cuda(7): | ||
|
||
============================================================== | ||
ctags-lang-cuda | ||
============================================================== | ||
--------------------------------------------------------------------- | ||
Random notes about tagging CUDA source code with Universal Ctags | ||
--------------------------------------------------------------------- | ||
:Version: @VERSION@ | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --languages=+CUDA ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --language-force=CUDA ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-CUDA=+.cu ... | ||
| **@CTAGS_NAME_EXECUTABLE@** ... --map-CUDA=+.cuh ... | ||
|
||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging CUDA source code. | ||
|
||
VERSIONS | ||
-------- | ||
|
||
Change since "0.0" | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* New field ``section`` | ||
|
||
SEE ALSO | ||
-------- | ||
ctags(1), | ||
`The new C/C++ parser <https://docs.ctags.io/en/latest/parser-cxx.html>`_ (https://docs.ctags.io/en/latest/parser-cxx.html) |
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
Oops, something went wrong.