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

Issue 10365028: Debug stub: associate NaClAppThread with IThread (Closed)

Created:
8 years, 7 months ago by eaeltsin
Modified:
8 years, 7 months ago
Reviewers:
Mark Seaborn, halyavin
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Debug stub: associate NaClAppThread with IThread This will be needed for platform-specific threads manipulation, in particular, for suspend/resume. As a side effect, split IThread::Create from IThread::Acquire, in particular because NaClAppThread is not available in every acquire point. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2758 TEST=run_debug_stub_test,run_gdb_rsp_tests Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=8569

Patch Set 1 #

Total comments: 15

Patch Set 2 : style fixes #

Total comments: 12

Patch Set 3 : more stlye fixes #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -52 lines) Patch
M src/trusted/debug_stub/nacl_debug.cc View 1 2 3 2 chunks +2 lines, -13 lines 0 comments Download
M src/trusted/debug_stub/posix/thread_impl.cc View 1 2 2 chunks +23 lines, -15 lines 0 comments Download
M src/trusted/debug_stub/win/thread_impl.cc View 1 2 4 chunks +25 lines, -18 lines 0 comments Download
M src/trusted/gdb_rsp/session_mock.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/gdb_rsp/target_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/gdb_rsp/test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M src/trusted/port/thread.h View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
eaeltsin
Please take a look. Please note, that I would like to make another, separate change ...
8 years, 7 months ago (2012-05-05 08:30:26 UTC) #1
Mark Seaborn
LGTM with the changes below. I'm not keen on changes that add a field that ...
8 years, 7 months ago (2012-05-07 21:56:49 UTC) #2
eaeltsin
On 2012/05/07 21:56:49, Mark Seaborn wrote: > LGTM with the changes below. I'm not keen ...
8 years, 7 months ago (2012-05-08 11:09:35 UTC) #3
eaeltsin
Fixed the style, except unused parameters being not named. https://chromiumcodereview.appspot.com/10365028/diff/1/src/trusted/debug_stub/posix/thread_impl.cc File src/trusted/debug_stub/posix/thread_impl.cc (left): https://chromiumcodereview.appspot.com/10365028/diff/1/src/trusted/debug_stub/posix/thread_impl.cc#oldcode133 src/trusted/debug_stub/posix/thread_impl.cc:133: ...
8 years, 7 months ago (2012-05-08 11:10:19 UTC) #4
Mark Seaborn
http://codereview.chromium.org/10365028/diff/1/src/trusted/gdb_rsp/test.cc File src/trusted/gdb_rsp/test.cc (right): http://codereview.chromium.org/10365028/diff/1/src/trusted/gdb_rsp/test.cc#newcode102 src/trusted/gdb_rsp/test.cc:102: IThread* IThread::Create(uint32_t id, struct NaClAppThread *) { On 2012/05/08 ...
8 years, 7 months ago (2012-05-09 00:06:06 UTC) #5
eaeltsin
8 years, 7 months ago (2012-05-09 06:01:32 UTC) #6
http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/posi...
File src/trusted/debug_stub/posix/thread_impl.cc (right):

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/posi...
src/trusted/debug_stub/posix/thread_impl.cc:128: struct NaClAppThread *natp_;
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> I'm confused.  You said "Removed the field for now", but it's still in the
Linux
> file, but not in the Windows file.  Is that what you intended?

Yes, because for Linux there is a pending prototype for thread suspension.
However, I've returned the field back for Windows as well - instead of not
adding the field now I'll refactor this code ASAP.

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/posi...
src/trusted/debug_stub/posix/thread_impl.cc:143: return NULL;
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> ditto

Done.

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/posi...
src/trusted/debug_stub/posix/thread_impl.cc:159: return NULL;
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> ditto

Done.

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/win/...
File src/trusted/debug_stub/win/thread_impl.cc (right):

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/win/...
src/trusted/debug_stub/win/thread_impl.cc:213: Thread(uint32_t id, struct
NaClAppThread *)
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> FWIW, the same criticism of unused fields applies to unused arguments.
> 
> I'm not against having an unused natp_ field -- you didn't have to remove it
--
> I'm just saying I'm cautious of changes that add something unused because it's
> hard for me to see how it's going to be used.

The field is back for now.

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/win/...
src/trusted/debug_stub/win/thread_impl.cc:379: return NULL;
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> You don't need a return after a LOG_FATAL.

Done.

http://codereview.chromium.org/10365028/diff/7001/src/trusted/debug_stub/win/...
src/trusted/debug_stub/win/thread_impl.cc:399: return NULL;
On 2012/05/09 00:06:06, Mark Seaborn wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698