Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cxx: extract section information from __attribute__((section("SECTION"))) #3614

Merged
merged 12 commits into from
Dec 17, 2023

Conversation

masatake
Copy link
Member

@masatake masatake commented Jan 1, 2023

TODO

  • adds statements for debug printing
  • man pages for C/C++/CUDA, versioning
  • man pages for LD scripts
  • NEWS?

@masatake masatake force-pushed the cxx-side-chain branch 3 times, most recently from 5104e3c to bca4308 Compare January 2, 2023 23:26
@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (2c193d5) 85.25% compared to head (5c812c0) 85.33%.

Files Patch % Lines
parsers/cxx/cxx_side_chain.c 93.49% 8 Missing ⚠️
parsers/cxx/cxx_token.c 60.00% 2 Missing ⚠️
parsers/cxx/cxx_parser_tokenizer.c 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3614      +/-   ##
==========================================
+ Coverage   85.25%   85.33%   +0.07%     
==========================================
  Files         230      231       +1     
  Lines       55502    55728     +226     
==========================================
+ Hits        47320    47553     +233     
+ Misses       8182     8175       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@masatake masatake force-pushed the cxx-side-chain branch 2 times, most recently from a058389 to 9195354 Compare January 4, 2023 05:20
parsers/cxx/cxx_side_chain.h Outdated Show resolved Hide resolved
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
For extracting interesting information from sequences in
__attribute__(...)  in upper layers, attach the token chain built from
the sequence to the token AROUND the sequence.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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>
…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>
The original code could not extract .inittext in

	.section ".inittext","ax"

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…und in Asm code

In the original code, sections are tagged as "placement" role of
"section" kind in Asm language.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…as("ALIAS"))__

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake marked this pull request as ready for review December 17, 2023 13:24
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake merged commit d4b2038 into universal-ctags:master Dec 17, 2023
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant