summaryrefslogtreecommitdiff
path: root/Libraries/LibDebug/Dwarf/Expression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibDebug/Dwarf/Expression.cpp')
-rw-r--r--Libraries/LibDebug/Dwarf/Expression.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/Libraries/LibDebug/Dwarf/Expression.cpp b/Libraries/LibDebug/Dwarf/Expression.cpp
index ddc1dfcde4..a38b0fd2bd 100644
--- a/Libraries/LibDebug/Dwarf/Expression.cpp
+++ b/Libraries/LibDebug/Dwarf/Expression.cpp
@@ -24,18 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Expression.h"
-#include <AK/BufferStream.h>
+
+#include <AK/Stream.h>
+
#include <sys/arch/i386/regs.h>
-namespace Dwarf {
-namespace Expression {
+namespace Dwarf::Expression {
-Value evaluate(const ByteBuffer& bytes, const PtraceRegisters& regs)
+Value evaluate(ReadonlyBytes bytes, const PtraceRegisters& regs)
{
- // TODO: we need a BufferStream variant that takes a const ByteBuffer
- BufferStream stream(const_cast<ByteBuffer&>(bytes));
+ InputMemoryStream stream(bytes);
- while (!stream.at_end()) {
+ while (!stream.eof()) {
u8 opcode = 0;
stream >> opcode;
@@ -61,5 +61,4 @@ Value evaluate(const ByteBuffer& bytes, const PtraceRegisters& regs)
ASSERT_NOT_REACHED();
}
-};
-};
+}