Hemant,

If you want to debug a vpp-debug image, then use:

make test-debug TEST=test_foo DEBUG=gdb

Thanks,
-daw-

On 4/19/2021 9:15 PM, hemant via lists.fd.io wrote:

Hi Florin,

I first built a debugged vpp image using “sudo make build”.  Then I used the command you showed me below and interestingly the command builds a *release* binary and then runs.  So, data structures I want inspect in gdb are optimized out. I don’t see this vagary with VPP shell debugging I spoke of in my first email.

(gdb) p adj

$2 = <optimized out>

(gdb)

Regards,

Hemant

*From:* vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> *On Behalf Of *Florin Coras
*Sent:* Monday, April 19, 2021 7:57 PM
*To:* hem...@mnkcg.com
*Cc:* vpp-dev@lists.fd.io
*Subject:* Re: [vpp-dev] gdb vpp with make test?

Hi Hemant,

Probably you’re looking for:

make test TEST=test_foo DEBUG=gdb

Regards,

Florin



    On Apr 19, 2021, at 4:00 PM, hemant via lists.fd.io
    <http://lists.fd.io> <hemant=mnkcg....@lists.fd.io
    <mailto:hemant=mnkcg....@lists.fd.io>> wrote:

    Hi folks,

    I know how to use gdb with vpp when a vpp shell is logged into
    using “sudo vppctl -s /run/vpp/cli.sock”.

    However, I can’t work with gdb to debug vpp if I am using “sudo
    make test TEST=test_foo”.  Is it even possible?

    Since I can’t make gdb work with “sudo make test”, this is the
    reason my progress has been slow debugging ip-neighbor and
    ip_adjacency.  I am relying on fprintf(stderr, …) and its like
    peeling an onion.

    Regards,

    Hemant







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19260): https://lists.fd.io/g/vpp-dev/message/19260
Mute This Topic: https://lists.fd.io/mt/82222140/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