Example #1
0
def Edk2StopHandler2(event):
    gdb.execute("refresharch")
    if not UdkCommandHelper.supportExpat():
        gdb.execute("loadthis")
    gdb.execute("info exception")
Example #2
0
Edk2DebugScript()

try:
    gdb.execute("set remotetimeout 20")
    gdb.execute("set disassemble-next-line auto")
    gdb.execute("set step-mode on")
    gdb.execute("set disassembly-flavor intel")
    gdb.execute("set height 0")
    gdb.execute("set prompt (udb) ")
    print(SCRIPT_BANNER_BEGIN)
    # exception raised when GdbServer is not connected
    #print("select_frame")
    #gdb.selected_frame()

    # provide additional command when gdb doesn't support Expat
    if UdkCommandHelper.supportExpat():
        print(SUPPORT_PENDING_BREAKPOINTS)
    else:
        print(NOT_SUPPORT_PENDING_BREAKPOINTS)
    print(SCRIPT_BANNER_END)

    # Set loadimageat an alias to loadthis to keep backward compatibility
    #gdb.execute("alias loadimageat=loadthis")

    # Run the hook-stop script
    # gdb.execute("stop-handler")

    # force to load the shared library in the first time
    # gdb.execute("sharedlibrary")

except: