summaryrefslogtreecommitdiff
path: root/Libraries/LibELF
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-12-30 22:44:54 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-31 21:51:00 +0100
commitbbe787a0afd51307cdac2c023895c19df31519ca (patch)
tree44dc80cf50b22b461c27c1e9d99fa2c9ff00e22e /Libraries/LibELF
parent2568a93b5dd29d2b06d613a4ece502ee696f189a (diff)
downloadserenity-bbe787a0afd51307cdac2c023895c19df31519ca.zip
Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly around structs/classes with attributes like [[gnu::packed]], and incorrect insertion of spaces in parameter types ("T &"/"T &&"). I also removed a bunch of // clang-format off/on and FIXME comments that are no longer relevant - on the other hand it tried to destroy a couple of neatly formatted comments, so I had to add some as well.
Diffstat (limited to 'Libraries/LibELF')
-rw-r--r--Libraries/LibELF/AuxiliaryVector.h2
-rw-r--r--Libraries/LibELF/CoreDump.h18
2 files changed, 8 insertions, 12 deletions
diff --git a/Libraries/LibELF/AuxiliaryVector.h b/Libraries/LibELF/AuxiliaryVector.h
index 57194f631e..24a5f0924c 100644
--- a/Libraries/LibELF/AuxiliaryVector.h
+++ b/Libraries/LibELF/AuxiliaryVector.h
@@ -40,6 +40,7 @@ typedef struct
} a_un;
} auxv_t;
+// clang-format off
#define AT_NULL 0 /* No length, last entry's a_type has this value */
#define AT_IGNORE 1 /* Entry has no meaning, a_un undefined */
#define AT_EXECFD 2 /* a_val contains a file descriptor of the main program image */
@@ -65,6 +66,7 @@ typedef struct
#define AT_EXECFN 31 /* a_ptr points to file name of executed program */
#define AT_EXE_BASE 32 /* a_ptr holds base address where main program was loaded into memory */
#define AT_EXE_SIZE 33 /* a_val holds the size of the main program in memory */
+// clang-format on
namespace ELF {
diff --git a/Libraries/LibELF/CoreDump.h b/Libraries/LibELF/CoreDump.h
index fa3fb45e5a..e5b60abcd8 100644
--- a/Libraries/LibELF/CoreDump.h
+++ b/Libraries/LibELF/CoreDump.h
@@ -32,8 +32,7 @@
namespace ELF::Core {
-struct [[gnu::packed]] NotesEntryHeader
-{
+struct [[gnu::packed]] NotesEntryHeader {
enum Type : u8 {
Null = 0, // Terminates segment
ProcessInfo,
@@ -44,28 +43,24 @@ struct [[gnu::packed]] NotesEntryHeader
Type type;
};
-struct [[gnu::packed]] NotesEntry
-{
+struct [[gnu::packed]] NotesEntry {
NotesEntryHeader header;
char data[];
};
-struct [[gnu::packed]] ProcessInfo
-{
+struct [[gnu::packed]] ProcessInfo {
NotesEntryHeader header;
int pid;
char executable_path[]; // Null terminated
};
-struct [[gnu::packed]] ThreadInfo
-{
+struct [[gnu::packed]] ThreadInfo {
NotesEntryHeader header;
int tid;
PtraceRegisters regs;
};
-struct [[gnu::packed]] MemoryRegionInfo
-{
+struct [[gnu::packed]] MemoryRegionInfo {
NotesEntryHeader header;
uint32_t region_start;
uint32_t region_end;
@@ -83,8 +78,7 @@ struct [[gnu::packed]] MemoryRegionInfo
}
};
-struct [[gnu::packed]] Metadata
-{
+struct [[gnu::packed]] Metadata {
NotesEntryHeader header;
char json_data[]; // Null terminated
};