Revision 5b50e790 target-ppc/gdbstub.c

b/target-ppc/gdbstub.c
17 17
 * You should have received a copy of the GNU Lesser General Public
18 18
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 19
 */
20
#include "config.h"
21
#include "qemu-common.h"
22
#include "exec/gdbstub.h"
20 23

  
21 24
/* Old gdb always expects FP registers.  Newer (xml-aware) gdb only
22 25
 * expects whatever the target description contains.  Due to a
......
25 28
 * FP regs zero size when talking to a newer gdb.
26 29
 */
27 30

  
28
static int cpu_gdb_read_register(CPUPPCState *env, uint8_t *mem_buf, int n)
31
int ppc_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
29 32
{
33
    PowerPCCPU *cpu = POWERPC_CPU(cs);
34
    CPUPPCState *env = &cpu->env;
35

  
30 36
    if (n < 32) {
31 37
        /* gprs */
32 38
        return gdb_get_regl(mem_buf, env->gpr[n]);
......
70 76
    return 0;
71 77
}
72 78

  
73
static int cpu_gdb_write_register(CPUPPCState *env, uint8_t *mem_buf, int n)
79
int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
74 80
{
81
    PowerPCCPU *cpu = POWERPC_CPU(cs);
82
    CPUPPCState *env = &cpu->env;
83

  
75 84
    if (n < 32) {
76 85
        /* gprs */
77 86
        env->gpr[n] = ldtul_p(mem_buf);

Also available in: Unified diff