diff options
Diffstat (limited to 'src/processor/disassembler_x86.cc')
-rw-r--r-- | src/processor/disassembler_x86.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/processor/disassembler_x86.cc b/src/processor/disassembler_x86.cc index 55902240..dffb996d 100644 --- a/src/processor/disassembler_x86.cc +++ b/src/processor/disassembler_x86.cc @@ -1,7 +1,16 @@ +// Copyright 2010 Google LLC +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. -// * Neither the name of Google Inc. nor the names of its +// * Neither the name of Google LLC nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // @@ -30,7 +39,7 @@ namespace google_breakpad { -DisassemblerX86::DisassemblerX86(const uint8_t *bytecode, +DisassemblerX86::DisassemblerX86(const uint8_t* bytecode, uint32_t size, uint32_t virtual_address) : bytecode_(bytecode), @@ -62,7 +71,7 @@ uint32_t DisassemblerX86::NextInstruction() { return 0; } uint32_t instr_size = 0; - instr_size = libdis::x86_disasm((unsigned char *)bytecode_, size_, + instr_size = libdis::x86_disasm((unsigned char*)bytecode_, size_, virtual_address_, current_byte_offset_, ¤t_instr_); if (instr_size == 0) { @@ -78,8 +87,8 @@ uint32_t DisassemblerX86::NextInstruction() { if (current_instr_.type == libdis::insn_return) end_of_block_ = true; - libdis::x86_op_t *src = libdis::x86_get_src_operand(¤t_instr_); - libdis::x86_op_t *dest = libdis::x86_get_dest_operand(¤t_instr_); + libdis::x86_op_t* src = libdis::x86_get_src_operand(¤t_instr_); + libdis::x86_op_t* dest = libdis::x86_get_dest_operand(¤t_instr_); if (register_valid_) { switch (current_instr_.group) { @@ -213,7 +222,7 @@ bool DisassemblerX86::setBadRead() { if (!instr_valid_) return false; - libdis::x86_op_t *operand = libdis::x86_get_src_operand(¤t_instr_); + libdis::x86_op_t* operand = libdis::x86_get_src_operand(¤t_instr_); if (!operand || operand->type != libdis::op_expression) return false; @@ -227,7 +236,7 @@ bool DisassemblerX86::setBadWrite() { if (!instr_valid_) return false; - libdis::x86_op_t *operand = libdis::x86_get_dest_operand(¤t_instr_); + libdis::x86_op_t* operand = libdis::x86_get_dest_operand(¤t_instr_); if (!operand || operand->type != libdis::op_expression) return false; |