GDB+GdbServer: ARM程序调试
嵌入式arm linux环境中gdb+gdbserver调试
编译过程中碰到的问题:
嵌入式 编译gdb源码时出现“set but not used [-Werror=unused-but-set-variable]”问题的解决办
gdbserver: linux-x86-low.c error: sys/reg.h: No such file or directory
gdbserver 调试时gdb运行c时崩溃不能正常调试
当使用gdb+gdbserver方式调试动态程序时,出现如下错误:
GDB: Unable to find dynamic linker breakpoint function.
解决方法:
set sysroot /absolute/path/to/copy/of/target/root/filesystem
我的方式:
set sysroot /workteam/yinguicai/data/rootfs/20a
target remote 10.15.3.199:1234
handle SIG32 nostop noprint
handle SIG33 nostop noprint
注意:如果是可执行程序是静态编辑则没有这个告警,但依然解决不了watch问题
(gdb) p &n
$2 = (int *) 0xbefdec70
(gdb) dis
(gdb) watch *((int *) 0xbefdec70)
Hardware watchpoint 2: *((int *) 0xbefdec70)
(gdb) c
Continuing.
Warning:
Could not insert hardware watchpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
交叉编译GDB工具, 使GDB运行在嵌入式板子上
Child terminated with signal = 5
Child terminated with signal = 0x5 (SIGTRAP)
GDBserver exiting
yinguicai@Cpl-IBP-Product:~/data/nfs$ ./arm-linux-gdb hicore_20a
GNU gdb (GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /data1/data_yinguicai/nfs/hicore_20a...done.
warning: Remote failure reply: E01
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x400a8e50 in ?? ()
(gdb) c
Continuing.
Cannot access memory at address 0x0
warning: Could not load shared library symbols for 9 libraries, e.g. /lib/libcrypt.so.0.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
^C
Program received signal SIGINT, Interrupt.
0x40278f60 in ?? ()
(gdb) b gui_toplevel_handle_msg_syserror
Function "gui_toplevel_handle_msg_syserror" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gui_toplevel_handle_msg_syserror) pending.
(gdb) c
Continuing.
Cannot access memory at address 0x0
^C
Program received signal SIGINT, Interrupt.
0x40278f60 in ?? ()
(gdb) b displaySingleAudio
Cannot access memory at address 0x0
Breakpoint 2 at 0x17767c: file dataManagement/audio/wavLoader.c, line 244.
(gdb) c
Continuing.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) bt
No stack.
(gdb) q
GDB+GdbServer: ARM程序调试的更多相关文章
- 用Eclipse和GDB构建ARM交叉编译和在线调试环境
我们在 Linux 主机中搭建我们的开发环境,使用 Ubuntu 10.04 LTS 为例. 搭建应用开发环境 安装 JRE Eclipse 依赖于Java 环境,所以必须先安装 JRE 或 JD ...
- Eclipse-cdt 配合 gdbserver 进行 arm 程序远程调试 上
做嵌入式Linux开发也不用再羡慕windows程序员VS集成开发环境的强大,我们同样能够搭建出给力的IDE. 今天在这里记录一下我使用Eclipse-cdt,gdb,gdbserver搭建远程arm ...
- GDB+GDBServer调试Linux应用程序
参考:http://blog.csdn.net/shanghaiqianlun/article/details/7820401 一.gdb+gdbserver总体介绍 远程调试环境由宿主机GDB和目标 ...
- 嵌入式arm linux环境中gdb+gdbserver调试
一.前言嵌入式Linux系统中,应用开发过程中,很多情况下,用户需要对一个应用程序进行反复调试,特别是复杂的程序.采用GDB方法调试,由于嵌入式系统资源有限性,一般不能直接在目标系统上进行调试,通常采 ...
- 在QEMU中调试ARM程序【转】
转自:http://linuxeden.com/html/develop/20100820/104409.html 最近我想调试一个运行在QEMU模拟ARM系统中的Linux程序.我碰到过一些麻烦,因 ...
- Linux应用调试 :使用gdb和gdbserver进行远程调试
一.引言 在日常程序开发中不免遇到类似空指针操作导致程序崩溃的问题,所以需要一定的手段去定位bug,而断点调试是普遍使用的技巧,比如Windows中用VC++的debug模式进单步运行.断点调试等,而 ...
- QT Creator 环境使用 remote debug 调试 arm 程序
这里使用的 4.8.5 QTE 环境,之前尝试过远程使用 GDB 来调试板子上的 QT 程序,但是没成功.没有调试手段比较痛苦,今天又花了点时间,居然搞定了.粗做记录. 工具版本: 1. QtCrea ...
- arm linux 移植 gdb/gdbserver
背景 调试工具gdb的使用对于嵌入式Linux开发人员来说是一项不可少的技能. 目前,嵌入式 Linux系统中,主要有三种远程调试方法,分别适用于不同场合的调试工作:用ROM Monitor调试目标机 ...
- GDB + gdbserver 远程调试android native code
原文地址:GDB + gdbserver 远程调试android native code 作者:tq08g2z 以调试模拟器中的native library code为例. Host: ubuntuT ...
随机推荐
- python版GetTickCount()
time.clock() return the current processor time as a floating point number expressed in seconds. 即返回一 ...
- python的Django使用mysql基本操作
环境:Centos6.6 ,python2.6 准备工作: mysql的安装,以及MySQL-python的安装 http://www.cnblogs.com/zychengzhiit1/p/4437 ...
- Vue 2.0 Application Sample
===搭建Demo=== http://blog.csdn.net/wangjiaohome/article/details/51728217 ===单页Application=== http://b ...
- Ajax使用进阶
关于Ajax的概念不再做解释了,我想通过三个小例子来让大家对Ajax有个清晰的认识.要学习它,必须从最基础最原始的方式开始认识,然后通过使用框架来提升效率,逐步认识它. 一.原生js版(注册的用户名是 ...
- 关于使用jqmobi前端框架在phonegap平台上开发时的日期时间选择控件
jqmobi(appframework)作为Intel的一款html5移动前端框架,以其自身轻量级和容易上手获得了很多移动HTML5开发者的喜爱,相对于jquerymobile,它可以说将jQuery ...
- Mixins 改成使用高阶组件调用
把组件放在另外一个组件的 render 方法里面, 并且利用了 {...this.props} {...this.state} 这些 JSX 展开属性 对比下2种代码: 原始方式: <!DOC ...
- [USACO 2017 Jan Gold] Tutorial
Link: 传送门 A: 按值大小插入后用树状数组统计两边个数 #include <bits/stdc++.h> using namespace std; #define X first ...
- hdu 5868 2016 ACM/ICPC Asia Regional Dalian Online 1001 (burnside引理 polya定理)
Different Circle Permutation Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K ...
- BZOJ 1202 [HNOI2005]狡猾的商人(并查集)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=1202 [题目大意] 给出一些区间和的数值,问是否存在矛盾 [题解] 用并查集维护前缀和 ...
- python基础之组合继承多态
组合 1.什么是组合 组合就是一个类的对象具备一个指向另外一个类的对象的属性 2.为何用组合 组合可以减少代码冗余 3.如何使用 class People: def __init__(self,nam ...