Commit Graph

77855 Commits

Author SHA1 Message Date
Doug Evans 0002ad5f45 * blockframe.c: Remove #include "psymtab.h".
* cp-support.c: Ditto.
	* source.c: Ditto.
	* stack.c: Ditto.
2013-08-20 16:30:20 +00:00
Tom Tromey df30244622 fix PR python/15816
This fixes PR python/15816.

The bug here is that python-selftest.exp can fail:

    No symbol "RETURN_MASK_ALL" in current context.

RETURN_MASK_ALL is a macro, so if macros do not end up in the
debuginfo (very typical) then the test fails.

It seemed simplest to me to simply turn the RETURN_MASK_ defines into
enum constants.  This way they end up in the debuginfo and all is
well.

	PR python/15816:
	* exceptions.h (return_mask): Now an enum.
	(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL): Now
	enum constants.

Built and regtested on x86-64 Fedora 18.
2013-08-20 15:12:53 +00:00
Tom Tromey df6d544176 move gdbarch object from objfile to per-BFD
This moves the "gdbarch" field from the objfile into the BFD.

This field's value is derived from the BFD and is immutable over the
lifetime of the BFD.  This makes it a reasonable candidate for pushing
into the per-BFD object.

This is part of the long-term objfile splitting project.  In the long
run I think this patch will make it simpler to moves types from the
objfile to the per-BFD object; but the patch makes sense as a minor
cleanup by itself.

Built and regtested on x86-64 Fedora 18.

	* cp-namespace.c (cp_lookup_symbol_imports_or_template): Use
	get_objfile_arch.
	* elfread.c (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
	(elf_gnu_ifunc_resolve_by_got): Use get_objfile_arch.
	* jit.c (jit_object_close_impl): Update.
	* jv-lang.c (get_dynamics_objfile): Update.
	* linespec.c (add_minsym): Use get_dynamics_objfile.
	* objfiles.c (get_objfile_bfd_data): Initialize 'gdbarch' field.
	(allocate_objfile): Don't initialize 'gdbarch' field.
	(get_objfile_arch): Update.
	* objfiles.h (struct objfile_per_bfd_storage) <gdbarch>: New field,
	moved from...
	(struct objfile) <gdbarch>: ... here.  Remove.
	* stap-probe.c (stap_can_evaluate_probe_arguments): Use
	get_objfile_arch.
	* symfile.c (init_entry_point_info): Use get_objfile_arch.
2013-08-20 15:04:51 +00:00
Alan Modra f5aee5eeb8 * doublest.c (convert_floatformat_to_doublest): Use fmt->split_half
for IBM long double nan and inf.
	(floatformat_is_negative, floatformat_classify,
	floatformat_mantissa): Similarly.
	(floatformat_ieee_single, floatformat_ieee_double,
	floatformat_ieee_quad, floatformat_arm_ext,
	floatformat_ia64_spill): Delete unused vars.
	(_initialize_doublest): Delete unused function.
	* gdbtypes.c (floatformats_ibm_long_double): Use new big- and
	little-endian variants of floatformat_ibm_long_double.
2013-08-20 06:42:19 +00:00
DJ Delorie 21290977cb merge from gcc 2013-08-20 06:02:53 +00:00
Hans-Peter Nilsson e8160f70ec * binutils-all/nm.exp: Xfail test for nm --size-sort for
mmix-knuth-mmixware.
2013-08-20 01:29:44 +00:00
Alan Modra 1911163163 daily update 2013-08-20 00:00:04 +00:00
Richard Sandiford 1661c76c19 gas/
* config/tc-mips.c (mips_check_isa_supports_ase, reg_lookup)
	(mips_parse_argument_token, validate_micromips_insn, md_begin)
	(check_regno, match_float_constant, check_completed_insn, append_insn)
	(match_insn, match_mips16_insn, match_insns, macro_start)
	(macro_build_ldst_constoffset, load_register, macro, mips_ip)
	(mips16_ip, mips_set_option_string, md_parse_option)
	(mips_after_parse_args, mips_after_parse_args, md_pcrel_from)
	(md_apply_fix, s_align, s_option, s_mipsset, s_tls_rel_directive)
	(s_gpword, s_gpdword, s_ehword, s_nan, tc_gen_reloc, md_convert_frag)
	(s_mips_end, s_mips_ent, s_mips_frame, s_mips_mask, mips_parse_cpu):
	Start error messages with a lower-case letter.  Do not end error
	messages with a period.  Wrap long messages to 80 character-lines.
	Use "cannot" instead of "can't" and "can not".

gas/testsuite/
	* gas/mips/ase-errors-1.l, gas/mips/ase-errors-2.l,
	gas/mips/ase-errors-3.l, gas/mips/ase-errors-4.l, gas/mips/at-2.l,
	gas/mips/baddata1.l, gas/mips/elf-rel30.l, gas/mips/illegal.l,
	gas/mips/jalr.l, gas/mips/ldstla-32-1.l, gas/mips/ldstla-32-mips3-1.l,
	gas/mips/lui-1.l, gas/mips/macro-warn-1.l, gas/mips/macro-warn-1-n32.l,
	gas/mips/macro-warn-2.l, gas/mips/macro-warn-3.l,
	gas/mips/macro-warn-4.l, gas/mips/micromips-branch-delay.l,
	gas/mips/micromips-branch-relax.l,
	gas/mips/micromips-branch-relax-pic.l, gas/mips/micromips-ill.l,
	gas/mips/micromips.l, gas/mips/micromips-size-0.l,
	gas/mips/micromips-size-1.l, gas/mips/micromips-warn-branch-delay.l,
	gas/mips/micromips-warn.l, gas/mips/mips16e-64.l,
	gas/mips/mips16e-save-err.l, gas/mips/mips1-fp.l,
	gas/mips/mips32r2-fp32.l, gas/mips/mips32r2-ill.l,
	gas/mips/mips32-sf32.l, gas/mips/mips4-branch-likely.l,
	gas/mips/mips4-fp.l, gas/mips/mips5-fp.l, gas/mips/mips64-mips3d.l,
	gas/mips/mips-double-float-flag.l, gas/mips/mips-gp64-fp32.l,
	gas/mips/mips-gp64-fp64.l, gas/mips/mips-hard-float-flag.l,
	gas/mips/mips-macro-ill-nofp.l, gas/mips/mips-macro-ill-sfp.l,
	gas/mips/nan-error-1.l, gas/mips/nan-error-2.l, gas/mips/noat-2.l,
	gas/mips/noat-3.l, gas/mips/noat-4.l, gas/mips/noat-5.l,
	gas/mips/noat-6.l, gas/mips/noat-7.l, gas/mips/octeon-ill.l,
	gas/mips/r5900-error-vu0.l, gas/mips/r5900-nollsc.l,
	gas/mips/relax-bc1any.l, gas/mips/relax-bposge.l, gas/mips/relax.l,
	gas/mips/relax-swap1.l, gas/mips/relax-swap2.l, gas/mips/set-arch.l,
	gas/mips/tls-ill.l, gas/mips/vr5400-ill.l: Adjust expected output.
2013-08-19 20:07:10 +00:00
Richard Sandiford b0e6f033d5 gas/
* config/tc-mips.c (imm_expr): Expand comment.
	(set_at, macro, mips16_macro): Expect imm_expr to be O_constant
	when populated.
2013-08-19 19:58:47 +00:00
Richard Sandiford e423441da4 include/opcode/
* mips.h: Remove references to "+I" and imm2_expr.

gas/
	* config/tc-mips.c (imm2_expr): Delete.
	(md_assemble, match_insn, imm2_expr.X_op, mips_ip): Update accordingly.
2013-08-19 19:56:44 +00:00
Richard Sandiford 5e0dc5bae9 include/opcode/
* mips.h (M_DEXT, M_DINS): Delete.

opcodes/
	* micromips-opc.c (micromips_opcodes): Replace "dext" and "dins"
	macro entries with "dextm", "dextu", "dinsm" and "dinsu" aliases.
	Use +H rather than +C for the real "dext".
	* mips-opc.c (mips_builtin_opcodes): Likewise.

gas/
	* config/tc-mips.c (report_bad_range, report_bad_field): Delete.
	(macro): Remove M_DEXT and M_DINS handling.

gas/testsuite/
	* gas/mips/ext-ill.l, gas/mips/mips64r2-ill.l: Expect DEXT and DINS
	error messages to have the same form as the EXT and INS ones.
	* gas/mips/micromips-insn32.d, gas/mips/micromips-noinsn32.d,
	gas/mips/micromips-trap.d, gas/mips/micromips.d,
	gas/mips/micromips@mips64r2.d, gas/mips/mips64r2.d: Expect
	"dext" and "dins" instead of "dextm", "dextu", "dinsm" and "dinsu".
2013-08-19 19:54:41 +00:00
Richard Sandiford 60f20e8ba8 gas/
* config/tc-mips.c (mips_arg_info): Replace allow_nonconst and
	lax_max with lax_match.
	(match_int_operand): Update accordingly.  Don't report an error
	for !lax_match-only cases.
	(match_insn): Replace more_alts with lax_match and use it to
	initialize the mips_arg_info field.  Add a complete_p parameter.
	Handle implicit VU0 suffixes here.
	(match_invalid_for_isa, match_insns, match_mips16_insns): New
	functions.
	(mips_ip, mips16_ip): Use them.
2013-08-19 19:42:50 +00:00
Richard Sandiford d436c1c2e8 gas/
* config/tc-mips.c (match_expression):  Report uses of registers here.
	Add a "must be an immediate expression" error.  Handle elided offsets
	here rather than...
	(match_int_operand): ...here.

gas/testsuite/
	* gas/mips/octeon-ill.l: Adjust expected output.
	* gas/mips/lui-1.l, gas/mips/lui-1.s: Add more cases.
2013-08-19 19:30:37 +00:00
Richard Sandiford 1a00e61226 gas/
* config/tc-mips.c (mips_arg_info): Remove soft_match.
	(match_out_of_range, match_not_constant): New functions.
	(match_const_int): Remove fallback parameter and check for soft_match.
	Use match_not_constant.
	(match_mapped_int_operand, match_addiusp_operand)
	(match_perf_reg_operand, match_save_restore_list_operand)
	(match_mdmx_imm_reg_operand): Update accordingly.  Use
	match_out_of_range and set_insn_error* instead of as_bad.
	(match_int_operand): Likewise.  Use match_not_constant in the
	!allows_nonconst case.
	(match_float_constant): Report invalid float constants.
	(match_insn, match_mips16_insn): Remove soft_match code.  Rely on
	match_float_constant to check for invalid constants.  Fail the
	match if match_const_int or match_float_constant return false.
	(mips_ip): Update accordingly.
	(mips16_ip): Likewise.  Undo null termination of instruction name
	once lookup is complete.

gas/testsuite/
	* gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips16e-64.l,
	gas/mips/mips32r2-ill-fp64.l, gas/mips/mips32r2-ill-nofp.l,
	gas/mips/mips32r2-ill.l, gas/mips/mips64r2-ill.l,
	gas/mips/octeon-ill.l, gas/mips/r5900-error-vu0.l,
	gas/mips/vr5400-ill.l: Adjust expected errors.
	* gas/mips/micromips-size-0.l,
	gas/mips/micromips-size-0.s: Likewise.  Add new tests.
	* gas/mips/mips16e-save-err.s, gas/mips/mips16e-save-err.l: New test.
	* gas/mips/mips.exp: Run it.
2013-08-19 19:26:11 +00:00
Richard Sandiford e3de51ce11 gas/
* config/tc-mips.c (mips_insn_error_format): New enum.
	(mips_insn_error): New struct.
	(insn_error): Change to a mips_insn_error.
	(clear_insn_error, set_insn_error_format, set_insn_error)
	(set_insn_error_i, set_insn_error_ss, report_insn_error): New
	functions.
	(mips_parse_argument_token, md_assemble, match_insn)
	(match_mips16_insn): Use them instead of manipulating insn_error
	directly.
	(mips_ip, mips16_ip): Likewise.  Simplify control flow.

gas/testsuite/
	* gas/mips/micromips-ill.l: Expect "floating-point expression required"
2013-08-19 19:09:01 +00:00
Richard Sandiford 97d874919c gas/
* config/tc-mips.c (normalize_constant_expr): Move further up file.
	(normalize_address_expr): Likewise.
	(match_insn, match_mips16_insn): New functions, split out from...
	(mips_ip, mips16_ip): ...here.
2013-08-19 19:00:32 +00:00
Richard Sandiford 0f35dbc4d9 include/opcode/
* mips.h (OP_OPTIONAL_REG): New mips_operand_type.
	(mips_optional_operand_p): New function.

opcodes/
	* mips-formats.h (OPTIONAL_REG, OPTIONAL_MAPPED_REG): New macros.
	* micromips-opc.c (decode_micromips_operand): Use OPTIONAL_REG
	and OPTIONAL_MAPPED_REG.
	* mips-opc.c (decode_mips_operand): Likewise.
	* mips16-opc.c (decode_mips16_operand): Likewise.
	* mips-dis.c (print_insn_arg): Handle OP_OPTIONAL_REG.

gas/
	* config/tc-mips.c (operand_reg_mask, match_operand): Handle
	OP_OPTIONAL_REG.
	(mips_ip, mips16_ip): Use mips_optional_operand_p to check
	for optional operands.
2013-08-19 18:57:00 +00:00
Luis Machado 33b60d5831 gdb/
* Makefile.in (SFILES): Remove common/target-common.c and
	add target/waitstatus.c.
	(HFILES_NO_SRCDIR): Remove common/target-common.h and add
	target/resume.h, target/wait.h and target/waitstatus.h.
	(COMMON_OBS): Remove target-common.o and add
	waitstatus.o.
	(target-common.o): Remove.
	(waitstatus.o): New target object file.
	* common/target-common.c: Move contents to
	target/waitstatus.c and remove.
	* common/target-common.h: Move contents to other files and
	remove.
	(enum resume_kind: Move to target/resume.h.
	(TARGET_WNOHANG): Move to target/wait.h.
	(enum target_waitkind): Move to target/waitstatus.h.
	(struct target_waitstatus): Likewise.
	* target.h: Do not include target-common.h and
	include target/resume.h, target/wait.h and
	target/waitstatus.h.
	* target/resume.h: New file.
	* target/wait.h: New file.
	* target/waitstatus.h: New file.
	* target/waitstatus.c: New file.

	gdb/gdbserver/
	* Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
	(SFILES): Remove $(srcdir)/common/target-common.c and
	add $(srcdir)/target/waitstatus.c.
	(OBS): Remove target-common.o and add waitstatus.o.
	(server_h): Remove $(srcdir)/../common/target-common.h and
	add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
	and $(srcdir)/../target/waitstatus.h.
	(target-common.o): Remove.
	(waitstatus.o): New target object file.
	* target.h: Do not include target-common.h and
	include target/resume.h, target/wait.h and
	target/waitstatus.h.
2013-08-19 16:54:11 +00:00
H.J. Lu 79ceb7cb73 Remove PREFIX_EVEX_0F3A3E and PREFIX_EVEX_0F3A3F
* i386-dis.c (PREFIX_EVEX_0F3A3E): Removed.
	(PREFIX_EVEX_0F3A3F): Likewise.
	* i386-dis-evex.h (evex_table): Updated.
2013-08-19 15:58:52 +00:00
Tristan Gingold 8b64b65e23 binutils/
2013-08-19  Tristan Gingold  <gingold@adacore.com>

	* nm.c (print_size_symbols): Directly get symbol size.


binutils/testsuite/
2013-08-19  Tristan Gingold  <gingold@adacore.com>

	* binutils-all/nm.exp: Add a test for nm --size-sort
	* binutils-all/nm-elf-1.s: New file.
	* binutils-all/nm-1.s: New file.
2013-08-19 15:08:52 +00:00
Pedro Alves 12696c1090 linux-nat.c: no need to block child signals so aggressively.
In http://sourceware.org/ml/gdb-patches/2013-08/msg00174.html , the
issue of child signal handling around ptrace option support discovery
being different between GDB and GDBserver came up.

I recalled adding these block_child_signals calls, and the "We don't
want those ptrace calls to be interrupted" comment, but not exactly
why.  So I looked into it.  My first guess is that I got confused.
The patch that added this
<http://sourceware.org/ml/gdb-patches/2009-04/msg00125.html> rewrote
the linux native async support completely, and the old async support
code had the SIGCHLD handler itself do waitpid, so in places that we'd
want a blocking waitpid, we'd have to have the signal handler blocked.
That was probably the mindset I had at the time.  Anyway, whatever the
case, looks like I was wrong on the need for this blocking.
Given GDBserver doesn't block like this, I investigated why this is
currently needed on GDB but not on GDBserver.

I removed the block_child_signals (and restore) calls, and hacked
linux-nat.c to call linux_test_for_tracefork in a loop, like:

 @@ -534,7 +534,10 @@ static int
  linux_supports_tracefork (int pid)
  {
    if (linux_supports_tracefork_flag == -1)
 -    linux_test_for_tracefork (pid);
 +    {
 +      while (1)
 +       linux_test_for_tracefork (pid);
 +    }
    return linux_supports_tracefork_flag;
  }

Running the resulting GDB, I then saw bad things happening.
Specifically, I'd end up with a bunch of zombies, and eventually, the
machine would refuse to spawn new processes, claming insufficient
resources.

The issue is that linux_test_for_tracefork test forks, and has the
child fork again.  If we don't block SIGCHLD on entry to the function,
the children will inherit SIGCHLD's action/disposition (meaning,
SIGCHLD will be unblocked in the child).  When the first child forks
again a second child, and that child exits, the first child gets a
SIGCHLD.  Now, when we try to wrap up for the whole options test, we
kill the first child, and collect the waitstatus.  Here, when SIGCHLD
isn't blocked, GDB will first see the child reporting a stop with
SIGCHLD.  gdbserver's ptrace options test does a PTRACE_KILL loop at
the end, which catches the SIGCHLD, and retries the kill.  The GDB
version did not do that.  So the GDB version would proceed, leaving
the child zombie (until GDB exists), as nothing collected its final
waitstatus.

So this patch makes the GDB version of linux_test_for_tracefork do the
exact same as the GDBserver version, removes all this unnecessary
blocking throughout, and adds a couple comments at places that do need
it -- namely: places where we'll use sleep with sigsuspend; and
linux_async_pipe, as that destroys the pipe the signal handler
touches.

Tested on x86_64 Fedora 17, sync and async.

gdb/
2013-08-19  Pedro Alves  <palves@redhat.com>

	* linux-nat.c (linux_test_for_tracefork)
	(linux_test_for_tracesysgood, linux_child_follow_fork)
	(lin_lwp_attach_lwp, linux_nat_resume): Don't block child signals.
	(linux_nat_wait_1): Extend comment.
	(linux_async_pipe): Add comment.
2013-08-19 13:44:41 +00:00
Alan Modra 6686753d09 daily update 2013-08-19 00:00:04 +00:00
Alan Modra cbf92e6096 daily update 2013-08-18 00:00:04 +00:00
Joel Brobecker f006cabd5c src-release: Strip "-cvs" from GDB source dir and tarball.
The nightly snapshots we have been creating in the past did not
include the "-cvs" suffix at the end of the version number. Snapshot
packaging started breaking ever since GDB switched to using BFD's
version number. Things got partially fixed with the previous change
to this file, but the change missed the fact that the "-cvs" suffix
in the tarball name (Eg: gdb-7.6.50-20130816-cvs.tar) is undesirable.
This patch removes it.

ChangeLog:

        * src-release (VER): When using $(TOOL)/common/create-version.sh,
        strip the "-cvs" suffix from the version number if present.
2013-08-17 01:07:52 +00:00
Alan Modra 856afefbaf daily update 2013-08-17 00:00:04 +00:00
Roland McGrath 93f8221c64 gold/
* i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
	* x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
2013-08-16 18:12:05 +00:00
Doug Evans 70cc1c235f * lib/prelink-support.exp (prelink_yes): Flag test as unsupported if
prelink complains about an unhandled DWARF version.
2013-08-16 17:44:22 +00:00
Alan Modra 27285eedbd * config/tc-ppc.c (ppc_elf_cons): Allow @l and other reloc
modifiers generally.
2013-08-16 12:59:32 +00:00
Alan Modra cbe02d4f39 * config/tc-ppc.c (ppc_elf_lcomm): Use subsection 1. 2013-08-16 12:34:46 +00:00
Kevin Buettner ba89f962b4 Make RL78_PC_REGNUM a pseudo-register in rl78-tdep.c. 2013-08-16 04:30:23 +00:00
Alan Modra 4956ded865 daily update 2013-08-16 00:00:04 +00:00
Muhammad Bilal 35ab155d37 2013-08-15 Muhammad Bilal <mbilal@codesourcery.com>
PR cli/15841
	* top.c (quit_force): Skip writing history file
	if input is not from terminal.
2013-08-15 08:18:31 +00:00
Nick Clifton 2e53f7d601 * ldexp.c: Add LOG2CEIL() builtin function to linker script language
* ldgram.y: Likewise
	* ldlex.l: Likewise
	* NEWS: Mention the new feature.
	* ld.texinfo: Document the new feature.

	* ld-scripts/log2.exp: New: Run the new log2 test.
	* ld-scripts/log2.s: Source for the new test.
	* ld-scripts/log2.t: Linker script for new test.
2013-08-15 07:30:15 +00:00
Alan Modra dbdf691ab9 daily update 2013-08-15 00:00:04 +00:00
David Edelsohn 3c02c47f97 * config/tc-ppc.c (ppc_comm): Accept optional fourth .lcomm
argument as alignment.
2013-08-14 20:52:55 +00:00
Doug Evans 61884d20bc * boards/fission.exp: Add -fdebug-types-section to debug_flags. 2013-08-14 20:39:32 +00:00
Tom Tromey 0d031856d8 move some static thread state into remote_state
This moves a few static variables from thread-info functions into
remote_state.  Pedro said on irc that these functions implement the
ancient thread-discovery method and that he wouldn't be surprised if
they had rotted; nevertheless it seems safer to me to make them
explicitly per-remote.

This necessitated moving a couple of macros and a typedef earlier in
the file.

	* remote.c (struct remote_state) <echo_nextthread, nextthread,
	resultthreadlist>: New fields.
	(OPAQUETHREADBYTES, threadref, MAXTHREADLISTRESULTS): Move earlier.
	(remote_get_threadlist, remote_threadlist_iterator): Use
	new fields.  Remove static variables.
2013-08-14 18:17:50 +00:00
Tom Tromey ee154beebf move remote_stopped_by_watchpoint_p and remote_watch_data_address into remote_state
This moves the globals remote_stopped_by_watchpoint_p and
remote_watch_data_address into remote_state.

	* remote.c (struct remote_state) <remote_stopped_by_watchpoint_p,
	remote_watch_data_address>: New fields.
	(remote_stopped_by_watchpoint_p, remote_watch_data_address): Remove.
	(process_stop_reply, remote_wait_as)
	(remote_check_watch_resources, remote_stopped_data_address): Update.
2013-08-14 18:17:13 +00:00
Tom Tromey 88b496c367 move async_client_callback and async_client_context into remote_state
This moves async_client_callback and async_client_context into
remote_state.

	* remote.c (struct remote_state) <async_client_callback,
	async_client_context>: New fields.
	(async_client_callback, async_client_context): Remove.
	(remote_async_serial_handler, remote_async): Update.
2013-08-14 18:16:30 +00:00
Tom Tromey 2f65bcb75d move sizeof_pkt into remote_trace_find
The global sizeof_pkt is only used in remote_trace_find, like so:

  reply = remote_get_noisy_reply (&(rs->buf), &sizeof_pkt);

I think in this situation it is more correct to use the recorded size
of the buffer.  Otherwise it seems that some skew could result.

	* remote.c (sizeof_pkt): Remove.
	(remote_trace_find): Use rs->buf_size, not sizeof_pkt.
2013-08-14 18:15:48 +00:00
Tom Tromey b80fafe375 move use_threadinfo_query and use_threadextra_query into struct remote_state
This moves the use_threadextra_query and use_threadinfo_query globals
into remote_state.

	* remote.c (struct remote_state) <use_threadinfo_query,
	use_threadextra_query>: New fields.
	(remote_threads_info, remote_threads_extra_info)
	(remote_open_1): Update.
2013-08-14 18:15:01 +00:00
Tom Tromey 8e88304f57 move some statics from remote_read_qxfer into struct remote_state
This moves a few static variables out of remote_read_qxfer and into
remote_state.

	* remote.c (struct remote_state) <finished_object,
	finished_annex, finished_offset>: New fields.
	(remote_read_qxfer): Use remote_state fields; remove static
	variables.
2013-08-14 18:08:48 +00:00
Tom Tromey 280ceea309 push last_sent_step into struct remote_state
This moves the global last_sent_step into remote_state.

	* remote.c (struct remote_state) <last_sent_step>:
	New field.
	(last_sent_step): Remove.
	(remote_resume, remote_wait_as): Update.
2013-08-14 18:07:45 +00:00
Tom Tromey b73be47123 push last_sent_signal into struct remote_state
This moves the global last_sent_signal into remote_state.

	* remote.c (struct remote_state) <last_sent_signal>:
	New field.
	(last_sent_signal): Remove.
	(new_remote_state, remote_resume, remote_wait_as): Update.
2013-08-14 18:06:49 +00:00
Tom Tromey 5e4a05c431 push last_program_signals_packet into struct remote_state
This moves the global last_program_signals_packet into remote_state.

	* remote.c (struct remote_state) <last_program_signals_packet>:
	New field.
	(last_program_signals_packet): Remove.
	(remote_program_signals, remote_open_1): Update.
2013-08-14 18:05:51 +00:00
Tom Tromey 747dc59d20 push last_pass_packet into struct remote_state
This moves the global last_pass_packet into remote_state.

	* remote.c (struct remote_state) <last_pass_packet>:
	New field.
	(last_pass_packet): Remove.
	(remote_pass_signals, remote_open_1): Update.
2013-08-14 18:04:52 +00:00
Tom Tromey 262e11744a push remote_traceframe_number into struct remote_state
This moves the global remote_traceframe_number into remote_state.

	* remote.c (struct remote_state) <remote_traceframe_number>:
	New field.
	(remote_traceframe_number): Remove.
	(new_remote_state, remote_open_1, set_remote_traceframe)
	(remote_trace_find): Update.
2013-08-14 18:03:50 +00:00
Tom Tromey 47f8a51d47 push general_thread and continue_thread into struct remote_state
This moves the globals general_thread and continue_thread into
remote_state.

	* remote.c (struct remote_state) <general_thread, continue_thread>:
	New fields.
	(general_thread, continue_thread): Remove.
	(record_currthread, set_thread, set_general_process)
	(remote_open_1, extended_remote_attach_1, remote_wait_as)
	(extended_remote_mourn_1): Update.
2013-08-14 18:03:00 +00:00
Tom Tromey 5d93a237b0 push remote_desc into struct remote_state
This moves the "remote_desc" global into remote_state.

	* remote.c (struct remote_state) <remote_desc>: New field.
	(remote_desc): Remove.
	(remote_threads_info, remote_threads_extra_info, remote_close)
	(send_interrupt_sequence, remote_start_remote, remote_open_1)
	(readchar, remote_xfer_partial, remote_rcmd, packet_command)
	(remote_hostio_send_command, remote_file_put, remote_file_get)
	(remote_file_delete, remote_can_async_p, remote_is_async_p)
	(remote_async, remote_new_objfile, set_range_stepping): Update.
2013-08-14 18:01:33 +00:00
Tom Tromey cf79286214 Add new_remote_state
Add new_remote_state and change remote_state to be a pointer.  This is
a preparatory patch for a later series.  It could perhaps be omitted,
but new_remote_state also does some initialization that was previously
done for the globals.

	* remote.c (remote_state): Now a pointer.
	(get_remote_state_raw): Update.
	(new_remote_state): New function.
	(_initialize_remote): Use new_remote_state.
2013-08-14 18:00:34 +00:00