lkml.org 
[lkml]   [2004]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kgdb support in vanilla 2.6.2
Andi Kleen wrote:
> On Thu, 5 Feb 2004 23:20:04 +0530
> "Amit S. Kale" <amitkale@emsyssoft.com> wrote:
>
>
>>On Thursday 05 Feb 2004 8:41 am, Andi Kleen wrote:
>>
>>>Andrew Morton <akpm@osdl.org> writes:
>>>
>>>>need to take a look at such things and really convice ourselves that
>>>>they're worthwhile. Personally, I'd only be interested in the basic
>>>>stub.
>>>
>>>What I found always extremly ugly in the i386 stub was that it uses
>>>magic globals to talk to the page fault handler. For the x86-64
>>>version I replaced that by just using __get/__put_user in the memory
>>>accesses, which is much cleaner. I would suggest doing that for i386
>>>too.
>>
>>May be I am missing something obvious. When debugging a page fault handler if
>>kgdb accesses an swapped-out user page doesn't it deadlock when trying to
>>hold mm semaphore?
>
>
> Modern i386 kernels don't grab the mm semaphore when the access is >= TASK_SIZE
> and the access came from kernel space (actually I see x86-64 still does, but that's
> a bug, will fix). You could only see a deadlock when using user addresses
> and you already hold the mm semaphore for writing (normal read lock is ok).
> Just don't do that.
>
>
>
>>George has coded cfi directives i386 too. He can use them to backtrace past
>>irqs stack.
>
>
> Problem is that he did it without binutils support. I don't think that's a good
> idea because it makes the code basically unmaintainable for normal souls
> (it's like writing assembly code directly in hex)

Well, bin utils, at this time, makes it even worse in that it does not support
the expression syntax. Also, it is not asm but dwarf2 and it is written in,
IMHO, useful macros (not hex :)



--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.105 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site