Python 自制GDB v。arm ONE eabi gdb

Python 自制GDB v。arm ONE eabi gdb,python,macos,gdb,Python,Macos,Gdb,在多年使用Windows工具进行嵌入式开发之后,我决定回到我的Unix/Linux根目录,为OSX创建一个构建/调试环境。让我远离的是一个好的可视化调试器。我还喜欢Python和Ruby等语言。由于Python是一种我非常熟悉的语言,因此我希望为GDB编写Python扩展比在窗口之间跳转要好,因为在所谓的可视化编辑器中可以获得不同的信息 所以我有一个问题:在小牛时代,GDB不再被支持,而是被拯救了,我毫不费力地构建了GDB。我能够连接到OSX Segger JLink上的GDB服务器,而该服务器

在多年使用Windows工具进行嵌入式开发之后,我决定回到我的Unix/Linux根目录,为OSX创建一个构建/调试环境。让我远离的是一个好的可视化调试器。我还喜欢Python和Ruby等语言。由于Python是一种我非常熟悉的语言,因此我希望为GDB编写Python扩展比在窗口之间跳转要好,因为在所谓的可视化编辑器中可以获得不同的信息

所以我有一个问题:在小牛时代,GDB不再被支持,而是被拯救了,我毫不费力地构建了GDB。我能够连接到OSX Segger JLink上的GDB服务器,而该服务器又成功地与无处不在的STM32F4发现评估板通信

启用了Python扩展。我可以重置并发出监视器命令来查看和戳内存。但无法加载我的文件:

ARM版本没有抱怨:

$ arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20131129-cvs
Copyright (C) 2013 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-apple-darwin10 --target=arm-none-eabi".
0x08000000 in ?? ()
(gdb) load Faircharge-Flash.elf
Loading section .text, size 0x3e4 lma 0x8000000
Loading section .rodata, size 0x8 lma 0x80003e4
Loading section .ARM, size 0x8 lma 0x80003ec
Loading section .init_array, size 0x8 lma 0x80003f4
Loading section .fini_array, size 0x4 lma 0x80003fc
Loading section .data, size 0x434 lma 0x8000400
Loading section .jcr, size 0x4 lma 0x8000834
Start address 0x8000000, load size 2104
Transfer rate: 2054 KB/sec, 300 bytes/write.

因此,我可以重建ARM版本以包含Python扩展,但为什么GDB/Homebrew不说ELF?

我被告知,由Homebrew构建的OSX版本GDB默认支持x86/64对象代码,ELF支持根本不存在。具体来说,它不是用target=arm none eabi构建的

$ arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20131129-cvs
Copyright (C) 2013 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-apple-darwin10 --target=arm-none-eabi".
0x08000000 in ?? ()
(gdb) load Faircharge-Flash.elf
Loading section .text, size 0x3e4 lma 0x8000000
Loading section .rodata, size 0x8 lma 0x80003e4
Loading section .ARM, size 0x8 lma 0x80003ec
Loading section .init_array, size 0x8 lma 0x80003f4
Loading section .fini_array, size 0x4 lma 0x80003fc
Loading section .data, size 0x434 lma 0x8000400
Loading section .jcr, size 0x4 lma 0x8000834
Start address 0x8000000, load size 2104
Transfer rate: 2054 KB/sec, 300 bytes/write.