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

Side by Side Diff: src/trusted/gdb_rsp/target.h

Issue 6525058: Reverting: Several changes to fix debug_stub:... (issue6489005)... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 years, 10 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 | « src/trusted/debug_stub/win/thread_impl.cc ('k') | src/trusted/gdb_rsp/target.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 /* 1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved. 2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 7
8 // This module provides interfaces for accessing the debugging state of 8 // This module provides interfaces for accessing the debugging state of
9 // the target. The target can use either the thread that took the 9 // the target. The target can use either the thread that took the
10 // exception or run in it's own thread. To respond to the host, the 10 // exception or run in it's own thread. To respond to the host, the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 public: 62 public:
63 // Contruct a Target object. By default use the native ABI. 63 // Contruct a Target object. By default use the native ABI.
64 explicit Target(const Abi *abi = NULL); 64 explicit Target(const Abi *abi = NULL);
65 ~Target(); 65 ~Target();
66 66
67 // Init must be the first function called to correctlty 67 // Init must be the first function called to correctlty
68 // build the Target internal structures. 68 // build the Target internal structures.
69 bool Init(); 69 bool Init();
70 70
71 void SetMemoryBase(uint64_t mem_base) { mem_base_ = mem_base; }
72
73 // Add and remove temporary breakpoints. These breakpoints 71 // Add and remove temporary breakpoints. These breakpoints
74 // must be added just before we start running, and removed 72 // must be added just before we start running, and removed
75 // just before we stop running to prevent the debugger from 73 // just before we stop running to prevent the debugger from
76 // seeing the modified memory. 74 // seeing the modified memory.
77 bool AddTemporaryBreakpoint(uint64_t address); 75 bool AddTemporaryBreakpoint(uint64_t address);
78 bool RemoveTemporaryBreakpoints(); 76 bool RemoveTemporaryBreakpoints();
79 77
80 // This function should be called by a tracked thread when it takes 78 // This function should be called by a tracked thread when it takes
81 // an exception. It takes sig_start_ to prevent other exceptions 79 // an exception. It takes sig_start_ to prevent other exceptions
82 // from signalling thread. If wait is true, it will then block on 80 // from signalling thread. If wait is true, it will then block on
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // The current signal and signaling thread data is protected by 143 // The current signal and signaling thread data is protected by
146 // the mutex, and can only be owned by one thread at a time. 144 // the mutex, and can only be owned by one thread at a time.
147 // These values should only be written via the "Signal" member, 145 // These values should only be written via the "Signal" member,
148 // which will ensure that a new signal does not overwrite a 146 // which will ensure that a new signal does not overwrite a
149 // previous signal. 147 // previous signal.
150 volatile int8_t cur_signal_; 148 volatile int8_t cur_signal_;
151 volatile uint32_t sig_thread_; 149 volatile uint32_t sig_thread_;
152 150
153 uint32_t run_thread_; // Which thread to issue step commands on 151 uint32_t run_thread_; // Which thread to issue step commands on
154 uint32_t reg_thread_; // Which thread to issue context (reg) commands on 152 uint32_t reg_thread_; // Which thread to issue context (reg) commands on
155 uint64_t mem_base_;
156 }; 153 };
157 154
158 155
159 } // namespace gdb_rsp 156 } // namespace gdb_rsp
160 157
161 #endif // NATIVE_CLIENT_GDB_RSP_TARGET_H_ 158 #endif // NATIVE_CLIENT_GDB_RSP_TARGET_H_
162 159
OLDNEW
« no previous file with comments | « src/trusted/debug_stub/win/thread_impl.cc ('k') | src/trusted/gdb_rsp/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698