GithubHelp home page GithubHelp logo

Comments (2)

sylvestre avatar sylvestre commented on May 19, 2024

@igalex Doesn't seem fix to me.
With this line:

        "command": "gcc -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -E -MM -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DU_CHARSET_IS_UTF8 -I/home/sylvestre/dev/mozilla/ff/mozilla-inbound/intl/icu/source/common -I/home/sylvestre/dev/mozilla/ff/mozilla-inbound/intl/icu/source/i18n -ffunction-sections -fdata-sections -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -I/home/sylvestre/dev/mozilla/ff/mozilla-inbound/intl/icu/source/common -DDEFAULT_ICU_PLUGINS=\"/usr/local/lib/icu\"\  /home/sylvestre/dev/mozilla/ff/mozilla-inbound/intl/icu/source/common/icudataver.c",

codechecker is failing with:

  File "/home/sylvestre/dev/mozilla/codechecker/codechecker_package/CodeChecker/cc_lib/python2.7/codechecker_lib/log_parser.py", line 78, in parse_log
    actions = parse_compile_commands_json(logfile)
  File "/home/sylvestre/dev/mozilla/codechecker/codechecker_package/CodeChecker/cc_lib/python2.7/codechecker_lib/log_parser.py", line 26, in parse_compile_commands_json
    data = json.load(logfile)
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Invalid \escape: line 3202 column 782 (char 466173)

[ERROR] - Invalid \escape: line 3202 column 782 (char 466173)
`̀``

from codechecker.

joaobortotcadore avatar joaobortotcadore commented on May 19, 2024

I have the same problem when I load the compile_commands.json generated by espressif/idf:v4.4.1. And I suspect it's because of those escape backslashes (\)

ESP-IDF adds these \\\:
-DMBEDTLS_CONFIG_FILE=\\\"mbedtls/esp_config.h\\\"

Expanded section:
"command": "/opt/esp/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\\\"mbedtls/esp_config.h\\\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -I/opt/esp/idf/comp>

I haven't tried it yet, but if single quotes solve the problem, with SED you could replace the \\\ by '

from codechecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.