summaryrefslogtreecommitdiff
path: root/src/boot/efi/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi/util.h')
-rw-r--r--src/boot/efi/util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h
index b40f05eaef..fa88ab62cb 100644
--- a/src/boot/efi/util.h
+++ b/src/boot/efi/util.h
@@ -159,3 +159,13 @@ static inline void *PHYSICAL_ADDRESS_TO_POINTER(EFI_PHYSICAL_ADDRESS addr) {
}
UINT64 get_os_indications_supported(void);
+
+#ifdef EFI_DEBUG
+void debug_break(void);
+extern UINT8 _text, _data;
+/* Report the relocated position of text and data sections so that a debugger
+ * can attach to us. See debug-sd-boot.sh for how this can be done. */
+# define debug_hook(identity) Print(identity L"@0x%x,0x%x\n", &_text, &_data)
+#else
+# define debug_hook(identity)
+#endif