Commit Graph
100 Commits
Author SHA1 Message Date
Nikita Smith 13352751ec moved DWARF parser to use str8_deserial-style API, added to the parser
layer functionality for interpreting different types of attributes,
added support for location lists, and API to enable parsing tags with
abstract origin.
2025-03-17 10:40:59 -07:00
Nikita Smith 57208909f1 updated DWARF expression printer, added ELF preamble,
transitioned debug info and debug line printers to new parser
2025-03-17 10:28:56 -07:00
Nikita Smith f1e88b5667 pass over PDB converter
- moved incomplete type resolution from the converter to RDI make helper
  layer so we don't need to duplicate code in DWARF converter
- changed code for building basic types to handle various data models
2025-03-13 23:04:40 -07:00
Nikita Smith 631106b0a8 natvis for RDI Make types 2025-03-12 14:52:09 -07:00
Nikita Smith 3eedcb1912 initialize frame base in interp context 2025-03-12 14:49:14 -07:00
Nikita Smith 44249f35fc pass over the make RDI library
- Handle type layout in the library so converts simply
  define type graph and let the library handle DAG layout.
- Changed location baking. For now the library waits for scope, procs,
  global vars, and thread vars steps to serially finish because
  of common dependency on location sections, we need to parallel for each step.
- Changed encoded offset size for RDI_EvalOp_FrameOff to 8 bytes
  (1 byte is not enough to cover all cases)
- Added frame base location to RDI_Procedure (WASM encodes frame base
  as an index into a global array and so we have to resolve the base
  at runtime).
2025-03-10 16:49:54 -07:00
Nikita Smith 5717d6c54c export restrict modifier 2025-03-04 13:26:24 -08:00
Nikita Smith 4e775d5b6c hash table helper 2025-03-04 11:39:26 -08:00
Nikita Smith dfd6950ff3 deleted obsolete DWARF parser files 2025-03-03 17:20:22 -08:00
Nikita Smith 2ba1a0d502 pass over DWARF header
- added new types
- renamed mode -> format
- fixed section naming
- added helper for picking array lower bound
2025-03-03 17:14:22 -08:00
Nikita Smith ed897979ca added fields for user defined ELF types 2025-03-03 17:11:52 -08:00
Nikita Smith 6c425aa9dc misc NATVIS types 2025-03-03 17:10:44 -08:00
Nikita Smith 35ed8d6a1e bugfixed zero-length block decomp and fixed 64-bit casts 2025-03-03 17:10:06 -08:00
Nikita Smith 8b4f97223e moved async bakers from PDB converter to a stand-alone file to reuse
them in DWARF converter
2025-03-03 17:09:01 -08:00
Nikita Smith 53bff614e6 moved LEB helpers to DWARF layer 2025-03-03 17:06:58 -08:00
Nikita Smith d5811b7748 binary search for U64 and Rng1U64 arrays 2025-03-03 17:04:07 -08:00
Nikita Smith a06f576161 detect and error out on PDB linked with /DEBUG:FASTLINK 2025-02-25 14:42:10 -08:00
Nikita Smith 6c5d2a05cb moved platform depended code from OS layer to linkers IO 2025-02-25 14:41:34 -08:00
Nikita Smith d5ab121183 pre-allocate file size before write 2025-02-25 14:41:34 -08:00
Nikita Smith bbce89eada added /RAD_WRITE_TEMP_FILES
When enabled linker writes image and debug info to temporary files
and renames them after all writes are done.
2025-02-25 14:41:34 -08:00
Nikita Smith 8a8a8bcc8d resource id compar typo 2025-02-25 14:41:34 -08:00
Nikita Smith 1d441bac30 minor fixes and renames in DWARF enums 2025-02-25 14:41:16 -08:00
Nikita Smith 90c05d56b5 added zlib decompressor for DWARF extraction 2025-02-25 14:41:16 -08:00
Nikita Smith b74c304f39 added ELF header and parser 2025-02-25 14:41:15 -08:00
Nikita Smith 87ae363292 print file path in DW_Attrib_DeclFile 2025-02-25 14:41:15 -08:00
Nikita Smith ea6a84ca57 helper for extracting DWARF sections in COFF files 2025-02-25 14:41:15 -08:00
Nikita Smith 8d9f85bfcc move magic check to PE layer 2025-02-25 14:41:15 -08:00
Nikita Smith d9874e8f2f bugfix resource compar 2025-02-02 00:06:07 -08:00
Nikita Smith 76b83794b2 added printer for .res files 2025-02-01 23:50:30 -08:00
Nikita Smith 0a0742aa0e remove unused enum fields 2025-01-29 16:28:02 -08:00
Nikita Smith e114ea7fdb hook RDI printers to the dumper 2025-01-29 16:27:15 -08:00
Nikita Smith 5c1e219901 minor prof fix 2025-01-29 16:26:02 -08:00
Nikita Smith 497f0e45d6 WIP merging RDI dump into RAD Dumper 2025-01-29 10:47:18 -08:00
Nikita Smith bd5d38ef0c handle null write 2025-01-28 16:56:12 -08:00
Nikita Smith 5e3b500119 put ranges on arena 2025-01-28 16:46:50 -08:00
Nikita Smith 409905c983 yank out shared mutex impl
Initially shared mutex was needed to lock cores so thread pool
executes one parallel for at a time but on machine with high core count
we cant saturate processor all the time so we switched to shared semaphore
and block thread when all cores are busy.
2025-01-25 11:46:25 -08:00
Nikita Smith 0ca9d97750 error out on /LIB and /DUMP switches 2025-01-24 14:40:27 -08:00
Nikita Smith f2f18b9798 replaced /RAD_IDLE_WORKERS with /RAD_SHARED_THREAD_POOL_MAX_WORKERS 2025-01-24 12:49:30 -08:00
Nikita Smith 8196ef0a6e tweaks and fixed in thread pool
- created a separate entry point for shared workers
- fixed race condition in tp_run_tasks where worker would read
  modified task count and cause unpredictable behavior
