原文地址:http://stackoverflow.com/questions/697763/remote-debug-error-with-gdb

在gdb端 set debug remote 1后输入

set architecture i386:x86-64

原文:

Remote debug error with GDB

I tried to remote debug an 32-bit application on x86_64 suse linux, but get this "remote register badly formatted" error.

I start up the gdbserver as listening on port 12345 (gdbserver localhost:12345 my_prog)

And this is the error:

$ gdb
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
(gdb) target remote <ip>:12345
Remote debugging using <ip>:12345
Remote register badly formatted: T0506:0000000000000000;07:80b8bcff00000000;10:4028f0f700000000;
here: 0000000;07:80b8bcff00000000;10:4028f0f700000000;
(gdb)

This is the debug server machine (uname -a):

Linux server 2.6.16.60-0.31-smp #1 SMP Tue Oct 7 16:16:29 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

And this is the debug client machine (uname -a):

Linux client 2.6.16.54-0.2.5-default #1 Mon Jan 21 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

Both machines are running in virtual machines though (VMWare). The gdbserver binary is copied from the client machine to the server machine.

(I remote debug because the runtime environment on the debug server is production-like, and doesn't contain any development tools, access to the source code etc.)

Any suggestions are welcome.

UPDATE: this worked for me by issuing the following command in gdb:

set architecture i386:x86-64

Remote debug error with GDB(remote register badly formatted)相关推荐

  1. Pycharm Remote Debug 出现远程文件找不到的问题

    问题描述 Pycharm Remote Debug 时出现: Remote file xxxxxxxxx is mapped to the local path xxxxxxxxxxxxx and c ...

  2. QT Creator 环境使用 remote debug 调试 arm 程序

    这里使用的 4.8.5 QTE 环境,之前尝试过远程使用 GDB 来调试板子上的 QT 程序,但是没成功.没有调试手段比较痛苦,今天又花了点时间,居然搞定了.粗做记录. 工具版本: 1. QtCrea ...

  3. Java Remote Debug(远程调试)

    Java Remote Debug(远程调试) 作者: ytfei 日期: 2011 年 05 月 08 日 发表评论 (0) 查看评论 新接手的项目采用的是Maven作为编译管理工具,项目内容则是按 ...

  4. linux执行mount命令报错:mount: RPC: Remote system error - Connection refused(NFS:nfs-kernel-server 挂载教程)

    文章目录 什么是NFS挂载目录? 第一次尝试(失败) 第二次尝试(成功) - (ubuntu上安装NFS,Ubuntn上默认没有安装) - (给ubuntu上需要被共享的文件夹赋予权限,保证使用者都能 ...

  5. [Reomting Debug] 巧用VS 的remote debug 功能远程调试程序 经验分享.

    前言:  有时候我们Dev(开发人员)需要debug tester(测试人员)或者customer(客户)的环境,可tester的机器上没有Code,是不是有点着急? 而且是多版本应用且tester ...

  6. Pycharm远程调试之ssh remote debug(二)

    Pycharm远程调试之ssh remote debug (一) 上一篇我们讲了怎么去初步创建一个远程debug的工程,这篇我们来更深一下,讲一下当我们要修改Interperter时要怎么做. 1.创 ...

  7. idea远程调试修改代码_IDEA远程调试(Remote Debug)Java代码指南

    前言 当我们的代码在线上/测试环境运行出现异常需要进行问题定位时,之前的传统做法是:查看异常日志,根据日志定位到出错代码,然后再根据相关参数及异常信息进行推断.但是很多异常问题需要更细致的进行debu ...

  8. java 远程debug 内网_java jdb remote debug - java远程调试

    简介 用log来做调试的方法低效茫目 远程调试是jdk自带的一个有利调试工具,可以快速定位问题 在工作机上使用eclipse来自带的remote debug 问题 运维禁止使用remote debug ...

  9. VStudio 2003 remote debug

    有时候一些程序已经部署到了服务器上,这时程序出现问题,但条件不允许我们在服务器上安装VStudio.或者在调试一些DirectX和一些GDI程序时,无法在同一台机器上用VStudio调试,这时,rem ...

最新文章

  1. 深入理解 wpa_supplicant(二)
  2. MySQL 优化之 index merge(索引合并)
  3. 【架构】典型的 K8s 架构图-核心概念(简化)
  4. 如何高效地学习和工作:计算机行业人员出门便携装备推荐
  5. 【转】PF_RING开发指南
  6. JAVA进阶开发之(数组练习题)
  7. 在哈佛的一场闭门会上,专家说全球各国都应设置“人工智能部长”
  8. MySQL 基础 —— 数据类型、各种变量
  9. python获取每月的最后一天_关于日期:使用Python获取本月的最后一天
  10. linuxdeploy ubuntu 更新gui_在Ubuntu和Linux Mint上释放空间的7种简单方法
  11. keydown - keypress - keyup 用法和区别
  12. ASP导出到Excel
  13. 转《MCU低功耗设计》
  14. AES加密 + Base64编码
  15. 入门教程pythonpython完整教程视频
  16. Ubuntu 16.04 amd64下deb安装gcc5.4和所有依赖
  17. 鸿蒙os桌面怎么布局好看,桌面布局怎样才好看?OriginOS出手,带来百变玩法
  18. linux 打包zip
  19. 移动端混合开发之a标签的坑
  20. 即将改变世界的力量:2021年最具影响力的科技预测

热门文章

  1. 辅助工具:关节绳(2)
  2. OneData方法论-事实表设计
  3. vue表情包公共组件(适用于聊天室)
  4. 学计算机专业可以做施工员吗,建筑工程技术专业毕业只能做施工员?还有这些岗位可以做...
  5. 2021年初级会计实务判断题
  6. STM32开发——点亮LED
  7. PHP在页面展示输出HTML
  8. k8s k3s云容器性能测试-边端云端性能测试
  9. Tongue shape classification by geometric features总结
  10. 怎么使用telnet入侵其他主机