* breakpoint.c (longjmp_names): New variable.
(struct breakpoint_objfile_data): New type.
(breakpoint_objfile_key): New variable.
(msym_not_found): New variable.
(msym_not_found_p): New predicate.
(get_breakpoint_objfile_data): New function.
(create_overlay_event_breakpoint): Check per-objfile cache for
symbols first.
(create_longjmp_master_breakpoint): Likewise.
(create_std_terminate_master_breakpoint): Likewise.
(create_exception_master_breakpoint): Likewise.
(_initialize_breakpoint): Register per-objfile data key.
* command.h (enum command_class): New class 'no_set_class', for
"show" commands without a corresponding "set" command.
* value.c (_initialize_values): Use 'no_set_class' for "show values".
* copying.c (_initialize_copying): Ditto for "show copying" and
"show warranty".
* cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and
"show version".
* cli/cli-setshow.c (cmd_show_list): Skip "show" commands for
which there is no corresponding "set" command (eg. "show copying").
2011-02-14 Michael Snyder <msnyder@vmware.com>
* gdb.texinfo (threads): Document argument for "info threads" cmd.
Document new command "thread find".
2011-02-15 Michael Snyder <msnyder@vmware.com>
* gdb.base/default.exp: Add tests for thread commands.
* gdb.base/help.exp: Add tests for thread commands.
* gdb.threads/thread-find.exp: New test for thread find command.
2011-02-15 Ken Werner <ken.werner@de.ibm.com>
* opencl-lang.c (build_opencl_types): Set the size of the built-in
bool data type to a size of one byte.
gdb/testsuite/ChangeLog
2011-02-15 Ken Werner <ken.werner@de.ibm.com>
* gdb.opencl/datatypes.exp: Expect the size of a bool to be one byte.
PR tdep/12352
* arm-tdep.c (copy_ldr_str_ldrb_strb): Replace PC with SP in
order to store PC value on stack instead of text section.
2011-02-15 Yao Qi <yao@codesourcery.com>
PR tdep/12352
* gdb.arch/arm-disp-step.S : New test for str instruction.
* gdb.arch/arm-disp-step.exp : Likewise
* rs6000-tdep.c (IS_EFP_PSEUDOREG): Use correct constant for
the EFP register set size.
(efpr_pseudo_register_read): Use regcache_raw_read_part to read
data from the VMX register.
(efpr_pseudo_register_write): Use regcache_raw_write_part to read
and write data from/to the VMX register.
gdb/testsuite/
* gdb.arch/vsx-regs.exp: Add "vector_register1_vr" and
"vector_register2_vr" test strings. Test the extended floating
point registers (F32~F63).
* lib/gdb.exp (skip_vsx_tests): Update compile flags for the
IBM XL C compiler. Make the test program use a register provided
by the compiler for the lxvd2x instruction.
* command.h (enum command_class): New class 'no_set_class', for
"show" commands without a corresponding "set" command.
* value.c (_initialize_values): Use 'no_set_class' for "show values".
* copying.c (_initialize_copying): Ditto for "show copying" and
"show warranty".
* cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and
"show version".
* cli/cli-setshow.c (cmd_show_list): Skip "show" commands for
which there is no corresponding "set" command (eg. "show copying").
* memrange.c (compare_mem_ranges): Mention sort order in
describing comment.
(normalize_mem_ranges): Add comment. Fix ra->length calculation.
* tracepoint.c (traceframe_available_memory): Extend comment to
mention what happens to RESULT when the target does not support
the query.
* exceptions.h (NOT_AVAILABLE_ERROR): New error.
* value.c: Include "exceptions.h".
(require_available): Throw NOT_AVAILABLE_ERROR instead of a
generic error.
* cp-abi.c: Include gdb_assert.h.
(baseclass_offset): Add `embedded_offset' and `val' parameters.
Assert the method is implemented. Wrap NOT_AVAILABLE_ERROR
errors.
* cp-abi.h (baseclass_offset): Add `embedded_offset' and `val'
parameters. No longer returns -1 on error.
(struct cp_abi_ops) <baseclass_offset>: Add `embedded_offset' and
`val' parameters.
* cp-valprint.c: Include exceptions.h.
(cp_print_value): Handle NOT_AVAILABLE_ERROR errors when fetching
the baseclass_offset. Handle unavailable base classes. Use
val_print_invalid_address.
* p-valprint.c: Include exceptions.h.
(pascal_object_print_value): Handle NOT_AVAILABLE_ERROR errors
when fetching the baseclass_offset. No longer expect
baseclass_offset returning -1. Handle unavailable base classes.
Use val_print_invalid_address.
* valops.c (dynamic_cast_check_1): Rename `contents' parameter to
`valaddr' parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust.
(dynamic_cast_check_2): Rename `contents' parameter to `valaddr'
parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust. No longer expect
baseclass_offset returning -1.
(value_dynamic_cast): Use value_contents_for_printing rather than
value_contents. Adjust.
(search_struct_field): No longer expect baseclass_offset returning
-1.
(search_struct_method): If reading memory from the target is
necessary, wrap it in a new value to pass to baseclass_offset. No
longer expect baseclass_offset returning -1.
(find_method_list): No longer expect baseclass_offset returning
-1. Use value_contents_for_printing rather than value_contents.
* valprint.c (val_print_invalid_address): New function.
* valprint.h (val_print_invalid_address): Declare.
* gdbtypes.c (is_unique_ancestor_worker): New `embedded_offset'
and `val' parameters. No longer expect baseclass_offset returning
-1. Adjust.
* gnu-v2-abi.c: Include "exceptions.h".
(gnuv2_baseclass_offset): Add `embedded_offset' and `val'
parameters. Handle unavailable memory. Recurse through
gnuv2_baseclass_offset directly, rather than through
baseclass_offset. No longer returns -1 on not found, instead
throw an error.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Add `embedded_offset' and
`val' parameters. Adjust.
gdb/testsuite/
* gdb.trace/unavailable.cc (class Base, class Middle, class
Derived): New types.
(derived_unavail, derived_partial, derived_whole): New globals.
(virtual_partial): New global.
(virtualp): Point at virtual_partial.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Add tests
related to unavailable vptr.
* gdb.trace/unavailable.cc (a, b, c): New globals.
(main): Set and clear them.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Collect
`a' and `c', and check that `b' isn't collected, although `a' and
`c' are.
gdb/
* tracepoint.c (memrange_sortmerge): Don't merge ranges that are
almost but not quite adjacent.
* gdb.trace/unavailable.cc (struct Virtual): New.
(virtualp): New global pointer.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Test
printing a pointer to an object whose type has a vtable, with
print object on.
gdb/
* value.h (value_entirely_available): Declare.
* value.c (value_entirely_available): New function.
* c-valprint.c (c_value_print): Don't try fetching the pointer's
real type if the pointer is unavailable.
* valops.c (value_repeat): Use read_value_memory instead of
read_memory.
gdb/testsuite/
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Test that
value repeat handles unavailableness.
* value.h (value_contents_copy, value_contents_copy_raw): Declare.
* value.c (value_contents_copy_raw, value_contents_copy): New
functions.
(value_primitive_field): Use value_contents_copy_raw instead of
memcpy.
* valops.c (value_fetch_lazy): Use value_contents_copy instead of
memcpy.
(value_array, value_slice): Ditto.
* valarith.c (value_subscripted_rvalue): Use
value_contents_copy_raw instead of memcpy.
gdb/testsuite/
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Add new
tests for building arrays from unavailable values, subscripting
non-memory rvalue unvailable arrays, and accessing fields or
baseclasses of non-lazy unavailable values,
* gdb.trace/unavailable.cc (small_struct, small_struct_b): New
struct types.
(g_smallstruct, g_smallstruct_b): New globals.
* value.h (unpack_bits_as_long): Delete declaration.
(unpack_value_bits_as_long): Declare.
(unpack_value_field_as_long): Declare.
(value_field_bitfield): Declare.
* value.c (unpack_bits_as_long): Rename to...
(unpack_value_bits_as_long_1): ... this. Add embedded_offset and
value parameters. Return the extracted result in a new output
parameter. If the value contents are unavailable, return false,
otherwise return true.
(unpack_value_bits_as_long): New.
(unpack_field_as_long): Rename to...
(unpack_value_field_as_long_1): ... this. Add embedded_offset and
Add embedded_offset and value parameters. Return the extracted
result in a new output parameter. If the value contents are
unavailable, return false, otherwise return true.
(unpack_value_field_as_long): New.
(unpack_field_as_long_1): New.
(unpack_field_as_long): Reimplement as wrapper around
unpack_value_field_as_long_1.
(value_field_bitfield): New function.
* valops.c (value_fetch_lazy): When fetching a bitfield, use
unpack_value_bits_as_long. Mark the value as unavailable, if it
is unavailable.
* jv-valprint.c (java_print_value_fields): Use
value_field_bitfield.
* p-valprint.c (pascal_object_print_value_fields): Use
value_field_bitfield.
* cp-valprint.c (cp_print_value_fields): Use value_field_bitfield.
* target.c (target_read_live_memory): New function.
(memory_xfer_live_readonly_partial): New.
(memory_xfer_partial): If reading from a traceframe, fallback to
reading unavailable read-only memory from read-only regions of
live target memory.
* tracepoint.c (disconnect_tracing): Adjust.
(set_current_traceframe): New, factored out from
set_traceframe_number.
(set_traceframe_number): Reimplement to only change the traceframe
number on the GDB side.
(do_restore_current_traceframe_cleanup): Adjust.
(make_cleanup_restore_traceframe_number): New.
(cur_traceframe_number): New global.
(tfile_open): Set cur_traceframe_number to no traceframe.
(set_tfile_traceframe): New function.
(tfile_trace_find): If looking up a traceframe using any method
other than by number, make sure the current tfile traceframe
matches gdb's current traceframe. Update the current tfile
traceframe if the lookup succeeded.
(tfile_fetch_registers, tfile_xfer_partial)
(tfile_get_trace_state_variable_value): Make sure the remote
traceframe matches gdb's current traceframe.
* remote.c (remote_traceframe_number): New global.
(remote_open_1): Set it to -1.
(set_remote_traceframe): New function.
(remote_fetch_registers, remote_store_registers)
(remote_xfer_memory, remote_xfer_partial)
(remote_get_trace_state_variable_value): Make sure the remote
traceframe matches gdb's current traceframe.
(remote_trace_find): If looking up a traceframe using any method
other than by number, make sure the current remote traceframe
matches gdb's current traceframe. Update the current remote
traceframe if the lookup succeeded.
* infrun.c (fetch_inferior_event): Adjust.
* tracepoint.h (set_current_traceframe): Declare.
(get_traceframe_number, set_traceframe_number): Add describing
comments.
gdb/
* value.h (value_bytes_available): Declare.
(mark_value_bytes_unavailable): Declare.
* value.c (struct range): New struct.
(range_s): New typedef.
(ranges_overlap): New function.
(range_lessthan): New function.
(ranges_contain_p): New function.
(struct value) <unavailable>: New field.
(value_bytes_available): New function.
(mark_value_bytes_unavailable): New function.
(require_not_optimized_out): Constify parameter.
(require_available): New function.
(value_contents_all, value_contents): Require all bytes be
available.
(value_free): Free `unavailable'.
(value_copy): Copy `unavailable'.
* valprint.h (val_print_unavailable): Declare.
* valprint.c (valprint_check_validity): Rename `offset' parameter
to `embedded_offset'. If printing a scalar, check whether the
value chunk is available.
(val_print_unavailable): New.
(val_print_scalar_formatted): Check whether the value is
available.
* python/py-prettyprint.c (apply_val_pretty_printer): Refuse
pretty-printing unavailable values.
Fix const/volatile qualifiers of C++ types, PR c++/12328.
* c-typeprint.c (c_type_print_args): Update the function comment. New
variable param_type, initialize it. Remove const/volatile qualifiers
for language_cplus and !show_artificial. Use param_type.
gdb/testsuite/
Fix const/volatile qualifiers of C++ types, PR c++/12328.
* gdb.cp/overload-const.exp: New file.
* gdb.cp/overload-const.cc: New file.
* symtab.c (find_pc_sect_line): New variable objfile, initialize it
from S. Iterate S using ALL_OBJFILE_SYMTABS. Verify BV for each S.
* symtab.h (struct symtab) <next>: Comment extension.
* i386-tdep.c (i386_process_record): Rename l suffixes to d suffixes
in comments for pcmpgtd, pcmpeqd, psubd, paddd, pcmpgtd, pcmpeqd,
psubd and paddd.
PR 12361.
* i386-tdep.c (i386_process_record) <0x660f3807>: Fix the comment to
phsubsw.
(i386_process_record) <lddqu>: Fix the opcode to 0xf20ff0.
(i386_process_record) <0x0f3807>: Fix the comment to phsubsw.
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Implement
correct ABI for AltiVec vector arguments.
testsuite/ChangeLog:
* gdb.arch/altivec-abi.c (vec_func): Make use of intv_on_stack_f
when computing result.
* gdb.arch/altivec-abi.exp: Update expected results.
2011-02-04 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.python/py-evthreads.c: New file.
* gdb.python/py-evthreads.exp: New file.
* gdb.python/py-events.py: New file.
* gdb.python/py-events.exp: New file.
* gdb.python/py-events.c: New file.
2011-02-04 Sami Wagiaalla <swagiaal@redhat.com>
Oguz Kayral <oguzkayral@gmail.com>
* python/py-inferior.c (python_on_normal_stop): New function.
(python_on_resume): New function.
(python_inferior_exit): New function.
(gdbpy_initialize_inferior): Add normal_stop, target_resumed, and
inferior_exit observers.
* python/py-evtregistry.c: New file.
* python/py-threadevent.c : New file.
* python/py-event.c: New file.
* python/py-evts.c: New file.
* python/py-continueevent.c: New file.
* python/py-bpevent.c: New file.
* python/py-signalevent.c: New file.
* python/py-exetiedevent.c: New file.
* python/py-breakpoint.c (gdbpy_breakpoint_from_bpstats): New function.
Move struct breakpoint_object from here...
* python/python-internal.h: ... to here.
* python/py-event.h: New file.
* python/py-events.h: New file.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpointstopevent.o,
py-continueevent.o, py-event.o, py-eventregistry.o, py-events.o,
py-exitedevent.o, py-signalstopevent.o, and py-stopevent.o.
(SUBDIR_PYTHON_SRCS): Add py-breakpointstopevent.c,
py-continueevent.c, py-event.c, py-eventregistry.c, py-events.c,
py-exitedevent.c, py-signalstopevent.c, and py-stopevent.c.
Add build rules for all the above.
(dwarf2_read_section): Use dwarf2_section_empty_p.
(dwarf2_section_size): New function.
(dwarf2_get_section_info): Unconditionally read section.
(dwarf2_read_index): Use dwarf2_section_empty_p.
(partial_read_comp_unit_head): Use dwarf2_section_size.
(dwarf2_symbol_mark_computed): Likewise.
2011-02-04 David Daney <ddaney@caviumnetworks.com>
* mips-linux-tdep.c: Include xml-syscall.h.
(mips_linux_get_syscall_number): New function.
(mips_linux_init_abi): Add calls to
mips_linux_get_syscall_number() and set_xml_syscall_file_name().
* data-directory/Makefile.in (SYSCALLS_FILES): Add
mips-o32-linux.xml, mips-n32-linux.xml and mips-n64-linux.xml
* syscalls/mips-n32-linux.xml: New file.
* syscalls/mips-n64-linux.xml: New file.
* syscalls/mips-o32-linux.xml: New file.
gdb/testsuite/
2011-02-04 David Daney <ddaney@caviumnetworks.com>
* gdb.base/catch-syscall.exp: Enable for mips*-linux*.
* breakpoint.c (update_watchpoint): Fix name of the
update_global_location_list function.
(print_one_breakpoint): Fix typo.
(_initialize_breakpoint): Remove extra space in hbreak help
string.
* breakpoint.h (struct bp_location) <length>: Fix field
description.
clear `current_regcache'. Only clear current_thread_ptid and
current_thread_arch when PTID matches. Only reinit the frame
cache if PTID matches the current inferior_ptid. Move alloca(0)
call to ...
(registers_changed): ... here.
Improve the ordering of line table entries when dealing with the end
of sequence markers. This will allow us to disassemble over the border
between two compile units while also displaying source code information.
arguments. Skip in-prologue calls to glibc __aeabi_read_tp
implementation even if no symbols are available.
(thumb_analyze_prologue): Update call to skip_prologue_function.
(arm_analyze_prologue): Likewise.
(arm_prologue_this_id): Use frame PC if get_frame_func returns 0.
(arm_exidx_data_key): New static variable.
(struct arm_exidx_entry, arm_exidx_entry_s): New data types.
(struct arm_exidx_data): Likewise.
(arm_exidx_data_free): New function.
(arm_compare_exidx_entries): Likewise.
(arm_obj_section_from_vma): Likewise.
(arm_exidx_new_objfile): Likewise.
(arm_find_exidx_entry): Likewise.
(arm_exidx_fill_cache): Likewise.
(arm_exidx_unwind_sniffer): Likewise.
(arm_exidx_unwind): New global variable.
(arm_gdbarch_init): Append unwinder arm_exidx_unwind.
(_initialize_arm_tdep): Attach arm_exidx_new_objfile to new_objfile
observer. Register arm_exidx_data_key as objfile data.
* c-valprint.c (c_value_print): When doing virtual base pointer
adjustment, create a new value with adjusted contents rather than
changing the contents of the value being printed (and getting it
wrong).
gdb/testsuite/
* gdb.cp/virtbase.cc (VirtualBase, VirtualMiddleA, VirtualMiddleB)
(Virtual): New structs.
(virtual_o, virtual_middle_b): New globals.
* gdb.cp/virtbase.exp: New tests.
Non-GNU sed do not like the '?' quantifier when used in a s/// regexp
that involve back-references, causing the build to fail when trying
to link with Python support. This fixes it by using the '*' quantifier
instead.
gdb/ChangeLog:
* configure.ac: Work around non-GNU sed limitation when computing
python version number.
* configure: Regenerate.
Fix debug printing of BINOP_IN, OP_OBJC_MSGCALL,
OP_F77_UNDETERMINED_ARGLIST, OP_COMPLEX, OP_OBJC_SELECTOR, OP_NAME,
OP_OBJC_NSSTRING, OP_F90_RANGE and OP_DECFLOAT.
* ada-operator.inc: Rename the file to ...
* ada-operator.def: ... here, wrap all the entries by macro OP.
* expprint.c (op_name_standard): Remove all the entries. Include
"std-operator.def" instead.
* expression.h (enum exp_opcode): Include "std-operator.def" and
"ada-operator.def". Move all the entries ...
* std-operator.def: ... here, wrap all the entries by macro OP.
* python/python.c (execute_gdb_command): Call
prevent_dont_repeat.
* top.c (suppress_dont_repeat): New global.
(dont_repeat): Use it.
(prevent_dont_repeat): New function.
* command.h (prevent_dont_repeat): Declare.
This makes several adjustements to the configure python-config.py
scripts to deal with the differences between a Unix install of Python
and a Windows install of Python (as downloaded from the Python website).
Differences:
- The Python executable is directly in the python prefix directory
as opposed to inside the bin/ subdirectory.
- The name of the python library is does not have a dot in the version
number: On Unix, we have libpython2.7, while on Windows, it's
libpython27. So the regexp extracting the python version from
the Python lib filename had to be adjusted slightly.
Also, the tests checking the name of the libpython had to be
adjusted to allow for that.
- There are no link options following the -lpython<version> switch
on Windows, but the regexp extracting the python version was
using it as a delimiter. It had to be removed.
- python-config.py does not work on Windows, mostly because
some sysconfig variables are missing. They are not necessary
so the script was adapted to skip them if not defined.
- The paths returned by python-config.py follow the Windows filename
convention in terms of the directory separator, and this is causing
trouble when the build environment is cygwin (while the compiler
and Python are MinGW). We could have fixed that in the configure
script, but it felt simpler to do so in python-config.py
gdb/ChangeLog:
* configure.ac: Add handling of Python distribution on Windows.
* python-config.py: If the LIBS, SYSLIBS, LIBPL and/or LINKFORSHARED
sysconfig variables are not defined, then do not use them.
On Windows, if LIBPL is not defined, then use prefix + '/libs'
instead. On Windows, return all paths using forward-slashes
rather than backslashes.
This is preparation work for being able to build GDB with Python
support on MinGW.
So far, the "python<version>" subdirectory needs to be specified
when including a Python header file. In order to do that, we have
some special configury that tweaks the include path returned by
python-config.py such that the use of the subdirectory in the include
is necessary. This was done in order to protect ourselves from
possible filename conflicts, since some of the filenames chosen by
Python were a little generic.
The problem is that this cannot work with a standard Python install
on MinGW systems. On such systems, the .h files are located in
<python_prefix>/include. So, in preparation for allowing us to build
GDB on MinGW with Python support enabled, this patch changes the
requirement to provide the "python<version>" subdirectory in the
include directive.
The positive consequence is that we no longer need to have a set
of #include directives for each version of Python, since the include
directive is now the same for all versions of Python. However, the
downside is that we are losing the level of protection we were trying
to achieve by forcing the subdirectory in the include directive.
In order to reduce a bit the consequences of a possible conflict,
this patch also changes the location where the -I/path/to/python
switch goes, to be last in the list (suggested by Doug Evans).
One last change is the fact that we are now including Python.h
and all other Python include headers using angle brackets rather
than double-quotes. This fixes a problem on case-insensitive
systems where #include "Python.h" causes our gdb/python/python.h
header to be included instead of Python's <Python.h> header.
gdb/ChangeLog:
* configure.ac: Remove fallback behavior for building
against Python. Remove tweaking of Python include path.
Add PYTHON_CPPFLAGS and PYTHON_LIBS substitution.
(AC_TRY_LIBPYTHON): Adjust program used in linking test.
If link is successful, set PYTHON_CPPFLAGS and PYTHON_LIBS.
Always restore CPPFLAGS and LIBS after linking test.
* configure: Regenerated.
* Makefile.in (INTERNAL_CPPFLAGS): Add @PYTHON_CPPFLAGS@.
(INSTALLED_LIBS, CLIBS): Add @PYTHON_LIBS@.
* python/python-internal.h: Adjust includes of Python .h files.
Discovered by Pierre Muller.
gdb/ChangeLog:
* inflow.c (gdb_has_a_terminal): Fix typo in interactive_mode
value test.
gdb/testsuite/ChangeLog:
* gdb.base/interact.exp: Add extra tests that verify that
the value of the interactive-mode setting does not change
after the script is sourced.
* tracepoint.c (tfile_xfer_partial): If there's no traceframe
selected, don't try iterating over the traceframe's blocks.
(tfile_has_stack): If there's no traceframe selected, then there's
no stack.
(tfile_has_registers): If there's no traceframe selected, then
there's no registers.
gdb/testsuite/
* gdb.trace/tfile.exp: Test that with no traceframe selected,
there's no stack or registers.
* tracepoint.c (tfile_read): New.
(tfile_open): Use it.
(tfile_get_traceframe_address): Use it.
(tfile_trace_find): Use it.
(walk_blocks_callback_func): New typedef.
(match_blocktype): New function.
(traceframe_walk_blocks): New function.
(traceframe_find_block_type): New function.
(tfile_fetch_registers, tfile_xfer_partial)
(tfile_get_trace_state_variable_value): Use
traceframe_find_block_type and tfile_read.
PR/symtab 11766:
* gdb/objfiles.h (struct objfile) <addr_low>: New field.
* gdb/solib.c (solib_read_symbols): Check for addr_low in
equality test for objfile, initialize addr_low if needed.
boolean. Make sure to always pass a value that matches the
contents buffer to callees. Preserve `address' for following
iterations.
* value.c (value_contents_for_printing_const): New.
(value_address): Constify value argument.
* value.h (value_contents_for_printing_const): Declare.
(value_address): Constify value argument.
(init_regcache_descr): Remove sizeof_raw_register_valid_p
overallocate hack.
(regcache_xmalloc): Rename to ...
(regcache_xmalloc_1): ... this. Add `readonly_p' parameter.
Allocate the regcache type accordingly.
(regcache_xmalloc): New as wrapper around regcache_xmalloc_1.
(regcache_xfree): Asser the source is also readonly. Copy sizeof
cooked registers, not raw.
(regcache_dup_no_passthrough): Delete.
(get_thread_arch_regcache): Use regcache_xmalloc_1.
* h8300-tdep.c (h8300_push_dummy_call): Tweak comment to not
mention obsolete write_register_bytes.
* regcache.h (regcache_dup_no_passthrough): Delete declaration.
* remote-fileio.c: Include target.h.
(remote_fileio_write_bytes): Delete.
(remote_fileio_func_open, remote_fileio_func_write)
(remote_fileio_func_rename, remote_fileio_func_unlink): Use
target_read_memory.
(remote_fileio_func_stat): Use target_read_memory and
target_write_memory.
(remote_fileio_func_gettimeofday): Use target_write_memory.
(remote_fileio_func_system): Use target_read_memory.
* remote.c (remote_write_bytes): Make it static.
(remote_read_bytes): Don't handle partial reads here.
* remote.h (remote_read_bytes): Delete declaration.