1 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4 Remove extraneous NULL element.
6 2013-03-13 Yao Qi <yao@codesourcery.com>
8 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9 'V' block in trace frame.
11 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13 * target.h (struct target_ops): Add btrace ops.
14 (target_supports_btrace): New macro.
15 (target_enable_btrace): New macro.
16 (target_disable_btrace): New macro.
17 (target_read_btrace): New macro.
18 * gdbthread.h (struct thread_info): Add btrace field.
19 * server.c: Include btrace-common.h.
20 (handle_btrace_general_set): New function.
21 (handle_btrace_enable): New function.
22 (handle_btrace_disable): New function.
23 (handle_general_set): Call handle_btrace_general_set.
24 (handle_qxfer_btrace): New function.
25 (struct qxfer qxfer_packets[]): Add btrace entry.
26 * inferiors.c (remove_thread): Disable btrace.
27 * linux-low: Include linux-btrace.h.
28 (linux_low_enable_btrace): New function.
29 (linux_low_read_btrace): New function.
30 (linux_target_ops): Add btrace ops.
31 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
32 Add srv_linux_btrace=yes.
33 (x86_64-*-linux*): Add linux-btrace.o.
34 Add srv_linux_btrace=yes.
35 * configure.ac: Define HAVE_LINUX_BTRACE.
36 * config.in: Regenerated.
37 * configure: Regenerated.
39 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
41 * server.c (handle_qxfer): Preserve error message if -3 is
43 (qxfer): Document the -3 return value.
45 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
47 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
48 (linux_btrace_h): New variable.
49 (linux-btrace.o): New rule.
51 2013-03-08 Stan Shebs <stan@codesourcery.com>
52 Hafiz Abid Qadeer <abidh@codesourcery.com>
54 * tracepoint.c (trace_buffer_size): New global.
55 (DEFAULT_TRACE_BUFFER_SIZE): New define.
56 (init_trace_buffer): Change to one-argument function. Allocate
58 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
59 handle QTBuffer:size packet.
60 (cmd_bigqtbuffer_size): New function.
61 (initialize_tracepoint): Call init_trace_buffer with
62 DEFAULT_TRACE_BUFFER_SIZE.
63 * server.c (handle_query): Add QTBuffer:size in the
66 2013-03-07 Yao Qi <yao@codesourcery.com>
68 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
69 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
71 (cmd_qtsp): Adjust condition. Do post increment.
72 Set cur_action and cur_step_action back to 0.
74 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
77 * linux-low.c (linux_write_memory): Return early success if LEN is
80 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
82 * configure.srv: Add x86_64-*-cygwin* as target.
84 2013-02-28 Tom Tromey <tromey@redhat.com>
86 * configure.ac: Invoke AC_SYS_LARGEFILE.
87 * configure, config.in: Rebuild.
89 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
91 * win32-low.c: Throughout, fix format strings and casts of
92 printf-like functions to avoid type related warnings on all
94 (get_child_debug_event): Print dwDebugEventCode as hex since
95 that's how it's usually documented.
97 2013-02-28 Yao Qi <yao@codesourcery.com>
99 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
102 2013-02-27 Jiong Wang <jiwang@tilera.com>
104 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
105 (reg-tilegx32.c): New rule.
106 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
107 * linux-tile-low.c (tile_arch_setup): New function. Invoke
108 different register info initializer according to elf class.
109 (init_registers_tilgx32): New function. The tilegx32 register info
111 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
112 (tile_store_gregset): Likewise.
114 2013-02-27 Yao Qi <yao@codesourcery.com>
116 * server.c (process_point_options): Print debug message when
117 debug_threads is true.
119 2013-02-26 Yao Qi <yao@codesourcery.com>
121 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
123 2013-02-19 Pedro Alves <palves@redhat.com>
124 Kai Tietz <ktietz@redhat.com>
128 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
129 instead of strtoul to extract address from packet.
130 (process_serial_event) <'z'>: Likewise.
132 2013-02-18 Yao Qi <yao@codesourcery.com>
134 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
136 2013-02-14 Pedro Alves <palves@redhat.com>
140 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
141 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
143 2013-02-14 Pedro Alves <palves@redhat.com>
145 * tracepoint.c (cmd_qtdpsrc): Use savestring.
147 2013-02-14 Pedro Alves <palves@redhat.com>
149 * tracepoint.c (save_string): Delete.
150 (add_tracepoint_action): Use savestring instead of save_string.
152 2013-02-12 Pedro Alves <palves@redhat.com>
154 * linux-xtensa-low.c: Ditto.
155 * xtensa-xtregs.c: Ditto.
157 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
159 * thread-db.c (thread_db_get_tls_address): NULL pointer check
162 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
164 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
165 aarch64_num_wp_regs and aarch64_num_bp_regs to
166 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
168 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
170 * linux-aarch64-low.c (ps_get_thread_area): Replace
171 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
173 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
174 Marcus Shawcroft <marcus.shawcroft@arm.com>
175 Nigel Stephens <nigel.stephens@arm.com>
176 Yufeng Zhang <yufeng.zhang@arm.com>
178 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
179 (aarch64.c, aarch64-without-fpu.c): New targets.
180 * configure.srv (aarch64*-*-linux*): New.
181 * linux-aarch64-low.c: New file.
183 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
185 * linux-low.c (handle_extended_wait, linux_create_inferior)
186 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
187 (dequeue_one_deferred_signal, linux_resume_one_thread)
188 (fetch_register, linux_write_memory, linux_enable_event_reporting)
189 (linux_tracefork_grandchild, linux_test_for_tracefork)
190 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
191 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
192 where the argument is 0.
194 2013-01-25 Yao Qi <yao@codesourcery.com>
196 * event-loop.c: Include "queue.h".
197 (gdb_event_p): New typedef.
198 (struct gdb_event) <next_event>: Remove.
199 (event_queue): Change to QUEUE(gdb_event_p).
200 (async_queue_event): Remove.
201 (gdb_event_xfree): New.
202 (initialize_event_loop): New.
203 (process_event): Use API from QUEUE.
204 (wait_for_event): Likewise.
205 * server.c (main): Call initialize_event_loop.
206 * server.h (initialize_event_loop): Declare.
208 2013-01-18 Yao Qi <yao@codesourcery.com>
210 * ax.h (struct eval_agent_expr_context): New.
211 (gdb_eval_agent_expr): Update declaration.
212 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
213 TFRAME. Add new argument CTX.
214 * server.h (struct eval_agent_expr_context): Declare.
215 (agent_mem_read, agent_tsv_read): Update declaration.
216 (agent_mem_read_string): Likewise.
217 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
218 (add_traceframe_block): Add new argument TPOINT.
219 Increase TPOINT->traceframe_usage.
220 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
221 eval_tracepoint_agent_expr.
222 (condition_true_at_tracepoint): Likewise.
223 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
224 (agent_mem_read_string, agent_tsv_read): Likewise.
226 2013-01-16 Yao Qi <yao@codesourcery.com>
228 * linux-low.c (linux_resume_one_lwp): Don't check
229 'lwp->bp_reinsert != 0'.
231 2013-01-07 Joel Brobecker <brobecker@adacore.com>
232 Pedro Alves <palves@redhat.com>
234 * lynx-low.c (ptrace_request_to_str): Define a temporary
235 macro and use it to simplify this function's implementation.
237 2013-01-07 Joel Brobecker <brobecker@adacore.com>
239 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
242 2013-01-07 Joel Brobecker <brobecker@adacore.com>
244 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
246 2013-01-07 Joel Brobecker <brobecker@adacore.com>
248 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
250 2013-01-07 Joel Brobecker <brobecker@adacore.com>
252 * lynx-low.c (lynx_resume): Use the resume_info parameter
253 to determine the ptid for the lynx_ptrace call, unless
254 it is equal to minus_one_ptid, in which case we use the
255 ptid of the current_inferior.
256 (lynx_wait_1): After having received a thread create/exit
257 event, resume the inferior's execution using the signaling
258 thread's ptid, rather than the old ptid.
260 2013-01-07 Joel Brobecker <brobecker@adacore.com>
262 * lynx-low.c (lynx_resume): Delete variable ret.
264 2013-01-01 Joel Brobecker <brobecker@adacore.com>
266 * gdbreplay.c (gdbreplay_version): Update copyright year.
267 * server.c (gdbserver_version): Likewise.
269 2012-12-17 Joel Brobecker <brobecker@adacore.com>
271 * lynx-low.c (lynx_wait_1): Add debug trace before adding
274 2012-12-17 Joel Brobecker <brobecker@adacore.com>
276 * lynx-low.c (ptrace_request_to_str): Add handling for
279 2012-12-17 Joel Brobecker <brobecker@adacore.com>
281 * lynx-low.c (lynx_attach): Delete variable new_process.
283 2012-12-17 Joel Brobecker <brobecker@adacore.com>
285 * lynx-low.c (lynx_create_inferior): Delete variable
288 2012-12-17 Joel Brobecker <brobecker@adacore.com>
290 * lynx-low.c (ptrace_request_to_str): Do not handle
291 PTRACE_GETTHREADLIST if this macro does not exist.
293 2012-12-15 Yao Qi <yao@codesourcery.com>
295 * Makefile.in (OBS): Add notif.o.
296 * notif.c, notif.h: New.
297 * server.c: Include "notif.h".
298 (struct vstop_notif) <next>: Remove.
300 (queue_stop_reply): Update.
301 (push_event, send_next_stop_reply): Remove.
302 (discard_queued_stop_replies): Update.
303 (notif_stop): New variable.
304 (handle_v_stopped): Remove.
305 (handle_v_requests): Don't call handle_v_stopped. Call
306 handle_ack_notif instead.
307 (queue_stop_reply_callback): Call notif_event_enque instead
309 (handle_status): Don't call send_next_stop_reply, call
310 notif_write_event instead.
311 (kill_inferior_callback): Likewise.
312 (detach_or_kill_inferior_callback): Likewise.
313 (main): Call initialize_notif.
314 (process_serial_event): Call QUEUE_is_empty.
315 (handle_target_event): Call notif_push instead of push event.
316 * server.h (push_event): Remove declaration.
318 2012-12-10 Tom Tromey <tromey@redhat.com>
320 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
321 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
324 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
325 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
326 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
327 (amd64-linux-ipa.o, ax.o): Rewrite.
328 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
329 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
330 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
331 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
332 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
333 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
334 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
335 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
336 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
337 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
338 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
339 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
340 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
341 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
342 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
343 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
344 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
345 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
346 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
347 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
348 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
349 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
350 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
351 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
352 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
353 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
354 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
355 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
356 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
357 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
358 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
359 (reg-tilegx.o): Remove.
360 (all_object_files): New macro.
362 * aclocal.m4, configure: Rebuild.
363 * acinclude.m4: Include depstand.m4, lead-dot.m4.
364 * configure.ac: Invoke ZW_CREATE_DEPDIR,
365 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
367 2012-12-05 Tom Tromey <tromey@redhat.com>
370 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
372 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
374 * configure.ac: Check for linux/perf_event.h.
375 * config.in: Regenerated.
376 * configure: Regenerated.
378 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
380 * hostio.c (handle_readlink): Decrease buffer size
381 parameter passed to readlink by one byte.
383 2012-11-26 Yao Qi <yao@codesourcery.com>
385 * configure.ac (build_warnings): Append '-Wempty-body'.
386 * configure: Regenerated.
387 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
390 2012-11-15 Pierre Muller <muller@sourceware.org>
392 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
393 * config.in: Regenerate.
394 * configure: Regenerate.
395 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
396 Use "gdb_wait.h" header instead of <sys/wait.h> header.
397 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
398 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
400 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
401 instead of <sys/wait.h> header.
402 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
404 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
406 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
407 (various make rules): Remove -DGDBSERVER
409 2012-11-09 Yao Qi <yao@codesourcery.com>
411 * spu-low.c (current_ptid): Move it to ..
412 * gdbthread.h: ... here. New.
413 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
414 * server.c (myresume, process_serial_event): Likewise.
415 * thread-db.c (thread_db_find_new_threads): Likewise.
416 * tracepoint.c (run_inferior_command): Likewise.
418 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
420 * server.c (handle_search_memory_1): Include access length in
423 2012-09-05 Michael Brandt <michael.brandt@axis.com>
425 * linux-crisv32-low.c: Fix compile errors.
427 2012-09-04 Yao Qi <yao@codesourcery.com>
429 * tracepoint.c (cmd_qtsv): Adjust debug message.
430 Don't check CUR_TPOINT.
432 2012-08-28 Yao Qi <yao@codesourcery.com>
434 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
435 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
436 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
437 Remove declarations of xmalloc, xreallloc, xstrdup and
439 * Makefile.in (libiberty_h): New.
440 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
441 (linux-bfin-low.o): Append dependency 'libiberty.h'.
443 2012-08-23 Yao Qi <yao@codesourcery.com>
445 * server.h: Remove declaration of 'xsnprintf'.
447 2012-08-22 Keith Seitz <keiths@redhat.com>
449 * server.h: Include build-gnulib-gbserver/config.h.
450 * gdbreplay.c: Likewise.
452 2012-08-08 Doug Evans <dje@google.com>
454 * Makefile.in (SFILES): Add gdb_vecs.c.
455 (OBS): Add gdb_vecs.o.
456 (gdb_vecs_h, host_defs_h): New variables.
457 (thread-db.o): Add $(gdb_vecs_h) dependency.
458 (gdb_vecs.o): New rule.
459 * thread-db.c: #include "gdb_vecs.h".
460 (thread_db_load_search): Use a vector to iterate over path elements.
461 Handle text appearing after "$pdir".
463 * configure.ac: Add check for strstr.
464 * config.in: Regenerate.
465 * configure: Regenerate.
467 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
469 * hostio.c (handle_pread): If pread fails, fall back to attempting
471 (handle_pwrite): Likewise for pwrite.
473 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
475 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
476 between unsupported TYPE and unimplementable ADDR/LEN combination.
477 (arm_insert_point): Act on new return value.
479 2012-07-31 Pedro Alves <palves@redhat.com>
481 * server.c (process_point_options): Only skip tokens if we find
482 one that is unrecognized. Don't treat 'X' specially while
483 skipping unrecognized tokens.
485 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
487 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
488 to 4-byte-align HW breakpoint addresses for Thumb.
490 2012-07-27 Yao Qi <yao@codesourcery.com>
494 * server.h: Declare gdb_agent_about_to_close.
495 * target.c (kill_inferior): Include "agent.h".
496 New. Send command 'kill'.
497 * target.h (kill_inferior): Removed macro.
498 * tracepoint.c (gdb_agent_about_to_close): New.
499 (gdb_agent_helper_thread): Handle command 'close'.
500 Wait endlessly until the inferior stops.
501 Install gdb_agent_remove_socket to atexit hook.
502 (agent_socket_name): New static variable.
503 (gdb_agent_socket_init): Replace local variable 'name' with
505 (gdb_agent_remove_socket): New.
507 2012-07-27 Yao Qi <yao@codesourcery.com>
509 * server.c (process_point_options): Stop at 'X' when parsing.
511 2012-07-19 Michael Eager <eager@eagercon.com>
513 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
515 * linux-x86-low.c (x86_insert_point, x86_remove_point):
516 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
519 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
521 * gdbserver/linux-low.c (initialize_low): Call
522 linux_ptrace_init_warnings.
524 2012-07-02 Doug Evans <dje@google.com>
526 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
529 2012-07-02 Stan Shebs <stan@codesourcery.com>
531 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
532 (ax.o): Add it to build rule.
535 (IPA_OBS): Add format.o.
536 * server.c (handle_query): Claim support for breakpoint commands.
537 (process_point_options): Add command case.
538 (process_serial_event): Leave running if there are printfs in
540 * mem-break.h (any_persistent_commands): Declare.
541 (add_breakpoint_commands): Declare.
542 (gdb_no_commands_at_breakpoint): Declare.
543 (run_breakpoint_commands): Declare.
544 * mem-break.c (struct point_command_list): New struct.
545 (struct breakpoint): New field command_list.
546 (any_persistent_commands): New function.
547 (add_commands_to_breakpoint): New function.
548 (add_breakpoint_commands): New function.
549 (gdb_no_commands_at_breakpoint): New function.
550 (run_breakpoint_commands): New function.
551 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
553 * ax.c: Include format.h.
554 (ax_printf): New function.
555 (gdb_eval_agent_expr): Add printf opcode.
557 2012-06-13 Yao Qi <yao@codesourcery.com>
559 * server.c (start_inferior): Remove duplicated writes to fields
560 'last_resume_kind' and 'last_status' of 'current_inferior'.
562 2012-06-12 Yao Qi <yao@codesourcery.com>
563 Pedro Alves <palves@redhat.com>
565 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
567 * server.c (handle_v_cont): Extend comment.
569 2012-06-11 Yao Qi <yao@codesourcery.com>
571 * linux-low.c (linux_attach): Add 'static'.
573 2012-06-06 Yao Qi <yao@codesourcery.com>
575 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
577 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
579 Fix gcc -flto compilation warning.
580 * server.c (main): Make variable multi_mode and attach volatile.
582 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
584 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
585 if the platform doesn't know about it.
587 2012-05-30 Jeff Kenton <jkenton@tilera.com>
589 * Makefile.in (SFILES): Add linux-tile-low.c.
590 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
591 * configure.srv: Handle tilegx-*-linux*.
592 * linux-tile-low.c: New file.
594 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
596 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
598 2012-05-24 Pedro Alves <palves@redhat.com>
602 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
604 2012-05-24 Pedro Alves <palves@redhat.com>
608 Replace target_signal with gdb_signal throughout.
610 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
612 * linux-low.c (linux_store_registers): Avoid the copying sequence
613 when no data has been retrieved by ptrace.
615 2012-05-22 Will Deacon <will.deacon@arm.com>
617 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
618 Include asm/ptrace.h.
619 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
622 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
624 * linux-low.c (linux_store_registers): Don't re-retrieve data
625 with ptrace that has already been obtained from /proc. Always
626 copy any data retrieved with ptrace to the buffer supplied.
628 2012-05-11 Yao Qi <yao@codesourcery.com>
629 Pedro Alves <palves@redhat.com>
631 * linux-low.c (enum stopping_threads_kind): New.
632 (stopping_threads): Change type to `enum stopping_threads_kind'.
633 (handle_extended_wait): If stopping and suspending threads, leave
634 the new_lwp suspended too.
635 (linux_wait_for_event): Adjust.
636 (stop_all_lwps): Set `stopping_threads' to
637 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
638 whether we're suspending threads or just stopping them. Assert no
641 2012-04-29 Yao Qi <yao@codesourcery.com>
643 * server.h: Move some code to ...
644 * gdbthread.h: ... here. New.
645 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
646 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
647 (nto-low.o, win32-low.o): Likewise.
648 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
649 * regcache.c, remote-utils.c, server.c: Likewise.
650 * target.c, tracepoint.c, win32-low.c: Likewise.
652 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
654 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
655 (PTRACE_ARG4_TYPE): Likewise.
656 (PTRACE_XFER_TYPE): Likewise.
657 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
658 ptrace to PTRACE_ARG3_TYPE.
659 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
660 (PTRACE_ARG4_TYPE): Likewise.
661 (PTRACE_XFER_TYPE): Likewise.
662 (linux_detach_one_lwp): Cast fourth argument of
663 ptrace to long then PTRACE_ARG4_TYPE.
664 (regsets_fetch_inferior_registers): Cast third argument of
665 ptrace to long then PTRACE_ARG3_TYPE.
666 (regsets_store_inferior_registers): Likewise.
668 2012-04-20 Pedro Alves <palves@redhat.com>
670 * configure: Regenerate.
672 2012-04-19 Pedro Alves <palves@redhat.com>
674 * Makefile.in (GNULIB_BUILDDIR): New.
675 (LIBGNU, INCGNU, GNULIB_H): Adjust.
676 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
677 (all, install-only, uninstall, clean-info, all-lib, clean): No
678 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
679 (maintainer-clean realclean distclean): Use subdir_do.
681 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
682 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
683 * acinclude.m4: Include acx_configure_dir.m4.
684 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
685 calls. Call AC_PROG_RANLIB. Configure gnulib using
688 (GNULIB_STDINT_H): Adjust.
689 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
690 * gdbreplay.c: Include build-gnulib/config.h.
691 * server.h: Likewise.
692 * aclocal.m4: Regenerate.
693 * config.in: Regenerate.
694 * configure: Regenerate.
696 2012-04-19 Pedro Alves <palves@redhat.com>
698 * Makefile.in (LIBGNU, INCGNU): Adjust.
699 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
700 (all, install-only, uninstall, clean-info, all-lib, clean)
701 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
702 * configure.ac: Adjust AC_OUTPUT output.
703 * aclocal.m4: Regenerate.
704 * configure: Regenerate.
706 2012-04-19 Pedro Alves <palves@redhat.com>
708 * Makefile.in (generated_files): New.
709 (server_h): Remove the explicit dependency on config.h, and depend
712 2012-04-19 Pedro Alves <palves@redhat.com>
714 * Makefile.in (INCGNU): Add -Ignulib.
716 2012-04-19 Pedro Alves <palves@redhat.com>
718 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
719 (INCGNU): ... this, and spell out -I here.
720 (GNULIB_LIB): Rename to ...
722 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
724 2012-04-19 Pedro Alves <palves@redhat.com>
726 * config.in: Regenerate.
728 2012-04-19 Pedro Alves <palves@redhat.com>
730 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
731 * server.h (memmem): Remove declaration.
732 * config.in: Regenerate.
733 * configure: Regenerate.
735 2012-04-19 Yao Qi <yao@codesourcery.com>
737 * Makefile.in (SFILES): Add common/vec.c.
741 2012-04-19 Yao Qi <yao@codesourcery.com>
743 * remote-utils.c (prepare_resume_reply): Replace with macro
744 target_core_of_thread.
745 * server.c (handle_qxfer_threads_proper): Likewise.
746 * target.h (traget_core_of_thread): New macro.
748 2012-04-18 Pedro Alves <palves@redhat.com>
750 * aclocal.m4: Regenerate.
751 * configure: Regenerate.
753 2012-04-16 Yao Qi <yao@codesourcery.com>
755 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
756 duplicated on address.
758 2012-04-16 Yao Qi <yao@codesourcery.com>
760 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
761 (struct tracepoint_action_ops) <send>: New field.
762 (m_tracepoint_action_send, r_tracepoint_action_send): New.
763 (agent_expr_send, x_tracepoint_action_send): New.
764 (l_tracepoint_action_send): New.
765 (cmd_qtdp): Download and install tracepoint
766 according to `use_agent'.
767 (run_inferior_command): Add one more parameter `len'.
769 (tracepoint_send_agent): New.
770 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
772 2012-04-16 Yao Qi <yao@codesourcery.com>
774 * tracepoint.c (download_tracepoints): Moved to ...
775 (cmd_qtstart): ... here.
777 2012-04-14 Yao Qi <yao@codesourcery.com>
779 * tracepoint.c: Include inttypes.h.
780 (struct collect_memory_action): Use sized types.
781 (struct tracepoint): Likewise.
782 (cmd_qtdp, stop_tracing): Update print specifiers.
783 (cmd_qtp, response_tracepoint): Likewise.
784 (collect_data_at_tracepoint): Likewise.
785 (collect_data_at_step): Likewise.
787 2012-04-14 Yao Qi <yao@codesourcery.com>
789 Import gnulib module inttypes.
790 * aclocal.m4, config.in, configure: Regenerated.
792 2012-04-14 Yao Qi <yao@codesourcery.com>
794 * Makefile.in (maintainer-clean, realclean, distclean): Remove
795 Makefile and config.status at last.
797 2012-04-13 Yao Qi <yao@codesourcery.com>
799 * tracepoint.c: Include stdint.h unconditionally.
801 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
803 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
804 on BFD_HAVE_SYS_PROCFS_TYPE.
805 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
806 * configure: Regenerate.
807 * config.in: Likewise.
809 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
811 * Makefile.in (clean): Also remove x32.c x32-linux.c
812 x32-avx.c x32-avx-linux.c.
815 (x32-linux.o): Likewise.
816 (x32-linux.c): Likewise.
817 (x32-avx.o): Likewise.
818 (x32-avx.c): Likewise.
819 (x32-avx-linux.o): Likewise.
820 (x32-avx-linux.c): Likewise.
822 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
823 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
824 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
825 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
826 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
827 i386/x32-avx-linux.xml.
829 * linux-x86-low.c (init_registers_x32_linux): New prototype.
830 (init_registers_x32_avx_linux): Likwise.
831 (x86_linux_update_xmltarget): Call init_registers_x32_linux
832 or init_registers_x32_avx_linux if linux_is_elf64 is false.
834 2012-04-13 Pedro Alves <palves@redhat.com>
836 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
837 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
838 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
839 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
842 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
844 * linux-x86-low.c (compat_x32_clock_t): New.
845 (compat_x32_siginfo_t): Likewise.
846 (compat_x32_siginfo_from_siginfo): Likewise.
847 (siginfo_from_compat_x32_siginfo): Likewise.
848 (linux_is_elf64): Likewise.
849 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
850 and siginfo_from_compat_x32_siginfo for x32.
851 (x86_arch_setup): Set linux_is_elf64.
853 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
856 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
858 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
859 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
860 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
861 compatible with process.
863 2012-04-12 Yao Qi <yao@codesourcery.com>
865 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
866 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
867 (install-only, install-info, clean): Handle sub dir gnulib.
868 (all-lib, am--refresh): New targets.
869 (memmem.o): Remove target.
870 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
871 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
872 (AC_REPLACE_FUNCS): Remove memmem.
873 Invoke gl_INIT and AM_INIT_AUTOMAKE.
874 (AC_OUTPUT): Generate Makefile in gnulib/.
875 * aclocal.m4, config.in, configure: Regenerated.
877 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
879 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
881 2012-04-05 Pedro Alves <palves@redhat.com>
883 -Werror=strict-aliasing
885 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
888 2012-04-04 Pedro Alves <palves@redhat.com>
890 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
891 (sparc_store_gregset_from_stack, sparc_store_gregset)
892 (sparc_breakpoint_at): Fix formatting.
894 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
896 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
898 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
899 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
900 * config.in: Regenerate.
901 * configure: Likewise.
903 2012-03-29 Pedro Alves <palves@redhat.com>
905 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
906 Correct ptrace arguments.
908 2012-03-28 Pedro Alves <palves@redhat.com>
910 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
911 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
912 (IA64_FR1_REGNUM): New defines.
913 (ia64_fetch_register): New.
914 (the_low_target): Install it.
915 * linux-low.h (struct linux_target_ops) <fetch_register>: New
917 * linux-low.c (linux_fetch_registers): Try the
918 the_low_target.fetch_register hook first.
920 * linux-arm-low.c (the_low_target): Adjust.
921 * linux-bfin-low.c (the_low_target): Adjust.
922 * linux-cris-low.c (the_low_target): Adjust.
923 * linux-crisv32-low.c (the_low_target): Adjust.
924 * linux-m32r-low.c (the_low_target): Adjust.
925 * linux-m68k-low.c (the_low_target): Adjust.
926 * linux-mips-low.c (the_low_target): Adjust.
927 * linux-ppc-low.c (the_low_target): Adjust.
928 * linux-s390-low.c (the_low_target): Adjust.
929 * linux-sh-low.c (the_low_target): Adjust.
930 * linux-sparc-low.c (the_low_target): Adjust.
931 * linux-tic6x-low.c (the_low_target): Adjust.
932 * linux-x86-low.c (the_low_target): Adjust.
933 * linux-xtensa-low.c (the_low_target): Adjust.
935 2012-03-26 Pedro Alves <palves@redhat.com>
937 * server.c (handle_qxfer_libraries): Don't bail early if
938 the_target->qxfer_libraries_svr4 is not NULL.
940 2012-03-26 Pedro Alves <palves@redhat.com>
942 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
944 2012-03-23 Pedro Alves <palves@redhat.com>
946 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
947 "library-list-svr4" element's start tag when the the DSO list is
950 2012-03-23 Pedro Alves <palves@redhat.com>
952 * linux-low.c (read_one_ptr): Read the inferior's pointer through
953 a variable whose type size is the same as the inferior's pointer
956 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
958 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
960 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
961 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
962 * linux-low.h: Include <signal.h>.
963 (struct siginfo): Remove forward declaration.
964 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
967 2012-03-21 Mike Frysinger <vapier@gentoo.org>
969 * .gitignore: Ignore more files.
971 2012-03-19 Pedro Alves <palves@redhat.com>
972 Jan Kratochvil <jan.kratochvil@redhat.com>
974 * server.c (cont_thread, general_thread): Add describing comments.
975 (start_inferior): Clear `cont_thread'.
976 (handle_v_cont): Don't set `cont_thread' if resuming all threads
979 2012-03-15 Yao Qi <yao@codesourcery.com>
981 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
983 (cmd_qtdp): ... here.
985 2012-03-15 Yao Qi <yao@codesourcery.com>
987 * tracepoint.c (struct tracepoint_action_ops): New.
988 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
989 (m_tracepoint_action_download): New.
990 (r_tracepoint_action_download): New.
991 (x_tracepoint_action_download): New.
992 (l_tracepoint_action_download): New.
993 (add_tracepoint_action): Install `action->ops' according type.
994 (download_tracepoint_1): Move code `download' function pointer
995 of various tracepoint_action_ops.
997 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
999 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1000 linux_ptrace_attach_warnings.
1002 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1004 * Makefile.in (linux-ptrace.o): New.
1005 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1006 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1007 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1008 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1009 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1011 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1013 2012-03-08 Yao Qi <yao@codesourcery.com>
1014 Pedro Alves <palves@redhat.com>
1016 Fix PR server/13392.
1017 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1019 * tracepoint.c (remove_tracepoint): New.
1020 (cmd_qtdp): Call remove_tracepoint when failed to install.
1022 2012-03-07 Pedro Alves <palves@redhat.com>
1024 * linux-low.c (get_detach_signal): New.
1025 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1026 Pass on pending signals to PTRACE_DETACH. Check the result of the
1028 * server.c (program_signals, program_signals_p): New.
1029 (handle_general_set): Handle QProgramSignals.
1030 * server.h (program_signals, program_signals_p): Declare.
1032 2012-03-05 Pedro Alves <palves@redhat.com>
1033 Jan Kratochvil <jan.kratochvil@redhat.com>
1035 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1038 2012-03-03 Yao Qi <yao@codesourcery.com>
1040 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1041 agent_look_up_symbols.
1043 2012-03-03 Yao Qi <yao@codesourcery.com>
1045 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1046 (linux-x86-low.o): Likewise.
1047 * server.h: Remove in_process_agent_loaded.
1048 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1052 2012-03-03 Yao Qi <yao@codesourcery.com>
1054 * tracepoint.c (gdb_agent_capability): New global.
1055 (in_process_agent_loaded_ust): Renamed to
1056 `in_process_agent_supports_ust'.
1058 (in_process_agent_supports_ust): Call agent_capability_check.
1059 (clear_installed_tracepoints): Assert that agent supports
1062 2012-03-03 Yao Qi <yao@codesourcery.com>
1064 * linux-low.c (linux_supports_agent): New.
1065 (linux_target_ops): Initialize field `supports_agent' with
1066 linux_supports_agent.
1067 * target.h (struct target_ops) <supports_agent>: New.
1068 (target_supports_agent): New macro.
1069 * server.c (handle_general_set): Handle packet 'QAgent'.
1070 (handle_query): Send `QAgent+'.
1071 * Makefile.in (server.o): Depends on agent.h.
1073 2012-03-03 Yao Qi <yao@codesourcery.com>
1075 * Makefile.in (OBS): Add agent.o.
1076 Add new rule for agent.o.
1077 Track dependence of tracepoint.c on agent.h.
1078 * tracepoint.c (run_inferior_command_1):
1079 (run_inferior_command): Call agent_run_command.
1080 (gdb_ust_connect_sync_socket): Deleted. Move it to
1082 (resume_thread, stop_thread): Likewise.
1083 (gdb_ust_socket_init): Renamed to ...
1084 (gdb_agent_socket_init): ... New.
1085 (gdb_ust_thread): Renamed to ...
1086 (gdb_agent_helper_thread): ... New.
1087 (gdb_ust_init): Move some code to ...
1088 (gdb_agent_init): ... here. New.
1089 [HAVE_UST]: Call gdb_ust_init.
1090 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1091 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1092 * config.in, configure: Regenerated.
1094 2012-03-02 Pedro Alves <palves@redhat.com>
1096 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1097 * linux-low.c (struct simple_pid_list): New.
1098 (stopped_pids): New a struct simple_pid_list pointer.
1099 (add_to_pid_list, pull_pid_from_list): New.
1100 (handle_extended_wait): Don't assume the first signal new children
1101 report is SIGSTOP. Adjust call to pull_pid_from_list.
1102 (linux_wait_for_lwp): Adjust.
1104 2012-03-02 Yao Qi <yao@codesourcery.com>
1106 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1109 2012-03-02 Yao Qi <yao@codesourcery.com>
1111 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1112 `stop_pc' and `tpoint'. Update caller.
1114 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1116 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1117 * linux-low.c (use_linux_regsets): New macro.
1118 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1119 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1120 (linux_register_in_regsets): New function.
1121 (usr_fetch_inferior_registers): Skip registers covered by
1123 (usr_store_inferior_registers): Likewise.
1124 (usr_fetch_inferior_registers): New macro.
1125 (usr_store_inferior_registers): Likewise.
1126 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1127 (linux_store_registers): Likewise.
1128 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1130 (init_registers_mips64_dsp_linux): Likewise.
1131 (init_registers_mips_linux): New macro.
1132 (init_registers_mips_dsp_linux): Likewise.
1133 (mips_dsp_num_regs): Likewise.
1134 (DSP_BASE, DSP_CONTROL): New fallback macros.
1135 (mips_base_regs): New macro.
1136 (mips_regmap): Use it. Fix the size.
1137 (mips_dsp_regmap): New variable.
1138 (mips_dsp_regset_bitmap): Likewise.
1139 (mips_arch_setup): New function.
1140 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1142 (mips_cannot_store_register): Likewise.
1143 (the_low_target): Update .arch_setup, .num_regs and .regmap
1144 initializers. Add .regset_bitmap initializer.
1145 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1147 * linux-bfin-low.c (the_low_target): Likewise.
1148 * linux-cris-low.c (the_low_target): Likewise.
1149 * linux-crisv32-low.c (the_low_target): Likewise.
1150 * linux-ia64-low.c (the_low_target): Likewise.
1151 * linux-m32r-low.c (the_low_target): Likewise.
1152 * linux-m68k-low.c (the_low_target): Likewise.
1153 * linux-ppc-low.c (the_low_target): Likewise.
1154 * linux-s390-low.c (the_low_target): Likewise.
1155 * linux-sh-low.c (the_low_target): Likewise.
1156 * linux-sparc-low.c (the_low_target): Likewise.
1157 * linux-tic6x-low.c (the_low_target): Likewise.
1158 * linux-x86-low.c (the_low_target): Likewise.
1159 * linux-xtensa-low.c (the_low_target): Likewise.
1160 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1161 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1162 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1164 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1165 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1167 2012-02-29 Yao Qi <yao@codesourcery.com>
1168 Pedro Alves <palves@redhat.com>
1170 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1171 `step_over_finished' is true.
1173 2012-02-27 Pedro Alves <palves@redhat.com>
1175 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1176 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1178 2012-02-27 Pedro Alves <palves@redhat.com>
1181 * linux-low.c (pid_is_stopped): New.
1182 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1184 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1186 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1189 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1191 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1193 2012-02-24 Luis Machado <lgustavo@codesourcery>
1195 * server.c (handle_query): Advertise support for target-side
1196 breakpoint condition evaluation.
1197 (process_point_options): New function.
1198 (process_serial_event): When inserting a breakpoint, check for
1199 a target-side condition that should be evaluated.
1201 * mem-break.c: Include regcache.h and ax.h.
1202 (point_cond_list_t): New data structure.
1203 (breakpoint) <cond_list>: New field.
1204 (find_gdb_breakpoint_at): Make non-static.
1205 (delete_gdb_breakpoint_at): Clear any target-side
1207 (clear_gdb_breakpoint_conditions): New function.
1208 (add_condition_to_breakpoint): Likewise.
1209 (add_breakpoint_condition): Likewise.
1210 (gdb_condition_true_at_breakpoint): Likewise.
1211 (gdb_breakpoint_here): Return result directly instead
1212 of going through a local variable.
1214 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1215 (clear_gdb_breakpoint_conditions): Likewise.
1216 (add_breakpoint_condition): Likewise.
1217 (gdb_condition_true_at_breakpoint): Likewise.
1219 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1220 (need_step_over_p): Take target-side breakpoint condition into
1223 2012-02-24 Luis Machado <lgustavo@codesourcery>
1225 * server.h: Include tracepoint.h.
1226 (agent_mem_read, agent_get_trace_state_variable_value,
1227 agent_set_trace_state_variable_value,
1228 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1229 get_set_tsv_func_addr): New prototypes.
1231 * ax.h: New include file.
1232 * ax.c: New source file.
1234 * tracepoint.c: Include ax.h.
1235 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1236 agent_expr, eval_result_type): Move to ax.h.
1237 (parse_agent_expr): Rename to ...
1238 (gdb_parse_agent_expr): ... this, make it non-static and move
1240 (unparse_agent_expr) Rename to ...
1241 (gdb_unparse_agent_expr): ... this, make it non-static and move
1243 (eval_agent_expr): Rename to ...
1244 (eval_tracepoint_agent_expr): ... this.
1245 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1246 forward declarations.
1247 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1248 (agent_get_trace_state_variable_value): New function.
1249 (agent_set_trace_state_variable_value): New function.
1250 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1251 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1252 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1253 (condition_true_at_tracepoint): Likewise.
1254 (parse_agent_expr): Rename to ...
1255 (gdb_parse_agent_expr): ... this and move to ax.c.
1256 (unparse_agent_expr): Rename to ...
1257 (gdb_unparse_agent_expr): ... this and move to ax.c.
1258 (gdb_agent_op_name): Move to ax.c.
1259 (eval_agent_expr): Rename to ...
1260 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1262 (eval_tracepoint_agent_expr): New function.
1263 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1265 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1267 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1268 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1269 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1270 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1271 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1272 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1273 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1274 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1275 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1276 (compile_bytecodes): Remove forward declaration.
1277 (is_goto_target): Move to ax.c.
1278 (compile_bytecodes): Move to ax.c and call
1279 agent_get_trace_state_variable_value (...) and
1280 agent_set_trace_state_variable_value (...).
1282 * Makefile.in: Update ax.c and IPA dependencies.
1284 2012-02-24 Pedro Alves <palves@redhat.com>
1286 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1287 (cmd_bigqtbuffer_circular): ... this. Only handle
1288 'QTBuffer:circular:'.
1289 (handle_tracepoint_general_set): Adjust.
1291 2012-02-16 Yao Qi <yao@codesourcery.com>
1293 * inferiors.c: Move code to ...
1294 * dll.c: .... here. New.
1295 * server.h: Declare clear_dlls.
1296 * Makefile.in (SFILES): Add dll.c.
1300 2012-02-11 Yao Qi <yao@codesourcery.com>
1302 * server.c: (handle_monitor_command): Add a new parameter
1304 (handle_query): Update caller.
1306 2012-02-09 Joel Brobecker <brobecker@adacore.com>
1308 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1309 * configure, config.in: Regenerate.
1310 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1313 2012-02-02 Pedro Alves <palves@redhat.com>
1315 Try SIGKILL first, then PTRACE_KILL.
1316 * linux-low.c (linux_kill_one_lwp): New.
1317 (linux_kill_one_lwp): Rename to ...
1318 (kill_one_lwp_callback): ... this. Use the new
1321 2012-02-02 Pedro Alves <palves@redhat.com>
1323 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1326 2012-01-27 Pedro Alves <palves@redhat.com>
1328 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1329 (elf_64_file_p): Make static.
1330 (linux_pid_exe_is_elf_64_file): New.
1331 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1332 Delete declarations.
1333 (linux_pid_exe_is_elf_64_file): Declare.
1334 * linux-x86-low.c (x86_arch_setup): Use
1335 linux_pid_exe_is_elf_64_file.
1337 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1339 * linux-low.c (linux_wait_for_event_1): Rename to ...
1340 (linux_wait_for_event): ... here and merge it with former
1341 linux_wait_for_event - new variable wait_ptid, use it.
1342 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1344 2012-01-23 Pedro Alves <palves@redhat.com>
1346 * server.c (main): Avoid yet another case of infinite loop while
1347 detaching/killing after a longjmp.
1349 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1352 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1354 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1356 * hostio.c (handle_readlink): New function.
1357 (handle_vFile): Call it to handle "vFile:readlink" packets.
1359 2012-01-20 Pedro Alves <palves@redhat.com>
1360 Ulrich Weigand <ulrich.weigand@linaro.org>
1362 * server.c (handle_v_requests): Only support vAttach and vRun to
1363 start multiple processes when in extended protocol mode.
1365 2012-01-17 Pedro Alves <palves@redhat.com>
1367 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1368 memalign plus mprotect to allocate the scratch buffer.
1370 2012-01-13 Pedro Alves <palves@redhat.com>
1372 * server.c (attach_inferior): Clear `cont_thread'.
1374 2012-01-13 Pedro Alves <palves@redhat.com>
1376 * server.c (main): Avoid infinite loop while detaching/killing
1379 2012-01-09 Doug Evans <dje@google.com>
1381 * server.c (start_inferior): Set last_ptid in --wrapper case.
1383 2012-01-06 Yao Qi <yao@codesourcery.com>
1385 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1387 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1389 2012-01-04 Yao Qi <yao@codesourcery.com>
1391 * tracepoint.c (cmd_qtdp): Print debug message
1392 for static tracepoint.
1394 2012-01-04 Yao Qi <yao@codesourcery.com>
1396 * tracepoint.c (trace_vdebug): Differentiate debug message
1397 between gdbserver and IPA.
1399 2012-01-03 Yao Qi <yao@codesourcery.com>
1401 * tracepoint.c (tracepoint_was_hit): Don't collect for
1404 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1406 * terminal.h: Reformat copyright header.
1408 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1410 * server.c (gdbserver_version): Update copyright year.
1411 * gdbreplay.c (gdbreplay_version): Likewise.
1413 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1415 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1418 2011-12-18 Hui Zhu <teawater@gmail.com>
1419 * linux-low.c (linux_create_inferior): Save return value to ret.
1421 2011-12-18 Hui Zhu <teawater@gmail.com>
1423 * linux-low.c (linux_create_inferior): Save return value to ret.
1425 2011-12-16 Doug Evans <dje@google.com>
1427 * linux-low.c (linux_create_inferior): If stdio connection,
1428 redirect stdin from /dev/null, stdout to stderr.
1429 * remote-utils.c (remote_is_stdio): New static global.
1430 (remote_connection_is_stdio): New function.
1431 (remote_prepare): Handle stdio connection.
1432 (remote_open): Ditto.
1433 (remote_close): Don't close stdin for stdio connections.
1434 (read_prim,write_prim): New functions. Replace all calls to
1435 read/write to these.
1436 * server.c (main): Watch for "-" argument. Move call to
1437 remote_prepare before start_inferior.
1438 * server.h (STDIO_CONNECTION_NAME): New macro.
1439 (remote_connection_is_stdio): Declare.
1441 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1442 in debugging output.
1444 2011-12-15 Yao Qi <yao@codesourcery.com>
1446 * tracepoint.c: Include sys/syscall.h.
1447 (gdb_ust_thread): Remove preprocessor conditional.
1449 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1451 * linux-low.c (linux_detach_one_lwp): Call
1452 the_low_target.prepare_to_resume before detaching.
1454 2011-12-14 Yao Qi <yao@codesourcery.com>
1456 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1459 2011-12-14 Yao Qi <yao@codesourcery.com>
1461 * i386-low.c (i386_low_stopped_data_address): Initialize local
1464 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1468 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1469 DR_CONTROL unless necessary. Extend comments.
1470 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1471 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1473 2011-12-13 Yao Qi <yao@codesourcery.com>
1475 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1477 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1479 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1481 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1482 Print new debug message for such case.
1484 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1486 Fix overlapping memcpy.
1487 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1488 the read_inferior_memory transfer.
1489 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1490 write_inferior_memory transfer.
1491 (set_fast_tracepoint_jump): New variable buf. Use it for the
1492 read_inferior_memory and write_inferior_memory transfers.
1493 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1494 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1495 Use it for the write_inferior_memory transfer.
1496 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1499 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1501 * linux-low.c (fetch_register, store_register): Make code
1502 consistent, fix formatting.
1504 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1506 * linux-low.c (usr_store_inferior_registers): Factor out code
1507 to handle individual registers into...
1508 (store_register): ... this new function.
1510 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1512 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1513 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1514 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1515 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1516 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1517 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1518 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1519 (srv_xmlfiles): Add new XML files.
1521 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1523 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1524 (init_registers_s390_linux32v1): Add prototype.
1525 (init_registers_s390_linux32v2): Likewise.
1526 (init_registers_s390_linux64v1): Likewise.
1527 (init_registers_s390_linux64v2): Likewise.
1528 (init_registers_s390x_linux64v1): Likewise.
1529 (init_registers_s390x_linux64v2): Likewise.
1530 (s390_num_regs): Increment to 52.
1531 (s390_regmap): Add orig_r2 register.
1532 (s390_num_regs_3264): Increment to 68.
1533 (s390_regmap_3264): Add orig_r2 register.
1534 (s390_collect_ptrace_register): Handle orig_r2 register.
1535 (s390_supply_ptrace_register): Likewise.
1536 (s390_fill_last_break): New function.
1537 (s390_store_last_break): Likewise.
1538 (s390_fill_system_call): New function.
1539 (s390_store_system_call): Likewise.
1540 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1542 (s390_check_regset): New function.
1543 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1544 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1545 Update target_regsets for available register sets.
1547 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1548 Jan Kratochvil <jan.kratochvil@redhat.com>
1550 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1551 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1553 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1554 * linux-low.h (struct process_info_private): New member r_debug.
1555 * server.c (handle_qxfer_libraries): Call
1556 the_target->qxfer_libraries_svr4.
1557 (handle_qxfer_libraries_svr4): New function.
1558 (qxfer_packets): New entry "libraries-svr4".
1559 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1560 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1561 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1562 PACKET_qXfer_libraries_svr4.
1564 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1566 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1567 PSW address/mask between 8-byte and 16-byte formats.
1568 (s390_supply_ptrace_register): Likewise.
1569 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1570 basic addressing mode bit.
1572 2011-11-24 Stan Shebs <stan@codesourcery.com>
1574 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1576 2011-11-17 Stan Shebs <stan@codesourcery.com>
1578 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1579 (tracing_start_time): New global.
1580 (tracing_stop_time): New global.
1581 (tracing_user_name): New global.
1582 (tracing_notes): New global.
1583 (tracing_stop_note): New global.
1584 (cmd_qtstart): Set traceframe_usage, start_time.
1585 (stop_tracing): Set stop_time.
1586 (cmd_qtstatus): Report additional status.
1587 (cmd_qtp): New function.
1588 (handle_tracepoint_query): Call it.
1589 (cmd_qtnotes): New function.
1590 (handle_tracepoint_general_set): Call it.
1591 (get_timestamp): Rename from tsv_get_timestamp.
1593 2011-11-14 Stan Shebs <stan@codesourcery.com>
1594 Kwok Cheung Yeung <kcy@codesourcery.com>
1596 * linux-x86-low.c (small_jump_insn): New.
1597 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1598 trampoline and error message, build a trampoline and issue a small
1599 jump instruction to it.
1600 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1601 trampoline and error message.
1602 (x86_get_min_fast_tracepoint_insn_len): New.
1603 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1604 * linux-low.h (struct linux_target_ops): Add arguments to
1605 install_fast_tracepoint_jump_pad operation, add new operation.
1606 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1608 (linux_get_min_fast_tracepoint_insn_len): New function.
1609 (linux_target_op): Add new operation.
1610 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1611 (gdb_trampoline_buffer_end): Ditto.
1612 (gdb_trampoline_buffer_error): Ditto.
1613 (struct ipa_sym_addresses): Add fields for new IPA variables.
1614 (symbol_list): Add entries for new IPA variables.
1615 (struct tracepoint): Add fields to hold the address range of the
1616 trampoline used by the tracepoint.
1617 (trampoline_buffer_head): New static variable.
1618 (trampoline_buffer_tail): Ditto.
1619 (claim_trampoline_space): New function.
1620 (have_fast_tracepoint_trampoline_buffer): New function.
1621 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1623 (install_fast_tracepoint): Ditto, also add error buffer argument.
1624 (cmd_qtminftpilen): New function.
1625 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1626 (fast_tracepoint_from_trampoline_address): New function.
1627 (fast_tracepoint_collecting): Handle trampoline as part of jump
1629 (set_trampoline_buffer_space): New function.
1630 (initialize_tracepoint): Initialize new IPA variables.
1631 * target.h (struct target_ops): Add arguments to
1632 install_fast_tracepoint_jump_pad operation, add new
1633 get_min_fast_tracepoint_insn_len operation.
1634 (target_get_min_fast_tracepoint_insn_len): New.
1635 (install_fast_tracepoint_jump_pad): Add arguments.
1636 * server.h (IPA_BUFSIZ): Define.
1637 * linux-i386-ipa.c: Include extra header files.
1638 (initialize_fast_tracepoint_trampoline_buffer): New function.
1639 (initialize_low_tracepoint): Call it.
1640 * server.h (set_trampoline_buffer_space): Declare.
1641 (claim_trampoline_space): Ditto.
1642 (have_fast_tracepoint_trampoline_buffer): Ditto.
1644 2011-11-14 Yao Qi <yao@codesourcery.com>
1646 * server.c (handle_query): Handle InstallInTrace for qSupported.
1647 * tracepoint.c (add_tracepoint): Sort list.
1648 (install_tracepoint, download_tracepoint): New.
1649 (cmd_qtdp): Call them to install and download tracepoints.
1650 (sort_tracepoints): Removed.
1651 (cmd_qtstart): Update.
1653 2011-11-14 Yao Qi <yao@codesourcery.com>
1655 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1656 * mem-break.h: Declare.
1657 * tracepoint.c (cmd_qtstart): Move some code to ...
1658 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1660 (download_tracepoints): Move some code to ...
1661 (download_tracepoint_1): ... here. New.
1663 2011-11-08 Yao Qi <yao@codesourcery.com>
1665 * remote-utils.c (relocate_instruction): A comment fix.
1667 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1669 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1670 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1671 dr_status_mirror and dr_control_mirror from debug_reg_state.
1672 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1673 (i386_initial_stuff): Remove use of deleted globals.
1674 (i386_get_thread_context, i386_set_thread_context,
1675 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1676 from debug_reg_state.
1678 2011-11-05 Yao Qi <yao@codesourcery.com>
1680 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1681 address as TPOINT's.
1683 2011-11-02 Stan Shebs <stan@codesourcery.com>
1685 * tracepoint.c (agent_mem_read_string): New function.
1686 (eval_agent_expr): Call it for tracenz.
1687 * server.c (handle_query): Report support for tracenz.
1689 2011-11-02 Yao Qi <yao@codesourcery.com>
1691 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1693 2011-11-02 Yao Qi <yao@codesourcery.com>
1695 * target.h: Fix a typo in comment.
1697 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1699 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1700 clobber the breakpoints' shadows with fast tracepoint jumps.
1701 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1702 * target.c (write_inferior_memory): Also pass MYADDR down to
1705 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1707 * configure.ac: Check support for personality routine.
1708 * configure: Regenerate.
1709 * config.in: Likewise.
1710 * linux-low.c: Include <sys/personality.h>.
1711 Define ADDR_NO_RANDOMIZE if necessary.
1712 (linux_create_inferior): Disable address space randomization when
1713 forking inferior, if requested.
1714 (linux_supports_disable_randomization): New function.
1715 (linux_target_ops): Install it.
1716 * server.h (disable_randomization): Declare.
1717 * server.c (disable_randomization): New global variable.
1718 (handle_general_set): Handle QDisableRandomization.
1719 (handle_query): Likewise for qSupported.
1720 (main): Support --disable-randomization and --no-disable-randomization
1721 command line arguments.
1722 * target.h (struct target_ops): Add supports_disable_randomization.
1723 (target_supports_disable_randomization): New macro.
1725 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1727 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1729 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1730 [!PT_GETDSBT] (target_loadmap): New definition.
1731 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1732 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1733 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1734 and PT_GETDSBT to LINUX_LOADMAP.
1735 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1736 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1738 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1740 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1741 (arm_linux_hwbp_cap): New static variable.
1742 (arm_linux_get_hwbp_cap): Replace by ...
1743 (arm_linux_init_hwbp_cap): ... this new function.
1744 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1745 (arm_linux_get_hw_watchpoint_count): Likewise.
1746 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1747 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1748 (arm_prepare_to_resume): Use perror_with_name instead of error.
1750 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1752 * linux-arm-low.c: Include <signal.h>.
1753 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1754 (struct arm_linux_hwbp_cap): New data type.
1755 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1756 (struct arm_linux_hw_breakpoint): New data type.
1757 (MAX_BPTS, MAX_WPTS): Define.
1758 (struct arch_process_info, struct arch_lwp_info): New data types.
1759 (arm_linux_get_hwbp_cap): New function.
1760 (arm_linux_get_hw_breakpoint_count): Likewise.
1761 (arm_linux_get_hw_watchpoint_count): Likewise.
1762 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1763 (arm_hwbp_control_initialize): Likewise.
1764 (arm_hwbp_control_is_enabled): Likewise.
1765 (arm_hwbp_control_is_initialized): Likewise.
1766 (arm_hwbp_control_disable): Likewise.
1767 (arm_linux_hw_breakpoint_equal): Likewise.
1768 (arm_linux_hw_point_initialize): Likewise.
1769 (struct update_registers_data): New data structure.
1770 (update_registers_callback: New function.
1771 (arm_insert_point): Likewise.
1772 (arm_remove_point): Likewise.
1773 (arm_stopped_by_watchpoint): Likewise.
1774 (arm_stopped_data_address): Likewise.
1775 (arm_new_process): Likewise.
1776 (arm_new_thread): Likewise.
1777 (arm_prepare_to_resume): Likewise.
1778 (the_low_target): Register arm_insert_point, arm_remove_point,
1779 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1780 arm_new_thread, and arm_prepare_to_resume.
1782 2011-09-15 Stan Shebs <stan@codesourcery.com>
1784 * server.h (struct emit_ops): Add compare-goto fields.
1785 * tracepoint.c (gdb_agent_op_sizes): New table.
1786 (emit_eq_goto): New function.
1787 (emit_ne_goto): New function.
1788 (emit_lt_goto): New function.
1789 (emit_le_goto): New function.
1790 (emit_gt_goto): New function.
1791 (emit_ge_goto): New function.
1792 (is_goto_target): New function.
1793 (compile_bytecodes): Recognize special cases of compare-goto
1794 combinations and call specialized emitters for them.
1795 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1796 (amd64_emit_ne_goto): New function.
1797 (amd64_emit_lt_goto): New function.
1798 (amd64_emit_le_goto): New function.
1799 (amd64_emit_gt_goto): New function.
1800 (amd64_emit_ge_goto): New function.
1801 (amd64_emit_ops): Add the new functions.
1802 (i386_emit_eq_goto): New function.
1803 (i386_emit_ne_goto): New function.
1804 (i386_emit_lt_goto): New function.
1805 (i386_emit_le_goto): New function.
1806 (i386_emit_gt_goto): New function.
1807 (i386_emit_ge_goto): New function.
1808 (i386_emit_ops): Add the new functions.
1810 2011-09-08 Stan Shebs <stan@codesourcery.com>
1812 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1813 (i386_emit_epilogue): Restore %ebx.
1815 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1817 * server.c (step_thread): Remove definition.
1818 (process_serial_event): Don't handle Hs.
1819 * server.h (step_thread): Remove declaration.
1820 * target.c (set_desired_inferior): Remove use of step_thread.
1822 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1824 * linux-low.c: Include linux-procfs.h.
1825 (linux_attach_lwp_1): Update comments.
1826 (linux_attach): Scan for existing threads when attaching to a
1827 process that is the tgid.
1828 * Makefile.in: Update dependencies.
1830 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1832 * configure.srv: Add linux-procfs.o dependencies.
1834 2011-08-14 Yao Qi <yao@codesourcery.com>
1836 * target.h (struct target_ops): Fix indent.
1837 * win32-low.c (win32_target_ops): Fix comment.
1839 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1840 Yao Qi <yao@codesourcery.com>
1842 * Makefile.in (clean): Remove tic6x-*.c files.
1843 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1844 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1845 (tic6x-c64xp-linux.c): Likewise.
1846 * configure.srv: Add support for tic6x-*-uclinux.
1847 * linux-tic6x-low.c: New.
1848 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1850 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1851 Yao Qi <yao@codesourcery.com>
1853 * target.h (struct target_ops): Add read_loadmap.
1854 * linux-low.c (struct target_loadseg): New type.
1855 (struct target_loadmap): New type.
1856 (linux_read_loadmap): New function.
1857 (linux_target_ops): Add linux_read_loadmap.
1858 * server.c (handle_query): Support qXfer:fdpic:read packet.
1859 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1862 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1864 * win32-low.c: Include <stdint.h>.
1866 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1868 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1869 to the inferior here.
1870 (i386_remove_aligned_watchpoint): Ditto.
1871 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1872 fit part of the watchpoint in the debug registers.
1873 (i386_update_inferior_debug_regs): New.
1874 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1875 registers, and only update the inferior on success.
1876 (i386_low_remove_watchpoint): Ditto.
1878 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1880 * linux-low.c (compare_ints, unique, list_threads, show_process,
1881 linux_core_of_thread): Delete.
1882 (linux_target_ops): Change linux_core_of_thread to
1883 linux_common_core_of_thread.
1884 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1885 * utils.c (malloc_failure): Change type of argument.
1886 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1887 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1888 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1889 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1890 (IPA_OBJS): Add common-utils-ipa.o.
1891 (ptid_h, linux_osdata_h): New macros.
1892 (server_h): Add common/common-utils.h, common/xml-utils.h,
1893 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1895 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1896 ptid.o, buffer.o): New rules.
1897 (linux-low.o): Add common/linux-osdata.h as a dependency.
1898 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1899 * configure.ac: Add AC_HEADER_DIRENT check.
1900 * config.in: Regenerate.
1901 * configure: Regenerate.
1902 * remote-utils.c (xml_escape_text): Delete.
1903 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1904 buffer_xml_printf): Move to common/buffer.c.
1905 * server.c (main): Remove call to initialize_inferiors.
1906 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1907 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1908 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1909 internal_error, gdb_assert, gdb_assert_fail): Delete.
1910 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1911 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1913 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1914 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1915 initialize_inferiors): Delete.
1917 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1919 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1922 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1924 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1926 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1928 2011-05-26 Yao Qi <yao@codesourcery.com>
1930 * Makefile.in (thread-db.o): Track dependence to
1931 common/gdb_thread_db.h.
1932 * thread-db.c: include gdb_thread_db.h from right place.
1934 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1936 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1937 __FILE__ and __LINE__ to internal_error.
1939 2011-05-13 Doug Evans <dje@google.com>
1941 * thread-db.c (try_thread_db_load_from_sdir): New function.
1942 (try_thread_db_load_from_dir): New function.
1943 (thread_db_load_search): Handle $sdir, ignore $pdir.
1944 Remove trying of system directories if search of
1945 libthread-db-search-path fails, that is now done via $sdir.
1947 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1949 * server.c (handle_query): Add EnableDisableTracepoints to the list
1950 of supported features.
1951 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1953 (cmd_qtenable_disable): New.
1954 (cmd_qtstart): Install tracepoints even if disabled.
1955 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1956 receiving a QTEnable or QTDisable packet.
1957 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1958 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1960 (gdb_probe): Skip data collection if static tracepoint is disabled.
1962 2011-05-10 Doug Evans <dje@google.com>
1964 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1966 2011-05-04 Doug Evans <dje@google.com>
1968 * linux-low.c (linux_join): Skip process lookup.
1969 * spu-low.c (spu_join): Ditto.
1970 * server.c (join_inferiors_callback): Delete.
1971 (process_serial_event): For 'D' packet (detach) call join_inferior
1974 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1976 * README: Don't mention xscale*-*-linux*.
1977 * configure.srv (xscale*-*-linux*): Don't handle target.
1979 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1981 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1983 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1984 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1985 (i386_emit_void_call_2): Likewise.
1987 2011-04-26 Yao Qi <yao@codesourcery.com>
1989 * linux-low.c: Move common macros to linux-ptrace.h.
1990 Include linux-ptrace.h.
1991 * Makefile.in (linux_ptrace_h): New.
1992 (linux-low.o): Depends on linux-ptrace.h.
1994 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1996 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1997 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1998 (remote_prepare): New function with most of the TCP code from ...
1999 (remote_open): ... here. Detect PORT here unconditionally. Move also
2000 setting transport_is_reliable.
2001 * server.c (run_once): New variable.
2002 (gdbserver_usage): Document it.
2003 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2004 the first run if RUN_ONCE.
2005 * server.h (run_once, remote_prepare): New declarations.
2007 2011-04-19 Tom Tromey <tromey@redhat.com>
2009 * win32-low.c (handle_load_dll): Remove duplicate "the".
2011 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2013 Remove support for old Cygwin 1.5 versions.
2014 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2015 function to avoid warning.
2016 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2019 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2021 * gdbserver/server.h (Macro _): Define it if not available.
2023 2011-03-14 Michael Snyder <msnyder@vmware.com>
2025 * hostio.c (handle_close): Remove unnecessary null test.
2027 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2029 * Makefile.in (maintainer-clean realclean distclean): Remove
2030 "make ... subdir_do" command.
2032 2011-03-10 Michael Snyder <msnyder@vmware.com>
2034 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2036 * server.c (handle_v_run): Free alloced buffer on early return.
2038 2011-03-09 Yao Qi <yao@codesourcery.com>
2041 2011-03-04 Yao Qi <yao@codesourcery.com>
2043 * Makefile.in: Remove GNU make feature --directory.
2045 2011-03-05 Yao Qi <yao@codesourcery.com>
2047 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2048 (subdir_do): New make target. Copied from gdb/Makefile.
2049 (maintainer-clean, realclean, distclean, clean): Call corresponding
2050 make targets in common/Makefile.
2052 2011-02-11 Yao Qi <yao@codesourcery.com>
2054 * configure.ac: Call AC_PROG_RANLIB.
2055 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2056 * configure: Regenerate.
2058 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2060 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2062 2011-03-06 Yao Qi <yao@codesourcery.com>
2064 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2066 2011-03-05 Yao Qi <yao@codesourcery.com>
2068 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2069 (subdir_do): New make target. Copied from gdb/Makefile.
2070 (maintainer-clean, realclean, distclean, clean): Call corresponding
2071 make targets in common/Makefile.
2073 2011-03-04 Yao Qi <yao@codesourcery.com>
2075 * Makefile.in: Remove GNU make feature --directory.
2077 2011-03-04 Michael Snyder <msnyder@vmware.com>
2079 * server.c (queue_stop_reply): Call xmalloc not malloc.
2081 2011-03-02 Michael Snyder <msnyder@vmware.com>
2083 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2085 2011-02-28 Michael Snyder <msnyder@vmware.com>
2087 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2088 (cmd_qtframe): Ditto.
2089 (cmd_qtbuffer): Ditto.
2090 (cmd_bigqtbuffer): Ditto.
2092 * utils.c (decimal2str): Initialize 'width' to nine, then
2095 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2097 * hostio.c (require_data): Free *data, not data.
2099 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2101 * hostio.c (require_data): Use free, not xfree.
2103 2011-02-27 Michael Snyder <msnyder@vmware.com>
2105 * server.c (handle_query): Discard unused value.
2107 * hostio.c (require_data): Free malloc memory before returning
2110 2011-02-26 Michael Snyder <msnyder@vmware.com>
2112 * linux-low.c (list_threads): Call closedir for dirent.
2114 2011-02-27 Michael Snyder <msnyder@vmware.com>
2116 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2117 a case statement falls through.
2119 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2121 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2124 2011-02-26 Michael Snyder <msnyder@vmware.com>
2126 * utils.c (decimal2str): Eliminate dead code and dead param.
2127 (pulongest): Drop dead param from call to decimal2str.
2130 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2132 Revert the following patch (not approved yet):
2133 2011-02-21 Hui Zhu <teawater@gmail.com>
2134 * tracepoint.c (tp_printf): New function.
2135 (eval_agent_expr): Handle gdb_agent_op_printf.
2137 2011-02-21 Hui Zhu <teawater@gmail.com>
2139 * tracepoint.c (tp_printf): New function.
2140 (eval_agent_expr): Handle gdb_agent_op_printf.
2142 2011-02-18 Tom Tromey <tromey@redhat.com>
2144 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2145 (tracepoint.o): Likewise.
2146 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2147 (gdb_agent_op_names): Likewise.
2149 2011-02-18 Tom Tromey <tromey@redhat.com>
2151 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2152 gdb_agent_op_rot>: New constants.
2153 (gdb_agent_op_names): Add pick and roll.
2154 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2157 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2159 * aclocal.m4: Regenerated with aclocal-1.11.1.
2161 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2163 * server.c (handle_qxfer_traceframe_info): New.
2164 (qxfer_packets): Register "traceframe-info".
2165 (handle_query): Report support for qXfer:traceframe-info:read+.
2166 * tracepoint.c (match_blocktype): New.
2167 (traceframe_find_block_type): Rename to ...
2168 (traceframe_walk_blocks): ... this. Add callback filter argument,
2170 (traceframe_find_block_type): New, reimplemented on top of
2171 traceframe_walk_blocks.
2172 (build_traceframe_info_xml): New.
2173 (traceframe_read_info): New.
2174 * server.h (traceframe_read_info): Declare.
2176 2011-02-11 Yao Qi <yao@codesourcery.com>
2178 * configure.ac: Call AC_PROG_RANLIB.
2179 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2180 * configure: Regenerate.
2182 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2184 * server.c (gdb_read_memory): Change return semantics to allow
2186 (handle_search_memory_1): Adjust.
2187 (process_serial_event) <'m' packet>: Handle partial transfers.
2188 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2190 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2192 * regcache.c (init_register_cache): Initialize
2193 regcache->register_status.
2194 (free_register_cache): Release regcache->register_status.
2195 (regcache_cpy): Copy register_status.
2196 (registers_to_string): Print 'x's for unavailable registers.
2197 (supply_register): Mark the register's status valid or
2198 unavailable, depending on whether a buffer was passed in or not.
2199 (supply_register_zeroed): New.
2200 (supply_regblock): Mark the registers' status valid or
2201 unavailable, depending on whether a buffer was passed in or not.
2202 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2203 (struct regcache): New `register_status' field.
2204 (supply_register_zeroed): Declare.
2205 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2206 supply_register_zeroed, rather than passing a NULL buffer to
2208 * tracepoint.c (fetch_traceframe_registers): Update comment.
2210 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2212 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2215 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2217 * server.h (decode_xfer_write): Change prototype.
2218 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2219 and don't extract the annex here.
2220 * server.c (decode_xfer_read): Remove `annex' parameter,
2221 and don't extract the annex here.
2223 (struct qxfer): New.
2224 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2225 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2226 (handle_qxfer_statictrace): New functions, abstracted out from
2227 handle_query, and made to use the struct qxfer interface.
2228 (handle_threads_qxfer_proper): Rename to ...
2229 (handle_qxfer_threads_proper): ... this.
2230 (handle_threads_qxfer): Rename to ...
2231 (handle_qxfer_threads): ... this. Adjust.
2232 (qxfer_packets): New array.
2233 (handle_qxfer): New function.
2234 (handle_query): Use handle_qxfer.
2236 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2238 * gdbreplay.c: Shorten lines of >= 80 columns.
2239 * linux-low.c: Ditto.
2240 * linux-ppc-low.c: Ditto.
2241 * linux-s390-low.c: Ditto.
2242 * linux-sparc-low.c: Ditto.
2243 * linux-x86-low.c: Ditto.
2244 * linux-xtensa-low.c: Ditto.
2245 * mem-break.c: Ditto.
2247 * regcache.h: Ditto.
2248 * remote-utils.c: Ditto.
2251 * thread-db.c: Ditto.
2252 * tracepoint.c: Ditto.
2254 * win32-low.h: Ditto.
2256 2011-01-05 Joel Brobecker <brobecker@adacore.com>
2258 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2261 2011-01-01 Joel Brobecker <brobecker@adacore.com>
2263 * server.c (gdbserver_version): Update copyright year in version
2265 * gdbreplay.c (gdbreplay_version): Ditto.
2267 2010-12-29 Jie Zhang <jie.zhang@analog.com>
2269 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2270 * linux-bfin-low.c: New file.
2271 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2272 PT_DATA_ADDR for BFIN targets.
2273 * Makefile.in (SFILES): Add linux-bfin-low.c.
2274 (clean): Remove reg-bfin.c.
2275 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2276 * README: Mention supported Blackfin targets.
2278 2010-12-23 Mike Frysinger <vapier@gentoo.org>
2280 * .gitignore: New file.
2282 2010-11-16 Mike Frysinger <vapier@gentoo.org>
2284 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2286 2010-10-22 Jie Zhang <jie@codesourcery.com>
2288 * Makefile.in: Add FLAGS_TO_PASS variable.
2289 (install): Remove dependency of install-only and recursively
2290 invoke make for install-only.
2292 2010-10-04 Doug Evans <dje@google.com>
2294 * Makefile.in (uninstall): Use $(DESTDIR).
2296 2010-09-24 Pedro Alves <pedro@codesourcery.com>
2300 * linux-x86-low.c (compat_siginfo_from_siginfo)
2301 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2302 si_code is < 0. Check for si_code == SI_TIMER before checking for
2305 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2307 * lynx-i386-low.c: New file.
2308 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2310 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2312 * lynx-low.c (ptrace_request_to_str): Remove handling for
2313 request values that have been removed in LynxOS 5.x.
2315 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2317 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2320 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2322 * configure.ac: Add --enable-inprocess-agent option.
2323 * configure: Rebuilt.
2325 2010-09-06 Yao Qi <yao@codesourcery.com>
2327 * linux-low.c (linux_kill): Remove unused variable.
2328 (linux_stabilize_threads): Likewise.
2329 * server.c (start_inferior): Likewise.
2330 (queue_stop_reply_callback): Likewise.
2331 * tracepoint.c (do_action_at_tracepoint): Likewise.
2333 2010-09-06 Yao Qi <yao@codesourcery.com>
2335 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2338 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2340 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2342 2010-09-06 Pedro Alves <pedro@codesourcery.com>
2344 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2347 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2349 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2350 gdbserver/lynx-ppc-low.c: New files.
2351 * Makefile.in (lynx_low_h): New variable.
2352 (lynx-low.o, lynx-ppc-low.o): New rules.
2353 * configure.ac: On LynxOS, link with -lnetinet.
2354 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2355 * configure: regenerate.
2357 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2359 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2360 * configure.ac: Add check for vasprintf and vsnprintf.
2361 * configure, config.in: Regenerate.
2362 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2364 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2366 * gdbreplay.c: Move include of alloca.h up, next to include of
2368 * server.h: Add include of malloc.h.
2369 * mem-break.c: Remove include of malloc.h.
2370 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2372 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2374 * Makefile.in (memmem.o): Build with -Wno-error.
2376 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2378 * utils.c (xsnprintf): Make non-static.
2379 * server.h: Add xsnprintf declaration.
2380 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2381 replace calls to snprintf by calls to xsnprintf throughout.
2383 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2385 * configure.ac: Add configure check for alloca.
2386 * configure, config.in: Regenerate.
2387 * server.h: Include alloca.h if it exists.
2388 * gdbreplay.c: Include alloca.h if it exists.
2390 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2392 * linux-low.c (__SIGRTMIN): Define if not already defined.
2393 (linux_create_inferior): Check for __ANDROID__ rather than
2395 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2396 are already deferred.
2397 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2398 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2399 stopped and already has a pending signal to report.
2400 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2401 a pending signal to report or is moving out of a jump pad.
2402 (linux_init_signals): Check for __ANDROID__ rather than
2405 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2407 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2408 debug_threads check. Avoid a linear search when not doing debug
2411 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2413 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2414 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2415 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2416 (process_event): Change local fd's type to gdb_fildes_t.
2417 (create_file_handler): Adjust prototype.
2418 (delete_file_handler): Adjust prototype.
2419 (handle_file_event): Adjust prototype. Use pfildes.
2420 (create_file_event): Adjsut prototype.
2421 * remote-utils.c (remote_desc, listen_desc): Change type to
2423 * server.h: New gdb_fildes_t typedef.
2424 [USE_WIN32API]: Include winsock2.h.
2425 (delete_file_handler, add_file_handler): Adjust prototypes.
2427 * utils.c (pfildes): New.
2429 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2431 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2432 * configure: Regenerate.
2434 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2436 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2437 (linux_done_accessing_memory): ... this.
2438 (linux_target_ops): Adjust.
2439 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2440 * nto-low.c (nto_target_ops): Adjust comment.
2441 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2442 * spu-low.c (spu_target_ops): Adjust comment.
2443 * target.h (target_ops): Rename unprepare_to_access_memory field
2444 to done_accessing_memory.
2445 (unprepare_to_access_memory): Rename to ...
2446 (done_accessing_memory): ... this.
2448 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2450 * linux-low.c (linux_prepare_to_access_memory): New.
2451 (linux_unprepare_to_access_memory): New.
2452 (linux_target_ops): Install them.
2453 * server.c (read_memory): Rename to ...
2454 (gdb_read_memory): ... this. Use
2455 prepare_to_access_memory/prepare_to_access_memory.
2456 (write_memory): Rename to ...
2457 (gdb_write_memory): ... this. Use
2458 prepare_to_access_memory/prepare_to_access_memory.
2459 (handle_search_memory_1): Adjust.
2460 (process_serial_event): Adjust.
2461 * target.h (struct target_ops): New fields
2462 prepare_to_access_memory and unprepare_to_access_memory.
2463 (prepare_to_access_memory, unprepare_to_access_memory): New.
2464 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2465 prepare_to_access_memory/prepare_to_access_memory.
2466 * nto-low.c (nto_target_ops): Adjust.
2467 * spu-low.c (spu_target_ops): Adjust.
2468 * win32-low.c (win32_target_ops): Adjust.
2470 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2472 * Makefile.in (WARN_CFLAGS): Get it from configure.
2473 (WERROR_CFLAGS): New.
2474 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2475 * configure.ac: Introduce --enable-werror, which adds -Werror to
2476 the compiler command line. Enabled by default. Disable with
2477 --disable-werror. Add -Wdeclaration-after-statement
2478 Wpointer-arith and -Wformat-nonliteral to warning flags.
2479 * configure: Regenerate.
2481 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2483 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2485 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2487 * gdbreplay.c (remote_error): New.
2489 (expect): Use gdbchar. Check for error reading from GDB.
2490 Clarify sync error output.
2491 (play): Check for errors writing to GDB.
2492 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2493 * remote-utils.c (getpkt): Check for errors writing to the remote
2496 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2498 * linux-low.c (linux_wait_1): Move non-debugging code out of
2499 `debug_threads' control.
2501 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2503 * linux-low.c (linux_wait_1): Don't set last_status here.
2504 * server.c (push_event, queue_stop_reply_callback): Assert we're
2505 not pushing a TARGET_WAITKIND_IGNORE event.
2506 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2507 (myresume, handle_target_event): Set the thread's last_resume_kind
2508 and last_status from the target returned status.
2510 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2514 * linux-x86-low.c (update_debug_registers_callback): New.
2515 (i386_dr_low_set_addr): Use it.
2516 (i386_dr_low_get_addr): New.
2517 (i386_dr_low_set_control): Use update_debug_registers_callback.
2518 (i386_dr_low_get_control): New.
2519 (i386_dr_low_get_status): Adjust.
2520 * linux-low.c (linux_stop_lwp): New.
2521 * linux-low.h (linux_stop_lwp): Declare.
2523 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2524 argument instead of a i386_debug_reg_state.
2525 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2526 a i386_debug_reg_state.
2527 (i386_insert_aligned_watchpoint): Adjust.
2528 (i386_remove_aligned_watchpoint): Adjust.
2529 (i386_low_stopped_data_address): Read the debug registers from the
2530 inferior instead of from the mirrors.
2531 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2532 (i386_dr_low_get_addr): Declare.
2533 (i386_dr_low_get_control): Declare.
2534 (i386_dr_low_get_status): Change prototype.
2536 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2537 (i386_dr_low_get_addr): New.
2538 (i386_dr_low_get_control): New.
2539 (i386_dr_low_get_status): Adjust prototype. Return
2541 (i386_initial_stuff): Clear dr_status_mirror and
2543 (i386_get_thread_context): Adjust.
2544 (i386_set_thread_context): Adjust.
2545 (i386_thread_added): Adjust.
2547 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2549 * linux-low.h (linux_thread_area): Delete declaration.
2551 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2553 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2554 after its termination.
2556 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2558 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2559 (gdb_wants_all_stopped): Delete.
2560 (linux_wait_1): Don't call them.
2561 * server.c (handle_v_cont): Tag all threads as want-stopped.
2562 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2563 stopped as "client-wants-stopped".
2565 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2567 * Makefile.in (signals_h): New.
2568 (server_h): Depend on it.
2569 (server.o): Don't depend on $(signals_def).
2570 (signals.o): Depend on $(signals_def).
2572 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2574 * Makefile.in (signals_def): New.
2575 (server_h): Append include/gdb/signals.h and signals_def.
2576 (server.o): Append signals_def.
2578 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2580 * server.c (handle_target_event): Use target_signal_to_host for
2581 resume_info.sig initialization.
2582 * target.h (struct thread_resume) <sig>: New comment.
2584 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2586 * server.c (handle_query): strcpy() the returned string from paddress()
2587 instead of sprintf().
2588 * utils.c (paddress): Return phex_nz().
2590 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2592 * server.c (handle_v_cont): Call mourn_inferior if process
2594 (myresume): Likewise.
2596 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2598 Static tracepoints, and integration with UST.
2600 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2601 * mem-break.c (uninsert_all_breakpoints)
2602 (reinsert_all_breakpoints): New.
2603 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2604 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2605 (gdb_agent_ust_loaded, helper_thread_id)
2606 (gdb_agent_helper_thread_id): New macros.
2607 (struct ipa_sym_addresses): Add addr_ust_loaded,
2608 addr_helper_thread_id, addr_cmd_buf.
2609 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2610 (in_process_agent_loaded_ust): New.
2611 (write_e_ust_not_loaded): New.
2612 (maybe_write_ipa_ust_not_loaded): New.
2613 (struct collect_static_trace_data_action): New.
2614 (enum tracepoint_type) <static_tracepoint>: New.
2615 (struct tracepoint) <handle>: Mention static tracepoints.
2616 (struct static_tracepoint_ctx): New.
2617 (CMD_BUF_SIZE): New.
2618 (add_tracepoint_action): Handle static tracepoint actions.
2619 (unprobe_marker_at): New.
2620 (clear_installed_tracepoints): Handle static tracepoints.
2621 (cmd_qtdp): Handle static tracepoints.
2622 (probe_marker_at): New.
2623 (cmd_qtstart): Handle static tracepoints.
2624 (response_tracepoint): Handle static tracepoints.
2625 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2626 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2627 (get_context_regcache): Handle static tracepoints.
2628 (do_action_at_tracepoint): Handle static tracepoint actions.
2629 (traceframe_find_block_type): Handle static trace data blocks.
2630 (traceframe_read_sdata): New.
2631 (download_tracepoints): Download static tracepoint actions.
2632 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2633 (GDB_PROBE_NAME): New.
2638 (ust_marker_to_static_tracepoint): New.
2640 (collect_ust_data_at_tracepoint): New.
2641 (gdb_ust_probe): New.
2642 (UNIX_PATH_MAX, SOCK_DIR): New.
2643 (gdb_ust_connect_sync_socket): New.
2644 (resume_thread, stop_thread): New.
2645 (run_inferior_command): New.
2646 (init_named_socket): New.
2647 (gdb_ust_socket_init): New.
2648 (cstr_to_hexstr): New.
2650 (first_marker, next_marker): New.
2651 (response_ust_marker): New.
2652 (cmd_qtfstm, cmd_qtsstm): New.
2653 (unprobe_marker_at, probe_marker_at): New.
2654 (cmd_qtstmat, gdb_ust_thread): New.
2655 (gdb_ust_init): New.
2656 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2657 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2659 (x86_64_st_collect_regmap): New.
2660 (X86_64_NUM_ST_COLLECT_GREGS): New.
2661 (AMD64_RIP_REGNUM): New.
2662 (supply_static_tracepoint_registers): New.
2663 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2665 (i386_st_collect_regmap): New.
2666 (i386_NUM_ST_COLLECT_GREGS): New.
2667 (supply_static_tracepoint_registers): New.
2668 * server.c (handle_query): Handle qXfer:statictrace:read.
2669 <qSupported>: Report support for StaticTracepoints, and
2670 qXfer:statictrace:read features.
2671 * server.h (traceframe_read_sdata)
2672 (supply_static_tracepoint_registers): Declare.
2673 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2674 (unpack_varlen_hex): Include in IPA build.
2675 * Makefile.in (ustlibs, ustinc): New.
2676 (IPA_OBJS): Add remote-utils-ipa.o.
2677 ($(IPA_LIB)): Link -ldl and -lpthread.
2679 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2680 * config.in, configure: Regenerate.
2682 2010-06-20 Ian Lance Taylor <iant@google.com>
2683 Pedro Alves <pedro@codesourcery.com>
2685 * linux-x86-low.c (always_true): Delete.
2686 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2687 trying to fool the compiler with always_true.
2689 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2691 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2692 conditions in gdbserver.
2694 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2696 * spu-low.c (spu_read_memory): Wrap around local store limit.
2697 (spu_write_memory): Likewise.
2699 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2701 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2702 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2704 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2706 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2707 uses with LONGEST uses.
2709 2010-06-14 Stan Shebs <stan@codesourcery.com>
2710 Pedro Alves <pedro@codesourcery.com>
2714 * linux-x86-low.c: Include limits.h.
2719 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2720 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2721 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2722 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2723 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2724 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2725 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2726 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2727 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2728 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2729 (amd64_emit_void_call_2): New.
2730 (amd64_emit_ops): New.
2731 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2732 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2733 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2734 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2735 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2736 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2737 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2738 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2739 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2740 (i386_emit_stack_adjust, i386_emit_int_call_1)
2741 (i386_emit_void_call_2): New.
2742 (i386_emit_ops): New.
2743 (x86_emit_ops): New.
2744 (the_low_target): Install x86_emit_ops.
2745 * server.h (struct emit_ops): New.
2746 (get_raw_reg_func_addr): Declare.
2747 (current_insn_ptr, emit_error): Declare.
2748 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2749 (set_trace_state_variable_value): New defines.
2750 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2751 addr_get_trace_state_variable_value and
2752 addr_set_trace_state_variable_value.
2753 (symbol_list): New fields for get_raw_reg,
2754 get_trace_state_variable_value and set_trace_state_variable_value.
2755 (condfn): New typedef.
2756 (struct tracepoint): New field `compiled_cond'.
2757 (do_action_at_tracepoint): Clear compiled_cond.
2758 (get_trace_state_variable_value, set_trace_state_variable_value):
2760 (condition_true_at_tracepoint): If there's a compiled condition,
2762 (current_insn_ptr, emit_error): New globals.
2763 (struct bytecode_address): New.
2764 (get_raw_reg_func_addr): New.
2765 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2766 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2767 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2768 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2769 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2770 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2771 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2772 (compile_tracepoint_condition, compile_bytecodes): New.
2773 * target.h (emit_ops): Forward declare.
2774 (struct target_ops): New field emit_ops.
2775 (target_emit_ops): New.
2776 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2778 * linux-low.c (linux_emit_ops): New.
2779 (linux_target_ops): Install it.
2780 * linux-low.h (struct linux_target_ops): New field emit_ops.
2782 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2784 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2785 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2787 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2788 Stan Shebs <stan@codesourcery.com>
2790 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2791 (all): Depend on $(extra_libraries).
2792 (install-only): Install the IPA.
2793 (IPA_OBJS, IPA_LIB): New.
2794 (clean): Remove the IPA lib.
2795 (IPAGENT_CFLAGS): New.
2796 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2797 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2798 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2799 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2800 * configure.ac: Check for atomic builtins support in the compiler.
2801 (IPA_DEPFILES, extra_libraries): Define.
2802 * configure.srv (ipa_obj): Add description.
2803 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2804 (i[34567]86-*-linux*): Set ipa_obj.
2805 (x86_64-*-linux*): Set ipa_obj.
2806 * linux-low.c (stabilizing_threads): New.
2807 (supports_fast_tracepoints): New.
2808 (linux_detach): Stabilize threads before detaching.
2809 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2810 the lwp is either not stabilizing, or is moving out of a jump pad.
2811 (linux_fast_tracepoint_collecting): New.
2812 (maybe_move_out_of_jump_pad): New.
2813 (enqueue_one_deferred_signal): New.
2814 (dequeue_one_deferred_signal): New.
2815 (linux_wait_for_event_1): If moving out of a jump pad, defer
2816 pending signals to later.
2817 (linux_stabilize_threads): New.
2818 (linux_wait_1): Check if threads need moving out of jump pads, and
2820 (stuck_in_jump_pad_callback): New.
2821 (move_out_of_jump_pad_callback): New.
2823 (linux_resume_one_lwp): Handle moving out of jump pads.
2824 (linux_set_resume_request): Dequeue deferred signals.
2825 (need_step_over_p): Also step over fast tracepoint jumps.
2826 (start_step_over): Also uninsert fast tracepoint jumps.
2827 (finish_step_over): Also reinsert fast tracepoint jumps.
2828 (linux_install_fast_tracepoint_jump): New.
2829 (linux_target_ops): Install linux_stabilize_threads and
2830 linux_install_fast_tracepoint_jump_pad.
2831 * linux-low.h (linux_target_ops) <get_thread_area,
2832 install_fast_tracepoint_jump_pad>: New fields.
2833 (struct lwp_info) <collecting_fast_tracepoint,
2834 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2835 (linux_get_thread_area): Declare.
2836 * linux-x86-low.c (jump_insn): New.
2837 (x86_get_thread_area): New.
2838 (append_insns): New.
2840 (amd64_install_fast_tracepoint_jump_pad): New.
2841 (i386_install_fast_tracepoint_jump_pad): New.
2842 (x86_install_fast_tracepoint_jump_pad): New.
2843 (the_low_target): Install x86_get_thread_area and
2844 x86_install_fast_tracepoint_jump_pad.
2845 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2846 (struct fast_tracepoint_jump): New.
2847 (fast_tracepoint_jump_insn): New.
2848 (fast_tracepoint_jump_shadow): New.
2849 (find_fast_tracepoint_jump_at): New.
2850 (fast_tracepoint_jump_here): New.
2851 (delete_fast_tracepoint_jump): New.
2852 (set_fast_tracepoint_jump): New.
2853 (uninsert_fast_tracepoint_jumps_at): New.
2854 (reinsert_fast_tracepoint_jumps_at): New.
2855 (set_breakpoint_at): Use write_inferior_memory.
2856 (uninsert_raw_breakpoint): Use write_inferior_memory.
2857 (check_mem_read): Mask out fast tracepoint jumps.
2858 (check_mem_write): Mask out fast tracepoint jumps.
2859 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2860 (set_fast_tracepoint_jump): Declare.
2861 (delete_fast_tracepoint_jump)
2862 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2863 (reinsert_fast_tracepoint_jumps_at): Declare.
2864 * regcache.c: Don't compile many functions when building the
2865 in-process agent library.
2866 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2867 the register buffer in the heap.
2868 (free_register_cache): If the register buffer isn't owned by the
2869 regcache, don't free it.
2870 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2871 pre-existing register caches.
2872 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2874 (convert_ascii_to_int): : Constify `from' parameter type.
2875 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2876 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2877 the needed buffer in-place.
2878 (relocate_instruction): New.
2879 * server.c (handle_query) <qSymbols>: If the target supports
2880 tracepoints, give it a chance of looking up symbols. Report
2881 support for fast tracepoints.
2882 (handle_status): Stabilize threads.
2883 (process_serial_event): Adjust.
2884 * server.h (struct fast_tracepoint_jump): Forward declare.
2885 (struct process_info) <fast_tracepoint_jumps>: New field.
2886 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2887 (decode_X_packet, decode_M_packet): Adjust.
2888 (relocate_instruction): Declare.
2889 (in_process_agent_loaded): Declare.
2890 (tracepoint_look_up_symbols): Declare.
2891 (struct fast_tpoint_collect_status): Declare.
2892 (fast_tracepoint_collecting): Declare.
2893 (force_unlock_trace_buffer): Declare.
2894 (handle_tracepoint_bkpts): Declare.
2895 (initialize_low_tracepoint)
2896 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2897 * target.h (struct target_ops) <stabilize_threads,
2898 install_fast_tracepoint_jump_pad>: New fields.
2899 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2900 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2901 [HAVE_STDINT_H]: Include stdint.h.
2902 (trace_debug_1): Rename to ...
2903 (trace_vdebug): ... this.
2904 (trace_debug): Rename to ...
2905 (trace_debug_1): ... this. Add `level' parameter.
2907 (ATTR_USED, ATTR_NOINLINE): New.
2908 (IP_AGENT_EXPORT): New.
2909 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2910 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2911 (about_to_request_buffer_space, trace_buffer_is_full)
2912 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2913 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2914 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2915 (traceframe_write_count, traceframes_created)
2916 (trace_state_variables)
2917 New renaming defines.
2918 (struct ipa_sym_addresses): New.
2919 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2921 (ipa_sym_addrs): New.
2922 (all_tracepoint_symbols_looked_up): New.
2923 (in_process_agent_loaded): New.
2924 (write_e_ipa_not_loaded): New.
2925 (maybe_write_ipa_not_loaded): New.
2926 (tracepoint_look_up_symbols): New.
2927 (debug_threads) [IN_PROCESS_AGENT]: New.
2928 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2929 (UNKNOWN_SIDE_EFFECTS): New.
2930 (stop_tracing): New.
2931 (flush_trace_buffer): New.
2932 (stop_tracing_bkpt): New.
2933 (flush_trace_buffer_bkpt): New.
2934 (read_inferior_integer): New.
2935 (read_inferior_uinteger): New.
2936 (read_inferior_data_pointer): New.
2937 (write_inferior_data_pointer): New.
2938 (write_inferior_integer): New.
2939 (write_inferior_uinteger): New.
2940 (struct collect_static_trace_data_action): Delete.
2941 (enum tracepoint_type): New.
2942 (struct tracepoint) <type>: New field `type'.
2943 <actions_str, step_actions, step_actions_str>: Only include in
2945 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2946 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2947 (tracepoints): Use IP_AGENT_EXPORT.
2948 (last_tracepoint): Don't include in the IPA.
2949 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2950 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2951 (alloced_trace_state_variables): New.
2952 (trace_state_variables): Use IP_AGENT_EXPORT.
2953 (traceframe_t): Delete unused variable.
2954 (circular_trace_buffer): Don't include in the IPA.
2955 (trace_buffer_start): Delete.
2956 (struct trace_buffer_control): New.
2957 (trace_buffer_free): Delete.
2958 (struct ipa_trace_buffer_control): New.
2959 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2960 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2962 (trace_buffer_ctrl): New.
2963 (TRACE_BUFFER_CTRL_CURR): New.
2964 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2965 Reimplement as macros.
2966 (trace_buffer_wrap): Delete.
2967 (traceframe_write_count, traceframe_read_count)
2968 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2969 (struct tracepoint_hit_ctx) <type>: New field.
2970 (struct fast_tracepoint_ctx): New.
2971 (memory_barrier): New.
2973 (record_tracepoint_error): Update atomically in the IPA.
2974 (clear_inferior_trace_buffer): New.
2975 (about_to_request_buffer_space): New.
2976 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2977 updating the same buffer.
2978 (add_tracepoint): Default the tracepoint's type to trap
2979 tracepoint, and orig_size to -1.
2980 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2982 (create_trace_state_variable): New parameter `gdb'. Handle it.
2983 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2984 (cmd_qtdp): Handle fast tracepoints.
2986 (max_jump_pad_size): New.
2987 (gdb_jump_pad_head): New.
2988 (get_jump_space_head): New.
2989 (claim_jump_space): New.
2990 (sort_tracepoints): New.
2991 (MAX_JUMP_SIZE): New.
2992 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2994 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2995 support. Upload fast traceframes, and delete internal IPA
2997 (stop_tracing_handler): New.
2998 (flush_trace_buffer_handler): New.
2999 (cmd_qtstop): Upload fast tracepoints.
3000 (response_tracepoint): Handle fast tracepoints.
3001 (tracepoint_finished_step): Upload fast traceframes. Set the
3002 tracepoint hit context's tracepoint type.
3003 (handle_tracepoint_bkpts): New.
3004 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3005 type. Add comment about fast tracepoints.
3006 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3007 non-existing action_str field.
3008 (get_context_regcache): Handle fast tracepoints.
3009 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3011 (fast_tracepoint_from_jump_pad_address): New.
3012 (fast_tracepoint_from_ipa_tpoint_address): New.
3013 (collecting_t): New.
3014 (force_unlock_trace_buffer): New.
3015 (fast_tracepoint_collecting): New.
3018 (write_inferior_data_ptr): New.
3019 (target_tp_heap): New.
3020 (target_malloc): New.
3021 (download_agent_expr): New.
3023 (download_tracepoints): New.
3024 (download_trace_state_variables): New.
3025 (upload_fast_traceframes): New.
3026 (IPA_FIRST_TRACEFRAME): New.
3027 (IPA_NEXT_TRACEFRAME_1): New.
3028 (IPA_NEXT_TRACEFRAME): New.
3029 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3030 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3031 (gdb_jump_pad_buffer_end): New.
3032 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3033 (initialize_tracepoint): Adjust.
3034 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3035 buffer. Initialize the low module.
3036 * utils.c (PREFIX, TOOLNAME): New.
3037 (malloc_failure): Use PREFIX.
3038 (error): In the IPA, an error causes an exit.
3039 (fatal, warning): Use PREFIX.
3040 (internal_error): Use TOOLNAME.
3041 (NUMCELLS): Increase to 10.
3042 * configure, config.in: Regenerate.
3044 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3046 * server.c (handle_query) <qSupported>: Do two passes over the
3047 qSupported string to avoid nesting strtok.
3049 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3051 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3053 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3055 * configure: Regenerate.
3056 * proc-service.list: New.
3058 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3060 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3063 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3065 * gdbreplay.c (remote_open): Check error return from socket() call by
3066 its equality to -1 not by it being negative.
3067 * remote-utils.c (remote_open): Likewise.
3069 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3071 * config.h: Regenerate.
3073 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3075 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3076 doesn't provide PTRACE_GET_THREAD_AREA.
3078 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3080 * linux-m68k-low.c: Include <asm/ptrace.h>
3081 (ps_get_thread_area): Implement.
3083 2010-05-03 Doug Evans <dje@google.com>
3085 * event-loop.c (struct callback_event): New struct.
3086 (callback_list): New global.
3087 (append_callback_event, delete_callback_event): New functions.
3088 (process_callback): New function.
3089 (start_event_loop): Call it.
3090 * remote-utils.c (NOT_SCHEDULED): Define.
3091 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3092 moved out of readchar.
3093 (readchar): Rewrite. Call reschedule before returning.
3094 (reset_readchar): New function.
3095 (remote_close): Call it.
3096 (process_remaining, reschedule): New functions.
3097 * server.h (callback_handler_func): New typedef.
3098 (append_callback_event, delete_callback_event): Declare.
3100 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3102 * proc-service.c (ps_pglobal_lookup): Use
3103 thread_db_look_up_one_symbol.
3104 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3105 parameter. Use it instead of all_symbols_looked_up.
3106 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3108 (all_symbols_looked_up): Don't declare.
3109 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3110 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3112 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3113 Set all_symbols_looked_up here.
3114 (thread_db_look_up_one_symbol): New.
3115 (thread_db_get_tls_address): Adjust.
3116 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3117 thread_db object on the heap, and tentatively set it in the
3119 (thread_db_init): Don't set all_symbols_looked_up here.
3120 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3122 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3124 * linux-low.c (linux_kill, linux_detach): Adjust.
3125 (status_pending_p_callback): Remove redundant statement. Check
3126 for !TARGET_WAITIKIND_IGNORE, instead of
3127 TARGET_WAITKIND_STOPPED.
3128 (handle_tracepoints): Make sure LWP is locked. Adjust.
3129 (linux_wait_for_event_1): Adjust.
3130 (linux_cancel_breakpoints): New.
3131 (unsuspend_one_lwp): New.
3132 (unsuspend_all_lwps): New.
3133 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3134 (send_sigstop_callback): Change return type to int, add new
3135 `except' parameter and handle it.
3136 (suspend_and_send_sigstop_callback): New.
3137 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3138 pass them down. If SUSPEND, also increment the lwp's suspend
3140 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3141 (need_step_over_p): Don't consider suspended LWPs.
3142 (start_step_over): Adjust.
3143 (proceed_one_lwp): Change return type to int, add new `except'
3144 parameter and handle it.
3145 (unsuspend_and_proceed_one_lwp): New.
3146 (proceed_all_lwps): Use find_inferior instead of
3148 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3149 also decrement the suspend count of LWPs. Pass `except' down,
3150 instead of hacking its suspend count.
3151 (linux_pause_all): Add `freeze' parameter. Adjust.
3152 (linux_unpause_all): New.
3153 (linux_target_ops): Install linux_unpause_all.
3154 * server.c (handle_status): Adjust.
3155 * target.h (struct target_ops): New fields `unpause_all' and
3156 `cancel_breakpoints'. Add new parameter to `pause_all'.
3157 (pause_all): Add new `freeze' parameter.
3159 (cancel_breakpoints): New.
3160 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3162 (cmd_qtstart): Pause threads.
3163 (stop_tracing): Pause threads, and cancel breakpoints.
3164 * win32-low.c (win32_target_ops): Adjust.
3166 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3168 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3169 the inferior right away from here...
3170 (linux_wait_1): ... to here, and adjust to check the thread's
3171 last_resume_kind instead of the lwp's step or stop_expected flags.
3173 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3175 * README: Use consistent `GDB' and `GDBserver' spellings.
3177 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3179 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3180 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3181 (linux_detach_one_lwp): Assume the lwp is stopped.
3182 (any_thread_of): Delete.
3183 (linux_detach): Stop all lwps here. Don't blindly delete all
3185 (delete_lwp_callback): New.
3186 (linux_mourn): Delete all lwps of the process that is gone.
3187 (linux_wait_1): Don't delete the last lwp of the process here.
3188 * mem-break.h (mark_breakpoints_out): Declare.
3189 * mem-break.c (mark_breakpoints_out): New.
3190 (free_all_breakpoints): Use it.
3191 * server.c (handle_target_event): If the process is gone, mark
3193 * thread-db.c (struct thread_db) <create_bp>: New field.
3194 (thread_db_enable_reporting): Fix prototype. Store a thread event
3195 breakpoint reference in the thread_db struct.
3196 (thread_db_load_search): Clear the thread_db object.
3197 (try_thread_db_load_1): Ditto.
3198 (switch_to_process): New.
3199 (disable_thread_event_reporting): Use it.
3200 (remove_thread_event_breakpoints): New.
3201 (thread_db_detach, thread_db_mourn): Use it.
3203 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3205 * linux-low.c (linux_enable_event_reporting): New.
3206 (linux_wait_for_event_1, handle_extended_wait): Use it.
3208 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3210 * linux-low.c (linux_kill_one_lwp, linux_kill)
3211 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3212 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3213 SIGSTOP even if the LWP is stopped.
3214 (send_sigstop_callback): New.
3215 (stop_all_lwps): Use send_sigstop_callback instead.
3216 (linux_resume_one_thread): Adjust.
3217 (proceed_one_lwp): Still proceed an LWP that the client has
3218 requested to stop, if we haven't reported it as stopped yet. Make
3219 sure that LWPs the client want stopped, have a pending SIGSTOP.
3221 2010-04-26 Doug Evans <dje@google.com>
3223 * server.c (handle_general_set): Make static.
3225 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3226 Print received char after testing for error/eof instead of before.
3227 (input_interrupt): Tweak comment.
3229 2010-04-23 Doug Evans <dje@google.com>
3231 * server.c (start_inferior): Print inferior argv if --debug.
3233 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3235 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3236 * nto-x86-low.c: Include server.h
3238 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3240 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3241 be consistent with other sources of this directory.
3242 (init_registers_amd64): Correct name of source file of this function
3245 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3247 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3250 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3252 * win32-i386-low.c: Add 64-bit support.
3253 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3254 (init_registers_amd64): Declare.
3255 (mappings): Add 64-bit version of array.
3256 (init_windows_x86): New function.
3257 (the_low_target): Change init_arch field to init_windows_x86.
3259 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3261 * win32-low.c: Adapt to support also 64-bit architecture.
3262 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3263 (get_image_name): Use SIZE_T type for local variable `done'.
3264 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3265 (toolhelp_get_dll_name): Idem.
3266 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3267 Use uintptr_t typecast to avoid warning.
3268 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3269 (handle_exception): Use phex_nz to avoid warning.
3270 (win32_wait): Remove unused local variable `process'.
3272 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3274 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3277 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3279 * configure.ac: Use `ws2_32' library for srv_mingw.
3280 * configure: Regenerate.
3281 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3282 * remote-utils.c: Likewise.
3284 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3286 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3287 if __x86_64__ is defined.
3289 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3291 * configure: Regenerate.
3293 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3295 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3296 * target.h (target_ops): New get_tib_address field.
3297 * win32-low.h (win32_thread_info): Add thread_local_base field.
3298 * win32-low.c (child_add_thread): Add tlb argument.
3299 Set thread_local_base field to TLB.
3300 (get_child_debug_event): Adapt to child_add_thread change.
3301 (win32_get_tib_address): New function.
3302 (win32_target_ops): Set get_tib_address field to
3303 win32_get_tib_address.
3304 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3306 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3308 * linux-low.c (linux_mourn): Also remove the process.
3309 * server.c (handle_target_event): Don't remove the process here.
3310 * nto-low.c (nto_mourn): New.
3311 (nto_target_ops): Install it.
3312 * spu-low.c (spu_mourn): New.
3313 (spu_target_ops): Install it.
3314 * win32-low.c (win32_mourn): New.
3315 (win32_target_ops): Install it.
3317 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3319 * server.h (buffer_xml_printf): Remove redundant `;'.
3321 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3323 * regcache.c (set_register_cache): Invalidate regcaches before
3324 changing the register cache layout.
3325 (regcache_invalidate_one): Allow a NULL regcache.
3326 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3327 regcaches before changing the register cache layout or the target
3330 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3332 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3333 variable warning on Linux/x86-64.
3335 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3337 GDBserver disconnected tracing support.
3339 * linux-low.c (linux_remove_process): Delete.
3340 (add_lwp): Don't set last_resume_kind here.
3341 (linux_kill): Use `mourn'.
3342 (linux_detach): Use `thread_db_detach', and `mourn'.
3344 (linux_attach_lwp_1): Adjust comment.
3345 (linux_attach): last_resume_kind moved the thread_info; adjust.
3346 (status_pending_p_callback): Adjust.
3347 (linux_wait_for_event_1): Adjust.
3348 (count_events_callback, select_singlestep_lwp_callback)
3349 (select_event_lwp_callback, cancel_breakpoints_callback)
3350 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3351 (proceed_one_lwp): Adjust.
3352 (linux_async): Add debug output.
3353 (linux_thread_stopped): New.
3354 (linux_pause_all): New.
3355 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3357 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3358 (thread_db_free): Delete declaration.
3359 (thread_db_detach, thread_db_mourn): Declare.
3360 * thread-db.c (thread_db_init): Use thread_db_mourn.
3361 (thread_db_free): Delete, split in two.
3362 (disable_thread_event_reporting): New.
3363 (thread_db_detach): New.
3364 (thread_db_mourn): New.
3366 * server.h (struct thread_info) <last_resume_kind>: New field.
3367 <attached>: Add comment.
3368 <gdb_detached>: New field.
3369 (handler_func): Change return type to int.
3370 (handle_serial_event, handle_target_event): Ditto.
3371 (gdb_connected): Declare.
3373 (disconnected_tracing): Declare.
3374 (stop_tracing): Declare.
3376 * server.c (handle_query) <qSupported>: Report support for
3377 disconnected tracing.
3378 (queue_stop_reply_callback): Account for running threads.
3379 (gdb_wants_thread_stopped): New.
3380 (gdb_wants_all_threads_stopped): New.
3381 (gdb_reattached_process): New.
3382 (handle_status): Clear the `gdb_detached' flag of all processes.
3383 In all-stop, stop all threads.
3384 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3385 (process_serial_event): If the remote connection breaks, or if an
3386 exit was forced with "monitor exit", force an event loop exit.
3387 Handle disconnected tracing on detach.
3388 (handle_serial_event): Adjust.
3389 (handle_target_event): If GDB isn't connected, forward events back
3390 to the inferior, unless the last process exited, in which case,
3391 exit gdbserver. Adjust interface.
3393 * remote-utils.c (remote_open): Don't block in accept. Instead
3394 register an event loop source on the listen socket file
3395 descriptor. Refactor bits into ...
3396 (listen_desc): ... this new global.
3397 (gdb_connected): ... this new function.
3398 (enable_async_notification): ... this new function.
3399 (handle_accept_event): ... this new function.
3400 (remote_close): Clear remote_desc.
3402 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3404 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3406 (mourn_inferior): Define.
3407 (target_process_qsupported): Avoid the dangling else problem.
3408 (thread_stopped): Define.
3409 (pause_all): Define.
3410 (target_waitstatus_to_string): Declare.
3411 * target.c (target_waitstatus_to_string): New.
3413 * tracepoint.c (tracing): Make extern.
3414 (disconnected_tracing): New.
3415 (stop_tracing): Make extern. Handle tracing stops due to GDB
3417 (cmd_qtdisconnected): New.
3418 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3419 (handle_tracepoint_general_set): Handle QTDisconnected.
3421 * event-loop.c (event_handler_func): Change return type to int.
3422 (process_event): Bail out if the event handler wants the event
3424 (handle_file_event): Ditto.
3425 (start_event_loop): Bail out if the event handler wants the event
3428 * nto-low.c (nto_target_ops): Adjust.
3429 * spu-low.c (spu_wait): Don't remove the process here.
3430 (spu_target_ops): Adjust.
3431 * win32-low.c (win32_wait): Don't remove the process here.
3432 (win32_target_ops): Adjust.
3434 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3436 * regcache.c (realloc_register_cache): Invalidate inferior's
3437 regcache before recreating it.
3439 2010-04-09 Pedro Alves <pedro@codesourcery.com>
3441 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3443 2010-04-09 Stan Shebs <stan@codesourcery.com>
3444 Pedro Alves <pedro@codesourcery.com>
3446 * server.h (LONGEST): New.
3447 (struct thread_info) <while_stepping>: New field.
3448 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3450 (initialize_tracepoint, handle_tracepoint_general_set)
3451 (handle_tracepoint_query, tracepoint_finished_step)
3452 (tracepoint_was_hit, release_while_stepping_state_list):
3453 (current_traceframe): Declare.
3454 * server.c (handle_general_set): Handle tracepoint packets.
3456 (write_memory): New.
3457 (handle_search_memory_1): Use read_memory.
3458 (handle_query): Report support for conditional tracepoints, trace
3459 state variables, and tracepoint sources. Handle tracepoint
3461 (main): Initialize the tracepoints module.
3462 (process_serial_event): Handle traceframe reads/writes.
3464 * linux-low.c (handle_tracepoints): New.
3465 (linux_wait_1): Call it.
3466 (linux_resume_one_lwp): Handle while-stepping.
3467 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3468 (linux_target_ops): Install them.
3469 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3471 * linux-x86-low.c (x86_supports_tracepoints): New.
3472 (the_low_target). Install it.
3474 * mem-break.h (delete_breakpoint): Declare.
3475 * mem-break.c (delete_breakpoint): Make external.
3477 * target.h (struct target_ops): Add `supports_tracepoints',
3478 `read_pc', and `write_pc' fields.
3479 (target_supports_tracepoints): Define.
3480 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3483 * regcache.h (struct regcache) <registers_owned>: New field.
3484 (init_register_cache, regcache_cpy): Declare.
3485 (regcache_read_pc, regcache_write_pc): Declare.
3486 (register_cache_size): Declare.
3487 (supply_regblock): Declare.
3488 * regcache.c (init_register_cache): New.
3489 (new_register_cache): Use it.
3490 (regcache_cpy): New.
3491 (register_cache_size): New.
3492 (supply_regblock): New.
3493 (regcache_read_pc, regcache_write_pc): New.
3495 * tracepoint.c: New.
3497 * Makefile.in (OBS): Add tracepoint.o.
3498 (tracepoint.o): New rule.
3500 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3502 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3504 (i386-mmx.c): Likewise.
3505 (i386-mmx-linux.o): Likewise.
3506 (i386-mmx-linux.c): Likewise.
3508 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3509 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3510 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3511 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3513 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3514 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3515 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3517 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3519 * Makefile.in (clean): Updated.
3521 (i386-avx.c): Likewise.
3522 (i386-avx-linux.o): Likewise.
3523 (i386-avx-linux.c): Likewise.
3524 (amd64-avx.o): Likewise.
3525 (amd64-avx.c): Likewise.
3526 (amd64-avx-linux.o): Likewise.
3527 (amd64-avx-linux.c): Likewise.
3529 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3530 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3531 (srv_amd64_regobj): Add amd64-avx.o.
3532 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3533 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3534 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3535 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3536 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3537 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3538 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3540 * i387-fp.c: Include "i386-xstate.h".
3542 (i387_cache_to_xsave): Likewise.
3543 (i387_xsave_to_cache): Likewise.
3544 (x86_xcr0): Likewise.
3546 * i387-fp.h (i387_cache_to_xsave): Likewise.
3547 (i387_xsave_to_cache): Likewise.
3548 (x86_xcr0): Likewise.
3550 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3551 * linux-crisv32-low.c (target_regsets): Likewise.
3552 * linux-m68k-low.c (target_regsets): Likewise.
3553 * linux-mips-low.c (target_regsets): Likewise.
3554 * linux-ppc-low.c (target_regsets): Likewise.
3555 * linux-s390-low.c (target_regsets): Likewise.
3556 * linux-sh-low.c (target_regsets): Likewise.
3557 * linux-sparc-low.c (target_regsets): Likewise.
3558 * linux-xtensa-low.c (target_regsets): Likewise.
3560 * linux-low.c: Include <sys/uio.h>.
3561 (regsets_fetch_inferior_registers): Support nt_type.
3562 (regsets_store_inferior_registers): Likewise.
3563 (linux_process_qsupported): New.
3564 (linux_target_ops): Add linux_process_qsupported.
3566 * linux-low.h (regset_info): Add nt_type.
3567 (linux_target_ops): Add process_qsupported.
3569 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3571 (init_registers_i386_avx_linux): New.
3572 (init_registers_amd64_avx_linux): Likewise.
3573 (xmltarget_i386_linux_no_xml): Likewise.
3574 (xmltarget_amd64_linux_no_xml): Likewise.
3575 (PTRACE_GETREGSET): Likewise.
3576 (PTRACE_SETREGSET): Likewise.
3577 (x86_fill_xstateregset): Likewise.
3578 (x86_store_xstateregset): Likewise.
3579 (use_xml): Likewise.
3580 (x86_linux_update_xmltarget): Likewise.
3581 (x86_linux_process_qsupported): Likewise.
3582 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3583 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3584 init_registers_i386_linux here. Call
3585 x86_linux_update_xmltarget.
3586 (the_low_target): Add x86_linux_process_qsupported.
3588 * server.c (handle_query): Call target_process_qsupported.
3590 * target.h (target_ops): Add process_qsupported.
3591 (target_process_qsupported): New.
3593 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3595 * inferiors.c (add_thread): Set last_status kind to
3596 TARGET_WAITKIND_IGNORE.
3597 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3598 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3599 (linux_wait_1): Move `thread' local definition to block that uses
3600 it. Don't NULL initialize `event_child'.
3601 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3602 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3603 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3605 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3607 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3608 an extended waitstatus, or by a watchpoint.
3609 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3610 thread was stepping or has been stopped by a watchpoint.
3612 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3614 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3615 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3616 of another, then delete the previous, and validate all
3618 (validate_inserted_breakpoint): New.
3619 (delete_disabled_breakpoints): New.
3620 (validate_breakpoints): New.
3621 (check_mem_read): Validate breakpoints before trusting their
3622 shadow. Delete disabled breakpoints.
3623 (check_mem_write): Validate breakpoints before trusting they
3624 should be inserted. Delete disabled breakpoints.
3625 * mem-break.h (validate_breakpoints):
3626 * server.c (handle_query): Validate breakpoints when we see a
3629 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3631 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3632 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3633 if we could tell there's a GDB breakpoint at stop_pc.
3634 (need_step_over_p): Don't do a step over if we find a GDB
3635 breakpoint at the resume PC.
3637 * mem-break.c (struct raw_breakpoint): New.
3638 (enum bkpt_type): New type `gdb_breakpoint'.
3639 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3640 fields. New field `raw'.
3641 (find_raw_breakpoint_at): New.
3642 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3644 (set_breakpoint_at): Adjust.
3645 (delete_raw_breakpoint): New.
3646 (release_breakpoint): New.
3647 (delete_breakpoint): Rename to...
3648 (delete_breakpoint_1): ... this. Add proc parameter. Use
3649 release_breakpoint. Return ENOENT.
3650 (delete_breakpoint): Reimplement.
3651 (find_breakpoint_at): Delete.
3652 (find_gdb_breakpoint_at): New.
3653 (delete_breakpoint_at): Delete.
3654 (set_gdb_breakpoint_at): New.
3655 (delete_gdb_breakpoint_at): New.
3656 (gdb_breakpoint_here): New.
3657 (set_reinsert_breakpoint): Use release_breakpoint.
3658 (uninsert_breakpoint): Rename to ...
3659 (uninsert_raw_breakpoint): ... this.
3660 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3661 (reinsert_raw_breakpoint): Change parameter type to
3663 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3665 (check_breakpoints): Adjust. Use release_breakpoint.
3666 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3667 (breakpoint_inserted_here): Ditto.
3668 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3669 Don't trust the breakpoint's shadow if it is not inserted.
3670 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3671 (delete_all_breakpoints): Adjust.
3672 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3673 use delete_breakpoint_1.
3675 * mem-break.h (breakpoints_supported): Delete declaration.
3676 (set_gdb_breakpoint_at): Declare.
3677 (gdb_breakpoint_here): Declare.
3678 (delete_breakpoint_at): Delete.
3679 (delete_gdb_breakpoint_at): Declare.
3681 * server.h (struct raw_breakpoint): Forward declare.
3682 (struct process_info): New field `raw_breakpoints'.
3684 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3687 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3689 * linux-low.c (status_pending_p_callback): Fix comment.
3690 (linux_wait_for_event_1): Move most of the internal breakpoint
3691 handling from here...
3692 (linux_wait_1): ... to here.
3693 (count_events_callback): New.
3694 (select_singlestep_lwp_callback): New.
3695 (select_event_lwp_callback): New.
3696 (cancel_breakpoints_callback): New.
3697 (select_event_lwp): New.
3698 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3699 priority to all LWPs that have had events that should be reported
3700 to the client. Cancel breakpoints when about to reporting the
3701 event to the client, not while stopping lwps. No longer cancel
3702 finished single-steps here.
3703 (cancel_finished_single_step): Delete.
3704 (cancel_finished_single_steps): Delete.
3706 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3708 * mem-break.c (enum bkpt_type): New.
3709 (struct breakpoint): New field `type'.
3710 (set_breakpoint_at): Change return type to struct breakpoint
3711 pointer. Set type to `other_breakpoint' by default.
3712 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3713 in the breakpoint list.
3714 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3715 (reinsert_breakpoint): Rename to ...
3716 (reinsert_raw_breakpoint): ... this.
3717 (reinsert_breakpoints_at): Adjust.
3718 * mem-break.h (struct breakpoint): Declare.
3719 (set_breakpoint_at): Change return type to struct breakpoint
3722 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3724 * server.c (handle_query): Assign, not compare.
3726 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3728 Teach linux gdbserver to step-over-breakpoints.
3730 * linux-low.c (can_hardware_single_step): New.
3731 (supports_breakpoints): New.
3732 (handle_extended_wait): If stopping threads, read the stop pc of
3735 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3736 low target doesn't support retrieving the PC.
3737 (add_lwp): Set last_resume_kind to resume_continue.
3738 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3739 (linux_attach): Don't clear stop_expected. Set the lwp's
3740 last_resume_kind to resume_stop.
3741 (linux_detach_one_lwp): Don't check for removed breakpoints.
3742 (check_removed_breakpoint): Delete.
3743 (status_pending_p): Rename to ...
3744 (status_pending_p_callback): ... this. Don't check for removed
3745 breakpoints. Don't consider threads that are stopped from GDB's
3747 (linux_wait_for_lwp): Always read the stop_pc here.
3748 (cancel_breakpoint): New.
3749 (step_over_bkpt): New global.
3750 (linux_wait_for_event_1): Implement stepping over breakpoints.
3751 (gdb_wants_lwp_stopped): New.
3752 (gdb_wants_all_stopped): New.
3753 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3754 single-step traps here. Store the thread's last reported target
3756 (send_sigstop): Don't clear stop_expected. Always set it,
3758 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3759 (cancel_finished_single_step): New.
3760 (cancel_finished_single_steps): New.
3761 (wait_for_sigstop): Don't cancel finished single-step traps here.
3762 (linux_resume_one_lwp): Don't check for removed breakpoints.
3763 Don't set `step' on non-hardware step archs.
3764 (linux_set_resume_request): Ignore resume_stop requests if already
3765 stopping or stopped. Set the lwp's last_resume_kind.
3766 (resume_status_pending_p): Don't check for removed breakpoints.
3767 (need_step_over_p): New.
3768 (start_step_over): New.
3769 (finish_step_over): New.
3770 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3771 requests. Clear the thread's last reported target waitstatus.
3772 Don't use the `suspended' flag. Don't consider pending breakpoints.
3773 (linux_resume): Start a step-over if necessary.
3774 (proceed_one_lwp): New.
3775 (proceed_all_lwps): New.
3776 (unstop_all_lwps): New.
3777 * linux-low.h (struct lwp_info): Rewrite comment for the
3778 `suspended' flag. Add the `stop_pc' field. Delete the
3779 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3780 Add `'last_resume_kind' and `need_step_over' fields.
3781 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3782 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3783 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3784 (set_raw_breakpoint_at): New.
3785 (set_breakpoint_at): Rewrite to use it.
3786 (reinsert_breakpoint_handler): Delete.
3787 (set_reinsert_breakpoint): New.
3788 (reinsert_breakpoint_by_bp): Delete.
3789 (delete_reinsert_breakpoints): New.
3790 (uninsert_breakpoint): Rewrite.
3791 (uninsert_breakpoints_at): New.
3792 (reinsert_breakpoint): Rewrite.
3793 (reinsert_breakpoints_at): New.
3794 (check_breakpoints): Rewrite.
3795 (breakpoint_here): New.
3796 (breakpoint_inserted_here): New.
3797 (check_mem_read): Adjust.
3798 * mem-break.h (breakpoints_supported, breakpoint_here)
3799 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3800 (reinsert_breakpoint_by_bp): Delete declaration.
3801 (delete_reinsert_breakpoints): Declare.
3802 (reinsert_breakpoint): Delete declaration.
3803 (reinsert_breakpoints_at): Declare.
3804 (uninsert_breakpoint): Delete declaration.
3805 (uninsert_breakpoints_at): Declare.
3806 (check_breakpoints): Adjust prototype.
3807 * server.h: Adjust include order.
3808 (struct thread_info): Declare here. Add a `last_status' field.
3810 2010-03-23 Michael Snyder <msnyder@vmware.com>
3812 * server.c (crc32): New function.
3813 (handle_query): Add handling for 'qCRC:' request.
3815 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3817 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3818 lwp had been stopped by a watchpoint.
3820 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3822 * server.h (internal_error): Declare.
3823 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3824 * utils.c (internal_error): New function.
3826 2010-03-15 Andreas Schwab <schwab@redhat.com>
3828 * configure.srv: Fix typo setting srv_regobj.
3830 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3832 * linux-low.c (fetch_register): Avoid passing a non string literal
3834 (usr_store_inferior_registers): Ditto.
3836 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3838 * linux-low.c (linux_write_memory): Bail out early if peeking
3841 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3843 * linux-low.h (struct lwp_info): New fields
3844 `stopped_by_watchpoint' and `stopped_data_address'.
3845 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3846 here, and cache them in the lwp object.
3847 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3849 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3851 (linux_stopped_by_watchpoint): Rewrite.
3852 (linux_stopped_data_address): Rewrite.
3854 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3856 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3857 switching the current inferior, not before.
3859 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3861 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3862 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3863 i386-linux.c and amd64-linux.c.
3864 (reg-i386.o): Removed.
3865 (reg-i386.c): Likewise.
3866 (reg-i386-linux.o): Likewise.
3867 (reg-i386-linux.c): Likewise.
3868 (reg-x86-64.o): Likewise.
3869 (reg-x86-64.c): Likewise.
3870 (reg-x86-64-linux.o): Likewise.
3871 (reg-x86-64-linux.c): Likewise.
3874 (i386-linux.o): Likewise.
3875 (i386-linux.c): Likewise.
3876 (amd64.o): Likewise.
3877 (amd64.c): Likewise.
3878 (amd64-linux.o): Likewise.
3879 (amd64-linux.c): Likewise.
3881 * configure.srv (srv_i386_regobj): New.
3882 (srv_i386_linux_regobj): Likewise.
3883 (srv_amd64_regobj): Likewise.
3884 (srv_amd64_linux_regobj): Likewise.
3885 (srv_i386_32bit_xmlfiles): Likewise.
3886 (srv_i386_64bit_xmlfiles): Likewise.
3887 (srv_i386_xmlfiles): Likewise.
3888 (srv_amd64_xmlfiles): Likewise.
3889 (srv_i386_linux_xmlfiles): Likewise.
3890 (srv_amd64_linux_xmlfiles): Likewise.
3891 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3892 srv_xmlfiles to $srv_i386_xmlfiles.
3893 (i[34567]86-*-mingw32ce*): Likewise.
3894 (i[34567]86-*-mingw*): Likewise.
3895 (i[34567]86-*-nto*): Likewise.
3896 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3897 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3898 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3899 (x86_64-*-linux*): Likewise.
3901 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3902 (init_registers_amd64_linux): New.
3903 (x86_arch_setup): Replace init_registers_x86_64_linux with
3904 init_registers_amd64_linux.
3906 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3908 * configure.ac: Check for libdl. If it is not available link against
3909 static libthread_db.
3910 * configure: Regenerate.
3912 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3916 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3917 handing a read watchpoint.
3918 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3920 2010-02-12 Doug Evans <dje@google.com>
3922 * linux-low.c (linux_supports_tracefork_flag): Document.
3923 (linux_look_up_symbols): Add comment.
3925 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3927 * regcache.c (supply_register): Clear regcache if buf is NULL.
3929 2010-02-02 Nicolas Roche <roche@sourceware.org>
3930 Joel Brobecker <brobecker@adacore.com>
3932 * inferiors.c (find_inferior): Add function documentation.
3933 (unloaded_dll): Handle the case where the unloaded dll has not
3934 been previously registered in the dll list.
3936 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3938 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3939 (thumb2_breakpoint): New.
3940 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3942 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3944 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3945 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3948 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3950 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3952 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3954 * linux-s390-low.c (s390_collect_ptrace_register)
3955 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3957 2010-01-21 Doug Evans <dje@google.com>
3959 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3960 (PTRACE_ARG4_TYPE): New macro.
3961 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3962 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3963 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3964 (usr_store_inferior_registers): Ditto.
3965 (linux_read_memory, linux_write_memory): Ditto.
3966 (linux_test_for_tracefork): Ditto.
3968 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3969 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3971 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3973 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3976 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3978 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3979 prototype to take a regcache. Adjust.
3981 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3983 * regcache.h (struct thread_info): Forward declare.
3984 (struct regcache): New.
3985 (new_register_cache): Adjust prototype.
3986 (get_thread_regcache): Declare.
3987 (free_register_cache): Adjust prototype.
3988 (registers_to_string, registers_from_string): Ditto.
3989 (supply_register, supply_register_by_name, collect_register)
3990 (collect_register_as_string, collect_register_by_name): Ditto.
3991 * regcache.c (struct inferior_regcache_data): Delete.
3992 (get_regcache): Rename to ...
3993 (get_thread_regcache): ... this. Adjust. Switch inferior before
3995 (regcache_invalidate_one): Adjust.
3996 (regcache_invalidate): Fix prototype.
3997 (new_register_cache): Return the new register cache.
3998 (free_register_cache): Change prototype.
3999 (realloc_register_cache): Adjust.
4000 (registers_to_string): Change prototype to take a regcache. Adjust.
4001 (registers_from_string): Ditto.
4002 (register_data): Ditto.
4003 (supply_register): Ditto.
4004 (supply_register_by_name): Ditto.
4005 (collect_register): Ditto.
4006 (collect_register_as_string): Ditto.
4007 (collect_register_by_name): Ditto.
4008 * server.c (process_serial_event): Adjust.
4009 * linux-low.h (regset_fill_func, regset_store_func): Change
4011 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4013 * linux-low.c (get_stop_pc): Adjust.
4014 (check_removed_breakpoint): Adjust.
4015 (linux_wait_for_event): Adjust.
4016 (linux_resume_one_lwp): Adjust.
4017 (fetch_register): Add regcache parameter. Adjust.
4018 (usr_store_inferior_registers): Ditto.
4019 (regsets_fetch_inferior_registers): Ditto.
4020 (regsets_store_inferior_registers): Ditto.
4021 (linux_fetch_registers, linux_store_registers): Ditto.
4022 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4024 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4026 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4027 prototype to take a regcache.
4028 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4029 * remote-utils.c (convert_ascii_to_int, outreg)
4030 (prepare_resume_reply): Change prototype to take a regcache.
4032 * target.h (struct target_ops) <fetch_registers, store_registers>:
4033 Change prototype to take a regcache.
4034 (fetch_inferior_registers, store_inferior_registers): Change
4035 prototype to take a regcache. Adjust.
4036 * proc-service.c (ps_lgetregs): Adjust.
4037 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4038 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4039 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4040 take a regcache. Adjust.
4041 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4042 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4043 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4044 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4045 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4046 (cris_cannot_fetch_register):
4047 (cris_breakpoint_at): Change prototype to take a regcache.
4049 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4050 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4051 to take a regcache. Adjust.
4052 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4054 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4055 take a regcache. Adjust.
4056 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4057 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4058 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4059 * linux-mips-low.c (mips_get_pc):
4060 (mips_set_pc): Change prototype to take a regcache. Adjust.
4061 (mips_reinsert_addr): Adjust.
4062 (mips_collect_register): Change prototype to take a regcache.
4064 (mips_supply_register):
4065 (mips_collect_register_32bit, mips_supply_register_32bit)
4066 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4067 (mips_store_fpregset): Ditto.
4068 * linux-ppc-low.c (ppc_supply_ptrace_register)
4069 (ppc_supply_ptrace_register): Ditto.
4070 (parse_spufs_run): Adjust.
4071 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4072 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4073 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4074 take a regcache. Adjust.
4075 * linux-s390-low.c (s390_collect_ptrace_register)
4076 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4077 (s390_set_pc): Change prototype to take a regcache. Adjust.
4078 (s390_arch_setup): Adjust.
4079 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4080 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4081 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4082 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4083 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4085 (sparc_breakpoint_at): Adjust.
4086 * linux-xtensa-low.c (xtensa_fill_gregset):
4087 (xtensa_store_gregset):
4088 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4089 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4090 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4091 prototype to take a regcache. Adjust.
4092 * win32-arm-low.c (arm_fetch_inferior_register)
4093 (arm_store_inferior_register): Change prototype to take a
4095 * win32-i386-low.c (i386_fetch_inferior_register)
4096 (i386_store_inferior_register): Change prototype to take a
4098 * win32-low.c (child_fetch_inferior_registers)
4099 (child_store_inferior_registers): Change prototype to take a
4101 (win32_wait): Adjust.
4102 (win32_fetch_inferior_registers): Change prototype to take a
4104 (win32_store_inferior_registers): Adjust.
4105 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4106 store_inferior_register>: Change prototype to take a regcache.
4108 2010-01-20 Doug Evans <dje@google.com>
4110 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4112 (linux_wait_for_event1, linux_init_signals): Ditto.
4113 (W_STOPCODE): Provide definition if missing.
4115 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4117 * linux-low.c (linux_core_of_thread): New.
4118 (compare_ints, show_process, list_threads): New.
4119 (linux_qxfer_osdata): Report threads and cores.
4120 (linux_target_op): Register linux_core_of_thread.
4121 * remote-utils.c (prepare_resume_reply): Report the core.
4122 (buffer_xml_printf): Support %d specifier.
4123 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4125 (handle_query): Handle qXfer:threads. Announce availability
4127 * target.h (struct target_ops): New field core_of_thread.
4129 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4131 * Makefile.in (clean): Remove new generated files.
4132 (reg-s390.o, reg-s390.c): Remove rules.
4133 (reg-s390x.o, reg-s390x.c): Likewise.
4134 (s390-linux32.o, s390-linux32.c): Add rules.
4135 (s390-linux64.o, s390-linux64.c): Likewise.
4136 (s390x-linux64.o, s390x-linux64.c): Likewise.
4137 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4138 * linux-s390-low.c: Include <elf.h>.
4139 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4140 (init_registers_s390): Remove prototype.
4141 (init_registers_s390x): Likewise.
4142 (init_registers_s390_linux32): Add prototype.
4143 (init_registers_s390_linux64): Likewise.
4144 (init_registers_s390x_linux64): Likewise.
4145 (s390_num_regs_3264): New define.
4146 (s390_regmap_3264): New global variable.
4147 (s390_cannot_fetch_register): Remove obsolete check.
4148 (s390_cannot_store_register): Likewise.
4149 (s390_collect_ptrace_register): Handle upper/lower register halves.
4150 (s390_supply_ptrace_register): Likewise.
4151 (s390_fill_gregset): Update to register number changes.
4152 (s390_get_hwcap): New routine.
4153 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4154 Install appropriate regmap and register set.
4156 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4158 * server.c (gdbserver_version): Update copyright year to 2010.
4159 * gdbreplay.c (gdbreplay_version): Likewise.
4161 2009-12-28 Doug Evans <dje@google.com>
4163 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4164 elf/external.h. Include <elf.h> instead but only if necessary.
4166 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4168 * linux-low.c (linux_remove_process): Remove `detaching'
4169 parameter. Don't release/detach from thread_db here.
4170 (linux_kill): Release/detach from thread_db here, ...
4171 (linux_detach): ... and here, before actually detaching.
4172 (linux_wait_1): ... and here, when a process exits.
4173 * thread-db.c (any_thread_of): New.
4174 (thread_db_free): Switch the current inferior to a thread of the
4177 2009-12-21 Doug Evans <dje@google.com>
4179 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4181 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4182 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4183 warning ifndef __NR_tkill. Move setting of errno there too.
4184 Delete unnecessary resetting of errno after syscall.
4185 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4187 * configure.ac: Check for dladdr.
4188 * config.in: Regenerate.
4189 * configure: Regenerate.
4190 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4191 (try_thread_db_load): Update.
4193 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4195 2009-12-18 Doug Evans <dje@google.com>
4197 * event-loop.c: Include unistd.h if it exists.
4199 * linux-low.c (my_waitpid): Move definition away from being in
4200 between linux_tracefork_child/linux_test_for_tracefork.
4202 * gdb_proc_service.h (psaddr_t): Fix type.
4203 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4204 signature to match glibc.
4206 2009-12-16 Doug Evans <dje@google.com>
4208 * linux-low.c (linux_read_memory): Fix argument to read.
4210 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4212 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4213 events, don't leave current_inferior pointing at null.
4215 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4217 * win32-low.c (LOG): Delete.
4218 (OUTMSG): Output to stderr.
4219 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4220 on compile time LOG macro.
4221 (win32_wait): Fix debug output.
4223 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4225 * win32-low.c (win32_add_one_solib): If the dll name is
4226 "ntdll.dll", prepend the system directory to the dll path.
4228 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4230 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4232 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4233 Vladimir Prus <vladimir@codesourcery.com>
4235 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4236 * configure.ac: Check for __mcoldfire__ and set
4237 gdb_cv_m68k_is_coldfire.
4238 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4239 reg-cf.o and reg-m68k.o.
4240 * configure: Regenerated.
4242 2009-11-16 Pedro Alves <pedro@codesourcery.com>
4244 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4245 Pass it to thread_db_free.
4246 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4247 proper `detaching' argument to linux_remove_process.
4248 * linux-low.h (thread_db_free): Add `detaching' parameter.
4249 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4251 (thread_db_free): Add `detaching' parameter. Only
4252 call td_ta_clear_event if detaching from process.
4254 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4256 * thread-db.c (thread_db_free): Fix typo.
4258 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4261 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4263 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4265 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4266 with an i686 compiler.
4267 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4269 * configure: Rebuilt.
4271 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4275 * server.c (handle_search_memory_1): Correct read_addr initialization
4276 in loop for searching subsequent chunks.
4278 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4280 * configure.ac: New --with-libthread-db option.
4281 * thread-db.c: Allow direct dependence on libthread_db.
4282 (thread_db_free): Adjust.
4283 * config.in: Regenerate.
4284 * configure: Likewise.
4286 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4289 * thread-db.c (attach_thread): New function.
4290 (maybe_attach_thread): Return success/failure.
4291 (find_new_threads_callback): Adjust.
4292 (thread_db_find_new_threads): Loop until no new threads.
4294 2009-10-13 Pedro Alves <pedro@codesourcery.com>
4296 * proc-service.c (ps_lgetregs): Formatting.
4298 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4300 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4301 * configure.ac: Adjust.
4302 * linux-low.h (struct process_info_private): Move members to struct
4304 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4305 * linux-low.c (linux_remove_process): Adjust.
4306 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4307 * server.c (handle_query): Move code ...
4308 (handle_monitor_command): ... here. New function.
4309 * target.h (struct target_ops): New member.
4310 * thread-db.c (struct thread_db): New.
4311 (libthread_db_search_path): New variable.
4312 (thread_db_create_event, thread_db_enable_reporting)
4313 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4314 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4315 (try_thread_db_load_1, dladdr_to_soname): New functions.
4316 (try_thread_db_load, thread_db_load_search): New functions.
4317 (thread_db_init): Search for libthread_db.
4318 (thread_db_free): New function.
4319 (thread_db_handle_monitor_command): Likewise.
4320 * config.in: Regenerate.
4321 * configure: Regenerate.
4323 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4325 * spu-low.c (spu_kill): Wait for inferior to terminate.
4326 Call clear_inferiors.
4327 (spu_detach): Call clear_inferiors.
4329 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4331 * aclocal.m4: Regenerate.
4332 * config.in: Likewise.
4333 * configure: Likewise.
4335 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4337 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4338 (parse_spufs_run): New function.
4339 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4340 (ppc_breakpoint_at): Handle SPU breakpoints.
4342 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4344 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4345 (SPUFS_MAGIC): Define.
4346 (spu_enumerate_spu_ids): New function.
4347 (linux_qxfer_spu): New function.
4348 (linux_target_ops): Install linux_qxfer_spu.
4350 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4352 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4353 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4354 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4355 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4356 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4357 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4358 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4359 (init_registers_powerpc_cell32l): Add prototype.
4360 (init_registers_powerpc_cell64l): Likewise.
4361 (ppc_arch_setup): Detect Cell/B.E. architecture.
4363 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4365 * Makefile.in (datarootdir): New variable.
4367 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4369 * linux-low.c (linux_write_memory): Update debugging output.
4370 * Makefile.in (clean): Add new descriptions.
4371 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4372 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4373 * configure.srv: Add new files for arm*-*-linux*.
4374 * linux-arm-low.c: Add new declarations.
4375 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4376 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4377 (HWCAP_VFPv3D16): New.
4378 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4379 instead of __IWMMXT__.
4380 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4381 (arm_arch_setup): New.
4382 (target_regsets): Remove #ifdef. Add VFP regset.
4383 (the_low_target): Use arm_arch_setup.
4385 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4387 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4388 the main thread again.
4390 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4392 Adding Neutrino gdbserver.
4393 * configure: Regenerated.
4394 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4395 * configure.srv (i[34567]86-*-nto*): New target.
4396 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4397 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4398 (nto_comctrl) [__QNX__]: New function.
4399 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4401 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4403 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4406 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4407 Pedro Alves <pedro@codesourcery.com>
4409 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4410 don't support CONTEXT_EXTENDED_REGISTERS.
4411 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4412 (the_low_target): Install them.
4413 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4414 failing with ERROR_PIPE_NOT_CONNECTED.
4416 2009-06-30 Doug Evans <dje@google.com>
4417 Pierre Muller <muller@ics.u-strasbg.fr>
4419 Add h/w watchpoint support to x86-linux, win32-i386.
4420 * Makefile.in (SFILES): Add i386-low.c
4421 (i386_low_h): Define.
4422 (i386-low.o): Add dependencies.
4423 (linux-x86-low.o): Add i386-low.h dependency.
4424 (win32-i386-low.o): Ditto.
4425 * i386-low.c: New file.
4426 * i386-low.h: New file.
4427 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4428 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4429 * linux-low.c (linux_add_process): Initialize arch_private.
4430 (linux_remove_process): Free arch_private.
4431 (add_lwp): Initialize arch_private.
4432 (delete_lwp): Free arch_private.
4433 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4435 * linux-low.h (process_info_private): New member arch_private.
4436 (lwp_info): New member arch_private.
4437 (linux_target_ops): New members new_process, new_thread,
4439 (ptid_of): New macro.
4440 * linux-x86-low.c: Include stddef.h, i386-low.h.
4441 (arch_process_info): New struct.
4442 (arch_lwp_info): New struct.
4443 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4444 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4445 (i386_dr_low_get_status): New function.
4446 (x86_insert_point, x86_remove_point): New functions.
4447 (x86_stopped_by_watchpoint): New function.
4448 (x86_stopped_data_address): New function.
4449 (x86_linux_new_process, x86_linux_new_thread): New functions.
4450 (x86_linux_prepare_to_resume): New function.
4451 (the_low_target): Add entries for insert_point, remove_point,
4452 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4454 * server.c (debug_hw_points): New global.
4455 (monitor_show_help): Document set debug-hw-points.
4456 (handle_query): Process "set debug-hw-points".
4457 * server.h (debug_hw_points): Declare.
4458 (paddress): Declare.
4459 * utils.c (NUMCELLS, CELLSIZE): New macros.
4460 (get_sell, xsnprintf, paddress): New functions.
4461 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4462 remove_point, stopped_by_watchpoint, stopped_data_address.
4463 * win32-i386-low.c: Include i386-low.h.
4464 (debug_reg_state): Replaces dr.
4465 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4466 (i386_dr_low_get_status): New function.
4467 (i386_insert_point, i386_remove_point): New functions.
4468 (i386_stopped_by_watchpoint): New function.
4469 (i386_stopped_data_address): New function.
4470 (i386_initial_stuff): Update.
4471 (get_thread_context,set_thread_context,i386_thread_added): Update.
4472 (the_low_target): Add entries for insert_point,
4473 remove_point, stopped_by_watchpoint, stopped_data_address.
4474 * win32-low.c (win32_insert_watchpoint): New function.
4475 (win32_remove_watchpoint): New function.
4476 (win32_stopped_by_watchpoint): New function.
4477 (win32_stopped_data_address): New function.
4478 (win32_target_ops): Add entries for insert_watchpoint,
4479 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4480 * win32-low.h (win32_target_ops): New members insert_point,
4481 remove_point, stopped_by_watchpoint, stopped_data_address.
4483 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4485 * server.c (process_serial_event): Re-return unsupported, not
4486 error, if the type isn't recognized. Re-allow supporting only
4487 insert or remove packets. Also call require_running for
4488 breakpoints. Add missing break statement to default case. Tidy.
4489 * target.h (struct target_ops): Rename insert_watchpoint to
4490 insert_point, and remove_watchpoint to remove_point.
4492 * linux-low.h (struct linux_target_ops): Likewise.
4493 * linux-low.c (linux_insert_watchpoint): Rename to ...
4494 (linux_insert_point): ... this. Adjust.
4495 (linux_remove_watchpoint): Rename to ...
4496 (linux_remove_point): ... this. Adjust.
4497 (linux_target_ops): Adjust.
4498 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4499 (cris_insert_point): ... this.
4500 (cris_remove_watchpoint): Rename to ...
4501 (cris_remove_point): ... this.
4502 (the_low_target): Adjust.
4504 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4506 * server.c (handle_v_kill): Pass signal_pid to
4507 kill_inferior if multi_process is zero.
4509 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4511 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4512 * target.h (target_ops): Comment for *_watchpoint to make it clear
4513 the functions can get types '0' and '1'.
4515 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4517 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4518 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4519 * regcache.c (get_regcache): Likewise.
4520 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4521 * win32-low.c (child_fetch_inferior_registers): Remove check for
4524 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4525 Pedro Alves <pedro@codesourcery.com>
4527 * target.h (struct target_ops) <supports_multi_process>: New
4529 (target_supports_multi_process): New.
4530 * server.c (handle_query): Even if GDB reports support, only
4531 enable multi-process if the target also supports it. Report
4532 multi-process support only if the target backend supports it.
4533 * linux-low.c (linux_supports_multi_process): New function.
4534 (linux_target_ops): Install it as target_supports_multi_process
4537 2009-05-24 Doug Evans <dje@google.com>
4539 Global renaming of find_thread_pid to find_thread_ptid.
4540 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4541 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4542 All callers updated.
4544 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4545 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4548 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4549 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4550 (linux_resume_one_lwp): Ditto.
4552 2009-05-23 Doug Evans <dje@google.com>
4554 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4555 from struct inferior_list_entry * to struct lwp_info *.
4556 All callers updated.
4558 2009-05-13 Doug Evans <dje@google.com>
4560 * linux-x86-low.c: Don't include assert.h.
4561 (x86_siginfo_fixup): Use fatal, not assert.
4562 (x86_arch_setup): Fix comment.
4564 2009-05-12 Doug Evans <dje@google.com>
4566 Biarch support for i386/amd64 gdbserver.
4567 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4568 Add linux-x86-low.c.
4569 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4570 (linux-x86-low.o): Add.
4571 * linux-x86-64-low.c: Delete.
4572 * linux-i386-low.c: Delete.
4573 * linux-x86-low.c: New file.
4574 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4576 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4578 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4579 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4580 (linux_child_pid_to_exec_file): New function.
4581 (elf_64_header_p, elf_64_file_p): New functions.
4582 (siginfo_fixup): New function.
4583 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4584 give target a chance to convert layout.
4585 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4586 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4588 2009-05-07 Doug Evans <dje@google.com>
4590 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4591 (regsets_store_inferior_registers): Ditto.
4593 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4597 * linux-low.c (must_set_ptrace_flags): Delete.
4598 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4600 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4601 `lwp->must_set_ptrace_flags' instead.
4602 (linux_wait_for_event_1): Set ptrace options here.
4603 (linux_wait_1): ... not here.
4605 2009-04-30 Doug Evans <dje@google.com>
4607 * inferiors.c (started_inferior_callback): New function.
4608 (attached_inferior_callback): New function.
4609 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4610 * server.c (print_started_pid, print_attached_pid): New functions.
4611 (detach_or_kill_for_exit): New function.
4612 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4613 * server.h (have_started_inferiors_p): Declare.
4614 (have_attached_inferiors_p): Declare.
4616 * inferiors.c (remove_process): Fix memory leak, free process.
4617 * linux-low.c (linux_remove_process): New function.
4618 (linux_kill): Call it instead of remove_process.
4619 (linux_detach, linux_wait_1): Ditto.
4621 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4623 * configure.srv: Add x86 Windows CE target.
4625 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4627 * inferiors.c (get_thread_process): Make global.
4628 * server.h (get_thread_process): Add prototype.
4629 * thread-db.c (find_one_thread): Use get_thread_process
4630 instead of current_process.
4631 (thread_db_get_tls_address): Do not crash if called when
4632 thread layer is not yet initialized.
4634 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4636 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4637 * spu-low.c (current_tid): Rename to ...
4638 (current_ptid): ... this.
4639 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4640 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4641 ptid_get_lwp (current_ptid) instead of current_tid.
4642 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4643 instead of current_tid. Use find_process_pid to verify pid
4644 argument is valid. Pass proper argument to remove_process.
4645 (spu_thread_alive): Compare current_ptid instead of current_tid.
4646 (spu_resume): Likewise.
4648 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4650 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4653 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4655 Implement the multiprocess extensions, and add linux multiprocess
4658 * server.h (ULONGEST): Declare.
4659 (struct ptid, ptid_t): New.
4660 (minus_one_ptid, null_ptid): Declare.
4661 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4662 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4663 (struct inferior_list_entry): Change `id' type from unsigned from
4665 (struct sym_cache, struct breakpoint, struct
4666 process_info_private): Forward declare.
4667 (struct process_info): Declare.
4668 (current_process): Declare.
4669 (all_processes): Declare.
4670 (initialize_inferiors): Declare.
4671 (add_thread): Adjust to use ptid_t.
4672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4673 (add_process, remove_process, find_thread_pid): Declare.
4674 (find_inferior_id): Adjust to use ptid_t.
4675 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4676 (multi_process): Declare.
4677 (push_event): Adjust to use ptid_t.
4678 (read_ptid, write_ptid): Declare.
4679 (prepare_resume_reply): Adjust to use ptid_t.
4680 (clear_symbol_cache): Declare.
4681 * inferiors.c (all_processes): New.
4682 (null_ptid, minus_one_ptid): New.
4683 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4684 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4685 (add_thread): Change unsigned long to ptid. Remove gdb_id
4687 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4688 (gdb_id_to_thread): Rename to ...
4689 (find_thread_pid): ... this. Change unsigned long to ptid.
4690 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4691 (loaded_dll, pull_pid_from_list): Adjust.
4692 (add_process, remove_process, find_process_pid)
4693 (get_thread_process, current_process, initialize_inferiors): New.
4694 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4695 (struct target_waitstatus) <related_pid>: Ditto.
4696 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4698 (struct target_ops) <join>: Add `pid' argument.
4699 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4700 (struct target_ops) <wait>: Add `ptid' field. Change return type
4702 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4703 (mywait): Add `ptid' argument. Change return type to ptid_t.
4704 (target_pid_to_str): Declare.
4705 * target.c (set_desired_inferior): Adjust to use ptids.
4706 (mywait): Add new `ptid' argument. Adjust.
4707 (target_pid_to_str): New.
4708 * mem-break.h (free_all_breakpoints): Declare.
4709 * mem-break.c (breakpoints): Delelete.
4710 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4711 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4712 to use per-process breakpoint list.
4713 (free_all_breakpoints): New.
4714 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4715 (symbol_cache, all_symbols_looked_up): Delete.
4717 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4719 (prepare_resume_reply): Change ptid argument's type from unsigned
4720 long to ptid_t. Adjust. Implement W;process and X;process.
4721 (free_sym_cache, clear_symbol_cache): New.
4722 (look_up_one_symbol): Adjust to per-process symbol cache. *
4723 * server.c (cont_thread, general_thread, step_thread): Change type
4726 (multi_process): New.
4727 (last_ptid): Change type to ptid_t.
4728 (struct vstop_notif) <ptid>: Change type to ptid_t.
4729 (queue_stop_reply, push_event): Change `ptid' argument's type to
4731 (discard_queued_stop_replies): Add `pid' argument.
4732 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4733 changes. Don't reference the `attached' global.
4734 (attach_inferior): Adjust to mywait interface changes.
4735 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4736 features. Handle and report "multiprocess+". Handle
4738 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4740 (handle_v_kill): New.
4741 (handle_v_stopped): Adjust to use target_pid_to_str.
4742 (handle_v_requests): Allow multiple attaches and runs when
4743 multiprocess extensions are in effect. Handle "vKill".
4744 (myresume): Adjust to use ptids.
4745 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4746 (handle_status): Adjust to discard_queued_stop_replies interface
4748 (first_thread_of, kill_inferior_callback)
4749 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4750 (main): Call initialize_inferiors. Adjust to use ptids, killing
4751 and detaching from all inferiors. Handle multiprocess packet
4753 * linux-low.h: Include gdb_proc_service.h.
4754 (struct process_info_private): New.
4755 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4756 <lwpid_of>: Use ptid_get_lwp.
4757 (get_lwp_thread): Adjust.
4758 (struct lwp_info): Add `dead' member.
4759 (find_lwp_pid): Declare.
4760 * linux-low.c (thread_db_active): Delete.
4761 (new_inferior): Adjust comment.
4762 (inferior_pid): Delete.
4763 (linux_add_process): New.
4764 (handle_extended_wait): Adjust.
4765 (add_lwp): Change unsigned long to ptid.
4766 (linux_create_inferior): Add process to processes table. Adjust
4767 to use ptids. Don't set new_inferior here.
4768 (linux_attach_lwp): Rename to ...
4769 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4770 it. Adjust to use ptids.
4771 (linux_attach_lwp): New.
4772 (linux_attach): Add process to processes table. Don't set
4774 (struct counter): New.
4775 (second_thread_of_pid_p, last_thread_of_process_p): New.
4776 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4778 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4779 processes. Remove process from process table.
4780 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4781 to multiple processes.
4782 (any_thread_of): New.
4783 (linux_detach): Add `pid' argument, and handle it. Remove process
4784 from processes table.
4785 (linux_join): Add `pid' argument. Handle it.
4786 (linux_thread_alive): Change unsighed long argument to ptid_t.
4787 Consider dead lwps as not being alive.
4788 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4789 threads we're not interested in.
4790 (same_lwp, find_lwp_pid): New.
4791 (linux_wait_for_lwp): Change `pid' argument's type from int to
4793 (linux_wait_for_event): Rename to ...
4794 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4795 from int to ptid_t. Adjust.
4796 (linux_wait_for_event): New.
4797 (linux_wait_1): Add `ptid' argument. Change return type to
4798 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4799 that exit from the process table.
4800 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4802 (mark_lwp_dead): New.
4803 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4804 stopping all threads, mark its main lwp as dead.
4805 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4807 (fetch_register, usr_store_inferior_registers)
4808 (regsets_fetch_inferior_registers)
4809 (regsets_store_inferior_registers, linux_read_memory)
4810 (linux_write_memory): Inline `inferior_pid'.
4811 (linux_look_up_symbols): Adjust to use per-process
4813 (linux_request_interrupt): Adjust to use ptids.
4814 (linux_read_auxv): Inline `inferior_pid'.
4815 (initialize_low): Don't reference thread_db_active.
4816 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4817 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4818 (ps_getpid): Return the pid of the current inferior.
4819 * thread-db.c (proc_handle, thread_agent): Delete.
4820 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4822 (find_one_thread): Change argument type to ptid_t. Adjust to
4824 (maybe_attach_thread): Adjust to per-process data and ptids.
4825 (thread_db_find_new_threads): Ditto.
4826 (thread_db_init): Ditto.
4827 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4828 processes table. Adjust to use ptids.
4829 (spu_kill, spu_detach): Adjust interface. Remove process from
4831 (spu_join, spu_thread_alive): Adjust interface.
4832 (spu_wait): Adjust interface. Remove process from processes
4833 table. Adjust to use ptids.
4834 * win32-low.c (current_inferior_tid): Delete.
4835 (current_inferior_ptid): New.
4836 (debug_event_ptid): New.
4837 (thread_rec): Take a ptid. Adjust.
4838 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4839 (child_delete_thread): Ditto.
4840 (do_initial_child_stuff): Add `attached' argument. Add process to
4842 (child_fetch_inferior_registers, child_store_inferior_registers):
4844 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4845 (win32_attach): Pass 1 to do_initial_child_stuff.
4846 (win32_kill): Adjust interface. Remove process from processes
4848 (win32_detach): Ditto.
4849 (win32_join): Adjust interface.
4850 (win32_thread_alive): Take a ptid.
4851 (win32_resume): Adjust to use ptids.
4852 (get_child_debug_event): Ditto.
4853 (win32_wait): Adjust interface. Remove exiting process from
4856 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4858 Non-stop mode support.
4860 * server.h (non_stop): Declare.
4861 (gdb_client_data, handler_func): Declare.
4862 (delete_file_handler, add_file_handler, start_event_loop):
4864 (handle_serial_event, handle_target_event, push_event)
4865 (putpkt_notif): Declare.
4866 * target.h (enum resume_kind): New.
4867 (struct thread_resume): Replace `step' field by `kind' field.
4868 (TARGET_WNOHANG): Define.
4869 (struct target_ops) <wait>: Add `options' argument.
4870 <supports_non_stop, async, start_non_stop>: New fields.
4871 (target_supports_non_stop, target_async): New.
4872 (start_non_stop): Declare.
4873 (mywait): Add `options' argument.
4874 * target.c (mywait): Add `options' argument. Print child exit
4876 (start_non_stop): New.
4877 * server.c (non_stop, own_buf, mem_buf): New globals.
4878 (struct vstop_notif): New.
4879 (notif_queue): New global.
4880 (queue_stop_reply, push_event, discard_queued_stop_replies)
4881 (send_next_stop_reply): New.
4882 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4884 (attach_inferior): In non-stop mode, don't wait for the target
4886 (handle_general_set): Handle QNonStop.
4887 (handle_query): When handling qC, return the current general
4888 thread, instead of the first thread of the list.
4889 (handle_query): If the backend supports non-stop mode, include
4890 QNonStop+ in the qSupported query response.
4891 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4893 (handle_v_attach, handle_v_run): Handle non-stop mode.
4894 (handle_v_stopped): New.
4895 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4896 (myresume): Adjust to use resume_kind. Handle non-stop.
4897 (queue_stop_reply_callback): New.
4898 (handle_status): Handle non-stop mode.
4899 (main): Clear non_stop flag on reconnection. Use the event-loop.
4900 Refactor serial protocol handling from here ...
4901 (process_serial_event): ... to this new function. When GDB
4902 selects any thread, select one here. In non-stop mode, wait until
4903 GDB acks all pending events before exiting.
4904 (handle_serial_event, handle_target_event): New.
4905 * remote-utils.c (remote_open): Install remote_desc in the event
4907 (remote_close): Remove remote_desc from the event loop.
4908 (putpkt_binary): Rename to...
4909 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4910 (putpkt_binary): New as wrapper around putpkt_binary_1.
4911 (putpkt_notif): New.
4912 (prepare_resume_reply): In non-stop mode, don't change the
4914 * event-loop.c: New.
4915 * Makefile.in (OBJ): Add event-loop.o.
4916 (event-loop.o): New rule.
4918 * linux-low.h (pid_of): Moved here.
4920 (get_lwp_thread): Use lwpid_of.
4921 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4922 * linux-low.c (pid_of): Delete.
4923 (inferior_pid): Use lwpid_of.
4924 (linux_event_pipe): New.
4925 (target_is_async_p): New.
4927 (handle_extended_wait): Use lwpid_of.
4928 (add_lwp): Don't set lwpid field.
4929 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4930 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4931 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4932 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4933 first. Adjust to linux_wait_for_event interface changes. Use
4935 (linux_detach): Don't delete the main lwp here.
4936 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4937 (status_pending_p): Don't consider explicitly suspended lwps.
4938 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4939 pointer. Add OPTIONS argument. Change return type to int. Use
4940 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4941 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4942 pointer. Add status pointer argument. Return a pid instead of a
4943 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4944 changes. In non-stop mode, don't switch to a random thread.
4945 (linux_wait): Rename to...
4946 (linux_wait_1): ... this. Add target_options argument, and handle
4947 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4948 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4949 clean exit and signal exit code. Don't stop all threads in
4950 non-stop mode. In all-stop mode, only stop all threads when
4951 reporting a stop to GDB. Handle explicit thread stop requests.
4952 (async_file_flush, async_file_mark): New.
4954 (send_sigstop): Use lwpid_of.
4955 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4956 interface changes. In non-stop mode, don't switch to a random
4958 (linux_resume_one_lwp): Use lwpid_of.
4959 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4960 (linux_resume_one_thread): ... this. Handle resume_stop. In
4961 non-stop mode, don't look for pending flag in all threads.
4962 (resume_status_pending_p): Don't consider explicitly suspended
4964 (my_waitpid): Reimplement. Emulate __WALL.
4965 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4967 (sigchld_handler, linux_supports_non_stop, linux_async)
4968 (linux_start_non_stop): New.
4969 (linux_target_ops): Register linux_supports_non_stop, linux_async
4970 and linux_start_non_stop.
4971 (initialize_low): Install SIGCHLD handler.
4972 * thread-db.c (thread_db_create_event, find_one_thread)
4973 (thread_db_get_tls_address): Use lwpid_of.
4974 * win32-low.c (win32_detach): Adjust to use resume_kind.
4975 (win32_wait): Add `options' argument.
4976 * spu-low.c (spu_resume): Adjust to use resume_kind.
4977 (spu_wait): Add `options' argument.
4979 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4981 Decouple target code from remote protocol.
4983 * target.h (enum target_waitkind): New.
4984 (struct target_waitstatus): New.
4985 (struct target_ops) <wait>: Return an unsigned long. Take a
4986 target_waitstatus pointer instead of a char pointer.
4988 * target.c (mywait): Change prototype to return an unsigned long.
4989 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4990 * server.h (thread_from_wait, old_thread_from_wait): Delete
4992 (prepare_resume_reply): Change prototype to take a
4994 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4995 (last_status, last_ptid): New.
4996 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4997 pid instead of a signal.
4998 (attach_inferior): Remove "status" and "signal" parameters.
5000 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5002 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5003 (handle_v_requests, myresume): Remove "status" and "signal"
5005 (handle_status): New.
5006 (main): Delete local `status'. Adjust.
5007 * remote-utils.c: Include target.h.
5008 (prepare_resume_reply): Change prototype to take a
5009 target_waitstatus. Adjust.
5011 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5013 * spu-low.c (spu_wait): Adjust.
5014 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5016 (win32_wait): Adjust.
5018 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5020 * target.h (struct thread_resume): Delete leave_stopped member.
5021 (struct target_ops): Add a `n' argument to the `resume' callback.
5022 * server.c (start_inferior): Adjust.
5023 (handle_v_cont, myresume): Adjust.
5024 * linux-low.c (check_removed_breakpoint): Adjust to resume
5025 interface change, and to removed leave_stopped field.
5026 (resume_ptr): Delete.
5027 (struct thread_resume_array): New.
5028 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5029 resume interface change.
5030 (linux_continue_one_thread, linux_queue_one_thread)
5031 (resume_status_pending_p): Check if the resume field is NULL
5032 instead of checking the leave_stopped member.
5033 (linux_resume): Adjust to the target resume interface change.
5034 * spu-low.c (spu_resume): Adjust to the target resume interface
5036 * win32-low.c (win32_detach, win32_resume): Ditto.
5038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5040 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5042 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5044 (linux_continue_one_thread): Only preserve the stepping flag if
5045 there's a pending breakpoint.
5047 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5049 * server.c (main): After the inferior having exited, call
5050 remote_close before exiting gdbserver.
5052 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5054 Fix size of FPSCR in Power 7 processors.
5055 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5056 (PPC_FEATURE_HAS_DFP): New #define.
5057 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5060 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5062 * server.c (handle_query) Whitespace and formatting.
5064 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5066 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5067 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5068 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5069 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5070 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5071 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5072 Makefile.in, configure.ac: Fix whitespace throughout.
5073 * configure: Regenerate.
5075 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5077 * inferiors.c (find_inferior): Make it safe for the callback
5078 function to delete the currently iterated inferior.
5080 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5082 * Makefile.in (linuw_low_h): Move higher.
5083 (thread-db.o): Depend on $(linux_low_h).
5085 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5087 Rename "process" to "lwp" throughout.
5089 * linux-low.c (all_processes): Rename to...
5090 (all_lwps): ... this.
5091 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5092 (add_process): Rename to ...
5093 (add_lwp): ... this. Adjust.
5094 (linux_create_inferior): Adjust.
5095 (linux_attach_lwp): Adjust.
5096 (linux_attach): Adjust.
5097 (linux_kill_one_process): Rename to ...
5098 (linux_kill_one_lwp): ... this. Adjust.
5099 (linux_kill): Adjust.
5100 (linux_detach_one_process): Rename to ...
5101 (linux_detach_one_lwp): ... this. Adjust.
5102 (linux_detach): Adjust.
5103 (check_removed_breakpoint): Adjust.
5104 (status_pending_p): Adjust.
5105 (linux_wait_for_process): Rename to ...
5106 (linux_wait_for_lwp): ... this. Adjust.
5107 (linux_wait_for_event): Adjust.
5108 (send_sigstop): Adjust.
5109 (wait_for_sigstop): Adjust.
5110 (stop_all_processes): Rename to ...
5111 (stop_all_lwps): ... this.
5112 (linux_resume_one_process): Rename to ...
5113 (linux_resume_one_lwp): ... this. Adjust.
5114 (linux_set_resume_request, linux_continue_one_thread)
5115 (linux_queue_one_thread, resume_status_pending_p)
5116 (usr_store_inferior_registers, regsets_store_inferior_registers)
5117 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5119 * linux-low.h (get_process): Rename to ...
5120 (get_lwp): ... this. Adjust.
5121 (get_thread_process): Rename to ...
5122 (get_thread_lwp): ... this. Adjust.
5123 (get_process_thread): Rename to ...
5124 (get_lwp_thread): ... this. Adjust.
5125 (struct process_info): Rename to ...
5126 (struct lwp_info): ... this.
5127 (all_processes): Rename to ...
5128 (all_lwps): ... this.
5129 * proc-service.c (ps_lgetregs): Adjust.
5130 * thread-db.c (thread_db_create_event, find_one_thread)
5131 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5133 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5135 * server.c (handle_query): Handle "qAttached".
5137 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5139 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5140 GPLv3, update license URL.
5142 2009-03-01 Doug Evans <dje@google.com>
5144 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5145 (server_h): Add gdb_signals.h.
5146 (signals.o): Update.
5147 * server.h (target_signal_from_host,target_signal_to_host_p)
5148 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5150 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5152 * remote-utils.c (getpkt): Also generate remote-debug
5153 information if noack_mode is set.
5155 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5157 * server.c (handle_query): Report qXfer:siginfo:read and
5158 qXfer:siginfo:write as supported and handle them.
5159 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5160 * linux-low.c (linux_xfer_siginfo): New.
5161 (linux_target_ops): Set it.
5163 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5165 * server.c (gdbserver_usage): Mention --remote-debug.
5166 (main): Accept '--remote-debug' switch.
5168 2009-01-18 Doug Evans <dje@google.com>
5170 * regcache.c (new_register_cache): No need to check result of xcalloc.
5171 * server.c (handle_search_memory): Back out calls to xmalloc,
5172 result is checked and error is returned to user upon failure.
5173 (handle_query): Ditto. Add more checks for result of malloc.
5174 (handle_v_cont): Check result of malloc, report error back to
5176 (handle_v_run): Ditto. Call freeargv.
5177 * server.h (freeargv): Declare.
5178 * utils.c (freeargv): New fn.
5180 2009-01-15 Doug Evans <dje@google.com>
5182 * gdbreplay.c (perror_with_name): Make arg const char *.
5183 * server.h (target_signal_to_name): Make return type const char *.
5184 * thread-db.c (thread_db_err_str): Make return type const char *.
5185 * utils.c (perror_with_name): Make arg const char *.
5187 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5189 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5190 when handling a EXIT_PROCESS_DEBUG_EVENT.
5192 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5194 * gdbreplay.c (gdbreplay_version): Update copyright year.
5195 * server.c (gdbserver_version): Likewise.
5197 2009-01-05 Doug Evans <dje@google.com>
5199 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5200 (handle_extended_wait): Improve comment.
5202 2008-12-13 Doug Evans <dje@google.com>
5204 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5205 * server.h (ATTR_MALLOC): New macro.
5206 (xmalloc,xcalloc,xstrdup): Declare.
5207 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5208 * inferiors.c: Ditto.
5209 * linux-low.c: Ditto.
5210 * mem-break.c: Ditto.
5211 * regcache.c: Ditto.
5212 * remote-utils.c: Ditto.
5215 * win32-low.c: Ditto.
5217 2008-12-12 Doug Evans <dje@google.com>
5219 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5220 in debugging printf.
5222 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5224 2008-12-09 Doug Evans <dje@google.com>
5226 * linux-low.h (struct process_info): Delete member tid, unused.
5227 * thread-db.c (find_one_thread): Update.
5228 (maybe_attach_thread): Update.
5230 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5232 * target.h (struct target_ops): Add qxfer_osdata member.
5233 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5235 (linux_qxfer_osdata): New functions.
5236 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5238 * server.c (handle_query): Handle "qXfer:osdata:read:".
5239 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5240 (buffer_xml_printf): New functions.
5241 * server.h (struct buffer): New.
5242 (buffer_grow_str, buffer_grow_str0): New macros.
5243 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5244 (buffer_xml_printf): Declare.
5246 2008-11-24 Doug Evans <dje@google.com>
5248 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5250 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5252 * server.c (handle_v_run): Always use the supplied argument list.
5254 2008-11-19 Bob Wilson <bob.wilson@acm.org>
5256 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5257 (xtensa_regmap_table): Add entry for scompare1.
5259 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5261 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5262 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5263 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5264 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5265 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5266 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5267 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5268 XML target descriptions.
5269 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5270 when inferior is running on an ISA 2.05 or later processor. Add
5271 special case to return offset for full 64-bit slot of FPSCR when
5274 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5276 * Makefile.in (SFILES, clean): Added sparc64 files.
5277 (reg-sparc64.o, reg-sparc64.c): New.
5278 * configure.srv (sparc*-*-linux*): New configuration.
5279 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5280 syscall arguments for SPARC.
5281 (regsets_store_inferior_registers): Likewise.
5282 * linux-sparc-low.c: New file.
5284 2008-10-21 Doug Evans <dje@google.com>
5286 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5287 (READLINE_DIR,READLINE_DEP): Delete.
5288 (INTERNAL_CFLAGS): Update.
5289 (LINTFLAGS): Update.
5291 2008-10-10 Pedro Alves <pedro@codesourcery.com>
5293 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5294 whole argv from the last run, not just argv[0].
5296 2008-09-08 Pedro Alves <pedro@codesourcery.com>
5298 * regcache.c (new_register_cache): Return NULL if the register
5299 cache size isn't known yet.
5300 (free_register_cache): Avoid dereferencing a NULL regcache.
5302 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5304 * configure.srv: Merge MIPS and MIPS64.
5306 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5308 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5310 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
5312 * Makefile.in: Add required vsx dependencies.
5314 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5315 Declare init_registers_powerpc_vsx32l.
5316 Declare init_registers_powerpc_vsx64l.
5317 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5318 (ppc_arch_setup): Check for VSX in hwcap.
5319 (ppc_fill_vsxregset): New function.
5320 (ppc_store_vsxregset): New function.
5321 Add new VSX entry in regset_info target_regsets.
5323 * configure.srv: Add new VSX dependencies.
5325 2008-08-12 Pedro Alves <pedro@codesourcery.com>
5327 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5328 (remote_open): Set or clear transport_is_reliable.
5329 (putpkt_binary): Don't expect acks in noack mode.
5330 (getpkt): Don't send ack/nac in noack mode.
5331 * server.c (handle_general_set): Handle QStartNoAckMode.
5332 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5334 (main): Reset noack_mode on every connection.
5335 * server.h (noack_mode): Declare.
5337 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5339 * Makefile.in (GDBREPLAY_OBS): New variable.
5340 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5342 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5343 Daniel Jacobowitz <dan@codesourcery.com>
5345 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5346 (usr_store_inferior_registers): Likewise.
5347 (regsets_store_inferior_registers): Likewise.
5349 2008-07-31 Rolf Jansen <rj@surtec.com>
5350 Pedro Alves <pedro@codesourcery.com>
5352 * configure.ac: Check for memmem declaration.
5353 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5354 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5355 (disable_packet_qfThreadInfo): Unconditionally compile.
5356 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5357 * configure, config.in: Regenerate.
5359 2008-07-28 Doug Kwan <dougkwan@google.com>
5361 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5362 (linux_write_memory): Remove declaration of errno.
5364 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5366 * linux-low.c (handle_extended_wait): Do not use "status"
5367 variable uninitialized.
5369 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5371 * server.c (handle_v_attach): Inhibit reporting dll changes.
5373 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5375 * remote-utils.c (prepare_resume_reply): If requested, don't
5376 output "thread:TID" in the T stop reply.
5378 * server.c (disable_packet_vCont, disable_packet_Tthread)
5379 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5380 (handle_query): If requested, disable support for qC, qfThreadInfo
5382 (handle_v_requests): If requested, disable support for vCont.
5383 (gdbserver_show_disableable): New.
5384 (main): Handle --disable-packet and --disable-packet=LIST.
5386 * server.h (disable_packet_vCont, disable_packet_Tthread)
5387 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5389 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5391 * server.c (gdbserver_usage): Mention --version.
5393 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5395 * Makefile.in (gdbreplay.o): New rule.
5397 2008-06-06 Joseph Myers <joseph@codesourcery.com>
5399 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5400 message, not gdbserver.
5402 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5403 Nathan Sidwell <nathan@codesourcery.com>
5404 Joseph Myers <joseph@codesourcery.com>
5406 * acinclude.m4: Include ../../config/acx.m4.
5407 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5408 * configure, config.in: Regenerate.
5409 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5410 * server.c (gdbserver_version): Print PKGVERSION.
5411 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5412 (main): Adjust gdbserver_usage calls.
5413 * gdbreplay.c (version, host_name): Add declarations.
5414 (gdbreplay_version, gdbreplay_usage): New.
5415 (main): Accept --version and --help options.
5417 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5419 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5420 (arm_breakpoint_at): Handle Thumb.
5421 (the_low_target): Add comment.
5423 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5425 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5427 2008-05-09 Doug Evans <dje@google.com>
5429 * server.h (decode_search_memory_packet): Declare.
5430 * remote-utils.c (decode_search_memory_packet): New fn.
5431 * server.c (handle_search_memory_1): New fn.
5432 (handle_search_memory): New fn.
5433 (handle_query): Process qSearch:memory packets.
5435 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5437 * regcache.c (registers_length): Remove.
5438 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5439 full register packet.
5440 * regcache.h (registers_length): Remove prototype.
5441 * server.h (PBUFSIZ): Define to 16384.
5443 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5445 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5446 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5447 powerpc-64l.o, and powerpc-altivec64l.o.
5448 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5449 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5450 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5451 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5452 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5455 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5456 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5457 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5458 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5459 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5460 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5461 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5462 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5463 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5464 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5467 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5468 (init_registers_powerpc_32l): ... this new prototype.
5469 (init_registers_powerpc_32): Remove, replace by ...
5470 (init_registers_powerpc_altivec32l): ... this new prototype.
5471 (init_registers_powerpc_e500): Remove, replace by ...
5472 (init_registers_powerpc_e500l): ... this new prototype.
5473 (init_registers_ppc64): Remove, replace by ...
5474 (init_registers_powerpc_64l): ... this new prototype.
5475 (init_registers_powerpc_64): Remove, replace by ...
5476 (init_registers_powerpc_altivec64l): ... this new prototype.
5477 (ppc_num_regs): Set to 73.
5478 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5479 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5480 (ppc_cannot_store_register): Handle orig_r3 and trap.
5481 (ppc_arch_setup): Update init_registers_... calls.
5482 (ppc_fill_gregset): Handle orig_r3 and trap.
5484 * inferiors.c (clear_inferiors): Reset current_inferior.
5486 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5488 * acinclude.m4: Add override.m4.
5489 * configure: Regenerate.
5491 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5493 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5494 initial call to init_register_ppc64.
5496 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5498 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5499 single powerpc*-*-linux* case.
5500 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5502 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5504 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5505 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5507 * linux-ppc-low.c: Include <elf.h>.
5508 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5509 (ppc_hwcap): New global variable.
5510 (ppc_regmap): Remove __SPE__ #ifdef sections.
5511 (ppc_regmap_e500): New global variable.
5512 (ppc_cannot_store_register): Update __SPE__ special case.
5513 (ppc_get_hwcap): New function.
5514 (ppc_arch_setup): Use it to determine whether inferior supports
5515 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5516 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5517 Do not access registers if target does not support AltiVec.
5518 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5519 Do not access registers if target does not support SPE.
5520 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5522 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5524 * linux-low.c (disabled_regsets, num_regsets): New.
5525 (use_regsets_p): Delete.
5526 (linux_wait_for_process): Clear disabled_regsets.
5527 (regsets_fetch_inferior_registers): Check and set it.
5528 (regsets_store_inferior_registers): Likewise.
5529 (linux_fetch_registers, linux_store_registers): Do not use
5531 (initialize_low): Allocate disabled_regsets.
5533 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5535 * Makefile.in (LIBOBJS): New.
5537 (memmem.o): New rule.
5538 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5539 * configure: Regenerated.
5541 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5543 * server.c (handle_query): Never return "unsupported" for
5544 qXfer:features:read queries.
5546 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5548 * server.c (get_features_xml): Fix inverted condition.
5549 (handle_query): Always support qXfer:feature:read.
5551 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5553 * server.c (wrapper_argv): New.
5554 (start_inferior): Handle wrapper_argv. If set, expect an extra
5556 (gdbserver_usage): Document --wrapper.
5557 (main): Parse --wrapper.
5559 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5561 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5562 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5563 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5564 (ppc_set_pc): Likewise.
5565 (ppc_arch_setup): New function.
5566 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5567 of collect_register.
5568 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5570 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5572 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5573 instead of linux-ppc64-low.o.
5574 * linux-ppc64-low.c: Remove file.
5575 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5576 (linux-ppc64-low.o): Remove rule.
5578 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5579 (init_registers_powerpc_64): Likewise.
5580 (ppc_regmap): Conditionally define depending on __powerpc64__.
5581 (ppc_cannot_store_register): Do not special-case "fpscr" when
5582 compiled on __powerpc64__.
5583 (ppc_collect_ptrace_register): New function.
5584 (ppc_supply_ptrace_register): New function.
5585 (ppc_breakpoint): Change type to "unsigned int".
5586 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5587 (the_low_target): Conditionally provide initializers for the
5588 arch_setup member depending on __powerpc64__. Install
5589 collect_ptrace_register and supply_ptrace_register members.
5591 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5593 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5594 * server.c (gdbserver_xmltarget): Define.
5595 (get_features_xml): Use it to replace "target.xml" and arch_string.
5597 * configure.srv: Remove srv_xmltarget. Add XML files that were
5598 mentioned there to srv_xmlfiles instead. Remove conditional tests
5599 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5600 srv_xmlfiles and srv_regobj to include all possible choices.
5601 * configure.ac (srv_xmltarget): Remove.
5602 (srv_xmlfiles): Do not add "target.xml".
5603 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5604 checks for supplementary target information.
5605 * configure: Regenerate.
5606 * Makefile.in (XML_TARGET): Remove.
5607 (target.xml): Remove rule.
5608 (clean): Do not clean up target.xml.
5609 (.PRECIOUS): Do not mention target.xml.
5611 * target.h (struct target_ops): Remove arch_string member.
5612 * linux-low.c (linux_arch_string): Remove.
5613 (linux_target_ops): Remove arch_string initializer.
5614 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5615 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5616 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5617 * spu-low.c (spu_arch_string): Remove.
5618 (spu_target_ops): Remove arch_string initializer.
5619 * win32-low.c (win32_arch_string): Remove.
5620 (win32_target_ops): Remove arch_string initializer.
5621 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5622 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5623 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5625 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5627 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5628 by collect_ptrace_register and supply_ptrace_register hooks.
5629 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5630 instead of checking for the_low_target.left_pad_xfer.
5631 (usr_store_inferior_registers): Use collect_ptrace_register callback
5632 instead of checking for the_low_target.left_pad_xfer.
5634 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5635 (s390_supply_ptrace_register): Likewise.
5636 (s390_fill_gregset): Call s390_collect_ptrace_register.
5637 (the_low_target): Update.
5639 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5640 (ppc_supply_ptrace_register): Likewise.
5641 (the_low_target): Update.
5643 * linux-i386-low.c (the_low_target): Update.
5644 * linux-x86-64-low.c (the_low_target): Update.
5646 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5648 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5649 reg-s390.o and reg-s390x.o.
5651 * linux-low.c (new_inferior): New global variable.
5652 (linux_create_inferior, linux_attach): Set it.
5653 (linux_wait_for_process): Call the_low_target.arch_setup after the
5654 target has stopped for the first time.
5655 (initialize_low): Do not call the_low_target.arch_setup.
5657 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5658 (s390_set_pc): Likewise.
5659 (s390_arch_setup): New function.
5660 (the_low_target): Use s390_arch_setup as arch_setup routine.
5662 * regcache.c (realloc_register_cache): New function.
5663 (set_register_cache): Call it for each existing regcache.
5665 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5667 * server.h (init_registers): Remove prototype.
5669 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5670 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5671 instead of init_registers ().
5672 * linux-arm-low.c (init_registers_arm): Add prototype.
5673 (init_registers_arm_with_iwmmxt): Likewise.
5674 (the_low_target): Add initializer for arch_setup field.
5675 * linux-cris-low.c (init_registers_cris): Add prototype.
5676 (the_low_target): Add initializer for arch_setup field.
5677 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5678 (the_low_target): Add initializer for arch_setup field.
5679 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5680 (the_low_target): Add initializer for arch_setup field.
5681 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5682 (the_low_target): Add initializer for arch_setup field.
5683 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5684 (the_low_target): Add initializer for arch_setup field.
5685 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5686 (the_low_target): Add initializer for arch_setup field.
5687 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5688 (init_registers_mips64_linux): Likewise.
5689 (the_low_target): Add initializer for arch_setup field.
5690 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5691 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5692 (the_low_target): Add initializer for arch_setup field.
5693 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5694 (init_registers_powerpc_64): Likewise.
5695 (the_low_target): Add initializer for arch_setup field.
5696 * linux-s390-low.c (init_registers_s390): Add prototype.
5697 (init_registers_s390x): Likewise.
5698 (the_low_target): Add initializer for arch_setup field.
5699 * linux-sh-low.c (init_registers_sh): Add prototype.
5700 (the_low_target): Add initializer for arch_setup field.
5701 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5702 (the_low_target): Add initializer for arch_setup field.
5703 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5704 (the_low_target): Add initializer for arch_setup field.
5706 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5707 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5708 instead of init_registers ().
5709 * win32-arm-low.c (init_registers_arm): Add prototype.
5710 (the_low_target): Add initializer for arch_setup field.
5711 * win32-i386-low.c (init_registers_i386): Add prototype.
5712 (the_low_target): Add initializer for arch_setup field.
5714 * spu-low.c (init_registers_spu): Add prototype.
5715 (initialize_low): Call initialie_registers_spu () instead of
5716 initialize_registers ().
5718 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5720 * server.c (handle_v_requests): When handling the vRun and vAttach
5721 packets, if already debugging a process, don't kill it. Return an
5724 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5726 * server.c (handle_query): Correct length check.
5728 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5730 * win32-low.c (do_initial_child_stuff): Add process handle
5731 parameter. Set current_process_handle and current_process_id from the
5732 parameters. Clear globals.
5733 (win32_create_inferior): Don't set current_process_handle and
5734 current_process_id here. Instead pass them on the call to
5735 do_initial_child_stuff.
5736 (win32_attach): Likewise.
5737 (win32_clear_inferiors): New.
5738 (win32_kill): Don't close the current process handle or the
5739 current thread handle here. Instead call win32_clear_inferiors.
5740 (win32_detach): Don't open a new handle to the process. Call
5741 win32_clear_inferiors.
5742 (win32_join): Don't rely on current_process_handle; open a new
5743 handle using the process id.
5744 (win32_wait): Call win32_clear_inferiors when the inferior process
5747 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5749 * server.c (monitor_show_help): Add "exit".
5751 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5753 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5754 (clean): Add reg-xtensa.c.
5755 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5756 * configure.srv (xtensa*-*-linux*) New target.
5757 * linux-xtensa-low.c: New.
5758 * xtensa-xtregs.c: New.
5760 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5762 * hostio.c: Don't include errno.h.
5763 (errno_to_fileio_errno): Move to hostio-errno.
5764 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5765 error number outputting to the target->hostio_last_error callback.
5766 (hostio_packet_error): Use FILEIO_EINVAL directly.
5767 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5768 calls to hostio_error.
5769 * hostio-errno.c: New.
5770 * server.h (hostio_last_error_from_errno): Declare.
5771 * target.h (target_ops): Add hostio_last_error member.
5772 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5773 as hostio_last_error handler.
5774 * spu-low.c (spu_target_ops): Likewise.
5775 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5776 (wince_hostio_last_error): New functions.
5777 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5778 as hostio_last_error handler.
5779 (win32_target_ops) [!_WIN32_WCE]: Register
5780 hostio_last_error_from_errno as hostio_last_error handler.
5781 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5782 (hostio-errno.o): New rule.
5783 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5784 * configure.srv (srv_hostio_err_objs): New variable. Default to
5786 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5787 * configure: Regenerate.
5789 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5791 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5792 (linux_kill, linux_detach): Clean up the process list.
5793 * remote-utils.c (remote_open): Improve port number parsing.
5794 (putpkt_binary, input_interrupt): Only send interrupts if the target
5796 * server.c (extended_protocol): Make static.
5797 (attached): Define earlier.
5798 (exit_requested, response_needed, program_argv): New variables.
5799 (target_running): New.
5800 (start_inferior): Clear attached here.
5801 (attach_inferior): Set attached here.
5802 (require_running): Define.
5803 (handle_query): Use require_running and target_running. Implement
5805 (handle_v_attach, handle_v_run): New.
5806 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5807 (gdbserver_usage): Update.
5808 (main): Redo argument parsing. Handle --debug and --multi. Handle
5809 --attach along with other options or after the port. Save
5810 program_argv. Support no initial program. Resynchronize
5811 communication with GDB after an error. Handle "monitor exit".
5812 Use require_running and target_running. Always allow the extended
5813 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5814 restart in extended mode.
5815 * README: Refer to the GDB manual. Update --attach usage.
5817 2007-12-20 Andreas Schwab <schwab@suse.de>
5819 * linux-low.c (STACK_SIZE): Define.
5820 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5821 (linux_test_for_tracefork): Likewise.
5823 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5825 * linux-low.c (linux_wait_for_event): Update messages. Do not
5826 reinsert auto-delete breakpoints.
5827 * mem-break.c (struct breakpoint): Change return type of handler to
5829 (set_breakpoint_at): Update handler type.
5830 (reinsert_breakpoint_handler): Return 1 instead of calling
5832 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5834 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5835 * mem-break.h (set_breakpoint_at): Update handler type.
5836 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5837 * win32-low.c (auto_delete_breakpoint): New.
5838 (get_child_debug_event): Use it.
5840 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5842 * configure.ac: Check for pread and pwrite.
5843 * hostio.c (handle_pread): Fall back to lseek and read.
5844 (handle_pwrite): Fall back to lseek and write.
5845 * config.in, configure: Regenerated.
5847 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5849 * server.c (myresume): Add own_buf argument.
5850 (main): Update calls.
5852 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5854 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5855 * remote-utils.c (remote_open): Do not call disable_async_io.
5856 (block_async_io): Delete.
5857 (unblock_async_io): Make static.
5858 (initialize_async_io): New.
5859 * server.c (handle_v_cont): Handle async I/O here.
5860 (myresume): Likewise. Move other common resume tasks here...
5861 (main): ... from here. Call initialize_async_io. Disable async
5862 I/O before the main loop.
5863 * server.h (initialize_async_io): Declare.
5864 (block_async_io, unblock_async_io): Delete prototypes.
5865 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5867 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5869 * remote-utils.c (readchar): Allow binary data in received messages.
5871 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5873 * win32-low.c (attaching): New global.
5874 (win32_create_inferior): Clear the `attaching' global.
5875 (win32_attach): Set the `attaching' global.
5876 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5877 attaching. Only set a breakpoint at the entry point if not
5880 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5882 * server.c (main): Don't report dll events on the initial
5883 connection on attaches.
5885 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5887 * server.c (main): Relax numerical bases supported for the pid of
5888 the --attach command line argument.
5890 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5892 * win32-low.c (win32_attach): Call OpenProcess before
5893 DebugActiveProcess, not after. Add last error output to error
5896 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5898 * win32-low.c (win32_get_thread_context)
5899 (win32_set_thread_context): New functions.
5900 (thread_rec): Use win32_get_thread_context.
5901 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5902 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5905 2007-12-03 Leo Zayas
5906 Pedro Alves <pedro_alves@portugalmail.pt>
5908 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5910 (child_add_thread): Minor cleanup.
5911 (child_continue): Resume artificially suspended threads before
5912 calling ContinueDebugEvent.
5913 (suspend_one_thread): New.
5914 (fake_breakpoint_event): New.
5915 (get_child_debug_event): Change return type to int. Check here if
5916 gdb sent an interrupt request. If a soft interrupt was requested,
5917 fake a breakpoint event. Return 0 if there is no event to handle,
5919 (win32_wait): Don't check here if gdb sent an interrupt request.
5920 Ensure there is a valid event to handle.
5921 (win32_request_interrupt): Add soft interruption method as last
5924 2007-12-03 Leo Zayas
5925 Pedro Alves <pedro_alves@portugalmail.pt>
5927 * win32-low.h (win32_thread_info): Add descriptions to the
5928 structure members. Replace `suspend_count' counter by a
5930 * win32-low.c (thread_rec): Update condition of when to get the
5931 context from the inferior. Rely on ContextFlags being set if it
5932 has already been retrieved. Only suspend the inferior thread if
5933 we haven't already. Warn if that fails.
5934 (continue_one_thread): s/suspend_count/suspended/. Only call
5935 ResumeThread once. Warn if that fails.
5937 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5939 * win32-low.c (win32_wait): Don't read from the inferior when it
5942 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5944 * Makefile.in (win32_low_h): New variable.
5945 (win32-low.o): Add dependency on $(win32_low_h).
5946 (win32-arm-low.o, win32-i386-low.o): New rules.
5948 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5950 * hostio.c: Correct copyright year.
5952 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5954 * Makefile.in (OBS): Add hostio.o.
5955 (hostio.o): New rule.
5956 * server.h (handle_vFile): Declare.
5957 * hostio.c: New file.
5958 * server.c (handle_v_requests): Take packet_len and new_packet_len
5959 for binary packets. Call handle_vFile.
5960 (main): Update call to handle_v_requests.
5962 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5964 * linux-low.c: Include <sched.h>.
5966 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5968 * linux-low.c (linux_tracefork_grandchild): New.
5969 (linux_tracefork_child): Use clone.
5970 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5972 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5974 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5976 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5978 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5980 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5982 * inferiors.c (change_inferior_id): Delete.
5983 (add_pid_to_list, pull_pid_from_list): New.
5984 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5985 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5986 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5987 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5988 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5989 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5990 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5991 (using_threads): Always set to 1.
5992 (handle_extended_wait): New.
5993 (add_process): Do not set TID.
5994 (linux_create_inferior): Set must_set_ptrace_flags.
5995 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5996 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5997 (linux_thread_alive): Rename TID argument to LWPID.
5998 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5999 (linux_wait_for_event): Do not use TID or check using_threads. Update
6000 call to dead_thread_notify. Call handle_extended_wait.
6001 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6002 (send_sigstop): Delete sigstop_sent.
6003 (wait_for_sigstop): Avoid TID.
6004 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6005 (linux_test_for_tracefork): New.
6006 (linux_lookup_signals): Use thread_db_active and
6007 linux_supports_tracefork_flag.
6008 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6009 * linux-low.h (get_process_thread): Avoid TID.
6010 (struct process_ifo): Move thread_known and tid to the end. Remove
6012 (linux_attach_lwp, thread_db_init): Update prototypes.
6013 * server.h (change_inferior_id): Delete prototype.
6014 (add_pid_to_list, pull_pid_from_list): New prototypes.
6015 * thread-db.c (thread_db_use_events): New.
6016 (find_first_thread): Rename to...
6017 (find_one_thread): ...this. Update callers and messages. Do not
6018 call fatal. Check thread_db_use_events. Do not call
6019 change_inferior_id or new_thread_notify.
6020 (maybe_attach_thread): Update. Do not call new_thread_notify.
6021 (thread_db_init): Set thread_db_use_events. Check use_events.
6022 * utils.c (fatal, warning): Correct message prefix.
6024 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6026 * Makefile.in (clean): Remove new files.
6027 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6028 (powerpc-64.o, powerpc-64.c): New rules.
6029 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6030 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6032 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6034 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6035 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6036 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6037 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6038 (target_regsets): Add AltiVec and SPE register sets.
6039 * configure.ac: Check for AltiVec and SPE.
6040 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6041 (ppc_fill_vrregset, ppc_store_vrregset): New.
6042 (target_regsets): Add AltiVec register set.
6043 * configure: Regenerated.
6045 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6047 * linux-low.c (O_LARGEFILE): Define.
6048 (linux_read_memory): Use /proc/PID/mem.
6049 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6050 * configure, config.in: Regenerated.
6052 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6054 * linux-low.c (linux_wait_for_event): Do not pass signals while
6057 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6059 * win32-low.c (create_process): New.
6060 (win32_create_inferior): Use create_process instead of
6061 CreateProcess. If create_process failed retry appending an ".exe"
6062 suffix. Store the GetLastError result immediatelly after
6063 create_process calls and use it on the call to error.
6065 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6067 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6069 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6071 * configure.ac: Switch license to GPLv3.
6073 2007-08-01 Michael Snyder <msnyder@access-company.com>
6075 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6077 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6079 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6081 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6082 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6083 CloseToolhelp32Snapshot.
6084 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6085 CloseToolhelp32Snapshot.
6087 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6089 * server.c (main): Check for inferior exit before main loop.
6091 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6093 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6094 instead of on tmp_desc.
6096 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6097 Daniel Jacobowitz <dan@codesourcery.com>
6099 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6100 (add_thread): Minor cleanups.
6101 (clear_inferiors): Move lower in the file. Clear the DLL
6103 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6104 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6105 (xml_escape_text): New.
6106 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6108 (handle_v_cont): Report errors.
6109 (gdbserver_version): Update.
6110 (main): Correct size of own_buf. Do not report initial DLL events.
6111 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6112 (unloaded_dll, xml_escape_text): New.
6113 * win32-low.c (enum target_waitkind): Update comments.
6114 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6115 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6116 (win32_EnumProcessModules, win32_GetModuleInformation)
6117 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6118 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6119 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6120 (win32_Module32First, win32_Module32Next, load_toolhelp)
6121 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6122 (get_child_debug_event): Handle DLL events.
6123 (win32_wait): Likewise.
6125 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6127 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6128 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6130 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6132 * win32-low.c (handle_output_debug_string): Ignore event if not
6135 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6137 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6139 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6141 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6143 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6145 * inferiors.c (change_inferior_id): Add comment.
6146 * linux-low.c (check_removed_breakpoint): Add an early
6147 prototype. Improve debug output.
6148 (linux_attach): Doc update.
6149 (linux_detach_one_process, linux_detach): Clean up before releasing
6151 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6152 * linux-low.h (struct process_info): Doc improvement.
6153 * mem-break.c (delete_all_breakpoints): New.
6154 * mem-break.h (delete_all_breakpoints): New prototype.
6155 * thread-db.c (find_first_thread): New.
6156 (thread_db_create_event): Call it instead of
6157 thread_db_find_new_threads. Clean up unused variables.
6158 (maybe_attach_thread): Remove first thread handling.
6159 (thread_db_find_new_threads): Use find_first_thread.
6160 (thread_db_get_tls_address): Likewise.
6162 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6164 * thread-db.c (thread_db_find_new_threads): Add prototype.
6165 (thread_db_create_event): Check for the main thread before adding
6167 (maybe_attach_thread): Only enable event reporting if TID == 0.
6168 (thread_db_get_tls_address): Check for new threads.
6170 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6172 * linux-low.c (linux_create_inferior): Try execv before execvp.
6173 * spu-low.c (spu_create_inferior): Likewise.
6175 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6177 * linux-low.c (linux_create_inferior): Change execv to execvp.
6178 * spu-low.c (spu_create_inferior): Likewies.
6180 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6182 * Makefile.in (clean): Clean new files instead of deleted ones.
6183 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6184 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6186 * configure.srv: Specify XML files and new regformats for MIPS and
6188 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6189 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6190 an entry for the restart register.
6191 (mips_cannot_fetch_register, mips_cannot_store_register)
6192 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6193 register names to match the XML descriptions.
6194 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6195 restart register instead of $0.
6197 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6198 Markus Deuling <deuling@de.ibm.com>
6200 * remote-utils.c (decode_xfer_write): New function.
6201 * server.h (decode_xfer_write): Add prototype.
6202 * server.c (handle_query): Add PACKET_LEN argument. Support
6203 qXfer:spu:read and qXfer:spu:write packets.
6204 (main): Pass packet_len to handle_query.
6205 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6206 * target.h (target_ops): Add qxfer_spu.
6208 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6210 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6211 accessing non-seekable spufs files.
6213 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6215 * server.c (handle_query): Add reply for qC packet.
6217 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6218 Leo Zayas <lerele@champenstudios@com>
6220 * server.h (check_remote_input_interrupt_request): New function.
6221 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6222 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6223 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6224 (check_remote_input_interrupt_request): New function.
6225 * server.h (check_remote_input_interrupt_request): Declare.
6226 * win32-low.c (winapi_DebugBreakProcess,
6227 winapi_GenerateConsoleCtrlEvent): New typedefs.
6228 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6230 (win32_wait): Check for remote interrupt request
6231 with check_remote_input_interrupt_request.
6232 (win32_request_interrupt): New function.
6233 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6235 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6237 * win32-low.c (debug_registers_changed,
6238 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6239 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6240 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6241 (thread_rec): Get context using the low target.
6242 (child_add_thread): Call thread_added on the low target,
6243 which does the same thing.
6245 (do_initial_child_stuff): Remove debug registers references.
6246 Set context using the low target. Resume threads after
6247 setting the contexts.
6248 (child_continue): Remove dead variable. Remove debug
6249 registers references.
6250 (child_fetch_inferior_registers): Go through the low target.
6251 (do_child_store_inferior_registers): Remove.
6252 (child_store_inferior_registers): Go through the low target.
6253 (win32_resume): Remove debug registers references.
6254 Set context using the low target.
6255 (handle_exception): Change return type to void. Don't record
6256 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6257 first chance exception.
6258 (get_child_debug_event): Change return type to void. Remove
6259 goto loop. Always return after waiting for debug event.
6260 (win32_wait): Convert to switch statement. Handle spurious
6263 * win32-i386-low.c (debug_registers_changed,
6264 debug_registers_used): New.
6265 (initial_stuff): Rename to ...
6266 (i386_initial_stuff): ... this. Clear debug registers
6268 (store_debug_registers): Delete.
6269 (i386_get_thread_context): New.
6270 (load_debug_registers): Delete.
6271 (i386_set_thread_context): New.
6272 (i386_thread_added): New.
6273 (single_step): Rename to ...
6274 (i386_single_step): ... this.
6275 (do_fetch_inferior_registers): Rename to ...
6276 (i386_fetch_inferior_register): ... this.
6277 (i386_store_inferior_register): New.
6278 (the_low_target): Adapt to new interface.
6280 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6281 (arm_get_thread_context): New.
6282 (arm_set_thread_context): New.
6284 (do_fetch_inferior_registers): Rename to ...
6285 (arm_fetch_inferior_register): ... this.
6286 (arm_store_inferior_register): New.
6287 (arm_wince_breakpoint): Reimplement as unsigned long.
6288 (arm_wince_breakpoint_len): Define.
6289 (the_low_target): Adapt to new interface.
6291 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6292 load_debug_registers. Add get_thread_context, set_thread_context,
6293 thread_added and store_inferior_register. Rename
6294 fetch_inferior_registers to fetch_inferior_register.
6295 (regptr): Remove declaration.
6297 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6299 * linux-low.c (linux_detach): Change return type to int. Return 0.
6300 * spu-low.c (spu_detach): Likewise.
6302 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6304 * target.h (target_ops): Change return type of detach to int.
6306 (join_inferior): New.
6307 * server.c (main): Don't skip detach support on mingw32.
6308 If the inferior doesn't support detaching return error.
6309 Call join_inferior instead of using waitpid.
6310 * linux-low.c (linux_join): New.
6311 (linux_target_op): Add linux_join.
6312 * spu-low.c (spu_join): New.
6313 (spu_target_ops): Add spu_join.
6314 * win32-low.c (win32_detach): Adapt to new interface.
6315 Reopen current_process_handle before detaching. Issue a child
6316 resume before detaching.
6318 (win32_target_op): Add win32_join.
6320 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6322 * win32-low.c (win32-attach): Fix return value.
6323 * target.h (target_ops): Describe ATTACH return values.
6325 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6327 * win32-low.c (GETPROCADDRESS): Define.
6328 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6329 (winapi_DebugSetProcessKillOnExit): Likewise.
6330 (win32_create_inferior): Force usage of ansi CreateProcessA.
6331 (win32_attach): Use GETPROCADDRESS.
6332 (win32_detach): Likewise.
6334 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6336 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6338 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6340 * win32-low.c: Commit leftover changes from 2007-03-29.
6342 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6344 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6345 fields short instead of int. Add explicit padding.
6346 (i387_cache_to_fsave): Remove unnecessary casts.
6347 (i387_fsave_to_cache): Doc fix.
6348 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6350 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6352 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6353 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6355 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6357 * configure.srv (arm*-*-mingw32ce*): Move near the other
6360 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6362 * configure.ac: Add errno checking.
6363 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6364 sys/file.h and malloc.h.
6365 (AC_CHECK_DECLS): Add perror.
6366 (srv_mingwce): Handle.
6367 * configure.srv (i[34567]86-*-cygwin*): Add
6368 win32-i386-low.o to srv_tgtobj.
6369 (i[34567]86-*-mingw*): Likewise.
6370 (arm*-*-mingw32ce*): Add case.
6371 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6372 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6373 [__MINGW32CE__] (strerror): New function.
6374 [__MINGW32CE__] (errno): Define to GetLastError.
6375 [__MINGW32CE__] (COUNTOF): New macro.
6376 (remote_open): Remove extra close call.
6377 * mem-break.c (delete_breakpoint_at): New function.
6378 * mem-break.h (delete_breakpoint_at): Declare.
6379 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6380 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6381 [USE_WIN32API] (read, write): Add char* casts.
6382 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6383 * server.h: Include wincecompat.h on Windows CE.
6384 [HAVE_ERRNO_H]: Check.
6385 (perror): Declare if not declared.
6386 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6387 (perror_with_name): Remove errno declaration.
6388 * wincecompat.h: New.
6389 * wincecompat.c: New.
6391 * win32-arm-low.c: New.
6392 * win32-i386-low.c: New.
6393 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6394 (OUTMSG2): Make it safe.
6396 (COUNTOF): New macro.
6397 (NUM_REGS): Get it from the low target.
6398 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6399 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6400 (thread_rec): Let low target handle debug registers.
6401 (child_add_thread): Likewise.
6402 (child_init_thread_list): Likewise.
6403 (continue_one_thread): Likewise.
6405 (do_child_fetch_inferior_registers): Move to ...
6406 * win32-i386-low.c: ... here, and rename to ...
6407 (do_fetch_inferior_registers): ... this.
6408 * win32-low.c (child_fetch_inferior_registers):
6409 Go through the low target.
6410 (do_child_store_inferior_registers): Use regptr.
6411 (strwinerror): New function.
6412 (win32_create_inferior): Handle Windows CE.
6413 Use strwinerror instead of strerror on Windows error
6414 codes. Add program to the error output.
6415 Don't close the main thread handle on Windows CE.
6416 (win32_attach): Use coredll.dll on Windows CE.
6417 (win32_kill): Close current process and current
6419 (win32_detach): Use coredll.dll on Windows CE.
6420 (win32_resume): Let low target handle debug registers, and
6422 (handle_exception): Add/Remove initial breakpoint. Avoid
6423 non-existant WSTOPSIG on Windows CE.
6424 (win32_read_inferior_memory): Cast to remove warning.
6425 (win32_arch_string): Go through the low target.
6426 (initialize_low): Call set_breakpoint_data with the low
6427 target's breakpoint.
6428 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6429 FOP_REGNUM, mappings): Move to ...
6430 * win32-i386-low.c: ... here.
6431 * win32-low.c (win32_thread_info): Move to ...
6432 * win32-low.h: ... here.
6433 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6434 win32-arm-low.c and wincecompat.c.
6435 (all:): Add $EXEEXT.
6436 (install-only:): Likewise.
6437 (gdbserver:): Likewise.
6438 (gdbreplay:): Likewise.
6439 * config.in: Regenerate.
6440 * configure: Regenerate.
6442 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6444 * win32-low.c: Rename typedef thread_info to
6445 win32_thread_info throughout.
6447 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6449 * win32-i386-low.c: Rename to ...
6450 * win32-low.c: ... this.
6451 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6452 * Makefile.in: Likewise.
6454 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6456 * remote-utils.c (monitor_output): Constify msg parameter.
6457 * server.h (monitor_output): Likewise.
6458 * win32-i386-low.c (handle_output_debug_string): New.
6459 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6460 handle_output_debug_string.
6461 (get_child_debug_event): Likewise.
6463 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6465 * server.c (main): Correct strtoul check.
6467 2007-03-27 Jon Ringle <jon@ringle.org>
6469 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6471 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6473 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6475 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6477 * terminal.h: Check HAVE_SGTTY_H.
6479 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6481 * remote-utils.c (remote_open): Print out the assigned port number.
6483 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6485 * remote-utils.c (monitor_output): New function.
6486 * server.c (debug_threads): Define here.
6487 (monitor_show_help): New function.
6488 (handle_query): Handle qRcmd.
6489 (main): Do not handle 'd' packet.
6490 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6491 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6494 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6496 * Makefile.in (EXEEXT): New.
6497 (clean): Use $(EXEEXT).
6499 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6501 * target.h (target_ops): Rename send_signal to request_interrupt,
6502 and remove enum target_signal parameter.
6503 * linux-low.c (linux_request_interrupt): Rename from
6504 linux_send_signal, and always send SIGINT.
6505 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6506 and always send SIGINT.
6507 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6509 (input_interrupt): Likewise.
6511 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6513 * server.c (get_features_xml): Check if target implemented
6515 * win32-i386-low.c (win32_arch_string): New.
6516 (win32_target_ops): Add win32_arch_string as arch_string member.
6518 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6520 * spu-low.c (spu_arch_string): New.
6521 (spu_target_ops): Add spu_arch_string.
6523 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6525 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6526 * configure.ac: Do not check for terminal.h.
6527 * configure, config.in: Regenerated.
6529 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6531 * Makefile.in (OBS): Add $(XML_BUILTIN).
6532 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6534 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6535 (arm-with-iwmmxt.c): New.
6536 * config.in, configure: Regenerate.
6537 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6538 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6539 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6540 (arm*-*-linux*): Add iWMMXt and regset support.
6541 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6542 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6543 (arm_store_wmmxregset, target_regsets): New.
6544 * server.c (get_features_xml): Take annex argument. Check builtin
6546 (handle_query): Handle multiple annexes.
6548 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6550 * remote-utils.c [USE_WIN32API] (read, write): Define.
6551 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6554 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6556 * linux-i386-low.c (the_low_target): Set arch_string.
6557 * linux-x86-64-low.c (the_low_target): Likewise.
6558 * linux-low.c (linux_arch_string): New.
6559 (linux_target_ops): Add it.
6560 * linux-low.h (struct linux_target_ops): Add arch_string.
6561 * server.c (write_qxfer_response): Use const void * for DATA.
6562 (get_features_xml): New.
6563 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6564 * target.h (struct target_ops): Add arch_string method.
6566 2007-01-03 Denis Pilat <denis.pilat@st.com>
6567 Daniel Jacobowitz <dan@codesourcery.com>
6569 * linux-low.c (linux_kill): Handle being called with no threads.
6570 * win32-i386-low.c (win32_kill): Likewise.
6571 (get_child_debug_event): Clear current_process_handle.
6573 2006-12-30 Denis PILAT <denis.pilat@st.com>
6574 Daniel Jacobowitz <dan@codesourcery.com>
6576 * remote-utils.c (remote_open): Check the type of specified
6577 serial port devices before opening them.
6578 * server.c (main): Kill the inferior if an error occurs during
6579 the first remote_open.
6581 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6583 * README: Update supported targets.
6585 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6587 * Makefile.in (clean): Remove reg-mips64.c.
6588 (reg-mips64.c, reg-mips64.o): New rules.
6589 * configure.srv: Handle mips64. Include regset support for mips.
6590 * linux-mips-low.c (union mips_register): New.
6591 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6592 (mips_breakpoint, mips_breakpoint_at): Use int.
6593 (mips_collect_register, mips_supply_register)
6594 (mips_collect_register_32bit, mips_supply_register_32bit)
6595 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6596 (mips_store_fpregset, target_regsets): New.
6597 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6599 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6601 * configure.srv: Add target "spu*-*-*".
6602 * Makefile.in (clean): Remove reg-spu.c.
6603 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6604 * spu-low.c: New file.
6606 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6608 * configure.ac: Correct td_thr_tls_get_addr test.
6609 * configure: Regenerated.
6611 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6613 * linux-low.c (linux_wait_for_event): Reformat. Use the
6615 * remote-utils.c (decode_address_to_semicolon): New.
6616 * server.c (pass_signals, handle_general_set): New.
6617 (handle_query): Mention QPassSignals for qSupported.
6618 (main): Call handle_general_set.
6619 * server.h (pass_signals, decode_address_to_semicolon): New.
6621 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6623 * server.c (handle_query): Correct error handling for read_auxv.
6625 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6627 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6628 and srv_linux_thread_db to yes.
6629 * linux-s390-low.c (s390_fill_gregset): New function.
6630 (target_regsets): Define data structure.
6632 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6634 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6635 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6636 * config.in, configure: Regenerated.
6637 * inferiors.c (gdb_id_to_thread): New function.
6638 (gdb_id_to_thread_id): Use it.
6639 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6640 * linux-low.h (struct process_info): Add th member.
6641 (thread_db_get_tls_address): New prototype.
6642 * remote-utils.c (decode_address): Make non-static.
6643 * server.c (handle_query): Handle qGetTLSAddr.
6644 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6645 * target.h (struct target_ops): Add get_tls_address.
6646 * thread-db.c (maybe_attach_thread): Save the thread handle.
6647 (thread_db_get_tls_address): New.
6649 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6651 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6652 (linux_resume_one_process): Take a siginfo_t *. Update all
6653 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6654 (struct pending_signals): Add a siginfo_t.
6655 (linux_wait_for_process): Always set last_status.
6656 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6657 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6658 * linux-low.h (struct process_info): Add last_status.
6660 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6662 * remote-utils.c (try_rle): New function.
6663 (putpkt_binary): Use it.
6665 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6667 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6668 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6669 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6670 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6671 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6674 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6676 * server.c (terminal_fd): New variable.
6677 (old_foreground_pgrp): Likewise.
6678 (restore_old_foreground_pgrp): New function.
6679 (start_inferior): Record the terminal file descriptor in terminal_fd
6680 and its original foreground group in old_foreground_pgrp. Register
6681 restore_old_foreground_pgrp with atexit().
6683 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6685 * server.c (handle_query): Correct qPart to qXfer.
6687 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6689 * configure.ac: Check for more headers which are missing on
6690 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6691 * configure.srv: Add Cygwin and mingw32.
6692 * remote-utils.c: Don't include headers unconditionally which
6693 are missing on mingw32. Include <winsock.h> for mingw32.
6694 (remote_open): Adjust for mingw32 support. Flush
6695 standard error after writing to it.
6696 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6697 (unblock_async_io, enable_async_io, disable_async_io)
6698 (readchar, getpkt): Update for Winsock support.
6699 (prepare_resume_reply): Expect a protocol signal number.
6700 * server.c: Disable <sys/wait.h> on mingw32.
6701 (start_inferior): Adjust for mingw32 support. Flush
6702 standard error after writing to it.
6703 (attach_inferior): Likewise. Use protocol signal
6705 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6707 * win32-i386-low.c: New file.
6708 * Makefile.in (XM_CLIBS): Set.
6709 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6710 (win32-i386-low.o): New dependency rule.
6711 * linux-low.c (linux_wait): Use target signal numbers.
6712 * target.h (struct target_ops): Doc fix.
6713 * server.h (target_signal_to_name): New prototype.
6714 * gdbreplay.c: Don't include headers unconditionally which
6715 are missing on mingw32. Include <winsock.h> for mingw32.
6716 (remote_close, remote_open): Adjust for Winsock support.
6717 * configure, config.in: Regenerated.
6719 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6721 * server.c (decode_xfer_read, write_qxfer_response): New.
6722 (handle_query): Take a packet length argument. Handle
6723 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6724 the qSupported response.
6725 (main): Update call to handle_query.
6727 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6729 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6730 (putpkt_binary): Renamed from putpkt and adjusted for binary
6732 (putpkt): New wrapper for putpkt_binary.
6733 (readchar): Don't mask off the high bit.
6734 (decode_X_packet): New function.
6735 * server.c (main): Call putpkt_binary if a handler sets the packet
6736 length. Save the length of the incoming packet. Handle 'X'.
6737 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6739 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6741 * server.c (handle_query): Handle qSupported.
6743 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6745 * remote-utils.c (all_symbols_looked_up): New variable.
6746 (look_up_one_symbol): Check it.
6747 * server.h (look_up_one_symbol): New declaration.
6748 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6750 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6752 * Makefile.in (linux-arm-low.o): Update dependencies.
6753 * linux-arm-low.c: Include "gdb_proc_service.h".
6754 (PTRACE_GET_THREAD_AREA): Define.
6755 (ps_get_thread_area): New function.
6757 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6759 * configure.srv (m68k*-*-uclinux*): New target.
6760 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6761 (linux_resume_one_process): Remove extraneous cast.
6762 (linux_read_offsets): New.
6763 (linux_target_op): Add linux_read_offsets on mmuless systems.
6764 * server.c (handle_query): Add qOffsets logic.
6765 * target.h (struct target_ops): Add read_offsets.
6767 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6769 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6770 (PTRACE_GET_THREAD_AREA): Define.
6771 (ps_get_thread_area): New function.
6772 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6773 (linux-x86-64-low.o): Update.
6775 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6777 * configure.ac: Remove checks for prfpregset_t.
6778 * gdb_proc_service.h: New file.
6779 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6780 new "gdb_proc_service.h".
6781 * proc-service.c: Likewise.
6782 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6783 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6784 * Makefile.in (gdb_proc_service_h): Updated.
6785 * configure, config.in: Regenerated.
6787 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6789 * remote-utils.c (prepare_resume_reply): Move declaration
6790 of gdb_id_from_wait to the top of the block.
6792 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6794 * linux-low.c (regsets_store_inferior_registers): Read the regset
6795 from the target before filling it.
6797 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6799 * server.c (attach_inferior): Return SIGTRAP for a successful
6802 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6804 * Makefile.in (OBS): Add version.o.
6805 (STAGESTUFF): Delete.
6806 (version.o): Add dependencies.
6807 (version.c): Replace rule.
6808 (clean): Remove version.c.
6809 * server.c (gdbserver_version): New.
6810 (gdbserver_usage): Use printf.
6811 (main): Handle --version and --help.
6812 * server.h (version, host_name): Add declarations.
6814 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6826 * linux-x86-64-low.c:
6829 * linux-ppc64-low.c:
6838 * linux-crisv32-low.c:
6850 * gdbserver.1: Add (C) after Copyright. Update the FSF
6853 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6855 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6856 (arm_breakpoint_at): Recognize both breakpoints.
6857 (the_low_target): Use the correct breakpoint instruction.
6859 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6861 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6862 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6863 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6864 (the_low_target): Update.
6866 2005-10-25 Andreas Schwab <schwab@suse.de>
6868 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6870 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6871 (ia64_num_regs): Reduce to 462.
6873 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6875 * acinclude.m4: Correct quoting.
6876 * aclocal.m4: Regenerated.
6878 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6879 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6880 (thread_db_init): Call thread_db_err_str.
6881 * configure.ac: Check for TD_VERSION.
6882 * config.in, configure: Regenerated.
6884 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6886 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6888 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6890 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6891 is not available. Define HAVE_PTRACE_GETREGS if it is.
6892 * config.in, configure: Regenerated.
6893 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6894 * linux-i386-low.c, linux-m68k-low.c: Update to use
6895 HAVE_PTRACE_GETREGS.
6896 * linux-low.c (regsets_fetch_inferior_registers)
6897 (regsets_store_inferior_registers): Only return 0 if we processed
6899 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6900 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6902 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6904 * inferiors.c (struct thread_info): Add gdb_id.
6905 (add_thread): Add gdb_id argument.
6906 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6907 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6908 calls to add_thread.
6909 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6910 * server.c (handle_query): Use thread_to_gdb_id.
6911 (handle_v_cont, main): Use gdb_id_to_thread_id.
6912 * server.h (add_thread): Update prototype.
6913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6916 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6918 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6919 left-padded registers.
6920 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6921 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6923 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6925 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6926 * configure: Regenerate.
6927 * config.in: Regenerate.
6928 * server.h (NEED_DECLARATION_STRERROR):
6929 Replace with !HAVE_DECL_STRERROR.
6931 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6933 * linux-low.c (linux_wait, linux_send_signal): Don't test
6934 an unsigned long variable for > 0 if it could be MAX_ULONG.
6935 * server.c (myresume): Likewise.
6936 * target.c (set_desired_inferior): Likewise.
6938 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6940 * configure.ac: Simplify and improve check for socklen_t.
6941 * configure, config.in: Regenerate.
6943 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6945 * acconfig.h: Remove.
6946 * configure.ac: Add a test for socklen_t. Use three-argument
6947 AC_DEFINE throughout.
6948 * config.in: Regenerated using autoheader 2.59.
6949 * configure: Regenerated.
6951 * gdbreplay.c (socklen_t): Provide a default.
6952 (remote_open): Use socklen_t.
6953 * remote-utils.c (socklen_t): Provide a default.
6954 (remote_open): Use socklen_t.
6955 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6958 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6960 * linux-low.c (linux_read_memory, linux_write_memory)
6961 (linux_read_auxv): Likewise.
6962 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6963 (check_mem_write): Likewise.
6964 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6966 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6967 (registers_from_string, register_data): Likewise.
6968 * server.c (handle_query, main): Likewise.
6969 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6970 (decode_M_packet): Likewise.
6971 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6972 * target.h (struct target_ops): Update read_memory, write_memory,
6974 (read_inferior_memory, write_inferior_memory): Update.
6975 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6977 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6978 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6979 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6980 linux-s390-low.c, linux-sh-low.c: Update for changes in
6981 read_inferior_memory and the_low_target->breakpoint.
6983 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6985 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6986 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6987 * configure.srv: Add powerpc64-*-linux*.
6988 * linux-ppc64-low.c: New file.
6990 2005-05-23 Orjan Friberg <orjanf@axis.com>
6992 * linux-cris-low.c: New file with support for CRIS.
6993 * linux-crisv32-low.c: Ditto for CRISv32.
6994 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6995 (clean): Add reg-cris.c and reg-crisv32.c.
6996 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6997 reg-crisv32.o, and reg-crisv32.c to make rules.
6998 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7001 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7003 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7004 of sizeof (PTRACE_XFER_TYPE).
7005 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7007 2005-05-12 Orjan Friberg <orjanf@axis.com>
7009 * target.h (struct target_ops): Add insert_watchpoint,
7010 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7011 pointers for hardware watchpoint support.
7012 * linux-low.h (struct linux_target_ops): Ditto.
7013 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7014 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7015 to linux_target_ops.
7016 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7018 * server.c (main): Recognize 'Z' and 'z' packets.
7020 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7022 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7023 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7024 (the_low_target): Add new members.
7026 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7028 * proc-service.c (ps_lgetregs): Search all_processes instead of
7031 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7033 * server.c (start_inferior): Change return type to int.
7034 (attach_inferior): Change sigptr to int *.
7035 (handle_v_cont, handle_v_requests): Change signal to int *.
7036 (main): Change signal to int.
7038 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7040 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7041 * configure.srv: Add m32r*-*-linux*.
7042 * linux-m32r-low.c: New file.
7044 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7046 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7048 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7050 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7051 Take unsigned long arguments for PIDs.
7052 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7053 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7054 (wait_for_sigstop, linux_resume_one_process)
7055 (regsets_fetch_inferior_registers, linux_send_signal)
7056 (linux_read_auxv): Likewise. Update the types of variables holding
7057 PIDs. Update format string specifiers.
7058 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7059 * remote-utils.c (prepare_resume_reply): Likewise.
7060 * server.c (cont_thread, general_thread, step_thread)
7061 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7063 (handle_query): Update format specifiers.
7064 (handle_v_cont, main): Use strtoul for thread IDs.
7065 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7066 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7067 (general_thread, step_thread, thread_from_wait)
7068 (old_thread_from_wait): Update.
7069 * target.h (struct thread_resume): Use unsigned long for THREAD.
7070 (struct target_ops): Use unsigned long for arguments to attach and
7073 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7075 * acinclude.m4: Include bfd/bfd.m4 directly.
7076 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7077 <agriffis@toolchain.org>.
7078 * aclocal.m4, configure: Regenerated.
7080 2005-01-07 Andrew Cagney <cagney@gnu.org>
7082 * configure.ac: Rename configure.in, require autoconf 2.59.
7083 * configure: Re-generate.
7085 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7087 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7089 * aclocal.m4: Regenerated.
7090 * configure: Regenerated.
7092 2004-11-21 Andreas Schwab <schwab@suse.de>
7094 * linux-m68k-low.c (m68k_num_gregs): Define.
7095 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7096 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7097 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7098 (m68k_breakpoint_at): New. Add to the_low_target.
7100 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7101 srv_linux_thread_db to yes.
7103 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7105 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7106 (ARCH_SET_FS): Likewise.
7107 (ARCH_GET_FS): Likewise.
7108 (ARCH_GET_GS): Likewise.
7110 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7112 * linux-i386-low.c (ps_get_thread_area): New.
7113 * linux-x86-64-low.c (ps_get_thread_area): New.
7114 * linux-low.c: Include <sys/syscall.h>.
7115 (linux_kill_one_process): Don't kill the first thread here.
7116 (linux_kill): Kill the first thread here.
7117 (kill_lwp): New function.
7118 (send_sigstop, linux_send_signal): Use it.
7119 * proc-service.c: Clean up #ifdefs.
7120 (fpregset_info): Delete.
7121 (ps_lgetregs): Update and enable implementation.
7122 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7124 * remote-utils.c (struct sym_cache, symbol_cache): New.
7125 (input_interrupt): Print a clearer message.
7126 (async_io_enabled): New variable.
7127 (enable_async_io, disable_async_io): Use it. Update comments.
7128 (look_up_one_symbol): Use the symbol cache.
7129 * thread-db.c (thread_db_look_up_symbols): New function.
7130 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7132 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7134 * configure.in: Test for -rdynamic.
7135 * configure: Regenerated.
7136 * Makefile (INTERNAL_LDFLAGS): New.
7137 (gdbserver, gdbreplay): Use it.
7139 2004-09-02 Andrew Cagney <cagney@gnu.org>
7141 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7143 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7145 * linux-low.c (linux_wait): Clear all_processes list also.
7147 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7149 * linux-low.c: Include <errno.h>. Remove extern declaration of
7152 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7154 * gdbreplay.c, server.h, utils.c: Update copyright years.
7156 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7158 * server.c (main): Print child status or termination signal from
7159 variable 'signal', not 'sig'.
7161 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7163 * linux-low.c (linux_read_memory): Change return type to
7164 int. Check for and return error from ptrace().
7165 * target.c (read_inferior_memory): Change return type to int. Pass
7166 back return status from the_target->read_memory().
7167 * target.h (struct target_ops): Adapt *read_memory() prototype.
7169 (read_inferior_memory): Adapt prototype.
7170 * server.c (main): Return an error packet if
7171 read_inferior_memory() returns an error.
7173 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7175 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7176 Unify with other clean targets.
7178 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7180 * server.c (handle_v_cont): Call set_desired_inferior.
7182 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7184 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7186 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7188 * linux-low.c (linux_wait): Unblock async I/O.
7189 (linux_resume): Block and enable async I/O.
7190 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7191 * server.h (block_async_io, unblock_async_io): Add prototypes.
7193 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7195 * remote-utils.c (remote_open): Print a status notice after
7197 * server.c (attach_inferior): Print a status notice after
7200 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7202 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7204 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7206 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7208 * server.c, target.h: Update copyright years.
7210 2004-02-25 Roland McGrath <roland@redhat.com>
7212 * target.h (struct target_ops): New member `read_auxv'.
7213 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7214 * linux-low.c (linux_read_auxv): New function.
7215 (linux_target_ops): Initialize `read_auxv' member to that.
7217 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7219 Committed by Jim Blandy <jimb@redhat.com>.
7221 * linux-s390-low.c (s390_num_regs): Update.
7222 (s390_regmap): Remove control registers. Use __s390x__ predefine
7223 instead of GPR_SIZE to distiguish s390 and s390x targets.
7225 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7227 * linux-low.c: Update copyright year.
7228 (check_removed_breakpoint): Clear pending_is_breakpoint.
7229 (linux_set_resume_request, linux_queue_one_thread)
7230 (resume_status_pending_p): New functions.
7231 (linux_continue_one_thread): Use process->resume.
7232 (linux_resume): Only resume threads if there are no pending events.
7233 * linux-low.h (struct process_info): Add resume request
7236 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7238 * regcache.c (new_register_cache): Clear the allocated register
7239 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7241 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
7243 * linux-low.c (linux_resume): Take a struct thread_resume *
7245 (linux_wait): Update call.
7246 (resume_ptr): New static variable.
7247 (linux_continue_one_thread): Renamed from
7248 linux_continue_one_process. Use resume_ptr.
7249 (linux_resume): Use linux_continue_one_thread.
7250 * server.c (handle_v_cont, handle_v_requests): New functions.
7251 (myresume): New function.
7252 (main): Handle 'v' case.
7253 * target.h (struct thread_resume): New type.
7254 (struct target_ops): Change argument of "resume" to struct
7256 (myresume): Delete macro.
7258 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7260 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7261 (uninstall): Support DESTDIR.
7263 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7265 * configure.srv: Add xscale*linux copy of arm*linux entry.
7267 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
7269 * linux-arm-low.c (arm_reinsert_addr): New function.
7270 (the_low_target): Add arm_reinsert_addr.
7272 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7274 * mem-break.c: Remove whitespace at end of file.
7276 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7278 * configure.in: Check whether we need to prototype strerror.
7279 * server.h: Optionally prototype strerror.
7280 * gdbreplay.c (perror_with_name): Use strerror.
7281 * linux-low.c (linux_attach_lwp): Use strerror.
7282 * utils.c (perror_with_name): Use strerror.
7283 * config.in, configure: Regenerated.
7285 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7287 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7288 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7290 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
7292 * Makefile.in (SFILES): Update.
7293 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7294 low-sun3.c: Remove files.
7296 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
7298 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7299 (linux_detach_one_process, linux_detach): New functions.
7300 (linux_target_ops): Add linux_detach.
7301 * server.c (main): Handle 'D' packet.
7302 * target.h (struct target_ops): Add "detach" member.
7303 (detach_inferior): Define.
7305 2003-06-13 Mark Kettenis <kettenis@gnu.org>
7307 From Kelley Cook <kelleycook@wideopenwest.com>:
7308 * configure.srv: Accept i[34567]86 variants.
7310 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
7312 * linux-low.c (linux_wait_for_event): Correct comment typos.
7313 (linux_resume_one_process): Call check_removed_breakpoint.
7314 (linux_send_signal): New function.
7315 (linux_target_ops): Add linux_send_signal.
7316 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7318 * target.h (struct target_ops): Add send_signal.
7320 2003-05-29 Jim Blandy <jimb@redhat.com>
7322 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7323 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7324 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7325 away part of the register's value.
7327 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
7329 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7330 (linux_wait_for_event, linux_init_signals): Likewise.
7332 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
7334 * configure.in: Check for stdlib.h.
7335 * configure: Regenerated.
7336 * config.in: Regenerated.
7338 2003-01-04 Andreas Schwab <schwab@suse.de>
7340 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7342 2003-01-02 Andrew Cagney <ac131313@redhat.com>
7344 * Makefile.in: Remove obsolete code.
7346 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
7348 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7349 defined(PT_FPR0_HI).
7351 2002-11-17 Stuart Hughes <seh@zee2.com>
7353 * linux-arm-low.c (arm_num_regs): Increase.
7354 (arm_regmap): Include status register.
7356 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
7358 * linux-low.c (register_addr): Remove incorrect -1 check.
7360 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
7362 * linux-low.c (linux_create_inferior): Call setpgid. Return
7364 (unstopped_p, linux_signal_pid): Remove.
7365 (linux_target_ops): Remove linux_signal_pid.
7366 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7367 global instead of target method.
7368 * target.h (struct target_ops): Remove signal_pid. Update comment
7369 for create_inferior.
7370 * server.c (signal_pid): New variable.
7371 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7372 gdbserver. Set the child to be the foreground process group.
7373 (attach_inferior): Set signal_pid.
7375 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
7377 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7379 2002-08-20 Jim Blandy <jimb@redhat.com>
7381 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7384 2002-08-01 Andrew Cagney <cagney@redhat.com>
7386 * Makefile.in: Make chill references obsolete.
7388 2002-07-24 Kevin Buettner <kevinb@redhat.com>
7390 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7391 * configure: Regenerate.
7392 * config.in: Regenerate.
7394 2002-07-09 David O'Brien <obrien@FreeBSD.org>
7396 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7397 (perror_with_name, remote_close, remote_open, expect, play): Static.
7399 2002-07-04 Michal Ludvig <mludvig@suse.cz>
7401 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7402 byte offsets instead of an array of indexes.
7403 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7405 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
7407 * regcache.c: Add comment.
7409 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
7411 * thread-db.c: New file.
7412 * proc-service.c: New file.
7413 * acinclude.m4: New file.
7414 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7415 proc-service.o, and thread-db.o.
7416 (linux-low.o): Add USE_THREAD_DB.
7417 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7418 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7419 * aclocal.m4: Regenerated.
7420 * config.in: Regenerated.
7421 * configure: Regenerated.
7422 * configure.in: Check for proc_service.h, sys/procfs.h,
7423 thread_db.h, and linux/elf.h headrs.
7424 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7425 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7426 Check for -lthread_db and thread support.
7427 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7428 PowerPC, and SuperH.
7429 * i387-fp.c: Constify arguments.
7430 * i387-fp.h: Likewise.
7431 * inferiors.c: (struct thread_info): Renamed from
7432 `struct inferior_info'. Remove PID member. Use generic inferior
7433 list header. All uses updated.
7434 (inferiors, signal_pid): Removed.
7435 (all_threads): New variable.
7436 (get_thread): Define.
7437 (add_inferior_to_list): New function.
7438 (for_each_inferior): New function.
7439 (change_inferior_id): New function.
7440 (add_inferior): Removed.
7441 (remove_inferior): New function.
7442 (add_thread): New function.
7443 (free_one_thread): New function.
7444 (remove_thread): New function.
7445 (clear_inferiors): Use for_each_inferior and free_one_thread.
7446 (find_inferior): New function.
7447 (find_inferior_id): New function.
7448 (inferior_target_data): Update argument type.
7449 (set_inferior_target_data): Likewise.
7450 (inferior_regcache_data): Likewise.
7451 (set_inferior_regcache_data): Likewise.
7452 * linux-low.c (linux_bp_reinsert): Remove.
7453 (all_processes, stopping_threads, using_thrads)
7454 (struct pending_signals, debug_threads, pid_of): New.
7455 (inferior_pid): Replace with macro.
7456 (struct inferior_linux_data): Remove.
7457 (get_stop_pc, add_process): New functions.
7458 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7459 Use add_process and add_thread.
7460 (linux_attach_lwp): New function, based on old linux_attach. Use
7461 add_process and add_thread. Set stop_expected for new threads.
7462 (linux_attach): New function.
7463 (linux_kill_one_process): New function.
7464 (linux_kill): Kill all LWPs.
7465 (linux_thread_alive): Use find_inferior_id.
7466 (check_removed_breakpoints, status_pending_p): New functions.
7467 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7468 Update. Use WNOHANG. Wait for cloned processes also. Update process
7469 struct for the found process.
7470 (linux_wait_for_event): New function.
7471 (linux_wait): Use it. Support LWPs.
7472 (send_sigstop, wait_for_sigstop, stop_all_processes)
7473 (linux_resume_one_process, linux_continue_one_process): New functions.
7474 (linux_resume): Support LWPs.
7475 (REGISTER_RAW_SIZE): Remove.
7476 (fetch_register): Use register_size instead. Call supply_register.
7477 (usr_store_inferior_registers): Likewise. Call collect_register.
7479 (regsets_fetch_inferior_registers): Improve error message.
7480 (regsets_store_inferior_registers): Add debugging.
7481 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7482 (unstopped_p, linux_signal_pid): New functions.
7483 (linux_target_ops): Add linux_signal_pid.
7484 (linux_init_signals): New function.
7485 (initialize_low): Call it. Initialize using_threads.
7486 * regcache.c (inferior_regcache_data): Add valid
7488 (get_regcache): Fetch registers lazily. Add fetch argument
7489 and update all callers.
7490 (regcache_invalidate_one, regcache_invalidate): New
7492 (new_register_cache): Renamed from create_register_cache.
7493 Return the new regcache.
7494 (free_register_cache): Change argument to a void *.
7495 (registers_to_string, registers_from_string): Call get_regcache
7496 with fetch flag set.
7497 (register_data): Make static. Pass fetch flag to get_regcache.
7498 (supply_register): Call get_regcache with fetch flag clear.
7499 (collect_register): Call get_regcache with fetch flag set.
7500 (collect_register_as_string): New function.
7501 * regcache.h: Update.
7502 * remote-utils.c (putpkt): Flush after debug output and use
7504 Handle input interrupts while waiting for an ACK.
7505 (input_interrupt): Use signal_pid method.
7506 (getpkt): Flush after debug output and use stderr.
7507 (outreg): Use collect_register_as_string.
7508 (new_thread_notify, dead_thread_notify): New functions.
7509 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7511 (look_up_one_symbol): Flush after debug output.
7512 * server.c (step_thread, server_waiting): New variables.
7513 (start_inferior): Don't use signal_pid. Update call to mywait.
7514 (attach_inferior): Update call to mywait.
7515 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7516 (main): Don't fetch/store registers explicitly. Use
7517 set_desired_inferior. Support proposed ``Hs'' packet. Update
7520 (struct inferior_list, struct_inferior_list_entry): New.
7521 * target.c (set_desired_inferior): New.
7522 (write_inferior_memory): Constify.
7523 (mywait): New function.
7525 (struct target_ops): New signal_pid method.
7526 (mywait): Removed macro, added prototype.
7528 * linux-low.h (regset_func): Removed.
7529 (regset_fill_func, regset_store_func): New.
7530 (enum regset_type): New.
7531 (struct regset_info): Add type field. Use new operation types.
7532 (struct linux_target_ops): stop_pc renamed to get_pc.
7533 Add decr_pc_after_break and breakpoint_at.
7534 (get_process, get_thread_proess, get_process_thread)
7535 (strut process_info, all_processes, linux_attach_lwp)
7536 (thread_db_init): New.
7538 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7539 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7540 (the_low_target): Add new members.
7541 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7542 (i386_store_fpxregset): Constify.
7543 (target_regsets): Add new kind identifier.
7544 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7545 (i386_set_pc): Add debugging.
7546 (i386_breakpoint_at): New function.
7547 (the_low_target): Add new members.
7548 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7549 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7550 (mips_breakpoint_at): New.
7551 (the_low_target): Add new members.
7552 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7553 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7554 (the_low_target): Add new members.
7555 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7556 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7557 (the_low_target): Add new members.
7558 * linux-x86-64-low.c (target_regsets): Add new kind
7561 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7563 From Martin Pool <mbp@samba.org>:
7564 * server.c (gdbserver_usage): New function.
7567 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7569 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7572 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7574 * Makefile.in: Remove obsolete code.
7576 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7578 * linux-low.c (regsets_fetch_inferior_registers),
7579 (regsets_store_inferior_registers): Removed cast to int from
7581 * regcache.h: Added declaration of struct inferior_info.
7583 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7585 * inferiors.c (struct inferior_info): Add regcache_data.
7586 (add_inferior): Call create_register_cache.
7587 (clear_inferiors): Call free_register_cache.
7588 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7589 * regcache.c (struct inferior_regcache_data): New.
7590 (registers): Remove.
7591 (get_regcache): New function.
7592 (create_register_cache, free_register_cache): New functions.
7593 (set_register_cache): Don't initialize the register cache here.
7594 (registers_to_string, registers_from_string, register_data): Call
7596 * regcache.h: Add prototypes.
7597 * server.h: Likewise.
7599 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7601 * mem-break.c: New file.
7602 * mem-break.h: New file.
7603 * Makefile.in: Add mem-break.o rule; update server.h
7605 * inferiors.c (struct inferior_info): Add target_data
7607 (clear_inferiors): Free target_data member if set.
7608 (inferior_target_data, set_inferior_target_data): New functions.
7609 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7610 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7611 * linux-low.c (linux_bp_reinsert): New variable.
7612 (struct inferior_linux_data): New.
7613 (linux_create_inferior): Use set_inferior_target_data.
7614 (linux_attach): Likewise. Call add_inferior.
7615 (linux_wait_for_one_inferior): New function.
7616 (linux_wait): Call it.
7617 (linux_write_memory): Add const.
7618 (initialize_low): Call set_breakpoint_data.
7619 * linux-low.h (struct linux_target_ops): Add breakpoint
7621 * server.c (attach_inferior): Remove extra add_inferior
7623 * server.h: Include mem-break.h. Update inferior.c
7625 * target.c (read_inferior_memory)
7626 (write_inferior_memory): New functions.
7627 * target.h (read_inferior_memory)
7628 (write_inferior_memory): Change macros to prototypes.
7629 (struct target_ops): Update comments. Add const to write_memory
7632 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7634 * linux-low.c (usr_store_inferior_registers): Support
7635 registers which are allowed to fail to store.
7636 * linux-low.h (linux_target_ops): Likewise.
7637 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7638 (ppc_cannot_store_register): FPSCR may not be storable.
7640 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7642 * server.h: Include <string.h> if HAVE_STRING_H.
7643 * ChangeLog: Correct paths in last ChangeLog entry.
7645 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7647 * linux-low.h: Remove obsolete prototypes.
7648 (struct linux_target_ops): New.
7649 (extern the_low_target): New.
7650 * linux-low.c (num_regs, regmap): Remove declarations.
7651 (register_addr): Use the_low_target explicitly.
7652 (fetch_register): Likewise.
7653 (usr_fetch_inferior_registers): Likewise.
7654 (usr_store_inferior_registers): Likewise.
7655 * linux-arm-low.c (num_regs): Remove.
7656 (arm_num_regs): Define.
7657 (arm_regmap): Renamed from regmap, made static.
7658 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7660 (arm_cannot_store_register): Renamed from cannot_store_register,
7662 (the_low_target): New.
7663 * linux-i386-low.c (num_regs): Remove.
7664 (i386_num_regs): Define.
7665 (i386_regmap): Renamed from regmap, made static.
7666 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7668 (i386_cannot_store_register): Renamed from cannot_store_register,
7670 (the_low_target): New.
7671 * linux-ia64-low.c (num_regs): Remove.
7672 (ia64_num_regs): Define.
7673 (ia64_regmap): Renamed from regmap, made static.
7674 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7676 (ia64_cannot_store_register): Renamed from cannot_store_register,
7678 (the_low_target): New.
7679 * linux-m68k-low.c (num_regs): Remove.
7680 (m68k_num_regs): Define.
7681 (m68k_regmap): Renamed from regmap, made static.
7682 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7684 (m68k_cannot_store_register): Renamed from cannot_store_register,
7686 (the_low_target): New.
7687 * linux-mips-low.c (num_regs): Remove.
7688 (mips_num_regs): Define.
7689 (mips_regmap): Renamed from regmap, made static.
7690 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7692 (mips_cannot_store_register): Renamed from cannot_store_register,
7694 (the_low_target): New.
7695 * linux-ppc-low.c (num_regs): Remove.
7696 (ppc_num_regs): Define.
7697 (ppc_regmap): Renamed from regmap, made static.
7698 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7700 (ppc_cannot_store_register): Renamed from cannot_store_register,
7702 (the_low_target): New.
7703 * linux-s390-low.c (num_regs): Remove.
7704 (s390_num_regs): Define.
7705 (s390_regmap): Renamed from regmap, made static.
7706 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7708 (s390_cannot_store_register): Renamed from cannot_store_register,
7710 (the_low_target): New.
7711 * linux-sh-low.c (num_regs): Remove.
7712 (sh_num_regs): Define.
7713 (sh_regmap): Renamed from regmap, made static.
7714 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7716 (sh_cannot_store_register): Renamed from cannot_store_register,
7718 (the_low_target): New.
7719 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7720 (the_low_target): New.
7722 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7724 * Makefile.in: Add stamp-h target.
7725 * configure.in: Create stamp-h.
7726 * configure: Regenerated.
7728 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7730 * inferiors.c: New file.
7731 * target.c: New file.
7732 * target.h: New file.
7733 * Makefile.in: Add target.o and inferiors.o. Update
7735 * linux-low.c (inferior_pid): New static variable,
7736 moved from server.c.
7737 (linux_create_inferior): Renamed from create_inferior.
7738 Call add_inferior. Return 0 on success instead of a PID.
7739 (linux_attach): Renamed from myattach.
7740 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7741 (linux_thread_alive): Renamed from mythread_alive.
7742 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7744 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7745 (regsets_store_inferior_registers): Correct error message.
7746 Add missing ``return 0''.
7747 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7748 (linux_store_registers): Renamed from store_inferior_registers.
7749 (linux_read_memory): Renamed from read_inferior_memory.
7750 (linux_write_memory): Renamed from write_inferior_memory.
7751 (linux_target_ops): New structure.
7752 (initialize_low): Call set_target_ops ().
7753 * remote-utils.c (unhexify): New function.
7754 (hexify): New function.
7755 (input_interrupt): Send signals to ``signal_pid''.
7756 * server.c (inferior_pid): Remove.
7757 (start_inferior): Update create_inferior call.
7758 (attach_inferior): Call add_inferior.
7759 (handle_query): New function.
7760 (main): Call handle_query for `q' packets.
7761 * server.h: Include "target.h". Remove obsolete prototypes.
7762 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7764 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7766 * Makefile.in: Add WARN_CFLAGS. Update configury
7768 * configure.in: Check for <string.h>
7769 * configure: Regenerate.
7770 * config.in: Regenerate.
7771 * gdbreplay.c: Include needed system headers.
7772 (remote_open): Remove strchr prototype.
7773 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7774 * regcache.c (supply_register): Change buf argument to const void *.
7775 (supply_register_by_name): Likewise.
7776 (collect_register): Change buf argument to void *.
7777 (collect_register_by_name): Likewise.
7778 * regcache.h: Add missing prototypes.
7779 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7780 * server.c (handle_query): New function.
7781 (attached): New static variable, moved out of main.
7782 (main): Quiet longjmp clobber warnings.
7783 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7784 * utils.c (error): Remove NORETURN.