This is an automated email from Gerrit. Alamy Liu ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/3323
-- gerrit commit e635afd7474901225786ec1b1a2a5bb6a81c8b9f Author: Alamy Liu <[email protected]> Date: Fri Nov 20 16:05:21 2015 -0800 *NOT patch* gdb: 'p' and 'g' commands not synchronized in aarch64 CAUTION This is NOT a patch. This is just a signal to let people know there is a problem. So one could take correct action based on one's own condition. Problem Either got "gdb requested a non-existing register" error in gdb_get_register_packet() called by '$p42#d6' packet, or gdb client drops connection because of "Remote 'g' packet reply is too long: ..." Investigation a) Provide only core registers (aarch64.xml + aarch64-core.xml), the "gdb requested a non-existing register" happens. Reason: gdb client asks for fpcr & fpsr which is not exists. b) Providing full registers (core + fpu), got "Remote 'g' packet reply is too long: ..." problem. Reason: gdb client expects only CORE registers In short * 'p' and 'g' commands are not synchronized. * gdb client uses its own aarch64 feature table somehow (this is not really a problem). Solution Once the problem is known, there are many solutions could be applied. Since this seems to be GDB's problem, simply raise a signal so other people won't suffer in this problem again. The hacking comes with this commit requires full register feature table defined (i.e.: CORE + FPU). Core: X0..X30, SP, PC, SPSR (PSTATE) FPU: V0..V31, FPCR, FPSR And Core registers takes reg_num 0..33, FPCR & FPSR are 66 & 67. I ignore V0..V31 read/write for now (leaving it invalid. r->valid = 0). Note <gdb>/gdb/features/aarch64.xml <gdb>/gdb/features/aarch64-core.xml <gdb>/gdb/features/aarch64-fpu.xml Change-Id: If5ed1fc460bdbcdfb973eee6eac36f2d7543b6b0 Signed-off-by: Alamy Liu <[email protected]> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 10b01c6..56bb492 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1156,6 +1156,12 @@ static int gdb_get_registers_packet(struct connection *connection, if (retval != ERROR_OK) return gdb_error(connection, retval); + /* Alamy: Hacking for aarch64 + * gdb client's 'p' & 'g' commands are not synchronized + */ + if (is_aarch64(target)) + reg_list_size = 34; + for (i = 0; i < reg_list_size; i++) reg_packet_size += DIV_ROUND_UP(reg_list[i]->size, 8) * 2; -- ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
