public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <amitkale@emsyssoft.com>
To: George Anzinger <george@mvista.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, trini@kernel.crashing.org,
	pavel@ucw.cz
Subject: Re: kgdb for mainline kernel: core-lite [patch 1/3]
Date: Tue, 9 Mar 2004 10:16:30 +0530	[thread overview]
Message-ID: <200403091016.30844.amitkale@emsyssoft.com> (raw)
In-Reply-To: <404CF07D.1090303@mvista.com>

On Tuesday 09 Mar 2004 3:45 am, George Anzinger wrote:
> Amit S. Kale wrote:
> > On Monday 08 Mar 2004 3:56 pm, Andrew Morton wrote:
> >>"Amit S. Kale" <amitkale@emsyssoft.com> wrote:
> >>>Here are features that are present only in full kgdb:
> >>> 1. Thread support  (aka info threads)
> >>
> >>argh, disaster.  I discussed this with Tom a week or so ago when it
> >> looked like this it was being chopped out and I recall being told that
> >> the discussion was referring to something else.
> >>
> >>Ho-hum, sorry.  Can we please put this back in?
> >
> > Err., well this is one of the particularly dirty parts of kgdb. That's
> > why it's been kept away. It takes care of correct thread backtraces in
> > some rare cases.
> >
> > If you consider it an absolutely must, we can do something so that the
> > dirty part is kept away and info threads almost always works.
>
> Amit,
>
> I think we should just put the info threads in the core.  No attempt to do
> any trace back from kgdb.  Let them all show up in the switch code.  I have
> a script (gdb macro) that will give a rather decent "info threads" display.
>  Oh, we need to add one other responce to kgdb for the process info gdb
> command.

qfProcessInfo looks like a very useful command.

This is still a hack. These kinds of hacks are difficult to maintain over a 
long time because they are based on undocumented information.

While setting up kgdb for the first time isn't easy, macros add to that 
complexity.

Have you experienced "shakyness" of macros? I have used process information 
macros at kgdb.sourceforge.net to display a "ps" command like output since 
the days of 2.4.0. I had to change them 3-4 times till now because of kernel 
structure changes. The "changing" part is typically a 2-3 hour regorous 
exercise :-)

-Amit

>   * This query allows the target stub to return an arbitrary string
>   * (or strings) giving arbitrary information about the target process.
>   * This is optional; the target stub isn't required to implement it.
>   *
>   * Syntax: qfProcessInfo        request first string
>   *         qsProcessInfo        request subsequent string
>   * reply:  'O'<hex-encoded-string>
>   *         'l'                  last reply (empty)
>   */
> What we want here is the thread name.
>
> Here is the macro set:
>
> set var $low_sched=0
>
> define do_threads
>    if (void)$low_sched==(void)0
> 	set_b
>    end
>    thread apply all do_th_lines
> end
>
> define do_th_lines
>    set var $do_th_co=0
>    while ($pc > $low_sched) && ($pc < $high_sched)
>      up-silent
>      set var $do_th_co=$do_th_co+1
>    end
>    if $do_th_co==0
>      info remote-process
>      bt
>    else
>      up-silent
>      info remote-process
>      down
>    end
> end
>
> define set_b
>    set var $low_sched=scheduling_functions_start_here
>    set var $high_sched=scheduling_functions_end_here
> end
>
>
> ~


  reply	other threads:[~2004-03-09  4:46 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
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 [this message]
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=200403091016.30844.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