Bug 22739 - gdb crashes trying to load executable and core from another OS/arch
Summary: gdb crashes trying to load executable and core from another OS/arch
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 8.0.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 20:27 UTC by Міша
Modified: 2019-02-09 01:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Міша 2018-01-22 20:27:27 UTC
Trying to load the executable and the core produced by it on a 64-bit Linux machine into gdb running on 32-bit FreeBSD box, I reliably get a core dump from the debugger itself:

% gdb801 mx core.39591
GNU gdb (GDB) 8.0.1 [GDB v8.0.1 for FreeBSD]
Copyright (C) 2017 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 "i386-portbld-freebsd11.1".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Помилка адресації(записано core)
% gdb801 gdb801 gdb801.core
...
Reading symbols from gdb801...(no debugging symbols found)...done.
[New LWP 100203]
Core was generated by `gdb801 mx core.39591'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x088ef100 in htab_remove_elt ()
(gdb) where
#0  0x088ef100 in htab_remove_elt ()
#1  0x08432c79 in tdesc_use_registers(gdbarch*, target_desc const*, tdesc_arch_data*) ()
#2  0x0813d8f9 in ?? ()
#3  0x0838764f in gdbarch_find_by_info(gdbarch_info) ()
#4  0x082e350e in set_gdbarch_from_file(bfd*) ()
#5  0x0836d4e3 in exec_file_attach(char const*, int) ()
#6  0x083bdf53 in ?? ()
#7  0x083bda29 in gdb_main(captured_main_args*) ()
#8  0x080f56a9 in main ()
Comment 1 jhb 2019-02-09 01:02:59 UTC
Can you still reproduce this?  If so, can you build the devel/gdb port with the DEBUG option enabled to get a better backtrace from the gdb core?