summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDebug/Dwarf
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-01 20:58:27 +0300
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch)
tree02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/Libraries/LibDebug/Dwarf
parent0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff)
downloadserenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Libraries/LibDebug/Dwarf')
-rw-r--r--Userland/Libraries/LibDebug/Dwarf/AttributeValue.h4
-rw-r--r--Userland/Libraries/LibDebug/Dwarf/DIE.cpp2
-rw-r--r--Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp8
-rw-r--r--Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibDebug/Dwarf/AttributeValue.h b/Userland/Libraries/LibDebug/Dwarf/AttributeValue.h
index 9343328abf..c46979c877 100644
--- a/Userland/Libraries/LibDebug/Dwarf/AttributeValue.h
+++ b/Userland/Libraries/LibDebug/Dwarf/AttributeValue.h
@@ -36,7 +36,7 @@ public:
FlatPtr as_addr() const;
u64 as_unsigned() const { return m_data.as_unsigned; }
i64 as_signed() const { return m_data.as_signed; }
- const char* as_string() const;
+ char const* as_string() const;
bool as_bool() const { return m_data.as_bool; }
ReadonlyBytes as_raw_bytes() const { return m_data.as_raw_bytes; }
@@ -46,7 +46,7 @@ private:
FlatPtr as_addr;
u64 as_unsigned;
i64 as_signed;
- const char* as_string; // points to bytes in the memory mapped elf image
+ char const* as_string; // points to bytes in the memory mapped elf image
bool as_bool;
ReadonlyBytes as_raw_bytes;
} m_data {};
diff --git a/Userland/Libraries/LibDebug/Dwarf/DIE.cpp b/Userland/Libraries/LibDebug/Dwarf/DIE.cpp
index 4c1c271c5b..1577d98fd7 100644
--- a/Userland/Libraries/LibDebug/Dwarf/DIE.cpp
+++ b/Userland/Libraries/LibDebug/Dwarf/DIE.cpp
@@ -54,7 +54,7 @@ Optional<AttributeValue> DIE::get_attribute(Attribute const& attribute) const
auto abbreviation_info = m_compilation_unit.abbreviations_map().get(m_abbreviation_code);
VERIFY(abbreviation_info);
- for (const auto& attribute_spec : abbreviation_info->attribute_specifications) {
+ for (auto const& attribute_spec : abbreviation_info->attribute_specifications) {
auto value = m_compilation_unit.dwarf_info().get_attribute_value(attribute_spec.form, attribute_spec.value, stream, &m_compilation_unit);
if (attribute_spec.attribute == attribute) {
return value;
diff --git a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp
index 57b3991c10..23f7596019 100644
--- a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp
+++ b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp
@@ -77,7 +77,7 @@ void DwarfInfo::populate_compilation_units()
}
AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t implicit_const_value,
- InputMemoryStream& debug_info_stream, const CompilationUnit* unit) const
+ InputMemoryStream& debug_info_stream, CompilationUnit const* unit) const
{
AttributeValue value;
value.m_form = form;
@@ -98,7 +98,7 @@ AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t im
value.m_type = AttributeValue::Type::String;
auto strings_data = debug_strings_data();
- value.m_data.as_string = bit_cast<const char*>(strings_data.offset_pointer(offset));
+ value.m_data.as_string = bit_cast<char const*>(strings_data.offset_pointer(offset));
break;
}
case AttributeDataForm::Data1: {
@@ -199,7 +199,7 @@ AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t im
debug_info_stream >> str;
VERIFY(!debug_info_stream.has_any_error());
value.m_type = AttributeValue::Type::String;
- value.m_data.as_string = bit_cast<const char*>(debug_info_data().offset_pointer(str_offset));
+ value.m_data.as_string = bit_cast<char const*>(debug_info_data().offset_pointer(str_offset));
break;
}
case AttributeDataForm::Block1: {
@@ -241,7 +241,7 @@ AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t im
value.m_type = AttributeValue::Type::String;
auto strings_data = debug_line_strings_data();
- value.m_data.as_string = bit_cast<const char*>(strings_data.offset_pointer(offset));
+ value.m_data.as_string = bit_cast<char const*>(strings_data.offset_pointer(offset));
break;
}
case AttributeDataForm::ImplicitConst: {
diff --git a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h
index 3e9375801b..ac2ec7e2e5 100644
--- a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h
+++ b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h
@@ -39,7 +39,7 @@ public:
void for_each_compilation_unit(Callback) const;
AttributeValue get_attribute_value(AttributeDataForm form, ssize_t implicit_const_value,
- InputMemoryStream& debug_info_stream, const CompilationUnit* unit = nullptr) const;
+ InputMemoryStream& debug_info_stream, CompilationUnit const* unit = nullptr) const;
Optional<DIE> get_die_at_address(FlatPtr) const;
@@ -89,7 +89,7 @@ private:
template<typename Callback>
void DwarfInfo::for_each_compilation_unit(Callback callback) const
{
- for (const auto& unit : m_compilation_units) {
+ for (auto const& unit : m_compilation_units) {
callback(unit);
}
}