예제 #1
0
int main() {

    FILE * in;
    in = fopen("/home/paopao/Data/soft/php-5.5.1/ext/huamanshu/UTFWry.dat", "rb");
    char local[255] = {0};
    unsigned int indexHead = 0;
    unsigned int indexTail = 0;
    fread(&indexHead, sizeof(indexHead), 1, in);
    fread(&indexTail, sizeof(indexTail), 1, in);

    //IpStruct xip = {143,24,199,121};
    IpStruct xip = {211,157,79,117};
    unsigned int iplong = 1968152019;
    IpStruct tmp;
    int pos = searchIndex(iplong, in, indexHead, indexTail);

    fseek(in, indexHead+pos*ipsize, SEEK_SET);
    printf("====\n");
    printf("xip %d\n", BYTE4INT(xip.ip));
    fread(&tmp, ipsize, 1, in);
    printf("xip %d\n", BYTE4INT(tmp.ip));
    searchLocal(tmp, iplong, in, local);
    //printf("xip %d\n", BYTE4INT(xip.ip));
    //printf("zip %d\n", BYTE4INT(zip.ip));
    return 0;
}
예제 #2
0
static void searchLocalSourceFiles(Widget fs,
				   XmFileSelectionBoxCallbackStruct *cbs)
{
    switch (gdb->type())
    {
    case PYDB:
	searchLocal(fs, cbs, is_python_file);
	break;

    case PERL:
	searchLocal(fs, cbs, is_perl_file);
	break;

    default:
	searchLocal(fs, cbs, is_source_file);
    }
}
예제 #3
0
static void searchLocalExecFiles(Widget fs,
				 XmFileSelectionBoxCallbackStruct *cbs)
{
    switch (gdb->type())
    {
    case PYDB:
	searchLocal(fs, cbs, is_python_file);
	break;

    case PERL:
	searchLocal(fs, cbs, is_perl_file);
	break;

    case BASH:
	searchLocal(fs, cbs, is_perl_file);
	break;

    case DBG:
	searchLocal(fs, cbs, is_php_file);
	break;
    
    case GDB:
	searchLocal(fs, cbs, is_debuggee_file);
	break;

    default:
	searchLocal(fs, cbs, is_exec_file);
    }
}
예제 #4
0
static void searchLocalCoreFiles(Widget fs,
				 XmFileSelectionBoxCallbackStruct *cbs)
{
    searchLocal(fs, cbs, is_core_file);
}