[Nfd-dev] Debuggin with gdb/lldb

Davide Pesavento davide.pesavento at lip6.fr
Sat Nov 11 11:23:29 PST 2017


Ashiq,

Normally, the boost test runner catches all errors (segfaults, all
exceptions, etc..) thus hiding them from the debugger. In order to run
a boost test binary under a debugger you have to pass the
'--catch_system_error=no' option.

Btw, I think lldb became the preferred debugger on modern macOS versions.

On Sat, Nov 11, 2017 at 2:05 PM, Md Ashiqur Rahman
<marahman at email.arizona.edu> wrote:
> Hello Alex,
>
> I am working on a macOS VM. My unit test for NFD compiles correctly.
> However, I get a runtime error when running the test suit. So I wanted to
> check where the error occurs. I tried the following:
>
>> sudo gdb build/unit-tests-daemon
>> (gdb) r -t Face/TestMulticastUdpTransport
>
> This just runs through the test suit same as performing regular
> ./build/unit-tests-daemon -t Face/TestMulticastUdpTransport. The error only
> shows an unknown location:0: and a "Last Checkpoint" of the test file which
> does not help at finding the exact line where the error occurs.
>
> The error message:
>
> unknown location:0: fatal error: in
> "Face/TestMulticastUdpTransport/ReceiveMultipleRemoteEndpoints<nfd__face__tests__IpTransportFixture<nfd__face__tests__MulticastUdpTransportFixture,_(nfd__face__tests__AddressFamily)2,_(nfd__face__tests__AddressScope)2,_(nfd__face__tests__MulticastInterface)1>>":
> boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error>
>>: set_option: Can't assign requested address
> ../tests/daemon/face/multicast-udp-transport.t.cpp:74: last checkpoint:
> "ReceiveMultipleRemoteEndpoints" entry.
>
> Regards-
> Ashiq
>
>
> On Sat, Nov 11, 2017 at 9:55 AM, Alex Afanasyev <aa at cs.fiu.edu> wrote:
>>
>> Hi Ashiq,
>>
>> Can you add a bit more details on what you are doing and what expecting?
>>
>> --
>> Alex
>>
>> > On Nov 10, 2017, at 8:31 PM, Md Ashiqur Rahman
>> > <marahman at email.arizona.edu> wrote:
>> >
>> > Hello, I am trying to debug with gdb and lldb. I have made sure I have
>> > debug flag set in configuration. However, i am not getting the exact line
>> > number of code where the error is occuring. Would really appreciate if
>> > someone can help how I debug in nfd with gdb/lldb.
>> >
>> > Regards-
>> > Ashiq
>> > _______________________________________________
>> > Nfd-dev mailing list
>> > Nfd-dev at lists.cs.ucla.edu
>> > http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>>
>
>
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>


More information about the Nfd-dev mailing list