Revision 5b50e790 target-lm32/gdbstub.c

b/target-lm32/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
#include "hw/lm32/lm32_pic.h"
21 24

  
22
static int cpu_gdb_read_register(CPULM32State *env, uint8_t *mem_buf, int n)
25
int lm32_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
23 26
{
27
    LM32CPU *cpu = LM32_CPU(cs);
28
    CPULM32State *env = &cpu->env;
29

  
24 30
    if (n < 32) {
25 31
        return gdb_get_reg32(mem_buf, env->regs[n]);
26 32
    } else {
......
45 51
    return 0;
46 52
}
47 53

  
48
static int cpu_gdb_write_register(CPULM32State *env, uint8_t *mem_buf, int n)
54
int lm32_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
49 55
{
50
    LM32CPU *cpu = lm32_env_get_cpu(env);
51
    CPUClass *cc = CPU_GET_CLASS(cpu);
56
    LM32CPU *cpu = LM32_CPU(cs);
57
    CPUClass *cc = CPU_GET_CLASS(cs);
58
    CPULM32State *env = &cpu->env;
52 59
    uint32_t tmp;
53 60

  
54 61
    if (n > cc->gdb_num_core_regs) {

Also available in: Unified diff