Commit Graph

86052 Commits

Author SHA1 Message Date
Joel Brobecker edd8878834 update copyright year printed by GDB, GDBserver and gdbreplay.
gdb/ChangeLog:

        * top.c (print_gdb_version): Change copyright year in version
        message.

gdb/gdbserver/ChangeLog:

        * gdbreplay.c (gdbreplay_version): Change copyright year in
        version message.
        * server.c (gdbserver_version): Likewise.
2016-01-01 08:26:14 +04:00
Joel Brobecker 0f7b3ef4dc Rotate the GDB ChangeLog
Per GDB the "Start of New Year Procedure", this patch
  - renames the current ChangeLog into ChangeLog-2015;
  - starts a new ChangeLog file.

gdb/ChangeLog:

        * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
2016-01-01 08:19:16 +04:00
GDB Administrator 9ec80f8515 Automatic date update in version.in 2016-01-01 00:00:08 +00:00
Andrew Burgess 5ba8bc973c opcodes/arc: Support dmb instruction with no operands
In this GCC commit:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00735.html
GCC started emitting dmb instructions with no operands.  The intention
was that dmb with no operands should be an alias for 'dmb 0'.

The following patch extends the arc opcodes library to support dmb with
no operands.

opcodes/ChangeLog:

	* arc-tbl.h (dmb): Add a no operand version of dmb.
2015-12-31 21:55:45 +00:00
Mike Frysinger 8e26d677a2 sim: m68hc11: fix default endian
The previous commit here set the default to little instead of big.
A typo lost when reviewing the different targets in parallel.
2015-12-30 23:48:17 -05:00
Mike Frysinger eca4255a1a sim: cris/m68hc11: move default endian/alignment to configure 2015-12-30 21:01:58 -05:00
GDB Administrator 356a418c5d Automatic date update in version.in 2015-12-31 00:00:10 +00:00
Mike Frysinger cec99e6b2c sim: h8300: inline sim_state_initialize
All the state is handled already by the common cpu allocation which
zeros out the entire state.
2015-12-30 06:05:02 -05:00
Mike Frysinger 2a2757ac7e sim: h8300: simplify h8300_reg_{fetch,store} funcs
We can leverage the cpu->regs array rather than going through the
function helpers to get nice compact code.

Further, fix up the return values: return -1 when we can't find a
register (and let the caller write out warnings), return 2/4 when
we actually write out that amount, and handle the zero reg.
2015-12-30 06:02:27 -05:00
Mike Frysinger 4ca9d09e82 sim: h8300: switch to common sim-resume 2015-12-30 05:27:18 -05:00
Mike Frysinger 5658c2571f sim: h8300: move default endian/alignment to configure 2015-12-30 05:20:41 -05:00
Mike Frysinger 9950eccba1 sim: simplify STATE_MY_NAME setup
No point in writing basename ourselves when libiberty provides one.
2015-12-30 03:35:12 -05:00
Mike Frysinger e1211e5506 sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert to common sim_{fetch,store}_register 2015-12-30 03:30:25 -05:00
Mike Frysinger c78dff2291 sim: h8300: move unused/buggy lregs array
This array isn't used anywhere, and the init phase actually corrupts
some memory because the array has 18 elements but tries to set the
19th (ZERO) position.
2015-12-30 03:30:23 -05:00
Mike Frysinger f2089a69c1 sim: h8300: drop unused inst.h
We can also drop the compile.o rule since the common dep generation
logic takes care of this for us.
2015-12-30 03:29:53 -05:00
Alan Modra 331e61312e Fix assorted ChangeLog errors 2015-12-30 11:44:35 +10:30
Kevin Buettner 90d99f3270 sim: ppc: track closed state of file descriptors 0, 1, and 2.
This change tracks the "closed" state of file descriptors 0, 1, and 2,
introducing the function fdbad() to emul_netbsd.c and emul_unix.c.
Note that a function of the same name and purpose exists in
sim/common/callback.c.

