public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: mlimber <mlimber@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text
Date: Sun, 17 May 2020 10:08:10 -0400	[thread overview]
Message-ID: <0aa224d6-4f0f-b3ba-b23b-08025a8245ab@simark.ca> (raw)
In-Reply-To: <5241b0d8-494a-2222-95cb-eeb8d7beed9d@simark.ca>

On 2020-05-17 10:01 a.m., Simon Marchi wrote:
> Thanks Andreas for the tip, I didn't think of checking the distro patches.
> 
> I was able to reproduce with this:
> 
> $ cat allo.c
> int salut;
> $ gcc allo.c -fPIC -o allo.o -g3 -O0 -c
> $ gcc allo.o -shared -nostdlib -nodefaultlibs -o allo.so
> $ ./gdb -q -nx a.out
> Reading symbols from a.out...
> (gdb) start
> Temporary breakpoint 1 at 0x1136: file test.c, line 1.
> Starting program: /home/smarchi/build/binutils-gdb/gdb/a.out
> /home/smarchi/src/binutils-gdb/gdb/objfiles.h:524: internal-error: sect_index_text not initialized
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)
> 
> Simon
> 

Ah nevermind, I spoke to soon.  I forgot to rebuild the main executable,
to I was still running some old test case.  When doing that, it doesn't
hit the assert:

$ cat allo.c
int salut;
$ gcc allo.c -fPIC -o allo.o -g3 -O0 -c
$ gcc allo.o -shared -nostdlib -nodefaultlibs -o allo.so
$ cat test.c
int main() {}
$ gcc test.c -Wl,--no-as-needed ./allo.so -g3 -O0 -o
$ ./gdb --data-directory=data-directory -q -nx a.out
Reading symbols from a.out...
(gdb) start
Temporary breakpoint 1 at 0x1136: file test.c, line 1.
Starting program: /home/smarchi/build/binutils-gdb/gdb/a.out

Temporary breakpoint 1, main () at test.c:1
1       int main() {}
(gdb)

Simon

  reply	other threads:[~2020-05-17 14:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 17:22 mlimber
2020-05-14 17:32 ` Simon Marchi
2020-05-14 17:48   ` mlimber
2020-05-14 17:57     ` Simon Marchi
2020-05-14 19:12       ` mlimber
2020-05-14 19:28         ` Simon Marchi
2020-05-15 18:33           ` mlimber
2020-05-16 20:39             ` mlimber
2020-05-16 21:05               ` Simon Marchi
2020-05-17  3:31             ` Simon Marchi
2020-05-17  7:01               ` Andreas Schwab
2020-05-17 14:01                 ` Simon Marchi
2020-05-17 14:08                   ` Simon Marchi [this message]
2020-05-18 18:01             ` Simon Marchi
2020-05-18 21:11               ` mlimber
2020-05-18 21:44                 ` Simon Marchi
2020-05-19 14:36                   ` mlimber
2020-05-19 14:44                     ` Simon Marchi
2020-05-20 13:24                       ` mlimber
2020-05-20 14:12                         ` Simon Marchi
2020-05-20 15:04                           ` mlimber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0aa224d6-4f0f-b3ba-b23b-08025a8245ab@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=mlimber@gmail.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).