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

Fix dwarf5 load #4752

Merged
merged 5 commits into from
Nov 30, 2024
Merged

Fix dwarf5 load #4752

merged 5 commits into from
Nov 30, 2024

Conversation

imbillow
Copy link
Contributor

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

  • fix dwarf5 DW_FORM_strx and '.debug_str_offsets' section load
    Not sure why str_offsets becomes non-standard section names on macos, but added compatibility for such case.

  • add 'cb_dwo_path' and fix dwo load

Test plan

...

Closing issues

...

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.

How did you spot it? Is there any test? Maybe better to add it to prevent future regressions?

@imbillow
Copy link
Contributor Author

How did you spot it? Is there any test? Maybe better to add it to prevent future regressions?

When I compile a simple snippet of code locally and try to open it with rizin I find that it doesn't open properly.

char *global_data = "1000";

int main() {
    printf("In main, global_data: %s\n", global_data);
    return 0;
}

@imbillow
Copy link
Contributor Author

rizinorg/rizin-testbins#161

Added some tests, should pass CI after the PR merge in rizin-testbins repository

How did you spot it? Is there any test? Maybe better to add it to prevent future regressions?

When I compile a simple snippet of code locally and try to open it with rizin I find that it doesn't open properly.

char *global_data = "1000";

int main() {
    printf("In main, global_data: %s\n", global_data);
    return 0;
}

@imbillow
Copy link
Contributor Author

The dwo generated by -gsplitdwarf doesn't seem to be used very much. It's more a case of copying all the .debug_* sections into a binary file (*.debug).

@XVilka
Copy link
Member

XVilka commented Nov 30, 2024

Mismatched function annotation for rz_bin_dwarf_line_from_file at <rizin/librz/include/rz_bin_dwarf.h:1535:31> : RZ_BORROW (was RZ_NULLABLE at <rizin/librz/bin/dwarf/line.c:728:31>
Mismatched function annotation for rz_bin_dwarf_line_from_file at <rizin/librz/include/rz_bin_dwarf.h:1535:31> : RZ_NULLABLE (was RZ_BORROW at <rizin/librz/bin/dwarf/line.c:728:31>

@XVilka XVilka merged commit 7637377 into dev Nov 30, 2024
48 checks passed
@XVilka XVilka deleted the fix-dw5 branch November 30, 2024 12:43
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.

2 participants