Hi jay,

kgdb should be work over sol. 
These days, I have been working on the kgdb-2.4 ported to RHEL4.5. My
target machine's ttyS0 also connected to the console terminal server,
and it boot option in /boot/grub/menu.lst like this:

    title kgdb-2.6.9-no-console wait
        root (hd0,1)
        kernel /vmlinuz-2.6.9-55kgdb ro root=/dev/hda5 hdc=ide-scsi
pci=noacpi ramdisk_size=32768 kgdbwait kgdb8250=io,0x3f8,38400,4
        initrd /initrd-2.6.9-55kgdb.img


Boot to this option, and then the kernel will stop to wait the gdb to
connect.


On host machine, it can connect to the target via ip:port


[EMAIL PROTECTED] linux-2.6.9-55cblade]# ../gdbmod-2.4 vmlinux 
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) target remote 172.27.1.2:3023
Remote debugging using 172.27.1.2:3023
breakpoint () at kernel/kgdb.c:1872
1872            atomic_set(&kgdb_setting_breakpoint, 0);
(gdb) c
Continuing.
Linux version 2.6.9-55kgdb ([EMAIL PROTECTED]) (gcc version 3.4.6
20060404 (Red Hat 3.4.6-8)) #11 SMP Wed Jun 18 01:04:18 EDT 2008
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009cc00 (usable)
 BIOS-e820: 000000000009cc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000dc000 - 00000000000e0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007fef0000 (usable)
 BIOS-e820: 000000007fef0000 - 000000007feff000 (ACPI data)
 BIOS-e820: 000000007feff000 - 000000007ff00000 (ACPI NVS)
 BIOS-e820: 000000007ff00000 - 0000000080000000 (usable)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
kgdb_8250: irq 4 is going to release...
Waiting for connection from remote gdb...
1152MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000f6c30
Using x86 segment limits to approximate NX protection
DMI present.
Using APIC driver default
ACPI: PM-Timer IO Port: 0x508
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:2 APIC version 20
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x06] enabled)
Processor #6 15:2 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 15:2 APIC version 20
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x07] enabled)
Processor #7 15:2 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
Enabling APIC mode:  Flat.  Using 0 I/O APICs
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
OEM ID: RCC      Product ID: GCLE SERVER  APIC at: 0xFEE00000
I/O APIC #2 Version 17 at 0xFEC00000.
I/O APIC #3 Version 17 at 0xFEC01000.
I/O APIC #4 Version 17 at 0xFEC02000.
Enabling APIC mode:  Flat.  Using 3 I/O APICs
Processors: 4
Allocating PCI resources starting at 88000000 (gap: 80000000:7ec00000)
Built 1 zonelists
Kernel command line: ro root=/dev/hda5 hdc=ide-scsi pci=noacpi
ramdisk_size=32768 kgdbwait kgdb8250=io,0x3f8,38400,4
ide_setup: hdc=ide-scsi
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 3051.868 MHz processor.
Using pmtmr for high-res timesource
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 2073688k/2097152k available (1853k kernel code, 22448k reserved,
935k data, 188k init, 1179584k highmem)
Calibrating delay using timer specific routine.. 6107.49 BogoMIPS
(lpj=3053749)
Security Scaffold v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
There is already a security framework initialized, register_security
failed.
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU0: Initial APIC ID: 0, Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
ACPI: IRQ9 SCI: Level Trigger.
CPU0: Intel(R) Xeon(TM) CPU 3.06GHz stepping 05
per-CPU timeslice cutoff: 1462.16 usecs.
task migration cache decay timeout: 1 msecs.
Booting processor 1/1 eip 3000
Initializing CPU#1
Calibrating delay using timer specific routine.. 6102.74 BogoMIPS
(lpj=3051374)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU1: Initial APIC ID: 1, Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel P4/Xeon Extended MCE MSRs (12) available
CPU1: Thermal monitoring enabled
CPU1: Intel(R) Xeon(TM) CPU 3.06GHz stepping 05
Booting processor 2/6 eip 3000
Initializing CPU#2
Calibrating delay using timer specific routine.. 6102.42 BogoMIPS
(lpj=3051211)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU2: Initial APIC ID: 6, Physical Processor ID: 3
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#2.
CPU2: Intel P4/Xeon Extended MCE MSRs (12) available
CPU2: Thermal monitoring enabled
CPU2: Intel(R) Xeon(TM) CPU 3.06GHz stepping 05
Booting processor 3/7 eip 3000
Initializing CPU#3
Calibrating delay using timer specific routine.. 6102.47 BogoMIPS
(lpj=3051235)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU3: Initial APIC ID: 7, Physical Processor ID: 3
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#3.
CPU3: Intel P4/Xeon Extended MCE MSRs (12) available
CPU3: Thermal monitoring enabled
CPU3: Intel(R) Xeon(TM) CPU 3.06GHz stepping 05
Total of 4 processors activated (24415.13 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 pin1=2 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ... 
..... (found pin 0) ...works.
checking TSC synchronization across 4 CPUs: passed.
Brought up 4 CPUs
zapping low mappings.
checking if image is initramfs... it is
Freeing initrd memory: 569k freed
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd9ef, last bus=4
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller 0000:00:0f.1
PCI: Discovered peer bus 01
PCI: Discovered peer bus 02
PCI: Discovered peer bus 03
PCI: Discovered peer bus 04
PCI->APIC IRQ transform: (B0,I13,P0) -> 201
PCI->APIC IRQ transform: (B1,I4,P0) -> 169
PCI->APIC IRQ transform: (B2,I5,P0) -> 177
PCI->APIC IRQ transform: (B3,I9,P0) -> 193
PCI->APIC IRQ transform: (B3,I9,P1) -> 193
PCI->APIC IRQ transform: (B4,I8,P0) -> 185
PCI->APIC IRQ transform: (B4,I8,P1) -> 185
Simple Boot Flag at 0x37 set to 0x1
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
apm: disabled - APM is not SMP safe.
audit: initializing netlink socket (disabled)
audit(1213793951.077:1): initialized
Registering GDB sysrq handler
highmem bounce pool size: 64 pages
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux:  Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
ACPI: Processor [CPU0] (supports C1)
ACPI: Processor [CPU1] (supports C1)
ACPI: Processor [CPU2] (supports C1)
ACPI: Processor [CPU3] (supports C1)
Real Time Clock Driver v1.12
Linux agpgart interface v0.100 (c) Dave Jones
Serial: 8250/16550 driver $Revision: 1.15 $ 68 ports, IRQ sharing
enabled
8250:UART_NR = 68
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
SvrWks CSB5: IDE controller at PCI slot 0000:00:0f.1
SvrWks CSB5: chipset revision 147
SvrWks CSB5: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1040-0x1047, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1048-0x104f, BIOS settings: hdc:pio, hdd:pio
hda: TOSHIBA MK6034GAX, ATA DISK drive
Using cfq io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: TOSHIBA ODD-DVD SD-C2732, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 117210240 sectors (60011 MB), CHS=16383/255/63, UDMA(100)
 hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 hda12 >
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 262144 (order: 9, 3145728 bytes)
TCP: Hash tables configured (established 262144 bind 262144)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
ACPI wakeup devices: 

ACPI: (supports S0 S5)
Freeing unused kernel memory: 188k freed
Warning: unable to open an initial console.
[New thread 297]
[New thread 302]
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
SELinux:  Disabled at runtime.
SELinux:  Unregistering netfilter hooks
[New thread 801]
floppy0: no floppy controllers found
[New thread 889]
[New thread 894]
[New thread 903]
[New thread 908]
[New thread 913]
[New thread 935]
[New thread 947]
[New thread 1046]
ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX
as device
[New thread 1099]
sr0: scsi3-mmc drive: 24x/24x cd/rw xa/form2 cdda tray
[New thread 1141]
microcode: CPU0 already at revision 0x29 (current=0x29)
microcode: CPU1 already at revision 0x29 (current=0x29)
microcode: CPU2 already at revision 0x29 (current=0x29)
microcode: CPU3 already at revision 0x29 (current=0x29)
[New thread 1200]
[New thread 1317]
ip_tables: (C) 2000-2002 Netfilter core team
[New thread 1323]
[New thread 1954]
[New thread 2037]
[New thread 2063]
[New thread 2081]
[New thread 2143]
[New thread 2153]
[New thread 2229]
[New thread 2235]


[New thread 32770]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 32770]
breakpoint () at kernel/kgdb.c:1872
1872            atomic_set(&kgdb_setting_breakpoint, 0);
(gdb) l
1867
1868            atomic_set(&kgdb_setting_breakpoint, 1);
1869            wmb();
1870            BREAKPOINT();
1871            wmb();
1872            atomic_set(&kgdb_setting_breakpoint, 0);
1873    }
1874
1875    EXPORT_SYMBOL(breakpoint);
1876
(gdb) (gdb) p command_line
$1 = "ro\000root=/dev/hda5\000hdc=ide-scsi\000pci=noacpi
\000ramdisk_size=32768\000kgdbwait\000kgdb8250=io,0x3f8,38400,4", '\0'
<repeats 160 times>
(gdb)


