Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [commit] Fix crash of gdb save-index on a STABS file
Date: Sat, 09 Apr 2011 15:23:00 -0000	[thread overview]
Message-ID: <20110409152300.GA13143@host1.jankratochvil.net> (raw)

Hi,

checked in, index saving functions crashed on NULL psymtabs_addrmap.

 Running gdb/testsuite/gdb.stabs/gdb11479.exp ...
-gdb compile failed, gdb/cc-with-index.sh: line 107:  3487 Segmentation fault      (core dumped) $GDB --batch-silent -nx -ex "file $output_file" -ex "save gdb-index $output_dir"
-UNTESTED: gdb.stabs/gdb11479.exp: gdb11479.exp
-gdb compile failed, cc-with-index.sh: Index file gdb/testsuite.unix.-m32/gdb.stabs/gdb11479.gdb-index exists, won't clobber.
-UNTESTED: gdb.stabs/gdb11479.exp: gdb11479.exp
+PASS: gdb.stabs/gdb11479.exp: Set breakpoints forced_stabs
[...]
+PASS: gdb.stabs/gdb11479.exp: sizeof (e) in test natural_debug_format


No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.

There are some concerns what is a file uses both DWARF and STABS, it may
possibly currently have a regression with .gdb_index.  But that is unrelated
to this patch.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-04/msg00061.html

--- src/gdb/ChangeLog	2011/04/09 11:15:28	1.12915
+++ src/gdb/ChangeLog	2011/04/09 15:20:37	1.12916
@@ -1,5 +1,11 @@
 2011-04-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+	Fix crash of gdb save-index on a STABS file.
+	* dwarf2read.c (write_psymtabs_to_index): Return also on no
+	PSYMTABS_ADDRMAP.
+
+2011-04-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
 	Fix DW_AT_accessibility compatibility with gcc-4.6+.
 	* dwarf2read.c: Include ctype.h.
 	(producer_is_gxx_lt_4_6, dwarf2_default_access_attribute): New
--- src/gdb/dwarf2read.c	2011/04/09 11:15:29	1.522
+++ src/gdb/dwarf2read.c	2011/04/09 15:20:38	1.523
@@ -15843,8 +15843,9 @@
   htab_t cu_index_htab;
   struct psymtab_cu_index_map *psymtab_cu_index_map;
 
-  if (!objfile->psymtabs)
+  if (!objfile->psymtabs || !objfile->psymtabs_addrmap)
     return;
+
   if (dwarf2_per_objfile->using_index)
     error (_("Cannot use an index to create the index"));
 


             reply	other threads:[~2011-04-09 15:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 15:23 Jan Kratochvil [this message]
2011-04-14 20:44 ` Tom Tromey
2011-04-17 16:32   ` [patch+7.3] gdbindex regression: stabs forgotten [Fix crash of gdb save-index on a STABS file] Jan Kratochvil
2011-04-18 17:31     ` Tom Tromey
2011-04-23  4:53       ` [wrong patch] Re: [patch+7.3] gdbindex regression: stabs forgotten Jan Kratochvil
2011-04-25 16:02         ` Tom Tromey
2011-04-23  5:15       ` Jan Kratochvil
2011-04-25 16:03         ` Tom Tromey
2011-04-25 19:41           ` Jan Kratochvil
2011-04-25 20:49             ` Joel Brobecker
2011-04-25 21:28               ` Jan Kratochvil

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=20110409152300.GA13143@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.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