diff mbox series

[3/5] dump: Reorder struct DumpState

Message ID 20220310111608.3362-4-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series dump: Add custom arch section support | expand

Commit Message

Janosch Frank March 10, 2022, 11:16 a.m. UTC
Let's move ELF related members into one block and guest memory related
ones into another to improve readability.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 include/sysemu/dump.h | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Comments

Richard Henderson March 11, 2022, 8:13 p.m. UTC | #1
On 3/10/22 03:16, Janosch Frank wrote:
> Let's move ELF related members into one block and guest memory related
> ones into another to improve readability.
> 
> Signed-off-by: Janosch Frank<frankja@linux.ibm.com>
> ---
>   include/sysemu/dump.h | 18 +++++++++++-------
>   1 file changed, 11 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 4c5a593b81..186348a972 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -154,24 +154,28 @@  typedef struct DumpState {
     GuestPhysBlockList guest_phys_blocks;
     ArchDumpInfo dump_info;
     MemoryMappingList list;
-    uint32_t phdr_num;
-    uint32_t shdr_num;
     bool resume;
     bool detached;
-    ssize_t note_size;
-    hwaddr shdr_offset;
-    hwaddr phdr_offset;
-    hwaddr section_offset;
-    hwaddr note_offset;
     hwaddr memory_offset;
     int fd;
 
+    /* Guest memory related data */
     GuestPhysBlock *next_block;
     ram_addr_t start;
     bool has_filter;
     int64_t begin;
     int64_t length;
 
+    /* Elf dump related data */
+    uint32_t phdr_num;
+    uint32_t shdr_num;
+    uint32_t sh_info;
+    ssize_t note_size;
+    hwaddr shdr_offset;
+    hwaddr phdr_offset;
+    hwaddr note_offset;
+    hwaddr section_offset;
+
     void *elf_header;
     void *elf_section_hdrs;
     uint64_t elf_section_data_size;