Re: device driver debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you can debug by commenting out the most of the code.. and then uncomment each block step by step to identify the exact place of crash.. coz when ur machine is crashing and its rebooting immediately, there's no way to see the crash unless u've got transferred ur console logs using serial connection (through kgdb)

nidhi mittal wrote:
no in my case /var/log/messages --- in ubuntu --
after reboot ---first line is restart --
seems it rewritten totally after reboot
dont know -- how to get state of kernel -- dmesg output -- /var/log/messages content
just before reboot when kernel crashed .....


On 3/27/09, *Sandeep K Sinha* <sandeepksinha@xxxxxxxxx <mailto:sandeepksinha@xxxxxxxxx>> wrote:

    Hi Nidhi,


    On Fri, Mar 27, 2009 at 3:36 PM, nidhi mittal
    <nidhimittal19@xxxxxxxxx <mailto:nidhimittal19@xxxxxxxxx>> wrote:
    >
    > hi all
    > normally when i inmod my module -- if some error is there it
    appears on
    > console and i guess the source of error.
    >
    > but this time what i have found is ..all error messages  -- just
    scroll up
    > and what i see is last screen
    > from which i am unable to make any guess where i am making
    mistake...
    >
    > and i had to reboot and after that there is nothing left of that
    error in
    > dmesg
    >
    > Is there any way i can store these messages ---o/p of dmesg --
    just after
    > insmod in some file --
    > i tried that too by simple dmesg > tt

    #dmesg -c
    #insmod <module>
    #dmesg

    Also, in your module code if you are suspecting some issues,
    try using printk with _FILE_,_LINE_,_func_ macros...
    This will be helpful.

    well, whatever you see in dmesg can be seen at /var/log/messages.
    So, refer that file, even after a reboot, it will have the logs.


    > but nothing works
    > pl tell me what to do
    > --
    > Thanks & Regards
    > Nidhi



    --
    Regards,
    Sandeep.






    “To learn is to change. Education is a process that changes the
    learner.”




--
Thanks & Regards
Nidhi


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux