>From the root of your workspace, “make build” will generate -g -o0 binaries…

> On Jul 22, 2021, at 8:56 AM, Ivaylo Handjiiski <ihandjii...@telco.com> wrote:
> 
> 
> Hello, 
> 
> I am trying to debug the VPP code using gdb but when I am examining or 
> printing variables most of them are <optimized out>.
> 
> I've built vpp with -O0 flags. I am using a vagrant vm as a building 
> environment and my build process is as follows:
> 
> make TAG=vpp_debug install-dep
> make TAG=vpp_debug pkg-deb
> 
> TAG=vpp_debug does not seem to be appropriate here, so I manually replaced 
> -O2 entries with -O0 in build-data/platforms/vpp.mk
> Then I send and install the newly created .deb files to my device running vpp 
> and start to debug locally using gdb's attach command.
> 
> Running "make pkg-deb" shows this output regarding flags:
> 
> C flags             : -Wno-address-of-packed-member -march=corei7 
> -mtune=corei7-avx -O0 -g -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Wall 
> -Werror -fno-common
> Linker flags        : -O0 -g -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Wall 
> -Werror -fno-common -pie
> 
> But variable values are still <optimized out>.
> 
> Any help would be much appreciated! Thanks in advance.
> 
> Best Regards,
> Ivaylo
> 
> 
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19846): https://lists.fd.io/g/vpp-dev/message/19846
Mute This Topic: https://lists.fd.io/mt/84378138/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to