• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ qnotused函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中qnotused函数的典型用法代码示例。如果您正苦于以下问题:C++ qnotused函数的具体用法?C++ qnotused怎么用?C++ qnotused使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了qnotused函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ReadExecutableAtRVA

  HRESULT STDMETHODCALLTYPE ReadExecutableAtRVA(
   DWORD  relativeVirtualAddress,
   DWORD  cbData,
   DWORD* pcbData,
   BYTE   data[] )
  {
#ifdef PDBTOTIL
    if ( mem_reader != NULL )
    {
      uint32 read;
      bool ok = mem_reader(m_load_address + relativeVirtualAddress, cbData, data, &read);
      if ( !ok )
        return E_FAIL;
      *pcbData = read;
      return S_OK;
    }
#endif
#ifndef BUILDING_EFD
#ifndef PDBTOTIL
    if ( get_many_bytes(m_load_address + relativeVirtualAddress, data, cbData) )
    {
      *pcbData = cbData;
      return S_OK;
    }
#endif
#else
    qnotused(relativeVirtualAddress);
    qnotused(cbData);
    qnotused(pcbData);
    qnotused(data);
#endif
    return S_FALSE;
  }
开发者ID:nealey,项目名称:vera,代码行数:33,代码来源:common.cpp


示例2: notify

//----------------------------------------------------------------------
// функция оповещения
static int notify(int msgnum,void *arg,...)
{ // Various messages:
  qnotused(arg);
  switch ( msgnum ) {
  // новый файл
  case IDP_NEWFILE:
      inf.mf = 0;                                       // MSB last
      inf.nametype = NM_SHORT;
      segment_t *sptr = get_first_seg();
      if ( sptr != NULL ) {
	if ( sptr->startEA-get_segm_base(sptr) == 0 ) {
	  inf.beginEA = sptr->startEA;
	  inf.startIP = 0;
	}
      }
      // основной сегмент - кодовый
      set_segm_class(get_first_seg(), "CODE");
      break;
    // создание нового сегмента
    case IDP_NEWSEG:    {
                        segment_t *seg;
                        seg=((segment_t *)arg);
                        // установим регистры по умолчанию
                        seg->defsr[rVds-ph.regFirstSreg] = 0;
                        break;
                        }
  }
  return 1;
}
开发者ID:awesome-security,项目名称:vera,代码行数:31,代码来源:reg.cpp


示例3: run

