Commit Graph

83281 Commits

Author SHA1 Message Date
Mike Frysinger 2f783c1f4b opcodes: d10v: fix old style prototype 2015-03-30 02:20:22 -04:00
Mike Frysinger e8713c0f02 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.
2015-03-30 01:06:57 -04:00
Mike Frysinger 247ac9ee6e 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.
2015-03-30 00:13:38 -04:00
Mike Frysinger 4b0cc5edf4 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.
2015-03-30 00:10:27 -04:00
Mike Frysinger 1e504675bd 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.
2015-03-30 00:08:46 -04:00
Mike Frysinger 5aedb83b9c sim: cr16: clean up misc warnings 2015-03-29 22:41:14 -04:00
Mike Frysinger ca968da465 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.
2015-03-29 22:42:33 -04:00
Mike Frysinger 4daf7a7c3a 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.
2015-03-29 21:02:03 -04:00
GDB Administrator 970bed001b Automatic date update in version.in 2015-03-30 00:00:07 +00:00
Mike Frysinger 2b4bc832a7 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.
2015-03-29 17:40:30 -04:00
Mike Frysinger 97eca187b3 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.
2015-03-29 17:25:53 -04:00
Mike Frysinger 191ec03314 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.
2015-03-29 16:45:49 -04:00
Mike Frysinger 744b9a190b 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.
2015-03-29 16:41:59 -04:00
Mike Frysinger 92fc6153a6 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>
2015-03-29 16:02:17 -04:00
Mike Frysinger 6dae8a88bf 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.
2015-03-29 11:51:13 -04:00
Mike Frysinger 3c0ae30962 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.
2015-03-29 11:51:13 -04:00
H.J. Lu b9d94d62d1 Add the missing opcodes/ChangeLog entry 2015-03-29 07:46:30 -07:00
H.J. Lu 421fc49cd6 Regenerate opcodes/Makefile.in
* Makefile.in: Regenerated.
2015-03-29 07:37:50 -07:00
H.J. Lu b51724e857 Fix a typo in bfd/ChangeLog 2015-03-29 07:36:27 -07:00
H.J. Lu 243340ad57 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.
2015-03-29 07:13:00 -07:00
Mike Frysinger ea6b7543b4 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.
2015-03-29 04:14:27 -04:00
Mike Frysinger 525887679c 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.
2015-03-29 04:14:27 -04:00
Mike Frysinger 36cb69e0ed sim: mcore: add a basic testsuite 2015-03-29 04:14:27 -04:00
Mike Frysinger aac18a6996 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.
2015-03-29 04:14:27 -04:00
Mike Frysinger 4f5cce88bf 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.
2015-03-29 04:14:27 -04:00
GDB Administrator 2a2ec787bf Automatic date update in version.in 2015-03-29 00:00:08 +00:00
Mike Frysinger 62454d3da2 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.
2015-03-28 17:45:31 -04:00
Mike Frysinger 5fa71a1b13 sim: sh: clean up some warnings
Mostly converting old style prototypes.  Also include a few missing
headers, and add static/casts where appropriate.
2015-03-28 17:45:31 -04:00
Mike Frysinger 02131c7ff6 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.
2015-03-28 17:45:30 -04:00
Mike Frysinger ed4d32c28a 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.
2015-03-28 17:45:30 -04:00
Mike Frysinger 6d89786cb3 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.
2015-03-28 17:45:30 -04:00
H.J. Lu 92c695a14f 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.
2015-03-28 06:48:43 -07:00
Mike Frysinger 9943d3185a 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.
2015-03-28 05:35:29 -04:00
Mike Frysinger eca5fe422e sim: avr: start a basic testsuite
Just enough to know the sim isn't totally broken.
2015-03-28 04:28:46 -04:00
Jiri Gaisler 510d27512c sim/erc32: Fix a few compiler warnings 2015-03-28 03:05:35 -04:00
Jiri Gaisler 102b920e11 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.
2015-03-28 03:00:19 -04:00
Mike Frysinger 5831e29bc1 sim: erc32: strip paren from return statements 2015-03-28 02:57:08 -04:00
James Bowman 49d45b20c0 gdb: ft32: new port
FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.
2015-03-28 02:13:34 -04:00
James Bowman f46e4eb78b sim: ft32: new port
FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.
2015-03-28 02:12:33 -04:00
GDB Administrator 113d38f929 Automatic date update in version.in 2015-03-28 00:00:09 +00:00
H.J. Lu 5e228181d4 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.
2015-03-27 14:40:43 -07:00
Jan Kratochvil 1c4ff0802b 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.
2015-03-27 20:19:37 +01:00
H.J. Lu e04de5e3b5 Remove the unused cpu_flags_set
* config/tc-i386.c (cpu_flags_set): Removed.
2015-03-27 09:29:05 -07:00
Joel Brobecker 79498702ef 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.
2015-03-27 08:25:28 -07:00
Rafael Ávila de Espíndola 0916f9e741 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.
2015-03-27 09:51:15 -04:00
Andrzej Kaczmarek ce9c0ca18f 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.
2015-03-27 12:09:02 +00:00
Renlin Li 72a9c03c27 [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.
2015-03-27 10:22:46 +00:00
Alan Modra b84171287f 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.
2015-03-27 16:20:32 +10:30
GDB Administrator f3308340ab Automatic date update in version.in 2015-03-27 00:00:08 +00:00
Jon Turney 7ec911b0fb 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.
2015-03-26 22:37:24 +00:00