binutils-gdb.git
9 years agoUse AM_ENABLE_MULTILIB only if with_target_subdir isn't empty
H.J. Lu [Tue, 31 Mar 2015 18:35:30 +0000 (11:35 -0700)]
Use AM_ENABLE_MULTILIB only if with_target_subdir isn't empty

* configure.ac (AM_ENABLE_MULTILIB): Use only if
${with_target_subdir} isn't empty.
* configure: Regenerated.

9 years agoReplace src-release with src-release.sh
H.J. Lu [Tue, 31 Mar 2015 18:44:00 +0000 (11:44 -0700)]
Replace src-release with src-release.sh

* src-release.sh (DEVO_SUPPORT): Replace src-release with
src-release.sh.

9 years agoAdd --with-system-zlib in gdb
H.J. Lu [Tue, 31 Mar 2015 15:24:02 +0000 (08:24 -0700)]
Add --with-system-zlib in gdb

This patch adds --with-system-zlib and removes --with-zlib in gdb.

* Makefile.in (ZLIB): New.
(ZLIBINC): Likewise.
(INTERNAL_CFLAGS_BASE): Add $(ZLIBINC).
(CLIBS): Add $(ZLIB).
* acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS.
Add -lz to LIBS.
* gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
* top.c (print_gdb_configuration): Remove --with-zlib and
--without-zlib.
* config.in: Regenerated.
* configure: Likewise.

9 years agoRemove the last change on dw2-compress-1.d
H.J. Lu [Tue, 31 Mar 2015 15:20:55 +0000 (08:20 -0700)]
Remove the last change on dw2-compress-1.d

The compressed .debug_info section is bigger than the original in 32-bit.

9 years agoAdd support for Nuxi CloudABI on x86-64
Ed Schouten [Tue, 31 Mar 2015 09:33:45 +0000 (11:33 +0200)]
Add support for Nuxi CloudABI on x86-64

bfd/