//--------------------------------------------------------------------------
// The plugin method - is not used for debugger plugins
static void idaapi run(int arg)
{
#ifdef HAVE_PLUGIN_RUN
  plugin_run(arg);
#else
  qnotused(arg);
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:10,代码来源:common_local_impl.cpp


示例4: compile

//--------------------------------------------------------------------------
static bool idaapi compile(     // Compile an expression
        const char *name,       // in: name of the function which will
                                //     hold the compiled expression
        ea_t current_ea,        // in: current address. if unknown then BADADDR
        const char *expr,       // in: expression to compile
        char *errbuf,           // out: error message if compilation fails
        size_t errbufsize)      // in: size of the error buffer
{                               // Returns: success
  qnotused(name);
  qnotused(current_ea);
  qnotused(expr);
  qnotused(errbuf);
  qnotused(errbufsize);
  // our toy interpreter doesn't support separate compilation/evaluation
  // some entry fields in ida won't be useable (bpt conditions, for example)
  qstrncpy(errbuf, "compilation error", errbufsize);
  return false;
}
开发者ID:nealey,项目名称:vera,代码行数:19,代码来源:extlang.cpp


示例5: qnotused

//--------------------------------------------------------------------------
// return lowcnd_t if its condition is not satisfied
lowcnd_t *debmod_t::get_failed_lowcnd(thid_t tid, ea_t ea)
{
#ifndef ENABLE_LOWCNDS
  qnotused(tid);
  qnotused(ea);
#else
  lowcnds_t::iterator p = cndmap.find(ea);
  if ( p != cndmap.end() )
  {
    bool ok = true;
    idc_value_t rv;
    char name[32];
    ::qsnprintf(name, sizeof(name), "__lc%a", ea);
    lowcnd_t &lc = p->second;
    lock_begin();
    {
      idc_debmod = this; // is required by compiler/interpreter
      idc_thread = tid;  // is required by          interpreter
      if ( !lc.compiled )
      {
        qstring func;
        func.sprnt("static %s() { return %s; }", name, lc.cndbody.begin());
        ok = CompileLineEx(func.begin(), NULL, 0, NULL, true);
        if ( ok )
          lc.compiled = true;
      }
      if ( ok )
        ok = Run(name, 0, NULL, &rv, NULL, 0);
    }
    lock_end();
    if ( !ok )
    {
      report_idc_error(ea, get_qerrno(), get_error_data(0), get_error_string(0));
      return NULL;
    }

    VarInt64(&rv);
    if ( rv.i64 == 0 )
      return &lc; // condition is not satisfied, resume
  }
#endif
  return NULL;
}
开发者ID:nealey,项目名称:vera,代码行数:45,代码来源:debmod.cpp


示例6: swap_pef_export

//----------------------------------------------------------------------
static void swap_pef_export(pef_export_t &pe)
{
#if __MF__
  qnotused(pe);
#else
  pe.classAndName = swap32(pe.classAndName);
  pe.symbolValue  = swap32(pe.symbolValue);
  pe.sectionIndex = swap16(pe.sectionIndex);
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:11,代码来源:common.cpp


示例7: swap_pef_reloc_header

//----------------------------------------------------------------------
static void swap_pef_reloc_header(pef_reloc_header_t &prh)
{
#if __MF__
  qnotused(prh);
#else
  prh.sectionIndex     = swap16(prh.sectionIndex);
  prh.reservedA        = swap16(prh.reservedA);
  prh.relocCount       = swap32(prh.relocCount);
  prh.firstRelocOffset = swap32(prh.firstRelocOffset);
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:12,代码来源:common.cpp


示例8: swap_pef_library

//----------------------------------------------------------------------
static void swap_pef_library(pef_library_t &pil)
{
#if __MF__
  qnotused(pil);
#else
  pil.nameOffset          = swap32(pil.nameOffset         );
  pil.oldImpVersion       = swap32(pil.oldImpVersion      );
  pil.currentVersion      = swap32(pil.currentVersion     );
  pil.importedSymbolCount = swap32(pil.importedSymbolCount);
  pil.firstImportedSymbol = swap32(pil.firstImportedSymbol);
  pil.reservedB           = swap16(pil.reservedB         );
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:14,代码来源:common.cpp


示例9: swap_pef_section

//----------------------------------------------------------------------
static void swap_pef_section(pef_section_t &ps)
{
#if __MF__
  qnotused(ps);
#else
  ps.nameOffset        = swap32(ps.nameOffset     );
  ps.defaultAddress    = swap32(ps.defaultAddress );
  ps.totalSize         = swap32(ps.totalSize      );
  ps.unpackedSize      = swap32(ps.unpackedSize   );
  ps.packedSize        = swap32(ps.packedSize     );
  ps.containerOffset   = swap32(ps.containerOffset);
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:14,代码来源:common.cpp


示例10: swap_pef

//----------------------------------------------------------------------
static void swap_pef(pef_t &pef)
{
#if __MF__
  qnotused(pef);
#else
  pef.formatVersion    = swap32(pef.formatVersion);
  pef.dateTimeStamp    = swap32(pef.dateTimeStamp);
  pef.oldDefVersion    = swap32(pef.oldDefVersion);
  pef.oldImpVersion    = swap32(pef.oldImpVersion);
  pef.currentVersion   = swap32(pef.currentVersion);
  pef.reservedA        = swap32(pef.reservedA);
  pef.sectionCount     = swap16(pef.sectionCount);
  pef.instSectionCount = swap16(pef.instSectionCount);
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:16,代码来源:common.cpp


示例11: calcexpr

//--------------------------------------------------------------------------
static bool idaapi calcexpr(    // Compile and evaluate expression
        ea_t current_ea,        // in: current address. if unknown then BADADDR
        const char *expr,       // in: expression to evaluation
        idc_value_t *rv,        // out: expression value
        char *errbuf,           // out: error message if evaluation fails
        size_t errbufsize)      // in: size of the error buffer
{                               // Returns: success
  qnotused(current_ea);
  // we know to parse and decimal and hexadecimal numbers
  int radix = 10;
  const char *ptr = skipSpaces(expr);
  bool neg = false;
  if ( *ptr == '-' )
  {
    neg = true;
    ptr = skipSpaces(ptr+1);
  }
  if ( *ptr == '0' && *(ptr+1) == 'x' )
  {
    radix = 16;
    ptr += 2;
  }
  sval_t value = 0;
  while ( radix==10 ? isdigit(*ptr) : isxdigit(*ptr) )
  {
    int d = *ptr <= '9' ? *ptr-'0' : tolower(*ptr)-'a'+10;
    value *= radix;
    value += d;
    ptr++;
  }
  if ( neg )
    value = -value;
  ptr = skipSpaces(ptr);
  if ( *ptr != '\0' )
  {
    msg("EVAL FAILED: %s\n", expr);
    qstrncpy(errbuf, "syntax error", errbufsize);
    return false;
  }

  // we have the result, store it in the return value
  rv->clear();
  rv->num = value;
  msg("EVAL %d: %s\n", value, expr);
  return true;
}
开发者ID:nealey,项目名称:vera,代码行数:47,代码来源:extlang.cpp


示例12: swap_pef_loader

//----------------------------------------------------------------------
static void swap_pef_loader(pef_loader_t &pl)
{
#if __MF__
  qnotused(pl);
#else
  pl.mainSection              = swap32(pl.mainSection             );
  pl.mainOffset               = swap32(pl.mainOffset              );
  pl.initSection              = swap32(pl.initSection             );
  pl.initOffset               = swap32(pl.initOffset              );
  pl.termSection              = swap32(pl.termSection             );
  pl.termOffset               = swap32(pl.termOffset              );
  pl.importLibraryCount       = swap32(pl.importLibraryCount      );
  pl.totalImportedSymbolCount = swap32(pl.totalImportedSymbolCount);
  pl.relocSectionCount        = swap32(pl.relocSectionCount       );
  pl.relocInstrOffset         = swap32(pl.relocInstrOffset        );
  pl.loaderStringsOffset      = swap32(pl.loaderStringsOffset     );
  pl.exportHashOffset         = swap32(pl.exportHashOffset        );
  pl.exportHashTablePower     = swap32(pl.exportHashTablePower    );
  pl.exportedSymbolCount      = swap32(pl.exportedSymbolCount     );
#endif
}
开发者ID:nealey,项目名称:vera,代码行数:22,代码来源:common.cpp


示例13: run

//--------------------------------------------------------------------------
static bool idaapi run(         // Evaluate a previously compiled expression
        const char *name,       // in: function to run
        int nargs,              // in: number of input arguments
        const idc_value_t args[], // in: input arguments
        idc_value_t *result,    // out: function result
        char *errbuf,           // out: error message if evaluation fails
        size_t errbufsize)      // in: size of the error buffer
{                               // Returns: success
  qnotused(name);
  qnotused(nargs);
  qnotused(args);
  qnotused(result);
  qnotused(errbuf);
  qnotused(errbufsize);
  qstrncpy(errbuf, "evaluation error", errbufsize);
  return false;
}
开发者ID:nealey,项目名称:vera,代码行数:18,代码来源:extlang.cpp


示例14: dbg_thread_exit

virtual void dbg_thread_exit(pid_t pid, thid_t tid, ea_t ea, int exit_code) {qnotused(pid); qnotused(tid); qnotused(ea); qnotused(exit_code); }
开发者ID:aisling-kells,项目名称:src,代码行数:1,代码来源:py_dbg.hpp


示例15: dbg_thread_start

virtual void dbg_thread_start(pid_t pid, thid_t tid, ea_t ea) {qnotused(pid); qnotused(tid); qnotused(ea); }
开发者ID:aisling-kells,项目名称:src,代码行数:1,代码来源:py_dbg.hpp


示例16: dbg_process_detach

virtual void dbg_process_detach(pid_t pid, thid_t tid, ea_t ea) {qnotused(pid); qnotused(tid); qnotused(ea); }
开发者ID:aisling-kells,项目名称:src,代码行数:1,代码来源:py_dbg.hpp


示例17: dbg_process_attach

virtual void dbg_process_attach(pid_t pid, thid_t tid, ea_t ea, const char * modinfo_name, ea_t modinfo_base, asize_t modinfo_size) {qnotused(pid); qnotused(tid); qnotused(ea); qnotused(modinfo_name); qnotused(modinfo_base); qnotused(modinfo_size); }
开发者ID:aisling-kells,项目名称:src,代码行数:1,代码来源:py_dbg.hpp


示例18: DBG_Callback

int idaapi DBG_Callback(void *ud, int notification_code, va_list va)
{
  // This hook gets called from the kernel. Ensure we hold the GIL.
  PYW_GIL_GET;

  class DBG_Hooks *proxy = (class DBG_Hooks *)ud;
  debug_event_t *event;
  int ret = 0;

  try
  {
    switch ( notification_code )
    {
      // hookgenDBG:notifications
case dbg_process_start:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_process_start(event->pid, event->tid, event->ea, event->modinfo.name, event->modinfo.base, event->modinfo.size);
}
break;

case dbg_process_exit:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_process_exit(event->pid, event->tid, event->ea, event->exit_code);
}
break;

case dbg_process_attach:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_process_attach(event->pid, event->tid, event->ea, event->modinfo.name, event->modinfo.base, event->modinfo.size);
}
break;

case dbg_process_detach:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_process_detach(event->pid, event->tid, event->ea);
}
break;

case dbg_thread_start:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_thread_start(event->pid, event->tid, event->ea);
}
break;

case dbg_thread_exit:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_thread_exit(event->pid, event->tid, event->ea, event->exit_code);
}
break;

case dbg_library_load:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_library_load(event->pid, event->tid, event->ea, event->modinfo.name, event->modinfo.base, event->modinfo.size);
}
break;

case dbg_library_unload:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_library_unload(event->pid, event->tid, event->ea, event->info);
}
break;

case dbg_information:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  proxy->dbg_information(event->pid, event->tid, event->ea, event->info);
}
break;

case dbg_exception:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  int * warn = va_arg(va, int *);
  int _tmp = proxy->dbg_exception(event->pid, event->tid, event->ea, event->exc.code, event->exc.can_cont, event->exc.ea, event->exc.info);
  ret = DBG_Hooks::store_int(_tmp, event, warn);
}
break;

case dbg_suspend_process:
{
  const debug_event_t * event = va_arg(va, const debug_event_t *);
  qnotused(event);
  proxy->dbg_suspend_process();
}
break;

case dbg_bpt:
{
  thid_t tid = va_arg(va, thid_t);
  ea_t bptea = va_arg(va, ea_t);
  int * warn = va_arg(va, int *);
  int _tmp = proxy->dbg_bpt(tid, bptea);
//.........这里部分代码省略.........
开发者ID:aisling-kells,项目名称:src,代码行数:101,代码来源:py_dbg.hpp


示例19: callback

//--------------------------------------------------------------------------
static int idaapi callback(
    void * /*user_data*/,
    int notification_code,
    va_list va)
{
  static int stage = 0;
  static bool is_dll;
  static char needed_file[QMAXPATH];

  switch ( notification_code )
  {
    case dbg_process_start:
    case dbg_process_attach:
      get_input_file_path(needed_file, sizeof(needed_file));
      // no break
    case dbg_library_load:
      if ( stage == 0 )
      {
        const debug_event_t *pev = va_arg(va, const debug_event_t *);
        if ( !strieq(pev->modinfo.name, needed_file) )
          break;
        if ( notification_code == dbg_library_load )
          is_dll = true;
        // remember the current module bounds
        if ( pev->modinfo.rebase_to != BADADDR )
          curmod.startEA = pev->modinfo.rebase_to;
        else
          curmod.startEA = pev->modinfo.base;
        curmod.endEA = curmod.startEA + pev->modinfo.size;
        deb(IDA_DEBUG_PLUGIN, "UUNP: module space %a-%a\n", curmod.startEA, curmod.endEA);
        ++stage;
      }
      break;

    case dbg_library_unload:
      if ( stage != 0 && is_dll )
      {
        const debug_event_t *pev = va_arg(va, const debug_event_t *);
        if ( curmod.startEA == pev->modinfo.base
          || curmod.startEA == pev->modinfo.rebase_to )
        {
          deb(IDA_DEBUG_PLUGIN, "UUNP: unload unpacked module\n");
          if ( stage > 2 )
            enable_step_trace(false);
          stage = 0;
          curmod.startEA = 0;
          curmod.endEA = 0;
          _hide_wait_box();
        }
      }
      break;

    case dbg_run_to:   // Parameters: const debug_event_t *event
      dbg->stopped_at_debug_event(true);
      bp_gpa = get_name_ea(BADADDR, "kernel32_GetProcAddress");
#ifndef __X64__
      if( (LONG)GetVersion() < 0 )  // win9x mode -- use thunk's
      {
        is_9x = true;
        win9x_resolve_gpa_thunk();
      }
#endif
      if ( bp_gpa == BADADDR )
      {
        bring_debugger_to_front();
        warning("Sorry, could not find kernel32.GetProcAddress");
FORCE_STOP:
        stage = 4;  // last stage
        clear_requests_queue();
        request_exit_process();
        run_requests();
        break;
      }
      else if( !my_add_bpt(bp_gpa) )
      {
        bring_debugger_to_front();
        warning("Sorry, can not set bpt to kernel32.GetProcAddress");
        goto FORCE_STOP;
      }
      else
      {
        ++stage;
        set_wait_box("Waiting for a call to GetProcAddress()");
      }
      continue_process();
      break;

    case dbg_bpt:      // A user defined breakpoint was reached.
                       // Parameters: thid_t tid
                       //             ea_t        breakpoint_ea
                       //             int        *warn = -1
                       //             Return (in *warn):
                       //              -1 - to display a breakpoint warning dialog
                       //                   if the process is suspended.
                       //               0 - to never display a breakpoint warning dialog.
                       //               1 - to always display a breakpoint warning dialog.
      {
        thid_t tid = va_arg(va, thid_t); qnotused(tid);
        ea_t ea   = va_arg(va, ea_t);
//.........这里部分代码省略.........
开发者ID:nihilus,项目名称:ida_objectivec_plugins,代码行数:101,代码来源:uunp.cpp


示例20: dbg_request_error

virtual void dbg_request_error(int failed_command, int failed_dbg_notification) {qnotused(failed_command); qnotused(failed_dbg_notification); }
开发者ID:aisling-kells,项目名称:src,代码行数:1,代码来源:py_dbg.hpp



注:本文中的qnotused函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ qnumber函数代码示例发布时间:2022-05-30
下一篇:
C++ qmlInfo函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap