public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Internal error with gcc 4.7 elffile
@ 2022-03-08  7:54 Fabian Cenedese
  2022-03-08  8:58 ` Luis Machado
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Cenedese @ 2022-03-08  7:54 UTC (permalink / raw)
  To: gdb

Hello

I'm currently working with a gdb 11.2.90.20220208, used for cross-compiled
.elf files for PowerPC and ARM. There are no problems with elf files from
gcc 7 or 10 or clang 12. However an elf file from a gcc 4.7 leads to an
internal error in gdb. Somehow it can't detect the architecture. It should
be PowerPC as readelf is able to confirm.

----------------------------
Reading symbols from inos_testing.elf...
../../gdb/gdbarch.c:3576: internal-error: bool gdbarch_elf_make_msymbol_special_p(gdbarch*): Assertion `gdbarch != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session?
----------------------------

First I wanted to know if this should work at all or is gcc 4.7 too old to
be supported by gdb 11? If it should still work, is this a known problem?
I couldn't find bugs mentioning gdbarch.c
The same elffile works perfectly fine with a gdb 7.6. A workaround seems
to be to first start gdb, then set architecture before loading elffile.

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Internal error with gcc 4.7 elffile
  2022-03-08  7:54 Internal error with gcc 4.7 elffile Fabian Cenedese
@ 2022-03-08  8:58 ` Luis Machado
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Machado @ 2022-03-08  8:58 UTC (permalink / raw)
  To: Fabian Cenedese, gdb

Hi,

On 3/8/22 07:54, Fabian Cenedese wrote:
> Hello
>
> I'm currently working with a gdb 11.2.90.20220208, used for cross-compiled
> .elf files for PowerPC and ARM. There are no problems with elf files from
> gcc 7 or 10 or clang 12. However an elf file from a gcc 4.7 leads to an
> internal error in gdb. Somehow it can't detect the architecture. It should
> be PowerPC as readelf is able to confirm.
>
> ----------------------------
> Reading symbols from inos_testing.elf...
> ../../gdb/gdbarch.c:3576: internal-error: bool gdbarch_elf_make_msymbol_special_p(gdbarch*): Assertion `gdbarch != NULL' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session?
> ----------------------------
>
> First I wanted to know if this should work at all or is gcc 4.7 too old to
> be supported by gdb 11? If it should still work, is this a known problem?
> I couldn't find bugs mentioning gdbarch.c
> The same elffile works perfectly fine with a gdb 7.6. A workaround seems
> to be to first start gdb, then set architecture before loading elffile.

Although gcc 4.7 is fairly old, it could be a bug or deficiency in GDB.
It might be the case that GDB is not finding what it is looking for,
thus ending up in an inconsistent state.

If you have a reproducer, it might be worth opening a bug ticket against
GDB so developers can take a look: https://sourceware.org/bugzilla/
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-08  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08  7:54 Internal error with gcc 4.7 elffile Fabian Cenedese
2022-03-08  8:58 ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).