lkml.org 
[lkml]   [2004]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kgdb support in vanilla 2.6.2
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.
>
> A stub is free to send console messages to gdb at any time. We can send a
> "'O'hex(Page fault at 0x1234)" packet to gdb regardless of whether
> CONFIG_KGDB_CONSOLE is configured in. This way kgdb will send this packet to
> gdb and then immediately report a segfault/trap. To a user it'll appear as a
> message printed from gdb "Page fault at 0x1234" followed by gdb showing a
> SIGSEGV etc. The gdb console message should print information other than a
> signal number.
>
> -Amit
>

--
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:01    [W:0.107 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site