当前位置: 首页 > news >正文

开源网站代码网站seo诊断评分63

开源网站代码,网站seo诊断评分63,网站的设计风格有哪些,上海城隍庙景点介绍文章目录 1. 前言2. GDB 远程调试2.1 准备工作2.1.1 准备 客户端 gdb 程序2.1.2 准备 服务端 gdbserver2.1.3 准备 被调试程序 2.2 调试2.2.1 通过网络远程调试2.2.1.1 通过 gdbserver 直接启动程序调试2.2.1.2 通过 gdbserver 挂接到已运行程序调试 2.2.2 通过串口远程调试2.2… 文章目录 1. 前言2. GDB 远程调试2.1 准备工作2.1.1 准备 客户端 gdb 程序2.1.2 准备 服务端 gdbserver2.1.3 准备 被调试程序 2.2 调试2.2.1 通过网络远程调试2.2.1.1 通过 gdbserver 直接启动程序调试2.2.1.2 通过 gdbserver 挂接到已运行程序调试 2.2.2 通过串口远程调试2.2.1.1 通过 gdbserver 直接启动程序调试2.2.1.2 通过 gdbserver 挂接到已运行程序调试 3. 参考资料 1. 前言 限于作者能力水平本文可能存在谬误因此而给读者带来的损失作者不做任何承诺。 2. GDB 远程调试 GDB 远程调试同时需要 服务端 gdbserver 和 客户端 gdb 两个程序。本文以 ARM32 嵌入式设备内程序的调试为例对 GDB 远程调试方法进行说明。 先对 服务端 gdbserver 和 客户端 gdb 连接拓扑做一个梗概描绘 2.1 准备工作 2.1.1 准备 客户端 gdb 程序 客户端 gdb 通过和 服务端 gdbserver 的交互对运行于目标机器的程序进行调试。笔者使用 Ubuntu 系统作为调试客户端的宿主机即 客户端 gdb 运行于 Ubuntu 下。 笔者测试使用的嵌入式设备 SDK 的交叉编译工具链已经包含了 客户端 gdb 程序无需额外准备 $ arm-linux-gnueabihf-gdb --version GNU gdb (Linaro GDB 2016.02) 7.10.1.20160210-cvs Copyright (C) 2015 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 --hostx86_64-unknown-linux-gnu --targetarm-linux-gnueabihf. Type show configuration for configuration details. For bug reporting instructions, please see: https://bugs.launchpad.net/gcc-linaro. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type help. Type apropos word to search for commands related to word. 如果读者的交叉编译工具链没有包含 gdb在 Ubuntu 下可通过命令安装适用于多架构平台的 gdb 客户端程序 sudo apt-get install gdb-multiarch 2.1.2 准备 服务端 gdbserver gdbserver 运行于被调试的目标机器在本文中目标机器指 ARM 嵌入式设备。笔者是通过 buildroot 构建的 gdbserver不想使用 buildroot 的读者可自行查阅相关资料进行 gdbserver 的构建。 构建好 gdbserver 后将其拷贝到目标机器。笔者是将其拷贝到目标机器的 /usr/bin 目录这样可以不用指定路径运行。 2.1.3 准备 被调试程序 /* test.c */#include unistd.hint main(void) {while (1)sleep(5);return 0; } 编译然后将测试程序 test 拷贝到目标机器 $ arm-linux-gnueabihf-gcc -o test test.c 2.2 调试 2.2.1 通过网络远程调试 2.2.1.1 通过 gdbserver 直接启动程序调试 首先在目标机器(本文是指 ARM32 嵌入式设备)上运行命令 # gdbserver :2345 test Process test created; pid 440 Listening on port 2345 然后在调试器客户端机器(本文是指 Ubuntu)上运行下列命令 $ arm-linux-gnueabihf-gdb GNU gdb (Linaro GDB 2016.02) 7.10.1.20160210-cvs Copyright (C) 2015 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 --hostx86_64-unknown-linux-gnu --targetarm-linux-gnueabihf. Type show configuration for configuration details. For bug reporting instructions, please see: https://bugs.launchpad.net/gcc-linaro. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type help. Type apropos word to search for commands related to word. (gdb) target remote 192.168.3.8:2345 Remote debugging using 192.168.3.8:2345 Reading /root/test from remote target... warning: File transfers from remote targets can be slow. Use set sysroot to access files locally instead. Reading /root/test from remote target... Reading symbols from target:/root/test...done. Reading /lib/ld-linux-armhf.so.3 from remote target... Reading /lib/ld-linux-armhf.so.3 from remote target... Reading symbols from target:/lib/ld-linux-armhf.so.3...(no debugging symbols found)...done. 0xb6fd7a00 in _start () from target:/lib/ld-linux-armhf.so.3 (gdb) 在客户端宿主机(本文指 Ubuntu)启动 arm-linux-gnueabihf-gdb 后通过命令 target remote 192.168.3.8:2345 连接到目标机器。其中192.168.3.8 是目标机器的的 IP。 这时候目标机器(本文是指 ARM 嵌入设备)会输出 gdb 客户端连接的消息 Remote debugging from host 192.168.3.168 # gdbserver :2345 test Process test created; pid 440 Listening on port 2345 Remote debugging from host 192.168.3.168 到此就可以通过 gdb 在客户端宿主机(本文指 Ubuntu)调试目标机器(本文是指 ARM 嵌入设备)的 test 程序了。 2.2.1.2 通过 gdbserver 挂接到已运行程序调试 如果 test 已经运行可以通过 attach 方式启动 gdbserver挂接到 test 程序进行调试。 先在目标机器(本文是指 ARM32 嵌入式设备)上启动 test 程序放入后台运行 # ./test # ps -ef | grep -v grep | grep test445 root ./test 将 gdbserver 挂接到 test 进程 # gdbserver --attach :2345 445 Attached; pid 445 Listening on port 2345 在客户端宿主机(本文指 Ubuntu)启动 arm-linux-gnueabihf-gdb然后通过命令 target remote 192.168.3.8:2345 连接到目标机器调试程序 $ arm-linux-gnueabihf-gdb GNU gdb (Linaro GDB 2016.02) 7.10.1.20160210-cvs Copyright (C) 2015 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 --hostx86_64-unknown-linux-gnu --targetarm-linux-gnueabihf. Type show configuration for configuration details. For bug reporting instructions, please see: https://bugs.launchpad.net/gcc-linaro. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type help. Type apropos word to search for commands related to word. (gdb) target remote 192.168.3.8:2345 Remote debugging using 192.168.3.8:2345 Reading /root/test from remote target... warning: File transfers from remote targets can be slow. Use set sysroot to access files locally instead. Reading /root/test from remote target... Reading symbols from target:/root/test...done. Reading /lib/libc.so.6 from remote target... Reading /lib/ld-linux-armhf.so.3 from remote target... Reading symbols from target:/lib/libc.so.6...(no debugging symbols found)...done. Reading symbols from target:/lib/ld-linux-armhf.so.3...(no debugging symbols found)...done. Reading /lib/ld-linux-armhf.so.3 from remote target... 0xb6e9e134 in nanosleep () from target:/lib/libc.so.6 (gdb) 2.2.2 通过串口远程调试 2.2.1.1 通过 gdbserver 直接启动程序调试 在目标机运行命令 gdbserver /dev/ttyS1 test 其中/dev/ttyS1 为目标机上和客户端宿主机连接的串口设备对象。 在客户端宿主机运行命令 $ arm-linux-gnueabihf-gdb [......] (gdb) target remote /dev/ttyUSB0 其中/dev/ttyUSB0 为客户端宿主机上和目标机连接的串口设备对象。 2.2.1.2 通过 gdbserver 挂接到已运行程序调试 在目标机上依次运行下列命令 # test # ps -ef | grep -v grep | grep test ## 查询 test 进程 PID # gdbserver --attach /dev/ttyS1 445 在客户端宿主机运行命令 $ arm-linux-gnueabihf-gdb [......] (gdb) target remote /dev/ttyUSB0 3. 参考资料 [1] Using the gdbserver program [2] gdbserver(1) — Linux manual page
http://www.pierceye.com/news/436228/

