debugger.HandleCommand("type summary add CHAR8 --python-function lldbefi.CHAR8_TypeSummary")\r
debugger.HandleCommand('type summary add --regex "CHAR8 \[[0-9]+\]" --python-function lldbefi.CHAR8_TypeSummary')\r
\r
+ debugger.HandleCommand(\r
+ 'setting set frame-format "frame #${frame.index}: ${frame.pc}'\r
+ '{ ${module.file.basename}{:${function.name}()${function.pc-offset}}}'\r
+ '{ at ${line.file.fullpath}:${line.number}}\n"'\r
+ )\r
\r
gEmulatorBreakWorkaroundNeeded = True\r
\r
Error = lldb.SBError()\r
FileNamePtr = frame.FindVariable ("FileName").GetValueAsUnsigned()\r
FileNameLen = frame.FindVariable ("FileNameLength").GetValueAsUnsigned()\r
+\r
FileName = frame.thread.process.ReadCStringFromMemory (FileNamePtr, FileNameLen, Error)\r
if not Error.Success():\r
print "!ReadCStringFromMemory() did not find a %d byte C string at %x" % (FileNameLen, FileNamePtr)\r
# make breakpoint command contiue\r
- frame.GetThread().GetProcess().Continue()\r
+ return False\r
\r
debugger = frame.thread.process.target.debugger\r
if frame.FindVariable ("AddSymbolFlag").GetValueAsUnsigned() == 1:\r
- LoadAddress = frame.FindVariable ("LoadAddress").GetValueAsUnsigned()\r
+ LoadAddress = frame.FindVariable ("LoadAddress").GetValueAsUnsigned() - 0x240\r
\r
debugger.HandleCommand ("target modules add %s" % FileName)\r
print "target modules load --slid 0x%x %s" % (LoadAddress, FileName)\r
print "!lldb.target.RemoveModule (%s) FAILED" % SBModule\r
\r
# make breakpoint command contiue\r
- frame.thread.process.Continue()\r
+ return False\r
\r
def GuidToCStructStr (guid, Name=False):\r
#\r
if [[ "$RUN_EMULATOR" == "yes" ]]; then
case `uname` in
Darwin*)
- #
- # On Darwin we can't use dlopen, so we have to load the real PE/COFF images.
- # This .gdbinit script sets a breakpoint that loads symbols for the PE/COFFEE
- # images that get loaded in Host
- #
- if [[ "$CLANG_VER" == *-ccc-host-triple* ]]
- then
- # only older versions of Xcode support -ccc-host-tripe, for newer versions
- # it is -target
- cp $WORKSPACE/EmulatorPkg/Unix/lldbefi.py "$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCESSOR"
- cd $BUILD_ROOT_ARCH; /usr/bin/lldb --source $WORKSPACE/EmulatorPkg/Unix/lldbinit Host
- exit $?
- else
- cp $WORKSPACE/EmulatorPkg/Unix/.gdbinit "$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCESSOR"
- fi
+ cd $BUILD_ROOT_ARCH
+ /usr/bin/lldb \
+ -o "command script import $WORKSPACE/EmulatorPkg/Unix/lldbefi.py" \
+ -o 'script lldb.debugger.SetAsync(True)' \
+ -o "run" ./Host
+ exit $?
;;
esac