Menu

Generation of the dump file in a different folder

2021-11-26
2025-02-07
  • Simone Gasparella

    Hi forum ,

    I am currently using the following command

    cppcheck --dump inverter.c

    I see that the relative dumped file is generated in the same folder of the file inverter.c

    How is possible to generate the dumped file in a different folder?

    Please let me know .

    Thanks

     
  • Daniel Marjamäki

    If addons are executed in the GUI we create the dump files in the cppcheck build dir.

    However the cli does not do that. I think it's unfortunate. Will see what we can do about it.

     
  • Mikael Heden

    Mikael Heden - 2025-01-24

    This would be a great feature, I like to build in a separate out directory and right now the dump files "pollutes" the source tree. Either a --dumpdir or a --dumpprefix flag would be very useful. Or maybe use the already existing --cppcheck-build-dir for this?

    Thanks!

     
    • Daniel Marjamäki

      is this when you use --dump or --addon ? I think recommendation should overall be to use --addon .
      If --addon is used I think it would be preferable to use temporary files. I think I made a ticket but haven't had time to look into that yet.

       
  • Mikael Heden

    Mikael Heden - 2025-02-05

    With --addon together with --cppcheck-build-dir it seem to be putting the dump files in the build folder.

    The only drawback I can see is that the folder structure is not preserved in the build-dir (i.e. all files ends up in the root).

     

    Last edit: Mikael Heden 2025-02-05
  • Oliver Stöneberg

    We also encounter this issue in the addon Python tests. See https://trac.cppcheck.net/ticket/13366.

     

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.