相关文章:

  • 怎么做提货网站auto post wordpress
  • 销售网站怎么做的购物网站建设多少钱
  • 泉州网站关键词排名新乡手机网站建设公司
  • 服务器网站建设软件有哪些电子公章在线制作网站
  • 临沂定制网站建设公司金蝶erp软件
  • 企业网站建设需要提供什么内容电子商务网站搜索引擎设计
  • 免费关键词挖掘网站微信网页版下载 官方
  • 品牌设计公司品牌设计公司排名百家号优化上首页
  • 广州网站车管所深圳东门大厦
  • 门户网站 建设商 排名网站下载的视频怎么变成本地视频
  • 国外品牌设计网站中华始祖堂室内设计
  • 建设网站服务无极最新招聘
  • 广东省建设教育协会是什么网站揭东建设局网站
  • 那家专门做特卖的网站godaddy 搭建网站
  • 网络舆情处置的五个步骤新人学会seo
  • 网站开发要做什么在线网页转pdf
  • 购物网站开发教程中文如何调整wordpress页面的顺序
  • 网站网页设计制作教程成都外贸seo
  • 网站开发的资料设备英国搜索引擎
  • 什么样企业需要网站建设网络规划毕业设计
  • 广东制作公司网站和谐校园网站建设
  • 找潍坊做网站的h5用什么软件做的
  • 南宁网站推广费用0505网页制作与网站建设
  • 2345电视剧网站免费电子营业执照
  • 河北省沧州建设厅网站怎样保存网站资料 做证据
  • 网站同时做竞价和优化可以吗做网站游戏推广赚钱吗
  • 台州建站模板搭建上海远程教育网站设计与开发公司
  • 网站如何做淘客类似58同城分类信息网站开发
  • 网站源码文件安装教程苏州网站建设致宇
  • 免费注册域名网站知乎做网站做图电脑需要什么配置