Patch for arm-linux gdbserver
Keith.Walker
Keith.Walker@arm.com
Mon Dec 3 06:09:00 GMT 2001
This patch allows the gdbserver to built for the arm-linux target.
ChangeLog:
2001-12-03 Keith Walker <keith.walker@arm.com>
* gdbserver/low-linux.c (arm_register_u_addr): added.
(initialize_arch): added for ARM target.
* config/arm/nm-linux.h (U_REGS_OFFSET) defined.
(REGISTER_U_ADDR) defined.
* config/arm/tm-linux.h (ARM_GNULINUX_TARGET) defined.
Index: gdb/gdbserver/low-linux.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/low-linux.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 low-linux.c
*** low-linux.c 2001/07/26 02:23:58 1.11
--- low-linux.c 2001/12/03 13:43:30
*************** initialize_arch (void)
*** 541,546 ****
--- 541,559 ----
{
return;
}
+
+ #elif defined(ARM_GNULINUX_TARGET)
+ int arm_register_u_addr(blockend, regnum)
+ int blockend;
+ int regnum;
+ {
+ return blockend + REGISTER_BYTE(regnum);
+ }
+
+ static void
+ initialize_arch ()
+ {
+ }
#endif
CORE_ADDR
Index: gdb/config/arm/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nm-linux.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 nm-linux.h
*** nm-linux.h 2001/10/14 20:42:07 1.6
--- nm-linux.h 2001/12/03 13:43:58
***************
*** 23,28 ****
--- 23,37 ----
#include "nm-linux.h"
+ /* ptrace register ``addresses'' are absolute. */
+
+ #define U_REGS_OFFSET 0
+
+ #ifdef GDBSERVER
+ #define REGISTER_U_ADDR(addr,blockend,regno) \
+ (addr) = arm_register_u_addr ((blockend),(regno))
+ #endif /* GDBSERVER */
+
/* Return sizeof user struct to callers in less machine dependent routines */
extern int kernel_u_size (void);
#define KERNEL_U_SIZE arm_linux_kernel_u_size()
Index: gdb/config/arm/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-linux.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 tm-linux.h
*** tm-linux.h 2001/11/30 20:27:09 1.7
--- tm-linux.h 2001/12/03 13:44:09
***************
*** 21,26 ****
--- 21,28 ----
#ifndef TM_ARMLINUX_H
#define TM_ARMLINUX_H
+ #define ARM_GNULINUX_TARGET
+
/* Include the common ARM target definitions. */
#include "arm/tm-arm.h"
Keith Walker keith.walker@arm.com Tel:+44 (1628) 427732
ARM Ltd http://www.arm.com
More information about the Gdb-patches
mailing list