[NSWI004] Debugging
LubomÃr Bulej
bulej at d3s.mff.cuni.cz
Wed Oct 7 12:53:33 CEST 2020
Hello,
You need to be a bit specific.
What kind of difference are you seeing? Can it be that you actually output
some non-printable characters? In this case, it helps to look at a hex dump of
the output.
Does it happen for all the tests, or just this one? You should provide the
output or at least have your code pushed to the repository so that we can
see/try it.
What does the build_kernel__printk__string/report.log file say?
Anyway, in general, you should try to make sure that the code actually follows
the path that you think it should follow. I suggest to use puts() (or simpler
functions that I would expect you to call for specific types from printk) to
keep track of the actual progress.
You can also try to simplify the printk implementation so that it only handles
'%s' (ignoring the other tests for now), so that you have less code to think
about when trying to find where things broke, and only then restore printk to
its full implementation.
Best regards,
Lubomir Bulej
On 07/10/2020 09:45, Georgii Ekserdzhian wrote:
> Can you please recommend some way to debug my functions?
>
> When I try to test printk with strings:
> "tools/tester.py kernel --verbose printk/string"
> I see that there is a difference in the output even though my printk function
> is completely the same as my simple_printf function from as00, and those tests
> pass.
>
> So now I'm a bit stuck, since I'm not sure how to debug this.
More information about the NSWI004
mailing list