From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C15D181E02 for ; Mon, 14 Nov 2016 05:14:46 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id g23so15288924wme.1 for ; Mon, 14 Nov 2016 05:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=pCvHtF+40Glt3Bv9Iyk8N8miJWiTjlU3gtrIimUwN1w=; b=oJEGE7XIgMDC/tH5PkvdTB+mwLTa1NRX5GgiT/3+6xM8b4G874rcNHlK8dx8dwXKGy zmya/IG07yI92tlYuCEfSrJQpu3ftjA6PmpIbHJ69qRWoj2VAnAHw4mimxcR7A91pIrB S5roqVXG73kVcSVYMGY2f2ec0kQ+U9Kf6RSuLVwl+fkcMiduXjzyGmO/PQBIgYhiR9Xp YA9/VAdFAtP3MYZqRCvrP/zj0zOGHw3eX/XDGrE2xhSEU3qETzHSVZMYaxu1L73AJ2MV Hu1dJslHbYnALFUXZ7rjlXP/sRCAYoUUL/ZjTW2JgRvtFIDIa4HnjN+7zybjjh9fj4Gx hHIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pCvHtF+40Glt3Bv9Iyk8N8miJWiTjlU3gtrIimUwN1w=; b=kc+gxmmSVIHTFTHdCqRePn/Ln5cMYAHeWxhFT1zsmC6igfk77LL//B426pD+RMu5nn 7cPcSTUuN08Tn5B4Wmx0lq9ijmkgQUy8DaJEM9RIVfVpq8tqCfQF4ecHb37lBjjm5kWU z2z7An8gfhqtXr28+9DBHoi+JWe1m9j1AlV00/SJCOmb6NDm0gH6+g1BOZaiLbORMWpo vw13f0igAyLtFlhpSV93ulPQKcy8w33MnKxkT1IfKhcryzPOaBXdzESnYd5eJLcC8AH/ giIjw+sBODf6JLvZq6Qtdoge70/CLUoeM18xQbwqIMsKqKFuPrOnKumP4wGDc4rSXfYn uTQg== X-Gm-Message-State: ABUngvcF+tETNO6K0QPC709Ux3I+pvJXiWbrTs0UBiybxEc+n8S/FopabKcNtzDnxd4CoA== X-Received: by 10.194.248.43 with SMTP id yj11mr19233413wjc.81.1479129289895; Mon, 14 Nov 2016 05:14:49 -0800 (PST) Received: from localhost.localdomain ([84.203.71.247]) by smtp.gmail.com with ESMTPSA id b7sm11616886wjm.39.2016.11.14.05.14.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Nov 2016 05:14:49 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Mon, 14 Nov 2016 13:14:15 +0000 Message-Id: <20161114131418.11876-1-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 Subject: [PATCH (RESEND) v2 0/3] MdeModulePkg/EbcDxe: add EBC Debugger X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 13:14:47 -0000 Hi, This is v2 of a patchset to add the EBC Debugger back into EDK2. Notes regarding this updated version are as follows: 0. You can find a github repo with this series of patch at: https://github.com/pbatard/edk2/tree/EbcDebugger_v2 (patches at https://github.com/pbatard/edk2/commits/EbcDebugger_v2) 1. The series was broken down in 3 parts, with: - changes that impact the existing driver code (1/3) - changes that introduce the debugger code (2/3) - changes related to factorizing and cleaning up the EBC headers (3/3) 2. This version introduces EbcDebuggerHook.c which contains the null version of the Debugger hooks, which enables keeping EBC driver compilation as it was, and avoids the use of a macro or Pcd for the debugger compilation. Note that I preferred to go with 'EbcDebuggerHook.c' rather than 'EbcDebuggerHookNull.c', as I think it fits better with 'EbcDebuggerHook.h' and the comments in the header make it very explicit that this only contains the null version of the hooks. 3. Because a version is used by both the debugger and the driver, the prototype for EbcDebugSignalException() was also moved from EbcInt.h to EbcDebuggerHook.h 4. I chose to move the definitions that relate to the EBC VM into EbcVmTest.h and the rest (opcode related) to Ebc.h, as I think it made more sense. On a semi related note, I think that, at some stage, we should rename (or split) EbcVmTest.h because it is confusing as it's not used for testing only (all the EBC VM implementations use that file for the private EBC VM structure). But of course, that is something that is better done outside of this patch series. Regards, /Pete Pete Batard (3): MdeModulePkg/EbcDxe: prepare support for EBC Debugger MdeModulePkg/EbcDxe: add EBC Debugger MdeModulePkg/EbcDxe: reorganize EBC header definitions MdeModulePkg/Include/Protocol/EbcVmTest.h | 36 + MdeModulePkg/MdeModulePkg.dsc | 3 +- MdeModulePkg/Universal/EbcDxe/AArch64/EbcSupport.c | 3 + MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf | 120 + MdeModulePkg/Universal/EbcDxe/EbcDebugger.uni | 24 + MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c | 659 +++++ MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.h | 58 + .../Universal/EbcDxe/EbcDebugger/EdbCmdBranch.c | 336 +++ .../Universal/EbcDxe/EbcDebugger/EdbCmdBreak.c | 327 +++ .../EbcDxe/EbcDebugger/EdbCmdBreakpoint.c | 614 +++++ .../Universal/EbcDxe/EbcDebugger/EdbCmdExtIo.c | 219 ++ .../Universal/EbcDxe/EbcDebugger/EdbCmdExtPci.c | 186 ++ .../Universal/EbcDxe/EbcDebugger/EdbCmdGo.c | 93 + .../Universal/EbcDxe/EbcDebugger/EdbCmdHelp.c | 86 + .../Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c | 683 +++++ .../Universal/EbcDxe/EbcDebugger/EdbCmdQuit.c | 50 + .../Universal/EbcDxe/EbcDebugger/EdbCmdRegister.c | 136 + .../Universal/EbcDxe/EbcDebugger/EdbCmdScope.c | 123 + .../Universal/EbcDxe/EbcDebugger/EdbCmdStep.c | 198 ++ .../Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c | 952 +++++++ .../Universal/EbcDxe/EbcDebugger/EdbCommand.c | 680 +++++ .../Universal/EbcDxe/EbcDebugger/EdbCommand.h | 106 + .../Universal/EbcDxe/EbcDebugger/EdbCommon.h | 251 ++ .../Universal/EbcDxe/EbcDebugger/EdbDisasm.c | 1907 ++++++++++++++ .../Universal/EbcDxe/EbcDebugger/EdbDisasm.h | 42 + .../EbcDxe/EbcDebugger/EdbDisasmSupport.c | 1461 +++++++++++ .../EbcDxe/EbcDebugger/EdbDisasmSupport.h | 241 ++ .../Universal/EbcDxe/EbcDebugger/EdbHook.c | 1003 ++++++++ .../Universal/EbcDxe/EbcDebugger/EdbHook.h | 27 + .../Universal/EbcDxe/EbcDebugger/EdbSupport.h | 240 ++ .../Universal/EbcDxe/EbcDebugger/EdbSupportFile.c | 415 +++ .../EbcDxe/EbcDebugger/EdbSupportString.c | 991 ++++++++ .../Universal/EbcDxe/EbcDebugger/EdbSupportUI.c | 708 ++++++ .../Universal/EbcDxe/EbcDebugger/EdbSymbol.c | 2669 ++++++++++++++++++++ .../Universal/EbcDxe/EbcDebugger/EdbSymbol.h | 128 + MdeModulePkg/Universal/EbcDxe/EbcDebuggerExtra.uni | 17 + MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.c | 156 ++ MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.h | 136 + MdeModulePkg/Universal/EbcDxe/EbcDxe.inf | 4 +- MdeModulePkg/Universal/EbcDxe/EbcExecute.c | 39 + MdeModulePkg/Universal/EbcDxe/EbcExecute.h | 198 -- MdeModulePkg/Universal/EbcDxe/EbcInt.c | 6 + MdeModulePkg/Universal/EbcDxe/EbcInt.h | 29 - MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c | 7 +- MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c | 9 +- MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c | 7 +- MdePkg/Include/Protocol/Ebc.h | 171 ++ 47 files changed, 16319 insertions(+), 235 deletions(-) create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger.uni create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBranch.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreak.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreakpoint.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdExtIo.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdExtPci.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdGo.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdHelp.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdQuit.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdRegister.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdScope.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdStep.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommon.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportFile.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.h create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebuggerExtra.uni create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.c create mode 100644 MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.h -- 2.9.3.windows.2