Thread: debugging a kernel

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    debugging a kernel

    Hi so I'm basically trying to debug a kernel for a program. And usually in C i would be able to do stuff like printf or putstr after figuring out how to make a putstr wit putc. What i was wondering is if anyones tried using printk() in the kernel code thats in C. Like do i need to include any file to use printk() on a file im trying to use print for? I'm just getting printk() from this website Kernel Debugging Tips - eLinux.org

  2. #2
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    Linux Kernel Common Routines
    That's the jist of printk(), you #include <include/linux/kernel.h> and go on your happy way.
    Consider this post signed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Kernel bug? (attn matsp)
    By brewbuck in forum Linux Programming
    Replies: 7
    Last Post: 04-13-2009, 10:31 AM
  2. SOS - Can a monolithic kernel be used in a micro-kernel style OS?
    By sean in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 11-20-2008, 09:30 AM
  3. Replies: 1
    Last Post: 01-28-2006, 09:34 AM
  4. CreateThread ?!
    By Devil Panther in forum Windows Programming
    Replies: 13
    Last Post: 11-15-2005, 10:55 AM
  5. Debugging book recommendation
    By dagans in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 09-13-2005, 07:35 PM