Hi
I print some debug info in init/main.c line 717
printk("zrdebug:/dev/console=<%x>\n",(const char __user
*)"/dev/console");
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk(KERN_WARNING "Warning: unable to open an initial
console.\n");
And I will see the address of /dev/console = 0xffffffff, if KGDB not
compiled in the kernel then the address is valid .
I have used the initramfs as the initrd image,(in the log I can see
"checking if image is initramfs... it is")
The target/host machine are 2 vmware with serial port(named pipe )
What I have said: "> > So the target machine get off the host debug
session and continue to output message on its console."
I mean that after "unable to open an initial console" comes, the host
session can not see the target output any more,
instead the target will output the info on its vmware console.
Thanks!
rui
>-----Original Message-----
>From: ext Amit S. Kale [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 09, 2007 11:51 PM
>To: [email protected]
>Cc: Sergei Shtylyov; Zhou Rui (NSN - CN/Hangzhou)
>Subject: Re: [Kgdb-bugreport] Unable to open an initial console
>
>You can build an initrd to get around initial console problems.
>-Amit
>
>On Monday 09 July 2007 17:54, Sergei Shtylyov wrote:
>> Hello.
>>
>> [EMAIL PROTECTED] wrote:
>> > I get the problem with linux-2.6.15.5 kgdb patch
>> >
>> > Kernel command line: ro root=LABEL=/ kgdbwait
>> > kgdb8250=io,0x3f8,115200,4
>> >
>> > (the simple serial command line seems doesn't work even if
>I define
>> > the KGDB_SIMPLE_SERIAL,I mean "kgdb8250=0,115200", it always use
>>
>> CONFIG_KGDB_SIMPLE_SERIAL doesn't influence the option parsing.
>> With this option, you can only "compile in" the port and baudrate.
>> However, the .PDF manual seems to contradict it (kernel
>documentation doesn't).
>>
>> > kgdb8250_opt() to check if there are full 4 arguments)
>> >
>> > Well,the output:
>> > .....
>> > [drm] Initialized drm 1.0.0 20040925
>> > serio: i8042 AUX port at 0x60,0x64 irq 12
>> > serio: i8042 KBD port at 0x60,0x64 irq 1
>> > Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing
>> > enabled
>> > serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> > serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A .....
>> > Freeing unused kernel memory: 200k freed
>> > Warning: unable to open an initial console.
>> > SELinux: Disabled at runtime.
>> > SELinux: Unregistering netfilter hooks ...
>> >
>> > It report "unable to open an initial console" here,
>>
>> Are you sure you were *not* using the serial console?
>>
>> > So the target machine get off the host debug session and
>continue to
>> > output message on its console.
>>
>> I don't follow -- if it's unable to open initial console, how
>> could it continue?
>>
>> > Check again the host gdb session,I have to press CTRL+C to
>interrupt
>> > it.seems the tty irq get crash.
>> > The KGDB serial module has some thing wrong here?
>> >
>> > *********************************************
>> >
>> > Program received signal SIGTRAP, Trace/breakpoint trap.
>> > breakpoint () at kernel/kgdb.c:1872
>> > 1872atomic_set(&kgdb_setting_breakpoint, 0);
>> > (gdb) l
>> > 1867
>> > 1868atomic_set(&kgdb_setting_breakpoint, 1); 1869wmb();
>> > 1870BREAKPOINT(); 1871wmb();
>> > 1872atomic_set(&kgdb_setting_breakpoint, 0); 1873}
>> > 1874
>> > 1875EXPORT_SYMBOL(breakpoint);
>> > 1876
>> > (gdb) bt
>> > #0 breakpoint () at kernel/kgdb.c:1872
>> > #1 0xc0232b6b in kgdb8250_interrupt (irq=Variable "irq" is not
>> > available.
>> > ) at drivers/serial/8250_kgdb.c:163
>> > #2 0xc013b78e in handle_IRQ_event (irq=4, regs=0xc03a6fa4,
>> > action=0xd8df0f20)
>> > at kernel/irq/handle.c:88
>> > #3 0xc013b845 in __do_IRQ (irq=4, regs=0xc03a6fa4) at
>> > kernel/irq/handle.c:173
>> > #4 0xc01052a6 in do_IRQ (regs=0xc03a6fa4) at
>> > arch/i386/kernel/irq.c:98 Previous frame inner to this frame
>> > (corrupt stack?)
>>
>> I don't see any trace of crash here. Since you pressed
>Ctrl-C, you
>> got into 8250_kgdb.c's interrupt handler, that's all...
>>
>> WBR, Sergei
>>
>>
>----------------------------------------------------------------------
>> --- This SF.net email is sponsored by DB2 Express Download
>DB2 Express
>> C - the FREE version of DB2 express and take control of your XML. No
>> limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Kgdb-bugreport mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport