EFI_STATUS file_read(EFI_FILE_HANDLE dir, const CHAR16 *name, UINTN off, UINTN size, CHAR8 **content, UINTN *content_size);
-static inline void FreePoolp(void *p) {
+static inline void free_poolp(void *p) {
void *q = *(void**) p;
if (!q)
FreePool(q);
}
-#define _cleanup_freepool_ _cleanup_(FreePoolp)
+#define _cleanup_freepool_ _cleanup_(free_poolp)
-static inline void FileHandleClosep(EFI_FILE_HANDLE *handle) {
+static inline void file_handle_closep(EFI_FILE_HANDLE *handle) {
if (!*handle)
return;
}
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