1. 05 2月, 2013 1 次提交
  2. 23 3月, 2012 2 次提交
  3. 01 11月, 2011 1 次提交
  4. 02 8月, 2011 1 次提交
    • J
      kdb,kgdb: Implement switch and pass buffer from kdb -> gdb · f679c498
      Jason Wessel 提交于
      When switching from kdb mode to kgdb mode packets were getting lost
      depending on the size of the fifo queue of the serial chip.  When gdb
      initially connects if it is in kdb mode it should entirely send any
      character buffer over to the gdbstub when switching connections.
      
      Previously kdb was zero'ing out the character buffer and this could
      lead to gdb failing to connect at all, or a lengthy pause could occur
      on the initial connect.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      f679c498
  5. 19 3月, 2011 1 次提交
  6. 05 8月, 2010 5 次提交
    • J
      gdbstub: do not directly use dbg_reg_def[] in gdb_cmd_reg_set() · 6d855b1d
      Jason Wessel 提交于
      Presently the usable registers definitions on x86 are not contiguous
      for kgdb.  The x86 kgdb uses a case statement for the sparse register
      accesses.  The array which defines the registers (dbg_reg_def) should
      not be used directly in order to safely work with sparse register
      definitions.
      
      Specifically there was a problem when gdb accesses ORIG_AX, which is
      accessed only through the case statement.
      
      This patch encodes register memory using the size information provided
      from the debugger which avoids the need to look up the size of the
      register.  The dbg_set_reg() function always further validates the
      inputs from the debugger.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NDongdong Deng <dongdong.deng@windriver.com>
      6d855b1d
    • J
      gdbstub: Implement gdbserial 'p' and 'P' packets · 55751145
      Jason Wessel 提交于
      The gdbserial 'p' and 'P' packets allow gdb to individually get and
      set registers instead of querying for all the available registers.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      55751145
    • J
      kgdb,kdb: individual register set and and get API · 534af108
      Jason Wessel 提交于
      The kdb shell specification includes the ability to get and set
      architecture specific registers by name.
      
      For the time being individual register get and set will be implemented
      on a per architecture basis.  If an architecture defines
      DBG_MAX_REG_NUM > 0 then kdb and the gdbstub will use the capability
      for individually getting and setting architecture specific registers.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      534af108
    • J
      gdbstub: Optimize kgdb's "thread:" response for the gdb serial protocol · 84a0bd5b
      Jason Wessel 提交于
      The gdb debugger understands how to parse short versions of the thread
      reference string as long as the bytes are paired in sets of two
      characters.  The kgdb implementation was always sending 8 leading
      zeros which could be omitted, and further optimized in the case of
      non-negative thread numbers.  The negative numbers are used to
      reference a specific cpu in the case of kgdb.
      
      An example of the previous i386 stop packet looks like:
          T05thread:00000000000003bb;
      
      New stop packet response:
          T05thread:03bb;
      
      The previous ThreadInfo response looks like:
          m00000000fffffffe,0000000000000001,0000000000000002,0000000000000003,0000000000000004,0000000000000005,0000000000000006,0000000000000007,000000000000000c,0000000000000088,000000000000008a,000000000000008b,000000000000008c,000000000000008d,000000000000008e,00000000000000d4,00000000000000d5,00000000000000dd
      
      New ThreadInfo response:
          mfffffffe,01,02,03,04,05,06,07,0c,88,8a,8b,8c,8d,8e,d4,d5,dd
      
      A few bytes saved means better response time when using kgdb over a
      serial line.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      84a0bd5b
    • A
  7. 22 7月, 2010 1 次提交
  8. 19 7月, 2010 1 次提交
  9. 21 5月, 2010 4 次提交
    • J
      kgdb: gdb "monitor" -> kdb passthrough · a0de055c
      Jason Wessel 提交于
      One of the driving forces behind integrating another front end (kdb)
      to the debug core is to allow front end commands to be accessible via
      gdb's monitor command.  It is true that you could write gdb macros to
      get certain data, but you may want to just use gdb to access the
      commands that are available in the kdb front end.
      
      This patch implements the Rcmd gdb stub packet.  In gdb you access
      this with the "monitor" command.  For instance you could type "monitor
      help", "monitor lsmod" or "monitor ps A" etc...
      
      There is no error checking or command restrictions on what you can and
      cannot access at this point.  Doing something like trying to set
      breakpoints with the monitor command is going to cause nothing but
      problems.  Perhaps in the future only the commands that are actually
      known to work with the gdb monitor command will be available.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      a0de055c
    • J
      kgdb,8250,pl011: Return immediately from console poll · f5316b4a
      Jason Wessel 提交于
      The design of the kdb shell requires that every device that can
      provide input to kdb have a polling routine that exits immediately if
      there is no character available.  This is required in order to get the
      page scrolling mechanism working.
      
      Changing the kernel debugger I/O API to require all polling character
      routines to exit immediately if there is no data allows the kernel
      debugger to process multiple input channels.
      
      NO_POLL_CHAR will be the return code to the polling routine when ever
      there is no character available.
      
      CC: linux-serial@vger.kernel.org
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      f5316b4a
    • J
      kgdb: core changes to support kdb · dcc78711
      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 <mingo@elte.hu>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NMartin Hicks <mort@sgi.com>
      dcc78711
    • J
      Separate the gdbstub from the debug core · 53197fc4
      Jason Wessel 提交于
      Split the former kernel/kgdb.c into debug_core.c which contains the
      kernel debugger exception logic and to the gdbstub.c which contains
      the logic for allowing gdb to talk to the debug core.
      
      This also created a private include file called debug_core.h which
      contains all the definitions to glue the debug_core to any other
      debugger connections.
      
      CC: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      53197fc4