[Buildroot] Help: debug binary in build_root
atkunalchauhan at gmail.com
Sat May 9 18:06:06 UTC 2020
Hi team ,
1. I have not done static code analysis before, no experience , would you
give some hint.?
2. If i have a log till where the program shows prints and after that logs
is not come as binary carshes. Will it will be help ful in static analysis
and i can narrow down my debugging.?
On 9 May 2020 10:45 p.m., "Andreas Ziegler" <br015 at umbiko.net> wrote:
> Hi Kunal,
> Message: 14
>> Date: Sat, 9 May 2020 16:33:47 +0530
>> From: Kunal Chauhan <atkunalchauhan at gmail.com>
>> To: buildroot at busybox.net
>> Subject: [Buildroot] Help: debug binary in build_root
> 1.Please help/hint if we have a some binaries in build-root and its is
>> crashing and also code reside in LINUX folder of build-root. So how i can
>> find a crash in it or put valgrind if some chunk of code is crashing as
> Are you looking at memory leaks and crashes inside a vendor specific
> kernel? Linux has a framework for memory leak detection. I never used it
> myself; the documentation is here:
> You probably need to add this capability to code you patch into the kernel.
> In case of crashes, the first step is to look at the code. When deploying,
> leave debug symbols intact and don't strip binaries. The kernel dump should
> give you the location where a particular crash occurred. Sometimes the bug
> is obvious and can be found via a code review.
> If that does not help, or you are referring to a program in user-space,
> unpack gdb. You need to enable the package gdbserver in Buildroot and
> compile for debugging. Check the documentation for details how to use
> gdbserver /gdb client:
> 2. As point 1. Without using or running binary on board can i check the
>> memory leaks at particular file ?
> If you have cross-compiled code, that may be impossible. Static code
> analysis might locate some of the more obvious defects.
> Kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the buildroot