public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <amitkale@emsyssoft.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, trini@kernel.crashing.org,
	george@mvista.com, pavel@ucw.cz
Subject: Re: kgdb for mainline kernel: core-lite [patch 1/3]
Date: Mon, 8 Mar 2004 17:30:58 +0530	[thread overview]
Message-ID: <200403081730.58208.amitkale@emsyssoft.com> (raw)
In-Reply-To: <20040308035416.62929bfe.akpm@osdl.org>

On Monday 08 Mar 2004 5:24 pm, Andrew Morton wrote:
> "Amit S. Kale" <amitkale@emsyssoft.com> wrote:
> > Here is the intrusive piece of code that helps get thread state
> > correctly. Any ideas on cleaning it?
>
> I think George's stub has diverged rather a lot from yours.  Much more than
> I was aware.

Yes. It has.
At this point of time no one knows precisely where all they differ and 
how/whether they could be merged.

The threads code in my version saves all registers during a context switch. 
This provides two benefits:
1. GDB doesn't lose track of registers when going up a stack trace starting 
with switch_to.
2. If a thread calls schedule, the thread backtrace starts from caller of 
schedule rather than schedule itself. So info threads command shows a more 
meaningful output.

-Amit

>
> >  --- linux-2.6.3-kgdb.orig/include/linux/sched.h	2004-02-24
> > 10:44:47.000000000 +0530
> >  +++ linux-2.6.3-kgdb/include/linux/sched.h	2004-03-04 18:42:56.324188184
> > +0530 @@ -173,7 +173,9 @@
> >
> >   #define	MAX_SCHEDULE_TIMEOUT	LONG_MAX
> >   extern signed long FASTCALL(schedule_timeout(signed long timeout));
> >  -asmlinkage void schedule(void);
> >  +asmlinkage void do_schedule(void);
> >  +asmlinkage void kern_schedule(void);
> >  +asmlinkage void kern_do_schedule(struct pt_regs);
>
> The stub in -mm has only a single change to sched.c:
>
> diff -puN kernel/sched.c~kgdb-ga kernel/sched.c
> --- 25/kernel/sched.c~kgdb-ga	2004-03-07 01:57:48.000000000 -0800
> +++ 25-akpm/kernel/sched.c	2004-03-07 01:57:48.000000000 -0800
> @@ -2015,6 +2015,13 @@ out_unlock:
>
>  EXPORT_SYMBOL(set_user_nice);
>
> +#if defined( CONFIG_KGDB)
> +struct task_struct * kgdb_get_idle(int this_cpu)
> +{
> +        return cpu_rq(this_cpu)->idle;
> +}
> +#endif
> +
>  #ifndef __alpha__
>
>  /*


  reply	other threads:[~2004-03-08 12:01 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-08  9:39 kgdb for mainline kernel: core-lite [patch 1/3] Amit S. Kale
2004-03-08  9:54 ` Andrew Morton
2004-03-08 10:15   ` Amit S. Kale
2004-03-08 10:26     ` Andrew Morton
2004-03-08 10:49       ` Amit S. Kale
2004-03-08 11:07         ` Andrew Morton
2004-03-08 11:20           ` Amit S. Kale
2004-03-08 11:44             ` Amit S. Kale
2004-03-08 11:54               ` Andrew Morton
2004-03-08 12:00                 ` Amit S. Kale [this message]
2004-03-08 15:19               ` Tom Rini
2004-03-08 22:26                 ` George Anzinger
2004-03-09  8:58                 ` Amit S. Kale
2004-03-08 22:19               ` George Anzinger
2004-03-09  5:08                 ` Amit S. Kale
2004-03-09 15:37                   ` Tom Rini
2004-03-08 11:48             ` Andrew Morton
2004-03-08 22:21               ` George Anzinger
2004-03-08 15:22             ` Tom Rini
2004-03-08 16:32               ` Amit S. Kale
2004-03-08 22:29               ` George Anzinger
2004-03-08 22:15         ` George Anzinger
2004-03-09  4:46           ` Amit S. Kale
2004-03-09  9:29         ` Amit S. Kale
2004-03-09  9:32           ` i386-lite [patch 2/3] [Re: kgdb for mainline kernel: core-lite [patch 1/3]] Amit S. Kale
2004-03-09 15:06           ` kgdb for mainline kernel: core-lite [patch 1/3] Tom Rini
2004-03-10  4:05             ` Amit S. Kale
     [not found] <1xpyM-2Op-21@gated-at.bofh.it>
     [not found] ` <1xqXN-44F-13@gated-at.bofh.it>
     [not found]   ` <1xr7w-4c4-9@gated-at.bofh.it>
     [not found]     ` <1xrqW-4rh-51@gated-at.bofh.it>
     [not found]       ` <1xuS8-83Q-11@gated-at.bofh.it>
2004-03-08 16:57         ` Andi Kleen
2004-03-08 17:18           ` Tom Rini
2004-03-09  4:29             ` Amit S. Kale
2004-03-09  4:36           ` Amit S. Kale
2004-03-10 12:36             ` Andi Kleen
2004-03-10 15:27               ` Tom Rini
2004-03-11  4:57                 ` Amit S. Kale
2004-03-11  5:05                   ` Randy.Dunlap
2004-03-11  5:11                   ` Andi Kleen

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=200403081730.58208.amitkale@emsyssoft.com \
    --to=amitkale@emsyssoft.com \
    --cc=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox