question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is your feature request related to a problem? Please describe. I’m always frustrated when I need to change the base DataType for a TypeDef and can’t readily do so.

Describe the solution you’d like An editor window to edit the TypeDef like there is for composites and function signatures.

Describe alternatives you’ve considered Opening the python interpreter, creating a new TypeDefDataType to the new base type and using DataType.replaceWith. This gets old pretty quick.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dragonmachercommented, Aug 22, 2022

Relates to #3113

1reaction
astrelskycommented, Oct 13, 2022

@ghidra1 if I understand correctly, DataTypeManager.replaceDataType will iterate over all datatypes, find which ones contain said typedef and replace the usage of the old typedef with the new one? I most certainly don’t want to iterate over a few million types which are using a poorly typed uint64_t that ended up 4 bytes and replace each uint64_t with a new one. It is much better to correct the existing uint64_t and make only one change.

I really do hate to be like this, and I would never share it, but if the replaceWith method is removed my next approach would be to write a script to alter the DatabaseObject directly and swap the underlying type. (Don’t try that at home kids, I’m a professional. A professional idiot maybe, but a professional nonetheless)

The case with poorly typed fixed size integers is really the only consistent use case for modifying a typedef. That being said it does make sense for them to be immutable; it’s just really painful for the edge cases where you need it to be mutable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

typedef specifier - cppreference.com
[edit] Explanation. The typedef specifier, when used in a declaration, specifies that the declaration is a typedef declaration rather than a ...
Read more >
typedef command - IBM
Or you can use a selected editor tool for objects of a specific type. ... Use the ccm typedef command to create file-based...
Read more >
Typedef - MATLAB & Simulink - MathWorks
Create data type aliases by generating typedef statements. ... In the Model Data Editor, open the Inports/Outports tab. 4. From the Change View...
Read more >
010 Editor Manual - Data Types, Typedefs, and Enums
Support for a number of different data types is built into 010 Editor. These data types are ... Other data types can be...
Read more >
Typedef TemplateDefinition (ui/template ... - CKEditor
CKEditor 5 API Documentation. The Typedef TemplateDefinition. A definition of the Template. It describes what kind of node a template will render (HTML ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found