2025-01-24 10:33:42 -08:00
Nikita Smith b18060ef0d on crash CRT randomly wont flush stdout 2025-01-23 20:45:25 -08:00
Nikita Smith b463c8087d copy alternate name strings 2025-01-23 20:44:14 -08:00
Nikita Smith 71b0dfa150 bugfix for uninited memory 2025-01-23 20:39:06 -08:00
Nikita Smith b007e4c0e5 printer for S_LABEL 2025-01-23 20:38:43 -08:00
Nikita Smith 53db7ee712 fix symbol table printer for big objs 2025-01-21 11:29:28 -08:00
Nikita Smith aa4ec903a6 update LF_STRUCT2 printer 2025-01-21 11:29:12 -08:00
Nikita Smith c6d28b97b7 more details for LF_STRUCT2 2025-01-21 11:14:12 -08:00
Nikita Smith 61307aefbc reworked thread pool to share workers via semaphore 2025-01-21 01:55:13 -08:00
Nikita Smith 85ea141b83 minor fixes 2025-01-20 21:53:45 -08:00
Nikita Smith d3fbc858b8 impl shared thread pool mode 2025-01-20 21:41:24 -08:00
Nikita Smith e1e7fb745e win32 shared mutex impl and linux stubs 2025-01-20 21:36:43 -08:00
Nikita Smith 153bbc7b1d pass over COFF layer
- updated naming convention on structs, enums, and macros to conform with code base style
- moved related structs closer to each other
- moved parser code to separate file
2025-01-20 19:31:52 -08:00
Nikita Smith 269dc33985 set COMDAT selection on chunks created by import table 2025-01-18 23:21:06 -08:00
Nikita Smith a1d5837ff3 helpers for matching string literals 2025-01-18 17:39:11 -08:00
Nikita Smith 89ff4d0de2 on lambda types we have to replace unique name with hash,
otherwise visual studio wont show local variables in lambdas
2025-01-17 15:31:34 -08:00
Nikita Smith de2ea38f50 build file paths relative to image path 2025-01-16 14:03:14 -08:00
Nikita Smith b405ed4873 factored out logic for splitting function chunks into separate pass
over symbol table; associations are now assigned to sub chunks too;
inherit function chunk align from parent chunk
2025-01-16 13:47:13 -08:00
Nikita Smith c000817b9a pass over COFF symbol parser 2025-01-16 13:43:19 -08:00
Nikita Smith 190eb03ff3 removed default lib directive parser, moved directive code to obj file,
getting ready to deprecate LNK_Directive struct
2025-01-15 14:03:40 -08:00
Nikita Smith 1d6ee73409 handle zero sized array 2025-01-15 10:37:47 -08:00
Nikita Smith 1f8433096a COFF parser fixes 2025-01-15 10:25:16 -08:00
Nikita Smith 25f924b075 generate markers from RDI 2025-01-14 16:49:23 -08:00
Nikita Smith b889765c15 updated PE bin info to handle RDI entry, changed raddump to
convert and load RDI from memory, added helper for parsing debug directory
2025-01-14 16:49:05 -08:00
Nikita Smith b1c5b308c0 collect inline site name string 2025-01-14 10:42:22 -08:00
Nikita Smith 24efb574f1 factored out inline site decoder into stand alone helper so it can be
reused in the converter
2025-01-13 18:00:18 -08:00
Nikita Smith 3cec629a8c pipe obj directives through config path 2025-01-13 15:22:37 -08:00
Nikita Smith 076aa0a8cb build fixes for parse_inline_sites 2025-01-13 10:12:15 -08:00
Nikita Smith 30dc0340a4 print sizes in telemetry mark up in GSI build step 2025-01-08 03:26:04 -08:00
Nikita Smith 2b33978037 updated name convention for flag extract macro in CodeView layer 2025-01-08 03:26:04 -08:00
Nikita Smith 42e441541d fixes for LEB decode 2025-01-08 03:26:04 -08:00
Nikita Smith d0d1786cec define enum for image type 2025-01-08 03:26:04 -08:00
Nikita Smith 0d0a6d3980 fixed compile error in Linux entry point 2025-01-08 03:26:04 -08:00
Nikita Smith 98b9427446 dumper for Dwarf 2025-01-08 03:26:04 -08:00
Nikita Smith 543ee72f95 u64 array helper 2025-01-08 03:26:04 -08:00
Nikita Smith a5c9a1c978 u64 array sort 2025-01-08 03:26:04 -08:00
Nikita Smith b27b783e6f Dwarf parser WIP
Copied the parser from internal repo and integrated with the base layer
(not tested)

