Serial consoles and remote GDB

From: Rob Deker (deker_at_slackdot.org)
Date: 08/30/04

  • Next message: Marcel Moolenaar: "Re: Serial consoles and remote GDB"
    To: freebsd-hackers@freebsd.org
    Date: Sun, 29 Aug 2004 18:13:12 -0400
    
    
    

    Hi folks,

     New to the list, so please bear with me if this is a question that's
    been answered someplace before. I've been searching and can't seem to
    find an answer.

    I'm doing some driver hacking w/ FreeBSD 5.2.1 and I've hit a spot where
    my life would be much easier if I had remote GDB for kernel debugging. I
    am however using a serial console on this box, and can't seem to get
    things working so that I have console access to the box on one serial
    port and remote gdb running on the other one. Is this possible? I've
    tried various combinations of port flags for sio[01] in the device.hints
    file, but I'm not having much luck. I've tried toe following
    combinations (with the following results):

     - hint.sio.0.flags="0x10"
       hint.sio.1.flags="0x80"
       
       This yeilded a console initially at boot, but one I told the loader
    to go ahead and boot the kernel, all I got for output were repeated 0x8e
    chars (looks like an accented capital 'A').

    so, i figured that it might possibly be that the lowest numbered port
    should be the one with 0x80 set in flags, so I tried:

     - hint.sio.0.flags="0x80"
       hint.sio.1.flags="0x10"

       This got me (again) a console up until kernel load, but after that I
    had NO output at all.

    I'm open to any suggestions. My problem is that the machines that are
    the debug target and debug host are in my basement headless while my
    office is upstairs and I really would like to avoid running up and down
    stairs every time I need to switch in and out of gdb mode in ddb (no
    matter how much I might need the exercise ;)

    Thanks,

    -d

    
    



  • Next message: Marcel Moolenaar: "Re: Serial consoles and remote GDB"

    Relevant Pages

    • Re: Serial consoles and remote GDB
      ... > my life would be much easier if I had remote GDB for kernel debugging. ... > things working so that I have console access to the box on one serial ... > the debug target and debug host are in my basement headless while my ...
      (freebsd-hackers)
    • Re: Serial consoles and remote GDB
      ... > things working so that I have console access to the box on one serial ... > port and remote gdb running on the other one. ... > to go ahead and boot the kernel, all I got for output were repeated ... Do you Yahoo!? ...
      (freebsd-hackers)
    • RE: The kernel keeps spwaning /bin/sh at booting time
      ... I haven't set the fifo size for port, ... The kernel keeps spwaning /bin/sh at booting time ... register_console: ... Freeing unused kernel memory: 1536k init ...
      (Linux-Kernel)
    • miibus, ed0, and the realpath security advisory
      ... dmesg and kernel config below. ... miibus0: <MII bus> on dc0 ... sc0: <System console> on isa0 ... # The `bpf' pseudo-device enables the Berkeley Packet Filter. ...
      (freebsd-questions)
    • [parisc] 2.6.24-rc3 (64-bit, smp) fails to boot on 9000/785/J5600
      ... v2.6.24-rc3-19-g2ffbb83 fails very early in the boot procedure. ... kernel was compiled using gcc 4.1.2. ... you may need to switch your console. ... # IPVS transport protocol load balancing support ...
      (Linux-Kernel)