Byte Alignment Check
The tool checks the byte alignment of structure variables in the source code.
Prerequisites
You have logged in to the Kunpeng DevKit.
- /opt is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
- On the WebUI, this feature requires uploading the files or compressed package. In the IDE, the tool plugin can scan local projects. If the source code is included in a compressed package, decompress the package and select the decompressed folder.
Procedure
- On the left pane of the page, choose Affinity Analyzer > Byte Alignment Check and click
to create a task. See Figure 1.
Table 1 Parameter description Parameter
Description
Task Name
A task name is automatically generated by default, which can be modified as required.
Source File Path
Set this parameter using either of the following methods:
- Enter the absolute path of the source file.
- Click Select Folder on the right and select the folder for storing the source file.
Build Tool
Build tool to be used. The options are:
- make
- CMake
- automake
Compile Command
Command to be used to compile the source code.
The compile command varies according to the build tool configuration file. For details, see Identifying Compile Commands Using the Build Tool Configuration File.
- Click Check. After the check is complete, the check report page is displayed. See Figure 2.
Click the View Suggested Source Code tab to switch to the alignment check result page. See Figure 3.
- The tool supports concurrent running of multiple byte alignment check tasks.
- To cancel a task, click Close during the task running process.
- Only one of the 64-bit mode check and byte alignment check can be performed by a user at a time.
- If you use shortcut keys to modify the source code, pay attention to shortcut key conflicts caused by the input method or IDE environment.
- The analysis result may vary according to the environment, which is normal.
- If the scan result does not match the code, macro expansion may be involved.
- If the system displays a message indicating that the task times out, rectify the fault by following instructions in Task Timed Out.
Parent topic: Affinity Analyzer


