Thanks for the patch, Robert, I suspect that using pre-processor logic to determine the architecture will only help in the case where lldb is compiled using the same architecture as the debug target. For instance, when running an i386 application on x86_64, the lower register half of the x86_64 registers should be reported.
Options include removing the logging code, adding parameters to PtraceWrapper to specify the target architecture, lifting the code to a base class of ReadRegOperation and ReadGPROperation, or lifting the code to RegisterContext_x86_64/RegisterContext_i386. If maintaining the logging code is preferred, please consider limiting the log to the case where “log enable” uses the --verbose parameter. Cheers, - Ashok From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, July 01, 2013 3:22 PM To: [email protected] Subject: [lldb-dev] [Bug 16511] New: FreeBSD ProcessMonitor.cpp uses AMD64 register names unconditionally Bug ID 16511<http://llvm.org/bugs/show_bug.cgi?id=16511> Summary FreeBSD ProcessMonitor.cpp uses AMD64 register names unconditionally Product lldb Version unspecified Hardware PC OS other Status NEW Severity normal Priority P Component All Bugs Assignee [email protected]<mailto:[email protected]> Reporter [email protected]<mailto:[email protected]> Classification Unclassified Created attachment 10803<attachment.cgi?id=10803> [details]<attachment.cgi?id=10803&action=edit> untested patch to fix build on i386-kfreebsd-gnu (and possibly i386-freebsd) I found this on GNU/kFreeBSD, but I believe FreeBSD would be affected as well. Please let me know if I may be missing something. As you can see in last attempted build for i386-kfreebsd-gnu [1], ProcessMonitor.cpp won't build because it's referring to registers which exist on AMD64, but not on IA32. I think this could be fixed using special case for i386 and amd64. Please see attached patch (UNTESTED). [1] https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=kfreebsd-i386&ver=1%3A3.3-3&stamp=1372679969 ________________________________ You are receiving this mail because: * You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
