Flag: Tornado! Hurricane!

Error: You must be logged in to access the printer friendly view.

OpenRCE IDA SDK >> isCode

isCode
Category: Flags

inline bool idaapi
isCode(flags_t F)
Does the flagset, F, denote the start of an instruction? This is the same as isHead(), but only returns true for code, not data. Therefore, if used on a code byte that is not a head byte, it will return false.

Examples:
#include <segment.hpp> // For segment functions
#include <bytes.hpp>

for (int i = 0; i < get_segm_qty(); i++)
{
    segment_t *seg = getnseg(i);
    
    if (seg->type == SEG_CODE)
    {
        // Look for any bytes in the code segment that aren't code.
        for (ea_t a = seg->startEA; a < seg->endEA; a++)
        {
            flags_t flags = getFlags(a);
            if (isHead(flags) && !isCode(flags))
                msg("Non-code at %a in segment: %s.\n", a, get_segm_name(seg));
        }
    }
}


Related: getFlags, isCode, isData, isEnabled, isHead, isUnknown

Note: You must be logged in to add notes to the IDA SDK reference manual.

There are 28,229 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit