-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[debugger] Windows support + process-drawable
+ joint
#942
[debugger] Windows support + process-drawable
+ joint
#942
Conversation
process-drawable
process-drawable
process-drawable
+ joint
|
Pull Request Test Coverage Report for Build 1397409601
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, thanks for getting the debugger working on windows! Just a few comments on some of the mutex stuff, otherwise everything else looks good
common/cross_os_debug/xdbg.cpp
Outdated
return false; | ||
} | ||
|
||
cont_status = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should lock the mutex before setting cont_status
, otherwise this can happen:
- lock in
check_stopped
check_stopped
checkscont_status
, it is -1- this code sets
cont_status = -1
- this code does a
notify_all
check_stopped
does a wait, then gets stuck there.
/*! | ||
* Cross-thread things. | ||
*/ | ||
int cont_status = -1; // hack? -1 = ignore; 0 = waiting for cont; 1 = cont'd, will resume |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does something reset this to -1 if you restart the runtime in the middle of debugging? (maybe it doesn't matter)
@@ -233,6 +233,37 @@ gc> (:disasm (sym-val basic-type?) 80) | |||
|
|||
For now, the disassembly is pretty basic, but it should eventually support GOAL symbols. | |||
|
|||
### `(:sym-name)` | |||
|
|||
Print the name of a symbol from its offset. The name is fetched from memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this will be a useful feature
goalc/debugger/Debugger.cpp
Outdated
@@ -14,6 +15,10 @@ | |||
#include "goalc/listener/Listener.h" | |||
#include "third-party/fmt/core.h" | |||
|
|||
namespace { | |||
std::mutex watcher_mutex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to m_watcher_mutex
in Debugger
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently there's already a m_watcher_mutex
field so I just re-used that. Should be okay?
goalc/debugger/Debugger.cpp
Outdated
@@ -572,6 +609,7 @@ void Debugger::start_watcher() { | |||
assert(!m_watcher_running); | |||
m_watcher_running = true; | |||
m_watcher_should_stop = false; | |||
m_attach_return = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should lock the mutex before changing this
Looks like these two files havn't been added to the reference tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutex fixes look good, thanks. This just needs to have merge conflicts resolved (sorry, I think I did these in a bad order?)
merged in #953 |
Awesome, thanks. |
No description provided.