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

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

?? syscall.c

?? QEMU 0.91 source code, supports ARM processor including S3C24xx series
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* *  Darwin syscalls * *  Copyright (c) 2003 Fabrice Bellard *  Copyright (c) 2006 Pierre d'Herbemont * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <mach/host_info.h>#include <mach/mach.h>#include <mach/mach_time.h>#include <mach/message.h>#include <pthread.h>#include <dirent.h>#include <sys/stat.h>#include <sys/syscall.h>#include <sys/sysctl.h>#include <sys/types.h>#include <unistd.h>#include <sys/ioctl.h>#include <sys/mman.h>#include <sys/types.h>#include <sys/dirent.h>#include <sys/uio.h>#include <sys/termios.h>#include <sys/ptrace.h>#include <net/if.h>#include <sys/param.h>#include <sys/mount.h>#include <sys/attr.h>#include <mach/ndr.h>#include <mach/mig_errors.h>#include <sys/xattr.h>#include "qemu.h"//#define DEBUG_SYSCALL#ifdef DEBUG_SYSCALL# define DEBUG_FORCE_ENABLE_LOCAL() int __DEBUG_qemu_user_force_enable = 1# define DEBUG_BEGIN_ENABLE  __DEBUG_qemu_user_force_enable = 1;# define DEBUG_END_ENABLE  __DEBUG_qemu_user_force_enable = 0;# define DEBUG_DISABLE_ALL() static int __DEBUG_qemu_user_force_enable = 0# define DEBUG_ENABLE_ALL()  static int __DEBUG_qemu_user_force_enable = 1    DEBUG_ENABLE_ALL();# define DPRINTF(...) do { if(loglevel) fprintf(logfile, __VA_ARGS__); \                           if(__DEBUG_qemu_user_force_enable) fprintf(stderr, __VA_ARGS__); \                         } while(0)#else# define DEBUG_FORCE_ENABLE_LOCAL()# define DEBUG_BEGIN_ENABLE# define DEBUG_END_ENABLE# define DPRINTF(...) do { if(loglevel) fprintf(logfile, __VA_ARGS__); } while(0)#endifenum {    bswap_out = 0,    bswap_in = 1};extern const char *interp_prefix;static inline long get_errno(long ret){    if (ret == -1)        return -errno;    else        return ret;}static inline int is_error(long ret){    return (unsigned long)ret >= (unsigned long)(-4096);}/* ------------------------------------------------------------   Mach syscall handling*/void static inline print_description_msg_header(mach_msg_header_t *hdr){    char *name = NULL;    int i;    struct { int number; char *name; } msg_name[] =    {        /* see http://fxr.watson.org/fxr/source/compat/mach/mach_namemap.c?v=NETBSD */        { 200,      "host_info" },        { 202,      "host_page_size" },        { 206,      "host_get_clock_service" },        { 206,      "host_get_clock_service" },        { 206,      "host_get_clock_service" },        { 306,      "host_get_clock_service" },        { 3204,     "mach_port_allocate" },        { 3206,     "mach_port_deallocate" },        { 3404,     "mach_ports_lookup" },        { 3409,     "mach_task_get_special_port" },        { 3414,     "mach_task_get_exception_ports" },        { 3418,     "mach_semaphore_create" },        { 3504,     "mach_semaphore_create" },        { 3509,     "mach_semaphore_create" },        { 3518,     "semaphore_create" },        { 3616,     "thread_policy" },        { 3801,     "vm_allocate" },        { 3802,     "vm_deallocate" },        { 3802,     "vm_deallocate" },        { 3803,     "vm_protect" },        { 3812,     "vm_map" },        { 4241776,  "lu_message_send_id" },  /* lookupd */        { 4241876,  "lu_message_reply_id" }, /* lookupd */    };    for(i = 0; i < sizeof(msg_name)/sizeof(msg_name[0]); i++) {        if(msg_name[i].number == hdr->msgh_id)        {            name = msg_name[i].name;            break;        }    }    if(!name)        DPRINTF("unknown mach msg %d 0x%x\n", hdr->msgh_id, hdr->msgh_id);    else        DPRINTF("%s\n", name);#if 0    DPRINTF("Bits: %8x\n", hdr->msgh_bits);    DPRINTF("Size: %8x\n", hdr->msgh_size);    DPRINTF("Rmte: %8x\n", hdr->msgh_remote_port);    DPRINTF("Locl: %8x\n", hdr->msgh_local_port);    DPRINTF("Rsrv: %8x\n", hdr->msgh_reserved);    DPRINTF("Id  : %8x\n", hdr->msgh_id);    NDR_record_t *ndr = (NDR_record_t *)(hdr + 1);    DPRINTF("hdr = %p, sizeof(hdr) = %x, NDR = %p\n", hdr, (unsigned int)sizeof(mach_msg_header_t), ndr);    DPRINTF("%d %d %d %d %d %d %d %d\n",           ndr->mig_vers, ndr->if_vers, ndr->reserved1, ndr->mig_encoding,           ndr->int_rep, ndr->char_rep, ndr->float_rep, ndr->reserved2);#endif}static inline void print_mach_msg_return(mach_msg_return_t ret){    int i, found = 0;#define MACH_MSG_RET(msg) { msg, #msg }    struct { int code; char *name; } msg_name[] =    {        /* ref: http://darwinsource.opendarwin.org/10.4.2/xnu-792.2.4/osfmk/man/mach_msg.html */        /* send message */        MACH_MSG_RET(MACH_SEND_MSG_TOO_SMALL),        MACH_MSG_RET(MACH_SEND_NO_BUFFER),        MACH_MSG_RET(MACH_SEND_INVALID_DATA),        MACH_MSG_RET(MACH_SEND_INVALID_HEADER),        MACH_MSG_RET(MACH_SEND_INVALID_DEST),        MACH_MSG_RET(MACH_SEND_INVALID_NOTIFY),        MACH_MSG_RET(MACH_SEND_INVALID_REPLY),        MACH_MSG_RET(MACH_SEND_INVALID_TRAILER),        MACH_MSG_RET(MACH_SEND_INVALID_MEMORY),        MACH_MSG_RET(MACH_SEND_INVALID_RIGHT),        MACH_MSG_RET(MACH_SEND_INVALID_TYPE),        MACH_MSG_RET(MACH_SEND_INTERRUPTED),        MACH_MSG_RET(MACH_SEND_TIMED_OUT),        MACH_MSG_RET(MACH_RCV_BODY_ERROR),        MACH_MSG_RET(MACH_RCV_HEADER_ERROR),        MACH_MSG_RET(MACH_RCV_IN_SET),        MACH_MSG_RET(MACH_RCV_INTERRUPTED),        MACH_MSG_RET(MACH_RCV_INVALID_DATA),        MACH_MSG_RET(MACH_RCV_INVALID_NAME),        MACH_MSG_RET(MACH_RCV_INVALID_NOTIFY),        MACH_MSG_RET(MACH_RCV_INVALID_TRAILER),        MACH_MSG_RET(MACH_RCV_INVALID_TYPE),        MACH_MSG_RET(MACH_RCV_PORT_CHANGED),        MACH_MSG_RET(MACH_RCV_PORT_DIED),        MACH_MSG_RET(MACH_RCV_SCATTER_SMALL),        MACH_MSG_RET(MACH_RCV_TIMED_OUT),        MACH_MSG_RET(MACH_RCV_TOO_LARGE)    };#undef MACH_MSG_RET    if( ret == MACH_MSG_SUCCESS)        DPRINTF("MACH_MSG_SUCCESS\n");    else    {        for( i = 0; i < sizeof(msg_name)/sizeof(msg_name[0]); i++) {            if(msg_name[i].code == ret) {                DPRINTF("%s\n", msg_name[i].name);                found = 1;                break;            }        }        if(!found)            qerror("unknow mach message ret code %d\n", ret);    }}static inline void swap_mach_msg_header(mach_msg_header_t *hdr){    hdr->msgh_bits = tswap32(hdr->msgh_bits);    hdr->msgh_size = tswap32(hdr->msgh_size);    hdr->msgh_remote_port = tswap32(hdr->msgh_remote_port);    hdr->msgh_local_port = tswap32(hdr->msgh_local_port);    hdr->msgh_reserved = tswap32(hdr->msgh_reserved);    hdr->msgh_id = tswap32(hdr->msgh_id);}struct complex_msg {            mach_msg_header_t hdr;            mach_msg_body_t body;};static inline void swap_mach_msg_body(struct complex_msg *complex_msg, int bswap){    mach_msg_port_descriptor_t *descr = (mach_msg_port_descriptor_t *)(complex_msg+1);    int i,j;    if(bswap == bswap_in)        tswap32s(&complex_msg->body.msgh_descriptor_count);    DPRINTF("body.msgh_descriptor_count %d\n", complex_msg->body.msgh_descriptor_count);    for(i = 0; i < complex_msg->body.msgh_descriptor_count; i++) {        switch(descr->type)        {            case MACH_MSG_PORT_DESCRIPTOR:                tswap32s(&descr->name);                descr++;                break;            case MACH_MSG_OOL_DESCRIPTOR:            {                mach_msg_ool_descriptor_t *ool = (void *)descr;                tswap32s((uint32_t *)&ool->address);                tswap32s(&ool->size);                descr = (mach_msg_port_descriptor_t *)(ool+1);                break;            }            case MACH_MSG_OOL_PORTS_DESCRIPTOR:            {                mach_msg_ool_ports_descriptor_t *ool_ports = (void *)descr;                mach_port_name_t * port_names;                if(bswap == bswap_in)                {                    tswap32s((uint32_t *)&ool_ports->address);                    tswap32s(&ool_ports->count);                }                port_names = ool_ports->address;                for(j = 0; j < ool_ports->count; j++)                    tswap32s(&port_names[j]);                if(bswap == bswap_out)                {                    tswap32s((uint32_t *)&ool_ports->address);                    tswap32s(&ool_ports->count);                }                descr = (mach_msg_port_descriptor_t *)(ool_ports+1);                break;            }            default: qerror("unknow mach msg descriptor type %x\n", descr->type);        }    }    if(bswap == bswap_out)        tswap32s(&complex_msg->body.msgh_descriptor_count);}static inline void swap_mach_msg(mach_msg_header_t *hdr, int bswap){    if (bswap == bswap_out && hdr->msgh_bits & MACH_MSGH_BITS_COMPLEX)        swap_mach_msg_body((struct complex_msg *)hdr, bswap);    swap_mach_msg_header(hdr);    if (bswap == bswap_in && hdr->msgh_bits & MACH_MSGH_BITS_COMPLEX)        swap_mach_msg_body((struct complex_msg *)hdr, bswap);}static inline uint32_t target_mach_msg_trap(        mach_msg_header_t *hdr, uint32_t options, uint32_t send_size,        uint32_t rcv_size, uint32_t rcv_name, uint32_t time_out, uint32_t notify){    extern int mach_msg_trap(mach_msg_header_t *, mach_msg_option_t,          mach_msg_size_t, mach_msg_size_t, mach_port_t,          mach_msg_timeout_t, mach_port_t);    mach_msg_audit_trailer_t *trailer;    mach_msg_id_t msg_id;    uint32_t ret = 0;    int i;    swap_mach_msg(hdr, bswap_in);    msg_id = hdr->msgh_id;    print_description_msg_header(hdr);    ret = mach_msg_trap(hdr, options, send_size, rcv_size, rcv_name, time_out, notify);    print_mach_msg_return(ret);    if( (options & MACH_RCV_MSG) && (REQUESTED_TRAILER_SIZE(options) > 0) )    {        /* XXX: the kernel always return the full trailer with MACH_SEND_MSG, so we should                probably always bswap it  */        /* warning: according to Mac OS X Internals (the book) msg_size might be expressed in                    natural_t units but according to xnu/osfmk/mach/message.h: "The size of                    the message must be specified in bytes" */        trailer = (mach_msg_audit_trailer_t *)((uint8_t *)hdr + hdr->msgh_size);        /* XXX: Should probably do that based on the option asked by the sender, but dealing        with kernel answer seems more sound */        switch(trailer->msgh_trailer_size)        {            case sizeof(mach_msg_audit_trailer_t):                for(i = 0; i < 8; i++)                    tswap32s(&trailer->msgh_audit.val[i]);                /* Fall in mach_msg_security_trailer_t case */            case sizeof(mach_msg_security_trailer_t):                tswap32s(&trailer->msgh_sender.val[0]);                tswap32s(&trailer->msgh_sender.val[1]);                /* Fall in mach_msg_seqno_trailer_t case */            case sizeof(mach_msg_seqno_trailer_t):                tswap32s(&trailer->msgh_seqno);                /* Fall in mach_msg_trailer_t case */            case sizeof(mach_msg_trailer_t):                tswap32s(&trailer->msgh_trailer_type);                tswap32s(&trailer->msgh_trailer_size);                break;            case 0:                /* Safer not to byteswap, but probably wrong */                break;            default:                qerror("unknow trailer type given its size %d\n", trailer->msgh_trailer_size);                break;        }    }    /* Special message handling */    switch (msg_id) {        case 200: /* host_info */        {            mig_reply_error_t *err = (mig_reply_error_t *)hdr;            struct {                uint32_t unknow1;                uint32_t max_cpus;                uint32_t avail_cpus;                uint32_t memory_size;                uint32_t cpu_type;                uint32_t cpu_subtype;            } *data = (void *)(err+1);            DPRINTF("maxcpu = 0x%x\n",   data->max_cpus);            DPRINTF("numcpu = 0x%x\n",   data->avail_cpus);            DPRINTF("memsize = 0x%x\n",  data->memory_size);#if defined(TARGET_I386)            data->cpu_type = CPU_TYPE_I386;            DPRINTF("cpu_type changed to 0x%x(i386)\n", data->cpu_type);            data->cpu_subtype = CPU_SUBTYPE_PENT;            DPRINTF("cpu_subtype changed to 0x%x(i386_pent)\n", data->cpu_subtype);#elif defined(TARGET_PPC)            data->cpu_type = CPU_TYPE_POWERPC;            DPRINTF("cpu_type changed to 0x%x(ppc)\n", data->cpu_type);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看污| 欧美日本视频在线| 偷拍一区二区三区四区| 国产婷婷色一区二区三区四区| 色系网站成人免费| 国产一区二区精品久久91| 亚洲综合激情网| 国产欧美一区二区三区沐欲 | 欧美视频一区在线| 国产精品亚洲人在线观看| 亚洲国产aⅴ天堂久久| 国产精品视频你懂的| 日韩美女一区二区三区| 在线亚洲高清视频| 成人少妇影院yyyy| 国产最新精品免费| 日韩电影免费在线看| 亚洲男人的天堂一区二区| 欧美激情一区二区三区| 日韩欧美电影一二三| 欧美日韩国产天堂| 91国产免费观看| eeuss鲁一区二区三区| 九九**精品视频免费播放| 亚洲a一区二区| 亚洲午夜羞羞片| 亚洲欧美一区二区不卡| 国产精品情趣视频| 久久久精品2019中文字幕之3| 日韩欧美一区中文| 7777精品伊人久久久大香线蕉 | fc2成人免费人成在线观看播放| 国产精品一区二区黑丝| 卡一卡二国产精品 | 国产三级精品三级在线专区| 日韩一二三区视频| 日韩午夜电影在线观看| 7777精品伊人久久久大香线蕉经典版下载| 91国模大尺度私拍在线视频| 91国产成人在线| 在线观看亚洲一区| 欧美做爰猛烈大尺度电影无法无天| 99精品久久只有精品| 99re热视频这里只精品| 95精品视频在线| 91老司机福利 在线| 日本高清不卡在线观看| 欧美亚洲日本国产| 欧美午夜精品电影| 在线成人免费视频| 欧美一区二区免费视频| 91精品国产综合久久久久| 日韩色视频在线观看| 精品福利视频一区二区三区| wwww国产精品欧美| 国产精品久久免费看| 亚洲天堂免费在线观看视频| 一区二区三区鲁丝不卡| 亚洲成人av中文| 男男视频亚洲欧美| 国产激情视频一区二区在线观看 | 99麻豆久久久国产精品免费| 91浏览器入口在线观看| 欧美日韩夫妻久久| 精品粉嫩aⅴ一区二区三区四区| 国产亚洲精久久久久久| 亚洲色图另类专区| 三级一区在线视频先锋| 久久av老司机精品网站导航| 国产91精品免费| 91精品办公室少妇高潮对白| 欧美一区日韩一区| 国产网站一区二区三区| 亚洲精品国产一区二区精华液 | 午夜欧美大尺度福利影院在线看 | 色天使久久综合网天天| 91精品欧美福利在线观看| 精品国产一区二区三区不卡| 国产精品第一页第二页第三页| 亚洲综合一区二区精品导航| 免费成人你懂的| 99在线热播精品免费| 欧美日韩国产一二三| 国产欧美日韩视频在线观看| 亚洲综合999| 国产精品资源网| 欧洲亚洲精品在线| 久久午夜免费电影| 亚洲午夜羞羞片| 国产成人av一区二区三区在线 | 色老汉一区二区三区| 日韩欧美在线影院| **欧美大码日韩| 裸体歌舞表演一区二区| 91国产福利在线| 国产日韩三级在线| 美腿丝袜亚洲三区| 在线亚洲一区观看| 国产片一区二区| 美女高潮久久久| 欧美性受xxxx黑人xyx性爽| 久久久久久综合| 婷婷六月综合亚洲| 91丨porny丨最新| 久久久99久久精品欧美| 天堂影院一区二区| 91成人免费在线| 国产精品麻豆网站| 国产一区二区三区精品视频| 4438成人网| 亚洲黄网站在线观看| 国产福利一区二区| 日韩一区二区三区电影| 亚洲18色成人| 在线中文字幕一区| 亚洲色大成网站www久久九九| 国产中文字幕精品| 日韩一级完整毛片| 亚洲444eee在线观看| 91国产成人在线| 国产精品国产精品国产专区不蜜| 欧美三片在线视频观看| 综合分类小说区另类春色亚洲小说欧美 | 国产一区二区不卡老阿姨| 精品少妇一区二区三区日产乱码| 紧缚奴在线一区二区三区| www久久精品| 国产mv日韩mv欧美| 午夜精品久久久久久久久久久 | 国产精品久久久久三级| 午夜精品久久久久久| youjizz久久| 中文字幕中文字幕一区二区| 成人午夜大片免费观看| 久久久www成人免费毛片麻豆| 国产成人精品免费看| 日韩av电影天堂| 久久99精品久久只有精品| 久久精品国产一区二区| 2020日本不卡一区二区视频| 91国在线观看| 男男成人高潮片免费网站| 欧美激情一区二区在线| 欧洲亚洲国产日韩| 久久er精品视频| 国产精品免费视频观看| 欧美亚洲动漫精品| 成人久久18免费网站麻豆| 亚洲午夜视频在线| 久久这里只精品最新地址| 欧洲国产伦久久久久久久| 国产高清视频一区| 偷窥国产亚洲免费视频| 国产精品二三区| 久久久久久黄色| 91精品国产欧美日韩| voyeur盗摄精品| 国产成人福利片| 久久国产精品99久久人人澡| 亚洲色图制服丝袜| 日本一区二区三区四区在线视频| 日本高清成人免费播放| eeuss鲁一区二区三区| 捆绑调教美女网站视频一区| 日本免费新一区视频| 久久国产生活片100| 国产精品美女久久久久久久| 欧美影片第一页| 99久久er热在这里只有精品15| 欧美一区二区三区在| 日韩精品一二三| 一本到不卡免费一区二区| 欧美一区二区在线观看| 国内精品久久久久影院一蜜桃| 国产精品嫩草99a| 欧美三级中文字| 韩国v欧美v日本v亚洲v| 最新国产の精品合集bt伙计| 欧美久久久久久久久| 国产一区二区三区日韩| 亚洲情趣在线观看| 日韩精品一区二区三区视频| 99re66热这里只有精品3直播| 天天综合网 天天综合色| 欧美激情在线一区二区| 欧美日韩国产中文| 成人黄色av网站在线| 日韩成人精品视频| 国产精品免费久久| 欧美一区欧美二区| 91亚洲精品乱码久久久久久蜜桃 | 日韩女优毛片在线| 成人av影视在线观看| 日韩国产欧美在线播放| 国产精品久久久久久亚洲毛片| 91精品福利在线一区二区三区| 成人高清伦理免费影院在线观看| 日本欧美一区二区在线观看| 欧美国产综合色视频| 欧美久久久久中文字幕|