File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4949 * the high 16 bits, the rest is 0 padded. The top 3 registers are
5050 * not used by h8/300, and ignored (0 filled).
5151 */
52+ typedef int32 gdb_register_size_t ;
5253#define NUM_REGS 13
53- #define NUM_REG_BYTES (NUM_REGS*sizeof(int32 ))
54+ #define NUM_REG_BYTES (NUM_REGS*sizeof(gdb_register_size_t ))
5455
5556int debuggerfd ;
5657int monitorport ;
@@ -209,12 +210,12 @@ static void db_handle_packet(char* packet) {
209210 break ;
210211 case 'g' : /* return the value of the CPU registers */
211212 /*
212- * GDB expects 13 x 32 bit registers. The real register value is in
213- * the high 16 bits, the rest is 0 padded. The top 3 registers are
214- * not used by h8/300, and ignored (0 filled).
213+ * Older GDB versions expect 13 x 32 bit registers. For these, the
214+ * real register value is in the high 16 bits, the rest is 0 padded.
215+ * The top 3 registers are not used by h8/300, and ignored (0 filled).
215216 */
216-
217217 memset (db_registers , 0 , sizeof (db_registers ));
218+
218219 for (i = 0 ; i < 8 ; i ++ ) {
219220 db_registers [4 * i ] = reg [i ];
220221 db_registers [4 * i + 1 ] = reg [i + 8 ];
You can’t perform that action at this time.
0 commit comments