Skip to content

Commit

Permalink
MdePkg: Increment EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL
Browse files Browse the repository at this point in the history
The intention here is to enable old tools encountering the new standard
format to understand that they don't understand the layout.

This will break old tools in situations where they could have worked,
i.e. where what is loaded is in fact a PE, but it seems preferable to
allow new tools, which are aware of the new structure fields, to
reliably detect and access these whenever they are present.
  • Loading branch information
mikebeaton committed Nov 26, 2023
1 parent 100f289 commit 0698ca1
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions MdePkg/Include/Guid/DebugImageInfoTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01
#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02

#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01
#define EFI_DEBUG_IMAGE_INFO_TYPE_LEGACY_PE 0x01
#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x02

typedef struct {
UINT64 Signature; ///< A constant UINT64 that has the value EFI_SYSTEM_TABLE_SIGNATURE
Expand All @@ -35,8 +36,14 @@ typedef struct {

typedef struct {
///
/// Indicates the type of image info structure. For PE32 EFI images,
/// this is set to EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL.
/// Indicates the available image info in this structure.
/// EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL (i.e. 2) indicates that PdbPath and
// DebugBase fields are present (the loaded image may or may not be a PE).
/// Note that EFI_DEBUG_IMAGE_INFO_TYPE_LEGACY_PE (i.e. 1) was used in
/// earlier versions to indicate that the loaded image is a PE, using a
/// previous version of this structure which did not include the PdbPath
/// and DebugBase fields (therefore knowledge of the specific image type
/// was required in order to access debug symbolication information).
///
UINT32 ImageInfoType;
///
Expand All @@ -47,7 +54,13 @@ typedef struct {
/// Indicates the image handle of the associated image.
///
EFI_HANDLE ImageHandle;
CHAR8 *PdbPath;
///
/// Symbol file path for debug symbolication.
///
CHAR8 *PdbPath;
///
/// Image base address for debug symbolication.
///
UINTN DebugBase;
} EFI_DEBUG_IMAGE_INFO_NORMAL;

Expand Down

0 comments on commit 0698ca1

Please sign in to comment.