本文整理汇总了C++中ptu_uint_eq函数的典型用法代码示例。如果您正苦于以下问题:C++ ptu_uint_eq函数的具体用法?C++ ptu_uint_eq怎么用?C++ ptu_uint_eq使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ptu_uint_eq函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: read
static struct ptunit_result read(struct section_fixture *sfix)
{
uint8_t bytes[] = { 0xcc, 0x2, 0x4, 0x6 };
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
sfix_write(sfix, bytes);
sfix->section = pt_mk_section(sfix->name, 0x1ull, 0x3ull);
ptu_ptr(sfix->section);
status = pt_section_map(sfix->section);
ptu_int_eq(status, 0);
status = pt_section_read(sfix->section, buffer, 2, 0x0ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], bytes[1]);
ptu_uint_eq(buffer[1], bytes[2]);
ptu_uint_eq(buffer[2], 0xcc);
status = pt_section_unmap(sfix->section);
ptu_int_eq(status, 0);
return ptu_passed();
}
开发者ID:BwRy,项目名称:processor-trace,代码行数:25,代码来源:ptunit-section.c
示例2: init
static struct ptunit_result init(struct section_fixture *sfix)
{
ptu_ptr_eq(sfix->msec.section, &sfix->section);
ptu_uint_eq(sfix->msec.vaddr, sfix->vaddr);
ptu_uint_eq(sfix->msec.asid.size, sfix->asid.size);
ptu_uint_eq(sfix->msec.asid.cr3, sfix->asid.cr3);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:9,代码来源:ptunit-mapped_section.c
示例3: remove_bad_asid
static struct ptunit_result remove_bad_asid(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[0],
0x1001ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x01);
ptu_uint_eq(buffer[1], 0x02);
ptu_uint_eq(buffer[2], 0xcc);
status = pt_image_remove(&ifix->image, &ifix->section[0],
&ifix->asid[1], 0x1000ull);
ptu_int_eq(status, -pte_bad_image);
ptu_int_eq(ifix->status[0].deleted, 0);
ptu_int_eq(ifix->status[1].deleted, 0);
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[0],
0x1003ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x03);
ptu_uint_eq(buffer[1], 0x04);
ptu_uint_eq(buffer[2], 0xcc);
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[1],
0x2005ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x05);
ptu_uint_eq(buffer[1], 0x06);
ptu_uint_eq(buffer[2], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:35,代码来源:ptunit-image.c
示例4: remove_by_asid
static struct ptunit_result remove_by_asid(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[0],
0x1001ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x01);
ptu_uint_eq(buffer[1], 0x02);
ptu_uint_eq(buffer[2], 0xcc);
status = pt_image_remove_by_asid(&ifix->image, &ifix->asid[0]);
ptu_int_eq(status, 1);
ptu_int_ne(ifix->status[0].deleted, 0);
ptu_int_eq(ifix->status[1].deleted, 0);
status = pt_image_read(&ifix->image, buffer, sizeof(buffer),
&ifix->asid[0], 0x1003ull);
ptu_int_eq(status, -pte_nomap);
ptu_uint_eq(buffer[0], 0x01);
ptu_uint_eq(buffer[1], 0x02);
ptu_uint_eq(buffer[2], 0xcc);
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[1],
0x2003ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x03);
ptu_uint_eq(buffer[1], 0x04);
ptu_uint_eq(buffer[2], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:34,代码来源:ptunit-image.c
示例5: read_null_asid
static struct ptunit_result read_null_asid(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, 2, NULL, 0x2003ull);
ptu_int_eq(status, -pte_internal);
ptu_uint_eq(buffer[0], 0xcc);
ptu_uint_eq(buffer[1], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:12,代码来源:ptunit-image.c
示例6: read_nomem
static struct ptunit_result read_nomem(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, sizeof(buffer),
&ifix->asid[1], 0x1010ull);
ptu_int_eq(status, -pte_nomap);
ptu_uint_eq(buffer[0], 0xcc);
ptu_uint_eq(buffer[1], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:13,代码来源:ptunit-image.c
示例7: from_user_default
static struct ptunit_result from_user_default(void)
{
struct pt_asid asid;
int errcode;
errcode = pt_asid_from_user(&asid, NULL);
ptu_int_eq(errcode, 0);
ptu_uint_eq(asid.size, sizeof(asid));
ptu_uint_eq(asid.cr3, pt_asid_no_cr3);
ptu_uint_eq(asid.vmcs, pt_asid_no_vmcs);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:13,代码来源:ptunit-asid.c
示例8: read_truncated
static struct ptunit_result read_truncated(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, sizeof(buffer),
&ifix->asid[0], 0x100full);
ptu_int_eq(status, 1);
ptu_uint_eq(buffer[0], 0x0f);
ptu_uint_eq(buffer[1], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:13,代码来源:ptunit-image.c
示例9: read_truncated
static struct ptunit_result read_truncated(struct section_fixture *sfix)
{
uint8_t buffer[] = { 0xcc, 0xcc };
int status;
status = pt_msec_read(&sfix->msec, buffer, 2, &sfix->asid,
sfix->vaddr + sfix->section.size - 1);
ptu_int_eq(status, 1);
ptu_uint_eq(buffer[0], sfix->mapping.content[sfix->mapping.size - 1]);
ptu_uint_eq(buffer[1], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:13,代码来源:ptunit-mapped_section.c
示例10: read
static struct ptunit_result read(struct image_fixture *ifix)
{
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
status = pt_image_read(&ifix->image, buffer, 2, &ifix->asid[1],
0x2003ull);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], 0x03);
ptu_uint_eq(buffer[1], 0x04);
ptu_uint_eq(buffer[2], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:14,代码来源:ptunit-image.c
示例11: read_offset
static struct ptunit_result read_offset(struct section_fixture *sfix)
{
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
status = pt_msec_read(&sfix->msec, buffer, 2, &sfix->asid,
sfix->vaddr + 3);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], sfix->mapping.content[3]);
ptu_uint_eq(buffer[1], sfix->mapping.content[4]);
ptu_uint_eq(buffer[2], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:14,代码来源:ptunit-mapped_section.c
示例12: from_user_small
static struct ptunit_result from_user_small(void)
{
struct pt_asid asid, user;
int errcode;
user.size = sizeof(user.size);
errcode = pt_asid_from_user(&asid, &user);
ptu_int_eq(errcode, 0);
ptu_uint_eq(asid.size, sizeof(asid));
ptu_uint_eq(asid.cr3, pt_asid_no_cr3);
ptu_uint_eq(asid.vmcs, pt_asid_no_vmcs);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:15,代码来源:ptunit-asid.c
示例13: read_empty
static struct ptunit_result read_empty(struct image_fixture *ifix)
{
struct pt_asid asid;
uint8_t buffer[] = { 0xcc, 0xcc };
int status;
pt_asid_init(&asid);
status = pt_image_read(&ifix->image, buffer, sizeof(buffer), &asid,
0x1000ull);
ptu_int_eq(status, -pte_nomap);
ptu_uint_eq(buffer[0], 0xcc);
ptu_uint_eq(buffer[1], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:16,代码来源:ptunit-image.c
示例14: read_default_asid
static struct ptunit_result read_default_asid(struct section_fixture *sfix)
{
struct pt_asid asid;
uint8_t buffer[] = { 0xcc, 0xcc, 0xcc };
int status;
pt_asid_init(&asid);
status = pt_msec_read(&sfix->msec, buffer, 2, &asid, sfix->vaddr);
ptu_int_eq(status, 2);
ptu_uint_eq(buffer[0], sfix->mapping.content[0]);
ptu_uint_eq(buffer[1], sfix->mapping.content[1]);
ptu_uint_eq(buffer[2], 0xcc);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:16,代码来源:ptunit-mapped_section.c
示例15: asid
static struct ptunit_result asid(void)
{
struct pt_mapped_section msec;
struct pt_asid asid;
const struct pt_asid *pasid;
pt_asid_init(&asid);
asid.cr3 = 0xa00;
pt_msec_init(&msec, NULL, &asid, 0ull);
pasid = pt_msec_asid(&msec);
ptu_uint_eq(pasid->size, asid.size);
ptu_uint_eq(pasid->cr3, asid.cr3);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:17,代码来源:ptunit-mapped_section.c
示例16: from_user_big
static struct ptunit_result from_user_big(void)
{
struct pt_asid asid, user;
int errcode;
user.size = sizeof(user) + 4;
user.cr3 = 0x4200ull;
user.vmcs = 0x23000ull;
errcode = pt_asid_from_user(&asid, &user);
ptu_int_eq(errcode, 0);
ptu_uint_eq(asid.size, sizeof(asid));
ptu_uint_eq(asid.cr3, 0x4200ull);
ptu_uint_eq(asid.vmcs, 0x23000ull);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:17,代码来源:ptunit-asid.c
示例17: end_null
static struct ptunit_result end_null(void)
{
uint64_t end;
end = pt_msec_end(NULL);
ptu_uint_eq(end, 0ull);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:9,代码来源:ptunit-mapped_section.c
示例18: begin
static struct ptunit_result begin(struct section_fixture *sfix)
{
uint64_t begin;
begin = pt_msec_begin(&sfix->msec);
ptu_uint_eq(begin, sfix->vaddr);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:9,代码来源:ptunit-mapped_section.c
示例19: end
static struct ptunit_result end(struct section_fixture *sfix)
{
uint64_t end;
end = pt_msec_end(&sfix->msec);
ptu_uint_eq(end, sfix->vaddr + sfix->section.size);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:9,代码来源:ptunit-mapped_section.c
示例20: begin_null
static struct ptunit_result begin_null(void)
{
uint64_t begin;
begin = pt_msec_begin(NULL);
ptu_uint_eq(begin, 0ull);
return ptu_passed();
}
开发者ID:richinseattle,项目名称:processor-trace,代码行数:9,代码来源:ptunit-mapped_section.c
注:本文中的ptu_uint_eq函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论