File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed
Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -134,40 +134,6 @@ mod tests {
134134 use crate :: { memory:: MemorySegmentImage , read_testing_elf_from_path} ;
135135
136136 use super :: * ;
137- use std:: fs:: File ;
138- use std:: io:: Write ;
139-
140- #[ allow( dead_code) ]
141- fn write_instruction_to_file ( instructions : & [ u32 ] , file_path : & str ) {
142- let mut file = File :: create ( file_path) . unwrap ( ) ;
143- for & instruction in instructions {
144- file. write_all ( & instruction. to_le_bytes ( ) ) . unwrap ( ) ;
145- }
146- }
147-
148- #[ allow( dead_code) ]
149- fn write_memory_to_file ( memory : & MemorySegmentImage , file_path : & str ) {
150- let mut file = File :: create ( file_path) . unwrap ( ) ;
151- file. write_all ( memory. as_byte_slice ( ) ) . unwrap ( ) ;
152- }
153-
154- #[ allow( dead_code) ]
155- fn debug_elf_file ( elf : & ElfFile , file_path : & str ) {
156- dbg ! ( elf. instructions. len( ) ) ;
157- dbg ! ( elf. entry) ;
158- dbg ! ( elf. base) ;
159- dbg ! ( elf. ram_image. len_bytes( ) ) ;
160- dbg ! ( elf. rom_image. len_bytes( ) ) ;
161-
162- // Write elf.instructions to a file
163- write_instruction_to_file ( & elf. instructions , & format ! ( "{file_path}.inst.bin" ) ) ;
164-
165- // Write elf.memory_image to a file
166- write_memory_to_file ( & elf. ram_image , & format ! ( "{file_path}.mem.bin" ) ) ;
167-
168- // Write elf.readonly_memory_image to a file
169- write_memory_to_file ( & elf. rom_image , & format ! ( "{file_path}.rom.bin" ) ) ;
170- }
171137
172138 #[ test]
173139 fn test_parse_elf_files ( ) {
You can’t perform that action at this time.
0 commit comments