This patch eliminates all of the "unresolved testcases" when testing
GDB against the powerpc simulator.

This occurs because the powerpc simulator closes, on behalf of the
testcase, the file descriptors associated with stdin, stdout, and
stderr.  GDB still needs these descriptors to communicate with the
user or, in this case, with the testing framework.
2015-12-29 19:17:11 -05:00
GDB Administrator 090d9d00b5 Automatic date update in version.in 2015-12-30 00:00:09 +00:00
GDB Administrator d50d388b85 Automatic date update in version.in 2015-12-29 00:00:08 +00:00
Patrick Palka 65da7f144f Use libiberty's crc32 implementation in gdbserver
Tested on x86_64-pc-linux-gnu native-gdbserver, no new regressions.

gdb/gdbserver/ChangeLog:

	* server.c (crc32_table): Delete.
	(crc32): Use libiberty's xcrc32 function.
2015-12-28 11:17:57 -05:00
GDB Administrator c622ccedda Automatic date update in version.in 2015-12-28 00:00:09 +00:00
Sandra Loosemore a7be2893a6 Correct nios2 _gp address computation.
2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>

	bfd/
	* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
	address.
	(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
	messages.
2015-12-27 12:30:26 -08:00
Mike Frysinger 5d01527536 sim: aarch64/msp430: fix disassembler usage
The disasm framework reserves the private_data field for the disassemblers
themselves, not for people who use the disassembler.  Instead, there is an
application_data field for callers such as the sim.  Switch to it to avoid
random corruption/crashes when the disassemblers use private_data.
2015-12-27 01:44:37 -05:00
Mike Frysinger 5e744ef887 sim: unify sim-hload
Pretty much all targets are using this module already, so add it to the
common list of objects.  The only oddball out here is cris and that's
because it supports loading via an offset for all the phdrs.  We drop
support for that.
2015-12-27 00:54:41 -05:00
Mike Frysinger 1b393626ce sim: punt WITH_DEVICES & tconfig.h support
No arch is using this anymore, and we want all new ports using the
hardware framework instead.  Punt WITH_DEVICES and the two callbacks
device_io_{read,write}_buffer.

We can also punt the tconfig.h file as no port is using it anymore.
This fixes in-tree builds that get confused by picking up the wrong
one (common/ vs <port>/) caused by commit ae7d0cac8c.

Any port that needs to set up a global define can use their own
sim-main.h file that they must provide regardless.
2015-12-26 20:38:31 -05:00
Mike Frysinger 466b619e95 sim: bfin: push down mmr address/size checks
The bfin port is using the WITH_DEVICES framework for two reasons:
- get access to the cpu making the request (if available)
- check the alignment & size for core & system MMRs

We addressed the first part with commit dea10706e9,
and we handle the second part with this commit.  Arguably this is more
correct too because trying to do bad reads/writes directly (when devices
support is disabled) often results in bad memory accesses.

As part of this clean up, we also adjust all of the existing logic that
would reject invalid accesses: the code was relying on the checks never
returning, but that's not the case when things like gdb (via the user's
commands) are making the requests.  Thus we'd still end up with bad mem
accesses, or sometimes gdb being hung due to while(1) loops.

Now we can connect (most of) these models into any address and have them
work correctly.
2015-12-26 19:09:43 -05:00
GDB Administrator b72dd4c228 Automatic date update in version.in 2015-12-27 00:00:15 +00:00
Mike Frysinger 236bf91feb sim: bfin: avoid stack error under asan
We set up an array of 3 elements and then index into it with a 2bit
value.  We check the range before we actually use the pointer, but
the indexing is enough to make asan upset, so just stuff a fourth
value in there to keep things simple.
2015-12-26 18:22:37 -05:00
Mike Frysinger dea10706e9 sim: sim-core: pass down cpu to hw accesses when available
The bfin port has been using the device callback largely so it could be
passed the cpu when available.  Add this logic to the common core code
so all ports get access to the active cpu.

The semantics of these buffer functions are changed slightly in that
errors halt the engine synchronously rather than returning the length
to the caller.  We'll probably adjust this in a follow up commit.

The bfin code isn't updated just yet as it has a bit more logic in the
device layer that needs to be unwound at which point we can delete it
entirely.
2015-12-26 14:22:14 -05:00
Mike Frysinger 26f8bf63bf sim: mips: delete mmu stubs to move to common sim_{read,write}
The only unique thing about mip's sim_{read,write} helpers is the call to
address_translation on the incoming address.  When we look closer at that
function though, we see it's just a stub that maps physical to virtual,
and the cache/return values are hardcoded.  If we delete this function,
we can then collapse all the callers and drop the custom sim_{read,write}
logic entirely.

Some day we might want to add MMU support, but when we do, we'll want to
have the common layers handle things so all targets benefit.
2015-12-26 11:50:59 -05:00
Mike Frysinger 8b494522f9 sim: cris: do not pass cpu when writing memory during init
The point of passing down the cpu to core reads/writes is to signal which
cpu is making the access.  For system accesses (such as internal memory
initialization), passing the cpu down doesn't make sense, and in the case
of early init like cris, can cause crashes.  Since the cpu isn't fully set
up at this point, if the core code tries to access some fields (like the
PC reg), it'll crash.  While cris shouldn't be doing this setup here (it
should be in the inferior stage), we'll deal with that later.
2015-12-26 08:26:28 -05:00
Mike Frysinger 0e9672991e sim: standardize sim_create_inferior handling of argv a bit more
For targets that process argv in sim_create_inferior, improve the code:
- provide more details in the comment
- make the check for when to re-init more robust
- clean out legacy sim_copy_argv code

This will be cleaned up more in the future when we have a common inferior
creation function, but at least help new ports get it right until then.
2015-12-26 07:19:07 -05:00
Mike Frysinger f66affe97c sim: aarch64: move ChangeLog content 2015-12-26 07:12:33 -05:00
Thomas Preud'homme 3e1a8f9569 Add test for ARMv6-M farcall with no profile info
2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

ld/testsuite/
    * ld-arm/arm-elf.exp: Run new test "Thumb-Thumb farcall v6-M (no
    profile)".
    * ld-arm/farcall-thumb-thumb-m-no-profile-a.s: New file.
    * ld-arm/farcall-thumb-thumb-m-no-profile-b.s: Likewise.
    * ld-arm/farcall-thumb-thumb-m-no-profile.d: Likewise.
2015-12-26 10:24:58 +08:00
GDB Administrator 245d2ad7f5 Automatic date update in version.in 2015-12-26 00:00:17 +00:00
Sandra Loosemore 79fad5b803 Document that the PATTERN argument to gdb_test is optional.
2015-12-25  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* lib/gdb.exp (gdb_test): Update comments to clarify that the
	PATTERN argument is optional.
2015-12-25 11:36:52 -08:00
Mike Frysinger 2023145711 sim: frv: punt WITH_DEVICE support
The frv port used the device logic to support a single cache address,
and the comments around that are "these were merely copied from a diff
port and are unused", plus the code to attach the memory is "#if 0".
Just punt it all.
2015-12-25 13:22:53 -05:00
Mike Frysinger 9c0c156bb7 sim: m32r: migrate from WITH_DEVICES to WITH_HW
The m32r port was using the device framework to handle two devices: the
cache and uart registers.  Both can be implemented in the newer hardware
framework instead which allows us to drop the device logic entirely, as
well as delete the tconfig.h file.

While creating the new uart device model, I also added support for using
stdin to read/write data rather than only supporting sockets.