=====

I don't know which kgdb version and kernel you are working on. Might be
you can remove "udp:" from  "target remote udp:192.168.2.2:6443" and
try.

Good luck,
->Xianfeng



On Wed, 2008-06-18 at 20:32 -0500, Jason Wessel wrote:

> Jay Lan wrote:
> > Jay Lan wrote:
> >   
> >> Jason Wessel wrote:
> >>     
> >>> Jay Lan wrote:
> >>>       
> >>>> Hi Jason,
> >>>>
> >>>> I have a machine with its ttyS0 connected to a console terminal server.
> >>>> To access the console of my machine, i telnet to the TS with a specific
> >>>> port.
> >>>>
> >>>> I think i would need to use kgdboc in this setup? How should i specify
> >>>> the kdboc parameters in the boot command line?
> >>>>
> >>>> Thanks and regards,
> >>>>  - jay
> >>>>
> >>>>
> >>>>   
> >>>>         
> >>> It is no different than if you had the board directly connected.
> >>>
> >>> Assuming your terminal server is connected at 115200 baud it looks like:
> >>>
> >>> kgdboc=ttyS0,115200
> >>>       
> >> The system hangs on boot. I have these in the boot line:
> >>     console=ttyS0,38400n8 kgdboc=ttyS0,38400
> >>     
> >
> > Hi Jason,
> >
> > Please disregard the above comment. The kernel was hung in running init,
> > not during booting the kernel. I need to find what caused this problem
> > in this particular system setup.
> >
> > Now, i put in kgdbwait in the boot command line and the kernel stopped
> > and wait for gdb to connect. The documentation says to use the following
> > for connecting a terminal server:
> >     (gdb) target remote udp:192.168.2.2:6443
> >
> > I replaced the ip with the ip of my terminal server, and the port number
> > with the port number when i connect to the console of the target system.
> >
> > Still no connection! Does the system i run gdb on have to be on the same
> > subnet as the target system?  Hmm, i will find another system to test
> > tomorrow...
> >
> >   
> 
> Not real sure where you got the target remote "udp" but most if not all
> terminal servers use tcp.  What ever address and port you connect to
> with your terminal program is the same as what you would use for the gdb
> target remote command.
> 
> Jason.
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Kgdb-bugreport mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to