[Bug 32854] Winedbg on ARM: gdb proxy mode lacks support for reading CPSR

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Feb 13 17:47:29 CST 2013


http://bugs.winehq.org/show_bug.cgi?id=32854

--- Comment #3 from Anastasius Focht <focht at gmx.net> 2013-02-13 17:47:29 CST ---
Hello André,

maybe providing an XML target (register) description "target.xml" to GDB is an
easier way without the need to deal with that messy Soft/HW/VFP support right
now.
This feature query is supported for some years now, starting with GDB 6.7.

See: http://sourceware.org/gdb/current/onlinedocs/gdb/Target-Descriptions.html
("Target Descriptions")

http://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html

Also: https://code.google.com/p/nativeclient/issues/detail?id=2911 (Google
NACL, make the debug stub work on ARM - they encountered the same problem with
supporting CPSR).

--- quote ---
// Without this XML description, ARM GDB assumes a default register
// set with floating point registers f0-f7 and fps between pc and
// cpsr, and GDB queries CPSR via the "p" command for reading a single
// register.
static const char XmlArm[] =
 "<feature name=\"org.gnu.gdb.arm.core\">\n"
 "  <reg name=\"r0\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r1\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r2\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r3\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r4\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r5\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r6\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r7\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r8\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r9\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r10\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r11\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"r12\" bitsize=\"32\" type=\"uint32\"/>\n"
 "  <reg name=\"sp\" bitsize=\"32\" type=\"data_ptr\"/>\n"
 "  <reg name=\"lr\" bitsize=\"32\"/>\n"
 "  <reg name=\"pc\" bitsize=\"32\" type=\"code_ptr\"/>\n"
 "  <reg name=\"cpsr\" bitsize=\"32\" regnum=\"25\"/>\n"
 "</feature>\n";
--- quote ---

The current "cpu_register_map" way is inflexible because it assumes array index
= GDB register index (no holes).

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list