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

Load sourceline information for global variables #4635

Merged
merged 4 commits into from
Sep 15, 2024
Merged

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Sep 14, 2024

SQUASH ME

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

...

Test plan

...

Closing issues

closes #4619

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test using that binary I attached to the issue.

librz/arch/var_global.c Outdated Show resolved Hide resolved
XVilka

This comment was marked as resolved.

@XVilka

This comment was marked as resolved.

librz/core/canalysis.c Outdated Show resolved Hide resolved
librz/core/canalysis.c Show resolved Hide resolved
@XVilka

This comment was marked as resolved.

@XVilka
Copy link
Member

XVilka commented Sep 14, 2024

On Windows:

[XX] C:\projects\rizin\test\db\analysis\vars global variables list
ANSICON=1 RZ_NOPLUGINS=1 C:\projects\rizin\rizin-vs2022_64-v0.8.0\bin\rizin.exe -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -qc 'aaa
avglt
' bins/elf/float_ex1/float_ex1_globals
-- stdout
--- expected
+++ actual
@@ -1,7 +1,7 @@
-name       type        size address  decl_file                                                   decl_line decl_col 
---------------------------------------------------------------------------------------------------------------------
-a          float       0x4  0x404040 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 38        15
-bb         const float 0x4  0x402010 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 16        13
-b          const float 0x4  0x402068 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 39        21
-aa         double      0x8  0x404038 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 17        8
-staticsome some_t      0x16 0x404060 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 15        15
+name       type        size address  decl_file                                                   decl_line       decl_col      
+-------------------------------------------------------------------------------------------------------------------------------
+a          float       0x4  0x404040 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 140698833649702 2289217568783
+bb         const float 0x4  0x402010 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 140698833649680 2289217568781
+b          const float 0x4  0x402068 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 140698833649703 2289217568789
+aa         double      0x8  0x404038 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 140698833649681 2289217568776
+staticsome some_t      0x16 0x404060 /home/xvilka/rizin/rizin-testbins/elf/float_ex1/float_ex1.c 140698833649679 2289217568783
-- stderr
[**]            C:\projects\rizin\test\db\analysis\v810    20943 OK       997 BR        0 XX       35 FX

@XVilka XVilka merged commit a13438b into dev Sep 15, 2024
47 checks passed
@XVilka XVilka deleted the var-global-source branch September 15, 2024 19:27
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.

Load sourceline information for global variables
2 participants