Commit Graph

984 Commits

Author SHA1 Message Date
Doug Evans d1ec4ce7c9 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
64 bits in 64-cross-32 environment.
2013-05-31 19:14:33 +00:00
Pedro Alves 9b25f2d30c [GDBserver][AArch64] Remove references to aarch64-without-fpu.xml.
The GDBserver Aarch64 port includes the aarch64-without-fpu
description in the build, but doesn't actually use it anywhere.  As
Linux always requires an FPU, just remove the dead code.

gdb/gdbserver/
2013-05-28  Pedro Alves  <palves@redhat.com>

	* Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
	(aarch64-without-fpu.c): Delete rule.
	* configure.srv (aarch64*-*-linux*): Remove references to
	aarch64-without-fpu.o and aarch64-without-fpu.xml.
	* linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
	declaration.
2013-05-28 10:41:17 +00:00
Pedro Alves 6740dc9c3e [gdbserver] Don't assume vCont;r ADDR1,ADDR2 comes with a ptid attached.
This bit:

+	  p1 = strchr (p, ':');
+	  decode_address (&resume_info[i].step_range_end, p, p1 - p);

should not expect the ':' to be there.  An action without a ptid is
valid:

 "If an action is specified with no thread-id, then it is applied to any
 threads that don't have a specific action specified"

This is handled further below:

      if (p[0] == 0)
	{
	  resume_info[i].thread = minus_one_ptid;
	  default_action = resume_info[i];

	  /* Note: we don't increment i here, we'll overwrite this entry
	     the next time through.  */
	}
      else if (p[0] == ':')

A stub that doesn't support and report to gdb thread ids at all (like
metal metal targets) only will always only see a single default action
with no ptid.

Use unpack_varlen_hex instead of decode_address.  The former doesn't
need to be told where the hex number ends, and it actually returns
that info instead, which we can use for validation.

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2013-05-24  Pedro Alves  <palves@redhat.com>

	* server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
	instead of strchr/decode_address.  Error if the range isn't split
	with a ','.  Don't assume there's be a ':' in the action.
2013-05-24 11:28:06 +00:00
Pedro Alves c2d6af84da range stepping: gdbserver (x86 GNU/Linux)
This patch adds support for range stepping to GDBserver, teaching it
about vCont;r.

It'd be easy to enable this for all hardware single-step targets
without needing the linux_target_ops hook, however, at least PPC needs
special care, due to the fact that PPC atomic sequences can't be
hardware single-stepped through, a thing which GDBserver doesn't know
about.  So this leaves the support limited to x86/x86_64.

gdb/
2013-05-23  Pedro Alves  <palves@redhat.com>

	* NEWS: Mention GDBserver range stepping support.

gdb/gdbserver/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* linux-low.c (lwp_in_step_range): New function.
	(linux_wait_1): If the thread was range stepping and stopped
	outside the stepping range, report the stop to GDB.  Otherwise,
	continue stepping.  Add range stepping debug output.
	(linux_set_resume_request): Copy the step range from the resume
	request to the lwp.
	(linux_supports_range_stepping): New.
	(linux_target_ops) <supports_range_stepping>: Set to
	linux_supports_range_stepping.
	* linux-low.h (struct linux_target_ops)
	<supports_range_stepping>: New field.
	(struct lwp_info) <step_range_start, step_range_end>: New fields.
	* linux-x86-low.c (x86_supports_range_stepping): New.
	(the_low_target) <supports_range_stepping>: Set to
	x86_supports_range_stepping.
	* server.c (handle_v_cont): Handle 'r' action.
	(handle_v_requests): Append ";r" if the target supports range
	stepping.
	* target.h (struct thread_resume) <step_range_start,
	step_range_end>: New fields.
	(struct target_ops) <supports_range_stepping>:
	New field.
	(target_supports_range_stepping): New macro.
2013-05-23 17:17:50 +00:00
Joel Brobecker 58794e1a64 [gdbserver/lynx178]: Fix null_ptid -vs- minus_one_ptid confusion in comment
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
        confusion in comment.
2013-05-17 06:53:53 +00:00
Joel Brobecker d631c5a779 gdbserver/lynx178: spurious SIG61 signal when resuming inferior.
On ppc-lynx178, resuming the execution of a program after hitting
a breakpoint sometimes triggers a spurious SIG61 event:

    (gdb) cont
    Continuing.

    Program received signal SIG61, Real-time event 61.
    [Switching to Thread 39]
    0x10002324 in a_test.task1 (<_task>=0x3ffff774) at a_test.adb:30
    30          select  -- Task 1

From this point on, continuing again lets the signal kill the program.
Using "signal 0" or configuring GDB to discard the signal does not
help either, as the program immediately reports the same signal again.

