[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 2cba24d3fb3 12/18: pdumper_visit_object_starts
From: |
Gerd Moellmann |
Subject: |
scratch/igc 2cba24d3fb3 12/18: pdumper_visit_object_starts |
Date: |
Tue, 14 May 2024 04:02:09 -0400 (EDT) |
branch: scratch/igc
commit 2cba24d3fb372081ee7133aabf8614b57ff36bdb
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
pdumper_visit_object_starts
---
src/pdumper.c | 14 ++++++++++++++
src/pdumper.h | 12 ++++++++++++
2 files changed, 26 insertions(+)
diff --git a/src/pdumper.c b/src/pdumper.c
index f83f4e36e81..358529297f9 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5365,6 +5365,20 @@ dump_find_relocation (const struct dump_table_locator
*const table,
return found;
}
+void
+dump_visit_object_starts (dump_visit_fn fn)
+{
+ const struct dump_table_locator *table = &dump_private.header.object_starts;
+ const struct dump_reloc *const relocs
+ = dump_ptr (dump_public.start, table->offset);
+ for (dump_off i = 0; i < table->nr_entries; ++i)
+ {
+ void *start
+ = dump_ptr (dump_public.start, dump_reloc_get_offset (relocs[i]));
+ fn (start);
+ }
+}
+
bool
dump_loaded_p (void)
{
diff --git a/src/pdumper.h b/src/pdumper.h
index 80bb72af01a..ccd287720cd 100644
--- a/src/pdumper.h
+++ b/src/pdumper.h
@@ -278,5 +278,17 @@ void init_pdumper_once (void);
void syms_of_pdumper (void);
bool dump_loaded_p (void);
+typedef void (* dump_visit_fn) (void *start);
+extern void dump_visit_object_starts (dump_visit_fn fn);
+
+INLINE void
+pdumper_visit_object_starts (dump_visit_fn fn)
+{
+#ifdef HAVE_PDUMPER
+ dump_visit_object_starts (fn);
+#endif
+}
+
+
INLINE_HEADER_END
#endif
- scratch/igc 55fbf28d2b1 01/18: igc_dump_header, (continued)
- scratch/igc 55fbf28d2b1 01/18: igc_dump_header, Gerd Moellmann, 2024/05/14
- scratch/igc 85a3247f8c4 06/18: Add igc_obj_type for dumped non-objs, Gerd Moellmann, 2024/05/14
- scratch/igc 51f1720d970 02/18: igc--walk-dump, Gerd Moellmann, 2024/05/14
- scratch/igc 8fdb6e1f7d9 03/18: WIP, Gerd Moellmann, 2024/05/14
- scratch/igc 7bd87c560d2 05/18: WIP, Gerd Moellmann, 2024/05/14
- scratch/igc 5306fb37899 07/18: Use IGC_OBJ_DUMPED_xx, Gerd Moellmann, 2024/05/14
- scratch/igc ef91137a394 09/18: Fix non-MPS build, Gerd Moellmann, 2024/05/14
- scratch/igc bcbc75748b9 10/18: Work on hash table dumping/loading, Gerd Moellmann, 2024/05/14
- scratch/igc 1cdc505ef76 11/18: Don't give charsets igc_headers, Gerd Moellmann, 2024/05/14
- scratch/igc 6455d3be170 16/18: Visit dumnped igc objects with closure, Gerd Moellmann, 2024/05/14
- scratch/igc 2cba24d3fb3 12/18: pdumper_visit_object_starts,
Gerd Moellmann <=
- scratch/igc bef0953409b 17/18: Fix for obarray dump, Gerd Moellmann, 2024/05/14
- scratch/igc f969b5a0827 18/18: Remove IGC_OBJ_DUMPED_BLV, Gerd Moellmann, 2024/05/14
- scratch/igc 280ee228a2c 08/18: Dump with igc_headers if HAVE_MPS, Gerd Moellmann, 2024/05/14
- scratch/igc 496f647b7da 15/18: Cleanup, Gerd Moellmann, 2024/05/14
- scratch/igc 62b52390cef 14/18: Dump igc object starts to file, Gerd Moellmann, 2024/05/14
- scratch/igc a5c85414c7c 13/18: Record igc object starts, Gerd Moellmann, 2024/05/14