[PATCH] common: add printf debugging automation

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Mar 7 09:06:01 PST 2022


Hello Jules,

On 06.03.22 23:49, Jules Maselbas wrote:
> Hi Ahmad,
> 
> On Sat, Mar 05, 2022 at 11:20:13PM +0100, Ahmad Fatoum wrote:
>> This allows automating pinpointing of breakage outside PBL. For example
>> if barebox is stuck during startup:
>>
>>   - Turn on CONFIG_DEBUG_LL and CONFIG_DEBUG_INITCALLS
>>   - Note last $initcall executed
> By $initcall are you talking about the function name or about the
> initcall address during startup ?

Function name, that's why KALLSYMS is required. It's not strictly necessary
though and code could just check if the first character is a digit and accept
an address in that case. I will do this for v2.

>> diff --git a/common/Kconfig b/common/Kconfig
>> index b8c3e34c0a58..2a35b43e2717 100644
>> --- a/common/Kconfig
>> +++ b/common/Kconfig
>> @@ -1592,6 +1592,21 @@ config ASAN
>>  	  Enables ASAN (AddressSANitizer) - runtime memory debugger,
>>  	  designed to find out-of-bounds accesses and use-after-free bugs.
>>  
>> +config FTRACE
>> +	bool "Enable function tracing (Only for debugging!)
> missing closing quote here --------------------------------^
> which generated the following warning when building:
> common/Kconfig:1583:warning: multi-line strings not supported

Thanks, will fix for v2.

Cheers,
Ahmad


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list