Skip to content
Snippets Groups Projects
Select Git revision
  • 7f2923c4f73f21cfd714d12a2d48de8c21f11cfe
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

module.c

Blame
  • gdbstub.c 92.70 KiB
    /*
     * gdb server stub
     *
     * This implements a subset of the remote protocol as described in:
     *
     *   https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html
     *
     * Copyright (c) 2003-2005 Fabrice Bellard
     *
     * This library is free software; you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public
     * License as published by the Free Software Foundation; either
     * version 2 of the License, or (at your option) any later version.
     *
     * This library is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     * Lesser General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public
     * License along with this library; if not, see <http://www.gnu.org/licenses/>.
     *
     * SPDX-License-Identifier: LGPL-2.0+
     */
    
    #include "qemu/osdep.h"
    #include "qapi/error.h"
    #include "qemu/error-report.h"
    #include "qemu/ctype.h"
    #include "qemu/cutils.h"
    #include "qemu/module.h"
    #include "trace/trace-root.h"
    #include "exec/gdbstub.h"
    #ifdef CONFIG_USER_ONLY
    #include "qemu.h"
    #else
    #include "monitor/monitor.h"
    #include "chardev/char.h"
    #include "chardev/char-fe.h"
    #include "hw/cpu/cluster.h"
    #include "hw/boards.h"
    #endif
    
    #define MAX_PACKET_LENGTH 4096
    
    #include "qemu/sockets.h"
    #include "sysemu/hw_accel.h"
    #include "sysemu/kvm.h"
    #include "sysemu/runstate.h"
    #include "semihosting/semihost.h"
    #include "exec/exec-all.h"
    #include "sysemu/replay.h"
    
    #ifdef CONFIG_USER_ONLY
    #define GDB_ATTACHED "0"
    #else
    #define GDB_ATTACHED "1"
    #endif
    
    #ifndef CONFIG_USER_ONLY
    static int phy_memory_mode;
    #endif
    
    static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr,
                                             uint8_t *buf, int len, bool is_write)
    {
        CPUClass *cc;
    
    #ifndef CONFIG_USER_ONLY
        if (phy_memory_mode) {