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

Side by Side Diff: runtime/bin/dbg_connection_macos.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, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/dbg_connection_linux.cc ('k') | runtime/bin/dbg_connection_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include <errno.h> // NOLINT 8 #include <errno.h> // NOLINT
9 #include <stdio.h> // NOLINT 9 #include <stdio.h> // NOLINT
10 #include <stdlib.h> // NOLINT 10 #include <stdlib.h> // NOLINT
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return remaining == 0; 69 return remaining == 0;
70 } 70 }
71 71
72 72
73 void DebuggerConnectionImpl::HandleEvent(struct kevent* event) { 73 void DebuggerConnectionImpl::HandleEvent(struct kevent* event) {
74 int ident = event->ident; 74 int ident = event->ident;
75 if (ident == DebuggerConnectionHandler::listener_fd_) { 75 if (ident == DebuggerConnectionHandler::listener_fd_) {
76 if (DebuggerConnectionHandler::IsConnected()) { 76 if (DebuggerConnectionHandler::IsConnected()) {
77 FATAL("Cannot connect to more than one debugger.\n"); 77 FATAL("Cannot connect to more than one debugger.\n");
78 } 78 }
79 int fd = ServerSocket::Accept(ident); 79 intptr_t fd = ServerSocket::Accept(ident);
80 if (fd < 0) { 80 if (fd < 0) {
81 FATAL("Accepting new debugger connection failed.\n"); 81 FATAL("Accepting new debugger connection failed.\n");
82 } 82 }
83 FDUtils::SetBlocking(fd); 83 FDUtils::SetBlocking(fd);
84 DebuggerConnectionHandler::AcceptDbgConnection(fd); 84 DebuggerConnectionHandler::AcceptDbgConnection(fd);
85 85
86 /* For now, don't poll the debugger connection. 86 /* For now, don't poll the debugger connection.
87 struct kevent ev_add; 87 struct kevent ev_add;
88 EV_SET(&ev_add, fd, EVFILT_READ, EV_ADD, 0, 0, NULL); 88 EV_SET(&ev_add, fd, EVFILT_READ, EV_ADD, 0, 0, NULL);
89 int status = 89 int status =
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 186
187 intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) { 187 intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
188 return TEMP_FAILURE_RETRY(read(socket, buf, len)); 188 return TEMP_FAILURE_RETRY(read(socket, buf, len));
189 } 189 }
190 190
191 } // namespace bin 191 } // namespace bin
192 } // namespace dart 192 } // namespace dart
193 193
194 #endif // defined(TARGET_OS_MACOS) 194 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/dbg_connection_linux.cc ('k') | runtime/bin/dbg_connection_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698