Title: [118038] trunk/Source/_javascript_Core
- Revision
- 118038
- Author
- [email protected]
- Date
- 2012-05-22 13:23:44 -0700 (Tue, 22 May 2012)
Log Message
[BlackBerry] getPlatformThreadRegisters() should fetch target thread's registers
https://bugs.webkit.org/show_bug.cgi?id=87148
Patch by Yong Li <[email protected]> on 2012-05-22
Reviewed by George Staikos.
Our previous implementation of getPlatformThreadRegisters() read registers in current
thread's context but it is supposed to read the target thread's registers.
* heap/MachineStackMarker.cpp:
(JSC::getPlatformThreadRegisters):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (118037 => 118038)
--- trunk/Source/_javascript_Core/ChangeLog 2012-05-22 20:21:58 UTC (rev 118037)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-05-22 20:23:44 UTC (rev 118038)
@@ -1,3 +1,16 @@
+2012-05-22 Yong Li <[email protected]>
+
+ [BlackBerry] getPlatformThreadRegisters() should fetch target thread's registers
+ https://bugs.webkit.org/show_bug.cgi?id=87148
+
+ Reviewed by George Staikos.
+
+ Our previous implementation of getPlatformThreadRegisters() read registers in current
+ thread's context but it is supposed to read the target thread's registers.
+
+ * heap/MachineStackMarker.cpp:
+ (JSC::getPlatformThreadRegisters):
+
2012-05-05 Filip Pizlo <[email protected]>
DFG should support reflective arguments access
Modified: trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp (118037 => 118038)
--- trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp 2012-05-22 20:21:58 UTC (rev 118037)
+++ trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp 2012-05-22 20:23:44 UTC (rev 118038)
@@ -356,14 +356,20 @@
return sizeof(CONTEXT);
#elif OS(QNX)
memset(®s, 0, sizeof(regs));
- regs.tid = pthread_self();
- int fd = open("/proc/self", O_RDONLY);
+ regs.tid = platformThread;
+ // FIXME: If we find this hurts performance, we can consider caching the fd and keeping it open.
+ int fd = open("/proc/self/as", O_RDONLY);
if (fd == -1) {
- LOG_ERROR("Unable to open /proc/self (errno: %d)", errno);
+ LOG_ERROR("Unable to open /proc/self/as (errno: %d)", errno);
CRASH();
}
- devctl(fd, DCMD_PROC_TIDSTATUS, ®s, sizeof(regs), 0);
+ int rc = devctl(fd, DCMD_PROC_TIDSTATUS, ®s, sizeof(regs), 0);
+ if (rc != EOK) {
+ LOG_ERROR("devctl(DCMD_PROC_TIDSTATUS) failed (error: %d)", rc);
+ CRASH();
+ }
close(fd);
+ return sizeof(struct _debug_thread_info);
#elif USE(PTHREADS)
pthread_attr_init(®s);
#if HAVE(PTHREAD_NP_H) || OS(NETBSD)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes