You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that each time I open a C file in the Ripes GUI, after I save it and open it again, the same file appears in the Source Code section of the Editor tab, but the Input Type is always set to Assembly.
The Ripes.config file, which saves the settings of Ripes, contains the parameter input_type which stores an integer representing an element of the enumeration:
/** Executable files not compiled from within ripes */
ExternalELF,
/** Executable files compiled within ripes */
InternalELF
};
When I close the simulator with a C file open in the editor tab, the field input_type = 1 is saved in the Ripes.config, indicating that the last opened file (whose source code is in the sourcecode field of the Ripes.config file) was a C file.
The problem is the next time Ripes is opened, that value is changed in input_type = 0, which means that the file is always considered an Assembly.
Looking at the code, the option input_type is modified by the method EditTab::sourceTypeChanged() and is set as follows:
I have noticed that each time I open a
C
file in the Ripes GUI, after I save it and open it again, the same file appears in the Source Code section of the Editor tab, but the Input Type is always set toAssembly
.The Ripes.config file, which saves the settings of Ripes, contains the parameter
input_type
which stores an integer representing an element of the enumeration:Ripes/src/assembler/program.h
Lines 17 to 28 in 8780873
When I close the simulator with a
C
file open in the editor tab, the fieldinput_type = 1
is saved in the Ripes.config, indicating that the last opened file (whose source code is in thesourcecode
field of the Ripes.config file) was aC
file.The problem is the next time Ripes is opened, that value is changed in
input_type = 0
, which means that the file is always considered anAssembly
.Looking at the code, the option
input_type
is modified by the methodEditTab::sourceTypeChanged()
and is set as follows:Ripes/src/edittab.cpp
Lines 255 to 276 in 8780873
So when opening the simulator the input type is set as default as
m_ui->setCInput
has not been checked yet.In the EditTab constructor before the
m_ui
are toggled the following methods are called:Ripes/src/edittab.cpp
Lines 112 to 113 in 8780873
Those methods (that have a direct or indirect call to the method
sourceTypeChanged()
) change the input type toAssembly
.I suppose that those methods should not modify the input type, as it should be done in the constructor a few lines after:
Ripes/src/edittab.cpp
Lines 127 to 139 in 8780873
My proposal for the problem:
switch
to set the input type in the line following the statement to set the source code in the editor:The text was updated successfully, but these errors were encountered: