Backtrace Call Stack

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

 



Hi,

I have been trying to get some debug information from a point in the
kernel where I am seeing some errors. I am actually trying to figure
out how a particular point in code was reached. Here is what I did:

if (case_when_error_happens) {
        extern int sprint_symbol(char *buffer, unsigned long address);

       for (i = 0; i < depth; i++)
               sprint_symbol(bt[i], (unsigned long)__builtin_return_address(i));

       printk("%s < %s ...", bt[0], bt[1] ...);
}

I get most of the information I want. But I was wondering if there was
any other cleaner, more straight forward way to do this.

Thanks.

-Harish

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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