This topic describes the usage of the following symbols used in the debugger commands:
Double quotation mark "
To use these symbols in a string variable of a debugger command, the symbols " and \n must be escaped by a backslash \. The backslash \ itself must only be escaped if it is used together with the symbol \n or " (\", \\n) or if the backslash is used in pathnames. The following two examples demonstrate the escaping.
The following command prints Hello world in the Console window.
PRINT "Hello world\n"
The following command defines the button PR. If the button PR is pressed, the command PRINT "Hello world\n" is executed. Since the command DEFINE BUTTON contains a string variable, the symbols " and \n must be escaped. The bold printed letters are inserted to create this button.
DEFINE BUTTON PR " Print \"Hello world\\n\" \n"
The following command defines the macro out. If the macro out is executed by entering @out in the Console window, the button PR is created. Clicking the button PR executes the command PRINT "Hello world\n". Since the command DEFINE MACRO contains a string variable, the symbols " and \n must be escaped. Note that every " and \n must be escaped! The bold printed letters are inserted to create this macro.
DEFINE MACRO out " DEFINE BUTTON PR \"PRINT \\\"Hello world\\\\n\\\"\\n\" "
The following command loads the hex file test.hx located in the directory c:\samples\testdir\v100\debug. Note that the backslash contained in the pathname must be escaped!
LOAD /HEX of " C:\\samples\\testdir\\v100\\debug\\test"
The following command defines the button LO. If the button LO is pressed, the hex file test.hx located in the directory c:\samples\testdir\v100\debug is loaded. The bold printed letters are inserted to create this button.
DEFINE BUTTON LO " LOAD /HEX of \"c:\\\\samples\\\\testdir\\\\v100\\\\debug\\\\test\" \n"
The following command loads the symbol file DxeCore.efi located in the directory c:\temp\ into the debugger memory. Note that the \t contained in the pathname would be interpreted as a whitespace. Use the forward slash instead to pass the correct path to the debugger.
LOAD /NOLOAD /OFFSET = 0xeb47000 OF "c:/temp/DxeCore.efi"