mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: George Anzinger <george@mvista.com>
Cc: "Amit S. Kale" <amitkale@emsyssoft.com>,
	Andrew Morton <akpm@osdl.org>,
	ak@suse.de, pavel@ucw.cz, linux-kernel@vger.kernel.org,
	piggy@timesys.com
Subject: Re: kgdb support in vanilla 2.6.2
Date: Thu, 4 Mar 2004 14:03:33 -0700	[thread overview]
Message-ID: <20040304210333.GG26065@smtp.west.cox.net> (raw)
In-Reply-To: <40479774.9070308@mvista.com>

On Thu, Mar 04, 2004 at 12:54:12PM -0800, George Anzinger wrote:
> Amit S. Kale wrote:
> >On Thursday 04 Mar 2004 10:48 am, Andrew Morton wrote:
> >
> >>"Amit S. Kale" <amitkale@emsyssoft.com> wrote:
> >>
> >>>Flashing keyboard lights is easy on x86 and x86_64 platforms.
> >>
> >>Please, no keyboards.  Some people want to be able to use kgdboe
> >>to find out why machine number 324 down the corridor just died.
> >>
> >>How about just doing
> >>
> >>
> >>char *why_i_crashed;
> >>
> >>
> >>{
> >>	...
> >>	if (expr1)
> >>		why_i_crashed = "hit a BUG";
> >>	else if (expr2)
> >>		why_i_crashed = "divide by zero";
> >>	else ...
> >>}
> >>
> >>then provide a gdb macro which prints out the string at *why_i_crashed?
> >
> >
> >If we can afford to do this (in terms of actions that can be done with the 
> >machine being unstable) we can certainly print a console message through 
> >gdb.
> 
> Not once you are connected to gdb.  The "O" packet can only be sent if the 
> program (i.e. kernel) is running as far as gdb knows.  So you could preceed 
> a connection with this, but could not used it after gdb knows the kernel is 
> stopped.

If GDB is already connected and sitting by waiting, you can send the O
packet.  If it is not, you could delay sending the O packet until you
know that GDB has now connected.

This isn't an unworkable idea, but it's probably better to just set
*why_i_crashed (think work work work, oh wait, what caused this again?)
and provide some handy macros (which we should be in the docs anyhow).

-- 
Tom Rini
http://gate.crashing.org/~trini/

  reply	other threads:[~2004-03-04 21:03 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       ` Andi Kleen
2004-02-05 12:16         ` Pavel Machek
2004-02-05 17:50         ` Amit S. Kale
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 [this message]
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=20040304210333.GG26065@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=amitkale@emsyssoft.com \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=piggy@timesys.com \
    /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

Powered by JetHome