http://bugs.winehq.org/show_bug.cgi?id=32854
Bug #: 32854 Summary: Winedbg on ARM: gdb proxy mode lacks support for reading CPSR Product: Wine Version: 1.5.22 Platform: arm OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: winedbg AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
as the summary says ...
Any command will show the problem:
--- snip --- $ winedbg --gdb ./foo-arm.exe ... Wine-gdb> bt #0 0x4025202c in kill () from /lib/arm-linux-gnueabi/libc.so.6 Register 25 is not available --- snip ---
Making winedbg more verbose yields:
--- snip --- ... Packet: g Reply : 000000000500000000c00840103e00003c969f40300002408988000025000000000000000000000000000840fcfdcf408cc13e40f4fdcf4054a83a402c202540 Packet: p19 Register out of bounds 19 Reply : ... --- snip ---
GDB reads standard registers using the "g" command ('get all registers'). Special purpose registers like CPSR are read using "p" command ('get individual register'). This is currently not supported by winedbg but essential when running proxy mode.
Source: http://source.winehq.org/git/wine.git/blob/d62d7474d43949d71ac34e2157c2fdb83...
--- snip --- 372 #elif defined(__arm__) 373 static struct cpu_register cpu_register_map[] = { 374 REG(R0, 4), 375 REG(R1, 4), 376 REG(R2, 4), 377 REG(R3, 4), 378 REG(R4, 4), 379 REG(R5, 4), 380 REG(R6, 4), 381 REG(R7, 4), 382 REG(R8, 4), 383 REG(R9, 4), 384 REG(R10, 4), 385 REG(Fp, 4), 386 REG(Ip, 4), 387 REG(Sp, 4), 388 REG(Lr, 4), 389 REG(Pc, 4), 390 }; --- snip ---
Side note: For future it might be useful to add support for XML register set definitions (newer GDB versions are XML-aware = more flexible).
Regards