-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghidra TTD fails with "NameError: name 'dbgmodel' is not defined" #7940
Comments
|
@MichaelEbert Do you have the latest version of pybag installed? |
I have tried with pybag Version: 2.2.13 and pybag 2.2.15. Same error with both. |
Actually, I guess that might not be relevant - apologies. This logic has recently changed, and bouncing between the two means I’m frequently adled. There are better(-ish) directions here: https://github.com/d-millar/ghidra-debugger-how-to/blob/main/tips/using_pyttd.md Let me know if these don’t help. You may also want to consider downloading and building the latest from master, as the dependency on pyttd has been removed, and the newer code is cleaner. New launcher is local-dbgeng-trace. Still bear in mind this code is under active development. |
I will try building master. |
Cool - let us know if you have issues. I will take a stab at running your exact setup tomorrow to see if I can recreate your error. It does certainly look like dbgmodel is undefined. Possibly untested, given it’s in the exception block, but I would have expected that to have been hit after least once. |
@MichaelEbert So, re-running with 11.3.1, there does appear to be a bug in the code, but I'm not sure it relates directly to what you're seeing. In particular, the file Ghidra\Debug\Debugger-agent-dbgeng\pypkg\src\ghidrattd\methods.py has a half dozen of so references to "@util.dbg.eng_thread" copied from ghidradbg\methods.py that should not be in there. (ghidrattd's util.py has no dbg.) Those lines, all of which appear as annotations on method definitions, can be deleted. After deleting them, I was able to run successfully. That said, this seems unrelated to the undefined "dbgmodel" reference. If you have moved successfully to the version in master, I would stick with that, but, if you still are looking to get the 11.3.1 version working, I would (a) check the pyttd install per the reference above, and (b) see if the 'normal' dbgeng agent it working correctly with "dbgmodel" selected in the the dialog. Also, what version of python are you running and is that a match for the version used in pyttd? |
Looks like 11.4 solved the issue! |
Excellent - glad to hear! |
Describe the bug
dbgmodel is not defined.
To Reproduce
Open debugger.
File->Open->xyz.exe
Debugger->Configure and launch xyz using...->ttd
python command:
python
Trace(.run):
H:\reverse eng\xyz\dumps\xyz.run
Arguments:
use dbgmodel: [x]
path to dbgeng:
H:\reverse eng\ttd
Expected behavior
no errors
Screenshots
If applicable, add screenshots to help explain your problem.
Attachments
Environment (please complete the following information):
C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2502.25002.0_x64__8wekyb3d8bbwe\amd64
Additional context
dlls in H:\reverse eng\ttd:
H:\reverse eng\ttd\CredentialProviders\GCMW\DbgCredentialProvider_gcmw.dll
H:\reverse eng\ttd\ttd\wow64\TTDAnalyze.dll
H:\reverse eng\ttd\ttd\wow64\TtdExt.dll
H:\reverse eng\ttd\ttd\wow64\TTDLoader.dll
H:\reverse eng\ttd\ttd\wow64\TTDRecord.dll
H:\reverse eng\ttd\ttd\wow64\TTDRecordCPU.dll
H:\reverse eng\ttd\ttd\wow64\TTDReplay.dll
H:\reverse eng\ttd\ttd\wow64\TTDReplayCPU.dll
H:\reverse eng\ttd\ttd\TTDAnalyze.dll
H:\reverse eng\ttd\ttd\TtdExt.dll
H:\reverse eng\ttd\ttd\TTDLoader.dll
H:\reverse eng\ttd\ttd\TTDRecord.dll
H:\reverse eng\ttd\ttd\TTDRecordCPU.dll
H:\reverse eng\ttd\ttd\TTDReplay.dll
H:\reverse eng\ttd\ttd\TTDReplayCPU.dll
H:\reverse eng\ttd\winext\chakra\ChakraCore.dll
H:\reverse eng\ttd\winext\chakra\JsProvider.dll
H:\reverse eng\ttd\winext\sos\extensions\Microsoft.Diagnostics.DataContractReader.dll
H:\reverse eng\ttd\winext\sos\extensions\Microsoft.Diagnostics.DataContractReader.Extension.dll
H:\reverse eng\ttd\winext\sos\extensions\Microsoft.Diagnostics.DebuggerCommands.dll
H:\reverse eng\ttd\winext\sos\Azure.Core.dll
H:\reverse eng\ttd\winext\sos\Azure.Identity.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Bcl.AsyncInterfaces.dll
H:\reverse eng\ttd\winext\sos\Microsoft.CSharp.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Diagnostics.DebugServices.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Diagnostics.DebugServices.Implementation.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Diagnostics.ExtensionCommands.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Diagnostics.NETCore.Client.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Diagnostics.Runtime.dll
H:\reverse eng\ttd\winext\sos\Microsoft.DiaSymReader.Native.amd64.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.DependencyInjection.Abstractions.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.DependencyInjection.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.Logging.Abstractions.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.Logging.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.Options.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Extensions.Primitives.dll
H:\reverse eng\ttd\winext\sos\Microsoft.FileFormats.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Identity.Client.dll
H:\reverse eng\ttd\winext\sos\Microsoft.Identity.Client.Extensions.Msal.dll
H:\reverse eng\ttd\winext\sos\Microsoft.IdentityModel.Abstractions.dll
H:\reverse eng\ttd\winext\sos\Microsoft.SymbolStore.dll
H:\reverse eng\ttd\winext\sos\sos.dll
H:\reverse eng\ttd\winext\sos\SOS.Extensions.dll
H:\reverse eng\ttd\winext\sos\SOS.Hosting.dll
H:\reverse eng\ttd\winext\sos\SOS.InstallHelper.dll
H:\reverse eng\ttd\winext\sos\System.Buffers.dll
H:\reverse eng\ttd\winext\sos\System.ClientModel.dll
H:\reverse eng\ttd\winext\sos\System.Collections.Immutable.dll
H:\reverse eng\ttd\winext\sos\System.CommandLine.dll
H:\reverse eng\ttd\winext\sos\System.ComponentModel.Annotations.dll
H:\reverse eng\ttd\winext\sos\System.Diagnostics.DiagnosticSource.dll
H:\reverse eng\ttd\winext\sos\System.IO.FileSystem.AccessControl.dll
H:\reverse eng\ttd\winext\sos\System.Memory.Data.dll
H:\reverse eng\ttd\winext\sos\System.Memory.dll
H:\reverse eng\ttd\winext\sos\System.Numerics.Vectors.dll
H:\reverse eng\ttd\winext\sos\System.Reflection.Metadata.dll
H:\reverse eng\ttd\winext\sos\System.Runtime.CompilerServices.Unsafe.dll
H:\reverse eng\ttd\winext\sos\System.Runtime.Loader.dll
H:\reverse eng\ttd\winext\sos\System.Security.AccessControl.dll
H:\reverse eng\ttd\winext\sos\System.Security.Cryptography.ProtectedData.dll
H:\reverse eng\ttd\winext\sos\System.Security.Principal.Windows.dll
H:\reverse eng\ttd\winext\sos\System.Text.Encodings.Web.dll
H:\reverse eng\ttd\winext\sos\System.Text.Json.dll
H:\reverse eng\ttd\winext\sos\System.Threading.Tasks.Extensions.dll
H:\reverse eng\ttd\winext\acxkd.dll
H:\reverse eng\ttd\winext\bthkd.dll
H:\reverse eng\ttd\winext\CLRComposition.dll
H:\reverse eng\ttd\winext\CrashpadComposition.dll
H:\reverse eng\ttd\winext\DbgEngCoreDMExt.dll
H:\reverse eng\ttd\winext\DbgModelApiXtn.dll
H:\reverse eng\ttd\winext\DbgShim.dll
H:\reverse eng\ttd\winext\dwarf.dll
H:\reverse eng\ttd\winext\ELFBinComposition.dll
H:\reverse eng\ttd\winext\ext.dll
H:\reverse eng\ttd\winext\GDBServerComposition.dll
H:\reverse eng\ttd\winext\gpiokd.dll
H:\reverse eng\ttd\winext\hidkd.dll
H:\reverse eng\ttd\winext\i3ckd.dll
H:\reverse eng\ttd\winext\jscript9diagdump.dll
H:\reverse eng\ttd\winext\JsProvider.dll
H:\reverse eng\ttd\winext\kext.dll
H:\reverse eng\ttd\winext\LinuxUserXtn.dll
H:\reverse eng\ttd\winext\MachOBinComposition.dll
H:\reverse eng\ttd\winext\Microsoft.Diagnostics.Analysis.Utilities.dll
H:\reverse eng\ttd\winext\NTSnapshotComposition.dll
H:\reverse eng\ttd\winext\OpenEnclaveComposition.dll
H:\reverse eng\ttd\winext\PEBinComposition.dll
H:\reverse eng\ttd\winext\rcdrkd.dll
H:\reverse eng\ttd\winext\RemoteSourceComposition.dll
H:\reverse eng\ttd\winext\SmFxDbg.dll
H:\reverse eng\ttd\winext\storagekd.dll
H:\reverse eng\ttd\winext\uext.dll
H:\reverse eng\ttd\winext\usb3kd.dll
H:\reverse eng\ttd\winext\usb4kd.dll
H:\reverse eng\ttd\winext\usbkd.dll
H:\reverse eng\ttd\winext\wdfkd.dll
H:\reverse eng\ttd\winxp\acpikd.dll
H:\reverse eng\ttd\winxp\exts.dll
H:\reverse eng\ttd\winxp\fltkd.dll
H:\reverse eng\ttd\winxp\kdexts.dll
H:\reverse eng\ttd\winxp\ks.dll
H:\reverse eng\ttd\winxp\minipkd.dll
H:\reverse eng\ttd\winxp\ndiskd.dll
H:\reverse eng\ttd\winxp\ntsdexts.dll
H:\reverse eng\ttd\winxp\nvkd.dll
H:\reverse eng\ttd\winxp\rpcexts.dll
H:\reverse eng\ttd\winxp\scsikd.dll
H:\reverse eng\ttd\winxp\wmiTrace.dll
H:\reverse eng\ttd\winxp\wow64exts.dll
H:\reverse eng\ttd\winxp\WudfExt.dll
H:\reverse eng\ttd\dbgcore.dll
H:\reverse eng\ttd\DbgCredentialProvider.dll
H:\reverse eng\ttd\dbgeng.dll
H:\reverse eng\ttd\dbghelp.dll
H:\reverse eng\ttd\dbgmodel.dll
H:\reverse eng\ttd\ExdiGdbSrv.dll
H:\reverse eng\ttd\msdia140.dll
H:\reverse eng\ttd\srcsrv.dll
H:\reverse eng\ttd\symsrv.dll
The text was updated successfully, but these errors were encountered: