All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <amitkale@emsyssoft.com>
To: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>
Cc: pavel@ucw.cz, linux-kernel@vger.kernel.org,
	"La Monte H.P. Yarroll" <piggy@timesys.com>,
	trini@kernel.crashing.org, George Anzinger <george@mvista.com>
Subject: Re: kgdb support in vanilla 2.6.2
Date: Thu, 5 Feb 2004 23:20:04 +0530	[thread overview]
Message-ID: <200402052320.04393.amitkale@emsyssoft.com> (raw)
In-Reply-To: <p73n07ykyop.fsf@verdi.suse.de>

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?

I use the global to let page fault handler that this access is from kgdb so 
don't try to load any pages, report an error instead.

>
> Also what's also ugly in i386 is that it uses ugly hooks in
> traps.c/fault.c. On x86-64 I instead added generic notifiers (see
> include/asm-x86_64/die.h and notify_die in arch/x86_64/kernel/traps.c)
> where both kdb and kgdb and possibly dprobes and other debuggers can hook
> in without conflicting patches for the same files from everybody.
> I would strongly suggest to adopt such a generic framework for i386 too
> to clean up the core kernel <-> debugger interaction. As soon as this
> frame work is in just dropping the stub is is very clean.

I liked these.  Never got time to integrate them.

>
> The x86-64 version should be pretty simple to port to i386 if someone
> is interested ...
>
> Another issue is that for modern gdb and frame pointer less debugging
> with dwarf2 we really need dwarf2 cfi annotation on i386 too. It is
> not as ugly as it used to be because newer binutils have much nicer to
> use .cfi_* mnemonics to generate the dwarf2 unwind table. x86-64 uses
> that now thanks to Jim Houston. It only works with uptodate binutils,
> but I guess that's a reasonable requirement. It's a bit intrusive in
> entry.S, but not too bad compared to the old way (take a look at
> arch/i386/kernel/vsyscall-sysenter.S to see how the old way looks
> like) Having the dwarf2 unwind information in the kernel vmlinux is
> useful even independent of kgdb for other tools that look at crash
> dumps.

George has coded cfi directives i386 too. He can use them to backtrace past 
irqs stack.
-- 
Amit Kale
EmSysSoft (http://www.emsyssoft.com)
KGDB: Linux Kernel Source Level Debugger (http://kgdb.sourceforge.net)


  parent reply	other threads:[~2004-02-05 17:50 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040204230133.GA8702@elf.ucw.cz.suse.lists.linux.kernel>
     [not found] ` <20040204155452.4 9c1eba8.akpm@osdl.org.suse.lists.linux.kernel>
     [not found] ` <20040204152137.500e8319.akpm@osdl.org.suse.lists.linux.kernel>
     [not found]   ` <402182B8.7030900@timesys.com.suse.lists.linux.kernel>
     [not found]     ` <20040204155452.49c1eba8.akpm@osdl.org.suse.lists.linux.kernel>
2004-02-05  3:11       ` kgdb support in vanilla 2.6.2 Andi Kleen
2004-02-05 12:16         ` Pavel Machek
2004-02-05 17:50         ` Amit S. Kale [this message]
2004-02-06  2:20           ` Andi Kleen
2004-02-06 11:58             ` Amit S. Kale
2004-02-06 12:16               ` Andi Kleen
2004-02-06 13:05                 ` Amit S. Kale
2004-02-06 13:24                   ` Andi Kleen
2004-02-06 13:44                     ` Amit S. Kale
2004-02-28  0:05                       ` George Anzinger
2004-03-01  9:38                         ` Amit S. Kale
2004-03-02 21:10                           ` George Anzinger
2004-03-02 21:27                             ` Andrew Morton
2004-03-02 23:52                               ` George Anzinger
2004-03-03  5:08                                 ` Amit S. Kale
2004-03-03 16:06                                   ` Tom Rini
2004-03-04  0:42                                   ` George Anzinger
2004-03-03 10:05                               ` Andi Kleen
2004-03-04  0:43                                 ` George Anzinger
2004-03-04  0:50                                   ` Andi Kleen
2004-03-04  5:06                                     ` Amit S. Kale
2004-03-04  5:18                                       ` Andrew Morton
2004-03-04  5:29                                         ` Amit S. Kale
2004-03-04  5:44                                           ` Andrew Morton
2004-03-04 20:54                                           ` George Anzinger
2004-03-04 21:03                                             ` Tom Rini
2004-03-04 23:15                                               ` George Anzinger
2004-03-04 13:01                                         ` Andi Kleen
2004-02-11 14:52                     ` Amit S. Kale
2004-02-10 21:56             ` George Anzinger
2004-02-13 19:42               ` Andi Kleen
2004-02-12  1:34                 ` George Anzinger
2004-02-12  8:33                   ` Andi Kleen
2004-02-27 21:09               ` Piet Delaney
2004-02-27 21:58                 ` George Anzinger
2004-02-27 23:33                 ` Pavel Machek
2004-02-04 23:01 Pavel Machek
2004-02-04 23:21 ` Andrew Morton
2004-02-04 23:24   ` Pavel Machek
2004-02-04 23:45     ` Andrew Morton
2004-02-04 23:55     ` Tom Rini
2004-02-05  0:16       ` Andrew Morton
2004-02-05  0:23         ` Tom Rini
2004-02-20  0:15         ` George Anzinger
2004-02-04 23:39   ` La Monte H.P. Yarroll
2004-02-04 23:54     ` Andrew Morton
2004-02-05  1:19       ` Pavel Machek
2004-02-20  0:24       ` George Anzinger
2004-02-05  0:39     ` Pavel Machek
2004-02-04 23:52 ` Tom Rini
2004-02-05  0:17   ` Paul Mundt
2004-02-05  0:32     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402052320.04393.amitkale@emsyssoft.com \
    --to=amitkale@emsyssoft.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=piggy@timesys.com \
    --cc=trini@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.