-
|
I am dealing with a binary that has its own string encoding. It's basically a sequence of 16 bits characters (but can also contain formatting information) and it ends with 2 bytes: the first is the length and the second is a terminator being 0x80. Obviously, I would need to do some scripting for me to add a type such that ghidra can show me the string in a pretty way, but I would like to know how I could go about doing that? Ghidra's unsized types appears to be handled specifically for them (cause I can't create an unsized type). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Are you looking for them to be properly represented as a string in the decompiler or just in the listing? For the decompiler the short answer is you can't (as far as I know). I think you can in the listing with a |
Beta Was this translation helpful? Give feedback.
Are you looking for them to be properly represented as a string in the decompiler or just in the listing? For the decompiler the short answer is you can't (as far as I know). I think you can in the listing with a
DynamicDataTypeif there isn't a direct solution for a string. I don't have the documentation in front of me do take this loosely. You should be able to override the methods forgetComponentsand forgetValueto achieve what you want. At least I think. If I can remember I'll take a look tonight if you don't get a response from someone who knows better.