What happens is the following:

  - GDB sends a single-step order to gdbserver: $vCont;s:31
    This tells GDBserver to do a step using thread 0x31=49.
    GDBserver does the step, and thread 49 receives the SIGTRAP
    indicating that the step has finished.

  - GDB then sends a "continue", but this time does not specify
    which thread to continue: $vCont;c
    GDBserver uses an arbitrary thread's ptid to resume the program's
    execution (the current_inferior's ptid was chosen for that).
    See lynx-low.c:lynx_resume:

        if (ptid_equal (ptid, minus_one_ptid))
          ptid = thread_to_gdb_id (current_inferior);

So far on all LynxOS platforms, this has been good enough. But
not so on LynxOS 178. If the ptid used to resume the execution
is not the same as the thread that did the step, we get the weird
signal.

This patch fixes the problem by saving the ptid of the thread
that last caused an event, received during a call to waitpid.
The ptid is saved in per-process private data.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (struct process_info_private): New type.
        (lynx_add_process): New function.
        (lynx_create_inferior, lynx_attach): Replace calls to
        add_process by calls to lynx_add_process.
        (lynx_resume): If PTID is null, then try using
        current_process()->private->last_wait_event_ptid.
        Add comments.
        (lynx_clear_inferiors): Delete.  The contents of that function
        has been inlined in lynx_mourn;
        (lynx_wait_1): Save the ptid in the process's private data.
        (lynx_mourn): Free the process' private data.  Replace call
        to lynx_clear_inferiors by call to clear_inferiors.
2013-05-17 06:47:44 +00:00
Yao Qi 96f7a20fe9 gdb/gdbserver
* i386-low.c (i386_length_and_rw_bits): Move the comment to
	the right place.
2013-05-17 02:22:52 +00:00
Luis Machado db0dfaa0e6 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
	(linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
	PT_TEXT_END_ADDR guards.  Update comments.
	(linux_target_op) <read_offsets>: Conditionally define to
	linux_read_offsets if the target is UCLIBC and if it defines
	PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2013-05-16 10:31:49 +00:00
Sandra Loosemore 68f5f83833 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner  <andrew@codesourcery.com>

	gdb/gdbserver/
	* Makefile.in (SFILES): Add linux-nios2-low.c.
	(clean): Add action to delete nios2-linux.c.
	(nios2-linux.c): New rule.
	* configure.srv: Add nios2*-*-linux*.
	* linux-nios2-low.c: New.
2013-05-07 01:11:16 +00:00
Hafiz Abid Qadeer 1ebff1fdfd 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
* tracepoint.c (cmd_qtinit): Call 'stop_tracing'.

2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* status-stop.exp (test_tstart_tstart): Check for error
	returned by the second 'tstart' command.
2013-05-03 15:43:58 +00:00
Hui Zhu c65e009ff7 Fix format error of ChangeLog. 2013-04-25 08:03:31 +00:00
Hui Zhu f6150862d2 2013-04-25 Hui Zhu <hui@codesourcery.com>
PR gdb/15186

	* ax.c (ax_printf): Add fflush.
2013-04-25 02:58:05 +00:00
Tom Tromey 614c279dda PR gdb/7912:
* Makefile.in (SFILES): Add filestuff.c
	(COMMON_OBS): Add filestuff.o.
	(filestuff.o): New target.
	* auto-load.c (auto_load_objfile_script_1): Use
	gdb_fopen_cloexec.
	* auxv.c (procfs_xfer_auxv): Use gdb_open_cloexec.
	* cli/cli-cmds.c (shell_escape): Call close_most_fds.
	* cli/cli-dump.c (fopen_with_cleanup): Use gdb_fopen_cloexec.
	* common/agent.c (gdb_connect_sync_socket): Use
	gdb_socket_cloexec.
	* common/filestuff.c: New file.
	* common/filestuff.h: New file.
	* common/linux-osdata.c (linux_common_core_of_thread)
	(command_from_pid, commandline_from_pid, print_source_lines)
	(linux_xfer_osdata_shm, linux_xfer_osdata_sem)
	(linux_xfer_osdata_msg, linux_xfer_osdata_modules): Use
	gdb_fopen_cloexec.
	* common/linux-procfs.c (linux_proc_get_int)
	(linux_proc_pid_has_state): Use gdb_fopen_cloexec.
	* config.in, configure: Rebuild.
	* configure.ac: Don't check for sys/socket.h.  Check for
	fdwalk, pipe2.
	* corelow.c (core_open): Use gdb_open_cloexec.
	* dwarf2read.c (write_psymtabs_to_index): Use gdb_fopen_cloexec.
	* fork-child.c (fork_inferior): Call close_most_fds.
	* gdb_bfd.c (gdb_bfd_open): Use gdb_open_cloexec.
	* inf-child.c (inf_child_fileio_readlink): Use gdb_open_cloexec.
	* linux-nat.c (linux_nat_thread_name, linux_proc_pending_signals):
	Use gdb_fopen_cloexec.
	(linux_proc_xfer_partial, linux_proc_xfer_spu): Use
	gdb_open_cloexec.
	(linux_async_pipe): Use gdb_pipe_cloexec.
	* remote-fileio.c (remote_fileio_func_open): Use
	gdb_open_cloexec.
	* remote.c (remote_file_put, remote_file_get): Use
	gdb_fopen_cloexec.
	* ser-pipe.c (pipe_open): Use gdb_socketpair_cloexec,
	close_most_fds.
	* ser-tcp.c (net_open): Use gdb_socket_cloexec.
	* ser-unix.c (hardwire_open): Use gdb_open_cloexec.
	* solib.c (solib_find): Use gdb_open_cloexec.
	* source.c (openp, find_and_open_source): Use gdb_open_cloexec.
	* tracepoint.c (tfile_start): Use gdb_fopen_cloexec.
	(tfile_open): Use gdb_open_cloexec.
	* tui/tui-io.c (tui_initialize_io): Use gdb_pipe_cloexec.
	* ui-file.c (gdb_fopen): Use gdb_fopen_cloexec.
	* xml-support.c (xml_fetch_content_from_file): Use
	gdb_fopen_cloexec.
	* main.c (captured_main): Call notice_open_fds.
gdbserver
	* Makefile.in (SFILES): Add filestuff.c.
	(OBS): Add filestuff.o.
	(filestuff.o): New target.
	* config.in, configure: Rebuild.
	* configure.ac: Check for fdwalk, pipe2.
2013-04-22 16:46:15 +00:00
Pedro Alves 7d4e5717e0 Use AC_DEFINE for USE_THREAD_DB
Use AC_DEFINE for USE_THREAD_DB instead of manually passing it down
through -D flags.

gdb/gdbserver/
2013-04-17  Pedro Alves  <palves@redhat.com>

	* configure.ac (USE_THREAD_DB): Delete variable.
	(if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
	Don't AC_SUBST USE_THREAD_DB.
	* Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
	* config.in, configure: Regenerate.
2013-04-17 09:58:15 +00:00
Pedro Alves d5c93e41a8 Only define 'struct lwp_info'::thread_known if using libthread-db.
A small cleanup.  'struct lwp_info'::thread_known is only useful for
thread-db.c.

gdbserver/
2013-04-16  Pedro Alves  <palves@redhat.com>

	* linux-low.h (struct lwp_info) <thread_known>: Move under
	the USE_THREAD_DB #ifdef.
2013-04-16 18:22:15 +00:00
Pedro Alves 04f5fe89ae Fix remaining GDBserver issues with !HAVE_THREAD_DB_H.
The previous patches are still not sufficient to build gdbserver with
our copy of thread_db.h.

../../../src/gdb/gdbserver/thread-db.c: In function ‘find_one_thread’:
../../../src/gdb/gdbserver/thread-db.c:316:6: error: ‘struct lwp_info’ has no member named ‘th’
../../../src/gdb/gdbserver/thread-db.c: In function ‘attach_thread’:
../../../src/gdb/gdbserver/thread-db.c:341:6: error: ‘struct lwp_info’ has no member named ‘th’
../../../src/gdb/gdbserver/thread-db.c: In function ‘thread_db_get_tls_address’:
../../../src/gdb/gdbserver/thread-db.c:514:47: error: ‘struct lwp_info’ has no member named ‘th’
make: *** [thread-db.o] Error 1

First, linux-low.h is including <thread_db.h> directly instead of our
gdb_thread_db.h, although thread-db.c includes the latter.  Then the
'th' field of struct lwp_info is only defined if HAVE_THREAD_DB_H is
defined, which is not true if we're using our replacement copy of
thread_db.h.  We have a USE_THREAD_DB symbol defined if we're building
thread-db.c that's ideal for this, however, it's currently only
defined when compiling linux-low.c (through a Makefile rule).  The
patch makes it defined when compiling any file.

gdb/gdbserver/
2013-04-16  Pedro Alves  <palves@redhat.com>

	* Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
	(linux-low.o): Delete rule.
	* linux-low.h: Always include "gdb_thread_db.h" instead of
	conditionally including thread_db.h.
	(struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
	HAVE_THREAD_DB_H.
2013-04-16 18:20:40 +00:00
Jan Kratochvil 480b27bfaa gdb/gdbserver/
* Makefile.in (install-only): Fix make install regression.
2013-04-07 05:53:22 +00:00
Jan Kratochvil 43662968f1 gdb/
Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (gdb.z): Remove.
	(install-only): Remove $(man1dir) and gdb.1 installation.
	* gdb.1: Remove.

gdb/gdbserver/
	Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
	installation.
	* gdbserver.1: Remove.

gdb/doc/
	Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF,
	(TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New.
	(diststuff): Add man.
	(install-man, install-man1, install-man5, uninstall-man, uninstall-man1)
	(uninstall-man5): New.
	(STAGESTUFF): Add *.1 and *.5.
	(GDBvn.texi): Add SYSTEM_GDBINIT.
	(gdb.1, gdbserver.1, gdbinit.5): New.
	(maintainer-clean realclean): Add $(MANS).
	(install): Add install-man.
	(uninstall): Add uninstall-man.
	* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
	(@copying): Wrap it by @c man begin COPYRIGHT.
	(Top): Add Man Pages.
	(Man Pages, gdb man, gdbserver man, gdbinit man): New.
2013-04-05 20:01:33 +00:00
Pedro Alves 3e74e146f2 Linux: No need to set ptrace event options in fork/clone children.
Oleg Nesterov told me that the Linux kernel copies the parent's ptrace
options to fork/clone children, so there's no need for GDB to do that
manually.

I was actually a bit surprised, since I thought the ptracer had to
always set the ptrace options itself, and GDB is indeed calling
PTRACE_SETOPTIONS for each new fork child, if it'll stay attached.

Looking at the history of that code, I found that is was actually I
who added that set-ptrace-options-in-children bit, back in
http://sourceware.org/ml/gdb-patches/2009-05/msg00656.html.  But,
honestly, I don't recall why I needed that.  I think I may have just
blindly believed it was necessary.

I then looked back at the history of all the PTRACE_SETOPTIONS code we
have, and found that gdb never did copy the ptrace options before my
patch.  But, when gdbserver learnt to use PTRACE_EVENT_CLONE, at
http://sourceware.org/ml/gdb-patches/2007-10/msg00547.html, it was
made to do 'ptrace (PTRACE_SETOPTIONS, new_pid, 0,
PTRACE_O_TRACECLONE)' for all new clones.  Hmmm.  But, GDB itself
never did that, so it can't really ever have been necessary, I
believe, otherwise GDB should have been doing it too.

(GDBserver doesn't support following forks, and so naturally doesn't
do any PTRACE_SETOPTIONS on fork children.)

So this patch removes the -I believe- unnecessary ptrace syscalls.

Tested on x86_64 Fedora 17, native/gdbserver, and on x86_64 RHEL5
native/gdbserver (Linux 2.6.18, I think a ptrace-on-utrace kernel).
No regressions.

gdb/
2013-03-22  Pedro Alves  <palves@redhat.com>

	* linux-nat.c (linux_child_follow_fork): Don't call
	linux_enable_event_reporting.
	(linux_handle_extended_wait): Don't call
	linux_enable_event_reporting.

gdb/gdbserver/
2013-03-22  Pedro Alves  <palves@redhat.com>

	* linux-low.c (handle_extended_wait): Don't call
	linux_enable_event_reporting.
2013-03-22 14:52:26 +00:00
Tom Tromey a8347a2acd 2013-03-15 Tony Theodore <tonyt@logyst.com>
PR build/9098:
	* Makefile.in (SHELL): Use @SHELL@.
2013-03-15 17:30:27 +00:00
Sergio Durigan Junior eeb56fa757 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
* tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
	compiler warning.
2013-03-14 11:40:08 +00:00
Joel Brobecker 4fa7e2ff22 Extraneous NULL in linux_target_ops when HAVE_LINUX_BTRACE not defined
This fixes the followin error when HAVE_LINUX_BTRACE is not defined:

    linux-low.c:5943: error: excess elements in struct initializer
    linux-low.c:5943: error: (near initialization for 'linux_target_ops')

gdb/gdbserver/ChangeLog:

        * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
        Remove extraneous NULL element.
2013-03-13 18:37:54 +00:00
Yao Qi 8ddb196517 * tracepoint.c (tfile_get_trace_state_variable_value): Look for
the last matched 'V' blcok in trace frame.

gdb/gdbserver:

	* tracepoint.c (traceframe_read_tsv): Look for the last matched
	'V' block in trace frame.

gdb/testsuite:

	* gdb.trace/tsv.exp (check_tsv): New.
	(top level): Save a tfile on current trace session. Call
	check_tsv on live target.  Load the tfile with target tfile
	and call check_tsv again.
2013-03-13 03:40:27 +00:00
Keith Seitz bbc13ae3db * ada-lang.c (ada_read_renaming_var_value): Pass const
pointer to expression string to parse_exp_1.
	(create_excep_cond_exprs): Likewise.
	* ax-gdb.c (agent_eval_command_one): Likewise.
	(maint_agent_printf_command): Likewise.
	Constify much of the string handling/parsing.
	* breakpoint.c (set_breakpoint_condition): Pass const
	pointer to expression string to parse_exp_1.
	(update_watchpoint): Likewise.
	(parse_cmd_to_aexpr): Constify string handling.
	Pass const pointer to parse_exp_1.
	(init_breakpoint_sal): Pass const pointer to parse_exp_1.
	(find_condition_and_thread): Likewise.
	Make TOK const.
	(watch_command_1): Make "arg" const.
	Constify string handling.
	Copy the expression string instead of changing the input
	string.
	(update_breakpoint_location): Pass const pointer to
	parse_exp_1.
	* eval.c (parse_and_eval_address): Make "exp" const.
	(parse_to_comma_and_eval): Make "expp" const.
	(parse_and_eval): Make "exp" const.
	* expression.h (parse_expression): Make argument const.
	(parse_exp_1): Make first argument const.
	* findcmd.c (parse_find_args): Treat "args" as const.
	* linespec.c (parse_linespec): Pass const pointer to
	linespec_expression_to_pc.
	(linespec_expression_to_pc): Make "exp_ptr" const.
	* parse.c (parse_exp_1): Make "stringptr" const.
	Make a copy of the expression to pass to parse_exp_in_context until
	this whole interface can be constified.
	(parse_expression): Make "string" const.
	* printcmd.c (ui_printf): Treat "arg" as const.
	Handle const strings.
	* tracepoint.c (validate_actionline): Pass const pointer to
	all calls to parse_exp_1.
	(encode_actions_1): Likewise.
	* value.h (parse_to_comma_and_eval): Make argument const.
	(parse_and_eval_address): Likewise.
	(parse_and_eval): Likewise.
	* varobj.c (varobj_create): Pass const pointer to parse_exp_1.
	(varobj_set_value): Likewise.
	* cli/cli-cmds.c (disassemble_command): Treat "arg" as const and
	constify string handling.
	Pass const pointers to parse_and_eval_address and
	parse_to_comman_and_eval.
	* cli/cli-utils.c (skip_to_space): Rename to ...
	(skip_to_space_const): ... this. Handle const strings.
	* cli/cli-utils.h (skip_to_space): Turn into macro which invokes
	skip_to_space_const.
	(skip_to_space_const): Declare.
	* common/format.c (parse_format_string): Make "arg" const.
	Handle const strings.
	* common/format.h (parse_format_string): Make "arg" const.
	* gdbserver/ax.c (ax_printf): Make "format" const.
	* python/python.c (gdbpy_parse_and_eval): Do not make a copy
	of the expression string.
2013-03-12 17:39:45 +00:00
Markus Metzger 9accd112a6 Add the gdb remote target operations for branch tracing.
We define the following packets:

  Qbtrace:bts         enable branch tracing for the current thread
                      returns "OK" or "Enn"

  Qbtrace:off         disable branch tracing for the current thread
                      returns "OK" or "Enn"

  qXfer:btrace:read   read the full branch trace data for the current thread

gdb/
	* target.h (enum target_object): Add TARGET_OBJECT_BTRACE.
	* remote.c: Include btrace.h.
	(struct btrace_target_info): New struct.
	(remote_supports_btrace): New function.
	(send_Qbtrace): New function.
	(remote_enable_btrace): New function.
	(remote_disable_btrace): New function.
	(remote_teardown_btrace): New function.
	(remote_read_btrace): New function.
	(init_remote_ops): Add btrace ops.
	(enum <unnamed>): Add btrace packets.
	(struct protocol_feature remote_protocol_features[]): Add btrace packets.
	(_initialize_remote): Add packet configuration for branch tracing.

gdbserver/
	* target.h (struct target_ops): Add btrace ops.
	(target_supports_btrace): New macro.
	(target_enable_btrace): New macro.
	(target_disable_btrace): New macro.
	(target_read_btrace): New macro.
	* gdbthread.h (struct thread_info): Add btrace field.
	* server.c: Include btrace-common.h.
	(handle_btrace_general_set): New function.
	(handle_btrace_enable): New function.
	(handle_btrace_disable): New function.
	(handle_general_set): Call handle_btrace_general_set.
	(handle_qxfer_btrace): New function.
	(struct qxfer qxfer_packets[]): Add btrace entry.
	* inferiors.c (remove_thread): Disable btrace.
	* linux-low: Include linux-btrace.h.
	(linux_low_enable_btrace): New function.
	(linux_low_read_btrace): New function.
	(linux_target_ops): Add btrace ops.
	* configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
	Add srv_linux_btrace=yes.
	(x86_64-*-linux*): Add linux-btrace.o.
	Add srv_linux_btrace=yes.
	* configure.ac: Define HAVE_LINUX_BTRACE.
	* config.in: Regenerated.
	* configure: Regenerated.
2013-03-11 08:35:11 +00:00
Markus Metzger 5cc22e4cf7 Preserve a verbose error message of xfer functions if they return -3.
gdbserver/
	* server.c (handle_qxfer): Preserve error message if -3 is
	returned.
	(qxfer): Document the -3 return value.
2013-03-11 08:31:48 +00:00
Markus Metzger 7c97f91ebf Implement branch tracing on Linux based on perf_event such that it can be shared
between gdb and gdbserver.

gdb/
	* common/linux_btrace.h: New file.
	* common/linux_btrace.c: New file.
	* Makefile.in (SFILES): Add btrace.c.
	(HFILES_NO_SRCDIR): Add common/linux-btrace.h.
	(COMMON_OBS): Add btrace.o.
	(linux-btrace.o): New rule.

gdbserver/
	* Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
	(linux_btrace_h): New variable.
	(linux-btrace.o): New rule.
2013-03-11 08:24:07 +00:00
Hafiz Abid Qadeer be9a119c31 2013-03-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
Fixed year number in Changelog files.
2013-03-09 12:05:20 +00:00
Hafiz Abid Qadeer f6f899bfc5 2012-03-08 Stan Shebs <stan@codesourcery.com>
Hafiz Abid Qadeer  <abidh@codesourcery.com>

	gdb/
	* NEWS: Mention set and show trace-buffer-size commands.
	Mention new packet.
	* target.h (struct target_ops): New method
	to_set_trace_buffer_size.
	(target_set_trace_buffer_size): New macro.
	* target.c (update_current_target): Set up new method.
	* tracepoint.c (trace_buffer_size): New global.
	(start_tracing): Send it to the target.
	(set_trace_buffer_size): New function.
	(_initialize_tracepoint): Add new setshow for trace-buffer-size.
	* remote.c (remote_set_trace_buffer_size): New function.
	(_initialize_remote): Use it.
	(QTBuffer:size) New remote command.
	(PACKET_QTBuffer_size): New enum.
	(remote_protocol_features): Add an entry for
	PACKET_QTBuffer_size.

	gdb/gdbserver/
	* tracepoint.c (trace_buffer_size): New global.
	(DEFAULT_TRACE_BUFFER_SIZE): New define.
	(init_trace_buffer): Change to one-argument function. Allocate
	trace buffer memory.
	(handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
	handle QTBuffer:size packet.
	(cmd_bigqtbuffer_size): New function.
	(initialize_tracepoint): Call init_trace_buffer with
	DEFAULT_TRACE_BUFFER_SIZE.
	* server.c (handle_query): Add QTBuffer:size in the
	supported packets.

	gdb/doc/
	* gdb.texinfo (Starting and Stopping Trace Experiments): Document
	trace-buffer-size set and show commands.
	(Tracepoint Packets): Document QTBuffer:size.
	(General Query Packets): Document QTBuffer:size.

	gdb/testsuite/
	* gdb.trace/trace-buffer-size.exp: New file.
	* gdb.trace/trace-buffer-size.c: New file.
2013-03-08 15:06:39 +00:00
Yao Qi e64f749990 gdb/gdbserver/
* tracepoint.c (cur_action, cur_step_action): Make them unsigned.
	(cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
	of -1.
	(cmd_qtsp): Adjust condition.  Do post increment.
	Set cur_action and cur_step_action back to 0.
2013-03-07 13:17:28 +00:00
Pedro Alves f0ae6fc35c PR gdb/15236: gdbserver write to linux memory with zero length corrupts stack
PROBLEM:

The function linux_write_memory () in linux-low.c allocates a buffer
on the stack to hold a copy of the data to be written.

  register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *)
    alloca (count * sizeof (PTRACE_XFER_TYPE));

"count" is the number of bytes to be written, rounded up to the
nearest multiple of sizeof (PTRACE_XFER_TYPE) and allowing for not
being an aligned address. The function later uses

  buffer[0] = ptrace (PTRACE_PEEKTEXT, pid,
                      (PTRACE_ARG3_TYPE) (uintptr_t) addr, 0);

The problem is that this function can be called to write zero bytes on
an aligned address, for example when receiving an X packet of length 0
(used to test if 8-bit write is supported). Under these circumstances,
count can be zero.

Since in this case, buffer[0] may never have been allocated, the stack
is corrupted and gdbserver may crash.

SOLUTION:

Writing zero bytes should always succeed. The patch below returns
successfully early if the length is zero, so avoiding the stack
corruption.

Verified on the ARC GDB 7.5.1 port.

2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>

	PR server/15236

	* linux-low.c (linux_write_memory): Return early success if LEN is
	zero.
2013-03-07 09:47:57 +00:00
Corinna Vinschen 334ad4a8e4 Fix ChangeLog entry. 2013-03-05 15:18:10 +00:00
Corinna Vinschen b5b0b0afd0 * configure.host: Add x86_64-*-cygwin* as host.
* configure.tgt: Add x86_64-*-cygwin* as target.
	* config/i386/cygwin64.mh: New file.

	* gdbserver/configure.srv: Add x86_64-*-cygwin* as target.
2013-03-05 13:37:11 +00:00
Tom Tromey 589bc9275a * configure.ac: Invoke AC_SYS_LARGEFILE.
* configure, config.in: Rebuild.
2013-02-28 16:51:19 +00:00
Corinna Vinschen dfe0758235 * win32-low.c: Throughout, fix format strings and casts of
printf-like functions to avoid type related warnings on all
	platforms.
	(get_child_debug_event): Print dwDebugEventCode as hex since
	that's how it's usually documented.
2013-02-28 09:09:02 +00:00
Yao Qi 736cd58526 gdb/gdbserver/
* tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
	pulongest.
2013-02-28 01:21:08 +00:00
Jiong Wang e1f58301dd gdb/
* regformats/reg-tilegx.dat (name): Change abi name to "tilegx".
	* regformats/reg-tilegx32.dat: New.

  gdbserver/

	* Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
	(reg-tilegx32.c): New rule.
	* configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
	* linux-tile-low.c (tile_arch_setup): New function.  Invoke
	different register info initializer according to elf class.
	(init_registers_tilgx32): New function.  The tilegx32 register info
	initializer.
	(tile_fill_gregset): Use "uint_reg_t" to represent register size.
	(tile_store_gregset): Likewise.
2013-02-27 14:58:18 +00:00
Yao Qi d171ca7803 gdb/gdbserver/
* server.c (process_point_options): Print debug message when
	debug_threads is true.
2013-02-27 13:31:38 +00:00
Yao Qi 282bbdf358 gdb/gdbserver/
* tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2013-02-26 14:11:58 +00:00
Pedro Alves aca2255198 gdbserver:server.c - use unpack_varlen_hex to extract hex numbers.
Addresses, as most numbers in the RSP are hex encoded, with variable
length (that just means the width isn't specified, and there's no top
cap.  So they should be extracted with unpack_varlen_hex.

A couple spots in server.c are using strto(u)l, which doesn't work on
LLP64 targets.

This patch fixes it.

Tested on x86_64 Fedora 17.

2013-02-19  Pedro Alves  <palves@redhat.com>
	    Kai Tietz <ktietz@redhat.com>

	PR gdb/15161

	* server.c (handle_query) <CRC check>: Use unpack_varlen_hex
	instead of strtoul to extract address from packet.
	(process_serial_event) <'z'>: Likewise.
2013-02-19 20:52:57 +00:00
Yao Qi 4f3cee1ca1 gdb/gdbserver
* linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2013-02-18 14:54:57 +00:00
Pedro Alves 8e1d55a3df gdbserver: QTNotes, plug memory leak.
The previous notes aren't being released before setting new ones.

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2013-02-14  Pedro Alves  <palves@redhat.com>

	Plug memory leak.

	* tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
	TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2013-02-14 18:07:19 +00:00
Pedro Alves 458820da59 gdbserver:tracepoint.c:cmd_qtdpsrc use savestring.
An obvious use case for savestring.

Tested on x86_64 Fedora 17.

2013-02-14  Pedro Alves  <palves@redhat.com>

	* tracepoint.c (cmd_qtdpsrc): Use savestring.
2013-02-14 17:30:03 +00:00
Pedro Alves baea0daecf Move savestring to common/common-utils.c, make gdbserver use it.
This makes gdbserver share gdb's savestring, instead of baking its own.

Tested on x86_64 Fedora 17.

gdb/
2013-02-14  Pedro Alves  <palves@redhat.com>

	* utils.c (savestring): Don't #undef it.  Move function to
	common/common-utils.c.
	* common/common-utils.c: Include gdb_string.h.
	(savestring): Move here from utils.c.
	* common/common-utils.h (savestring): Declare.

gdb/gdbserver/
2013-02-14  Pedro Alves  <palves@redhat.com>

	* tracepoint.c (save_string): Delete.
	(add_tracepoint_action): Use savestring instead of save_string.
2013-02-14 17:11:41 +00:00
Pedro Alves 0b1afbb37b Consistent use of (C) after "Copyright".
While writing the previous patch, I noticed that we're not consistent
with the (C) in the copyright header.  The maintainers manual prefers
having it, though also says it's optional.  We have over 10x more
files with (C) than without in gdb's code, so I spent a few minutes
grepping and fixing.  Funny enough, the testsuite has it backwards.
I'll leave that for another time.

gdb/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* amd64-darwin-tdep.c: Add (C) after Copyright.
	* cli/cli-cmds.h: Ditto.
	* cli/cli-decode.c: Ditto.
	* cli/cli-decode.h: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-dump.h: Ditto.
	* cli/cli-interp.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-script.h: Ditto.
	* cli/cli-setshow.c: Ditto.
	* cli/cli-setshow.h: Ditto.
	* cli/cli-utils.c: Ditto.
	* cli/cli-utils.h: Ditto.
	* config/alpha/nm-osf3.h: Ditto.
	* config/djgpp/djconfig.sh: Ditto.
	* config/i386/nm-fbsd.h: Ditto.
	* config/i386/nm-i386gnu.h: Ditto.
	* config/nm-linux.h: Ditto.
	* config/nm-nto.h: Ditto.
	* config/rs6000/nm-rs6000.h: Ditto.
	* config/sparc/nm-sol2.h: Ditto.
	* darwin-nat-info.c: Ditto.
	* dfp.c: Ditto.
	* dfp.h: Ditto.
	* gdb-demangle.h: Ditto.
	* i386-darwin-nat.c: Ditto.
	* i386-darwin-tdep.c: Ditto.
	* linux-fork.h: Ditto.
	* m32c-tdep.c: Ditto.
	* microblaze-linux-tdep.c: Ditto.
	* microblaze-rom.c: Ditto.
	* microblaze-tdep.c: Ditto.
	* microblaze-tdep.h: Ditto.
	* mips-linux-tdep.h: Ditto.
	* ppc-ravenscar-thread.c: Ditto.
	* ppc-ravenscar-thread.h: Ditto.
	* prologue-value.c: Ditto.
	* prologue-value.h: Ditto.
	* ravenscar-thread.c: Ditto.
	* ravenscar-thread.h: Ditto.
	* sparc-ravenscar-thread.c: Ditto.
	* sparc-ravenscar-thread.h: Ditto.
	* tilegx-linux-tdep.c: Ditto.
	* unwind_stop_reasons.def: Ditto.
	* windows-nat.h: Ditto.
	* xtensa-linux-tdep.c: Ditto.
	* xtensa-xtregs.c: Ditto.
	* regformats/regdat.sh: Ditto.
	* regformats/regdef.h: Ditto.

gdb/gdbserver/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* linux-xtensa-low.c: Ditto.
	* xtensa-xtregs.c: Ditto.
2013-02-12 19:03:57 +00:00
Pedro Alves 43aaf8b6d6 Fix whitespace. 2013-02-12 15:18:33 +00:00
Pedro Alves 8a4ac37ef4 From: Sanimir Agovic <sanimir.agovic@intel.com>
null ptr check to prevent gdbserver from crashing

Evaluating a thread local storage variable in a remote scenario crashes
gdbserver if libthread-db could not be loaded.

2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>

gdbserver/
	* thread-db.c (thread_db_get_tls_address):
	NULL pointer check thread_db.

testsuite/
	* gdb.server/no-thread-db.exp: New file.
	* gdb.server/no-thread-db.c: New file.
	* gdb.server/Makefile.in (EXECUTABLES): Add no-thread-db.
2013-02-12 15:03:12 +00:00
Marcus Shawcroft 148de6bbb5 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
* linux-aarch64-low.c (aarch64_arch_setup): Clamp
        aarch64_num_wp_regs and aarch64_num_bp_regs to
        AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2013-02-07 17:32:29 +00:00
Marcus Shawcroft 55fac6e050 Switch AArch64 gdbserver ps_get_thread_area to PTRACE_GETREGSET.
2013-02-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>

       * linux-aarch64-low.c (ps_get_thread_area): Replace
       PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2013-02-07 10:47:40 +00:00
Marcus Shawcroft 176eb98c2f AArch64 GDBserver support.
gdb/
        * configure.tgt (aarch64*-*-linux*): Set build_gdbserver=yes.

gdb/gdbserver/

        * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
        (aarch64.c, aarch64-without-fpu.c): New targets.
        * configure.srv (aarch64*-*-linux*): New.
        * linux-aarch64-low.c: New file.
2013-02-04 18:20:05 +00:00
Marcus Shawcroft 56f7af9cb0 Ensure ptrace() calls cast arguments 3 and 4 appropriately.
* linux-low.c (handle_extended_wait, linux_create_inferior)
        (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
        (dequeue_one_deferred_signal, linux_resume_one_thread)
        (fetch_register, linux_write_memory, linux_enable_event_reporting)
        (linux_tracefork_grandchild, linux_test_for_tracefork)
        (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo ): Add
        PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
        where the argument is 0.
2013-02-04 17:47:00 +00:00
Yao Qi 60f662b0e8 gdb/gdbserver
* event-loop.c: Include "queue.h".
	(gdb_event_p): New typedef.
	(struct gdb_event) <next_event>: Remove.
	(event_queue): Change to QUEUE(gdb_event_p).
	(async_queue_event): Remove.
	(gdb_event_xfree): New.
	(initialize_event_loop): New.
	(process_event): Use API from QUEUE.
	(wait_for_event): Likewise.
	* server.c (main): Call initialize_event_loop.
	* server.h (initialize_event_loop): Declare.
2013-01-25 14:12:02 +00:00
Yao Qi 5ae4861a11 gdb/gdbserver:
* ax.h (struct eval_agent_expr_context): New.
	(gdb_eval_agent_expr): Update declaration.
	* ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
	TFRAME.  Add new argument CTX.
	* server.h (struct eval_agent_expr_context): Declare.
	(agent_mem_read, agent_tsv_read): Update declaration.
	(agent_mem_read_string): Likewise.
	* tracepoint.c (eval_tracepoint_agent_expr): Remove.
	(add_traceframe_block): Add new argument TPOINT.
	Increase TPOINT->traceframe_usage.
	(do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
	eval_tracepoint_agent_expr.
	(condition_true_at_tracepoint): Likewise.
	(agent_mem_read): Remove argument TFRAME.  Add argument CTX.
	(agent_mem_read_string, agent_tsv_read): Likewise.
	Callers update.

gdb/testsuite:

	* gdb.trace/infotrace.exp: Check 'traceframe usage' in the
	output of 'info tracepoints'.
	* gdb.trace/disconnected-tracing.exp (disconnected_tracing):
	Likewise.
	* gdb.trace/tstatus.exp (run_trace_experiment): Likewise.
	* gdb.trace/disconnected-tracing.c (struct foo): New.
2013-01-18 06:40:58 +00:00
Yao Qi 85e00e8548 gdb/gdbserver/
* linux-low.c (linux_resume_one_lwp): Don't check
	'lwp->bp_reinsert != 0'.
2013-01-16 14:46:17 +00:00
Joel Brobecker 4039cf45c2 Simplifly ptrace_request_to_str's implementation...
... following Pedro's advice of using a temporary macro.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Define a temporary
        macro and use it to simplify this function's implementation.
2013-01-07 11:43:42 +00:00
Joel Brobecker 9044dee230 Add ptrace error handling in lynx_resume
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
        sets errno.
2013-01-07 11:43:16 +00:00
Joel Brobecker e6352c8f63 Make x86-lynx GDBserver pass XML register map to GDB.
This is not strictly needed, since both GDB and GDBserver seem
to agree on the register numbering without this.  But this allows
us to make sure that this is always going to be the case.

gdb/gdbserver/ChangeLog:

        * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2013-01-07 11:42:53 +00:00
Joel Brobecker 50681a2705 Allow powerpc-*-lynxos* GDBserver to send register map via XML...
... back to GDB.  The transfer occurs when GDB sends the
'qXfer:features:read:target.xml' packet.  This allows us to make
sure that GDB and GDBserver use the same register numbering.
This is important on Lynx 178, where GDB selects the rs6000:6000
architecture by default instead of the powerpc:common architecture.

gdb/gdbserver/ChangeLog:

        * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2013-01-07 11:39:25 +00:00
Joel Brobecker 3f6e77ef16 LynxOS: Resume the same thread when receiving a thread create/exit event.
Before this patch, the ptid passed to lynx_resume was completely
ignored, and we used the current_inferior. This resulted in trying
to resume the inferior execution using the wrong ptid after having
received a thread create/exit event, because the inferior_ptid
was still set to the ptid prior to receiving the signal.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_resume): Use the resume_info parameter
        to determine the ptid for the lynx_ptrace call, unless
        it is equal to minus_one_ptid, in which case we use the
        ptid of the current_inferior.
        (lynx_wait_1): After having received a thread create/exit
        event, resume the inferior's execution using the signaling
        thread's ptid, rather than the old ptid.
2013-01-07 11:39:00 +00:00
Joel Brobecker 7fda33ae8d Delete unused variable in lynx_resume
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_resume): Delete variable ret.
2013-01-07 11:38:35 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Joel Brobecker b9786c7408 Update copyright year in gdb/gdbserver/gdbreplay version output.
gdb/ChangeLog:

        * top.c (print_gdb_version): Update copyright year.

gdb/gdbserver/ChangeLog:

        * gdbreplay.c (gdbreplay_version): Update copyright year.
        * server.c (gdbserver_version): Likewise.
2013-01-01 05:45:22 +00:00
Markus Metzger 02d403bfba Fix ChangeLog format. 2012-12-18 08:01:42 +00:00
Joel Brobecker 8b93d60f22 lynx-low: Add debug trace when new thread is discovered.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_wait_1): Add debug trace before adding
        new thread.
2012-12-17 11:17:12 +00:00
Joel Brobecker 037335a7a8 Add PTRACE_GETTRACESIG handling in ptrace_request_to_str
We use this ptrace request when handling SIGTRAP signals,
and without this change, the debug trances show:

    PTRACE (<unknown-request>, ...

This patch fixes this.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Add handling for
        PTRACE_GETTRACESIG.
2012-12-17 11:13:52 +00:00
Joel Brobecker 52d4cbd805 Delete unused variable in lynx_attach.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_attach): Delete variable new_process.
2012-12-17 11:03:00 +00:00
Joel Brobecker ab8f6ca9c6 remove unused variable in lynx_create_inferior.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_create_inferior): Delete variable new_process.
2012-12-17 11:02:47 +00:00
Joel Brobecker 78cbc0240c lynx-low.c: PTRACE_GETTHREADLIST may not be defined.
LynxOS 178 does not define this macro.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Do not handle
        PTRACE_GETTHREADLIST if this macro does not exist.
2012-12-17 10:51:29 +00:00
Yao Qi 14a0047001 gdb/gdbserver/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (OBS): Add notif.o.
	* notif.c, notif.h: New.
	* server.c: Include "notif.h".
	(struct vstop_notif) <next>: Remove.
	<base>: New field.
	(queue_stop_reply): Update.
	(push_event, send_next_stop_reply): Remove.
	(discard_queued_stop_replies): Update.
	(notif_stop): New variable.
	(handle_v_stopped): Remove.
	(handle_v_requests): Don't call handle_v_stopped.  Call
	handle_ack_notif instead.
	(queue_stop_reply_callback): Call notif_event_enque instead
	of queue_stop_reply.
	(handle_status): Don't call send_next_stop_reply, call
	notif_write_event instead.
	(kill_inferior_callback): Likewise.
	(detach_or_kill_inferior_callback): Likewise.
	(main): Call initialize_notif.
	(process_serial_event): Call QUEUE_is_empty.
	(handle_target_event): Call notif_push instead of push event.
	* server.h (push_event): Remove declaration.
2012-12-15 02:48:18 +00:00
Tom Tromey 61c125b91f * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
(COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
	macros.
	(.c.o): Rewrite.
	(ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
	(common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
	(i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
	(amd64-linux-ipa.o, ax.o): Rewrite.
	(event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
	(proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
	(thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
	(signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
	(gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
	(format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
	(i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
	(linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
	(linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
	(linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
	(linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
	(linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
	(nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
	(win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
	(arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
	(reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
	(i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
	(reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
	(mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
	(powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
	(powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
	(powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
	(powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
	(powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
	(powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
	(s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
	(s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
	(s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
	(tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
	(amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
	(x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
	(reg-tilegx.o): Remove.
	(all_object_files): New macro.
	Include .deps files.
	* aclocal.m4, configure: Rebuild.
	* acinclude.m4: Include depstand.m4, lead-dot.m4.
	* configure.ac: Invoke ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
2012-12-10 20:16:14 +00:00
Tom Tromey e90e9ad971 PR gdb/14917:
* server.h (current_insn_ptr, emit_error): Declare 'extern'.
2012-12-05 14:56:18 +00:00
Markus Metzger 945bf71318 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
gdb/
	* configure.ac: Check for linux/perf_event.h.
	* config.in: Regenerated.
	* configure: Regenerated.

gdb/gdbserver/
	* configure.ac: Check for linux/perf_event.h.
	* config.in: Regenerated.
	* configure: Regenerated.
2012-11-28 16:21:58 +00:00
Pedro Alves 0270a750ba gdb/
2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
	    Pedro Alves  <palves@redhat.com>

	* common/linux-osdata.c (linux_xfer_osdata_fds): Decrease buffer
	size parameter passed to readlink by one byte.
	* fbsd-nat.c (fbsd_pid_to_exec_file): Ditto.
	* linux-nat.c (linux_child_pid_to_exec_file): Ditto.
	* nbsd-nat.c (nbsd_pid_to_exec_file): Ditto.
	* inf-child.c (inf_child_fileio_readlink): Decrease local buffer's
	size by one byte.

gdb/gdbserver/
2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>

	* hostio.c (handle_readlink): Decrease buffer size
	parameter passed to readlink by one byte.
2012-11-26 14:19:33 +00:00
Yao Qi 8c29b58e98 gdb/gdbserver/
2012-11-26  Yao Qi  <yao@codesourcery.com>

	* configure.ac (build_warnings): Append '-Wempty-body'.
	* configure: Regenerated.
	* linux-low.c (linux_create_inferior): Use braces for empty 'if'
	body.
2012-11-26 13:30:07 +00:00
Pierre Muller 8bdce1ffdf 2012-11-15 Pierre Muller <muller@sourceware.org>
ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory.
	* gdb_stat.h: Delete. Moved to common directory.
	* common/gdb_stat.h: New file.
	* gdb_wait.h: Delete. Moved to common directory.
	* common/gdb_wait.h: New file.
	* Makefile.in (H_FILES_NO_SRC): Adapt to new header
	location.
	* contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h
	location.
	(stat.h rule): Adapt to new gdb_stat.h location.
	* common/linux-osdata.c: Include "gdb_stat.h" header instead of
	<sys/stat.h> header.
	* common/linux-ptrace.c: Include "gdb_wait.h" header instead of
	<sys/wait.h> header.


gdbserver ChangeLog entry:

2012-11-15  Pierre Muller  <muller@sourceware.org>

	* configure.ac (AC_CHECK_HEADERS): Add wait.h header.
	* config.in: Regenerate.
	* configure: Regenerate.
	* linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
	Use "gdb_wait.h" header instead of <sys/wait.h> header.
	* lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
	* remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
	header.
	* server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
	instead of <sys/wait.h> header.
	* spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2012-11-15 16:12:19 +00:00
Markus Metzger 3ba6ad0f87 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
(various make rules): Remove -DGDBSERVER
2012-11-13 15:01:44 +00:00
Yao Qi fbd5db48c5 gdb/gdbserver:
2012-11-09  Yao Qi  <yao@codesourcery.com>

	* spu-low.c (current_ptid): Move it to ..
	* gdbthread.h: ... here.  New.
	* remote-utils.c (read_ptid): Use macro 'current_ptid'.
	* server.c (myresume, process_serial_event): Likewise.
	* thread-db.c (thread_db_find_new_threads): Likewise.
	* tracepoint.c (run_inferior_command): Likewise.
2012-11-09 02:58:50 +00:00
Andrew Burgess b3dc46ff7c http://sourceware.org/ml/gdb-patches/2012-09/msg00568.html
gdb/ChangeLog

        * target.c (simple_search_memory): Include access length in
        warning message.

gdb/gdbserver/ChangeLog

        * server.c (handle_search_memory_1): Include access length in
        warning message.

gdb/testsuite/ChangeLog

        Test find command on unmapped memory.
        * gdb.base/find-unmapped.c: New file.
        * gdb.base/find-unmapped.exp: New file.
2012-10-01 12:02:13 +00:00
Hans-Peter Nilsson 07c04788ea * linux-crisv32-low.c: Fix compile errors. 2012-09-04 23:54:41 +00:00
Yao Qi 918d227b01 gdb/gdbserver/
* tracepoint.c (cmd_qtsv): Adjust debug message.
	Don't check CUR_TPOINT.
2012-09-04 01:47:49 +00:00
Yao Qi 18c1b81abe gdb/gdbserver/
* ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
	* server.h: Include 'libiberty.h' and 'ansidecl.h'.
	(ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
	Remove declarations of xmalloc, xreallloc, xstrdup and
	freeargv.
	* Makefile.in (libiberty_h): New.
	(server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
	(linux-bfin-low.o): Append dependency 'libiberty.h'.
2012-08-28 16:53:30 +00:00
Yao Qi dc82f37bb7 gdb/gdbserver/
* server.h: Remove declaration of 'xsnprintf'.
2012-08-23 01:41:05 +00:00
Keith Seitz 406b1477f5 * defs.h: Include build-gnulib/config.h
* server.h: Include build-gnulib-gbserver/config.h.
	* gdbreplay.c: Likewise.
2012-08-22 20:04:05 +00:00
Doug Evans e6712ff1b5 * gdb_string.h: Moved to ...
* common/gdb_string.h: ... here.
	* common/vec.h: Remove #ifndef GDBSERVER conditional inclusion of
	gdb_string.h and gdb_assert.h.

	gdbserver/
	* configure.ac: Add check for strstr.
	* config.in: Regenerate.
	* configure: Regenerate.

	* linux-thread-db.c: #include "gdb_vecs.h".
	(try_thread_db_load_from_pdir_1): New arg "subdir".  All callers
	updated.
	(try_thread_db_load_from_pdir): New arg "subdir".  All callers updated.
	(thread_db_load_search): Use a vector to iterate over path elements.
	Handle text appearing after "$pdir".

	gdbserver/
	* Makefile.in (SFILES): Add gdb_vecs.c.
	(OBS): Add gdb_vecs.o.
	(gdb_vecs_h, host_defs_h): New variables.
	(thread-db.o): Add $(gdb_vecs_h) dependency.
	(gdb_vecs.o): New rule.
	* thread-db.c: #include "gdb_vecs.h".
	(thread_db_load_search): Use a vector to iterate over path elements.
	Handle text appearing after "$pdir".
2012-08-08 19:48:19 +00:00
Ulrich Weigand 7c3270aec1 ChangeLog:
* inf-child.c (inf_child_fileio_pwrite): If pwrite fails, fall back
	to attempting lseek/write.
	(inf_child_fileio_pread): Likewise for pread.

gdbserver/ChangeLog:

	* hostio.c (handle_pread): If pread fails, fall back to attempting
	lseek/read.
	(handle_pwrite): Likewise for pwrite.
2012-08-02 15:52:27 +00:00
Ulrich Weigand b62e2b271b gdbserver/ChangeLog:
* linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
	between unsupported TYPE and unimplementable ADDR/LEN combination.
	(arm_insert_point): Act on new return value.

testsuite/ChangeLog:

	* gdb.base/watchpoint.exp (test_wide_location_1): Expect software
	watchpoints on ARM.  When expecting software watchpoints, tolerate
	(remote) targets that report unsupported hardware watchpoint only
	at continue time.
	(test_wide_location_2): Likewise.
2012-08-01 13:02:41 +00:00
Pedro Alves 78a99e9119 2012-07-31 Pedro Alves <palves@redhat.com>
* server.c (process_point_options): Only skip tokens if we find
	one that is unrecognized.  Don't treat 'X' specially while
	skipping unrecognized tokens.
2012-07-31 19:16:46 +00:00
Ulrich Weigand fcf303aba3 ChangeLog:
* arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Do not
	attempt to 4-byte-align HW breakpoint addresses for Thumb.

gdbserver/ChangeLog:

	* linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
	to 4-byte-align HW breakpoint addresses for Thumb.
2012-07-30 15:05:43 +00:00
Yao Qi 7255706c3e gdb/gdbserver/
PR remote/14161.

	* server.h: Declare gdb_agent_about_to_close.
	* target.c (kill_inferior): Include "agent.h".
	New.  Send command 'kill'.
	* target.h (kill_inferior): Removed macro.
	* tracepoint.c (gdb_agent_about_to_close): New.
	(gdb_agent_helper_thread): Handle command 'close'.
	Wait endlessly until the inferior stops.
	Install gdb_agent_remove_socket to atexit hook.
	(agent_socket_name): New static variable.
	(gdb_agent_socket_init): Replace local variable 'name' with
	'agent_socket_name'.
	(gdb_agent_remove_socket): New.

gdb/doc/
	* gdb.texinfo (IPA Protocol Commands): Document new command
	'close'.

gdb/testsuite/
	KFAIL for PR remote/14161.
	* gdb.trace/strace.exp (strace_remove_socket): kfail for native.
	Cleanup socket files.
	(strace_info_marker): Detach inferior.
2012-07-27 08:09:14 +00:00
Yao Qi 5a3f286f45 gdb/gdbserver/
* server.c (process_point_options): Stop at 'X' when parsing.
2012-07-27 00:56:32 +00:00
Michael Eager 961bd387ba 2012-07-19 Michael Eager <eager@eagercon.com>
* i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
	to hw_execute.
	* linux-x86-low.c (x86_insert_point, x86_remove_point):
	Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
	hardware breakpoint.
2012-07-19 18:27:17 +00:00
Jan Kratochvil aa7c744796 gdb/
* common/linux-ptrace.c: Include gdb_assert.h.
	<__i386__> (linux_ptrace_test_ret_to_nx_instr): New declaration.
	<__i386__>: Include sys/reg.h, sys/mman.h, signal.h, sys/wait.h and
	stdint.h.
	(linux_ptrace_test_ret_to_nx, linux_ptrace_init_warnings): New
	functions.
	* common/linux-ptrace.h (linux_ptrace_init_warnings): New declarations.
	* linux-nat.c (linux_child_post_attach)
	(linux_child_post_startup_inferior): Call linux_ptrace_init_warnings.

gdb/gdbserver/
	* gdbserver/linux-low.c (initialize_low): Call
	linux_ptrace_init_warnings.
2012-07-07 12:13:57 +00:00
Doug Evans 657c4e8cc6 (gdb_no_commands_at_breakpoint): Tweak previous patch for win64 where
sizeof (long) < sizeof (void*).
2012-07-02 17:37:35 +00:00
Doug Evans 7f216e7c7c * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
pointer to int.
2012-07-02 17:11:36 +00:00
Stan Shebs d3ce09f5bf Add target-side support for dynamic printf.
* NEWS: Mention the additional style.
	* breakpoint.h (struct bp_target_info): New fields tcommands, persist.
	(struct bp_location): New field cmd_bytecode.
	* breakpoint.c: Include format.h.
	(disconnected_dprintf): New global.
	(parse_cmd_to_aexpr): New function.
	(build_target_command_list): New function.
	(insert_bp_location): Call it.
	(remove_breakpoints_pid): Skip dprintf breakpoints.
	(print_one_breakpoint_location): Ditto.
	(dprintf_style_agent): New global.
	(dprintf_style_enums): Add dprintf_style_agent.
	(update_dprintf_command_list): Add agent case.
	(agent_printf_command): New function.
	(_initialize_breakpoint): Add new commands.
	* common/ax.def (printf): New bytecode.
	* ax.h (ax_string): Declare.
	* ax-gdb.h (gen_printf): Declare.
	* ax-gdb.c: Include cli-utils.h, format.h.
	(gen_printf): New function.
	(maint_agent_print_command): New function.
	(_initialize_ax_gdb): Add maint agent-printf command.
	* ax-general.c (ax_string): New function.
	(ax_print): Add printf disassembly.
	* Makefile.in (SFILES): Add format.c
	(COMMON_OBS): Add format.o.
	* common/format.h: New file.
	* common/format.c: New file.
	* printcmd.c: Include format.h.
	(ui_printf): Call parse_format_string.
	* remote.c (remote_state): New field breakpoint_commands.
	(PACKET_BreakpointCommands): New enum.
	(remote_breakpoint_commands_feature): New function.
	(remote_protocol_features): Add new BreakpointCommands entry.
	(remote_can_run_breakpoint_commands): New function.
	(remote_add_target_side_commands): New function.
	(remote_insert_breakpoint): Call it.
	(remote_insert_hw_breakpoint): Ditto.
	(_initialize_remote): Add new packet configuration for
	target-side breakpoint commands.
	* target.h (struct target_ops): New field
	to_can_run_breakpoint_commands.
	(target_can_run_breakpoint_commands): New macro.
	* target.c (update_current_target): Handle
	to_can_run_breakpoint_commands.

	[gdbserver]
	* Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
	(ax.o): Add it to build rule.
	(ax-ipa.o): Ditto.
	(OBS): Add format.o.
	(IPA_OBS): Add format.o.
	* server.c (handle_query): Claim support for breakpoint commands.
	(process_point_options): Add command case.
	(process_serial_event): Leave running if there are printfs in
	effect.
	* mem-break.h (any_persistent_commands): Declare.
	(add_breakpoint_commands): Declare.
	(gdb_no_commands_at_breakpoint): Declare.
	(run_breakpoint_commands): Declare.
	* mem-break.c (struct point_command_list): New struct.
	(struct breakpoint): New field command_list.
	(any_persistent_commands): New function.
	(add_commands_to_breakpoint): New function.
	(add_breakpoint_commands): New function.
	(gdb_no_commands_at_breakpoint): New function.
	(run_breakpoint_commands): New function.
	* linux-low.c (linux_wait_1): Test for and run breakpoint commands
	locally.
	* ax.c: Include format.h.
	(ax_printf): New function.
	(gdb_eval_agent_expr): Add printf opcode.

	[doc]
	* gdb.texinfo (Dynamic Printf): Mention agent style and
	disconnected dprintf.
	(Maintenance Commands): Describe maint agent-printf.
	(General Query Packets): Mention BreakpointCommands feature.
	(Packets): Document commands extension to Z0 packet.
	* agentexpr.texi (Bytecode Descriptions): Document printf
	bytecode.

	[testsuite]
	* gdb.base/dprintf.exp: Add agent style tests.
2012-07-02 15:29:39 +00:00
Yao Qi 2f8f6aed0e gdb/gdbserver:
* server.c (start_inferior): Remove duplicated writes to fields
	'last_resume_kind' and 'last_status' of 'current_inferior'.
2012-06-13 02:35:01 +00:00
Yao Qi 0c9070b30a gdb/gdbserver:
* linux-low.c (linux_set_resume_request): Simplify predicate.  Add
        comment.
        * server.c (handle_v_cont): Extend comment.
2012-06-12 14:02:15 +00:00
Yao Qi c52daf705d gdb/gdbserver:
* linux-low.c (linux_attach): Add 'static'.
2012-06-11 07:24:15 +00:00
Yao Qi d38bbb0a50 gdb/gdbserver/
* ax.c (gdb_eval_agent_expr): Print `top' in hex.
2012-06-06 08:31:31 +00:00
Jan Kratochvil 89dc0afdc9 gdb/gdbserver/
Fix gcc -flto compilation warning.
	* server.c (main): Make variable multi_mode and attach volatile.
2012-06-01 16:50:11 +00:00
Thiago Jung Bauermann 75f62ce7b7 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
if the platform doesn't know about it.
2012-05-30 19:51:38 +00:00
Pedro Alves 65f479b6ef 2012-05-30 Jeff Kenton <jkenton@tilera.com>
* Makefile.in (SFILES): Add linux-tile-low.c.
	(linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
	* configure.srv: Handle tilegx-*-linux*.
	* linux-tile-low.c: New file.
2012-05-30 19:43:15 +00:00
Jan Kratochvil 0c5bf5a97d gdb/
* solib-svr4.c (svr4_current_sos): New comment on
	svr4_current_sos_via_xfer_libraries fall back.

gdb/gdbserver/
	* linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.

gdb/testsuite/
	* gdb.server/solib-list-lib.c: New file.
	* gdb.server/solib-list-main.c: New file.
	* gdb.server/solib-list.exp: New file.
2012-05-28 20:37:29 +00:00
Pedro Alves a493e3e2e4 gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

gdb/gdbserver/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

include/gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_
	throughout.

sim/arm/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/avr/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/common/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/cr16/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/d10v/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/erc32/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/m32c/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/ppc/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rl78/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rx/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-05-24 16:51:47 +00:00
Pedro Alves 2ea286498f gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

gdb/gdbserver/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

include/gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

sim/common/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.
2012-05-24 16:39:15 +00:00
Maciej W. Rozycki 8d409d16dd * linux-low.c (linux_store_registers): Avoid the copying sequence
when no data has been retrieved by ptrace.
2012-05-22 23:17:51 +00:00
Matthew Gretton-Dann 23512c015e 2012-05-22 Will Deacon <will.deacon@arm.com>
* linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
	Include asm/ptrace.h.
	(PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
	already defined.
2012-05-22 13:50:50 +00:00
Maciej W. Rozycki 4934b29e91 * linux-low.c (linux_store_registers): Don't re-retrieve data
with ptrace that has already been obtained from /proc.  Always
	copy any data retrieved with ptrace to the buffer supplied.
2012-05-21 23:50:25 +00:00
Pedro Alves bde24c0a34 2012-05-11 Yao Qi <yao@codesourcery.com>
Pedro Alves  <palves@redhat.com>

	* linux-low.c (enum stopping_threads_kind): New.
	(stopping_threads): Change type to `enum stopping_threads_kind'.
	(handle_extended_wait): If stopping and suspending threads, leave
	the new_lwp suspended too.
	(linux_wait_for_event): Adjust.
	(stop_all_lwps): Set `stopping_threads' to
	STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
	whether we're suspending threads or just stopping them.  Assert no
	recursion happens.
2012-05-11 13:34:34 +00:00
Yao Qi 623b6bdf12 gdb/gdbserver:
* server.h: Move some code to ...
	* gdbthread.h: ... here.  New.
	* Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
	(remote-utils.o, server.o, target.o tracepoint.o): Likewise.
	(nto-low.o, win32-low.o): Likewise.
	* inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
	* regcache.c, remote-utils.c, server.c: Likewise.
	* target.c, tracepoint.c, win32-low.c: Likewise.
2012-04-29 06:28:30 +00:00
Thiago Jung Bauermann f15f99484e * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
(PTRACE_ARG4_TYPE): Likewise.
	(PTRACE_XFER_TYPE): Likewise.
	* linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
	ptrace to PTRACE_ARG3_TYPE.
	* linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
	(PTRACE_ARG4_TYPE): Likewise.
	(PTRACE_XFER_TYPE): Likewise.
	(linux_detach_one_lwp): Cast fourth argument of
	ptrace to long then PTRACE_ARG4_TYPE.
	(regsets_fetch_inferior_registers): Cast third argument of
	ptrace to long then PTRACE_ARG3_TYPE.
	(regsets_store_inferior_registers): Likewise.
2012-04-24 15:03:43 +00:00
Pedro Alves 38ea300a20 2012-04-20 Pedro Alves <palves@redhat.com>
gdb/
	* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
	$srcdir.
	* configure: Regenerate.

	gdb/gdbserver/
	* configure: Regenerate.
2012-04-20 17:58:49 +00:00
Pedro Alves c971b7fa72 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
	* gnulib/: Re-run gnulib-tool to adjust.

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
2012-04-19 19:34:52 +00:00
Pedro Alves 809277f8ce 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* gnulib/: Move whole directory ...
	* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
	* Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS)
	(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
	(aclocal_m4_deps): Adjust.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Adjust AC_OUTPUT output.

	gdbserver/
	* Makefile.in (LIBGNU, INCGNU): Adjust.
	(GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
	(all, install-only, uninstall, clean-info, all-lib, clean)
	(maintainer-clean, Makefile, gnulib/Makefile): Adjust.
	* configure.ac: Adjust AC_OUTPUT output.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2012-04-19 15:27:52 +00:00
Pedro Alves fd9bb8b878 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (generated_files): New.
	(server_h): Remove the explicit dependency on config.h, and depend
	on $generated_files.
2012-04-19 13:26:25 +00:00
Pedro Alves 1c298c6671 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (INCGNU): Add -Ignulib.
2012-04-19 12:10:06 +00:00
Pedro Alves 57c4b50b88 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
	(INCGNU): ... this, and spell out -I here.
	(GNULIB_LIB): Rename to ...
	(LIBGNU): ... this.
	(INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2012-04-19 12:02:56 +00:00
Pedro Alves 1030e047aa 2012-04-19 Pedro Alves <palves@redhat.com>
* config.in: Regenerate.
2012-04-19 11:58:57 +00:00
Pedro Alves 71622373ce Move entries to right place. Drop config.in entry, as I forgot to
actually do what it says.
2012-04-19 11:57:39 +00:00
Pedro Alves 447d431953 2012-04-19 Pedro Alves <palves@redhat.com>
* configure.ac: Remove AC_CHECK_DECLS check for memmem.
	* server.h (memmem): Remove declaration.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-04-19 10:23:03 +00:00
Yao Qi aad9eab9f2 gdb:
* Makefile.in (SFILES): Add common/vec.c and remove vec.c.
        (vec.o): New rule.
        * vec.c: Move it ...
        * common/vec.c: ... here.
        * vec.h: Move it ...
        * common/vec.h: ... here.

gdb/gdbserver:

        * Makefile.in (SFILES): Add common/vec.c.
        (OBS): Add vec.o.
        (vec.o): New rule.
2012-04-19 05:58:52 +00:00
Yao Qi 3e10640f3c gdb/gdbserver/
* remote-utils.c (prepare_resume_reply): Replace with macro
	target_core_of_thread.
	* server.c (handle_qxfer_threads_proper): Likewise.
	* target.h (traget_core_of_thread): New macro.
2012-04-19 05:05:11 +00:00
Pedro Alves 770d76d7b2 2012-04-18 Pedro Alves <palves@redhat.com>
Update gnulib from latest git.
	(639ea5ae15e39fe48d43e04864b2997301e4b969)

	* gnulib/Makefile.am: Update.
	* gnulib/dummy.c: Update.
	* gnulib/extra/arg-nonnull.h: Update.
	* gnulib/extra/c++defs.h: Update.
	* gnulib/extra/update-copyright: Update.
	* gnulib/extra/warn-on-use.h: Update.
	* gnulib/inttypes.in.h: Update.
	* gnulib/m4/00gnulib.m4: Update.
	* gnulib/m4/extensions.m4: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-common.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/m4/gnulib-tool.m4: Update.
	* gnulib/m4/include_next.m4: Update.
	* gnulib/m4/inttypes-pri.m4: Update.
	* gnulib/m4/inttypes.m4: Update.
	* gnulib/m4/longlong.m4: Update.
	* gnulib/m4/memchr.m4: Update.
	* gnulib/m4/memmem.m4: Update.
	* gnulib/m4/mmap-anon.m4: Update.
	* gnulib/m4/multiarch.m4: Update.
	* gnulib/m4/onceonly.m4: Update.
	* gnulib/m4/stddef_h.m4: Update.
	* gnulib/m4/stdint.m4: Update.
	* gnulib/m4/string_h.m4: Update.
	* gnulib/m4/warn-on-use.m4: Update.
	* gnulib/m4/wchar_h.m4: Update.
	* gnulib/m4/wchar_t.m4: Update.
	* gnulib/m4/wint_t.m4: Update.
	* gnulib/memchr.c: Update.
	* gnulib/memmem.c: Update.
	* gnulib/stddef.in.h: Update.
	* gnulib/stdint.in.h: Update.
	* gnulib/str-two-way.h: Update.
	* gnulib/string.in.h: Update.
	* gnulib/wchar.in.h: Update.

	* gnulib/extra/arg-nonnull.h: Delete.
	* gnulib/extra/c++defs.h: Delete.
	* gnulib/extra/warn-on-use.h: Delete.
	* gnulib/m4/wchar_h.m4: Delete.
	* gnulib/m4/wint_t.m4: Delete.
	* gnulib/wchar.in.h: Delete.

	* gnulib/extra/snippets/arg-nonnull.h: New.
	* gnulib/extra/snippets/c++defs.h: New.
	* gnulib/extra/snippets/warn-on-use.h: New.

	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* gnulib/Makefile.in: Regenerate.

	* gdbserver/aclocal.m4: Regenerate.
	* gdbserver/config.in: Regenerate.
	* gdbserver/configure: Regenerate.
2012-04-18 20:45:25 +00:00
Yao Qi 80d269391b gdb/gdbserver/
* tracepoint.c (cmd_qtstart): Download tracepoints even when they are
	duplicated on address.
2012-04-16 15:38:53 +00:00
Yao Qi 42476b702c gdb/
* common/agent.c (agent_run_command): Add one more parameter `len'.
	Update callers.
	* common/agent.h: Update declaration.
	* linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
	Update.
	(linux_child_static_tracepoint_markers_by_strid): Ditto.

gdb/gdbserver/

	* tracepoint.c (COPY_FIELD_TO_BUF): New macro.
	(struct tracepoint_action_ops) <send>: New field.
	(m_tracepoint_action_send, r_tracepoint_action_send): New.
	(agent_expr_send, x_tracepoint_action_send): New.
	(l_tracepoint_action_send): New.
	(cmd_qtdp): Download and install tracepoint
	according to `use_agent'.
	(run_inferior_command): Add one more parameter `len'.
	Update callers.
	(tracepoint_send_agent): New.
	(cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2012-04-16 11:24:47 +00:00
Yao Qi 7bc8363907 gdb/gdbserver/
* tracepoint.c (download_tracepoints): Moved to ...
	(cmd_qtstart): ... here.
2012-04-16 11:16:30 +00:00
Yao Qi 5f18041e78 gdb/gdbserver/
* tracepoint.c: Include inttypes.h.
	(struct collect_memory_action): Use sized types.
	(struct tracepoint): Likewise.
	(cmd_qtdp, stop_tracing): Update print specifiers.
	(cmd_qtp, response_tracepoint): Likewise.
	(collect_data_at_tracepoint): Likewise.
	(collect_data_at_step): Likewise.
2012-04-14 05:36:24 +00:00
Yao Qi 55a8c0761d gdb/
Import gnulib module inttypes from git
	(250b80067c1e1d8faa0c42fb572f721975b929c5)
	* Makefile.in (HFILES_NO_SRCDIR): Add gnulib/inttypes.in.h.
	(aclocal_m4_deps): Add gnulib/m4/inttypes.m4 and gnulib/m4/inttypes-pri.m4
	* aclocal.m4, config.in, configure: Regenerated.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/inttypes.in.h: New.
	* gnulib/m4/inttypes-pri.m4: New.
 	* gnulib/m4/inttypes.m4: New.

gdb/gdbserver/
	Import gnulib module inttypes.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-14 05:24:57 +00:00
Yao Qi dc750257de gdb/gdbserver/
* Makefile.in (maintainer-clean, realclean, distclean): Remove
	Makefile and config.status at last.
2012-04-14 04:14:04 +00:00
Yao Qi 0ab5faf998 gdb/gdbserver/
* tracepoint.c: Include stdint.h unconditionally.
2012-04-14 04:10:04 +00:00
Thiago Jung Bauermann 18f5fd8146 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
on BFD_HAVE_SYS_PROCFS_TYPE.
	* configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
	* configure: Regenerate.
	* config.in: Likewise.
2012-04-13 19:56:05 +00:00
H.J. Lu 4d47af5cf2 Enable x32 support in gdbserver
* Makefile.in (clean): Also remove x32.c x32-linux.c
	x32-avx.c x32-avx-linux.c.
	(x32.o): New target.
	(x32.c): Likewise.
	(x32-linux.o): Likewise.
	(x32-linux.c): Likewise.
	(x32-avx.o): Likewise.
	(x32-avx.c): Likewise.
	(x32-avx-linux.o): Likewise.
	(x32-avx-linux.c): Likewise.

	* configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
	(srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
	(srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
	(srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
	(srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
	i386/x32-avx-linux.xml.

	* linux-x86-low.c (init_registers_x32_linux): New prototype.
	(init_registers_x32_avx_linux): Likwise.
	(x86_linux_update_xmltarget): Call init_registers_x32_linux
	or init_registers_x32_avx_linux if linux_is_elf64 is false.
2012-04-13 14:39:41 +00:00
Pedro Alves ecedbe5852 2012-04-13 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_FLAGS_TO_PASS): New.
	(FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
	(all, uninstall, clean-info, all-lib, clean, maintainer-clean)
	(realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
	the sub-make.
2012-04-13 13:12:33 +00:00
H.J. Lu c92b51775c Convert siginfo for x32 in gdbserver
* linux-x86-low.c (compat_x32_clock_t): New.
	(compat_x32_siginfo_t): Likewise.
	(compat_x32_siginfo_from_siginfo): Likewise.
	(siginfo_from_compat_x32_siginfo): Likewise.
	(linux_is_elf64): Likewise.
	(x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
	and siginfo_from_compat_x32_siginfo for x32.
	(x86_arch_setup): Set linux_is_elf64.
2012-04-12 21:06:12 +00:00
H.J. Lu 214d508ee1 Check if GDBserver is compatible with process
PR gdb/13969
	* linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
	e_machine field.
	(linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
	* linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
	* linux-x86-low.c (x86_arch_setup): Check if GDBserver is
	compatible with process.
2012-04-12 15:35:32 +00:00
Yao Qi c9a1864ab2 gdb/gdbserver/
* Makefile.in: Define abs_top_srcdir and abs_srcdir.
	(INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
	(install-only, install-info, clean): Handle sub dir gnulib.
	(all-lib, am--refresh): New targets.
	(memmem.o): Remove target.
	* configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
	Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
	(AC_REPLACE_FUNCS): Remove memmem.
	Invoke gl_INIT and AM_INIT_AUTOMAKE.
	(AC_OUTPUT): Generate Makefile in gnulib/.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-12 11:11:01 +00:00
Maciej W. Rozycki 367ba2c262 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP. 2012-04-10 22:33:13 +00:00
Pedro Alves 9d236627e7 2012-04-05 Pedro Alves <palves@redhat.com>
-Werror=strict-aliasing

	* spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
	pointer.
2012-04-05 11:20:50 +00:00
Pedro Alves 111217b396 2012-04-04 Pedro Alves <palves@redhat.com>
* linux-sparc-low.c (sparc_fill_gregset_to_stack)
	(sparc_store_gregset_from_stack, sparc_store_gregset)
	(sparc_breakpoint_at): Fix formatting.
2012-04-04 14:42:15 +00:00
Thiago Jung Bauermann 8365dcf5f8 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
are available.
	* linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
	[HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
	* config.in: Regenerate.
	* configure: Likewise.
2012-03-30 20:23:16 +00:00
Pedro Alves 689cc2ae8d 2012-03-29 Pedro Alves <palves@redhat.com>
* linux-low.c (regsets_store_inferior_registers) [__sparc__]:
	Correct ptrace arguments.
2012-03-29 21:27:28 +00:00
Pedro Alves c14dfd3206 2012-03-28 Pedro Alves <palves@redhat.com>
* linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
	(IA64_GR0_REGNUM, IA64_FR0_REGNUM)
	(IA64_FR1_REGNUM): New defines.
	(ia64_fetch_register): New.
	(the_low_target): Install it.
	* linux-low.h (struct linux_target_ops) <fetch_register>: New
	field.
	* linux-low.c (linux_fetch_registers): Try the
	the_low_target.fetch_register hook first.

	* linux-arm-low.c (the_low_target): Adjust.
	* linux-bfin-low.c (the_low_target): Adjust.
	* linux-cris-low.c (the_low_target): Adjust.
	* linux-crisv32-low.c (the_low_target): Adjust.
	* linux-m32r-low.c (the_low_target): Adjust.
	* linux-m68k-low.c (the_low_target): Adjust.
	* linux-mips-low.c (the_low_target): Adjust.
	* linux-ppc-low.c (the_low_target): Adjust.
	* linux-s390-low.c (the_low_target): Adjust.
	* linux-sh-low.c (the_low_target): Adjust.
	* linux-sparc-low.c (the_low_target): Adjust.
	* linux-tic6x-low.c (the_low_target): Adjust.
	* linux-x86-low.c (the_low_target): Adjust.
	* linux-xtensa-low.c (the_low_target): Adjust.
2012-03-28 18:30:01 +00:00
Pedro Alves 63c88e1312 2012-03-26 Pedro Alves <palves@redhat.com>
* server.c (handle_qxfer_libraries): Don't bail early if
	the_target->qxfer_libraries_svr4 is not NULL.
2012-03-26 13:54:57 +00:00
Pedro Alves fb723180bd 2012-03-26 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2012-03-26 12:39:19 +00:00
Pedro Alves 0afae3cf2e 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Terminate the
	"library-list-svr4" element's start tag when the the DSO list is
	empty.
2012-03-23 20:27:08 +00:00
Pedro Alves 485f1ee4f6 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (read_one_ptr): Read the inferior's pointer through
	a variable whose type size is the same as the inferior's pointer
	size.
2012-03-23 20:26:14 +00:00
Thomas Schwinge a5362b9aa4 struct siginfo vs. siginfo_t
gdb/
	* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
	of struct siginfo.
	* arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
	* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
	* linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
	(linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
	(linux_nat_get_siginfo): Likewise.
	* linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
	(linux_nat_get_siginfo): Likewise.
	* linux-tdep.c (linux_get_siginfo_type): Likewise.
	* ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
	* procfs.c (gdb_siginfo_t): Likewise.

gdbserver/
	* linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
	struct siginfo.
	* linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
	* linux-x86-low.c (x86_siginfo_fixup): Likewise.
	* linux-low.h: Include <signal.h>.
	(struct siginfo): Remove forward declaration.
	(struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
	struct siginfo.
2012-03-21 13:43:55 +00:00
Mike Frysinger d226c1429b gdbserver: update gitignore 2012-03-21 04:51:36 +00:00
Pedro Alves 122f36efc1 2012-03-19 Pedro Alves <palves@redhat.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>

	* server.c (cont_thread, general_thread): Add describing comments.
	(start_inferior): Clear `cont_thread'.
	(handle_v_cont): Don't set `cont_thread' if resuming all threads
	of a process.
2012-03-19 14:33:35 +00:00
Yao Qi fc3e51758a gdb/gdbserver/
* tracepoint.c (install_tracepoint): Move duplicated tracepoint
	handling to ...
	(cmd_qtdp): ... here.
2012-03-15 12:57:13 +00:00