Commit Graph

15 Commits

Author SHA1 Message Date
Ingo Weinhold
194b3b719a * Moved all handling of threads from TeamDebugger into new class ThreadHandler.
* Added new job to get the initial state of a thread.
* Now we also get the states of new threads correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 01:46:38 +00:00
Ingo Weinhold
719f89b06e Fixed the application quit mechanism. Due to the two levels of asynchronous
message sending the main thread exit()ed before the team debugger could process
its quit message. We're no longer taking the detour via Debugger when quitting
a window. The team debugger just quits and synchronously notifies the
application, which in turn waits until all team debugger threads have gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 00:16:22 +00:00
Ingo Weinhold
e951f678c2 Moved message code where it belongs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 22:29:15 +00:00
Stephan Aßmus
4922427769 Implement killing the debugged team on quitting a TeamDebugger, the obviuos
way... thanks Ingo! Seems to work just fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 13:09:50 +00:00
Stephan Aßmus
04743aeb5f Filled up the quitting code path a bit. The TeamDebugger throws up an alert
asking what to do with the debugged team. Killing it is not yet implemented.
Then it notifies the application about the quit request. That in turn tears
down the TeamDebugger and if no other ones are left, it quits itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 12:14:05 +00:00
Ingo Weinhold
6381d6cc4e * Added Breakpoint class and extended TeamDebugModel to manage the objects.
Extended the event mechanism respectively.
* Added support to SourceView to display breakpoints and manipulate them.
* Extended TeamDebugger to install/uninstall breakpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 21:51:32 +00:00
Ingo Weinhold
0bcacd22ab * Added classes to represent source code (SourceCode, Statement).
* Added x86 disassembler (via libudis86).
* Added Architecture::DisassembleCode() to disassemble a function to SourceCode.
* Added virtual DebugInfo::LoadSourceCode() to retrieve the source code for a
  given function. The implementation in DebuggerDebugInfo disassembles the
  function.
* Added source code info to StackFrame. Also added a listener mechanism to get
  notified on source code changes.
* Added job to load the source code for a stack frame.
* Added (very basic) source code view and wired everything so that when a stack
  frame is selected the source code (respectively disassembly) for the
  underlying function is retrieved and shown.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-21 13:17:21 +00:00
Ingo Weinhold
15f040e596 Some work towards getting stack traces:
* Added a virtual Architecture::CreateStackTrace() and added a basic
  implementation in ArchitectureX86. Fleshed out StackTrace/StackFrame a bit
  and added StackFrameX86. This needs to be organized differently, though, so
  that we can get the maximum available information for each stack frame,
  depending on what info is available for the respective function.
* Added job to get the stack trace for a thread.
* Added stack trace related handling in TeamDebugger. Reorganized the thread
  state/CPU state/stack trace change handling a bit -- we're using a
  Team::Listener now, and do things asynchronously.
* Added a StackTraceView to display the stack trace of the current thread. No
  function name available yet, otherwise working fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 22:13:32 +00:00
Ingo Weinhold
495676cab6 * Implemented Worker class, which executes Jobs in a separate thread.
* Implemented a job for getting a thread's CPU state.
* The team debugger uses a worker now. ATM only for getting the CPU state for
  stopped threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 15:09:56 +00:00
Ingo Weinhold
b6aff5aa83 * Added notifications for thread state/CPU state/stack trace changes. The team
window listens for those and updates the buttons correctly.
* Added basic handling for the thread stopping debug events in the team
  debugger.
* Forward the thread run/stop/step requests to the team debugger and actually
  run/stop/step the thread. Running/stopping works, all three stepping actions
  just step by a single instruction ATM, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-18 21:45:14 +00:00
Ingo Weinhold
f208695cc1 Moved all interaction with the kernel/debugger interface into new class
DebuggerInterface. This will simplify adding support for remote debugging
eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-18 17:57:37 +00:00
Ingo Weinhold
ae53f49064 * Changed the layout of the team window. Trying a single window approach.
* Added Run/Step* buttons.
* Added some handling for selection in the thread list.
* Extended listener mechanisms all over the place (in models and views).
* The team debugger now gets the initial states for the team's threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-18 00:35:12 +00:00
Ingo Weinhold
b15883863d * Init a debug context and set the team debug event flags.
* Handle the "thread/image created/deleted" events, maintaining the Team's
  lists.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 13:40:10 +00:00
Ingo Weinhold
ac8b67130a * Added bits and pieces to the model classes (Team, Thread, Image).
* Added beginnings of the team window. Currently only showing the thread list
  (not updated yet).
* Added application startup code and argument parsing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-16 21:47:49 +00:00
Ingo Weinhold
008dd42650 Initial skeletons of the model (Team, Thread, Image) and the controller
(TeamDebugger) for debugging a team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-16 00:25:36 +00:00