This has been lightly tested as there doesn't appear to be test coverage
for the code already.  If anyone still cares about this port, then they
should (hopefully) file bug reports.
2015-12-25 13:09:42 -05:00
Mike Frysinger 34cf511206 sim: cris: migrate from WITH_DEVICES to WITH_HW
The cris port was using the device framework to handle two addresses when
the --cris-900000xx flag was specified.  That can be implemented using the
newer hardware framework instead which allows us to drop the device logic
entirely, as well as delete the tconfig.h file.  Basically we create a new
cris_900000xx device model and move the read logic out of devices.c and
into that.  The rest of the devices logic was callback to the hardware
framework already.
2015-12-25 06:10:03 -05:00
Mike Frysinger 13e49fd636 sim: cris: clean up rvdummy a bit
This fixes a few warnings when compiling the rvdummy tool.
2015-12-25 06:02:17 -05:00
Mike Frysinger d4a587a4ed sim: cris: set up sane default path to rvdummy
Much like we autodetect the path to the run program when there is none
set explicitly, do the same for the rvdummy program.  Otherwise the
default make check fails to execute the helper properly.
2015-12-25 05:51:46 -05:00
Mike Frysinger 49aef5a5b8 sim: hw-properties: delete trace calls
These trace calls don't seem to add anything useful and break the cris
hw tests, so punt them.  They were disabled before commit 6d519a4606
but were re-enabled as part of TRACE macro cleanups.
2015-12-25 05:48:03 -05:00
Mike Frysinger cf59f47ebe sim: drop WITH_ENGINE define
We enable this everywhere already, and all new ports should use the
engine logic, so no point in making it an option to disable.
2015-12-25 04:47:31 -05:00
Mike Frysinger 0d58595077 sim: sim-model: build for everyone
Rather than include this for some targets, set it up so we can build it
all the time via the common code.  This makes it easier for targets to
opt into it when they're ready, increases build coverage, and allows us
to centralize much of the logic.

We also get to delete tconfig.h from two more targets -- they were
setting WITH_DEVICES to 0 which has the same behavior as not defining
it at all.

While the SIM_HAVE_MODEL knob is gone, we now have WITH_MODEL_P, but it
is only used by the common sim-model code.  We use it to declare dummy
model lists when the arch hasn't created its own.
2015-12-25 04:40:31 -05:00
Mike Frysinger 8a0ebee658 sim: move MACH/MODEL types into SIM_xxx namespace
The "MACH" and "MODEL" names are a bit generic and collide with symbols
used by other sections of code (like h8300's opcodes).  Since these are
sim-specific types, they really should have a "SIM_" prefix.
2015-12-25 04:24:06 -05:00
Mike Frysinger 91d6df784d sim: arm: delete unused code
These vestiges of the 20 year old emulator are just getting in the way.
Punt all the dead code we either don't compile or don't use.
2015-12-25 03:09:01 -05:00
Mike Frysinger f0c1b768b4 sim: move WITH_SCACHE_PBB to sim-main.h
This helps us break up tconfig.h more.  Any file using this define should
be pulling in sim-main.h already, so things should continue working.
2015-12-25 02:42:03 -05:00
Mike Frysinger 42a3af5688 sim: device_error: punt
Only four targets implement this function, and three of them do nothing.
The 4th merely calls abort.  Since calls to this function are followed
by calls to sim_hw_abort or sim_io_error, this is largely useless.  In
the two places where we don't, replace the call with sim_engine_abort.
We want to kill off the WITH_DEVICES logic in favor of WITH_HW, so this
is a good first step.
2015-12-25 02:18:16 -05:00
Mike Frysinger 9e8e7dd966 sim: always enable callback memory
We enable WITH_CALLBACK_MEMORY everywhere and don't provide a way to
turn it off, and no target does so.  Make it unconditional for all
to keep things simple.
2015-12-25 00:28:07 -05:00
Mike Frysinger 268c91391a sim: dv-pal: always use CPU_INDEX
Since the core always provides CPU_INDEX, use it.  The current code
doesn't actually use it even though it should since it doesn't include
the right headers.
2015-12-25 00:13:43 -05:00