316 lines
10 KiB
Diff
316 lines
10 KiB
Diff
http://sourceware.org/ml/gdb-patches/2014-02/msg00179.html
|
|
Subject: [obv] testsuite: Fix i386-sse-stack-align.exp regression since GDB_PARALLEL
|
|
|
|
|
|
--u3/rZRmxL6MmkK24
|
|
Content-Type: text/plain; charset=us-ascii
|
|
Content-Disposition: inline
|
|
|
|
Hi Tom,
|
|
|
|
$ make check//unix/-m32 RUNTESTFLAGS="gdb.arch/i386-sse-stack-align.exp GDB_PARALLEL=1"
|
|
[...]
|
|
Running /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp ...
|
|
ERROR: (/home/jkratoch/redhat/gdb-clean/gdb/testsuite.unix.-m32/outputs/gdb.arch/i386-sse-stack-align/i386-sse-stack-align) No such file or directory
|
|
|
|
|
|
Checked in.
|
|
|
|
|
|
Jan
|
|
|
|
--u3/rZRmxL6MmkK24
|
|
Content-Type: text/plain; charset=us-ascii
|
|
Content-Disposition: inline; filename=1
|
|
|
|
commit 3c77faf33dc4c7bb693f05f44077ed687e9f8217
|
|
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
Date: Thu Feb 6 23:14:20 2014 +0100
|
|
|
|
Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
|
|
|
|
gdb/testsuite/
|
|
2014-02-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
|
|
* gdb.arch/i386-sse-stack-align.exp: Use standard_output_file.
|
|
|
|
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
|
|
index 8c846b8..13ccaf3 100644
|
|
### a/gdb/testsuite/ChangeLog
|
|
### b/gdb/testsuite/ChangeLog
|
|
## -1,3 +1,8 @@
|
|
+2014-02-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
+
|
|
+ Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
|
|
+ * gdb.arch/i386-sse-stack-align.exp: Use standard_output_file.
|
|
+
|
|
2014-02-06 Doug Evans <xdje42@gmail.com>
|
|
|
|
* gdb.python/py-breakpoint.exp (test_bkpt_eval_funcs): Update expected
|
|
diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
|
|
index b5a7e1e..462df1f 100644
|
|
--- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
|
|
+++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
|
|
@@ -22,7 +22,7 @@ set testfile "i386-sse-stack-align"
|
|
set srcfile ${testfile}.S
|
|
set csrcfile ${testfile}.c
|
|
set executable ${testfile}
|
|
-set binfile ${objdir}/${subdir}/${executable}
|
|
+set binfile [standard_output_file ${executable}]
|
|
set opts {}
|
|
|
|
if [info exists COMPILE] {
|
|
|
|
--u3/rZRmxL6MmkK24--
|
|
|
|
|
|
|
|
commit 20dca09662aa0d2706fbe325b8f448ef74773028
|
|
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
Date: Tue May 13 14:55:53 2014 +0200
|
|
|
|
PR target/16940 S390: Fix erroneous offset in fill_gregset.
|
|
|
|
This fixes a bug that leads to various failures when debugging a
|
|
31-bit inferior with a 64-bit gdb on s390x.
|
|
|
|
Conflicts:
|
|
|
|
gdb/ChangeLog
|
|
|
|
### a/gdb/ChangeLog
|
|
### b/gdb/ChangeLog
|
|
## -1,3 +1,9 @@
|
|
+2014-05-13 Andreas Arnez <arnez@vnet.linux.ibm.com>
|
|
+
|
|
+ PR target/16940
|
|
+ * s390-linux-nat.c (fill_gregset): Remove erroneous offset 4 in
|
|
+ call to regcache_raw_collect.
|
|
+
|
|
2014-05-05 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
* version.in: Set GDB version number to 7.7.1.DATE-cvs.
|
|
--- a/gdb/s390-linux-nat.c
|
|
+++ b/gdb/s390-linux-nat.c
|
|
@@ -164,7 +164,7 @@ fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
|
|
memset (p, 0, 4);
|
|
p += 4;
|
|
}
|
|
- regcache_raw_collect (regcache, reg, p + 4);
|
|
+ regcache_raw_collect (regcache, reg, p);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
http://sourceware.org/ml/gdb-patches/2014-06/msg00550.html
|
|
Subject: Re: ASAN crash regression [Re: [PATCH 2/2] move the demangled_names_hash into the per-BFD]
|
|
|
|
Jan> ./configure ... -fsanitize=address
|
|
Jan> echo 'void f(){}main(){}'|gcc -x c++ - -g;ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer ./gdb -batch a.out -ex 'file a.out'
|
|
|
|
Readily seen with valgrind as well.
|
|
|
|
Here's my proposed fix.
|
|
|
|
Tom
|
|
|
|
commit 3a93a67ad0ea3495f67c9708673345b73de2d806
|
|
Author: Tom Tromey <tromey@redhat.com>
|
|
Date: Mon Jun 16 03:17:19 2014 -0600
|
|
|
|
fix memory errors with demangled name hash
|
|
|
|
This fixes a regression that Jan pointed out.
|
|
|
|
The bug is that some names were allocated by dwarf2read on the objfile
|
|
obstack, but then passed to SYMBOL_SET_NAMES with copy_name=0. This
|
|
violates the invariant that the names must have a lifetime tied to the
|
|
lifetime of the BFD.
|
|
|
|
The fix is to allocate names on the per-BFD obstack.
|
|
|
|
I looked at all callers, direct or indirect, of SYMBOL_SET_NAMES that
|
|
pass copy_name=0. Note that only the ELF and DWARF readers do this;
|
|
other symbol readers were never updated (and perhaps cannot be,
|
|
depending on the details of the formats). This is why the patch is
|
|
relatively small.
|
|
|
|
Built and regtested on x86-64 Fedora 20.
|
|
|
|
2014-06-16 Tom Tromey <tromey@redhat.com>
|
|
|
|
* dwarf2read.c (fixup_go_packaging, dwarf2_compute_name)
|
|
(dwarf2_physname, read_partial_die)
|
|
(guess_partial_die_structure_name, fixup_partial_die)
|
|
(guess_full_die_structure_name, anonymous_struct_prefix)
|
|
(dwarf2_name): Use per-BFD obstack.
|
|
|
|
### a/gdb/ChangeLog
|
|
### b/gdb/ChangeLog
|
|
## -1,5 +1,13 @@
|
|
2014-06-16 Tom Tromey <tromey@redhat.com>
|
|
|
|
+ * dwarf2read.c (fixup_go_packaging, dwarf2_compute_name)
|
|
+ (dwarf2_physname, read_partial_die)
|
|
+ (guess_partial_die_structure_name, fixup_partial_die)
|
|
+ (guess_full_die_structure_name, anonymous_struct_prefix)
|
|
+ (dwarf2_name): Use per-BFD obstack.
|
|
+
|
|
+2014-06-16 Tom Tromey <tromey@redhat.com>
|
|
+
|
|
* minsyms.h (prim_record_minimal_symbol)
|
|
(prim_record_minimal_symbol_and_info): Update comments.
|
|
|
|
--- a/gdb/dwarf2read.c
|
|
+++ b/gdb/dwarf2read.c
|
|
@@ -7745,9 +7745,10 @@ fixup_go_packaging (struct dwarf2_cu *cu)
|
|
if (package_name != NULL)
|
|
{
|
|
struct objfile *objfile = cu->objfile;
|
|
- const char *saved_package_name = obstack_copy0 (&objfile->objfile_obstack,
|
|
- package_name,
|
|
- strlen (package_name));
|
|
+ const char *saved_package_name
|
|
+ = obstack_copy0 (&objfile->per_bfd->storage_obstack,
|
|
+ package_name,
|
|
+ strlen (package_name));
|
|
struct type *type = init_type (TYPE_CODE_MODULE, 0, 0,
|
|
saved_package_name, objfile);
|
|
struct symbol *sym;
|
|
@@ -8365,6 +8366,8 @@ dwarf2_compute_name (const char *name,
|
|
long length;
|
|
const char *prefix;
|
|
struct ui_file *buf;
|
|
+ char *intermediate_name;
|
|
+ const char *canonical_name = NULL;
|
|
|
|
prefix = determine_prefix (die, cu);
|
|
buf = mem_fileopen ();
|
|
@@ -8541,19 +8544,25 @@ dwarf2_compute_name (const char *name,
|
|
}
|
|
}
|
|
|
|
- name = ui_file_obsavestring (buf, &objfile->objfile_obstack,
|
|
- &length);
|
|
+ intermediate_name = ui_file_xstrdup (buf, &length);
|
|
ui_file_delete (buf);
|
|
|
|
if (cu->language == language_cplus)
|
|
- {
|
|
- const char *cname
|
|
- = dwarf2_canonicalize_name (name, cu,
|
|
- &objfile->objfile_obstack);
|
|
+ canonical_name
|
|
+ = dwarf2_canonicalize_name (intermediate_name, cu,
|
|
+ &objfile->per_bfd->storage_obstack);
|
|
+
|
|
+ /* If we only computed INTERMEDIATE_NAME, or if
|
|
+ INTERMEDIATE_NAME is already canonical, then we need to
|
|
+ copy it to the appropriate obstack. */
|
|
+ if (canonical_name == NULL || canonical_name == intermediate_name)
|
|
+ name = obstack_copy0 (&objfile->per_bfd->storage_obstack,
|
|
+ intermediate_name,
|
|
+ strlen (intermediate_name));
|
|
+ else
|
|
+ name = canonical_name;
|
|
|
|
- if (cname != NULL)
|
|
- name = cname;
|
|
- }
|
|
+ xfree (intermediate_name);
|
|
}
|
|
}
|
|
|
|
@@ -8562,7 +8571,7 @@ dwarf2_compute_name (const char *name,
|
|
|
|
/* Return the fully qualified name of DIE, based on its DW_AT_name.
|
|
If scope qualifiers are appropriate they will be added. The result
|
|
- will be allocated on the objfile_obstack, or NULL if the DIE does
|
|
+ will be allocated on the storage_obstack, or NULL if the DIE does
|
|
not have a name. NAME may either be from a previous call to
|
|
dwarf2_name or NULL.
|
|
|
|
@@ -8677,7 +8686,8 @@ dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
|
|
retval = canon;
|
|
|
|
if (need_copy)
|
|
- retval = obstack_copy0 (&objfile->objfile_obstack, retval, strlen (retval));
|
|
+ retval = obstack_copy0 (&objfile->per_bfd->storage_obstack,
|
|
+ retval, strlen (retval));
|
|
|
|
do_cleanups (back_to);
|
|
return retval;
|
|
@@ -15508,7 +15518,7 @@ read_partial_die (const struct die_reader_specs *reader,
|
|
default:
|
|
part_die->name
|
|
= dwarf2_canonicalize_name (DW_STRING (&attr), cu,
|
|
- &objfile->objfile_obstack);
|
|
+ &objfile->per_bfd->storage_obstack);
|
|
break;
|
|
}
|
|
break;
|
|
@@ -15793,7 +15803,7 @@ guess_partial_die_structure_name (struct partial_die_info *struct_pdi,
|
|
if (actual_class_name != NULL)
|
|
{
|
|
struct_pdi->name
|
|
- = obstack_copy0 (&cu->objfile->objfile_obstack,
|
|
+ = obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
|
|
actual_class_name,
|
|
strlen (actual_class_name));
|
|
xfree (actual_class_name);
|
|
@@ -15879,8 +15889,9 @@ fixup_partial_die (struct partial_die_info *part_die,
|
|
else
|
|
base = demangled;
|
|
|
|
- part_die->name = obstack_copy0 (&cu->objfile->objfile_obstack,
|
|
- base, strlen (base));
|
|
+ part_die->name
|
|
+ = obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
|
|
+ base, strlen (base));
|
|
xfree (demangled);
|
|
}
|
|
}
|
|
@@ -18557,7 +18568,7 @@ guess_full_die_structure_name (struct die_info *die, struct dwarf2_cu *cu)
|
|
&& actual_name[actual_name_len
|
|
- die_name_len - 1] == ':')
|
|
name =
|
|
- obstack_copy0 (&cu->objfile->objfile_obstack,
|
|
+ obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
|
|
actual_name,
|
|
actual_name_len - die_name_len - 2);
|
|
}
|
|
@@ -18603,7 +18614,7 @@ anonymous_struct_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
|
if (base == NULL || base == DW_STRING (attr) || base[-1] != ':')
|
|
return "";
|
|
|
|
- return obstack_copy0 (&cu->objfile->objfile_obstack,
|
|
+ return obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
|
|
DW_STRING (attr), &base[-1] - DW_STRING (attr));
|
|
}
|
|
|
|
@@ -18943,8 +18954,9 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
|
|
char *base;
|
|
|
|
/* FIXME: we already did this for the partial symbol... */
|
|
- DW_STRING (attr) = obstack_copy0 (&cu->objfile->objfile_obstack,
|
|
- demangled, strlen (demangled));
|
|
+ DW_STRING (attr)
|
|
+ = obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
|
|
+ demangled, strlen (demangled));
|
|
DW_STRING_IS_CANONICAL (attr) = 1;
|
|
xfree (demangled);
|
|
|
|
@@ -18967,7 +18979,7 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
|
|
{
|
|
DW_STRING (attr)
|
|
= dwarf2_canonicalize_name (DW_STRING (attr), cu,
|
|
- &cu->objfile->objfile_obstack);
|
|
+ &cu->objfile->per_bfd->storage_obstack);
|
|
DW_STRING_IS_CANONICAL (attr) = 1;
|
|
}
|
|
return DW_STRING (attr);
|
|
|