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

Side by Side Diff: src/platform-linux.cc

Issue 10310116: Fix ucontext structure for Android on x86 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 typedef struct ucontext { 959 typedef struct ucontext {
960 uint32_t uc_flags; 960 uint32_t uc_flags;
961 struct ucontext* uc_link; 961 struct ucontext* uc_link;
962 stack_t uc_stack; 962 stack_t uc_stack;
963 mcontext_t uc_mcontext; 963 mcontext_t uc_mcontext;
964 __sigset_t uc_sigmask; 964 __sigset_t uc_sigmask;
965 } ucontext_t; 965 } ucontext_t;
966 966
967 #elif !defined(__GLIBC__) && defined(__i386__) 967 #elif !defined(__GLIBC__) && defined(__i386__)
968 // x86 version for Android. 968 // x86 version for Android.
969 struct _libc_fpreg { 969 struct sigcontext {
970 uint16_t significand[4]; 970 uint32_t gregs[19];
971 uint16_t exponent; 971 void* fpregs;
972 uint32_t oldmask;
973 uint32_t cr2;
972 }; 974 };
973 975
974 struct _libc_fpstate { 976 typedef uint32_t __sigset_t;
975 uint64_t cw; 977 typedef struct sigcontext mcontext_t;
976 uint64_t sw;
977 uint64_t tag;
978 uint64_t ipoff;
979 uint64_t cssel;
980 uint64_t dataoff;
981 uint64_t datasel;
982 struct _libc_fpreg _st[8];
983 uint64_t status;
984 };
985
986 typedef struct _libc_fpstate *fpregset_t;
987
988 typedef struct mcontext {
989 int32_t gregs[19];
990 fpregset_t fpregs;
991 int64_t oldmask;
992 int64_t cr2;
993 } mcontext_t;
994
995 typedef uint64_t __sigset_t;
996
997 typedef struct ucontext { 978 typedef struct ucontext {
998 uint64_t uc_flags; 979 uint32_t uc_flags;
999 struct ucontext *uc_link; 980 struct ucontext* uc_link;
1000 stack_t uc_stack; 981 stack_t uc_stack;
1001 mcontext_t uc_mcontext; 982 mcontext_t uc_mcontext;
1002 __sigset_t uc_sigmask; 983 __sigset_t uc_sigmask;
1003 struct _libc_fpstate __fpregs_mem;
1004 } ucontext_t; 984 } ucontext_t;
1005
1006 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 }; 985 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 };
1007 #endif 986 #endif
1008 987
1009 988
1010 static int GetThreadID() { 989 static int GetThreadID() {
1011 // Glibc doesn't provide a wrapper for gettid(2). 990 // Glibc doesn't provide a wrapper for gettid(2).
1012 #if defined(ANDROID) 991 #if defined(ANDROID)
1013 return syscall(__NR_gettid); 992 return syscall(__NR_gettid);
1014 #else 993 #else
1015 return syscall(SYS_gettid); 994 return syscall(SYS_gettid);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 1284
1306 1285
1307 void Sampler::Stop() { 1286 void Sampler::Stop() {
1308 ASSERT(IsActive()); 1287 ASSERT(IsActive());
1309 SignalSender::RemoveActiveSampler(this); 1288 SignalSender::RemoveActiveSampler(this);
1310 SetActive(false); 1289 SetActive(false);
1311 } 1290 }
1312 1291
1313 1292
1314 } } // namespace v8::internal 1293 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698