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.

Free-form C structure entry mechanism

See original GitHub issue

Before closing #4229 there was a small discussion about adding a C-struct text mode editor that would make it easier to copy-paste and duplicate chunks between elements and in and out of the program.

There @ghidra1 said that the team had brainstormed about it in the past.

Personally, I think the all-or-nothing way one has to import and export all their existing headers/types in one go can be severely improved or complemented. When importing you need to do a lot of prepping and dial-tuning, checking that it isn’t in read-write mode, and even if it succeeds it replaces the whole data block so you essentially need to move the imported data somewhere after the import and use a dummy/transient/disposable one for staging (in the likely case you are doing it in pieces).

Sometimes I change the enum or struct externally and it would be painless to do a direct copy-paste. Or the other way around, exporting small pieces of fields, or cloning them between data types, as well as quickly refactor in Ghidra by moving them around. It would make things more interoperable.

There is already something very similar for function signatures, and it works very well, so I feel like this would improve everyone’s workflow.

Let me know what you think, and thanks for reading.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ghidra1commented, Jun 9, 2022

One of the biggest obstacles with using the C Parser for re-parsing Ghidra datatypes is the fact that our type naming is not C-compliant and in many cases can drag in namespace and template constructs that the C Parser can not handle. In addition, the C Parser can not be used for manipulating non-packed Ghidra structures which are frequently incomplete in their definition and precise with component placement (i.e., component offsets).

1reaction
mumbelcommented, Jul 28, 2022

@emteere Do you foresee this being incorporated into structure merges (update/commit to archive and in VT) or just creation/editing? Hopefully somewhat the same logic and its just a matter of squeezing into the UI once the hard part is done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FreeForm User's Guide - National Geophysical Data Center
The FreeForm Data Access System comprises a format description mechanism, a library of C func- tions, object-oriented constructs for data structures, ...
Read more >
Freeform Assembly Planning - arXiv
The assembly planner allows the freeform process to be applied to arbitrarily complex parts, with applications ranging from tissue engineering and microfluidics.
Read more >
Manufacturing and measurement of freeform optics
Freeform surfaces can be defined as surfaces with no axis of rotational invariance (within or beyond the part). Freeform.
Read more >
Three-dimensional printing of complex biological structures by ...
Here, we report the development of a 3D bioprinting technique termed freeform reversible embedding of suspended hydrogels (FRESH). FRESH uses a thermoreversible ...
Read more >
Freeform Rigid-Foldable Structure using Bidirectionally Flat ...
A polyhedral surface composed of rigid facets connected by rotational edges forms a kinetic mechanism: a rigid folding mechanism. Several collapsible structures ...
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