GDB segfault when loading elf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Hi folks,
I have just updated from 7-2018-q2-update to 8-2018-q4-major and gdb segfaults while loading elf
Hosts: MacOS 10.14.2, Ubuntu
8-2018-q4-major with segfault:
arm-none-eabi-gdb
GNU gdb (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.50.20181213-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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=
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file firmware.elf
Reading symbols from firmware.elf...
[1] 29555 segmentation fault arm-none-eabi-gdb
7-2018-q2-update on same elf file
~/Downloads/
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 8.1.0.20180315-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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=
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file firmware.elf
Reading symbols from firmware.
(gdb)
Core dumps for both MacOS and Ubuntu attached
tags: | added: gdb |
summary: |
- arm-none-eabi-gdb segfault when loading elf + GDB segfault when loading elf |
I can't reproduce this. I tried with the firmware I'm working on, and with https:/ /github. com/blacksphere /blackmagic.
platform:
``` mac.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu- 4903.251. 3~3/RELEASE_ X86_64 x86_64
$ uname -a
Darwin anaesthetic-
```
Since brew deleted the formula in response to this bug report, I'm using this tap to install 8-2018-q4-major:
``` homebrew- formulae && brew install arm-none-eabi-gcc /armkeil. blob.core. windows. net/developer/ Files/downloads /gnu-rm/ 8-2018q4/ gcc-arm- none-eabi- 8-2018- q4-major- mac.tar. bz2 gnu.org/ licenses/ gpl.html>
$ brew tap ArmMbed/
$ # this installs https:/
$ arm-none-eabi-gdb --version
GNU gdb (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.50.20181213-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law
```
``` mac:tmp. ycHoXRkx nguenthe$ git clone https:/ /github. com/blacksphere /blackmagic mac:tmp. ycHoXRkx nguenthe$ cd blackmagic/ mac:blackmagic nguenthe$ make # ...wait mac:blackmagic nguenthe$ file src/blackmagic* dfu.bin: data dfu.hex: ASCII text, with CRLF line terminators mac:blackmagic nguenthe$ arm-none-eabi-gdb gnu.org/ licenses/ gpl.html> x86_64- apple-darwin10 --target= arm-none- eabi". www.gnu. org/software/ gdb/bugs/>. www.gnu. org/software/ gdb/documentati on/>.
$ cd `mktemp -d`
anaesthetic-
Cloning into 'blackmagic'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 6156 (delta 3), reused 6 (delta 2), pack-reused 6143
Receiving objects: 100% (6156/6156), 2.32 MiB | 8.67 MiB/s, done.
Resolving deltas: 100% (4402/4402), done.
anaesthetic-
anaesthetic-
anaesthetic-
src/blackmagic: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped
src/blackmagic.bin: data
src/blackmagic_dfu: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped
src/blackmagic_
src/blackmagic_
anaesthetic-
GNU gdb (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.50.20181213-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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=
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help". _dfu"? (y or n) y dfu...
Type "apropos word" to search for commands related to "word".
(gdb) file src/blackmagic
Reading symbols from src/blackmagic...
(gdb) file src/blackmagic_dfu
Load new symbol table from "src/blackmagic
Reading symbols from src/blackmagic_
(gdb) quit
```
Can you post your firmware.bin? If you can't, can you strip it down and make a test case that you can share? Right now everyone doing embedd...