[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: printf in top.c
From: Bartosz_Gołaszewski <bartekgola () gmail ! com>
Date: 2015-06-03 8:10:45
Message-ID: CAFdkumh9igs9jhEie3zVNe2To0ZnuYp8-8M4OVNFe-UWT3Pfdg () mail ! gmail ! com
[Download RAW message or body]
2015-06-03 6:54 GMT+02:00 Wei, Catherine <Catherine.Wei@arris.com>:
> Hi:
> Lately I'm trying to debug the top command in an embedded linux
> box. I've added some printf in top.c, for example:
>
> fprintf(stderr,"catherine %lu %lu %lu %lu %lu
> %lu\n",used,mfree,shared,buffers,cached,total);
> printf("catherine--------------------------------------");
>
> in many place, even in the beginning of top_main() function, after
> building it, I copied the busybox bin file to my box, and the print log
> can not be printed out. I don't know why. Do I need some special config
> to build it? Could you please give me some advice? Thank you.
Try 'top -b', otherwise top will flush the screen every iteration.
Wouldn't it be better to compile busybox with debug symbols and step
through code with gdb?
> By the way, the purpose that I'm debugging top command is that some
> memory display information is not right due to the change of
> /proc/meminfo, we may need to make a patch for busybox in our system.
What change are you talking about?
Best regards,
Bartosz Golaszewski
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic