• Debugging with GDB阅读[4]


    1.gdb中dump内存

    http://ioctl.eu/blog/2009/05/06/memory_dump_gdb

    Memory Dump with GDB
    Altough gdb is not a real low-level debugger, it has some quite interesting low-level functionality.

    (gdb) dump binary memory dump.raw 0x00800000 0x01000000 

    Dumps the memory of the currently debugged application into a file 'dump.raw' from address 0x00800000 to address 0x01000000.
    Now, this file can be searched, processed or even modified using external tools. If desired, using the command restore it can be loaded back into the memory.
    Interesting regions to dump and inspect can be found using tools like vmmap (on MacOS X). You will be probably most interested in MALLOC_* regions.


    2.http://sourceforge.net/apps/trac/elpi/wiki 系统高级编程

    3.ELF文件在Linux系统中加载进内存之后的布局简图,转自scz

    --------------------------------------------------------------------------

    0x08048000 code .text,代码,只读
    data .data,包含已经初始化的数据,只读
    bss .bss,未初始化数据,初始化成0,读/写
    ... 堆区,动态分配获取的内存从.bss往内存高端增长
    ... (heap),读/写
    ...
    stack 栈区,起始地址大于0xBFFF0000
    arguments main()的形参
    environment 环境变量区域
    program name execve()第一形参,不是argv[0]
    0xBFFFFFFC null(dword) 最后四个字节固定为零
    0xC0000000

    --------------------------------------------------------------------------

  • 相关阅读:
    h5-canvas-渐变
    sublime text 3 无法安装Package Control插件解决办法
    ps;top;free;grep
    lambda
    服务注册与发现eureka
    https证书错误导致maven无法访问仓库出错
    Docker认识和安装
    spring项目发布到linux上遇到的错
    spring aop api
    spring事务
  • 原文地址:https://www.cnblogs.com/moonflow/p/2286649.html
Copyright © 2020-2023  润新知