Menu

The cppcheck --dump function generates a large dump file.

zhouming
2022-02-11
2022-02-14
  • zhouming

    zhouming - 2022-02-11

    I use cppcheck dump function to generate dump file and find that some of dump file has a huge file size, so I want to ask that if it could be optimized.
    I tested "nr_polar_kronecker_power_matrices.c" file from "https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop" project, and got a huge file size(1.12GB), please see the attachment png file.

     
  • Daniel Marjamäki

    what command did you use? is there several preprocessor configurations?
    it is expected that the dump file is much larger than the source file that can't be avoided.
    but well the dump file format was not designed to minimise disk usage. technically it could certainly be minimised. but I want to keep it easy to read and parse also. For instance, it is xml-based and that is not very optimal for disk usage but it's easy to use.

     
    • zhouming

      zhouming - 2022-02-14

      My command is :
      cppcheck -f --language=c++ --dump source_file
      thanks~

       
  • zhouming

    zhouming - 2022-02-14

    My command is :
    cppcheck -f --language=c++ --dump source_file
    thanks~

     
    • Daniel Marjamäki

      if you have a problem with file source I would suggest that you check a proper compile configuration. Can you generate a compile_commands.json file in any way? Do you use Make/CMake/..?
      If you generate that you can use --project=compile_commands.json and then the dump files should be a lot smaller.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.