Skip to content

Front-ends and modes in symtab2gb #6223

@martin-cs

Description

@martin-cs

I don't yet have a reproducer for this issue but it seems that there is a design / architectural problem.

  1. symtab2gb only loads the json_symtab language:

    register_language(new_json_symtab_language);

  2. It calls linking. The error reporting of linking calls from_type which uses the mode of the symbol:
    linkingt::copy_symbols
    linkingt::duplicate_non_type_symbol
    linkingt::duplicate_code_symbol
    linkingt::detailed_conflict_report
    linkingt::detailed_conflict_report_rec
    linkingt::type_to_string_verbose
    from_type

  3. At the moment having the mode as anything other than "json_symtab" will result in an invariant failure.

So, potential work-arounds or solutions:

  • Set the mode of all inputs using this interface to "json_symtab" ( paging @danielsn for the connection to RFC: Language mode for Rust  #6219 ).
  • Add the C language interface to symtab2gb and set the mode to ID_C (as it is at the moment).
  • Create modes for the various languages using this front-end and load all of them.

( See also #6219 (comment) )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions