Revision 5b50e790 target-sh4/gdbstub.c

b/target-sh4/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
/* Hint: Use "set architecture sh4" in GDB to see fpu registers */
22 25
/* FIXME: We should use XML for this.  */
23 26

  
24
static int cpu_gdb_read_register(CPUSH4State *env, uint8_t *mem_buf, int n)
27
int superh_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
25 28
{
29
    SuperHCPU *cpu = SUPERH_CPU(cs);
30
    CPUSH4State *env = &cpu->env;
31

  
26 32
    switch (n) {
27 33
    case 0 ... 7:
28 34
        if ((env->sr & (SR_MD | SR_RB)) == (SR_MD | SR_RB)) {
......
70 76
    return 0;
71 77
}
72 78

  
73
static int cpu_gdb_write_register(CPUSH4State *env, uint8_t *mem_buf, int n)
79
int superh_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
74 80
{
81
    SuperHCPU *cpu = SUPERH_CPU(cs);
82
    CPUSH4State *env = &cpu->env;
83

  
75 84
    switch (n) {
76 85
    case 0 ... 7:
77 86
        if ((env->sr & (SR_MD | SR_RB)) == (SR_MD | SR_RB)) {

Also available in: Unified diff