Code Monkey home page Code Monkey logo

Comments (11)

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

Failed to load MI Debugger:Dwarf Error: wrong unit_type in
compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) [in module/build/.cache/bazel/_bazel_vscode/-2d35de14639eaad1ac7060a4dd7e3351/execroot/envoy/bazel-out/k8- dbg/bin/source/exe/_objs/envoy_main_entry_lib/main.pic.dwo](from file-exec-and-symbols "/build/.cache/bazel/_bazel_vscode/-2d35de14639eaad1ac7060a4dd7e3351/execroot/envoy/bazel-out/k8- dbg/bin/source/exe/envoy-static")

from envoy.

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

How can I fix this error?

from envoy.

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

image

from envoy.

wbpcode avatar wbpcode commented on September 24, 2024

could you try the lldb? Seems that the current build flags is not friendly to the gdb.

from envoy.

wbpcode avatar wbpcode commented on September 24, 2024

cc @phlax @keith

from envoy.

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

could you try the lldb? Seems that the current build flags is not friendly to the gdb.

@wbpcode I tried debugging with lldb, but it causes a spike in my Docker CPU usage, eventually leading to unresponsiveness in Docker.

from envoy.

phlax avatar phlax commented on September 24, 2024

gcc version could be a factor (from reading this https://sourceware.org/bugzilla/show_bug.cgi?id=27354)

what version are you testing with? is it >= 11.1 ? is it the gcc in the envoy build container - which i think is 11.4?

from envoy.

wufanqqfsc avatar wufanqqfsc commented on September 24, 2024

Seems it works in our local env.

1.VScode configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Envoy",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bazel-bin/source/exe/envoy-static",
"args": ["-c", "path/to/your/envoy.yaml"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

2.Make sure GDB was installed on your host.
I faced the same "MIDebuggerPath" issue. But after re-install the gdb , vscode debug works well.

from envoy.

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

gcc version could be a factor (from reading this https://sourceware.org/bugzilla/show_bug.cgi?id=27354)

what version are you testing with? is it >= 11.1 ? is it the gcc in the envoy build container - which i think is 11.4?

image
@phlax Thank you. I think this is the reason for the error. However, this image is provided by Envoy. I hope you can fix this issue. I will fix it in my local image first.

from envoy.

phlax avatar phlax commented on September 24, 2024

However, this image is provided by Envoy.

i suspect you need to rebuild your vscode env or similar - the current Envoy image contains gcc 11.4

from envoy.

ShenFeng312 avatar ShenFeng312 commented on September 24, 2024

image
image
After upgrading gdb to 11.2, this issue has been resolved. Thanks everyone for your help.
@phlax @wbpcode @wufanqqfsc

from envoy.

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.