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
On Sat, Oct 1, 2011 at 02:32, Harish G. Naik <harishgnaik@gmail.com> wrote:
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.
I think it's dump_stack()...... try to browse it using lxr.linux.no -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On Fri, Sep 30, 2011 at 14:47, Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
On Sat, Oct 1, 2011 at 02:32, Harish G. Naik <harishgnaik@gmail.com> wrote:
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.
I think it's dump_stack()...... try to browse it using lxr.linux.no
Yes, dump_stack(void) or show_stack(current, NULL) from: arch/<ARCH>/kernel/process.c did it. Thanks, Harish
Hi Harish :) On Sat, Oct 1, 2011 at 03:44, Harish G. Naik <harishgnaik@gmail.com> wrote:
I think it's dump_stack()...... try to browse it using lxr.linux.no
Yes, dump_stack(void) or show_stack(current, NULL) from: arch/<ARCH>/kernel/process.c did it.
Welcome...glad if it gave you clues :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (2)
-
Harish G. Naik -
Mulyadi Santosa