WindhoverLabs / juicer

5 stars 0 forks source link

typedef'd Types Do Not Work At The Moment #2

Open lorenzo-gomez-windhover opened 3 years ago

lorenzo-gomez-windhover commented 3 years ago

At the moment, types such as typedef int16 my_int do not work. We will invistigate this issue in the future, however, it is not a priority at the moment. Beware typdef'd structs DO work at the moment; it appears to be a problem specific to typdef'd intrinsic types.

mVanSteen commented 7 months ago

Hello, I was wondering if there was any update since this issue was opened ?

I will add that the some typedef with struct do not work either :

Thank you for the help

lorenzo-gomez-windhover commented 7 months ago

@mVanSteen This issue is a bit misleading (sorry about that; sometimes I write these as notes and forget to close them!). I believe this should answer your question:https://github.com/WindhoverLabs/auto-yamcs/issues/79#issuecomment-1843149110

Please let me know if you run into any issues.

mVanSteen commented 7 months ago

Okay, thank you very much for the clarification. If I understand correctly, there is no way to avoid type_remaps in the case of typedefs (or at least automate the process). Once again thank you very much for all the work you have done, saving us a tremendous amount of time

lorenzo-gomez-windhover commented 7 months ago

Okay, thank you very much for the clarification. If I understand correctly, there is no way to avoid type_remaps in the case of typedefs (or at least automate the process).

Apologies for taking so long to reply.

~Yes, at the moment this is the case. And a lot of it comes down to scoping juicer.~ The way we get these bit patterns is from the DWARF4 standard and the spec is gigantic so we didn't want to spend years and years implementing all the possible types in DWARF (this gets worse with a language like C++ which has all kinds of fancy/complicated features like inheritance). We scoped it to the needs of something like CFS, which satisfies our needs just fine. But please don't let this discourage you from reporting any other edge cases you come across. Always love to hear (and if time allows, look for solutions) about issues people using these tools run into.

Hopefully this clarifies any confusion.

lorenzo-gomez-windhover commented 7 months ago

Sorry, misunderstood the issue here... The following struct should work if you give it to Juicer:

typedef struct CFE_ES_FileNameCmd_Payload
{
    char FileName[CFE_MISSION_MAX_PATH_LEN]; 
} CFE_ES_FileNameCmd_Payload_t;

It'll really help, if possible, if I could look at the ouput sqlite file that you generated from your binaries.