亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? args-x86.c

?? It s a Linux disassemble, can set break point, disassemble ELF file.
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * libDASM * * Copyright (C) 2000-2003 Patrick Alken * This library comes with absolutely NO WARRANTY * * Should you choose to use and/or modify this source code, please * do so under the terms of the GNU General Public License under which * this library is distributed. * * $Id: args-x86.c,v 1.3 2004/09/02 00:11:59 pa33 Exp $ * * This module is used by the disassembler to construct the argument * string for a particular opcode. */#include <stdio.h>#include <string.h>#include <assert.h>#include "args-x86.h"#include "common-x86.h"#include "inames-x86.h"#include "operands-x86.h"#include "prefix-x86.h"#include "regs-x86.h"/* * Top-level includes */#include "libDASM.h"static char *x86operandRegister(struct x86matchInfo *ptr, int opnum,                                char *errstr);static int x86operandEffectiveAddress(struct disasmWorkspace *ws,                                      struct x86matchInfo *ptr,                                      unsigned int operand, char *str);static int x86operandSegOff(unsigned char **data, unsigned int operand,                            char *str);static int x86operandMemoryOffset(struct disasmWorkspace *ws,                                  unsigned char **data,                                  char *str);static unsigned long x86getImmediate(unsigned char **data,                                     unsigned int flags, int *err);/* * The following x86RegisterCodesXX[] tables correspond to table 3.1 * in the Intel Architecture Software Developer's Manual, Vol 2. They * are used to determine the register specified by a +rb/+rw/+rd * code added to the last byte of an opcode. The value added * to the last opcode byte is between 0 and 7, and indexes these * tables to get the correct register. *//* +rb - 8 bit register operand */static int x86RegisterCodes8[] = {  R_AL,  R_CL,  R_DL,  R_BL,  R_AH,  R_CH,  R_DH,  R_BH};/* +rw - 16 bit register operand */static int x86RegisterCodes16[] = {  R_AX,  R_CX,  R_DX,  R_BX,  R_SP,  R_BP,  R_SI,  R_DI};/* +rd - 32 bit register operand */static int x86RegisterCodes32[] = {  R_EAX,  R_ECX,  R_EDX,  R_EBX,  R_ESP,  R_EBP,  R_ESI,  R_EDI};static char *x86SegmentRegisters[] = {  "es",  "cs",  "ss",  "ds",  "fs",  "gs",  "?s",  "?s"};/*x86constructArguments()  Construct the correct arguments for the instruction 'ptr'.Inputs: ws      - disasm workspace        data    - data buffer containing instruction we are                  disassembling        ptr     - instruction matching 'data'        outbuf  - where to store arguments        address - address of this instruction in the file or memory                  we are currently disassembling; when given,                  relative addresses (such as in a CALL or JMP)                  will be added to this address to calculate                  an exact target address.Return: 1 upon success        0 upon failure (error message goes in outbuf)Side effects: On success, outbuf will contain instruction name and arguments              On failure, outbuf will contain error message              'data' variable may be advanced due to reading of immediate bytes,              modrm bytes, etc*/intx86constructArguments(struct disasmWorkspace *ws, unsigned char **data,                      struct x86matchInfo *ptr, char *outbuf,                      unsigned int address){  int ii;                   /* looping */  struct x86OpCode *opPtr;  /* opcode pointer */  char tmpbuf[MAXLINE];     /* temporary buffer */  char *origout;            /* original outbuf */  long bias;                /* eip relative address bias */  assert(data && *data && ptr && outbuf);  /*   * bias is initialized to the 2's compliment of the instruction's   * actual address in the buffer.  We do this to compute the   * size of the instruction by adding the new value of *data.   * The resulting equation is this:   *   * bias = NEW_data_addr - OLD_data_addr   *   * which is precisely what we want.   *   * Note the [-1] subscript of the character array reference is   * to compensate for the fact that the instruction's opcode has   * already been "fetched" by the disassembly engine.   *   * --2004aug30 saf2   *   * The purpose of this is for relative operands which are   * defined relative to the instruction after the current   * instruction. In order to compute an exact address, we   * need to know the size of the current opcode. This bias   * variable is set to that size in the section below on   * relative operands.   *   * -- Patrick Alken   */  bias = -((unsigned long)(&((*data)[-1])));  opPtr = ptr->opPtr;  origout = outbuf;  if (ws->prefixFlags & PX_LOCK)    outbuf += sprintf(outbuf, "%s", "lock ");  else if (ws->prefixFlags & PX_REP)    outbuf += sprintf(outbuf, "%s", "rep ");  else if (ws->prefixFlags & PX_REPE)    outbuf += sprintf(outbuf, "%s", "repe ");  else if (ws->prefixFlags & PX_REPNE)    outbuf += sprintf(outbuf, "%s", "repne ");  /*   * Write instruction name to outbuf   */  outbuf += sprintf(outbuf, "%s", x86InstructionNames[opPtr->name]);  /*   * Loop through operands and add them to outbuf   */  for (ii = 0; ii < opPtr->OperandCount; ++ii)  {    if (ii == 0)      *outbuf++ = ' ';    else    {      *outbuf++ = ',';      *outbuf++ = ' ';    }    if (opPtr->operands[ii] & NEAR)      outbuf += sprintf(outbuf, "near ");    else if (opPtr->operands[ii] & FAR)      outbuf += sprintf(outbuf, "far ");    else if (opPtr->operands[ii] & SHORT)      outbuf += sprintf(outbuf, "short ");    if (opPtr->operands[ii] & (REGISTER | REG_MMX | REG_XMM))    {      char *regstr;      /*       * We have a register operand - determine which register       * and print it to outbuf       */      regstr = x86operandRegister(ptr,                                  ii,                                  tmpbuf);      if (regstr)        outbuf += sprintf(outbuf, "%s", regstr);      else      {        strcpy(origout, tmpbuf);        return (0); /* error */      }    } /* if (opPtr->operands[ii] & (REGISTER | REG_MMX | REG_XMM)) */    else if (opPtr->operands[ii] & IMMEDIATE)    {      unsigned long value;      int err;      err = 0;      value = x86getImmediate(data,                              opPtr->operands[ii],                              &err);      if (err)      {        sprintf(origout,                "x86constructArguments: x86getImmediate failed for instruction: %s",                x86InstructionNames[opPtr->name]);        return (0);      }      outbuf += sprintf(outbuf, "0x%lx", value);    } /* if (opPtr->operands[ii] & IMMEDIATE) */    else if (opPtr->operands[ii] & (REGMEM | MEMORY))    {      int ret;      /*       * We have an rm8/rm16/rm32 operand       */      ret = x86operandEffectiveAddress(ws,                                       ptr,                                       opPtr->operands[ii],                                       tmpbuf);      if (ret >= 0)        outbuf += sprintf(outbuf, "%s", tmpbuf);      else      {        strcpy(origout, tmpbuf);        return (0); /* error */      }    } /* if (opPtr->operands[ii] & (REGMEM | MEMORY)) */    else if (opPtr->operands[ii] & RELATIVE)    {      unsigned long value;      int err;      /*       * Relative operands (rel8/16/32) are bytes following       * the opcode specifying a relative address       */      err = 0;      value = x86getImmediate(data,                              opPtr->operands[ii],                              &err);      if (err)      {        sprintf(origout,                "x86constructArguments: x86getImmediate failed for instruction: %s",                x86InstructionNames[opPtr->name]);        return (0);      }      /*       * Note: this code was contributed by Samuel Falvo II       * <kc5tja =at= arrl net>       */      bias += (unsigned long) (*data);      if ((unsigned char) *(opPtr->mcode) == 0x0F)      {        /* two-byte branch */        bias++;      }      outbuf += sprintf(outbuf, "+0x%lx", value);      /*       * Store the exact target address in ws->effectiveAddress       * so that the calling program can use it to look up       * symbols/functions corresponding to this relative       * address.       */      ws->effectiveAddress = address + value + bias;    } /* if (opPtr->operands[ii] & RELATIVE) */    else if (opPtr->operands[ii] & SEG16)    {      int ret;      /*       * This operand is ptr16:16 or ptr16:32.       * This means we need an expression of the form       * segment:offset, where segment is the number of bits on       * the left of the colon, and offset is the number of bits       * on the right.       */      ret = x86operandSegOff(data, opPtr->operands[ii], tmpbuf);      if (ret >= 0)        outbuf += sprintf(outbuf, "%s", tmpbuf);      else      {        strcpy(origout, tmpbuf);        return (0); /* error */      }    } /* if (opPtr->operands[ii] & SEG16) */    else if (opPtr->operands[ii] & REG_FPU)    {      /*       * Floating point stack register       */      assert(ptr->fpucode >= 0);      assert(ptr->fpucode <= 7);      outbuf += sprintf(outbuf,                        "%s",                        x86RegistersDASM[R_ST0 + ptr->fpucode].name);    } /* if (opPtr->operands[ii] & REG_FPU) */    else if (opPtr->operands[ii] & REG_SR)    {      /*       * We have an Sreg operand (segment register). The REG       * field of the ModR/M byte specifies which register to use.       * According to IAS, Vol 2, the values of the segment registers       * are as follows:       *       * ES = 0       * CS = 1       * SS = 2       * DS = 3       * FS = 4       * GS = 5       */      outbuf += sprintf(outbuf,                        "%s",                        x86SegmentRegisters[ptr->msinfo.reg]);    } /* if (opPtr->operands[ii] & REG_SR) */    else if (opPtr->operands[ii] & REG_CONTROL)    {      /*       * According to IAS, Vol 2. the REG field of the ModR/M       * byte specifies the control register       */      outbuf += sprintf(outbuf,                        "%s",                        x86RegistersDASM[R_CR0 + ptr->msinfo.reg].name);    } /* if (opPtr->operands[ii] & REG_CONTROL) */    else if (opPtr->operands[ii] & REG_DEBUG)    {      /*       * According to IAS, Vol 2. the REG field of the ModR/M       * byte specifies the debug register       */      outbuf += sprintf(outbuf,                        "%s",                        x86RegistersDASM[R_DR0 + ptr->msinfo.reg].name);    } /* if (opPtr->operands[ii] & REG_DEBUG) */    else if (opPtr->operands[ii] & MEMOFFS)    {      int ret;      /*       * We have a moffs8/16/32 operand. This is a 16 or 32 bit       * offset (depending on the size attributes of the instruction)       * which comes after the opcode. The 8/16/32 following the moffs       * specify the size of the data at the offset location.       */      ret = x86operandMemoryOffset(ws, data, tmpbuf);      if (ret >= 0)        outbuf += sprintf(outbuf, "%s", tmpbuf);      else      {        strcpy(origout, tmpbuf);        return (0); /* error */      }    } /* if (opPtr->operands[ii] & MEMOFFS) */    else if (opPtr->operands[ii] & CONSTANT)    {      /*       * The operand is a numerical constant whose value       * is stored in opinfo[ii]       */      assert(opPtr->opinfo[ii] != NOOPARG);      outbuf += sprintf(outbuf, "%d", opPtr->opinfo[ii]);    } /* if (opPtr->operands[ii] & CONSTANT) */  } /* for (ii = 0; ii < opPtr->OperandCount; ++ii) */  *outbuf = '\0';

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲宅男天堂在线观看无病毒| 亚洲四区在线观看| 欧美日韩精品欧美日韩精品| 色婷婷精品大视频在线蜜桃视频| kk眼镜猥琐国模调教系列一区二区| 国产久卡久卡久卡久卡视频精品| 久草热8精品视频在线观看| 免播放器亚洲一区| 激情六月婷婷久久| 高清beeg欧美| 色综合激情五月| 91精品国产综合久久香蕉的特点| 欧美一区二区三区电影| 精品国产污污免费网站入口| 久久嫩草精品久久久精品| 日本一区二区免费在线| 一区二区三区在线播| 丝袜美腿成人在线| 国模套图日韩精品一区二区| 国产不卡高清在线观看视频| av色综合久久天堂av综合| 欧美日韩你懂得| 久久天天做天天爱综合色| 国产精品系列在线| 日韩中文字幕区一区有砖一区 | 国产欧美日韩不卡| 日韩理论片在线| 日本怡春院一区二区| 国产69精品一区二区亚洲孕妇| 欧美中文字幕不卡| 久久尤物电影视频在线观看| 亚洲最新在线观看| 久久精工是国产品牌吗| 一本色道a无线码一区v| 日韩欧美视频一区| 亚洲欧美另类小说| 狠狠久久亚洲欧美| 在线播放欧美女士性生活| 欧美国产亚洲另类动漫| 午夜精品久久久久| 不卡视频一二三| 日韩一级欧美一级| 一片黄亚洲嫩模| 国产91对白在线观看九色| 日韩一区二区电影网| 亚洲靠逼com| 国产91精品久久久久久久网曝门| 欧美高清www午色夜在线视频| 国产精品久久久久一区| 麻豆成人免费电影| 欧美日韩二区三区| 亚洲精品自拍动漫在线| 成人短视频下载| 欧美一区二区国产| 五月天视频一区| 欧美亚洲愉拍一区二区| 国产精品久久久久久久岛一牛影视 | 亚洲国产一区二区三区| 丁香激情综合五月| 精品精品欲导航| 亚洲国产精品尤物yw在线观看| va亚洲va日韩不卡在线观看| 久久影视一区二区| 久久99这里只有精品| 日韩一级黄色大片| 日韩黄色一级片| 欧美日韩极品在线观看一区| 一区二区三区色| 色婷婷国产精品综合在线观看| 国产精品久久毛片a| 国产精品99久久久久久似苏梦涵 | 国内精品免费**视频| 日韩三级视频中文字幕| 日韩av电影一区| 91.com视频| 婷婷开心久久网| 欧美一级日韩免费不卡| 青青国产91久久久久久| 3d动漫精品啪啪一区二区竹菊| 亚洲第一搞黄网站| 欧美一区二区三区视频在线| 日韩成人午夜电影| 欧美本精品男人aⅴ天堂| 久久99精品久久久久| 久久看人人爽人人| 成人av网站在线观看| 亚洲精品日日夜夜| 欧美日韩精品免费观看视频| 麻豆精品一区二区三区| 久久久噜噜噜久噜久久综合| 国产风韵犹存在线视精品| 中文字幕中文字幕在线一区| 色综合久久66| 老司机精品视频一区二区三区| 久久精品夜色噜噜亚洲aⅴ| 97久久超碰国产精品| 亚洲成人自拍偷拍| 久久综合色之久久综合| 99国产欧美另类久久久精品| 亚洲国产综合色| 久久亚洲精华国产精华液 | 亚洲一区二区三区中文字幕在线| 7777精品伊人久久久大香线蕉的| 奇米综合一区二区三区精品视频| 亚洲精品一区二区三区99| 成人高清免费观看| 午夜久久久影院| 精品国产免费一区二区三区四区| 成人免费视频视频| 日韩精品久久理论片| 国产精品色在线观看| 欧美另类变人与禽xxxxx| 国产乱妇无码大片在线观看| 美女视频一区二区| 国产精品美女久久久久久久久 | 国产视频在线观看一区二区三区| 欧洲在线/亚洲| 久久精品国产免费看久久精品| 亚洲特黄一级片| 26uuu国产日韩综合| 欧美偷拍一区二区| 99久久精品国产导航| 精品一区二区三区免费播放| 亚洲一区在线电影| 亚洲天堂精品在线观看| 久久久美女艺术照精彩视频福利播放| 日本乱码高清不卡字幕| 国产黑丝在线一区二区三区| 日韩制服丝袜先锋影音| 亚洲一区二区在线播放相泽| 久久久.com| 91精品国产综合久久久蜜臀粉嫩| 91免费国产在线观看| 国产精品一区二区91| 蜜臂av日日欢夜夜爽一区| 亚洲国产一区二区a毛片| 亚洲三级视频在线观看| 久久久国产午夜精品| 欧美一区二区久久久| 色综合久久中文字幕综合网| 国产乱码一区二区三区| 青青草国产精品亚洲专区无| 亚洲国产人成综合网站| 亚洲精品国产高清久久伦理二区| 国产精品天干天干在线综合| 2020国产精品久久精品美国| 日韩欧美黄色影院| 欧美一区二区久久久| 91精品午夜视频| 欧美蜜桃一区二区三区| 欧美剧情电影在线观看完整版免费励志电影 | 欧美一级片免费看| 欧美一a一片一级一片| av亚洲精华国产精华精华| 波多野洁衣一区| 成人av资源网站| 99久久婷婷国产综合精品| 成人免费电影视频| 97精品久久久午夜一区二区三区 | 色婷婷精品大视频在线蜜桃视频| 99视频精品免费视频| proumb性欧美在线观看| 色8久久人人97超碰香蕉987| 欧美在线影院一区二区| 欧美精品 日韩| 精品播放一区二区| 国产亚洲美州欧州综合国| 国产精品剧情在线亚洲| 亚洲精选视频在线| 亚洲成人动漫在线免费观看| 蜜桃视频一区二区三区在线观看| 美女视频黄久久| 国产精品影音先锋| 色综合色狠狠天天综合色| 在线观看91av| 国产视频一区在线播放| 一区二区免费在线播放| 男男视频亚洲欧美| 成人免费看的视频| 欧美日韩免费视频| 久久久五月婷婷| 亚洲一区二区四区蜜桃| 经典三级视频一区| 色香蕉成人二区免费| 欧美色网站导航| 久久久91精品国产一区二区精品| 亚洲综合视频在线观看| 紧缚捆绑精品一区二区| 91论坛在线播放| 精品粉嫩超白一线天av| 亚洲视频免费看| 久久精品av麻豆的观看方式| 成人教育av在线| 日韩无一区二区| 亚洲综合一区二区| 国产电影精品久久禁18| 欧美视频日韩视频在线观看| 欧美激情一区二区| 久久精品国产**网站演员| 色94色欧美sute亚洲线路一ni|