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

Side by Side Diff: experimental/linux_oop_debugger/deb_helper.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 //----------------------debug_helper:end---------------------//
6 #include <memory.h>
7 #include <signal.h>
8 #include <sys/types.h>
9 #include <unistd.h>
10 namespace debug_helper {
11 const int kOutputDebugStringSignal = SIGUSR1;
12 const int kOutputDebugStringSize = 4 * 1024;
13 void OutputDebugString_sigaction(int signo, siginfo_t* sig_inf, void* data) {}
14 bool OutputDebugString_Init() {
15 struct sigaction act;
16 memset(&act, 0, sizeof(act));
17 act.sa_flags = SA_SIGINFO;
18 act.sa_sigaction = OutputDebugString_sigaction;
19 int res = sigaction(kOutputDebugStringSignal, &act, NULL);
20 return (0 == res);
21 }
22 bool OutputDebugString(const char* str) {
23 static char static_buff[kOutputDebugStringSize + 1];
24 size_t num = strlen(str) + 1;
25 if (num > sizeof(static_buff))
26 num = sizeof(static_buff);
27 memcpy(static_buff, str, num);
28 static_buff[num] = 0;
29 sigval val;
30 val.sival_ptr = static_buff;
31 return (0 == sigqueue(getpid(), kOutputDebugStringSignal, val));
32 }
33 } // namesdpace debug_helper
34 //----------------------debug_helper:end---------------------//
35
OLDNEW
« no previous file with comments | « experimental/linux_debug_server/debugger/rsp/rsp_threads_packets.cc ('k') | experimental/linux_oop_debugger/debug_api_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698