Re: [discuss] booting a kernel compiled with -mregparm=0
From: Andi Kleen
Date: Mon Jan 17 2005 - 15:24:08 EST
"H. Peter Anvin" <hpa@xxxxxxxxx> writes:
> Tigran Aivazian wrote:
>> On Mon, 17 Jan 2005, Arjan van de Ven wrote:
>>
>>>> Actually, having cc'd Linus made me think very _carefully_ about what I
>>>> say and I went and checked how the userspace does it, as I couldn't
>>>> believe that such fine piece of software as gdb would be broken as well.
>>>> And to my surprize I discovered that gdb (when a program is
>>>> compiled with
>>>> -g) works fine! I.e. it shows the function arguments correctly. And
>>>
>>> so why don't you use kgdb instead of kdb ?
>> If kdb was some dead unmaintained piece of software then, yes, I
>> would follow your advice and switch to kgdb. But kdb is a very nice
>> and actively maintained piece of work, so it should be fixed to show
>> the parameter values correctly in the backtrace.
>
> That's a kdb maintainer issue. The x86-64 folks have nicely provided
> a set of libraries to do backtraces, etc. Your previous rant is just
> so far off base it's not even funny.
To be fair there isn't a nice library for it on x86-64. There
is libunwind on IA64, but afaik nobody ported it to x86-64 yet.
Just various projects have their own private unwind
implementation. The kernel including KDB has always lived with
imprecise backtraces and no argument printing. I don't think it has
been a show stopper so far. If you really want the arguments you can
always use kgdb.
However I'm not sure we really want libunwind in the kernel anyways
(not even in KDB ;-) If anything better something stripped down and
simple which libunwind isn't.
Unfortunately dwarf2 is not exactly a simple spec so implementing
a new backtracer for the kernel is not a trivial task.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/