Comments (4)
Thank you for the feedback!
I'm curious about your scenario: you are using DbgShell from C#? (I tried to write DbgProvider.dll with the idea that one might want to do that, but I haven't really ever done it save from within DbgShell itself)
In this case, that function is pretty much a straight pass-through to dbgeng. I could scrape through IDebugRegisters.GetPseudoIndexByNameWide
and then make an Enum based on the list of names I got, but I believe the set of names may be different for each target platform. We could just include all the names in the enum, and you're just out of luck if you ask for a name that doesn't exist for your target. But since you have to have special understanding of your target platform to use such an Enum correctly, I don't think it's much improvement over using a magic string. In fact, requiring one to use a special string helps emphasize this. So I'm not convinced this is really worth doing. What do you think?
And you could also write your own wrapper function with your own enum.
from dbgshell.
If you mean as a standalone application, I am but basically just as a prototyping aid. But I am prototyping C# Cmdlets, so similar to what DbgShell itself does.
My main objection to the magic strings is that they lack discoverability - you have to be familiar with DbgEng supports to consume them at all. A secondary concern is that they have been chosen favoring brevity over clarity; .ProcessEnvironmentBlock
is going to be much easier for one of my coworkers less familiar with this to understand than $peb
.
However, after thinking on your target platform comment, I realized that $peb
and $teb
are quite a bit different from the other registers in that DbgShell requires ntdll symbols to handle them. Maybe it would be better to have GetDbgPsuedoRegisterInfo return just the addresses for them and offer a different option to get the full typed objects?
from dbgshell.
Maybe it would be better to have GetDbgPsuedoRegisterInfo return just the addresses for them and offer a different option to get the full typed objects?
The raw info is available in the DEBUG_VALUE
property... Another option is to just expose GetValueFromRawValue()
(it's currently marked protected
) (and maybe rename it). There is also a ValueAsPointer
property... but I believe it is broken for strongly-typed pseudo registers. :/
from dbgshell.
As per my pull request, it has to be the "offer a different option" route - $peb
and $teb
do not do what I need because they always return the 64-bit peb/teb for WoW64 dumps, and I need the 32-bit peb.
from dbgshell.
Related Issues (20)
- Integrate with C#? HOT 1
- Integrate capstone (or something) as the disassembler HOT 4
- Use ClrMd to synthesize a DbgModuleInfo for managed modules
- Add Output Decolorizer/No color option HOT 4
- Read-DbgDisassembly doesn't resolve Address from Piped Get-DbgSymbol HOT 3
- Unhandled Exception: System.Exception: Could not load dbgeng.dll on Win7. HOT 2
- Skinny Null Terminated String Functions Don't Allow Partial Reads HOT 3
- Enhancement: dps but with recursive safe pointer following HOT 2
- PEB not included in process level namespace HOT 1
- EnumerateLIST_ENTRY doesn't work HOT 5
- AltPropertyColumn Displays null as $null rather than blank HOT 2
- Memory Search HOT 6
- AddressTransformation integer handling does the opposite of what it is supposed to HOT 2
- Trying to access an element of a `Span<byte>` throws a VerificationException HOT 2
- Can't pipeline directory contents to Mount-DbgDumpFile HOT 9
- DbgHelp is slow and other symbol "fun" HOT 2
- Formatting: Format-Table et al need to handle -Property HOT 1
- Need some rails to prevent dbgeng-unsupported scenarios like mixed dump + live proc
- captured stdout output is garbled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbgshell.