Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lorenzo-gomez-windhover opened this issue Oct 2, 2020 · 5 comments
Open

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

lorenzo-gomez-windhover opened this issue Oct 2, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@lorenzo-gomez-windhover
Copy link
Collaborator

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.

@lorenzo-gomez-windhover lorenzo-gomez-windhover added the bug Something isn't working label Oct 2, 2020
@mVanSteen
Copy link

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 :

  • Typedef referring directly to another struct
    for example with the line
    typedef CFE_ES_NoArgsCmd_t CFE_ES_NoopCmd_t;
    CFE_ES_NoopCmd_t will have no declared fields
  • Typedef where the struct was named
    for example with the lines
typedef struct CFE_ES_FileNameCmd_Payload
{
    char FileName[CFE_MISSION_MAX_PATH_LEN]; 
} CFE_ES_FileNameCmd_Payload_t;

CFE_ES_FileNameCmd_Payload_t will have no declared fields

Thank you for the help

@lorenzo-gomez-windhover
Copy link
Collaborator Author

lorenzo-gomez-windhover commented Feb 1, 2024

@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:WindhoverLabs/auto-yamcs#79 (comment)

Please let me know if you run into any issues.

@mVanSteen
Copy link

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
Copy link
Collaborator Author

lorenzo-gomez-windhover commented Feb 16, 2024

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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants