mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	LibDebug: Use Core::Stream to read opcodes for expression evaluation
				
					
				
			This commit is contained in:
		
							parent
							
								
									91505d8cf3
								
							
						
					
					
						commit
						a9eea2e0c4
					
				
					 3 changed files with 7 additions and 8 deletions
				
			
		|  | @ -7,18 +7,17 @@ | |||
| #include "Expression.h" | ||||
| 
 | ||||
| #include <AK/Format.h> | ||||
| #include <AK/MemoryStream.h> | ||||
| #include <LibCore/MemoryStream.h> | ||||
| #include <sys/arch/regs.h> | ||||
| 
 | ||||
| namespace Debug::Dwarf::Expression { | ||||
| 
 | ||||
| Value evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs) | ||||
| ErrorOr<Value> evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs) | ||||
| { | ||||
|     InputMemoryStream stream(bytes); | ||||
|     auto stream = TRY(Core::Stream::FixedMemoryStream::construct(bytes)); | ||||
| 
 | ||||
|     while (!stream.eof()) { | ||||
|         u8 opcode = 0; | ||||
|         stream >> opcode; | ||||
|     while (!stream->is_eof()) { | ||||
|         auto opcode = TRY(stream->read_value<u8>()); | ||||
| 
 | ||||
|         switch (static_cast<Operations>(opcode)) { | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Schumacher
						Tim Schumacher