Re: [PATCH 3/5] dump: Reorder struct DumpState

2022-03-11 Thread Richard Henderson

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
---
  include/sysemu/dump.h | 18 +++---
  1 file changed, 11 insertions(+), 7 deletions(-)


Reviewed-by: Richard Henderson 

r~



[PATCH 3/5] dump: Reorder struct DumpState

2022-03-10 Thread Janosch Frank
Let's move ELF related members into one block and guest memory related
ones into another to improve readability.

Signed-off-by: Janosch Frank 
---
 include/sysemu/dump.h | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

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;
-- 
2.32.0