gdb调试应用程序

来源:互联网 发布:神创天下骑兵升级数据 编辑:程序博客网 时间:2024/05/16 17:28




gdb调试应用程序

小狼@http://blog.csdn.net/xiaolangyangyang



一、gdb在PC机调试本地程序

        # gdb helloworld

        用GDB调试程序

二、gdb在PC机调试ARM程序

        Taget:        # ./gdbserver 192.168.1.10:2345 helloworld
        Host:          # arm-linux-gdb helloworld
                              > target remote 192.168.1.128:2345

三、coredump使用

        在ARM板上:    # ulimit -c unlimited

                                  执行应用程序,程序出错时会在当前目录下生成core文件

        在PC机上:      将core文件拷贝到PC机上

                                  # arm-linux-gdb ./helloworld ./core

0 0