05 Oct, 2010

1 commit

  • "Userpace" -> "Userspace"

    Signed-off-by: Andrea Gelmini
    Cc: Andrea Gelmini
    Cc: Jason Wessel
    Cc: Martin Hicks
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1536/
    Signed-off-by: Ralf Baechle

    Andrea Gelmini
     

05 Aug, 2010

2 commits


21 May, 2010

2 commits

  • The only way the debugger can handle a trap in inside rcu_lock,
    notify_die, or atomic_notifier_call_chain without a recursive fault is
    to have a low level "first opportunity handler" do_trap_or_bp() handler.

    Generally this will be something the vast majority of folks will not
    need, but for those who need it, it is added as a kernel .config
    option called KGDB_LOW_LEVEL_TRAP.

    Also added was a die notification for oops such that kdb can catch an
    oops for analysis.

    There appeared to be no obvious way to pass the struct pt_regs from
    the original exception back to the stack back tracer, so a special
    case was added to show_stack() for when kdb is active because you
    generally desire to generally look at the back trace of the original
    exception.

    Signed-off-by: Jason Wessel
    Acked-by: Ralf Baechle

    Jason Wessel
     
  • These are the minimum changes to the kgdb core in order to enable an
    API to connect a new front end (kdb) to the debug core.

    This patch introduces the dbg_kdb_mode variable controls where the
    user level I/O is routed. It will be routed to the gdbstub (kgdb) or
    to the kdb front end which is a simple shell available over the kgdboc
    connection.

    You can switch back and forth between kdb or the gdb stub mode of
    operation dynamically. From gdb stub mode you can blindly type
    "$3#33", or from the kdb mode you can enter "kgdb" to switch to the
    gdb stub.

    The logic in the debug core depends on kdb to look for the typical gdb
    connection sequences and return immediately with KGDB_PASS_EVENT if a
    gdb serial command sequence is detected. That should allow a
    reasonably seamless transition between kdb -> gdb without leaving the
    kernel exception state. The two gdb serial queries that kdb is
    responsible for detecting are the "?" and "qSupported" packets.

    CC: Ingo Molnar
    Signed-off-by: Jason Wessel
    Acked-by: Martin Hicks

    Jason Wessel
     

25 Jun, 2009

1 commit


26 Sep, 2008

1 commit

  • On the x86 arch, user space single step exceptions should be ignored
    if they occur in the kernel space, such as ptrace stepping through a
    system call.

    First check if it is kgdb that is executing a single step, then ensure
    it is not an accidental traversal into the user space, while in kgdb,
    any other time the TIF_SINGLESTEP is set, kgdb should ignore the
    exception.

    On x86, arm, mips and powerpc, the kgdb_contthread usage was
    inconsistent with the way single stepping is implemented in the kgdb
    core. The arch specific stub should always set the
    kgdb_cpu_doing_single_step correctly if it is single stepping. This
    allows kgdb to correctly process an instruction steps if ptrace
    happens to be requesting an instruction step over a system call.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

26 Aug, 2008

3 commits


31 Jul, 2008

1 commit

  • The new kgdb architecture specific handler registers and unregisters
    dynamically for exceptions depending on when you configure a kgdb I/O
    driver.

    Aside from initializing the exceptions earlier in the boot process,
    kgdb should have no impact on a device when it is compiled in so long
    as an I/O module is not configured for use.

    There have been quite a number of contributors during the existence of
    this patch (see arch/mips/kernel/kgdb.c). Most recently Jason
    re-wrote the mips kgdb logic to use the die notification handlers.

    Signed-off-by: Jason Wessel
    Signed-off-by: Ralf Baechle

    Jason Wessel