Expression.cpp 730 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "Expression.h"
  7. #include <AK/Format.h>
  8. #include <AK/MemoryStream.h>
  9. #include <sys/arch/regs.h>
  10. namespace Debug::Dwarf::Expression {
  11. ErrorOr<Value> evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs)
  12. {
  13. FixedMemoryStream stream { bytes };
  14. while (!stream.is_eof()) {
  15. auto opcode = TRY(stream.read_value<u8>());
  16. switch (static_cast<Operations>(opcode)) {
  17. default:
  18. dbgln("DWARF expr addr: {:p}", bytes.data());
  19. dbgln("unsupported opcode: {}", opcode);
  20. VERIFY_NOT_REACHED();
  21. }
  22. }
  23. VERIFY_NOT_REACHED();
  24. }
  25. }