mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
unittests: Specify types in a bunch of unittest EXPECT's
The EXPECT and ASSERT macros in gtest don't do the usual arithmetic conversions. Specify types in several of them to fix -Werror. llvm-svn: 284405
This commit is contained in:
parent
9bbd4e27a9
commit
b69c3169b0
@ -21,26 +21,26 @@ TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleSimple) {
|
||||
// Success conditions. Valid cpu/subtype combinations using both - and .
|
||||
ArchSpec AS;
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10u, AS.GetMachOCPUSubType());
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15u, AS.GetMachOCPUSubType());
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12.15", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15u, AS.GetMachOCPUSubType());
|
||||
|
||||
// Failure conditions.
|
||||
|
||||
// Valid string, unknown cpu/subtype.
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("13.11", AS));
|
||||
EXPECT_EQ(0, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(0, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(0u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(0u, AS.GetMachOCPUSubType());
|
||||
|
||||
// Missing / invalid cpu or subtype
|
||||
AS = ArchSpec();
|
||||
@ -60,22 +60,22 @@ TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleSimple) {
|
||||
TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleExtra) {
|
||||
ArchSpec AS;
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15-vendor-os", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15u, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ("vendor", AS.GetTriple().getVendorName());
|
||||
EXPECT_EQ("os", AS.GetTriple().getOSName());
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10-vendor-os-name", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10u, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ("vendor", AS.GetTriple().getVendorName());
|
||||
EXPECT_EQ("os", AS.GetTriple().getOSName());
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15-vendor.os-name", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(15u, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ("vendor.os", AS.GetTriple().getVendorName());
|
||||
EXPECT_EQ("name", AS.GetTriple().getOSName());
|
||||
|
||||
@ -83,8 +83,8 @@ TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleExtra) {
|
||||
// since they are unrecognized.
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10-vendor", AS));
|
||||
EXPECT_EQ(12, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(12u, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10u, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ("apple", AS.GetTriple().getVendorName());
|
||||
EXPECT_EQ("", AS.GetTriple().getOSName());
|
||||
|
||||
@ -100,16 +100,16 @@ TEST(ArchSpecTest, TestSetTriple) {
|
||||
|
||||
// Various flavors of valid triples.
|
||||
EXPECT_TRUE(AS.SetTriple("12-10-apple-darwin"));
|
||||
EXPECT_EQ(llvm::MachO::CPU_TYPE_ARM, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(uint32_t(llvm::MachO::CPU_TYPE_ARM), AS.GetMachOCPUType());
|
||||
EXPECT_EQ(10u, AS.GetMachOCPUSubType());
|
||||
EXPECT_TRUE(llvm::StringRef(AS.GetTriple().str())
|
||||
.consume_front("armv7f-apple-darwin"));
|
||||
EXPECT_EQ(ArchSpec::eCore_arm_armv7f, AS.GetCore());
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_TRUE(AS.SetTriple("18.100-apple-darwin"));
|
||||
EXPECT_EQ(llvm::MachO::CPU_TYPE_POWERPC, AS.GetMachOCPUType());
|
||||
EXPECT_EQ(100, AS.GetMachOCPUSubType());
|
||||
EXPECT_EQ(uint32_t(llvm::MachO::CPU_TYPE_POWERPC), AS.GetMachOCPUType());
|
||||
EXPECT_EQ(100u, AS.GetMachOCPUSubType());
|
||||
EXPECT_TRUE(llvm::StringRef(AS.GetTriple().str())
|
||||
.consume_front("powerpc-apple-darwin"));
|
||||
EXPECT_EQ(ArchSpec::eCore_ppc_ppc970, AS.GetCore());
|
||||
@ -133,4 +133,4 @@ TEST(ArchSpecTest, TestSetTriple) {
|
||||
|
||||
AS = ArchSpec();
|
||||
EXPECT_FALSE(AS.SetTriple(""));
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ TEST_F(GDBRemoteClientBaseTest, SendContinueDelegateStructuredDataReceipt) {
|
||||
ASSERT_EQ(PacketResult::Success, fix.server.SendPacket("T01"));
|
||||
ASSERT_EQ(eStateStopped, fix.SendCPacket(response));
|
||||
ASSERT_EQ("T01", response.GetStringRef());
|
||||
ASSERT_EQ(1, fix.delegate.structured_data_packets.size());
|
||||
ASSERT_EQ(1ul, fix.delegate.structured_data_packets.size());
|
||||
|
||||
// Verify the packet contents. It should have been unescaped upon packet
|
||||
// reception.
|
||||
|
@ -124,8 +124,8 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
int GetGlobalConstantInteger(const llvm::pdb::IPDBSession &session,
|
||||
llvm::StringRef var) const {
|
||||
uint64_t GetGlobalConstantInteger(const llvm::pdb::IPDBSession &session,
|
||||
llvm::StringRef var) const {
|
||||
auto global = session.getGlobalScope();
|
||||
auto results =
|
||||
global->findChildren(llvm::pdb::PDB_SymType::Data, var,
|
||||
@ -409,7 +409,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestSimpleClassTypes)) {
|
||||
EXPECT_EQ(ConstString("Class"), udt_type->GetName());
|
||||
CompilerType compiler_type = udt_type->GetForwardCompilerType();
|
||||
EXPECT_TRUE(ClangASTContext::IsClassType(compiler_type.GetOpaqueQualType()));
|
||||
EXPECT_EQ(uint64_t(GetGlobalConstantInteger(session, "sizeof_Class")),
|
||||
EXPECT_EQ(GetGlobalConstantInteger(session, "sizeof_Class"),
|
||||
udt_type->GetByteSize());
|
||||
}
|
||||
|
||||
@ -432,7 +432,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestNestedClassTypes)) {
|
||||
EXPECT_EQ(ConstString("Class::NestedClass"), udt_type->GetName());
|
||||
CompilerType compiler_type = udt_type->GetForwardCompilerType();
|
||||
EXPECT_TRUE(ClangASTContext::IsClassType(compiler_type.GetOpaqueQualType()));
|
||||
EXPECT_EQ(uint64_t(GetGlobalConstantInteger(session, "sizeof_NestedClass")),
|
||||
EXPECT_EQ(GetGlobalConstantInteger(session, "sizeof_NestedClass"),
|
||||
udt_type->GetByteSize());
|
||||
}
|
||||
|
||||
|
@ -92,14 +92,14 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
||||
|
||||
// CFA=sp +0
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(0);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// CFA=sp+16 => fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -114,7 +114,7 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
||||
|
||||
// CFA=fp+16 => fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(8);
|
||||
EXPECT_EQ(8, row_sp->GetOffset());
|
||||
EXPECT_EQ(8ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::fp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -129,7 +129,7 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
||||
|
||||
// CFA=sp+16 => fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(16);
|
||||
EXPECT_EQ(16, row_sp->GetOffset());
|
||||
EXPECT_EQ(16ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -144,7 +144,7 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
||||
|
||||
// CFA=sp +0 => fp= <same> lr= <same>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(20);
|
||||
EXPECT_EQ(20, row_sp->GetOffset());
|
||||
EXPECT_EQ(20ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
|
||||
@ -209,14 +209,14 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
|
||||
// 0: CFA=sp +0 =>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(0);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// 4: CFA=sp+48 => x21=[CFA-40] x22=[CFA-48]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_EQ(48, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -230,7 +230,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
|
||||
// 8: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(8);
|
||||
EXPECT_EQ(8, row_sp->GetOffset());
|
||||
EXPECT_EQ(8ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_EQ(48, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -245,7 +245,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 12: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48]
|
||||
// fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(12);
|
||||
EXPECT_EQ(12, row_sp->GetOffset());
|
||||
EXPECT_EQ(12ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_EQ(48, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -260,7 +260,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 16: CFA=fp+16 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48]
|
||||
// fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(16);
|
||||
EXPECT_EQ(16, row_sp->GetOffset());
|
||||
EXPECT_EQ(16ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::fp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -268,7 +268,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 28: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48]
|
||||
// fp=[CFA-16] lr=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(28);
|
||||
EXPECT_EQ(28, row_sp->GetOffset());
|
||||
EXPECT_EQ(28ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(48, row_sp->GetCFAValue().GetOffset());
|
||||
@ -276,7 +276,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 32: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] fp=
|
||||
// <same> lr= <same>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(32);
|
||||
EXPECT_EQ(32, row_sp->GetOffset());
|
||||
EXPECT_EQ(32ull, row_sp->GetOffset());
|
||||
|
||||
// I'd prefer if these restored registers were cleared entirely instead of set
|
||||
// to IsSame...
|
||||
@ -289,7 +289,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 36: CFA=sp+48 => x19= <same> x20= <same> x21=[CFA-40] x22=[CFA-48] fp=
|
||||
// <same> lr= <same>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(36);
|
||||
EXPECT_EQ(36, row_sp->GetOffset());
|
||||
EXPECT_EQ(36ull, row_sp->GetOffset());
|
||||
|
||||
EXPECT_TRUE(row_sp->GetRegisterInfo(arm64_dwarf::x19, regloc));
|
||||
EXPECT_TRUE(regloc.IsSame());
|
||||
@ -300,7 +300,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
// 40: CFA=sp +0 => x19= <same> x20= <same> x21= <same> x22= <same> fp= <same>
|
||||
// lr= <same>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(40);
|
||||
EXPECT_EQ(40, row_sp->GetOffset());
|
||||
EXPECT_EQ(40ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
|
||||
@ -363,7 +363,7 @@ TEST_F(TestArm64InstEmulation, TestFramelessThreeEpilogueFunction) {
|
||||
|
||||
// 0: CFA=sp +0 =>
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(0);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::sp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
|
||||
@ -489,7 +489,7 @@ TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) {
|
||||
sample_range, data, sizeof(data), unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(36);
|
||||
EXPECT_EQ(28, row_sp->GetOffset());
|
||||
EXPECT_EQ(28ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::fp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -499,7 +499,7 @@ TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) {
|
||||
EXPECT_EQ(-32, regloc.GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(40);
|
||||
EXPECT_EQ(28, row_sp->GetOffset());
|
||||
EXPECT_EQ(28ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == arm64_dwarf::fp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
|
@ -163,7 +163,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple64bitFrameFunction) {
|
||||
|
||||
// 0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
|
||||
UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(0);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -174,7 +174,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple64bitFrameFunction) {
|
||||
|
||||
// 1: CFA=rsp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -185,7 +185,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple64bitFrameFunction) {
|
||||
|
||||
// 4: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -196,7 +196,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple64bitFrameFunction) {
|
||||
|
||||
// 7: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -239,7 +239,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple32bitFrameFunction) {
|
||||
|
||||
// offset 0 -- pushl %ebp
|
||||
UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(0);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -250,7 +250,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple32bitFrameFunction) {
|
||||
|
||||
// 1: CFA=esp +8 => ebp=[CFA-8] esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -261,7 +261,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple32bitFrameFunction) {
|
||||
|
||||
// 3: CFA=ebp +8 => ebp=[CFA-8] esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_ebp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -272,7 +272,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimple32bitFrameFunction) {
|
||||
|
||||
// 6: CFA=esp +4 => esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(6);
|
||||
EXPECT_EQ(6, row_sp->GetOffset());
|
||||
EXPECT_EQ(6ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -380,7 +380,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test64bitFramelessBigStackFrame) {
|
||||
|
||||
UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(17);
|
||||
|
||||
EXPECT_EQ(17, row_sp->GetOffset());
|
||||
EXPECT_EQ(17ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(14496, row_sp->GetCFAValue().GetOffset());
|
||||
@ -418,7 +418,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test64bitFramelessBigStackFrame) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(34);
|
||||
|
||||
EXPECT_EQ(34, row_sp->GetOffset());
|
||||
EXPECT_EQ(34ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -649,7 +649,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessBigStackFrame) {
|
||||
// CFA=esp+14464 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(10);
|
||||
EXPECT_EQ(10, row_sp->GetOffset());
|
||||
EXPECT_EQ(10ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(14464, row_sp->GetCFAValue().GetOffset());
|
||||
@ -657,13 +657,13 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessBigStackFrame) {
|
||||
// 15: CFA=esp+14468 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(15);
|
||||
EXPECT_EQ(15, row_sp->GetOffset());
|
||||
EXPECT_EQ(15ull, row_sp->GetOffset());
|
||||
EXPECT_EQ(14468, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// 16: CFA=esp+14464 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(16);
|
||||
EXPECT_EQ(16, row_sp->GetOffset());
|
||||
EXPECT_EQ(16ull, row_sp->GetOffset());
|
||||
EXPECT_EQ(14464, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// Check that the row for offset 16 has the registers saved that we expect
|
||||
@ -694,7 +694,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessBigStackFrame) {
|
||||
// 23: CFA=esp+14472 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(23);
|
||||
EXPECT_EQ(23, row_sp->GetOffset());
|
||||
EXPECT_EQ(23ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(14472, row_sp->GetCFAValue().GetOffset());
|
||||
@ -702,26 +702,26 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessBigStackFrame) {
|
||||
// 24: CFA=esp+14476 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(24);
|
||||
EXPECT_EQ(24, row_sp->GetOffset());
|
||||
EXPECT_EQ(24ull, row_sp->GetOffset());
|
||||
EXPECT_EQ(14476, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// 28: CFA=esp+14480 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(28);
|
||||
EXPECT_EQ(28, row_sp->GetOffset());
|
||||
EXPECT_EQ(28ull, row_sp->GetOffset());
|
||||
EXPECT_EQ(14480, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// 36: CFA=esp+14464 => ebx=[CFA-12] edi=[CFA-16] esi=[CFA-20] ebp=[CFA-8]
|
||||
// esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(36);
|
||||
EXPECT_EQ(36, row_sp->GetOffset());
|
||||
EXPECT_EQ(36ull, row_sp->GetOffset());
|
||||
EXPECT_EQ(14464, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
// Check that the epilogue gets us back to the original unwind state
|
||||
|
||||
// 47: CFA=esp +4 => esp=CFA+0 eip=[CFA-4]
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(47);
|
||||
EXPECT_EQ(47, row_sp->GetOffset());
|
||||
EXPECT_EQ(47ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -800,7 +800,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test64bitFramelessSmallStackFrame) {
|
||||
|
||||
UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(13);
|
||||
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -832,7 +832,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test64bitFramelessSmallStackFrame) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(22);
|
||||
|
||||
EXPECT_EQ(22, row_sp->GetOffset());
|
||||
EXPECT_EQ(22ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -909,7 +909,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessSmallStackFrame) {
|
||||
|
||||
UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -918,7 +918,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessSmallStackFrame) {
|
||||
// 8: CFA=esp+20 => esp=CFA+0 eip=[CFA-4]
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(8);
|
||||
EXPECT_EQ(8, row_sp->GetOffset());
|
||||
EXPECT_EQ(8ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(20, row_sp->GetCFAValue().GetOffset());
|
||||
@ -927,7 +927,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessSmallStackFrame) {
|
||||
// row[3]: 9: CFA=esp+16 => esp=CFA+0 eip=[CFA-4]
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(9);
|
||||
EXPECT_EQ(9, row_sp->GetOffset());
|
||||
EXPECT_EQ(9ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -946,7 +946,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32bitFramelessSmallStackFrame) {
|
||||
// 34: CFA=esp +4 => esp=CFA+0 eip=[CFA-4]
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(34);
|
||||
EXPECT_EQ(34, row_sp->GetOffset());
|
||||
EXPECT_EQ(34ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -970,7 +970,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushRBP) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -985,7 +985,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushRBP) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1013,13 +1013,13 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushImm) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(5);
|
||||
EXPECT_EQ(5, row_sp->GetOffset());
|
||||
EXPECT_EQ(5ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(24, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1029,13 +1029,13 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushImm) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(5);
|
||||
EXPECT_EQ(5, row_sp->GetOffset());
|
||||
EXPECT_EQ(5ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(12, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1063,7 +1063,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPush0) {
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
// We're verifying that no row was created for the 'pushq $0'
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
|
||||
std::unique_ptr<x86AssemblyInspectionEngine> engine32 = Geti386Inspector();
|
||||
EXPECT_TRUE(engine32->GetNonCallSiteUnwindPlanFromAssembly(
|
||||
@ -1072,7 +1072,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPush0) {
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
// We're verifying that no row was created for the 'pushq $0'
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
}
|
||||
|
||||
TEST_F(Testx86AssemblyInspectionEngine, TestPushExtended) {
|
||||
@ -1095,7 +1095,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushExtended) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1105,19 +1105,19 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushExtended) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(10);
|
||||
EXPECT_EQ(10, row_sp->GetOffset());
|
||||
EXPECT_EQ(10ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(12, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(12);
|
||||
EXPECT_EQ(12, row_sp->GetOffset());
|
||||
EXPECT_EQ(12ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1141,7 +1141,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushR15) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1169,7 +1169,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushR14) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1197,7 +1197,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushR13) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1225,7 +1225,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushR12) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1253,7 +1253,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushRBX) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1284,7 +1284,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushEAX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1313,7 +1313,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushECX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1342,7 +1342,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushEDX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1368,7 +1368,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushEBX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1396,7 +1396,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushEBP) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1424,7 +1424,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushESI) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1452,7 +1452,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPushEDI) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(1);
|
||||
EXPECT_EQ(1, row_sp->GetOffset());
|
||||
EXPECT_EQ(1ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1480,7 +1480,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestMovRSPtoRBP) {
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1496,7 +1496,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestMovRSPtoRBP) {
|
||||
data64_2, sizeof(data64_2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1512,7 +1512,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestMovRSPtoRBP) {
|
||||
data32_1, sizeof(data32_1), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_ebp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1528,7 +1528,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestMovRSPtoRBP) {
|
||||
data32_2, sizeof(data32_2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_ebp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1552,7 +1552,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSubRSP) {
|
||||
data1, sizeof(data1), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(264, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1568,7 +1568,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSubRSP) {
|
||||
data2, sizeof(data2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(24, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1592,7 +1592,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSubESP) {
|
||||
data1, sizeof(data1), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(6);
|
||||
EXPECT_EQ(6, row_sp->GetOffset());
|
||||
EXPECT_EQ(6ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(260, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1608,7 +1608,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSubESP) {
|
||||
data2, sizeof(data2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(20, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1632,7 +1632,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestAddRSP) {
|
||||
data1, sizeof(data1), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8 - 256, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1648,7 +1648,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestAddRSP) {
|
||||
data2, sizeof(data2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8 - 16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1672,7 +1672,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestAddESP) {
|
||||
data1, sizeof(data1), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(6);
|
||||
EXPECT_EQ(6, row_sp->GetOffset());
|
||||
EXPECT_EQ(6ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4 - 256, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1688,7 +1688,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestAddESP) {
|
||||
data2, sizeof(data2), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(3);
|
||||
EXPECT_EQ(3, row_sp->GetOffset());
|
||||
EXPECT_EQ(3ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4 - 16, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1715,7 +1715,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopRBX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1741,7 +1741,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopRBP) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1767,7 +1767,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopR12) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1793,7 +1793,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopR13) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1819,7 +1819,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopR14) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1845,7 +1845,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopR15) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1871,7 +1871,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopEBX) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1897,7 +1897,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopEBP) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1923,7 +1923,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopESI) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1949,7 +1949,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestPopEDI) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -1984,13 +1984,13 @@ TEST_F(Testx86AssemblyInspectionEngine, Testi386IgnoredRegisters) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(4);
|
||||
EXPECT_EQ(4, row_sp->GetOffset());
|
||||
EXPECT_EQ(4ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(20, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(7);
|
||||
EXPECT_EQ(7, row_sp->GetOffset());
|
||||
EXPECT_EQ(7ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -2016,7 +2016,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestLEAVE) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -2026,7 +2026,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestLEAVE) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
@ -2055,7 +2055,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestCALLNextInsn) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(5);
|
||||
EXPECT_EQ(5, row_sp->GetOffset());
|
||||
EXPECT_EQ(5ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -2084,7 +2084,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSpillRegToStackViaMOVx86_64) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(19);
|
||||
EXPECT_EQ(19, row_sp->GetOffset());
|
||||
EXPECT_EQ(19ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
|
||||
EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -2122,7 +2122,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSpillRegToStackViaMOVi386) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(12);
|
||||
EXPECT_EQ(12, row_sp->GetOffset());
|
||||
EXPECT_EQ(12ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -2200,7 +2200,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimplex86_64Augmented) {
|
||||
data, sizeof(data), sample_range, unwind_plan, reg_ctx_sp));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(6);
|
||||
EXPECT_EQ(6, row_sp->GetOffset());
|
||||
EXPECT_EQ(6ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -2278,7 +2278,7 @@ TEST_F(Testx86AssemblyInspectionEngine, TestSimplei386ugmented) {
|
||||
data, sizeof(data), sample_range, unwind_plan, reg_ctx_sp));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(5);
|
||||
EXPECT_EQ(5, row_sp->GetOffset());
|
||||
EXPECT_EQ(5ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_EQ(4, row_sp->GetCFAValue().GetOffset());
|
||||
|
||||
@ -2315,7 +2315,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32BitOnlyInstruction) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(2, row_sp->GetOffset());
|
||||
EXPECT_EQ(2ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_esp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
@ -2330,7 +2330,7 @@ TEST_F(Testx86AssemblyInspectionEngine, Test32BitOnlyInstruction) {
|
||||
data, sizeof(data), sample_range, unwind_plan));
|
||||
|
||||
row_sp = unwind_plan.GetRowForFunctionOffset(2);
|
||||
EXPECT_EQ(0, row_sp->GetOffset());
|
||||
EXPECT_EQ(0ull, row_sp->GetOffset());
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
|
||||
EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
|
||||
EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
|
||||
|
@ -495,7 +495,7 @@ TEST_F(StringExtractorTest, GetNameColonValueSuccess) {
|
||||
EXPECT_TRUE(ex.GetNameColonValue(name, value));
|
||||
EXPECT_EQ("key2", name);
|
||||
EXPECT_EQ("value2", value);
|
||||
EXPECT_EQ(0, ex.GetBytesLeft());
|
||||
EXPECT_EQ(0u, ex.GetBytesLeft());
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetNameColonValueContainsColon) {
|
||||
@ -510,7 +510,7 @@ TEST_F(StringExtractorTest, GetNameColonValueContainsColon) {
|
||||
EXPECT_TRUE(ex.GetNameColonValue(name, value));
|
||||
EXPECT_EQ("key2", name);
|
||||
EXPECT_EQ("value3", value);
|
||||
EXPECT_EQ(0, ex.GetBytesLeft());
|
||||
EXPECT_EQ(0u, ex.GetBytesLeft());
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetNameColonValueNoSemicolon) {
|
||||
@ -520,7 +520,7 @@ TEST_F(StringExtractorTest, GetNameColonValueNoSemicolon) {
|
||||
llvm::StringRef name;
|
||||
llvm::StringRef value;
|
||||
EXPECT_FALSE(ex.GetNameColonValue(name, value));
|
||||
EXPECT_EQ(0, ex.GetBytesLeft());
|
||||
EXPECT_EQ(0u, ex.GetBytesLeft());
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetNameColonValueNoColon) {
|
||||
@ -530,169 +530,169 @@ TEST_F(StringExtractorTest, GetNameColonValueNoColon) {
|
||||
llvm::StringRef name;
|
||||
llvm::StringRef value;
|
||||
EXPECT_FALSE(ex.GetNameColonValue(name, value));
|
||||
EXPECT_EQ(0, ex.GetBytesLeft());
|
||||
EXPECT_EQ(0u, ex.GetBytesLeft());
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetU32LittleEndian) {
|
||||
StringExtractor ex("");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("0");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU32(true, 1));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU32(true, 1));
|
||||
|
||||
ex.Reset("1");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("01");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("001");
|
||||
EXPECT_EQ(0x100, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x100ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("12");
|
||||
EXPECT_EQ(0x12, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x12ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("123");
|
||||
EXPECT_EQ(0x312, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x312ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("1203");
|
||||
EXPECT_EQ(0x312, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x312ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("1234");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("12340");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("123400");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("12345670");
|
||||
EXPECT_EQ(0x70563412, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0x70563412ull, ex.GetHexMaxU32(true, 0));
|
||||
|
||||
ex.Reset("123456701");
|
||||
EXPECT_EQ(0, ex.GetHexMaxU32(true, 0));
|
||||
EXPECT_EQ(0ull, ex.GetHexMaxU32(true, 0));
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetU32BigEndian) {
|
||||
StringExtractor ex("");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("0");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU32(false, 1));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU32(false, 1));
|
||||
|
||||
ex.Reset("1");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("01");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("001");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("12");
|
||||
EXPECT_EQ(0x12, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x12ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("123");
|
||||
EXPECT_EQ(0x123, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x123ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("1203");
|
||||
EXPECT_EQ(0x1203, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x1203ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("1234");
|
||||
EXPECT_EQ(0x1234, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x1234ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("12340");
|
||||
EXPECT_EQ(0x12340, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x12340ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("123400");
|
||||
EXPECT_EQ(0x123400, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x123400ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("12345670");
|
||||
EXPECT_EQ(0x12345670, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0x12345670ull, ex.GetHexMaxU32(false, 0));
|
||||
|
||||
ex.Reset("123456700");
|
||||
EXPECT_EQ(0, ex.GetHexMaxU32(false, 0));
|
||||
EXPECT_EQ(0ull, ex.GetHexMaxU32(false, 0));
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetU64LittleEndian) {
|
||||
StringExtractor ex("");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("0");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU64(true, 1));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU64(true, 1));
|
||||
|
||||
ex.Reset("1");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("01");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("001");
|
||||
EXPECT_EQ(0x100, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x100ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("12");
|
||||
EXPECT_EQ(0x12, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x12ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("123");
|
||||
EXPECT_EQ(0x312, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x312ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("1203");
|
||||
EXPECT_EQ(0x312, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x312ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("1234");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("12340");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("123400");
|
||||
EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0x3412ull, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("123456789ABCDEF0");
|
||||
EXPECT_EQ(0xF0DEBC9A78563412ULL, ex.GetHexMaxU64(true, 0));
|
||||
|
||||
ex.Reset("123456789ABCDEF01");
|
||||
EXPECT_EQ(0, ex.GetHexMaxU64(true, 0));
|
||||
EXPECT_EQ(0ull, ex.GetHexMaxU64(true, 0));
|
||||
}
|
||||
|
||||
TEST_F(StringExtractorTest, GetU64BigEndian) {
|
||||
StringExtractor ex("");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("0");
|
||||
EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 1));
|
||||
EXPECT_EQ(0x0ull, ex.GetHexMaxU64(false, 1));
|
||||
|
||||
ex.Reset("1");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("01");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("001");
|
||||
EXPECT_EQ(0x1, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x1ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("12");
|
||||
EXPECT_EQ(0x12, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x12ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("123");
|
||||
EXPECT_EQ(0x123, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x123ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("1203");
|
||||
EXPECT_EQ(0x1203, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x1203ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("1234");
|
||||
EXPECT_EQ(0x1234, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x1234ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("12340");
|
||||
EXPECT_EQ(0x12340, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x12340ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("123400");
|
||||
EXPECT_EQ(0x123400, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0x123400ull, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("123456789ABCDEF0");
|
||||
EXPECT_EQ(0x123456789ABCDEF0ULL, ex.GetHexMaxU64(false, 0));
|
||||
|
||||
ex.Reset("123456789ABCDEF000");
|
||||
EXPECT_EQ(0, ex.GetHexMaxU64(false, 0));
|
||||
EXPECT_EQ(0ull, ex.GetHexMaxU64(false, 0));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user