Parser uses based/range pattern for which we have an alternative in
string layer (str8_deserial_*)
2025-01-08 03:26:04 -08:00
Nikita Smith 76b742ceb8 coffdump -> raddump 2025-01-08 03:26:04 -08:00
Nikita Smith b6b64be867 moved enum handling code to separate files 2025-01-08 03:24:35 -08:00
Nikita Smith 3961f93d1a moved CodeView parser code into separate file 2025-01-08 03:24:35 -08:00
Nikita Smith be81533f63 removed coff guid and added missing defrange symbol 2025-01-08 03:24:35 -08:00
Nikita Smith 2a72f525fb added support for dumping disassembly and raw data out of sections 2024-12-11 12:07:42 -08:00
Nikita Smith c91253a19e move feature flags to appropriate layer 2024-12-10 14:07:51 -08:00
Nikita Smith 48cb999c3d format VC Features and COFF Group in debug directory 2024-12-10 13:47:47 -08:00
Nikita Smith 9ff49c33cc validate export table fields 2024-12-10 13:44:09 -08:00
Nikita Smith cd3fd4df16 format file preamble and warn about unknown argument 2024-12-09 17:16:44 -08:00
Nikita Smith dd3b4a025d advance offset 2024-12-09 15:49:34 -08:00
Nikita Smith aaa82af9b3 format base relocations 2024-12-09 15:25:12 -08:00
Nikita Smith db82b2ea63 remove dependency on bin info from base reloc parser 2024-12-09 15:24:18 -08:00
Nikita Smith 723c950c01 add default params for /FUNCTIONPADMIN 2024-12-09 14:27:03 -08:00
Nikita Smith 08a368dd66 handle ADDR32 base relocation 2024-12-06 15:35:33 -08:00
Nikita Smith f56bc209e0 minor fix 2024-12-06 14:39:00 -08:00
Nikita Smith b5273d6a00 keep parsing on encountering epilog opcode 2024-12-06 14:00:12 -08:00
Nikita Smith 6cf42338ba clang build fixes 2024-12-06 12:05:44 -08:00
Nikita Smith e73ce59945 WIP coffdump 2024-12-06 11:53:16 -08:00
Nikita Smith c3831e4350 WIP parser for MSVC C++ exceptions unwind info 2024-12-06 11:53:16 -08:00
Nikita Smith 0ea0820d19 minor fixes and cleanups 2024-12-06 11:53:16 -08:00
Nikita Smith 86db833a83 pass over PE
* upgraded PE with parsers for imports, exports, and tls
* added struct definitions for image load config and debug dir structs
2024-12-06 11:53:16 -08:00
Nikita Smith 80fa226432 pass over COFF archive parser 2024-12-06 11:53:16 -08:00
Nikita Smith 29de0c5a9e moved unsigned range list to base math 2024-12-06 11:53:16 -08:00
Nikita Smith d73e53a5b5 integer array structs 2024-12-06 11:53:16 -08:00
Nikita Smith 3851604705 32bit integer from ascii helpers 2024-12-06 11:53:16 -08:00