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

llcppsymg:refine class fetch,test case,-v #788

Merged
merged 16 commits into from
Oct 28, 2024

Conversation

luoliwoshang
Copy link
Contributor

@luoliwoshang luoliwoshang commented Sep 10, 2024

[wip] fix #830

  • Refactored the class name retrieval logic, now extracting it by accessing the cursor's semantic parent, and removed redundant logic
  • supplement test cases
  • Due to the different number of leading underscores in C++ symbols on Linux and macOS, previously removing only the first leading underscore would cause comparison failures on Linux. Therefore, to accommodate both scenarios, we remove remove first leading underscore only in mac
  • For paths without -L,llcppsymg attempts to match and retrieve from the default search paths & .so in linux,.dylib in macos
  • -v flag
  • find dylib&headerfile from mutiple path

linux

  • wait os.Readdir to search /etc/ld.so.conf.d 's subdir
  • wait exec.Command not panic

It can pass tests normally in both Linux and macOS environments.
However, in actual operation on Linux, the part calling nm throws the following error. Investigation reveals that it's caused by exec.Command. Running cmptest/osexec on Linux also produces the corresponding issue:

root@be00d9b1c2c9:~/llgo/chore/_xtool/llcppsymg# llgo run .
parse dylib symbols from config lib:-L/lib/aarch64-linux-gnu -llua5.4
panic: todo: syscall.Faccessat

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.66%. Comparing base (8419d91) to head (8ad72b1).
Report is 51 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #788      +/-   ##
==========================================
+ Coverage   97.52%   97.66%   +0.13%     
==========================================
  Files          20       20              
  Lines        5775     5812      +37     
==========================================
+ Hits         5632     5676      +44     
+ Misses        123      116       -7     
  Partials       20       20              

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

@xushiwei
Copy link
Member

should resolve conflicts.

@luoliwoshang
Copy link
Contributor Author

should resolve conflicts.

resolve conflicts , and need merge the #757 for llcppsigfetch & gogensig

@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 3 times, most recently from 70c0de5 to f253e79 Compare September 25, 2024 01:20
@luoliwoshang luoliwoshang changed the title llcppsymg:refine classname fetch llcppsymg:refine class fetch & add test case Sep 25, 2024
@luoliwoshang luoliwoshang reopened this Sep 25, 2024
@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 8 times, most recently from 7da1ba3 to 6f55f2f Compare September 26, 2024 06:24
@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 3 times, most recently from 4f90200 to 48acd52 Compare October 8, 2024 03:17
@luoliwoshang
Copy link
Contributor Author

ready for review. @xushiwei

@luoliwoshang luoliwoshang changed the title llcppsymg:refine class fetch & add test case llcppsymg:refine class fetch,test case Oct 10, 2024
@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 5 times, most recently from 7753f01 to da615cc Compare October 18, 2024 16:04
@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 4 times, most recently from 87fab4c to 7a345e4 Compare October 21, 2024 10:35
@luoliwoshang luoliwoshang changed the title llcppsymg:refine class fetch,test case llcppsymg:refine class fetch,test case,-v Oct 21, 2024
@luoliwoshang luoliwoshang force-pushed the llcppsymg/classname branch 2 times, most recently from 20e86ec to e6bfe1f Compare October 26, 2024 10:39
@xushiwei xushiwei merged commit e72a67f into goplus:main Oct 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llcppsymg:linux compatibility
2 participants