1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibDebug: Store 64-bit numbers in AttributeValue

This helps us avoid weird truncation issues and fixes a bug on Clang
builds where truncation while reading caused the DIE offsets following
large LEB128 numbers to be incorrect. This removes the need for the
separate `LongUnsignedNumber` type.
This commit is contained in:
Daniel Bertalan 2021-07-27 11:03:24 +02:00 committed by Andreas Kling
parent efd1aea969
commit 7396e4aedc
6 changed files with 32 additions and 31 deletions

View file

@ -13,9 +13,12 @@
TEST_CASE(basic_scenario)
{
auto location = SourceLocation::current();
EXPECT_EQ(StringView(__FILE__), location.filename());
EXPECT_EQ(StringView(__FUNCTION__), location.function_name());
EXPECT_EQ(__LINE__ - 3u, location.line_number());
EXPECT_EQ(__LINE__ - 2u, location.line_number());
// FIXME: On Clang, __FILE__ is a relative path, while location.path() is absolute
#ifndef __clang__
EXPECT_EQ(StringView(__FILE__), location.filename());
#endif
}
static StringView test_default_arg(const SourceLocation& loc = SourceLocation::current())