Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: runtime/bin/dbg_connection.cc

Issue 369023002: Fix debugging module(replace int with intptr_t) so it works on Windows x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dbg_connection.h ('k') | runtime/bin/dbg_connection_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_connection.cc
===================================================================
--- runtime/bin/dbg_connection.cc (revision 37971)
+++ runtime/bin/dbg_connection.cc (working copy)
@@ -23,7 +23,7 @@
extern bool trace_debug_protocol;
-int DebuggerConnectionHandler::listener_fd_ = -1;
+intptr_t DebuggerConnectionHandler::listener_fd_ = -1;
dart::Monitor* DebuggerConnectionHandler::handler_lock_ = new dart::Monitor();
// TODO(asiva): Remove this once we have support for multiple debugger
@@ -37,7 +37,7 @@
class MessageBuffer {
public:
- explicit MessageBuffer(int fd);
+ explicit MessageBuffer(intptr_t fd);
~MessageBuffer();
void ReadData();
bool IsValidMessage() const;
@@ -50,7 +50,7 @@
static const int kInitialBufferSize = 256;
char* buf_;
int buf_length_;
- int fd_;
+ intptr_t fd_;
int data_length_;
bool connection_is_alive_;
@@ -58,7 +58,7 @@
};
-MessageBuffer::MessageBuffer(int fd)
+MessageBuffer::MessageBuffer(intptr_t fd)
: buf_(NULL),
buf_length_(0),
fd_(fd),
@@ -152,7 +152,7 @@
}
-DebuggerConnectionHandler::DebuggerConnectionHandler(int debug_fd)
+DebuggerConnectionHandler::DebuggerConnectionHandler(intptr_t debug_fd)
: debug_fd_(debug_fd), msgbuf_(NULL) {
msgbuf_ = new MessageBuffer(debug_fd_);
}
@@ -208,7 +208,7 @@
intptr_t msg_len = msg_end - msgbuf_->buf();
int print_len = ((msg_len > kMaxPrintMessageLen)
? kMaxPrintMessageLen : msg_len);
- Log::Print("[<<<] Receiving message from debug fd %d:\n%.*s%s\n",
+ Log::Print("[<<<] Receiving message from debug fd %" Pd ":\n%.*s%s\n",
debug_fd_, print_len, msgbuf_->buf(),
((msg_len > print_len) ? "..." : ""));
}
@@ -273,7 +273,7 @@
}
-void DebuggerConnectionHandler::SendError(int debug_fd,
+void DebuggerConnectionHandler::SendError(intptr_t debug_fd,
int msg_id,
const char* err_msg) {
dart::TextBuffer msg(64);
@@ -352,7 +352,8 @@
}
-void DebuggerConnectionHandler::SendMsg(int debug_fd, dart::TextBuffer* msg) {
+void DebuggerConnectionHandler::SendMsg(intptr_t debug_fd,
+ dart::TextBuffer* msg) {
ASSERT(handler_lock_ != NULL);
MonitorLocker ml(handler_lock_);
SendMsgHelper(debug_fd, msg);
@@ -374,7 +375,7 @@
}
-void DebuggerConnectionHandler::SendMsgHelper(int debug_fd,
+void DebuggerConnectionHandler::SendMsgHelper(intptr_t debug_fd,
dart::TextBuffer* msg) {
ASSERT(debug_fd >= 0);
ASSERT(IsValidJSON(msg->buf()));
@@ -382,7 +383,7 @@
if (trace_debug_protocol) {
int print_len = ((msg->length() > kMaxPrintMessageLen)
? kMaxPrintMessageLen : msg->length());
- Log::Print("[>>>] Sending message to debug fd %d:\n%.*s%s\n",
+ Log::Print("[>>>] Sending message to debug fd %" Pd ":\n%.*s%s\n",
debug_fd, print_len, msg->buf(),
((msg->length() > print_len) ? "..." : ""));
}
@@ -421,7 +422,7 @@
}
-void DebuggerConnectionHandler::AcceptDbgConnection(int debug_fd) {
+void DebuggerConnectionHandler::AcceptDbgConnection(intptr_t debug_fd) {
Socket::SetNoDelay(debug_fd, true);
AddNewDebuggerConnection(debug_fd);
{
@@ -473,7 +474,7 @@
}
-void DebuggerConnectionHandler::AddNewDebuggerConnection(int debug_fd) {
+void DebuggerConnectionHandler::AddNewDebuggerConnection(intptr_t debug_fd) {
// TODO(asiva): Support multiple debugger connections, for now we just
// create one handler, store it in a static variable and use it.
ASSERT(singleton_handler == NULL);
@@ -481,7 +482,7 @@
}
-void DebuggerConnectionHandler::RemoveDebuggerConnection(int debug_fd) {
+void DebuggerConnectionHandler::RemoveDebuggerConnection(intptr_t debug_fd) {
// TODO(asiva): Support multiple debugger connections, for now we just
// set the static handler back to NULL.
ASSERT(singleton_handler != NULL);
@@ -490,7 +491,7 @@
DebuggerConnectionHandler*
-DebuggerConnectionHandler::GetDebuggerConnectionHandler(int debug_fd) {
+DebuggerConnectionHandler::GetDebuggerConnectionHandler(intptr_t debug_fd) {
// TODO(asiva): Support multiple debugger connections, for now we just
// return the one static handler that was created.
ASSERT(singleton_handler != NULL);
« no previous file with comments | « runtime/bin/dbg_connection.h ('k') | runtime/bin/dbg_connection_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698