Commit graph

15 commits

Author SHA1 Message Date
Giovanni
b56a44d9f0
test/unit: remove WITH_GPL from DWARF C++ test (#6351) 2026-05-14 23:36:29 +08:00
Giovanni
b5fee3471c
Move RzAnalysis as private and force usage of C API (#6123)
* Hide RzAnalysis structure to force the usage of the C APIs.

* Fix rop code & test

* Fix linter

* Fix rz_analysis_free to return void
2026-04-06 16:07:53 +00:00
Ahmed Kamal
93d914bd81
Remove Global/Static variables in path.c to make it thread safe (#5148) 2025-06-13 21:34:33 +08:00
billow
7637377a45
fix: DWARF5 DW_FORM_strx and '.debug_str_offsets' section load (#4752)
* Fix dwarf5 DW_FORM_strx and '.debug_str_offsets' section load
* Add 'cb_dwo_path' and fix dwo load
* Add test
2024-11-30 20:43:27 +08:00
billow
ea460e54c2
DWARF: fix type process with the same name (#4454)
* DWARF: Remove memory allocation for RzBinDwarfLocListEntry->range
* DWARF: fix type process with the same name
2024-04-21 22:56:22 +08:00
billow
8b8d5c7769 Fix stack location in composite 2023-11-29 10:29:01 +08:00
billow
947e9b574e
Create global variable from DWARF (#3985)
* Create global variable from DWARF
* Update test
* Add test "Static variables inside function"
* Clean typedb when apply_dwarf
2023-11-19 22:58:50 +08:00
billow
19c889f690
DWARF loading '.debug_str_offsets', '.debug_line_str' and relocate (#3848)
* Try Load '.debug_str_offsets'
* DWARF unify names
* Add endian_reader.c to process relocate
* Remove RzBinDwarfLineInfoMask RzBinDWARFFlags and RzBinDWARFOption
* Fix debug_line
* Add .debug_line_str
* RzBinReloc: Add section_vaddr
* Fix info->offset_comp_dir
* Fix convert_raw in loclists and rnglists
* Remove macro `UX_OR` and relocate support for read_address
* Add RzBinDwarfLineHdr->encoding
* Remove macro 'OK_None'
* Fix loclists and rnglists
* Allow void typedef
* Fix DW_AT_name reference DW_AT_specification
2023-09-28 10:15:42 +08:00
billow
8e29b959b8 DWARF improve DWARF5 support and refactor
- `RZ_PROJECT_VERSION` 14
- Add `RzCallable`.has_unspecified_parameters
- Add `RzAnalysis`.debug_info
- Add `RzAnalysisVarStorageType` composite and `eval` `pending`
- Support for parse DWARF section "debug_loclists", "debug_ranges", "debug_rnglists"
- Partial support for eval DWARF expr_loc
- Support for anonymous Type, function variable, struct member
- Cache all DWARF information in `RzAnalysisDebugInfo` and remove `SDB` based caching.
- Add arm32, arm64, TriCore DWARF register name
- Fix same name basetype
2023-08-25 23:32:05 +08:00
Gleb Popov
30ba928f54 test/unit/test_analysis_var: Use types DB from the build dir. 2023-08-03 15:35:25 +08:00
billow
d0732c5c88 Update tests 2023-06-05 22:41:20 +08:00
billow
c0154a26a0
Fix function arguments augmentation with DWARF (#3530)
* Add `VariableKind` to Dwarf `Variable`
* Refactor `rz_analysis_dwarf_integrate_functions`
* Add `RzAnalysisVarKind` to `RzAnalysisVar`
* Add function parameters tests for x86, ARM, Tricore
2023-05-30 16:40:09 +08:00
Florian Märkl
d6bd4a57b0
Remove temporary type string conversion in DWARF integration (#3266)
Due to the DWARF parsing having been implemented before proper RzTypes,
it was still generating C-like strings that we then parsed into RzType.
This is fragile and was identified to be a major performance bottleneck
on OpenBSD/sparc64. Instead, we now generate RzTypes directly where
possible.
There are still cases left where strings have to be generated
from those types to be stored in an SDB. This should be changed in the
future too.

rz_type_pointer_of_type() is now also always creating a pointer type of
the given type. Before, it would have failed when the pointee was an
identifier that did not exist in the database. But this may be a valid
case e.g. while still building the database from DWARF and such
sanitization goes beyond what one would expect from
rz_type_pointer_of_type().
2023-01-05 19:14:59 +01:00
Giovanni
f87025d1e8
Remove cb_printf() from RzBin (#2446)
* Remove `cb_printf()` from RzBin
* Removed `bin.rawstr` from `rz-bin`
* Dropping `izzz` since does the same as `izz`
* Fix PE one section executables
* Fix behaviour of BFLT, LE, and SMD bin plugins
2022-03-26 20:30:55 +08:00
Riccardo Schirone
7f19c8f867 Split unit and integration tests 2022-03-23 10:34:53 +01:00
Renamed from test/unit/test_dwarf_integration.c (Browse further)