Dave,
On Mon, Sep 24, 2012 at 9:55 PM, Dave Anderson <anderson(a)redhat.com> wrote:
----- Original Message -----
> You can either use the "whatis" command to get the function
> declaration:
>
> crash> help whatis
>
> NAME
> whatis - search symbol table for data or type information
>
> SYNOPSIS
> whatis [struct | union | typedef | symbol]
>
> DESCRIPTION
> This command displays the definition of structures, unions, typedefs
> or
> text/data symbols.
> ...
>
> crash> whatis do_vfs_ioctl
> int do_vfs_ioctl(struct file *, unsigned int, unsigned int, long
unsigned int);
> crash>
>
> Or print it with "p", which gives you both the declaration and its
> virtual address:
>
> crash> p do_vfs_ioctl
> do_vfs_ioctl = $14 =
> {int (struct file *, unsigned int, unsigned int, long unsigned int)}
0xffffffff811247ec <do_vfs_ioctl>
> crash>
>
> That works. :)
> However could it be possible to show the argument without only display
its type?
> The kernel is defining the do_vfs_ioctl as:
>
> int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
unsigned long arg);
> Could the "filp, fd, cmd, arg" be showed out?
Anything from the output line could be selectively shown if you parse
the gdb output with open_tmpfile() or open_tmpfile2() if necessary.
Do you mean if I want to display out something like:
int do_vfs_ioctl(struct file * filp, unsigned int fd, unsigned int cmd,
long unsigned int arg);
I need to use the tmpfile to pass "filp, fd, cmd, arg" to "whatis"?
But the reality is that I don't know how to let crash extract the four
parameter name,
then how could I pass this info to the tmpfile?
Also the interest of me is get the output as:
do_vfs_ioctl(filp, fd, cmd, arg);
The parameter's type may not need to be displayed as the whatis case.
Thanks,
Lei
<
https://www.redhat.com/mailman/listinfo/crash-utility>