1. 01 Aug, 2008 3 commits
    • Jason Wessel's avatar
      kgdb: fix gdb serial thread queries · 25fc9999
      Jason Wessel authored
      The command "info threads" did not work correctly with kgdb.  It would
      result in a silent kernel hang if used.
      
      This patach addresses several problems.
       - Fix use of deprecated NR_CPUS
       - Fix kgdb to not walk linearly through the pid space
       - Correctly implement shadow pids
       - Change the threads per query to a #define
       - Fix kgdb_hex2long to work with negated values
      
      The threads 0 and -1 are reserved to represent the current task.  That
      means that CPU 0 will start with a shadow thread id of -2, and CPU 1
      will have a shadow thread id of -3, etc...
      
      From the debugger you can switch to a shadow thread to see what one of
      the other cpus was doing, however it is not possible to execute run
      control operations on any other cpu execept the cpu executing the
      kgdb_handle_exception().
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      25fc9999
    • Jason Wessel's avatar
      kgdb: fix kgdb_validate_break_address to perform a mem write · a9b60bf4
      Jason Wessel authored
      A regression to the kgdb core was found in the case of using the
      CONFIG_DEBUG_RODATA kernel option.  When this option is on, a breakpoint
      cannot be written into any readonly memory page.  When an external
      debugger requests a breakpoint to get set, the
      kgdb_validate_break_address() was only checking to see if the address
      to place the breakpoint was readable and lacked a write check.
      
      This patch changes the validate routine to try reading (via the
      breakpoint set request) and also to try immediately writing the break
      point.  If either fails, an error is correctly returned and the
      debugger behaves correctly.  Then an end user can make the
      descision to use hardware breakpoints.
      
      Also update the documentation to reflect that using
      CONFIG_DEBUG_RODATA will inhibit the use of software breakpoints.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      a9b60bf4
    • Jason Wessel's avatar
      kgdb: remove the requirement for CONFIG_FRAME_POINTER · 5f5ddfb3
      Jason Wessel authored
      There is no technical reason that the kgdb core requires frame
      pointers.  It is up to the end user of KGDB to decide if they need
      them or not.
      
      [ anemo@mba.ocn.ne.jp: removed frame pointers on mips ]
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      5f5ddfb3
  2. 30 Jul, 2008 37 commits