zoukankan      html  css  js  c++  java
  • gdbserver静态编译

    redhat9 编译gdb server(静态编译)
    下载gdb-6.2a.tar:http://download.chinaunix.net/download.php?id=6680&ResourceID=3482
    redhat9:http://archive.download.redhat.com/pub/redhat/linux/9/en/iso/i386/shrike-i386-disc3.iso
    1.另外在vm8中安装,vmtools安装时一直提示gcc找不到,则采用ssh连上。
    2.网络无法连接:Determining IP information for eth0... failed; no link present.
    redhat9一个bug:修改ifcfg-eth0文件,加入check_link_down
    http://blog.csdn.net/ybsun2010/article/details/10019353
    3.redhat9默认开启22,ssh连接时始终‘connection was reset’,关闭防火墙:chkconfig iptables off,并重启。
    4.编译gdb:./configure --prefix(安装目录),make,make install
    注意事项:redhat要用root运行,否则ifconfig,gcc等都找不到。
    5.生成成功后,file gdbserver:ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),但是cat /proc/version:Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)),可见并不与内核版本相同,而与/bin/kill相同。
    4.编译成功后,可以用ssh sz命令下载下来。rz是上传文件。
    ldd:用来打印目标程序(由命令行参数指定)所链接的所有动态库的信息的,如果目标程序没有链接动态库,则打印“not a dynamic executable”.
    5.实际中gdb可以做到完全静态,但是gdbserver无法做到,但是可以在目标上运行就可以了。

  • 相关阅读:
    swift--使用URLSession异步加载图片
    swift--浮点数转换成整数(四舍五入/直接截断)
    swift--环形进度条(UIActivityIndicatorView)的用法
    swift--Timer实现定时器功能,每个一段时间执行具体函数,可以重复,也可以只执行一次
    HTML节点树
    网页的结构
    网页的组成
    HTTP 请求过程
    HTTP 基础术语
    《投资最重要的事》
  • 原文地址:https://www.cnblogs.com/studyskill/p/6609737.html
Copyright © 2011-2022 走看看