-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't show variable value by p in gdb (DW_FORM_strp) #34109
Comments
@KBaichoo has been looking at debug symbol related things recently and may have some insight. |
Hi @KBaichoo , |
The major concern is that it can't show the content of *this |
See my PR here: #33942 for a brief overview on some debug symbols related stuff. I'd check that the section being referenced exists. I've ran into some issues of using newer toolchains with older gdb versions. |
hi @KBaichoo , BTW, which version of gdb and gcc works for you? |
neither of those versions look too old. I actually build with clang 14 (which is what CI is using) and use gdb FWIW I'm able to get the value printed as expected following your experiment:
And these are the segments I have from in the debug build:
In bazel-bin I have the following:
No |
Congratulations! |
hi @KBaichoo , cd /source; export PATH CC=clang CXX=clang++ && bazel build --define tcmalloc=debug -c dbg --copt=-Wno-unknown-warning-option --copt=-Wno-unused-but-set-variable --cxxopt=-Wno-unknown-warning-option --cxxopt=-Wno-unused-but-set-variable //source/exe:envoy hope it help! |
when I build envoy by "-c dbg", then run by gdb and try to check variable value and get below info
anything or path missed? and check below for details:
cd /source; export PATH bazel build -c dbg //source/exe:envoy
gdb /build/.cache/bazel/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/execroot/envoy/ba
zel-out/k8-dbg/bin/source/exe/envoy-static
b ConnectionImpl::onRead
run -l trace --concurrency 1 -c /tmp/sesDySecLCnoDEnvoy.yaml --log-path /tmp/envoy.log
p this->read_end_stream_
DW_FORM_strp pointing outside of .debug_str section [in module /build/.cache/bazel/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/execroot/envoy/bazel-out/k8-dbg/bin/source/exe/envoy-static]
thanks
Cliff
The text was updated successfully, but these errors were encountered: