1 原因

“Note that other tutorials also add a "-S" parameter so QEMU starts the kernel stopped, however this is ommitted deliberately. The "-S" parameter would allow gdb to set an initial breakpoint anywhere in the kernel before kernel execution begins. Unfortunately, a change made to the gdbserver in QEMU, to support debugging 32- and 16-bit guest code in an x86_64 session breaks the -S functionality. The symptoms are that gdb prints out "Remote 'g' packet reply is too long:", and fails to interact successfully with QEMU. The suggested fix is to run the QEMU until it is in 64-bit code (i.e. after the boot loader has finished and the kernel started) before connecting from gdb (omitting the -S parameter). To debug a running kernel, this is sufficient; it is the method we will take.”

2 解决办法

gdb源码根目录/gdb/remote.c里面,将

if (buf_len > 2 * rsa->sizeof_g_packet)
error (_(“Remote ‘g’ packet reply is too long: %s”), rs->buf);
修改为
if (buf_len > 2 * rsa->sizeof_g_packet) {
    rsa->sizeof_g_packet = buf_len ;
    for (i = 0; i < gdbarch_num_regs (gdbarch); i++) {
        if (rsa->regs->pnum == -1)
            continue;
        if (rsa->regs->offset >= rsa->sizeof_g_packet)
            rsa->regs->in_g_packet = 0;
        else  
            rsa->regs->in_g_packet = 1;
    }     
}
也就是说,不是作为error来处理,而是按照下面的处理方式进行处理。
 
3 cpu是x86_64
 
 
 

gdb 8.0.1连接qemu时,出现“Remote 'g' packet reply is too long”的更多相关文章

  1. JSP Tomcat8.0运行连接池时发生异常【AbstractMethodError oracle.jdbc.driver.T4CConnection.isValid(I)Z】

    原创 2015年12月28日 11:38:01 2004 一.Tomcat8.0运行连接池时发生异常: AbstractMethodError oracle.jdbc.driver.T4CConnec ...

  2. 【解决】WordPress FTP连接服务器时出错,请检查设置,WordPress需要访问您网页服务器的权限

    刚装好wordpress,发现后台预装了两个插件,想删掉,结果要登录FTP,死活登不上去,提示"连接服务器时出错,请检查设置,WordPress需要访问您网页服务器的权限",网上也 ...

  3. Navicat Premium 12连接Oracle时提示oracle library is not loaded的问题解决

    Navicat Premium 12连接Oracle时提示oracle library is not loaded的问题解决 链接时遇到的问题,记录一下 如果还没有安装工具,请参考:Navicat P ...

  4. (转)PLSQL Developer 12.0.7连接Oracle12c数据库

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/sl1992/article/details/80489413 1.下载安装PL/SQL Develo ...

  5. 使用mongo-java-driver-3.0.2连接MongoDB数据库

    这里使用的mongodb的java驱动版本是:3.0.2,文件名mongo-java-driver-3.0.2.jar  博客本地下载下载网址(也可以下载其它版本):http://central.ma ...

  6. TCP报文格式和三次握手——三次握手三个tcp包(header+data),此外,TCP 报文段中的数据部分是可选的,在一个连接建立和一个连接终止时,双方交换的报文段仅有 TCP 首部。

    from:https://blog.csdn.net/mary19920410/article/details/58030147 TCP报文是TCP层传输的数据单元,也叫报文段. 1.端口号:用来标识 ...

  7. centos7 远程连接mongodb时,27017端口连接不上的解决办法

    一.问题描述:centos 7 上安装mongogdb,然后通过另外一台电脑用pymongo连接mongodb时,报错:连接拒绝 解决过程: 1.修改mongo.conf文件 命令:sudo  vi  ...

  8. C#连接solr时提示 java内存异常 (jetty和tomcat哪个更High) java.lang.OutOfMemoryError

    C#连接solr时提示 java内存异常   java.lang.OutOfMemoryError 时间:20180130 09:51:13.329,消息:异常消息<?xml version=& ...

  9. 远程连接mongodb时,27017端口连接不上的解决办法

    一.背景描述: 我在linux  RED7上安装了mongodb,并没有修改mongodb的配置文件.然后通过另外一台电脑用pymongo连接mongodb时,报错:timeout. ping IP ...

随机推荐

  1. 正确地使用Context

    Context应该是每个入门Android开发的程序员第一个接触到的概念,它代表当前的上下文环境,可以用来实现很多功能的调用,语句如下. //获取资源管理器对象,进而可以访问到例如 string, c ...

  2. SQL server 表操作语句(原创)

    CREATE TABLE [dbo].[test] ([id11] int NOT NULL ,[as] varchar(1) COLLATE Chinese_PRC_CI_AS NULL ,[asd ...

  3. torch.nn.Embedding理解

    Pytorch官网的解释是:一个保存了固定字典和大小的简单查找表.这个模块常用来保存词嵌入和用下标检索它们.模块的输入是一个下标的列表,输出是对应的词嵌入. torch.nn.Embedding(nu ...

  4. 获取本地验证码cookie

    window.document.onkeydown = function (evt) { evt = (evt) ? evt : window.event; if (evt.keyCode) { if ...

  5. 在你的Android手机上运行Linux

    之前试过许多方法(也就几种),像什么Complete Linux Installer,Debian noroot,利用已有的Linux构造Bootstrap之类,要么就是复杂得要命(调了两天没有调出来 ...

  6. LUA-点号和冒号

    由于LUA中是模拟类,没有class, 所以这里是使用.号来访问实例的成员 re.SetActive(re, re.activeSelf == false); 而冒号:  则是种语法糖,省略了上面代码 ...

  7. 集训第四周(高效算法设计)L题 (背包贪心)

    Description   John Doe is a famous DJ and, therefore, has the problem of optimizing the placement of ...

  8. mat 服务器分析大堆,本地打开

    1:服务器执行nohup sh /usr/local/mat/ParseHeapDump.sh es9.bin org.eclipse.mat.api:suspects org.eclipse.mat ...

  9. Mybatis_HelloWorld

    [梗概] 1.根据XML配置文件(全局配置文件,有数据源的一些运行信息)创建一个SqlSessionFactory对象. 2.sql映射文件:配置了每一个sql以及sql的封装规则. 3.将sql映射 ...

  10. 九度oj 题目1070:今年的第几天?

    题目1070:今年的第几天? 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:6832 解决:3779 题目描述: 输入年.月.日,计算该天是本年的第几天. 输入: 包括三个整数年(1< ...