Author Topic: Build log parser  (Read 8405 times)

Offline mall

  • Single posting newcomer
  • *
  • Posts: 2
Build log parser
« on: July 26, 2017, 01:55:39 pm »
Hello,

I am facing problem that my cross compiler is generating slightly different format of warning/error messages therefore they are not properly converted to Build messages.

Similar problem is if I would like to use PC lint to parse standard build output.

I could not find if there is already possibility to setup some rules or I have to write plugin for it. Also if the plugin have to be written in C++ or can be done as Squirrel script.

Thank you for any help/direction how to start, which module is responsible for it.

Best
Richard

Offline mall

  • Single posting newcomer
  • *
  • Posts: 2
Re: Build log parser
« Reply #1 on: July 26, 2017, 04:00:22 pm »
I wonder if content of file /share/CodeBlocks/compilers/options_common_re.xml has something with it.

Code
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler_options>
<CodeBlocks_compiler_options>
    <RegEx name="Fatal error"
           type="error"
           msg="1">
        <![CDATA[FATAL:[ \t]*(.*)]]>
    </RegEx>
    <RegEx name="'In function...' info"
           type="info"
           msg="2"
           file="1">
        <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t]+([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)]]>
    </RegEx>
    <RegEx name="'Skipping N instantiation contexts' info (2)"
           type="info"
           msg="3"
           file="1"
           line="2">
        <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
    </RegEx>

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7679
    • My Best Post
Re: Build log parser
« Reply #2 on: July 26, 2017, 05:12:27 pm »
Hello,

I am facing problem that my cross compiler is generating slightly different format of warning/error messages therefore they are not properly converted to Build messages.


It it parsed using Reg Expressions; look at the Advanced Compiler Setting to adjust the values used.

Settings -> Compiler
Far right Tab "Other Settings"
Button "Advanced Options"
Tab "Output Parsing"

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org