* config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
for x86_64-*-cloudabi*.
* configure.ac: Handle x86_64_elf64_cloudabi_vec.
* configure: Regenerated.
* elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
(TARGET_LITTLE_NAME): Likewise.
(ELF_OSABI): Likewise.
(elf64_bed): Likewise.
* targets.c (x86_64_elf64_cloudabi_vec): New.
(_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.

gas/

* configure.tgt (fmt): Set to elf for *-*-cloudabi*.

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add
eelf_x86_64_cloudabi.c.
(eelf_x86_64_cloudabi.c): New.
* configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
x86_64-*-cloudabi*.
* Makefile.in: Regenerated.
* emulparams/elf_x86_64_cloudabi.sh: New file.

9 years agodwarf.exp: Allow generating a stub .debug_line section
Petr Machata [Mon, 23 Feb 2015 14:41:52 +0000 (15:41 +0100)]
dwarf.exp: Allow generating a stub .debug_line section

Example of use:

Dwarf::assemble "foo.s" {
    build_id 0102030405060708

    declare_labels L;
    cu {is_64 0 version 4 addr_size 8} {
DW_TAG_compile_unit {
    {DW_AT_stmt_list $L DW_FORM_sec_offset}
} {
    DW_TAG_subprogram {
# We can now reference the source file.
{DW_AT_decl_file 1 DW_FORM_data1}
    }
}
    }

    lines {is_64 0 version 2 addr_size 8} L {
include_dir "foo"
include_dir "bar"
file_name "foo.c" 1
file_name "bar.c" 1
file_name "baz.c" 2
    }
}

Signed-off-by: Petr Machata <pmachata@redhat.com>
9 years agoRevert the AM_ZLIB change in gas
H.J. Lu [Tue, 31 Mar 2015 12:55:18 +0000 (05:55 -0700)]
Revert the AM_ZLIB change in gas

* configure.ac: Revert the AM_ZLIB change.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.

9 years agoRevert the AM_ZLIB change in binutils
H.J. Lu [Tue, 31 Mar 2015 12:55:46 +0000 (05:55 -0700)]
Revert the AM_ZLIB change in binutils

* configure.ac: Revert the AM_ZLIB change.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.

9 years agoRevert the AM_ZLIB change in bfd
H.J. Lu [Tue, 31 Mar 2015 12:54:55 +0000 (05:54 -0700)]
Revert the AM_ZLIB change in bfd

* configure.ac: Revert the AM_ZLIB change.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.

9 years agoReplace --with-zlib with --with-system-zlib
H.J. Lu [Tue, 31 Mar 2015 12:53:39 +0000 (05:53 -0700)]
Replace --with-zlib with --with-system-zlib

* zlib.m4 (AM_ZLIB): Replace --with-zlib with --with-system-zlib.

9 years agoAdd cpu information to the info os command on linux.
Antoine Tremblay [Wed, 25 Mar 2015 15:49:05 +0000 (11:49 -0400)]
Add cpu information to the info os command on linux.

This patch adds cpu information on linux based on /proc/cpuinfo as :
cpus       Listing of all cpus/cores on the system

This patch also reorders the info os commands so that they are listed
in alphabetical order.

gdb/ChangeLog:

* NEWS: Mention info os cpus support.
* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
(struct osdata_type): Add cpus entry, reorder the entries in
alphabetical order.

gdb/doc/ChangeLog:

* gdb.texinfo (Operating System Auxiliary Information): Add info os cpus
documentation, reorder the info os entries in alphabetical order.

9 years agoFix the triplet regexp to recognize triplets, not only quadruplets
Matthias Klose [Tue, 31 Mar 2015 13:15:42 +0000 (14:15 +0100)]
Fix the triplet regexp to recognize triplets, not only quadruplets

This allows triplets where the vendor is not set.

gdb/ChangeLog:
2015-03-31  Matthias Klose  <doko@ubuntu.com>

* compile/compile.c (compile_to_object): Allow triplets with or
without vendor set.

9 years agoRemove --with-zlib from ld
H.J. Lu [Tue, 31 Mar 2015 10:58:15 +0000 (03:58 -0700)]
Remove --with-zlib from ld

This patch removes --with-zlib from ld.

ld/

* configure.ac (AM_ZLIB): Removed.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.

ld/testsuite/

* ld-bootstrap/bootstrap.exp (extralibs): Add -lz.

9 years agoAdd --with-system-zlib in gas
H.J. Lu [Tue, 31 Mar 2015 10:55:56 +0000 (03:55 -0700)]
Add --with-system-zlib in gas

This patch adds --with-system-zlib and remove --with-zlib in gas.

gas/

* Makefile.am (ZLIBINC): New.
(AM_CFLAGS): Add $(ZLIBINC).
* as.c: (show_usage): Don't check HAVE_ZLIB_H.
(parse_args): Likewise.
* compress-debug.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
(compress_init): Don't check HAVE_ZLIB_H.
(compress_data): Likewise.
(compress_finish): Likewise.
* configure.ac (AM_ZLIB): Removed.
(zlibinc): New.  AC_SUBST.
Add --with-system-zlib.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.

gas/testsuite/

* gas/i386/dw2-compress-1.d: Expect .zdebug_info.

9 years agoAdd --with-system-zlib in binutils
H.J. Lu [Tue, 31 Mar 2015 10:53:41 +0000 (03:53 -0700)]
Add --with-system-zlib in binutils

This patch adds --with-system-zlib and remove --with-zlib in binutils.

* Makefile.am (ZLIB): New.
(ZLIBINC): Likewise.
(AM_CFLAGS): Add $(ZLIBINC).
(readelf_LDADD): Add $(ZLIB).
* configure.ac (AM_ZLIB): Removed.
(zlibdir): New.  AC_SUBST.
(zlibinc): Likewise.
Add --with-system-zlib.
* readelf.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
(uncompress_section_contents): Don't check HAVE_ZLIB_H.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.

9 years agosim: cr16/d10v: restore generated headers dep
Mike Frysinger [Tue, 31 Mar 2015 05:59:44 +0000 (01:59 -0400)]
sim: cr16/d10v: restore generated headers dep

While cleaning up stale make rules, one too many were deleted.  The
build system autogenerates static rules, but not generated files.

9 years agocommon: cgen-mem/cgen-ops: fix extern inline handling
Mike Frysinger [Tue, 31 Mar 2015 05:58:01 +0000 (01:58 -0400)]
common: cgen-mem/cgen-ops: fix extern inline handling

With newer versions of gcc (5.x), the extern inline we're using with the
cgen-{mem,ops} modules no longer work.  Since this code really wants the
gnu inline semantics, use that attribute explicitly.

9 years agosim: m68hc11: fix gcc-5 build error w/restrict keyword
Mike Frysinger [Tue, 31 Mar 2015 05:54:47 +0000 (01:54 -0400)]
sim: m68hc11: fix gcc-5 build error w/restrict keyword

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Mar 2015 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoPR c++/18141
Doug Evans [Mon, 30 Mar 2015 23:41:05 +0000 (16:41 -0700)]
PR c++/18141

gdb/ChangeLog:

PR c++/18141
* cp-namespace.c (cp_search_static_and_baseclasses): Always look for
klass in VAR_DOMAIN.

9 years agoSupport AARCH64_TLSLD_ADD_DTPREL_* relocations.
Jing Yu [Mon, 30 Mar 2015 21:06:12 +0000 (14:06 -0700)]
Support AARCH64_TLSLD_ADD_DTPREL_* relocations.

Also Change _TLS_MODULE_BASE_. Always let it point to the start
of TLS segment.

2015-03-28  Jing Yu  <jingyu@google.com>

* aarch64-reloc.def: New TLSLD_ADD_DTPREL_HI12,
TLSLD_ADD_DTPREL_LO12_NC.
* aarch64.cc (Target_aarch64::define_tls_base_symbol): Always
let _TLS_MODULE_BASE_ point to the start of tls segment.
(Target_aarch64::optimize_tls_reloc): Add cases for
R_AARCH64_TLSLD_ADD_DTPREL_HI12 and
R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
(Target_aarch64::Scan::local): Likewise.
(Target_aarch64::Scan::global): Likewise.
(Target_aarch64::Relocate::relocate): Likewise.
(Target_aarch64::Relocate::relocate_tls): Likewise. And remove
subtracting tls segment size from symbol value for
TLSLD_*_DTPREL relocations.

9 years agoUpdate config.guess and config.sub to the latest upstream version
Ed Schouten [Sat, 28 Mar 2015 07:33:21 +0000 (08:33 +0100)]
Update config.guess and config.sub to the latest upstream version

This version adds support for a platform I'd like to add support for,
namely CloudABI.

9 years agoMake all-bfd depend on all-zlib
H.J. Lu [Mon, 30 Mar 2015 17:17:40 +0000 (10:17 -0700)]
Make all-bfd depend on all-zlib

* Makefile.def (dependencies): Add all-zlib to all-bfd.
* Makefile.in: Regenerated.

9 years agosim: arm: convert to nrun
Mike Frysinger [Mon, 30 Mar 2015 07:05:57 +0000 (03:05 -0400)]
sim: arm: convert to nrun

A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.

9 years agosim: arm: delete NEED_UI_LOOP_HOOK handling
Mike Frysinger [Mon, 30 Mar 2015 06:45:41 +0000 (02:45 -0400)]
sim: arm: delete NEED_UI_LOOP_HOOK handling

9 years agosim: arm: clean up misc warnings
Mike Frysinger [Mon, 30 Mar 2015 06:41:51 +0000 (02:41 -0400)]
sim: arm: clean up misc warnings

Also delete a few unused funcs.

9 years agosim: arm: use common configure options
Mike Frysinger [Mon, 30 Mar 2015 06:27:22 +0000 (02:27 -0400)]
sim: arm: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.

9 years agoRemove three redundant wrapper functions in remote.c
Gary Benson [Mon, 30 Mar 2015 13:58:33 +0000 (14:58 +0100)]
Remove three redundant wrapper functions in remote.c

gdb/ChangeLog:

* remote.c (remote_mourn_1): Remove function.  Update all callers
to use remote_mourn.
(extended_remote_mourn_1): Remove function.  Update all callers
to use extended_remote_mourn.
(extended_remote_attach_1): Remove function.  Update all callers
to use extended_remote_attach.

9 years agoProperly set sh_info for .rela.plt/rel.plt section
H.J. Lu [Mon, 30 Mar 2015 11:40:33 +0000 (04:40 -0700)]
Properly set sh_info for .rela.plt/rel.plt section

Since .rela.plt/rel.plt section may contain relocations against .got.plt
section, we set sh_info for .rela.plt/rel.plt section to .got.plt section
index if target has .got.plt section.

bfd/

PR ld/18169
* elf-bfd.h (elf_backend_data): Add get_reloc_section.
(_bfd_elf_get_reloc_section): New.
* elf.c (_bfd_elf_get_reloc_section): Likewise.
(assign_section_numbers): Call get_reloc_section to look up the
section the relocs apply.
* elfxx-target.h (elf_backend_get_reloc_section): Likewise.
(elfNN_bed): Initialize get_reloc_section with
elf_backend_get_reloc_section.

ld/testsuite/

PR ld/18169
* ld-elf/linkinfo1a.d: Updated.
* ld-elf/linkinfo1b.d: Likewise.

9 years agosim: arm: move COPRO settings to the makefile
Mike Frysinger [Mon, 30 Mar 2015 06:26:24 +0000 (02:26 -0400)]
sim: arm: move COPRO settings to the makefile

These values are the same all the time, so just list them directly in
the Makefile.

9 years agosim: d10v: add missing sim-main.h
Mike Frysinger [Mon, 30 Mar 2015 07:06:20 +0000 (03:06 -0400)]
sim: d10v: add missing sim-main.h

9 years agosim: d10v: convert to nrun
Mike Frysinger [Mon, 30 Mar 2015 06:05:33 +0000 (02:05 -0400)]
sim: d10v: convert to nrun

A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.

9 years agosim: d10v: delete NEED_UI_LOOP_HOOK handling
Mike Frysinger [Mon, 30 Mar 2015 05:44:57 +0000 (01:44 -0400)]
sim: d10v: delete NEED_UI_LOOP_HOOK handling

This hook is used only when linked into gdb, and d10v doesn't have a gdb
port anymore.  Punt it.

9 years agosim: d10v: clean up misc warnings
Mike Frysinger [Mon, 30 Mar 2015 05:38:59 +0000 (01:38 -0400)]
sim: d10v: clean up misc warnings

9 years agosim: d10v: use common configure options
Mike Frysinger [Mon, 30 Mar 2015 05:14:04 +0000 (01:14 -0400)]
sim: d10v: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.

9 years agoopcodes: d10v: fix old style prototype
Mike Frysinger [Mon, 30 Mar 2015 05:40:09 +0000 (01:40 -0400)]
opcodes: d10v: fix old style prototype

9 years agosim: d10v: link in missing testsuite
Mike Frysinger [Mon, 30 Mar 2015 05:06:57 +0000 (01:06 -0400)]
sim: d10v: link in missing testsuite

Looks like historical restructuring in this dir lost the d10v-elf subdir
and no one noticed in the meantime.  Re-add it to the testsuite.

There are some failures, but better some tests get run than none at all.

9 years agosim: cr16: convert to nrun
Mike Frysinger [Mon, 30 Mar 2015 04:13:38 +0000 (00:13 -0400)]
sim: cr16: convert to nrun

A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.

9 years agosim: cr16: delete NEED_UI_LOOP_HOOK handling
Mike Frysinger [Mon, 30 Mar 2015 04:10:27 +0000 (00:10 -0400)]
sim: cr16: delete NEED_UI_LOOP_HOOK handling

This hook is used only when linked into gdb, and cr16 doesn't have a gdb
port anymore.  Punt it.

9 years agosim: cr16: delete dead code
Mike Frysinger [Mon, 30 Mar 2015 04:08:46 +0000 (00:08 -0400)]
sim: cr16: delete dead code

This code is getting in the way of porting to nrun, so just drop it.
If anyone actually cares about this cpu, they can revive it.

9 years agosim: cr16: clean up misc warnings
Mike Frysinger [Mon, 30 Mar 2015 02:41:14 +0000 (22:41 -0400)]
sim: cr16: clean up misc warnings

9 years agosim: cr16: use common configure options
Mike Frysinger [Mon, 30 Mar 2015 02:42:33 +0000 (22:42 -0400)]
sim: cr16: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.

9 years agosim: cr16: add _start symbol to tests [BZ #12385]
Mike Frysinger [Mon, 30 Mar 2015 01:00:20 +0000 (21:00 -0400)]
sim: cr16: add _start symbol to tests [BZ #12385]

The current cr16 testsuite sets up _START, but the linker looks for the
_start symbol.  Add the latter as an alias to the former.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Mar 2015 00:00:07 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agosim: microblaze: convert to nrun
Mike Frysinger [Sun, 29 Mar 2015 21:40:30 +0000 (17:40 -0400)]
sim: microblaze: convert to nrun

This port already was storing its cpu state in the sim_cpu structure, so
converting it over was pretty easy.  It is allocating memory itself still,
but we'll fix that up in the future at some point.

9 years agosim: mcore/microblaze: delete dead code
Mike Frysinger [Sun, 29 Mar 2015 21:20:37 +0000 (17:20 -0400)]
sim: mcore/microblaze: delete dead code

The mcore port had a few structs/defines that were never used.

Similarly, the microblaze port, because it was copied from mcore, has
that same dead code, and more.  The watchpoint logic was never actually
used.  Punt it all.

9 years agosim: microblaze: start a testsuite
Mike Frysinger [Sun, 29 Mar 2015 20:43:48 +0000 (16:43 -0400)]
sim: microblaze: start a testsuite

Since the sim doesn't have any debug support in it, we can only exit
cleanly.  But this is still better than nothing.

Change the default microblaze sim to not dump the debug load output
when running.  No other does this, and it breaks the testsuite.

9 years agosim; testsuite: allow tests to set no output
Mike Frysinger [Sun, 29 Mar 2015 20:41:59 +0000 (16:41 -0400)]
sim; testsuite: allow tests to set no output

If a test doesn't write anything at all to stdout, the current test
framework can't support that.  Even if you put a blank output line:
# output:
the setup happily clobbers that with a default pass/fail string.

Tweak the parsing logic so we only set the output to pass/fail when
the test has no output marker.

9 years agosim: common: sim-arange: fix extern inline handling
Mike Frysinger [Sun, 29 Mar 2015 19:59:01 +0000 (15:59 -0400)]
sim: common: sim-arange: fix extern inline handling

With newer versions of gcc (5.x), the extern inline we're using with the
sim-arange module no longer works.  Since this code really wants the gnu
inline semantics, use that attribute explicitly.

Reported-by: DJ Delorie <dj@redhat.com>
Reported-by: Joel Sherrill <joel.sherrill@oarcorp.com>
9 years agosim: testsuite: make subdir unconditional
Mike Frysinger [Sun, 29 Mar 2015 15:48:46 +0000 (11:48 -0400)]
sim: testsuite: make subdir unconditional

Since the testsuite subdir has to handle dynamic arch values already,
there's no real value in requiring arches to opt in to it.  Most have
a testsuite now anyways, and we're requiring it in the future.

9 years agosim: microblaze: use common configure options
Mike Frysinger [Sun, 29 Mar 2015 08:18:03 +0000 (04:18 -0400)]
sim: microblaze: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.

9 years agoAdd the missing opcodes/ChangeLog entry
H.J. Lu [Sun, 29 Mar 2015 14:46:30 +0000 (07:46 -0700)]
Add the missing opcodes/ChangeLog entry

9 years agoRegenerate opcodes/Makefile.in
H.J. Lu [Sun, 15 Mar 2015 12:41:46 +0000 (05:41 -0700)]
Regenerate opcodes/Makefile.in

* Makefile.in: Regenerated.

9 years agoFix a typo in bfd/ChangeLog
H.J. Lu [Sun, 29 Mar 2015 14:36:27 +0000 (07:36 -0700)]
Fix a typo in bfd/ChangeLog

9 years agoAdd --with-system-zlib in bfd
H.J. Lu [Sun, 29 Mar 2015 14:12:38 +0000 (07:12 -0700)]
Add --with-system-zlib in bfd

This patch adds --with-system-zlib and remove --with-zlib in bfd.

* Makefile.am (ZLIB): New.
(ZLIBINC): Likewise.
(AM_CFLAGS): Add $(ZLIBINC).
(libbfd_la_LIBADD): Add $(ZLIB).
* compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
(decompress_contents): Don't check HAVE_ZLIB_H.
(decompress_contents): Likewise.
(bfd_compress_section_contents): Likewise.
(bfd_get_full_section_contents): Likewise.
(bfd_init_section_decompress_status): Likewise.
(bfd_init_section_compress_status): Likewise.
* configure.ac (AM_ZLIB): Removed
(zlibdir): New.  AC_SUBST.
(zlibinc): Likewise.
Add --with-system-zlib.
* Makefile.in: Regenerated.
* acinclude.m4: Likewise.
* config.in: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.

9 years agosim: mcore: convert to nrun
Mike Frysinger [Sun, 29 Mar 2015 07:53:01 +0000 (03:53 -0400)]
sim: mcore: convert to nrun

A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.

9 years agosim: mcore: use common configure options
Mike Frysinger [Sun, 29 Mar 2015 07:39:01 +0000 (03:39 -0400)]
sim: mcore: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.

9 years agosim: mcore: add a basic testsuite
Mike Frysinger [Sun, 29 Mar 2015 07:35:29 +0000 (03:35 -0400)]
sim: mcore: add a basic testsuite

9 years agosim: mcore: drop sbrk support
Mike Frysinger [Sun, 29 Mar 2015 07:29:29 +0000 (03:29 -0400)]
sim: mcore: drop sbrk support

The sbrk syscall assumes the sbrk region starts after the bss and the
current implementation requires a bss section to exist.  Since there
is no requirement for programs to have a bss in general, we want to
drop this check.  However, there is still the sbrk syscall that wants
to know about the region.

Since libgloss doesn't actually use the sbrk syscall (it implements
sbrk in its own way), and the sim really shouldn't enforce a specific
memory layout on programs, lets simply delete sbrk support.  Now it
always returns an error.

9 years agosim: avr: fix _start testsuite symbol
Mike Frysinger [Sun, 29 Mar 2015 07:36:13 +0000 (03:36 -0400)]
sim: avr: fix _start testsuite symbol

Make sure we use the symbol the linker expects by default, and we export
it so it can be found.

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Mar 2015 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agosim: sh: convert to nrun
Mike Frysinger [Sat, 28 Mar 2015 21:36:03 +0000 (17:36 -0400)]
sim: sh: convert to nrun

A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.

9 years agosim: sh: clean up some warnings
Mike Frysinger [Sat, 28 Mar 2015 19:11:31 +0000 (15:11 -0400)]
sim: sh: clean up some warnings

Mostly converting old style prototypes.  Also include a few missing
headers, and add static/casts where appropriate.

9 years agosim: sh: fix broken handling in DSR reg
Mike Frysinger [Sat, 28 Mar 2015 18:55:11 +0000 (14:55 -0400)]
sim: sh: fix broken handling in DSR reg

A missing */ caused a case statement to be incorrect masked out which
also hide an error where the wrong value was being checked.  Fix both.

9 years agosim: sh: clean up gencode
Mike Frysinger [Sat, 28 Mar 2015 18:09:11 +0000 (14:09 -0400)]
sim: sh: clean up gencode

The build line was missing the normal BUILD_xxx flags.  Once we added
that, we get warnings that weren't shown before.  As we fix those, we
notice that the -d option segfaults because it tries to write readonly
memory.  Fix that too as part of the const/prototype clean up.

9 years agosim: sh: use common configure options
Mike Frysinger [Sat, 28 Mar 2015 17:39:31 +0000 (13:39 -0400)]
sim: sh: use common configure options

In preparation for converting to nrun, call the common functions that
are needed.  This also produces a bunch of warnings, but one thing at
a time.

9 years agoA zlib to tarball
H.J. Lu [Sat, 28 Mar 2015 13:48:43 +0000 (06:48 -0700)]
A zlib to tarball

* src-release.sh (do_proto_toplev): Configure with --target
--with-target-subdir and --disable-multilib.
(BINUTILS_SUPPORT_DIRS): Add zlib.
(GAS_SUPPORT_DIRS): Likewise.
(GDB_SUPPORT_DIRS): Likewise.
(SIM_SUPPORT_DIRS): Likewise.

9 years agosim: avr: convert to nrun.o
Mike Frysinger [Sat, 28 Mar 2015 09:34:55 +0000 (05:34 -0400)]
sim: avr: convert to nrun.o

Looks like a lot more work than actually was -- the main decode loop
was de-indented by dropping the loop as a step-once function.

9 years agosim: avr: start a basic testsuite
Mike Frysinger [Sat, 28 Mar 2015 08:28:46 +0000 (04:28 -0400)]
sim: avr: start a basic testsuite

Just enough to know the sim isn't totally broken.

9 years agosim/erc32: Fix a few compiler warnings
Jiri Gaisler [Tue, 17 Mar 2015 21:02:42 +0000 (22:02 +0100)]
sim/erc32: Fix a few compiler warnings

9 years agosim/erc32: Use memory_iread() function for instruction fetching.
Jiri Gaisler [Tue, 17 Mar 2015 21:02:41 +0000 (22:02 +0100)]
sim/erc32: Use memory_iread() function for instruction fetching.

Use separate memory_iread() function for instruction fetching.
Speeds up execution and allows addition of an MMU at a later stage.

9 years agosim: erc32: strip paren from return statements
Mike Frysinger [Sat, 28 Mar 2015 06:46:48 +0000 (02:46 -0400)]
sim: erc32: strip paren from return statements

9 years agogdb: ft32: new port
James Bowman [Mon, 23 Mar 2015 19:15:32 +0000 (19:15 +0000)]
gdb: ft32: new port

FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.

9 years agosim: ft32: new port
James Bowman [Mon, 23 Mar 2015 19:20:59 +0000 (19:20 +0000)]
sim: ft32: new port

FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Mar 2015 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoDon't run ld-x86-64/pr18160.d for x86_64-*-nacl*
H.J. Lu [Fri, 27 Mar 2015 21:39:39 +0000 (14:39 -0700)]
Don't run ld-x86-64/pr18160.d for x86_64-*-nacl*

* ld-x86-64/pr18160.d: Don't run for x86_64-*-nacl* target.

9 years agoRevert: Code cleanup: Move print_command_1 expr variable scope
Jan Kratochvil [Fri, 27 Mar 2015 19:19:37 +0000 (20:19 +0100)]
Revert: Code cleanup: Move print_command_1 expr variable scope

Simon Marchi:

I think this patch is wrong. Starting with that commit (f30d5c7),
some tests (e.g. mi-break.exp) started to fail for me, because
of gdb segfaulting.

The address of expr is passed to the cleanup. When the cleanup is ran,
expr is no longer in scope, so what is at that address is probably not
safe to use anymore. That's my guess.

gdb/ChangeLog
2015-03-27  Jan Kratochvil  <jan.kratochvil@redhat.com>

Revert:
2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
Code cleanup.
* printcmd.c (print_command_1): Move expr variable scope.

9 years agoRemove the unused cpu_flags_set
H.J. Lu [Fri, 27 Mar 2015 16:29:05 +0000 (09:29 -0700)]
Remove the unused cpu_flags_set

* config/tc-i386.c (cpu_flags_set): Removed.

9 years agoInitialize EXPR in dtrace-probe::dtrace_process_dof_probe
Joel Brobecker [Fri, 27 Mar 2015 13:37:34 +0000 (06:37 -0700)]
Initialize EXPR in dtrace-probe::dtrace_process_dof_probe

GCC 4.4.7 generates the following warning:

 | cc1: warnings being treated as errors
 | dtrace-probe.c: In function ‘dtrace_process_dof_probe’:
 | dtrace-probe.c:416: error: ‘expr’ may be used uninitialized in this function
 | make[2]: *** [dtrace-probe.o] Error 1

Later versions (GCC 5) do a better job and don't generate the warning,
but it does not hurt to pre-initialize "expr" to NULL.

gdb/ChangeLog:

        * dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL.

9 years agoAvoid looking up Input_merge_map multiple times.
Rafael Ávila de Espíndola [Fri, 27 Mar 2015 13:50:23 +0000 (09:50 -0400)]
Avoid looking up Input_merge_map multiple times.

Avoid looking up Input_merge_map multiple times when we know were are
processing items from the same input section.

9 years agoFix gdb_bfd_section_index for special sections
Andrzej Kaczmarek [Fri, 27 Mar 2015 12:09:02 +0000 (12:09 +0000)]
Fix gdb_bfd_section_index for special sections

Indexes returned for special sections are off by one, i.e. with N+4
sections last one has index N+4 returned which is outside allocated
obstack (at the same time index N is not used at all).

In worst case, if sections obstack is allocated up to end of chunk,
writing last section data will cause buffer overrun and some data
corruption.

Here's output from Valgrind::

==14630== Invalid write of size 8
==14630==    at 0x551B1A: add_to_objfile_sections_full (objfiles.c:225)
==14630==    by 0x552768: allocate_objfile (objfiles.c:324)
==14630==    by 0x4E8E2E: symbol_file_add_with_addrs (symfile.c:1171)
==14630==    by 0x4E9453: symbol_file_add_from_bfd (symfile.c:1280)
==14630==    by 0x4E9453: symbol_file_add (symfile.c:1295)
==14630==    by 0x4E94B7: symbol_file_add_main_1 (symfile.c:1320)
==14630==    by 0x514246: catch_command_errors_const (main.c:398)
==14630==    by 0x5150AA: captured_main (main.c:1061)
==14630==    by 0x51123C: catch_errors (exceptions.c:240)
==14630==    by 0x51569A: gdb_main (main.c:1164)
==14630==    by 0x408824: main (gdb.c:32)
==14630==  Address 0x635f3b8 is 8 bytes after a block of size 4,064 alloc'd
==14630==    at 0x4C2ABA0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14630==    by 0x60F797: xmalloc (common-utils.c:41)
==14630==    by 0x5E787FB: _obstack_begin (obstack.c:184)
==14630==    by 0x552679: allocate_objfile (objfiles.c:294)
==14630==    by 0x4E8E2E: symbol_file_add_with_addrs (symfile.c:1171)
==14630==    by 0x4E9453: symbol_file_add_from_bfd (symfile.c:1280)
==14630==    by 0x4E9453: symbol_file_add (symfile.c:1295)
==14630==    by 0x4E94B7: symbol_file_add_main_1 (symfile.c:1320)
==14630==    by 0x514246: catch_command_errors_const (main.c:398)
==14630==    by 0x5150AA: captured_main (main.c:1061)
==14630==    by 0x51123C: catch_errors (exceptions.c:240)
==14630==    by 0x51569A: gdb_main (main.c:1164)
==14630==    by 0x408824: main (gdb.c:32)

gdb/ChangeLog:
* gdb_bfd.c (gdb_bfd_section_index): Fix off-by-one for special
sections.

9 years ago[Patch ]Fix bintest.s failure after previous AArch64 map symbol commit
Renlin Li [Fri, 27 Mar 2015 10:22:46 +0000 (10:22 +0000)]
[Patch ]Fix bintest.s failure after previous AArch64 map symbol commit

2015-03-26  Renlin Li  <renlin.li@arm.com>

binutils/testsuite/
  * binutils-all/readelf.s-64: Support aarch64 case.
  * binutils-all/readelf.ss-64: Likewise.

9 years agoRelax PR 15228 protected visibility restriction
Alan Modra [Fri, 27 Mar 2015 05:11:05 +0000 (15:41 +1030)]
Relax PR 15228 protected visibility restriction

Allows .dynbss copy of shared library protected visibility variables
if they are read-only.

To recap: Copying a variable from a shared library into an executable's
.dynbss is an old hack invented for non-PIC executables, to avoid the
text relocations you'd otherwise need to access a shared library
variable.  This works with ELF shared libraries because global
symbols can be overridden.  The trouble is that protected visibility
symbols can't be overridden.  A shared library will continue to access
it's own protected visibility variable while the executable accesses a
copy.  If either the shared library or the executable updates the
value then the copy diverges from the original.  This is wrong since
there is only one definition of the variable in the application.

So I made the linker report an error on attempting to copy protected
visibility variables into .dynbss.  However, you'll notice the above
paragraph contains an "If".  An application that does not modify the
variable value remains correct even though two copies of the variable
exist.  The linker can detect this situation if the variable was
defined in a read-only section.

PR ld/15228
PR ld/18167
* elflink.c (elf_merge_st_other): Add "sec" parameter.  Don't set
protected_def when symbol section is read-only.  Adjust all calls.
* elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Mar 2015 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agotestsuite: Don't set SYMBOL_PREFIX for x86_64_*_cygwin
Jon Turney [Thu, 26 Mar 2015 20:51:44 +0000 (20:51 +0000)]
testsuite: Don't set SYMBOL_PREFIX for x86_64_*_cygwin

Exactly like x86_64-*-mingw, SYMBOL_PREFIX should not be set to "_" for
x86_64_*_cygwin

gdb/testuite/ChangeLog:

* lib/gdb.exp (gdb_target_symbol_prefix_flags): Don't set
SYMBOL_PREFIX for x86_64-*-cygwin.

9 years agodtrace-probe: Handle error while parsing probe argument.
Joel Brobecker [Thu, 26 Mar 2015 18:14:03 +0000 (19:14 +0100)]
dtrace-probe: Handle error while parsing probe argument.

The debugger on Solaris has been broken since the introduction of
DTrace probe support:

    (gdb) start
    Temporary breakpoint 1 at 0x80593bc: file simple_main.adb, line 4.
    Starting program: /[...]/simple_main
    [Thread debugging using libthread_db enabled]
    No definition of "mutex_t" in current context.

The problem occurs while trying to parse a probe's argument,
and the exception propagates all the way to the top. This patch
fixes the issue by containing the exception and falling back on
using the "long" builtin type if the argument's type could not
be determined.

Also, the parsing should be done using the C language parser.

gdb/ChangeLog:

        * dtrace-probe.c (dtrace_process_dof_probe): Contain any
        exception raised while parsing the probe arguments.
        Force parsing to be done using the C language parser.
        * expression.h (parse_expression_with_language): Declare.
        * parse.c (parse_expression_with_language): New function.

9 years agoAdd myself as a write-after-approval GDB maintainer
Jon Turney [Thu, 26 Mar 2015 20:29:00 +0000 (20:29 +0000)]
Add myself as a write-after-approval GDB maintainer

gdb/ChangeLog:

* MAINTAINERS (Write After Approval): Add "Jon Turney".

9 years agoFix copy-paste typo in -data-write-memory-bytes doc
Simon Marchi [Thu, 26 Mar 2015 19:10:10 +0000 (15:10 -0400)]
Fix copy-paste typo in -data-write-memory-bytes doc

* gdb.texinfo (GDB/MI Data Manipulation): Fix copy-paste typo in
-data-write-memory-bytes.

9 years agoProperly intern constants into psymtab
Andy Wingo [Thu, 26 Mar 2015 18:41:15 +0000 (19:41 +0100)]
Properly intern constants into psymtab

Variables with a DW_AT_const_value but without a DW_AT_location were not
getting added to the partial symbol table.  They are added to the full
symbol table, however, when the compilation unit's psymtabs are
expanded.

Before:

   (gdb) p one
   No symbol "one" in current context.
   (gdb) mt flush-symbol-cache
   (gdb) mt expand one.c
   (gdb) p one
   $1 = 1

After:

   (gdb) p one
   $1 = 1

To the user it's pretty strange, as depending on whether tab completion
has forced expansion of all CUs or not the lookup might succeed, or not
if the failure was already added to the symbol cache.

This commit simply makes sure to add constants to the partial symbol
tables.

gdb/testsuite/ChangeLog:

PR symtab/18148
* gdb.dwarf2/dw2-intercu.S (one, two): Add variables that have a
const_value but not a location.
* gdb.dwarf2/dw2-intercu.exp: Add tests that constants without
location defined in non-main CUs are visible.

gdb/ChangeLog:

PR symtab/18148
* dwarf2read.c (struct partial_die_info): Add has_const_value
member.
(add_partial_symbol): Don't punt on symbols that have const_value
attributes.
(read_partial_die): Detect DW_AT_const_value.

9 years agoCode cleanup: Move print_command_1 expr variable scope
Jan Kratochvil [Thu, 26 Mar 2015 17:44:38 +0000 (18:44 +0100)]
Code cleanup: Move print_command_1 expr variable scope

gdb/ChangeLog
2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup.
* printcmd.c (print_command_1): Move expr variable scope.

9 years agoCode cleanup: Make validate_format parameter const
Jan Kratochvil [Thu, 26 Mar 2015 17:41:24 +0000 (18:41 +0100)]
Code cleanup: Make validate_format parameter const

gdb/ChangeLog
2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup.
* printcmd.c (validate_format): Make the parameter cmdname const.

9 years agoClarify comment on the purpose of the assertion loop in _initialize_remote.
Don Breazeal [Thu, 26 Mar 2015 17:23:05 +0000 (10:23 -0700)]
Clarify comment on the purpose of the assertion loop in _initialize_remote.

gdb/ChangeLog:
2015-03-26  Don Breazeal  <donb@codesourcery.com>

* remote.c (_initialize_remote): Update comment.

9 years ago[AArch64] Fix branch stubs for BE
Tejas Belagod [Thu, 26 Mar 2015 16:20:38 +0000 (16:20 +0000)]
[AArch64] Fix branch stubs for BE

2015-03-26  Tejas Belagod  <tejas.belagod@arm.com>

ld/testsuite
  * ld-aarch64/farcall-back-be.d: New.

bfd/
  * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
  _bfd_final_link_relocate with aarch64_relocate.

9 years agoAdd ELFOSABI_CLOUDABI and SHF_COMPRESSED
H.J. Lu [Fri, 13 Mar 2015 15:14:29 +0000 (08:14 -0700)]
Add ELFOSABI_CLOUDABI and SHF_COMPRESSED

Update from gABI DRAFT - 10 June 2013.

* common.h (ELFOSABI_CLOUDABI): New.
(SHF_COMPRESSED): Likewise.
(ELFCOMPRESS_ZLIB): Likewise.
(ELFCOMPRESS_LOOS): Likewise.
(ELFCOMPRESS_HIOS): Likewise.
(ELFCOMPRESS_LOPROC): Likewise.
(ELFCOMPRESS_HIPROC): Likewise.

9 years agoImport zlib from GCC
H.J. Lu [Fri, 13 Mar 2015 17:40:33 +0000 (10:40 -0700)]
Import zlib from GCC

9 years agoSkip gc-sections if relocation is incompatible
H.J. Lu [Thu, 26 Mar 2015 15:22:08 +0000 (08:22 -0700)]
Skip gc-sections if relocation is incompatible

This patch skips gc-sections if input relocation is incompatible with
output.

bfd/

PR ld/18160
* elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
(bfd_elf_gc_sections): Likewise.

ld/testsuite/

PR ld/18160
* ld-x86-64/pr18160.d: New file.
* ld-x86-64/pr18160.s: Likewise.
* ld-x86-64/pr18160.t: Likewise.
* ld-x86-64/x86-64.exp: Run pr18160.

9 years agoDon't set breakpoints on import stubs on Windows amd64
Pedro Alves [Thu, 26 Mar 2015 10:21:07 +0000 (10:21 +0000)]
Don't set breakpoints on import stubs on Windows amd64

On Windows amd64, setting a breakpoint on a symbol imported from a
shared library after that library is loaded creates a breakpoint with
two locations, one on the import stub, and another in the shared
library, while on i386, the breakpoint is only set in the shared
library.

This is due to the minimal symbol for the import stub not being
correctly given the type mst_solib_trampoline on Windows amd64, unlike
Windows i386.

As currently written, coff_symfile_read is always skipping over the
character after the "__imp_" (amd64) or "_imp_" (i386) prefix,
assuming that it is '_'.  However, while i386 is an underscored
target, amd64 is not.

On x86_64-pc-cygwin, it fixes:

 - FAIL: gdb.base/solib-symbol.exp: foo in libmd
 + PASS: gdb.base/solib-symbol.exp: foo in libmd

Unfortunately, several other tests which passed now fail but that's
because this issue was masking other problems.

No change on i686-pc-cygwin.

gdb/ChangeLog:
2015-03-26  Pedro Alves  <palves@redhat.com>
    Jon TURNEY  <jon.turney@dronecode.org.uk>

* coffread.c (coff_symfile_read): When constructing the name of an
import stub symbol from import symbol for amd64, only skip the
char after _imp_ if the target is underscored (like i386) and the
char is indeed the target's leading char.

9 years agoHandle the effect of skipping prologue
Yao Qi [Thu, 26 Mar 2015 08:29:48 +0000 (08:29 +0000)]
Handle the effect of skipping prologue

break-asm-file.exp has some manually written dwarf to create some line
number entries like this,

  [0x0000013d]  Extended opcode 2: set Address to 0x40053f
  [0x00000144]  Advance Line by 4 to 7
  [0x00000146]  Copy
  [0x00000147]  Extended opcode 2: set Address to 0x400541
  [0x0000014e]  Advance Line by 1 to 8
  [0x00000150]  Copy
  [0x00000151]  Extended opcode 2: set Address to 0x400547
  [0x00000158]  Extended opcode 1: End of Sequence

0x40053f is the start address of function func, and is mapped to line
7.  0x400541 is within function func, and is mapped to line 8.

(gdb) disassemble /r 0x40053f,+8
Dump of assembler code from 0x40053f to 0x400547:
   0x000000000040053f <func+0>: 00 00   add    %al,(%rax)
   0x0000000000400541 <func+2>: 00 00   add    %al,(%rax)
   0x0000000000400543 <func+4>: 00 00   add    %al,(%rax)
   0x0000000000400545 <func+6>: 00 00   add    %al,(%rax)

in the following test,

(gdb) break a/break-asm-file0.s:func
Breakpoint 1 at 0x40053f: file a/break-asm-file0.s, line 7.

As we can see, breakpoint is set at the start address of function func
on x86, which means no prologue is skipped.  On other targets, such as
arm and aarch64, breakpoint is set at the address *after* the start
address, which is mapped to line 8.  Then test fails.

In fact, it is lucky this test doesn't fail on x86 and x86_64, whose
gdbarch method skip_prologue doesn't reply on skip_prologue_using_sal
if producer isn't clang.

  if (find_pc_partial_function (start_pc, NULL, &func_addr, NULL))
    {
      CORE_ADDR post_prologue_pc
= skip_prologue_using_sal (gdbarch, func_addr);
      struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr);

      /* Clang always emits a line note before the prologue and another
 one after.  We trust clang to emit usable line notes.  */
      if (post_prologue_pc
  && (cust != NULL
      && COMPUNIT_PRODUCER (cust) != NULL
      && startswith (COMPUNIT_PRODUCER (cust), "clang ")))
        return max (start_pc, post_prologue_pc);
    }

so it doesn't return and go further to prologue analyser.  Since ".int 0"
isn't an instruction of prologue, nothing is skipped, starting address
is used, and test passes.

however, on targets which don't have such producer checking, the first
line number entry is skipped, and skip_prologue_using_sal returns sal
represents the second line number entry.

The idea of this patch is to force GDB stop at somewhere which is stilled
mapped to line 7 after skipping prologue.  I choose to add a new line
number entry for the following instruction but mapped to the same line (7),
because I see the comments in dwarf2read.c,

   ... fact that two consecutive
   line number entries for the same line is a heuristic used by gcc
   to denote the end of the prologue.

then the line table becomes:

  [0x000000d4]  Extended opcode 2: set Address to 0x400529
  [0x000000db]  Advance Line by 4 to 7
  [0x000000dd]  Copy
  [0x000000de]  Extended opcode 2: set Address to 0x40052a
  [0x000000e5]  Advance Line by 0 to 7
  [0x000000e7]  Copy
  [0x000000e8]  Extended opcode 2: set Address to 0x40052b
  [0x000000ef]  Advance Line by 1 to 8
  [0x000000f1]  Copy
  [0x000000f2]  Extended opcode 2: set Address to 0x40052c
  [0x000000f9]  Extended opcode 1: End of Sequence

gdb/testsuite:

2015-03-26  Yao Qi  <yao.qi@linaro.org>

PR testsuite/18139
* gdb.linespec/break-asm-file0.s (func): New label .Lfunc_2.
Add a line number entry for the same line.
* gdb.linespec/break-asm-file1.s (func): New label .Lfunc_2.
Add a line number entry for the same line.

9 years agoRemove some hard-coded stuff in tests
Yao Qi [Thu, 26 Mar 2015 08:29:48 +0000 (08:29 +0000)]
Remove some hard-coded stuff in tests

There are some hard-coded stuff in .s files, such as .int 0 and
address offset, which isn't portable.  This patch is to replace
".int 0" with nop and address offset with labels.

gdb/testsuite:

2015-03-26  Yao Qi  <yao.qi@linaro.org>

* gdb.linespec/break-asm-file0.s (func2): Use nop instead of
.int 0.
(func): Likewise.  Add .Lfunc_1 label.
Use .Lfunc_1 label.
* gdb.linespec/break-asm-file1.s (func3): Use nop instead of
.int 0.
(func): Likewise.
Use .Lfunc_1 label.

9 years agoCompile break-asm-file{0,1}.s without debug info
Yao Qi [Thu, 26 Mar 2015 08:29:48 +0000 (08:29 +0000)]
Compile break-asm-file{0,1}.s without debug info

If I add some nop into break-asm-file1.s like this,

--- INDEX:/gdb/testsuite/gdb.linespec/break-asm-file1.s
+++ WORKDIR:/gdb/testsuite/gdb.linespec/break-asm-file1.s
@@ -31,8 +31,8 @@ _func:
  .type func, %function
 func:
 .Lbegin_func:
- .int 0
- .int 0
+ nop
+ nop
 .Lend_func:
  .size func, .-func
 .Lend_text1:

I get the following error:

Running gdb/testsuite/gdb.linespec/break-asm-file.exp ...
gdb/testsuite/gdb.linespec/break-asm-file1.s: Assembler messages:^M
gdb/testsuite/gdb.linespec/break-asm-file1.s: Fatal error: duplicate .debug_line sections

break-asm-file0.s and break-asm-file1.s have already had debug information
(written manually), so don't need to generate debug infor for them.

gdb/testsuite:

2015-03-26  Yao Qi  <yao.qi@linaro.org>

* gdb.linespec/break-asm-file.exp: Don't call prepare_for_testing.
Call gdb_compile instead to compile each .s files without debug
information.