diff -urN gdb-5.2.1/gdb/arm-tdep.c arm-elf-gdb-5.2.1/gdb/arm-tdep.c --- gdb-5.2.1/gdb/arm-tdep.c Tue Feb 19 20:20:31 2002 +++ arm-elf-gdb-5.2.1/gdb/arm-tdep.c Fri Sep 20 13:52:49 2002 @@ -1194,8 +1194,12 @@ { if (read_register (ARM_PS_REGNUM) & 0x20) /* Bit 5 is Thumb state bit */ return read_register (THUMB_FP_REGNUM); /* R7 if Thumb */ - else - return read_register (ARM_FP_REGNUM); /* R11 if ARM */ + else { + CORE_ADDR a; + a=read_register (ARM_FP_REGNUM); /* R11 if ARM */ + if(a) return a; + else return read_sp(); /* if fp is not initialized, use sp as fp */ + }; } /* Store into a struct frame_saved_regs the addresses of the saved @@ -2081,10 +2085,12 @@ /* NOTE rearnsha 2002-02-18: for now we allow a non-multi-arch gdb to override these definitions. */ #ifndef ARM_LE_BREAKPOINT -#define ARM_LE_BREAKPOINT {0xFE,0xDE,0xFF,0xE7} +// #define ARM_LE_BREAKPOINT {0xFE,0xDE,0xFF,0xE7} +#define ARM_LE_BREAKPOINT {0x01,0x00,0x9f,0xEF} #endif #ifndef ARM_BE_BREAKPOINT -#define ARM_BE_BREAKPOINT {0xE7,0xFF,0xDE,0xFE} +// #define ARM_BE_BREAKPOINT {0xE7,0xFF,0xDE,0xFE} +#define ARM_BE_BREAKPOINT {0xEF,0x9f,0x00,0x01} #endif #ifndef THUMB_LE_BREAKPOINT #define THUMB_LE_BREAKPOINT {0xfe,0xdf} diff -urN gdb-5.2.1/gdb/config/arm/tm-embed.h arm-elf-gdb-5.2.1/gdb/config/arm/tm-embed.h --- gdb-5.2.1/gdb/config/arm/tm-embed.h Tue Feb 26 15:23:12 2002 +++ arm-elf-gdb-5.2.1/gdb/config/arm/tm-embed.h Fri Sep 20 00:58:05 2002 @@ -27,7 +27,7 @@ /* The remote stub should be able to single-step. */ #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P() 0 +#define SOFTWARE_SINGLE_STEP_P() 1 /* The first 0x20 bytes are the trap vectors. */ #undef LOWEST_PC diff -urN gdb-5.2.1/gdb/gdbserver/linux-low.c arm-elf-gdb-5.2.1/gdb/gdbserver/linux-low.c --- gdb-5.2.1/gdb/gdbserver/linux-low.c Thu Mar 7 21:56:18 2002 +++ arm-elf-gdb-5.2.1/gdb/gdbserver/linux-low.c Fri Sep 20 13:53:35 2002 @@ -49,6 +49,23 @@ extern int regmap[]; #endif +void send_area(char* buf) { + + unsigned int x; + unsigned int code_start = ptrace (PTRACE_PEEKUSER, inferior_pid, + (PTRACE_ARG3_TYPE) 49*4, 0); + unsigned int data_start = ptrace (PTRACE_PEEKUSER, inferior_pid, + (PTRACE_ARG3_TYPE) 50*4, 0); + unsigned int bss_start = data_start; + unsigned int code_end = ptrace(PTRACE_PEEKUSER, inferior_pid, + (PTRACE_ARG3_TYPE) 51*4, 0); + + printf("code at %p - %p, data at %p\n", code_start, code_end, data_start); + + x = data_start - (code_end - code_start); + sprintf(buf,"Text=%x;Data=%x;Bss=%x;", code_start, x, x); +}; + /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ @@ -57,7 +74,7 @@ { int pid; - pid = fork (); + pid = vfork(); if (pid < 0) perror_with_name ("fork"); diff -urN gdb-5.2.1/gdb/gdbserver/server.c arm-elf-gdb-5.2.1/gdb/gdbserver/server.c --- gdb-5.2.1/gdb/gdbserver/server.c Fri Mar 29 20:03:34 2002 +++ arm-elf-gdb-5.2.1/gdb/gdbserver/server.c Fri Sep 20 13:36:18 2002 @@ -188,6 +188,19 @@ else write_enn (own_buf); break; + case 'q': + switch (own_buf[1]) { + case 'C': + own_buf[0] = '\0'; + break; + case 'O': + send_area(own_buf); + break; + default: + own_buf[0] = '\0'; + break; + } + break; case 'C': convert_ascii_to_int (own_buf + 1, &sig, 1); if (target_signal_to_host_p (sig))