Gdb will not read the main file from foreign architecture

I am trying to read the main ARM file on my Linux desktop, but it doesn't seem to be able to identify my main file. Is there a way I can tell gdb what type of my main file is?

$ file ~/daemon
./daemon: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
$ file ~/core
./core: ELF 32-bit LSB core file ARM, version 1 (SYSV), SVR4-style, from './daemon -v -v -v -v -e 10 -t foo'
$ gdb-multiarch ~/daemon ~/core
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from ./daemon...done.
"./core" is not a core dump: File format is ambiguous
(gdb) core-file ~/core 
"./core" is not a core dump: File format is ambiguous

The generation platform is armv4, which gdb-multiarch has announced support for under the "set architecture" list.

EDIT: For clarification, my gdb desktop machine is "x86_64-linux-gnu", namely the 64-bit version of Intel Ubuntu.

+5
source share
2 answers

This can help:

$ gdb-multiarch
...
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) set gnutarget elf32-littlearm
(gdb) file daemon
...
(gdb) target core core
...
(gdb)
+6
source

The following only matters if your desktop (where you are trying to run gdb-multiarch) is x86.

Gdb - . , x86, x86. gdb-, .

x86?

-2

All Articles