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 ...
随机推荐
- "The /usr/local directory is not writable."解决方法
sudo chown -R $(whoami) /usr/local brew prune
- 2018CCPC 中国大学生程序设计竞赛 网络赛
链接 1.括号序列贪心/CF&51nod原题 [分析]: 贪心,每次到i的时候,假如你要在i里面要卖掉股票,获益是a[i], 肯定要在前面要么:1)把已经卖了的变成不买不卖,需要-a[j], ...
- python笔记四:面向对象
1.类 class Student(object): def __init__(self, name, score): self.name = name self.score = score 1)__ ...
- 解决JPA懒加载典型的N+1问题-注解@NamedEntityGraph
因为在设计一个树形结构的实体中用到了多对一,一对多的映射关系,在加载其关联对象的时候,为了性能考虑,很自然的想到了懒加载. 也由此遇到了N+1的典型问题 : 通常1的这方,通过1条SQL查找得到1个对 ...
- 【Bzoj3527】【Luogu3338】[Zjoi2014]力(FFT)
题面 Bzoj Luogu 题解 先来颓柿子 $$ F_i=\sum_{j<i}\frac{q_iq_j}{(i-j)^2}-\sum_{j>i}\frac{q_iq_j}{(i-j)^2 ...
- 现代CSS清除浮动
清除浮动 排除远古时代的hack解决方案,比如那些要兼容IE6~8的方法.其实总结起来,大致有三种方法: overflow 原理解析:块级格式上下文规定了页面必须自动包含突出的浮动元素! 而overf ...
- Beaglebone Black教程BeagleBone Black安装最新系统映像
Beaglebone Black教程BeagleBone Black安装最新系统映像 BeagleBone Black安装最新系统映像 Beaglebone Black虽然已经预装了Debian操作系 ...
- 【BZOJ 3238】【AHOI 2013】差异
http://www.lydsy.com/JudgeOnline/problem.php?id=3238 后缀数组裸题但是\(5\times 10^5\)貌似常数有点大就过不了?(我的sa常数那么大想 ...
- 【DFS】【图论】NOIP2014寻找道路
[NOIP2014]寻找道路 题目描述 Description 在有向图G中,每条边的长度均为1,现给定起点和终点,请你在图中找一条从起点到终点的路径,该路径满足以下条件: 1.路径上的所有点的出边所 ...
- java中interface的完整表述
我用一个工具:java Decompiler反编译工具查看jar包源码的时候,出现了以下代码: public abstract interface AbsITest{} 在网上搜索了一下: 我对这种情 ...