What kind of debug output statement is valid in getaddrinfo.c?

by 鎹疯秴 鐜 » Fri, 20 May 2011 17:17:53 GMT


Sponsored Links
 Hi, developers:

I am currently developing an IPv6 DNS resolver on Android-x86 platform
in socket programming in C so I would like to modify some code in /
home/ubuntu/android-x86/bionic/libc/netbsd/net/getaddrinfo.c". I want
to do debugging in this file so I am trying to adding debug output
statements in this file.

I 've tried "LOGE", "printf" and "fprintf" but none of them works.
Is there anyone knows what kind of debug output statement is valid in
this file? Thank you very much!!

Best wishes,

Jiechao Wang
BUPT

-- 



Other Threads

1. get debug flag from manifest

How can i check programmatically if debug flag is set in manifest.
ApplicationInfo has member flags which must be mask for all flags and
there is ApplicationInfo.FLAG_DEBUGABBLE (0x00000002) but flags is
always 0.

-- 

2. Why does booting time reduce from 2 min to 1 min after just adding a printk(..) invoking?



This sounds like something I've seen on other devices.

Try the kernel 'quiet' option.  See http://elinux.org/Disable_Console

The kernel printk buffer (known internally as the "log buffer") is
filled will messages throughout the execution of the kernel.
However, these messages can not be printed out to the serial
port until the kernel initializes the serial console.  When
the serial console is ready, all the messages that were previously
saved in the buffer are displayed at once.  From then on, each
message that is "printk-ed" to the buffer is both saved in the
buffer, and also immediately displayed on the console.

This explains why 1) you see no messages for a little while
before the console is initialized 2) why there is a long delay
when the console is initialized, and the previoulsy buffered
messages are drained out to the serial port (which is usually slow).
BTW  - what speed is your serial port?  On most systems, draining
the queued messages to the serial console takes less than a half
second.

You can avoid this delay by turning off the message output to console
during booting.  By using the 'quiet' option on the kernel command
line, the messages are saved in the log buffer, but not displayed.
They can be retrieved later using the 'dmesg' command on the target
(or 'adb dmesg' on the host).  If you have printk times turned on,
you can see a timestamp on each message, which will allow you to see
when each message was printk-ed.


On some ARM systems, the kernel has the capability to print directly to the
serial port (NOT going through the log buffer).  These messages come
out on the serial console immediately when they are output by the code,
not later after buffering.

Set CONFIG_DEBUG_LL and add calls to printascii, printch and printhex.
Google CONFIG_DEBUG_LL for more information, and look at uses of
it in the kernel source tree.

I hope this helps.
 -- Tim


=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Network Entertainment
=============================

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

3. Apk LWP ikan koi

4. Finish an activity not started from the service

5. Get a permisssion to a known source

6. java.lang.NoClassDefFoundError: com.google.android.maps.MapView

7. Area map / Area plan