亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
美女一区二区三区在线观看| 精品国产一区二区三区av性色| 不卡在线观看av| 久久国产精品第一页| 麻豆国产精品777777在线| 久久国产麻豆精品| 国内成人免费视频| 国产suv精品一区二区883| 国产suv精品一区二区883| 成人av网站免费| 不卡av在线免费观看| 成人的网站免费观看| 99久精品国产| 91福利精品视频| 欧美精品色一区二区三区| 欧美老年两性高潮| 日韩欧美久久久| 久久久久久久久久久久久夜| 国产网站一区二区| 亚洲欧美中日韩| 尤物av一区二区| 日韩中文字幕一区二区三区| 美女一区二区视频| 成人夜色视频网站在线观看| 99久精品国产| 5858s免费视频成人| 精品成人一区二区三区四区| 国产欧美日本一区视频| 亚洲少妇屁股交4| 亚洲成av人片在www色猫咪| 美女mm1313爽爽久久久蜜臀| 久久福利资源站| 不卡的电视剧免费网站有什么| 欧美在线观看视频在线| 欧美v日韩v国产v| 国产精品乱码妇女bbbb| 亚洲午夜一区二区| 精品一区二区三区在线视频| 成人av午夜电影| 91精品国产综合久久国产大片| 久久这里只精品最新地址| 国产精品毛片无遮挡高清| 午夜欧美视频在线观看| 国产高清久久久久| 欧美日韩一级片网站| 精品sm在线观看| 亚洲精品乱码久久久久| 国产一区二区视频在线| 日本高清不卡在线观看| 精品国产乱码久久久久久久| 亚洲女厕所小便bbb| 精品一区二区三区在线播放视频| 91美女在线观看| 精品国产一区二区三区av性色| 一区二区三区中文字幕| 精品一区二区三区香蕉蜜桃| 色国产精品一区在线观看| 精品欧美一区二区三区精品久久| 亚洲欧美日韩综合aⅴ视频| 美女在线视频一区| 欧美日韩在线三区| 国产精品欧美一区二区三区| 日本美女一区二区| 一本久久综合亚洲鲁鲁五月天| 久久香蕉国产线看观看99| 亚洲综合在线五月| 岛国av在线一区| 日韩欧美综合一区| 亚洲一区二区三区四区在线观看 | 成人免费视频一区二区| 欧美精品久久一区| 综合分类小说区另类春色亚洲小说欧美 | 亚洲码国产岛国毛片在线| 激情五月婷婷综合| 欧美女孩性生活视频| 亚洲色图欧洲色图婷婷| 成人中文字幕合集| 精品国免费一区二区三区| 午夜精品福利一区二区三区av| 色综合视频在线观看| 国产精品午夜春色av| 国产在线精品不卡| 日韩三级电影网址| 天天综合日日夜夜精品| 91成人免费在线视频| 国产精品毛片久久久久久久| 国产精品一卡二卡| 精品999在线播放| 美女诱惑一区二区| 日韩免费性生活视频播放| 亚洲成人先锋电影| 欧美三级电影在线观看| 一二三区精品视频| 在线亚洲+欧美+日本专区| 亚洲色图制服丝袜| 色国产综合视频| 一二三区精品福利视频| 欧美中文字幕久久| 亚洲一卡二卡三卡四卡五卡| 在线一区二区三区做爰视频网站| 亚洲天堂久久久久久久| 91在线你懂得| 一区二区三区四区不卡在线 | 欧美综合一区二区| 亚洲乱码中文字幕| 色婷婷国产精品久久包臀| 一区二区免费视频| 欧美中文字幕一区| 日韩国产精品91| 日韩欧美中文字幕精品| 寂寞少妇一区二区三区| 久久久亚洲国产美女国产盗摄| 国产中文字幕精品| 国产日韩精品一区二区浪潮av| 国产成人综合网站| 亚洲丝袜美腿综合| 在线视频中文字幕一区二区| 亚洲一区二区3| 日韩欧美一二三区| 国产高清精品在线| 亚洲免费观看高清| 337p亚洲精品色噜噜| 久久99精品久久久久久动态图| 26uuu精品一区二区在线观看| 国产寡妇亲子伦一区二区| 综合久久给合久久狠狠狠97色 | 精品久久久久久最新网址| 国产精品一线二线三线精华| 国产精品欧美久久久久无广告| 日本久久一区二区三区| 日韩电影在线观看网站| 久久久三级国产网站| 99精品久久免费看蜜臀剧情介绍| 亚洲国产中文字幕| 欧美mv和日韩mv的网站| 成人小视频免费在线观看| 亚洲一区二区三区四区中文字幕| 日韩欧美一二区| 99re亚洲国产精品| 日韩国产精品91| 中文字幕不卡三区| 欧美日韩成人在线一区| 国产在线精品一区二区夜色 | 韩国精品久久久| 亚洲人成网站色在线观看| 欧美精品乱人伦久久久久久| 国产裸体歌舞团一区二区| 亚洲婷婷综合久久一本伊一区| 91精品国产91久久综合桃花| 高清av一区二区| 午夜欧美在线一二页| 中文字幕av一区二区三区高| 欧美日本国产一区| 国产成人精品免费看| 亚洲成人一区二区| 国产精品视频看| 777午夜精品免费视频| 成人免费福利片| 喷水一区二区三区| 亚洲女爱视频在线| 久久久久久久免费视频了| 欧美日韩成人综合天天影院| 国产xxx精品视频大全| 天天影视色香欲综合网老头| 亚洲欧美自拍偷拍| 久久综合av免费| 宅男噜噜噜66一区二区66| 成人午夜碰碰视频| 久久99热狠狠色一区二区| 一区二区三区欧美久久| 日本一区二区视频在线| 91精品婷婷国产综合久久性色 | 欧美日韩日日骚| k8久久久一区二区三区| 久久成人综合网| 午夜国产精品一区| 亚洲欧美一区二区三区孕妇| 国产亚洲精品中文字幕| 精品蜜桃在线看| 欧美精选一区二区| 欧美天堂亚洲电影院在线播放| 高清不卡在线观看av| 国产在线精品一区二区三区不卡| 手机精品视频在线观看| 亚洲另类在线制服丝袜| 中文字幕亚洲区| 国产欧美一区二区精品秋霞影院| 欧美一级电影网站| 欧美日韩综合不卡| 欧美亚洲国产怡红院影院| 91香蕉视频在线| 成人精品免费网站| 国产高清不卡二三区| 久久爱www久久做| 免费av网站大全久久| 亚洲bt欧美bt精品777| 亚洲一区在线视频| 亚洲一区二区三区在线| 亚洲国产精品一区二区尤物区| 亚洲乱码日产精品bd|