本文整理汇总了C++中netnode::altshift方法的典型用法代码示例。如果您正苦于以下问题:C++ netnode::altshift方法的具体用法?C++ netnode::altshift怎么用?C++ netnode::altshift使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类netnode
的用法示例。
在下文中一共展示了netnode::altshift方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notify
//--------------------------------------------------------------------------
static int notify(processor_t::idp_notify msgid, ...) { // Various messages:
va_list va;
va_start(va, msgid);
int code = invoke_callbacks(HT_IDP, msgid, va);
if ( code ) return code;
switch ( msgid ) {
case processor_t::newfile:
case processor_t::oldfile:
tnode.create("$ tms node");
default:
break;
case processor_t::move_segm:// A segment is moved
// Fix processor dependent address sensitive information
// args: ea_t from - old segment address
// segment_t - moved segment
{
ea_t from = va_arg(va, ea_t);
segment_t *s = va_arg(va, segment_t *);
asize_t size = s->size();
tnode.altshift(from, s->startEA, size);
tnode.altadjust(from, s->startEA, size, skip_12);
}
break;
}
return(1);
}
示例2: notify
//----------------------------------------------------------------------
static int notify(processor_t::idp_notify msgid, ...) { // Various messages:
va_list va;
va_start(va, msgid);
// A well behaving processor module should call invoke_callbacks()
// in his notify() function. If this function returns 0, then
// the processor module should process the notification itself
// Otherwise the code should be returned to the caller:
int code = invoke_callbacks(HT_IDP, msgid, va);
if ( code ) return code;
int retcode = 1;
segment_t *sptr;
static uchar first = 0;
switch(msgid) {
case processor_t::newseg:
sptr = va_arg(va, segment_t *);
sptr->defsr[rVds-ph.regFirstSreg] = find_selector(inf.start_cs); //sptr->sel;
break;
case processor_t::init:
ovrtrans.create(ovrtrans_name); // it makes no harm to create it again
default:
break;
case processor_t::oldfile:
m.asect_top = (ushort)ovrtrans.altval(n_asect);
m.ovrcallbeg = (ushort)ovrtrans.altval(n_ovrbeg);
m.ovrcallend = (ushort)ovrtrans.altval(n_ovrend);
if(ovrtrans.altval(n_asciiX))
ash.XlatAsciiOutput = macro11.XlatAsciiOutput = NULL;
m.ovrtbl_base = (uint32)ovrtrans.altval(n_ovrbas);
case processor_t::newfile:
first = 1;
break;
case processor_t::loader:
{
pdp_ml_t **ml = va_arg(va, pdp_ml_t **);
netnode **mn = va_arg(va, netnode **);
if(ml && mn) {
*ml = &m;
*mn = &ovrtrans;
retcode = 0;
}
}
break;
case processor_t::move_segm:
// A segment is moved
// Fix processor dependent address sensitive information
// args: ea_t from - old segment address
// segment_t - moved segment
{
ea_t from = va_arg(va, ea_t);
segment_t *s = va_arg(va, segment_t *);
ovrtrans.altshift(from, s->startEA, s->size()); // i'm not sure about this
}
break;
}
va_end(va);
return(retcode);
}