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 #788

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

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 now remove all leading underscores for compatibility.
  • 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.52%. Comparing base (5f0e30e) to head (b0f32af).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #788      +/-   ##
==========================================
+ Coverage   97.47%   97.52%   +0.04%     
==========================================
  Files          20       20              
  Lines        5157     5769     +612     
==========================================
+ Hits         5027     5626     +599     
- Misses        110      123      +13     
  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 4 times, most recently from 8e7e36b to 7753f01 Compare October 18, 2024 09:09
Copy link

qiniu-x bot commented Oct 18, 2024

[Git-flow] Hi @luoliwoshang, There are some suggestions for your information:


Rebase suggestions

  • Following commits have duplicated messages

    llcppsymg & llcppsigfetch parse args

    llcppsymg & llcppsigfetch parse args

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

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