Re: Oops stack trace missing function addresses

2020-10-16 Thread Alexander Kapshuk
On Fri, Oct 16, 2020 at 2:49 PM Adrian Larumbe  wrote:
>
> > OK, I'll bite.  You *are* getting the function name and offset, what 
> > additional
> > knowledge do you get from knowing the VA?
>
> I was hoping to use the VA to calculate the C source line where the
> fault happens, by substracting the function's VA from the module load
> address as revealed by cat /proc/modules, adding the offset within the
> function and then passing the offset to addr2line.
>
> I've just realised I might as well load the module object file into gdb
> and do 'info line *(func+offset)'.
>
> But how would I do this just with addr2line ?

scripts/faddr2line path/to/module.ko symbol+0xsym_offset/0xsym_size
would give you the C source line referenced by the offset.

>
> > What architecture is this on?  Stack unwinding is architecture-dependent, so
> > it may just be the unwinder for that arch doesn't output the virtual 
> > address.
>
> It's a QEMU VM, 'uname -m' claims it's i686.
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Oops stack trace missing function addresses

2020-10-16 Thread Adrian Larumbe

OK, I'll bite.  You *are* getting the function name and offset, what additional
knowledge do you get from knowing the VA?


I was hoping to use the VA to calculate the C source line where the
fault happens, by substracting the function's VA from the module load
address as revealed by cat /proc/modules, adding the offset within the
function and then passing the offset to addr2line.

I've just realised I might as well load the module object file into gdb
and do 'info line *(func+offset)'.

But how would I do this just with addr2line ?


What architecture is this on?  Stack unwinding is architecture-dependent, so
it may just be the unwinder for that arch doesn't output the virtual address.


It's a QEMU VM, 'uname -m' claims it's i686.



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies