1 2013-04-17 Pedro Alves <palves@redhat.com>
3 * configure.ac (USE_THREAD_DB): Delete variable.
4 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5 Don't AC_SUBST USE_THREAD_DB.
6 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7 * config.in, configure: Regenerate.
9 2013-04-16 Pedro Alves <palves@redhat.com>
11 * linux-low.h (struct lwp_info) <thread_known>: Move under
12 the USE_THREAD_DB #ifdef.
14 2013-04-16 Pedro Alves <palves@redhat.com>
16 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
17 (linux-low.o): Delete rule.
18 * linux-low.h: Always include "gdb_thread_db.h" instead of
19 conditionally including thread_db.h.
20 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
23 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
25 * Makefile.in (install-only): Fix make install regression.
27 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
29 Convert man pages to texinfo, new gdbinit.5 texinfo page.
30 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
32 * gdbserver.1: Remove.
34 2013-03-22 Pedro Alves <palves@redhat.com>
36 * linux-low.c (handle_extended_wait): Don't call
37 linux_enable_event_reporting.
39 2013-03-15 Tony Theodore <tonyt@logyst.com>
42 * Makefile.in (SHELL): Use @SHELL@.
44 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
46 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
49 2013-03-13 Joel Brobecker <brobecker@adacore.com>
51 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
52 Remove extraneous NULL element.
54 2013-03-13 Yao Qi <yao@codesourcery.com>
56 * tracepoint.c (traceframe_read_tsv): Look for the last matched
57 'V' block in trace frame.
59 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
61 * target.h (struct target_ops): Add btrace ops.
62 (target_supports_btrace): New macro.
63 (target_enable_btrace): New macro.
64 (target_disable_btrace): New macro.
65 (target_read_btrace): New macro.
66 * gdbthread.h (struct thread_info): Add btrace field.
67 * server.c: Include btrace-common.h.
68 (handle_btrace_general_set): New function.
69 (handle_btrace_enable): New function.
70 (handle_btrace_disable): New function.
71 (handle_general_set): Call handle_btrace_general_set.
72 (handle_qxfer_btrace): New function.
73 (struct qxfer qxfer_packets[]): Add btrace entry.
74 * inferiors.c (remove_thread): Disable btrace.
75 * linux-low: Include linux-btrace.h.
76 (linux_low_enable_btrace): New function.
77 (linux_low_read_btrace): New function.
78 (linux_target_ops): Add btrace ops.
79 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
80 Add srv_linux_btrace=yes.
81 (x86_64-*-linux*): Add linux-btrace.o.
82 Add srv_linux_btrace=yes.
83 * configure.ac: Define HAVE_LINUX_BTRACE.
84 * config.in: Regenerated.
85 * configure: Regenerated.
87 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
89 * server.c (handle_qxfer): Preserve error message if -3 is
91 (qxfer): Document the -3 return value.
93 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
95 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
96 (linux_btrace_h): New variable.
97 (linux-btrace.o): New rule.
99 2013-03-08 Stan Shebs <stan@codesourcery.com>
100 Hafiz Abid Qadeer <abidh@codesourcery.com>
102 * tracepoint.c (trace_buffer_size): New global.
103 (DEFAULT_TRACE_BUFFER_SIZE): New define.
104 (init_trace_buffer): Change to one-argument function. Allocate
106 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
107 handle QTBuffer:size packet.
108 (cmd_bigqtbuffer_size): New function.
109 (initialize_tracepoint): Call init_trace_buffer with
110 DEFAULT_TRACE_BUFFER_SIZE.
111 * server.c (handle_query): Add QTBuffer:size in the
114 2013-03-07 Yao Qi <yao@codesourcery.com>
116 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
117 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
119 (cmd_qtsp): Adjust condition. Do post increment.
120 Set cur_action and cur_step_action back to 0.
122 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
125 * linux-low.c (linux_write_memory): Return early success if LEN is
128 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
130 * configure.srv: Add x86_64-*-cygwin* as target.
132 2013-02-28 Tom Tromey <tromey@redhat.com>
134 * configure.ac: Invoke AC_SYS_LARGEFILE.
135 * configure, config.in: Rebuild.
137 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
139 * win32-low.c: Throughout, fix format strings and casts of
140 printf-like functions to avoid type related warnings on all
142 (get_child_debug_event): Print dwDebugEventCode as hex since
143 that's how it's usually documented.
145 2013-02-28 Yao Qi <yao@codesourcery.com>
147 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
150 2013-02-27 Jiong Wang <jiwang@tilera.com>
152 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
153 (reg-tilegx32.c): New rule.
154 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
155 * linux-tile-low.c (tile_arch_setup): New function. Invoke
156 different register info initializer according to elf class.
157 (init_registers_tilgx32): New function. The tilegx32 register info
159 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
160 (tile_store_gregset): Likewise.
162 2013-02-27 Yao Qi <yao@codesourcery.com>
164 * server.c (process_point_options): Print debug message when
165 debug_threads is true.
167 2013-02-26 Yao Qi <yao@codesourcery.com>
169 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
171 2013-02-19 Pedro Alves <palves@redhat.com>
172 Kai Tietz <ktietz@redhat.com>
176 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
177 instead of strtoul to extract address from packet.
178 (process_serial_event) <'z'>: Likewise.
180 2013-02-18 Yao Qi <yao@codesourcery.com>
182 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
184 2013-02-14 Pedro Alves <palves@redhat.com>
188 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
189 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
191 2013-02-14 Pedro Alves <palves@redhat.com>
193 * tracepoint.c (cmd_qtdpsrc): Use savestring.
195 2013-02-14 Pedro Alves <palves@redhat.com>
197 * tracepoint.c (save_string): Delete.
198 (add_tracepoint_action): Use savestring instead of save_string.
200 2013-02-12 Pedro Alves <palves@redhat.com>
202 * linux-xtensa-low.c: Ditto.
203 * xtensa-xtregs.c: Ditto.
205 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
207 * thread-db.c (thread_db_get_tls_address): NULL pointer check
210 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
212 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
213 aarch64_num_wp_regs and aarch64_num_bp_regs to
214 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
216 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
218 * linux-aarch64-low.c (ps_get_thread_area): Replace
219 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
221 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
222 Marcus Shawcroft <marcus.shawcroft@arm.com>
223 Nigel Stephens <nigel.stephens@arm.com>
224 Yufeng Zhang <yufeng.zhang@arm.com>
226 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
227 (aarch64.c, aarch64-without-fpu.c): New targets.
228 * configure.srv (aarch64*-*-linux*): New.
229 * linux-aarch64-low.c: New file.
231 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
233 * linux-low.c (handle_extended_wait, linux_create_inferior)
234 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
235 (dequeue_one_deferred_signal, linux_resume_one_thread)
236 (fetch_register, linux_write_memory, linux_enable_event_reporting)
237 (linux_tracefork_grandchild, linux_test_for_tracefork)
238 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
239 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
240 where the argument is 0.
242 2013-01-25 Yao Qi <yao@codesourcery.com>
244 * event-loop.c: Include "queue.h".
245 (gdb_event_p): New typedef.
246 (struct gdb_event) <next_event>: Remove.
247 (event_queue): Change to QUEUE(gdb_event_p).
248 (async_queue_event): Remove.
249 (gdb_event_xfree): New.
250 (initialize_event_loop): New.
251 (process_event): Use API from QUEUE.
252 (wait_for_event): Likewise.
253 * server.c (main): Call initialize_event_loop.
254 * server.h (initialize_event_loop): Declare.
256 2013-01-18 Yao Qi <yao@codesourcery.com>
258 * ax.h (struct eval_agent_expr_context): New.
259 (gdb_eval_agent_expr): Update declaration.
260 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
261 TFRAME. Add new argument CTX.
262 * server.h (struct eval_agent_expr_context): Declare.
263 (agent_mem_read, agent_tsv_read): Update declaration.
264 (agent_mem_read_string): Likewise.
265 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
266 (add_traceframe_block): Add new argument TPOINT.
267 Increase TPOINT->traceframe_usage.
268 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
269 eval_tracepoint_agent_expr.
270 (condition_true_at_tracepoint): Likewise.
271 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
272 (agent_mem_read_string, agent_tsv_read): Likewise.
274 2013-01-16 Yao Qi <yao@codesourcery.com>
276 * linux-low.c (linux_resume_one_lwp): Don't check
277 'lwp->bp_reinsert != 0'.
279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
280 Pedro Alves <palves@redhat.com>
282 * lynx-low.c (ptrace_request_to_str): Define a temporary
283 macro and use it to simplify this function's implementation.
285 2013-01-07 Joel Brobecker <brobecker@adacore.com>
287 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
290 2013-01-07 Joel Brobecker <brobecker@adacore.com>
292 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
294 2013-01-07 Joel Brobecker <brobecker@adacore.com>
296 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
298 2013-01-07 Joel Brobecker <brobecker@adacore.com>
300 * lynx-low.c (lynx_resume): Use the resume_info parameter
301 to determine the ptid for the lynx_ptrace call, unless
302 it is equal to minus_one_ptid, in which case we use the
303 ptid of the current_inferior.
304 (lynx_wait_1): After having received a thread create/exit
305 event, resume the inferior's execution using the signaling
306 thread's ptid, rather than the old ptid.
308 2013-01-07 Joel Brobecker <brobecker@adacore.com>
310 * lynx-low.c (lynx_resume): Delete variable ret.
312 2013-01-01 Joel Brobecker <brobecker@adacore.com>
314 * gdbreplay.c (gdbreplay_version): Update copyright year.
315 * server.c (gdbserver_version): Likewise.
317 2012-12-17 Joel Brobecker <brobecker@adacore.com>
319 * lynx-low.c (lynx_wait_1): Add debug trace before adding
322 2012-12-17 Joel Brobecker <brobecker@adacore.com>
324 * lynx-low.c (ptrace_request_to_str): Add handling for
327 2012-12-17 Joel Brobecker <brobecker@adacore.com>
329 * lynx-low.c (lynx_attach): Delete variable new_process.
331 2012-12-17 Joel Brobecker <brobecker@adacore.com>
333 * lynx-low.c (lynx_create_inferior): Delete variable
336 2012-12-17 Joel Brobecker <brobecker@adacore.com>
338 * lynx-low.c (ptrace_request_to_str): Do not handle
339 PTRACE_GETTHREADLIST if this macro does not exist.
341 2012-12-15 Yao Qi <yao@codesourcery.com>
343 * Makefile.in (OBS): Add notif.o.
344 * notif.c, notif.h: New.
345 * server.c: Include "notif.h".
346 (struct vstop_notif) <next>: Remove.
348 (queue_stop_reply): Update.
349 (push_event, send_next_stop_reply): Remove.
350 (discard_queued_stop_replies): Update.
351 (notif_stop): New variable.
352 (handle_v_stopped): Remove.
353 (handle_v_requests): Don't call handle_v_stopped. Call
354 handle_ack_notif instead.
355 (queue_stop_reply_callback): Call notif_event_enque instead
357 (handle_status): Don't call send_next_stop_reply, call
358 notif_write_event instead.
359 (kill_inferior_callback): Likewise.
360 (detach_or_kill_inferior_callback): Likewise.
361 (main): Call initialize_notif.
362 (process_serial_event): Call QUEUE_is_empty.
363 (handle_target_event): Call notif_push instead of push event.
364 * server.h (push_event): Remove declaration.
366 2012-12-10 Tom Tromey <tromey@redhat.com>
368 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
369 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
372 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
373 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
374 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
375 (amd64-linux-ipa.o, ax.o): Rewrite.
376 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
377 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
378 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
379 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
380 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
381 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
382 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
383 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
384 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
385 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
386 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
387 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
388 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
389 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
390 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
391 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
392 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
393 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
394 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
395 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
396 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
397 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
398 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
399 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
400 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
401 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
402 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
403 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
404 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
405 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
406 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
407 (reg-tilegx.o): Remove.
408 (all_object_files): New macro.
410 * aclocal.m4, configure: Rebuild.
411 * acinclude.m4: Include depstand.m4, lead-dot.m4.
412 * configure.ac: Invoke ZW_CREATE_DEPDIR,
413 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
415 2012-12-05 Tom Tromey <tromey@redhat.com>
418 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
420 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
422 * configure.ac: Check for linux/perf_event.h.
423 * config.in: Regenerated.
424 * configure: Regenerated.
426 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
428 * hostio.c (handle_readlink): Decrease buffer size
429 parameter passed to readlink by one byte.
431 2012-11-26 Yao Qi <yao@codesourcery.com>
433 * configure.ac (build_warnings): Append '-Wempty-body'.
434 * configure: Regenerated.
435 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
438 2012-11-15 Pierre Muller <muller@sourceware.org>
440 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
441 * config.in: Regenerate.
442 * configure: Regenerate.
443 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
444 Use "gdb_wait.h" header instead of <sys/wait.h> header.
445 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
446 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
448 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
449 instead of <sys/wait.h> header.
450 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
452 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
454 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
455 (various make rules): Remove -DGDBSERVER
457 2012-11-09 Yao Qi <yao@codesourcery.com>
459 * spu-low.c (current_ptid): Move it to ..
460 * gdbthread.h: ... here. New.
461 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
462 * server.c (myresume, process_serial_event): Likewise.
463 * thread-db.c (thread_db_find_new_threads): Likewise.
464 * tracepoint.c (run_inferior_command): Likewise.
466 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
468 * server.c (handle_search_memory_1): Include access length in
471 2012-09-05 Michael Brandt <michael.brandt@axis.com>
473 * linux-crisv32-low.c: Fix compile errors.
475 2012-09-04 Yao Qi <yao@codesourcery.com>
477 * tracepoint.c (cmd_qtsv): Adjust debug message.
478 Don't check CUR_TPOINT.
480 2012-08-28 Yao Qi <yao@codesourcery.com>
482 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
483 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
484 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
485 Remove declarations of xmalloc, xreallloc, xstrdup and
487 * Makefile.in (libiberty_h): New.
488 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
489 (linux-bfin-low.o): Append dependency 'libiberty.h'.
491 2012-08-23 Yao Qi <yao@codesourcery.com>
493 * server.h: Remove declaration of 'xsnprintf'.
495 2012-08-22 Keith Seitz <keiths@redhat.com>
497 * server.h: Include build-gnulib-gbserver/config.h.
498 * gdbreplay.c: Likewise.
500 2012-08-08 Doug Evans <dje@google.com>
502 * Makefile.in (SFILES): Add gdb_vecs.c.
503 (OBS): Add gdb_vecs.o.
504 (gdb_vecs_h, host_defs_h): New variables.
505 (thread-db.o): Add $(gdb_vecs_h) dependency.
506 (gdb_vecs.o): New rule.
507 * thread-db.c: #include "gdb_vecs.h".
508 (thread_db_load_search): Use a vector to iterate over path elements.
509 Handle text appearing after "$pdir".
511 * configure.ac: Add check for strstr.
512 * config.in: Regenerate.
513 * configure: Regenerate.
515 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
517 * hostio.c (handle_pread): If pread fails, fall back to attempting
519 (handle_pwrite): Likewise for pwrite.
521 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
523 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
524 between unsupported TYPE and unimplementable ADDR/LEN combination.
525 (arm_insert_point): Act on new return value.
527 2012-07-31 Pedro Alves <palves@redhat.com>
529 * server.c (process_point_options): Only skip tokens if we find
530 one that is unrecognized. Don't treat 'X' specially while
531 skipping unrecognized tokens.
533 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
535 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
536 to 4-byte-align HW breakpoint addresses for Thumb.
538 2012-07-27 Yao Qi <yao@codesourcery.com>
542 * server.h: Declare gdb_agent_about_to_close.
543 * target.c (kill_inferior): Include "agent.h".
544 New. Send command 'kill'.
545 * target.h (kill_inferior): Removed macro.
546 * tracepoint.c (gdb_agent_about_to_close): New.
547 (gdb_agent_helper_thread): Handle command 'close'.
548 Wait endlessly until the inferior stops.
549 Install gdb_agent_remove_socket to atexit hook.
550 (agent_socket_name): New static variable.
551 (gdb_agent_socket_init): Replace local variable 'name' with
553 (gdb_agent_remove_socket): New.
555 2012-07-27 Yao Qi <yao@codesourcery.com>
557 * server.c (process_point_options): Stop at 'X' when parsing.
559 2012-07-19 Michael Eager <eager@eagercon.com>
561 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
563 * linux-x86-low.c (x86_insert_point, x86_remove_point):
564 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
567 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
569 * gdbserver/linux-low.c (initialize_low): Call
570 linux_ptrace_init_warnings.
572 2012-07-02 Doug Evans <dje@google.com>
574 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
577 2012-07-02 Stan Shebs <stan@codesourcery.com>
579 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
580 (ax.o): Add it to build rule.
583 (IPA_OBS): Add format.o.
584 * server.c (handle_query): Claim support for breakpoint commands.
585 (process_point_options): Add command case.
586 (process_serial_event): Leave running if there are printfs in
588 * mem-break.h (any_persistent_commands): Declare.
589 (add_breakpoint_commands): Declare.
590 (gdb_no_commands_at_breakpoint): Declare.
591 (run_breakpoint_commands): Declare.
592 * mem-break.c (struct point_command_list): New struct.
593 (struct breakpoint): New field command_list.
594 (any_persistent_commands): New function.
595 (add_commands_to_breakpoint): New function.
596 (add_breakpoint_commands): New function.
597 (gdb_no_commands_at_breakpoint): New function.
598 (run_breakpoint_commands): New function.
599 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
601 * ax.c: Include format.h.
602 (ax_printf): New function.
603 (gdb_eval_agent_expr): Add printf opcode.
605 2012-06-13 Yao Qi <yao@codesourcery.com>
607 * server.c (start_inferior): Remove duplicated writes to fields
608 'last_resume_kind' and 'last_status' of 'current_inferior'.
610 2012-06-12 Yao Qi <yao@codesourcery.com>
611 Pedro Alves <palves@redhat.com>
613 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
615 * server.c (handle_v_cont): Extend comment.
617 2012-06-11 Yao Qi <yao@codesourcery.com>
619 * linux-low.c (linux_attach): Add 'static'.
621 2012-06-06 Yao Qi <yao@codesourcery.com>
623 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
625 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
627 Fix gcc -flto compilation warning.
628 * server.c (main): Make variable multi_mode and attach volatile.
630 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
632 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
633 if the platform doesn't know about it.
635 2012-05-30 Jeff Kenton <jkenton@tilera.com>
637 * Makefile.in (SFILES): Add linux-tile-low.c.
638 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
639 * configure.srv: Handle tilegx-*-linux*.
640 * linux-tile-low.c: New file.
642 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
644 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
646 2012-05-24 Pedro Alves <palves@redhat.com>
650 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
652 2012-05-24 Pedro Alves <palves@redhat.com>
656 Replace target_signal with gdb_signal throughout.
658 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
660 * linux-low.c (linux_store_registers): Avoid the copying sequence
661 when no data has been retrieved by ptrace.
663 2012-05-22 Will Deacon <will.deacon@arm.com>
665 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
666 Include asm/ptrace.h.
667 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
670 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
672 * linux-low.c (linux_store_registers): Don't re-retrieve data
673 with ptrace that has already been obtained from /proc. Always
674 copy any data retrieved with ptrace to the buffer supplied.
676 2012-05-11 Yao Qi <yao@codesourcery.com>
677 Pedro Alves <palves@redhat.com>
679 * linux-low.c (enum stopping_threads_kind): New.
680 (stopping_threads): Change type to `enum stopping_threads_kind'.
681 (handle_extended_wait): If stopping and suspending threads, leave
682 the new_lwp suspended too.
683 (linux_wait_for_event): Adjust.
684 (stop_all_lwps): Set `stopping_threads' to
685 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
686 whether we're suspending threads or just stopping them. Assert no
689 2012-04-29 Yao Qi <yao@codesourcery.com>
691 * server.h: Move some code to ...
692 * gdbthread.h: ... here. New.
693 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
694 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
695 (nto-low.o, win32-low.o): Likewise.
696 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
697 * regcache.c, remote-utils.c, server.c: Likewise.
698 * target.c, tracepoint.c, win32-low.c: Likewise.
700 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
702 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
703 (PTRACE_ARG4_TYPE): Likewise.
704 (PTRACE_XFER_TYPE): Likewise.
705 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
706 ptrace to PTRACE_ARG3_TYPE.
707 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
708 (PTRACE_ARG4_TYPE): Likewise.
709 (PTRACE_XFER_TYPE): Likewise.
710 (linux_detach_one_lwp): Cast fourth argument of
711 ptrace to long then PTRACE_ARG4_TYPE.
712 (regsets_fetch_inferior_registers): Cast third argument of
713 ptrace to long then PTRACE_ARG3_TYPE.
714 (regsets_store_inferior_registers): Likewise.
716 2012-04-20 Pedro Alves <palves@redhat.com>
718 * configure: Regenerate.
720 2012-04-19 Pedro Alves <palves@redhat.com>
722 * Makefile.in (GNULIB_BUILDDIR): New.
723 (LIBGNU, INCGNU, GNULIB_H): Adjust.
724 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
725 (all, install-only, uninstall, clean-info, all-lib, clean): No
726 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
727 (maintainer-clean realclean distclean): Use subdir_do.
729 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
730 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
731 * acinclude.m4: Include acx_configure_dir.m4.
732 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
733 calls. Call AC_PROG_RANLIB. Configure gnulib using
736 (GNULIB_STDINT_H): Adjust.
737 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
738 * gdbreplay.c: Include build-gnulib/config.h.
739 * server.h: Likewise.
740 * aclocal.m4: Regenerate.
741 * config.in: Regenerate.
742 * configure: Regenerate.
744 2012-04-19 Pedro Alves <palves@redhat.com>
746 * Makefile.in (LIBGNU, INCGNU): Adjust.
747 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
748 (all, install-only, uninstall, clean-info, all-lib, clean)
749 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
750 * configure.ac: Adjust AC_OUTPUT output.
751 * aclocal.m4: Regenerate.
752 * configure: Regenerate.
754 2012-04-19 Pedro Alves <palves@redhat.com>
756 * Makefile.in (generated_files): New.
757 (server_h): Remove the explicit dependency on config.h, and depend
760 2012-04-19 Pedro Alves <palves@redhat.com>
762 * Makefile.in (INCGNU): Add -Ignulib.
764 2012-04-19 Pedro Alves <palves@redhat.com>
766 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
767 (INCGNU): ... this, and spell out -I here.
768 (GNULIB_LIB): Rename to ...
770 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
772 2012-04-19 Pedro Alves <palves@redhat.com>
774 * config.in: Regenerate.
776 2012-04-19 Pedro Alves <palves@redhat.com>
778 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
779 * server.h (memmem): Remove declaration.
780 * config.in: Regenerate.
781 * configure: Regenerate.
783 2012-04-19 Yao Qi <yao@codesourcery.com>
785 * Makefile.in (SFILES): Add common/vec.c.
789 2012-04-19 Yao Qi <yao@codesourcery.com>
791 * remote-utils.c (prepare_resume_reply): Replace with macro
792 target_core_of_thread.
793 * server.c (handle_qxfer_threads_proper): Likewise.
794 * target.h (traget_core_of_thread): New macro.
796 2012-04-18 Pedro Alves <palves@redhat.com>
798 * aclocal.m4: Regenerate.
799 * configure: Regenerate.
801 2012-04-16 Yao Qi <yao@codesourcery.com>
803 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
804 duplicated on address.
806 2012-04-16 Yao Qi <yao@codesourcery.com>
808 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
809 (struct tracepoint_action_ops) <send>: New field.
810 (m_tracepoint_action_send, r_tracepoint_action_send): New.
811 (agent_expr_send, x_tracepoint_action_send): New.
812 (l_tracepoint_action_send): New.
813 (cmd_qtdp): Download and install tracepoint
814 according to `use_agent'.
815 (run_inferior_command): Add one more parameter `len'.
817 (tracepoint_send_agent): New.
818 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
820 2012-04-16 Yao Qi <yao@codesourcery.com>
822 * tracepoint.c (download_tracepoints): Moved to ...
823 (cmd_qtstart): ... here.
825 2012-04-14 Yao Qi <yao@codesourcery.com>
827 * tracepoint.c: Include inttypes.h.
828 (struct collect_memory_action): Use sized types.
829 (struct tracepoint): Likewise.
830 (cmd_qtdp, stop_tracing): Update print specifiers.
831 (cmd_qtp, response_tracepoint): Likewise.
832 (collect_data_at_tracepoint): Likewise.
833 (collect_data_at_step): Likewise.
835 2012-04-14 Yao Qi <yao@codesourcery.com>
837 Import gnulib module inttypes.
838 * aclocal.m4, config.in, configure: Regenerated.
840 2012-04-14 Yao Qi <yao@codesourcery.com>
842 * Makefile.in (maintainer-clean, realclean, distclean): Remove
843 Makefile and config.status at last.
845 2012-04-13 Yao Qi <yao@codesourcery.com>
847 * tracepoint.c: Include stdint.h unconditionally.
849 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
851 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
852 on BFD_HAVE_SYS_PROCFS_TYPE.
853 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
854 * configure: Regenerate.
855 * config.in: Likewise.
857 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
859 * Makefile.in (clean): Also remove x32.c x32-linux.c
860 x32-avx.c x32-avx-linux.c.
863 (x32-linux.o): Likewise.
864 (x32-linux.c): Likewise.
865 (x32-avx.o): Likewise.
866 (x32-avx.c): Likewise.
867 (x32-avx-linux.o): Likewise.
868 (x32-avx-linux.c): Likewise.
870 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
871 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
872 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
873 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
874 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
875 i386/x32-avx-linux.xml.
877 * linux-x86-low.c (init_registers_x32_linux): New prototype.
878 (init_registers_x32_avx_linux): Likwise.
879 (x86_linux_update_xmltarget): Call init_registers_x32_linux
880 or init_registers_x32_avx_linux if linux_is_elf64 is false.
882 2012-04-13 Pedro Alves <palves@redhat.com>
884 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
885 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
886 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
887 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
890 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
892 * linux-x86-low.c (compat_x32_clock_t): New.
893 (compat_x32_siginfo_t): Likewise.
894 (compat_x32_siginfo_from_siginfo): Likewise.
895 (siginfo_from_compat_x32_siginfo): Likewise.
896 (linux_is_elf64): Likewise.
897 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
898 and siginfo_from_compat_x32_siginfo for x32.
899 (x86_arch_setup): Set linux_is_elf64.
901 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
904 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
906 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
907 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
908 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
909 compatible with process.
911 2012-04-12 Yao Qi <yao@codesourcery.com>
913 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
914 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
915 (install-only, install-info, clean): Handle sub dir gnulib.
916 (all-lib, am--refresh): New targets.
917 (memmem.o): Remove target.
918 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
919 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
920 (AC_REPLACE_FUNCS): Remove memmem.
921 Invoke gl_INIT and AM_INIT_AUTOMAKE.
922 (AC_OUTPUT): Generate Makefile in gnulib/.
923 * aclocal.m4, config.in, configure: Regenerated.
925 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
927 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
929 2012-04-05 Pedro Alves <palves@redhat.com>
931 -Werror=strict-aliasing
933 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
936 2012-04-04 Pedro Alves <palves@redhat.com>
938 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
939 (sparc_store_gregset_from_stack, sparc_store_gregset)
940 (sparc_breakpoint_at): Fix formatting.
942 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
944 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
946 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
947 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
948 * config.in: Regenerate.
949 * configure: Likewise.
951 2012-03-29 Pedro Alves <palves@redhat.com>
953 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
954 Correct ptrace arguments.
956 2012-03-28 Pedro Alves <palves@redhat.com>
958 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
959 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
960 (IA64_FR1_REGNUM): New defines.
961 (ia64_fetch_register): New.
962 (the_low_target): Install it.
963 * linux-low.h (struct linux_target_ops) <fetch_register>: New
965 * linux-low.c (linux_fetch_registers): Try the
966 the_low_target.fetch_register hook first.
968 * linux-arm-low.c (the_low_target): Adjust.
969 * linux-bfin-low.c (the_low_target): Adjust.
970 * linux-cris-low.c (the_low_target): Adjust.
971 * linux-crisv32-low.c (the_low_target): Adjust.
972 * linux-m32r-low.c (the_low_target): Adjust.
973 * linux-m68k-low.c (the_low_target): Adjust.
974 * linux-mips-low.c (the_low_target): Adjust.
975 * linux-ppc-low.c (the_low_target): Adjust.
976 * linux-s390-low.c (the_low_target): Adjust.
977 * linux-sh-low.c (the_low_target): Adjust.
978 * linux-sparc-low.c (the_low_target): Adjust.
979 * linux-tic6x-low.c (the_low_target): Adjust.
980 * linux-x86-low.c (the_low_target): Adjust.
981 * linux-xtensa-low.c (the_low_target): Adjust.
983 2012-03-26 Pedro Alves <palves@redhat.com>
985 * server.c (handle_qxfer_libraries): Don't bail early if
986 the_target->qxfer_libraries_svr4 is not NULL.
988 2012-03-26 Pedro Alves <palves@redhat.com>
990 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
992 2012-03-23 Pedro Alves <palves@redhat.com>
994 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
995 "library-list-svr4" element's start tag when the the DSO list is
998 2012-03-23 Pedro Alves <palves@redhat.com>
1000 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1001 a variable whose type size is the same as the inferior's pointer
1004 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1006 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1008 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1009 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1010 * linux-low.h: Include <signal.h>.
1011 (struct siginfo): Remove forward declaration.
1012 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1015 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1017 * .gitignore: Ignore more files.
1019 2012-03-19 Pedro Alves <palves@redhat.com>
1020 Jan Kratochvil <jan.kratochvil@redhat.com>
1022 * server.c (cont_thread, general_thread): Add describing comments.
1023 (start_inferior): Clear `cont_thread'.
1024 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1027 2012-03-15 Yao Qi <yao@codesourcery.com>
1029 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1031 (cmd_qtdp): ... here.
1033 2012-03-15 Yao Qi <yao@codesourcery.com>
1035 * tracepoint.c (struct tracepoint_action_ops): New.
1036 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1037 (m_tracepoint_action_download): New.
1038 (r_tracepoint_action_download): New.
1039 (x_tracepoint_action_download): New.
1040 (l_tracepoint_action_download): New.
1041 (add_tracepoint_action): Install `action->ops' according type.
1042 (download_tracepoint_1): Move code `download' function pointer
1043 of various tracepoint_action_ops.
1045 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1047 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1048 linux_ptrace_attach_warnings.
1050 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1052 * Makefile.in (linux-ptrace.o): New.
1053 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1054 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1055 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1056 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1057 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1059 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1061 2012-03-08 Yao Qi <yao@codesourcery.com>
1062 Pedro Alves <palves@redhat.com>
1064 Fix PR server/13392.
1065 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1067 * tracepoint.c (remove_tracepoint): New.
1068 (cmd_qtdp): Call remove_tracepoint when failed to install.
1070 2012-03-07 Pedro Alves <palves@redhat.com>
1072 * linux-low.c (get_detach_signal): New.
1073 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1074 Pass on pending signals to PTRACE_DETACH. Check the result of the
1076 * server.c (program_signals, program_signals_p): New.
1077 (handle_general_set): Handle QProgramSignals.
1078 * server.h (program_signals, program_signals_p): Declare.
1080 2012-03-05 Pedro Alves <palves@redhat.com>
1081 Jan Kratochvil <jan.kratochvil@redhat.com>
1083 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1086 2012-03-03 Yao Qi <yao@codesourcery.com>
1088 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1089 agent_look_up_symbols.
1091 2012-03-03 Yao Qi <yao@codesourcery.com>
1093 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1094 (linux-x86-low.o): Likewise.
1095 * server.h: Remove in_process_agent_loaded.
1096 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1100 2012-03-03 Yao Qi <yao@codesourcery.com>
1102 * tracepoint.c (gdb_agent_capability): New global.
1103 (in_process_agent_loaded_ust): Renamed to
1104 `in_process_agent_supports_ust'.
1106 (in_process_agent_supports_ust): Call agent_capability_check.
1107 (clear_installed_tracepoints): Assert that agent supports
1110 2012-03-03 Yao Qi <yao@codesourcery.com>
1112 * linux-low.c (linux_supports_agent): New.
1113 (linux_target_ops): Initialize field `supports_agent' with
1114 linux_supports_agent.
1115 * target.h (struct target_ops) <supports_agent>: New.
1116 (target_supports_agent): New macro.
1117 * server.c (handle_general_set): Handle packet 'QAgent'.
1118 (handle_query): Send `QAgent+'.
1119 * Makefile.in (server.o): Depends on agent.h.
1121 2012-03-03 Yao Qi <yao@codesourcery.com>
1123 * Makefile.in (OBS): Add agent.o.
1124 Add new rule for agent.o.
1125 Track dependence of tracepoint.c on agent.h.
1126 * tracepoint.c (run_inferior_command_1):
1127 (run_inferior_command): Call agent_run_command.
1128 (gdb_ust_connect_sync_socket): Deleted. Move it to
1130 (resume_thread, stop_thread): Likewise.
1131 (gdb_ust_socket_init): Renamed to ...
1132 (gdb_agent_socket_init): ... New.
1133 (gdb_ust_thread): Renamed to ...
1134 (gdb_agent_helper_thread): ... New.
1135 (gdb_ust_init): Move some code to ...
1136 (gdb_agent_init): ... here. New.
1137 [HAVE_UST]: Call gdb_ust_init.
1138 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1139 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1140 * config.in, configure: Regenerated.
1142 2012-03-02 Pedro Alves <palves@redhat.com>
1144 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1145 * linux-low.c (struct simple_pid_list): New.
1146 (stopped_pids): New a struct simple_pid_list pointer.
1147 (add_to_pid_list, pull_pid_from_list): New.
1148 (handle_extended_wait): Don't assume the first signal new children
1149 report is SIGSTOP. Adjust call to pull_pid_from_list.
1150 (linux_wait_for_lwp): Adjust.
1152 2012-03-02 Yao Qi <yao@codesourcery.com>
1154 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1157 2012-03-02 Yao Qi <yao@codesourcery.com>
1159 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1160 `stop_pc' and `tpoint'. Update caller.
1162 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1164 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1165 * linux-low.c (use_linux_regsets): New macro.
1166 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1167 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1168 (linux_register_in_regsets): New function.
1169 (usr_fetch_inferior_registers): Skip registers covered by
1171 (usr_store_inferior_registers): Likewise.
1172 (usr_fetch_inferior_registers): New macro.
1173 (usr_store_inferior_registers): Likewise.
1174 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1175 (linux_store_registers): Likewise.
1176 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1178 (init_registers_mips64_dsp_linux): Likewise.
1179 (init_registers_mips_linux): New macro.
1180 (init_registers_mips_dsp_linux): Likewise.
1181 (mips_dsp_num_regs): Likewise.
1182 (DSP_BASE, DSP_CONTROL): New fallback macros.
1183 (mips_base_regs): New macro.
1184 (mips_regmap): Use it. Fix the size.
1185 (mips_dsp_regmap): New variable.
1186 (mips_dsp_regset_bitmap): Likewise.
1187 (mips_arch_setup): New function.
1188 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1190 (mips_cannot_store_register): Likewise.
1191 (the_low_target): Update .arch_setup, .num_regs and .regmap
1192 initializers. Add .regset_bitmap initializer.
1193 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1195 * linux-bfin-low.c (the_low_target): Likewise.
1196 * linux-cris-low.c (the_low_target): Likewise.
1197 * linux-crisv32-low.c (the_low_target): Likewise.
1198 * linux-ia64-low.c (the_low_target): Likewise.
1199 * linux-m32r-low.c (the_low_target): Likewise.
1200 * linux-m68k-low.c (the_low_target): Likewise.
1201 * linux-ppc-low.c (the_low_target): Likewise.
1202 * linux-s390-low.c (the_low_target): Likewise.
1203 * linux-sh-low.c (the_low_target): Likewise.
1204 * linux-sparc-low.c (the_low_target): Likewise.
1205 * linux-tic6x-low.c (the_low_target): Likewise.
1206 * linux-x86-low.c (the_low_target): Likewise.
1207 * linux-xtensa-low.c (the_low_target): Likewise.
1208 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1209 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1210 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1212 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1213 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1215 2012-02-29 Yao Qi <yao@codesourcery.com>
1216 Pedro Alves <palves@redhat.com>
1218 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1219 `step_over_finished' is true.
1221 2012-02-27 Pedro Alves <palves@redhat.com>
1223 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1224 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1226 2012-02-27 Pedro Alves <palves@redhat.com>
1229 * linux-low.c (pid_is_stopped): New.
1230 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1232 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1234 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1237 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1239 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1241 2012-02-24 Luis Machado <lgustavo@codesourcery>
1243 * server.c (handle_query): Advertise support for target-side
1244 breakpoint condition evaluation.
1245 (process_point_options): New function.
1246 (process_serial_event): When inserting a breakpoint, check for
1247 a target-side condition that should be evaluated.
1249 * mem-break.c: Include regcache.h and ax.h.
1250 (point_cond_list_t): New data structure.
1251 (breakpoint) <cond_list>: New field.
1252 (find_gdb_breakpoint_at): Make non-static.
1253 (delete_gdb_breakpoint_at): Clear any target-side
1255 (clear_gdb_breakpoint_conditions): New function.
1256 (add_condition_to_breakpoint): Likewise.
1257 (add_breakpoint_condition): Likewise.
1258 (gdb_condition_true_at_breakpoint): Likewise.
1259 (gdb_breakpoint_here): Return result directly instead
1260 of going through a local variable.
1262 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1263 (clear_gdb_breakpoint_conditions): Likewise.
1264 (add_breakpoint_condition): Likewise.
1265 (gdb_condition_true_at_breakpoint): Likewise.
1267 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1268 (need_step_over_p): Take target-side breakpoint condition into
1271 2012-02-24 Luis Machado <lgustavo@codesourcery>
1273 * server.h: Include tracepoint.h.
1274 (agent_mem_read, agent_get_trace_state_variable_value,
1275 agent_set_trace_state_variable_value,
1276 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1277 get_set_tsv_func_addr): New prototypes.
1279 * ax.h: New include file.
1280 * ax.c: New source file.
1282 * tracepoint.c: Include ax.h.
1283 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1284 agent_expr, eval_result_type): Move to ax.h.
1285 (parse_agent_expr): Rename to ...
1286 (gdb_parse_agent_expr): ... this, make it non-static and move
1288 (unparse_agent_expr) Rename to ...
1289 (gdb_unparse_agent_expr): ... this, make it non-static and move
1291 (eval_agent_expr): Rename to ...
1292 (eval_tracepoint_agent_expr): ... this.
1293 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1294 forward declarations.
1295 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1296 (agent_get_trace_state_variable_value): New function.
1297 (agent_set_trace_state_variable_value): New function.
1298 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1299 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1300 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1301 (condition_true_at_tracepoint): Likewise.
1302 (parse_agent_expr): Rename to ...
1303 (gdb_parse_agent_expr): ... this and move to ax.c.
1304 (unparse_agent_expr): Rename to ...
1305 (gdb_unparse_agent_expr): ... this and move to ax.c.
1306 (gdb_agent_op_name): Move to ax.c.
1307 (eval_agent_expr): Rename to ...
1308 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1310 (eval_tracepoint_agent_expr): New function.
1311 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1313 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1315 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1316 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1317 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1318 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1319 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1320 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1321 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1322 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1323 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1324 (compile_bytecodes): Remove forward declaration.
1325 (is_goto_target): Move to ax.c.
1326 (compile_bytecodes): Move to ax.c and call
1327 agent_get_trace_state_variable_value (...) and
1328 agent_set_trace_state_variable_value (...).
1330 * Makefile.in: Update ax.c and IPA dependencies.
1332 2012-02-24 Pedro Alves <palves@redhat.com>
1334 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1335 (cmd_bigqtbuffer_circular): ... this. Only handle
1336 'QTBuffer:circular:'.
1337 (handle_tracepoint_general_set): Adjust.
1339 2012-02-16 Yao Qi <yao@codesourcery.com>
1341 * inferiors.c: Move code to ...
1342 * dll.c: .... here. New.
1343 * server.h: Declare clear_dlls.
1344 * Makefile.in (SFILES): Add dll.c.
1348 2012-02-11 Yao Qi <yao@codesourcery.com>
1350 * server.c: (handle_monitor_command): Add a new parameter
1352 (handle_query): Update caller.
1354 2012-02-09 Joel Brobecker <brobecker@adacore.com>
1356 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1357 * configure, config.in: Regenerate.
1358 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1361 2012-02-02 Pedro Alves <palves@redhat.com>
1363 Try SIGKILL first, then PTRACE_KILL.
1364 * linux-low.c (linux_kill_one_lwp): New.
1365 (linux_kill_one_lwp): Rename to ...
1366 (kill_one_lwp_callback): ... this. Use the new
1369 2012-02-02 Pedro Alves <palves@redhat.com>
1371 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1374 2012-01-27 Pedro Alves <palves@redhat.com>
1376 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1377 (elf_64_file_p): Make static.
1378 (linux_pid_exe_is_elf_64_file): New.
1379 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1380 Delete declarations.
1381 (linux_pid_exe_is_elf_64_file): Declare.
1382 * linux-x86-low.c (x86_arch_setup): Use
1383 linux_pid_exe_is_elf_64_file.
1385 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1387 * linux-low.c (linux_wait_for_event_1): Rename to ...
1388 (linux_wait_for_event): ... here and merge it with former
1389 linux_wait_for_event - new variable wait_ptid, use it.
1390 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1392 2012-01-23 Pedro Alves <palves@redhat.com>
1394 * server.c (main): Avoid yet another case of infinite loop while
1395 detaching/killing after a longjmp.
1397 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1400 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1402 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1404 * hostio.c (handle_readlink): New function.
1405 (handle_vFile): Call it to handle "vFile:readlink" packets.
1407 2012-01-20 Pedro Alves <palves@redhat.com>
1408 Ulrich Weigand <ulrich.weigand@linaro.org>
1410 * server.c (handle_v_requests): Only support vAttach and vRun to
1411 start multiple processes when in extended protocol mode.
1413 2012-01-17 Pedro Alves <palves@redhat.com>
1415 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1416 memalign plus mprotect to allocate the scratch buffer.
1418 2012-01-13 Pedro Alves <palves@redhat.com>
1420 * server.c (attach_inferior): Clear `cont_thread'.
1422 2012-01-13 Pedro Alves <palves@redhat.com>
1424 * server.c (main): Avoid infinite loop while detaching/killing
1427 2012-01-09 Doug Evans <dje@google.com>
1429 * server.c (start_inferior): Set last_ptid in --wrapper case.
1431 2012-01-06 Yao Qi <yao@codesourcery.com>
1433 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1435 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1437 2012-01-04 Yao Qi <yao@codesourcery.com>
1439 * tracepoint.c (cmd_qtdp): Print debug message
1440 for static tracepoint.
1442 2012-01-04 Yao Qi <yao@codesourcery.com>
1444 * tracepoint.c (trace_vdebug): Differentiate debug message
1445 between gdbserver and IPA.
1447 2012-01-03 Yao Qi <yao@codesourcery.com>
1449 * tracepoint.c (tracepoint_was_hit): Don't collect for
1452 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1454 * terminal.h: Reformat copyright header.
1456 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1458 * server.c (gdbserver_version): Update copyright year.
1459 * gdbreplay.c (gdbreplay_version): Likewise.
1461 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1463 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1466 2011-12-18 Hui Zhu <teawater@gmail.com>
1467 * linux-low.c (linux_create_inferior): Save return value to ret.
1469 2011-12-18 Hui Zhu <teawater@gmail.com>
1471 * linux-low.c (linux_create_inferior): Save return value to ret.
1473 2011-12-16 Doug Evans <dje@google.com>
1475 * linux-low.c (linux_create_inferior): If stdio connection,
1476 redirect stdin from /dev/null, stdout to stderr.
1477 * remote-utils.c (remote_is_stdio): New static global.
1478 (remote_connection_is_stdio): New function.
1479 (remote_prepare): Handle stdio connection.
1480 (remote_open): Ditto.
1481 (remote_close): Don't close stdin for stdio connections.
1482 (read_prim,write_prim): New functions. Replace all calls to
1483 read/write to these.
1484 * server.c (main): Watch for "-" argument. Move call to
1485 remote_prepare before start_inferior.
1486 * server.h (STDIO_CONNECTION_NAME): New macro.
1487 (remote_connection_is_stdio): Declare.
1489 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1490 in debugging output.
1492 2011-12-15 Yao Qi <yao@codesourcery.com>
1494 * tracepoint.c: Include sys/syscall.h.
1495 (gdb_ust_thread): Remove preprocessor conditional.
1497 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1499 * linux-low.c (linux_detach_one_lwp): Call
1500 the_low_target.prepare_to_resume before detaching.
1502 2011-12-14 Yao Qi <yao@codesourcery.com>
1504 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1507 2011-12-14 Yao Qi <yao@codesourcery.com>
1509 * i386-low.c (i386_low_stopped_data_address): Initialize local
1512 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1516 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1517 DR_CONTROL unless necessary. Extend comments.
1518 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1519 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1521 2011-12-13 Yao Qi <yao@codesourcery.com>
1523 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1525 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1527 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1529 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1530 Print new debug message for such case.
1532 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1534 Fix overlapping memcpy.
1535 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1536 the read_inferior_memory transfer.
1537 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1538 write_inferior_memory transfer.
1539 (set_fast_tracepoint_jump): New variable buf. Use it for the
1540 read_inferior_memory and write_inferior_memory transfers.
1541 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1542 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1543 Use it for the write_inferior_memory transfer.
1544 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1547 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1549 * linux-low.c (fetch_register, store_register): Make code
1550 consistent, fix formatting.
1552 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1554 * linux-low.c (usr_store_inferior_registers): Factor out code
1555 to handle individual registers into...
1556 (store_register): ... this new function.
1558 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1560 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1561 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1562 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1563 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1564 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1565 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1566 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1567 (srv_xmlfiles): Add new XML files.
1569 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1571 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1572 (init_registers_s390_linux32v1): Add prototype.
1573 (init_registers_s390_linux32v2): Likewise.
1574 (init_registers_s390_linux64v1): Likewise.
1575 (init_registers_s390_linux64v2): Likewise.
1576 (init_registers_s390x_linux64v1): Likewise.
1577 (init_registers_s390x_linux64v2): Likewise.
1578 (s390_num_regs): Increment to 52.
1579 (s390_regmap): Add orig_r2 register.
1580 (s390_num_regs_3264): Increment to 68.
1581 (s390_regmap_3264): Add orig_r2 register.
1582 (s390_collect_ptrace_register): Handle orig_r2 register.
1583 (s390_supply_ptrace_register): Likewise.
1584 (s390_fill_last_break): New function.
1585 (s390_store_last_break): Likewise.
1586 (s390_fill_system_call): New function.
1587 (s390_store_system_call): Likewise.
1588 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1590 (s390_check_regset): New function.
1591 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1592 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1593 Update target_regsets for available register sets.
1595 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1596 Jan Kratochvil <jan.kratochvil@redhat.com>
1598 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1599 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1601 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1602 * linux-low.h (struct process_info_private): New member r_debug.
1603 * server.c (handle_qxfer_libraries): Call
1604 the_target->qxfer_libraries_svr4.
1605 (handle_qxfer_libraries_svr4): New function.
1606 (qxfer_packets): New entry "libraries-svr4".
1607 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1608 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1609 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1610 PACKET_qXfer_libraries_svr4.
1612 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1614 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1615 PSW address/mask between 8-byte and 16-byte formats.
1616 (s390_supply_ptrace_register): Likewise.
1617 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1618 basic addressing mode bit.
1620 2011-11-24 Stan Shebs <stan@codesourcery.com>
1622 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1624 2011-11-17 Stan Shebs <stan@codesourcery.com>
1626 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1627 (tracing_start_time): New global.
1628 (tracing_stop_time): New global.
1629 (tracing_user_name): New global.
1630 (tracing_notes): New global.
1631 (tracing_stop_note): New global.
1632 (cmd_qtstart): Set traceframe_usage, start_time.
1633 (stop_tracing): Set stop_time.
1634 (cmd_qtstatus): Report additional status.
1635 (cmd_qtp): New function.
1636 (handle_tracepoint_query): Call it.
1637 (cmd_qtnotes): New function.
1638 (handle_tracepoint_general_set): Call it.
1639 (get_timestamp): Rename from tsv_get_timestamp.
1641 2011-11-14 Stan Shebs <stan@codesourcery.com>
1642 Kwok Cheung Yeung <kcy@codesourcery.com>
1644 * linux-x86-low.c (small_jump_insn): New.
1645 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1646 trampoline and error message, build a trampoline and issue a small
1647 jump instruction to it.
1648 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1649 trampoline and error message.
1650 (x86_get_min_fast_tracepoint_insn_len): New.
1651 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1652 * linux-low.h (struct linux_target_ops): Add arguments to
1653 install_fast_tracepoint_jump_pad operation, add new operation.
1654 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1656 (linux_get_min_fast_tracepoint_insn_len): New function.
1657 (linux_target_op): Add new operation.
1658 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1659 (gdb_trampoline_buffer_end): Ditto.
1660 (gdb_trampoline_buffer_error): Ditto.
1661 (struct ipa_sym_addresses): Add fields for new IPA variables.
1662 (symbol_list): Add entries for new IPA variables.
1663 (struct tracepoint): Add fields to hold the address range of the
1664 trampoline used by the tracepoint.
1665 (trampoline_buffer_head): New static variable.
1666 (trampoline_buffer_tail): Ditto.
1667 (claim_trampoline_space): New function.
1668 (have_fast_tracepoint_trampoline_buffer): New function.
1669 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1671 (install_fast_tracepoint): Ditto, also add error buffer argument.
1672 (cmd_qtminftpilen): New function.
1673 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1674 (fast_tracepoint_from_trampoline_address): New function.
1675 (fast_tracepoint_collecting): Handle trampoline as part of jump
1677 (set_trampoline_buffer_space): New function.
1678 (initialize_tracepoint): Initialize new IPA variables.
1679 * target.h (struct target_ops): Add arguments to
1680 install_fast_tracepoint_jump_pad operation, add new
1681 get_min_fast_tracepoint_insn_len operation.
1682 (target_get_min_fast_tracepoint_insn_len): New.
1683 (install_fast_tracepoint_jump_pad): Add arguments.
1684 * server.h (IPA_BUFSIZ): Define.
1685 * linux-i386-ipa.c: Include extra header files.
1686 (initialize_fast_tracepoint_trampoline_buffer): New function.
1687 (initialize_low_tracepoint): Call it.
1688 * server.h (set_trampoline_buffer_space): Declare.
1689 (claim_trampoline_space): Ditto.
1690 (have_fast_tracepoint_trampoline_buffer): Ditto.
1692 2011-11-14 Yao Qi <yao@codesourcery.com>
1694 * server.c (handle_query): Handle InstallInTrace for qSupported.
1695 * tracepoint.c (add_tracepoint): Sort list.
1696 (install_tracepoint, download_tracepoint): New.
1697 (cmd_qtdp): Call them to install and download tracepoints.
1698 (sort_tracepoints): Removed.
1699 (cmd_qtstart): Update.
1701 2011-11-14 Yao Qi <yao@codesourcery.com>
1703 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1704 * mem-break.h: Declare.
1705 * tracepoint.c (cmd_qtstart): Move some code to ...
1706 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1708 (download_tracepoints): Move some code to ...
1709 (download_tracepoint_1): ... here. New.
1711 2011-11-08 Yao Qi <yao@codesourcery.com>
1713 * remote-utils.c (relocate_instruction): A comment fix.
1715 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1717 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1718 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1719 dr_status_mirror and dr_control_mirror from debug_reg_state.
1720 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1721 (i386_initial_stuff): Remove use of deleted globals.
1722 (i386_get_thread_context, i386_set_thread_context,
1723 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1724 from debug_reg_state.
1726 2011-11-05 Yao Qi <yao@codesourcery.com>
1728 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1729 address as TPOINT's.
1731 2011-11-02 Stan Shebs <stan@codesourcery.com>
1733 * tracepoint.c (agent_mem_read_string): New function.
1734 (eval_agent_expr): Call it for tracenz.
1735 * server.c (handle_query): Report support for tracenz.
1737 2011-11-02 Yao Qi <yao@codesourcery.com>
1739 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1741 2011-11-02 Yao Qi <yao@codesourcery.com>
1743 * target.h: Fix a typo in comment.
1745 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1747 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1748 clobber the breakpoints' shadows with fast tracepoint jumps.
1749 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1750 * target.c (write_inferior_memory): Also pass MYADDR down to
1753 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1755 * configure.ac: Check support for personality routine.
1756 * configure: Regenerate.
1757 * config.in: Likewise.
1758 * linux-low.c: Include <sys/personality.h>.
1759 Define ADDR_NO_RANDOMIZE if necessary.
1760 (linux_create_inferior): Disable address space randomization when
1761 forking inferior, if requested.
1762 (linux_supports_disable_randomization): New function.
1763 (linux_target_ops): Install it.
1764 * server.h (disable_randomization): Declare.
1765 * server.c (disable_randomization): New global variable.
1766 (handle_general_set): Handle QDisableRandomization.
1767 (handle_query): Likewise for qSupported.
1768 (main): Support --disable-randomization and --no-disable-randomization
1769 command line arguments.
1770 * target.h (struct target_ops): Add supports_disable_randomization.
1771 (target_supports_disable_randomization): New macro.
1773 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1775 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1777 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1778 [!PT_GETDSBT] (target_loadmap): New definition.
1779 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1780 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1781 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1782 and PT_GETDSBT to LINUX_LOADMAP.
1783 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1784 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1786 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1788 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1789 (arm_linux_hwbp_cap): New static variable.
1790 (arm_linux_get_hwbp_cap): Replace by ...
1791 (arm_linux_init_hwbp_cap): ... this new function.
1792 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1793 (arm_linux_get_hw_watchpoint_count): Likewise.
1794 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1795 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1796 (arm_prepare_to_resume): Use perror_with_name instead of error.
1798 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1800 * linux-arm-low.c: Include <signal.h>.
1801 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1802 (struct arm_linux_hwbp_cap): New data type.
1803 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1804 (struct arm_linux_hw_breakpoint): New data type.
1805 (MAX_BPTS, MAX_WPTS): Define.
1806 (struct arch_process_info, struct arch_lwp_info): New data types.
1807 (arm_linux_get_hwbp_cap): New function.
1808 (arm_linux_get_hw_breakpoint_count): Likewise.
1809 (arm_linux_get_hw_watchpoint_count): Likewise.
1810 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1811 (arm_hwbp_control_initialize): Likewise.
1812 (arm_hwbp_control_is_enabled): Likewise.
1813 (arm_hwbp_control_is_initialized): Likewise.
1814 (arm_hwbp_control_disable): Likewise.
1815 (arm_linux_hw_breakpoint_equal): Likewise.
1816 (arm_linux_hw_point_initialize): Likewise.
1817 (struct update_registers_data): New data structure.
1818 (update_registers_callback: New function.
1819 (arm_insert_point): Likewise.
1820 (arm_remove_point): Likewise.
1821 (arm_stopped_by_watchpoint): Likewise.
1822 (arm_stopped_data_address): Likewise.
1823 (arm_new_process): Likewise.
1824 (arm_new_thread): Likewise.
1825 (arm_prepare_to_resume): Likewise.
1826 (the_low_target): Register arm_insert_point, arm_remove_point,
1827 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1828 arm_new_thread, and arm_prepare_to_resume.
1830 2011-09-15 Stan Shebs <stan@codesourcery.com>
1832 * server.h (struct emit_ops): Add compare-goto fields.
1833 * tracepoint.c (gdb_agent_op_sizes): New table.
1834 (emit_eq_goto): New function.
1835 (emit_ne_goto): New function.
1836 (emit_lt_goto): New function.
1837 (emit_le_goto): New function.
1838 (emit_gt_goto): New function.
1839 (emit_ge_goto): New function.
1840 (is_goto_target): New function.
1841 (compile_bytecodes): Recognize special cases of compare-goto
1842 combinations and call specialized emitters for them.
1843 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1844 (amd64_emit_ne_goto): New function.
1845 (amd64_emit_lt_goto): New function.
1846 (amd64_emit_le_goto): New function.
1847 (amd64_emit_gt_goto): New function.
1848 (amd64_emit_ge_goto): New function.
1849 (amd64_emit_ops): Add the new functions.
1850 (i386_emit_eq_goto): New function.
1851 (i386_emit_ne_goto): New function.
1852 (i386_emit_lt_goto): New function.
1853 (i386_emit_le_goto): New function.
1854 (i386_emit_gt_goto): New function.
1855 (i386_emit_ge_goto): New function.
1856 (i386_emit_ops): Add the new functions.
1858 2011-09-08 Stan Shebs <stan@codesourcery.com>
1860 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1861 (i386_emit_epilogue): Restore %ebx.
1863 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1865 * server.c (step_thread): Remove definition.
1866 (process_serial_event): Don't handle Hs.
1867 * server.h (step_thread): Remove declaration.
1868 * target.c (set_desired_inferior): Remove use of step_thread.
1870 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1872 * linux-low.c: Include linux-procfs.h.
1873 (linux_attach_lwp_1): Update comments.
1874 (linux_attach): Scan for existing threads when attaching to a
1875 process that is the tgid.
1876 * Makefile.in: Update dependencies.
1878 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1880 * configure.srv: Add linux-procfs.o dependencies.
1882 2011-08-14 Yao Qi <yao@codesourcery.com>
1884 * target.h (struct target_ops): Fix indent.
1885 * win32-low.c (win32_target_ops): Fix comment.
1887 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1888 Yao Qi <yao@codesourcery.com>
1890 * Makefile.in (clean): Remove tic6x-*.c files.
1891 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1892 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1893 (tic6x-c64xp-linux.c): Likewise.
1894 * configure.srv: Add support for tic6x-*-uclinux.
1895 * linux-tic6x-low.c: New.
1896 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1898 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1899 Yao Qi <yao@codesourcery.com>
1901 * target.h (struct target_ops): Add read_loadmap.
1902 * linux-low.c (struct target_loadseg): New type.
1903 (struct target_loadmap): New type.
1904 (linux_read_loadmap): New function.
1905 (linux_target_ops): Add linux_read_loadmap.
1906 * server.c (handle_query): Support qXfer:fdpic:read packet.
1907 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1910 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1912 * win32-low.c: Include <stdint.h>.
1914 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1916 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1917 to the inferior here.
1918 (i386_remove_aligned_watchpoint): Ditto.
1919 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1920 fit part of the watchpoint in the debug registers.
1921 (i386_update_inferior_debug_regs): New.
1922 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1923 registers, and only update the inferior on success.
1924 (i386_low_remove_watchpoint): Ditto.
1926 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1928 * linux-low.c (compare_ints, unique, list_threads, show_process,
1929 linux_core_of_thread): Delete.
1930 (linux_target_ops): Change linux_core_of_thread to
1931 linux_common_core_of_thread.
1932 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1933 * utils.c (malloc_failure): Change type of argument.
1934 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1935 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1936 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1937 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1938 (IPA_OBJS): Add common-utils-ipa.o.
1939 (ptid_h, linux_osdata_h): New macros.
1940 (server_h): Add common/common-utils.h, common/xml-utils.h,
1941 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1943 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1944 ptid.o, buffer.o): New rules.
1945 (linux-low.o): Add common/linux-osdata.h as a dependency.
1946 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1947 * configure.ac: Add AC_HEADER_DIRENT check.
1948 * config.in: Regenerate.
1949 * configure: Regenerate.
1950 * remote-utils.c (xml_escape_text): Delete.
1951 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1952 buffer_xml_printf): Move to common/buffer.c.
1953 * server.c (main): Remove call to initialize_inferiors.
1954 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1955 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1956 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1957 internal_error, gdb_assert, gdb_assert_fail): Delete.
1958 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1959 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1961 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1962 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1963 initialize_inferiors): Delete.
1965 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1967 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1970 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1972 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1974 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1976 2011-05-26 Yao Qi <yao@codesourcery.com>
1978 * Makefile.in (thread-db.o): Track dependence to
1979 common/gdb_thread_db.h.
1980 * thread-db.c: include gdb_thread_db.h from right place.
1982 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1984 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1985 __FILE__ and __LINE__ to internal_error.
1987 2011-05-13 Doug Evans <dje@google.com>
1989 * thread-db.c (try_thread_db_load_from_sdir): New function.
1990 (try_thread_db_load_from_dir): New function.
1991 (thread_db_load_search): Handle $sdir, ignore $pdir.
1992 Remove trying of system directories if search of
1993 libthread-db-search-path fails, that is now done via $sdir.
1995 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1997 * server.c (handle_query): Add EnableDisableTracepoints to the list
1998 of supported features.
1999 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2001 (cmd_qtenable_disable): New.
2002 (cmd_qtstart): Install tracepoints even if disabled.
2003 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2004 receiving a QTEnable or QTDisable packet.
2005 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2006 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2008 (gdb_probe): Skip data collection if static tracepoint is disabled.
2010 2011-05-10 Doug Evans <dje@google.com>
2012 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2014 2011-05-04 Doug Evans <dje@google.com>
2016 * linux-low.c (linux_join): Skip process lookup.
2017 * spu-low.c (spu_join): Ditto.
2018 * server.c (join_inferiors_callback): Delete.
2019 (process_serial_event): For 'D' packet (detach) call join_inferior
2022 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2024 * README: Don't mention xscale*-*-linux*.
2025 * configure.srv (xscale*-*-linux*): Don't handle target.
2027 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2029 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2031 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2032 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2033 (i386_emit_void_call_2): Likewise.
2035 2011-04-26 Yao Qi <yao@codesourcery.com>
2037 * linux-low.c: Move common macros to linux-ptrace.h.
2038 Include linux-ptrace.h.
2039 * Makefile.in (linux_ptrace_h): New.
2040 (linux-low.o): Depends on linux-ptrace.h.
2042 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2044 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2045 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2046 (remote_prepare): New function with most of the TCP code from ...
2047 (remote_open): ... here. Detect PORT here unconditionally. Move also
2048 setting transport_is_reliable.
2049 * server.c (run_once): New variable.
2050 (gdbserver_usage): Document it.
2051 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2052 the first run if RUN_ONCE.
2053 * server.h (run_once, remote_prepare): New declarations.
2055 2011-04-19 Tom Tromey <tromey@redhat.com>
2057 * win32-low.c (handle_load_dll): Remove duplicate "the".
2059 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2061 Remove support for old Cygwin 1.5 versions.
2062 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2063 function to avoid warning.
2064 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2067 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2069 * gdbserver/server.h (Macro _): Define it if not available.
2071 2011-03-14 Michael Snyder <msnyder@vmware.com>
2073 * hostio.c (handle_close): Remove unnecessary null test.
2075 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2077 * Makefile.in (maintainer-clean realclean distclean): Remove
2078 "make ... subdir_do" command.
2080 2011-03-10 Michael Snyder <msnyder@vmware.com>
2082 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2084 * server.c (handle_v_run): Free alloced buffer on early return.
2086 2011-03-09 Yao Qi <yao@codesourcery.com>
2089 2011-03-04 Yao Qi <yao@codesourcery.com>
2091 * Makefile.in: Remove GNU make feature --directory.
2093 2011-03-05 Yao Qi <yao@codesourcery.com>
2095 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2096 (subdir_do): New make target. Copied from gdb/Makefile.
2097 (maintainer-clean, realclean, distclean, clean): Call corresponding
2098 make targets in common/Makefile.
2100 2011-02-11 Yao Qi <yao@codesourcery.com>
2102 * configure.ac: Call AC_PROG_RANLIB.
2103 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2104 * configure: Regenerate.
2106 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2108 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2110 2011-03-06 Yao Qi <yao@codesourcery.com>
2112 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2114 2011-03-05 Yao Qi <yao@codesourcery.com>
2116 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2117 (subdir_do): New make target. Copied from gdb/Makefile.
2118 (maintainer-clean, realclean, distclean, clean): Call corresponding
2119 make targets in common/Makefile.
2121 2011-03-04 Yao Qi <yao@codesourcery.com>
2123 * Makefile.in: Remove GNU make feature --directory.
2125 2011-03-04 Michael Snyder <msnyder@vmware.com>
2127 * server.c (queue_stop_reply): Call xmalloc not malloc.
2129 2011-03-02 Michael Snyder <msnyder@vmware.com>
2131 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2133 2011-02-28 Michael Snyder <msnyder@vmware.com>
2135 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2136 (cmd_qtframe): Ditto.
2137 (cmd_qtbuffer): Ditto.
2138 (cmd_bigqtbuffer): Ditto.
2140 * utils.c (decimal2str): Initialize 'width' to nine, then
2143 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2145 * hostio.c (require_data): Free *data, not data.
2147 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2149 * hostio.c (require_data): Use free, not xfree.
2151 2011-02-27 Michael Snyder <msnyder@vmware.com>
2153 * server.c (handle_query): Discard unused value.
2155 * hostio.c (require_data): Free malloc memory before returning
2158 2011-02-26 Michael Snyder <msnyder@vmware.com>
2160 * linux-low.c (list_threads): Call closedir for dirent.
2162 2011-02-27 Michael Snyder <msnyder@vmware.com>
2164 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2165 a case statement falls through.
2167 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2169 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2172 2011-02-26 Michael Snyder <msnyder@vmware.com>
2174 * utils.c (decimal2str): Eliminate dead code and dead param.
2175 (pulongest): Drop dead param from call to decimal2str.
2178 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2180 Revert the following patch (not approved yet):
2181 2011-02-21 Hui Zhu <teawater@gmail.com>
2182 * tracepoint.c (tp_printf): New function.
2183 (eval_agent_expr): Handle gdb_agent_op_printf.
2185 2011-02-21 Hui Zhu <teawater@gmail.com>
2187 * tracepoint.c (tp_printf): New function.
2188 (eval_agent_expr): Handle gdb_agent_op_printf.
2190 2011-02-18 Tom Tromey <tromey@redhat.com>
2192 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2193 (tracepoint.o): Likewise.
2194 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2195 (gdb_agent_op_names): Likewise.
2197 2011-02-18 Tom Tromey <tromey@redhat.com>
2199 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2200 gdb_agent_op_rot>: New constants.
2201 (gdb_agent_op_names): Add pick and roll.
2202 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2205 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2207 * aclocal.m4: Regenerated with aclocal-1.11.1.
2209 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2211 * server.c (handle_qxfer_traceframe_info): New.
2212 (qxfer_packets): Register "traceframe-info".
2213 (handle_query): Report support for qXfer:traceframe-info:read+.
2214 * tracepoint.c (match_blocktype): New.
2215 (traceframe_find_block_type): Rename to ...
2216 (traceframe_walk_blocks): ... this. Add callback filter argument,
2218 (traceframe_find_block_type): New, reimplemented on top of
2219 traceframe_walk_blocks.
2220 (build_traceframe_info_xml): New.
2221 (traceframe_read_info): New.
2222 * server.h (traceframe_read_info): Declare.
2224 2011-02-11 Yao Qi <yao@codesourcery.com>
2226 * configure.ac: Call AC_PROG_RANLIB.
2227 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2228 * configure: Regenerate.
2230 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2232 * server.c (gdb_read_memory): Change return semantics to allow
2234 (handle_search_memory_1): Adjust.
2235 (process_serial_event) <'m' packet>: Handle partial transfers.
2236 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2238 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2240 * regcache.c (init_register_cache): Initialize
2241 regcache->register_status.
2242 (free_register_cache): Release regcache->register_status.
2243 (regcache_cpy): Copy register_status.
2244 (registers_to_string): Print 'x's for unavailable registers.
2245 (supply_register): Mark the register's status valid or
2246 unavailable, depending on whether a buffer was passed in or not.
2247 (supply_register_zeroed): New.
2248 (supply_regblock): Mark the registers' status valid or
2249 unavailable, depending on whether a buffer was passed in or not.
2250 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2251 (struct regcache): New `register_status' field.
2252 (supply_register_zeroed): Declare.
2253 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2254 supply_register_zeroed, rather than passing a NULL buffer to
2256 * tracepoint.c (fetch_traceframe_registers): Update comment.
2258 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2260 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2263 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2265 * server.h (decode_xfer_write): Change prototype.
2266 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2267 and don't extract the annex here.
2268 * server.c (decode_xfer_read): Remove `annex' parameter,
2269 and don't extract the annex here.
2271 (struct qxfer): New.
2272 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2273 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2274 (handle_qxfer_statictrace): New functions, abstracted out from
2275 handle_query, and made to use the struct qxfer interface.
2276 (handle_threads_qxfer_proper): Rename to ...
2277 (handle_qxfer_threads_proper): ... this.
2278 (handle_threads_qxfer): Rename to ...
2279 (handle_qxfer_threads): ... this. Adjust.
2280 (qxfer_packets): New array.
2281 (handle_qxfer): New function.
2282 (handle_query): Use handle_qxfer.
2284 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2286 * gdbreplay.c: Shorten lines of >= 80 columns.
2287 * linux-low.c: Ditto.
2288 * linux-ppc-low.c: Ditto.
2289 * linux-s390-low.c: Ditto.
2290 * linux-sparc-low.c: Ditto.
2291 * linux-x86-low.c: Ditto.
2292 * linux-xtensa-low.c: Ditto.
2293 * mem-break.c: Ditto.
2295 * regcache.h: Ditto.
2296 * remote-utils.c: Ditto.
2299 * thread-db.c: Ditto.
2300 * tracepoint.c: Ditto.
2302 * win32-low.h: Ditto.
2304 2011-01-05 Joel Brobecker <brobecker@adacore.com>
2306 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2309 2011-01-01 Joel Brobecker <brobecker@adacore.com>
2311 * server.c (gdbserver_version): Update copyright year in version
2313 * gdbreplay.c (gdbreplay_version): Ditto.
2315 2010-12-29 Jie Zhang <jie.zhang@analog.com>
2317 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2318 * linux-bfin-low.c: New file.
2319 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2320 PT_DATA_ADDR for BFIN targets.
2321 * Makefile.in (SFILES): Add linux-bfin-low.c.
2322 (clean): Remove reg-bfin.c.
2323 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2324 * README: Mention supported Blackfin targets.
2326 2010-12-23 Mike Frysinger <vapier@gentoo.org>
2328 * .gitignore: New file.
2330 2010-11-16 Mike Frysinger <vapier@gentoo.org>
2332 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2334 2010-10-22 Jie Zhang <jie@codesourcery.com>
2336 * Makefile.in: Add FLAGS_TO_PASS variable.
2337 (install): Remove dependency of install-only and recursively
2338 invoke make for install-only.
2340 2010-10-04 Doug Evans <dje@google.com>
2342 * Makefile.in (uninstall): Use $(DESTDIR).
2344 2010-09-24 Pedro Alves <pedro@codesourcery.com>
2348 * linux-x86-low.c (compat_siginfo_from_siginfo)
2349 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2350 si_code is < 0. Check for si_code == SI_TIMER before checking for
2353 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2355 * lynx-i386-low.c: New file.
2356 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2358 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2360 * lynx-low.c (ptrace_request_to_str): Remove handling for
2361 request values that have been removed in LynxOS 5.x.
2363 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2365 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2368 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2370 * configure.ac: Add --enable-inprocess-agent option.
2371 * configure: Rebuilt.
2373 2010-09-06 Yao Qi <yao@codesourcery.com>
2375 * linux-low.c (linux_kill): Remove unused variable.
2376 (linux_stabilize_threads): Likewise.
2377 * server.c (start_inferior): Likewise.
2378 (queue_stop_reply_callback): Likewise.
2379 * tracepoint.c (do_action_at_tracepoint): Likewise.
2381 2010-09-06 Yao Qi <yao@codesourcery.com>
2383 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2386 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2388 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2390 2010-09-06 Pedro Alves <pedro@codesourcery.com>
2392 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2395 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2397 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2398 gdbserver/lynx-ppc-low.c: New files.
2399 * Makefile.in (lynx_low_h): New variable.
2400 (lynx-low.o, lynx-ppc-low.o): New rules.
2401 * configure.ac: On LynxOS, link with -lnetinet.
2402 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2403 * configure: regenerate.
2405 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2407 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2408 * configure.ac: Add check for vasprintf and vsnprintf.
2409 * configure, config.in: Regenerate.
2410 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2412 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2414 * gdbreplay.c: Move include of alloca.h up, next to include of
2416 * server.h: Add include of malloc.h.
2417 * mem-break.c: Remove include of malloc.h.
2418 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2422 * Makefile.in (memmem.o): Build with -Wno-error.
2424 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2426 * utils.c (xsnprintf): Make non-static.
2427 * server.h: Add xsnprintf declaration.
2428 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2429 replace calls to snprintf by calls to xsnprintf throughout.
2431 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2433 * configure.ac: Add configure check for alloca.
2434 * configure, config.in: Regenerate.
2435 * server.h: Include alloca.h if it exists.
2436 * gdbreplay.c: Include alloca.h if it exists.
2438 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2440 * linux-low.c (__SIGRTMIN): Define if not already defined.
2441 (linux_create_inferior): Check for __ANDROID__ rather than
2443 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2444 are already deferred.
2445 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2446 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2447 stopped and already has a pending signal to report.
2448 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2449 a pending signal to report or is moving out of a jump pad.
2450 (linux_init_signals): Check for __ANDROID__ rather than
2453 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2455 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2456 debug_threads check. Avoid a linear search when not doing debug
2459 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2461 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2462 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2463 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2464 (process_event): Change local fd's type to gdb_fildes_t.
2465 (create_file_handler): Adjust prototype.
2466 (delete_file_handler): Adjust prototype.
2467 (handle_file_event): Adjust prototype. Use pfildes.
2468 (create_file_event): Adjsut prototype.
2469 * remote-utils.c (remote_desc, listen_desc): Change type to
2471 * server.h: New gdb_fildes_t typedef.
2472 [USE_WIN32API]: Include winsock2.h.
2473 (delete_file_handler, add_file_handler): Adjust prototypes.
2475 * utils.c (pfildes): New.
2477 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2479 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2480 * configure: Regenerate.
2482 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2484 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2485 (linux_done_accessing_memory): ... this.
2486 (linux_target_ops): Adjust.
2487 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2488 * nto-low.c (nto_target_ops): Adjust comment.
2489 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2490 * spu-low.c (spu_target_ops): Adjust comment.
2491 * target.h (target_ops): Rename unprepare_to_access_memory field
2492 to done_accessing_memory.
2493 (unprepare_to_access_memory): Rename to ...
2494 (done_accessing_memory): ... this.
2496 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2498 * linux-low.c (linux_prepare_to_access_memory): New.
2499 (linux_unprepare_to_access_memory): New.
2500 (linux_target_ops): Install them.
2501 * server.c (read_memory): Rename to ...
2502 (gdb_read_memory): ... this. Use
2503 prepare_to_access_memory/prepare_to_access_memory.
2504 (write_memory): Rename to ...
2505 (gdb_write_memory): ... this. Use
2506 prepare_to_access_memory/prepare_to_access_memory.
2507 (handle_search_memory_1): Adjust.
2508 (process_serial_event): Adjust.
2509 * target.h (struct target_ops): New fields
2510 prepare_to_access_memory and unprepare_to_access_memory.
2511 (prepare_to_access_memory, unprepare_to_access_memory): New.
2512 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2513 prepare_to_access_memory/prepare_to_access_memory.
2514 * nto-low.c (nto_target_ops): Adjust.
2515 * spu-low.c (spu_target_ops): Adjust.
2516 * win32-low.c (win32_target_ops): Adjust.
2518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2520 * Makefile.in (WARN_CFLAGS): Get it from configure.
2521 (WERROR_CFLAGS): New.
2522 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2523 * configure.ac: Introduce --enable-werror, which adds -Werror to
2524 the compiler command line. Enabled by default. Disable with
2525 --disable-werror. Add -Wdeclaration-after-statement
2526 Wpointer-arith and -Wformat-nonliteral to warning flags.
2527 * configure: Regenerate.
2529 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2531 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2533 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2535 * gdbreplay.c (remote_error): New.
2537 (expect): Use gdbchar. Check for error reading from GDB.
2538 Clarify sync error output.
2539 (play): Check for errors writing to GDB.
2540 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2541 * remote-utils.c (getpkt): Check for errors writing to the remote
2544 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2546 * linux-low.c (linux_wait_1): Move non-debugging code out of
2547 `debug_threads' control.
2549 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2551 * linux-low.c (linux_wait_1): Don't set last_status here.
2552 * server.c (push_event, queue_stop_reply_callback): Assert we're
2553 not pushing a TARGET_WAITKIND_IGNORE event.
2554 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2555 (myresume, handle_target_event): Set the thread's last_resume_kind
2556 and last_status from the target returned status.
2558 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2562 * linux-x86-low.c (update_debug_registers_callback): New.
2563 (i386_dr_low_set_addr): Use it.
2564 (i386_dr_low_get_addr): New.
2565 (i386_dr_low_set_control): Use update_debug_registers_callback.
2566 (i386_dr_low_get_control): New.
2567 (i386_dr_low_get_status): Adjust.
2568 * linux-low.c (linux_stop_lwp): New.
2569 * linux-low.h (linux_stop_lwp): Declare.
2571 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2572 argument instead of a i386_debug_reg_state.
2573 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2574 a i386_debug_reg_state.
2575 (i386_insert_aligned_watchpoint): Adjust.
2576 (i386_remove_aligned_watchpoint): Adjust.
2577 (i386_low_stopped_data_address): Read the debug registers from the
2578 inferior instead of from the mirrors.
2579 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2580 (i386_dr_low_get_addr): Declare.
2581 (i386_dr_low_get_control): Declare.
2582 (i386_dr_low_get_status): Change prototype.
2584 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2585 (i386_dr_low_get_addr): New.
2586 (i386_dr_low_get_control): New.
2587 (i386_dr_low_get_status): Adjust prototype. Return
2589 (i386_initial_stuff): Clear dr_status_mirror and
2591 (i386_get_thread_context): Adjust.
2592 (i386_set_thread_context): Adjust.
2593 (i386_thread_added): Adjust.
2595 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2597 * linux-low.h (linux_thread_area): Delete declaration.
2599 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2601 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2602 after its termination.
2604 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2606 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2607 (gdb_wants_all_stopped): Delete.
2608 (linux_wait_1): Don't call them.
2609 * server.c (handle_v_cont): Tag all threads as want-stopped.
2610 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2611 stopped as "client-wants-stopped".
2613 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2615 * Makefile.in (signals_h): New.
2616 (server_h): Depend on it.
2617 (server.o): Don't depend on $(signals_def).
2618 (signals.o): Depend on $(signals_def).
2620 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2622 * Makefile.in (signals_def): New.
2623 (server_h): Append include/gdb/signals.h and signals_def.
2624 (server.o): Append signals_def.
2626 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2628 * server.c (handle_target_event): Use target_signal_to_host for
2629 resume_info.sig initialization.
2630 * target.h (struct thread_resume) <sig>: New comment.
2632 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2634 * server.c (handle_query): strcpy() the returned string from paddress()
2635 instead of sprintf().
2636 * utils.c (paddress): Return phex_nz().
2638 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2640 * server.c (handle_v_cont): Call mourn_inferior if process
2642 (myresume): Likewise.
2644 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2646 Static tracepoints, and integration with UST.
2648 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2649 * mem-break.c (uninsert_all_breakpoints)
2650 (reinsert_all_breakpoints): New.
2651 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2652 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2653 (gdb_agent_ust_loaded, helper_thread_id)
2654 (gdb_agent_helper_thread_id): New macros.
2655 (struct ipa_sym_addresses): Add addr_ust_loaded,
2656 addr_helper_thread_id, addr_cmd_buf.
2657 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2658 (in_process_agent_loaded_ust): New.
2659 (write_e_ust_not_loaded): New.
2660 (maybe_write_ipa_ust_not_loaded): New.
2661 (struct collect_static_trace_data_action): New.
2662 (enum tracepoint_type) <static_tracepoint>: New.
2663 (struct tracepoint) <handle>: Mention static tracepoints.
2664 (struct static_tracepoint_ctx): New.
2665 (CMD_BUF_SIZE): New.
2666 (add_tracepoint_action): Handle static tracepoint actions.
2667 (unprobe_marker_at): New.
2668 (clear_installed_tracepoints): Handle static tracepoints.
2669 (cmd_qtdp): Handle static tracepoints.
2670 (probe_marker_at): New.
2671 (cmd_qtstart): Handle static tracepoints.
2672 (response_tracepoint): Handle static tracepoints.
2673 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2674 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2675 (get_context_regcache): Handle static tracepoints.
2676 (do_action_at_tracepoint): Handle static tracepoint actions.
2677 (traceframe_find_block_type): Handle static trace data blocks.
2678 (traceframe_read_sdata): New.
2679 (download_tracepoints): Download static tracepoint actions.
2680 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2681 (GDB_PROBE_NAME): New.
2686 (ust_marker_to_static_tracepoint): New.
2688 (collect_ust_data_at_tracepoint): New.
2689 (gdb_ust_probe): New.
2690 (UNIX_PATH_MAX, SOCK_DIR): New.
2691 (gdb_ust_connect_sync_socket): New.
2692 (resume_thread, stop_thread): New.
2693 (run_inferior_command): New.
2694 (init_named_socket): New.
2695 (gdb_ust_socket_init): New.
2696 (cstr_to_hexstr): New.
2698 (first_marker, next_marker): New.
2699 (response_ust_marker): New.
2700 (cmd_qtfstm, cmd_qtsstm): New.
2701 (unprobe_marker_at, probe_marker_at): New.
2702 (cmd_qtstmat, gdb_ust_thread): New.
2703 (gdb_ust_init): New.
2704 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2705 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2707 (x86_64_st_collect_regmap): New.
2708 (X86_64_NUM_ST_COLLECT_GREGS): New.
2709 (AMD64_RIP_REGNUM): New.
2710 (supply_static_tracepoint_registers): New.
2711 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2713 (i386_st_collect_regmap): New.
2714 (i386_NUM_ST_COLLECT_GREGS): New.
2715 (supply_static_tracepoint_registers): New.
2716 * server.c (handle_query): Handle qXfer:statictrace:read.
2717 <qSupported>: Report support for StaticTracepoints, and
2718 qXfer:statictrace:read features.
2719 * server.h (traceframe_read_sdata)
2720 (supply_static_tracepoint_registers): Declare.
2721 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2722 (unpack_varlen_hex): Include in IPA build.
2723 * Makefile.in (ustlibs, ustinc): New.
2724 (IPA_OBJS): Add remote-utils-ipa.o.
2725 ($(IPA_LIB)): Link -ldl and -lpthread.
2727 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2728 * config.in, configure: Regenerate.
2730 2010-06-20 Ian Lance Taylor <iant@google.com>
2731 Pedro Alves <pedro@codesourcery.com>
2733 * linux-x86-low.c (always_true): Delete.
2734 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2735 trying to fool the compiler with always_true.
2737 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2739 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2740 conditions in gdbserver.
2742 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2744 * spu-low.c (spu_read_memory): Wrap around local store limit.
2745 (spu_write_memory): Likewise.
2747 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2749 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2750 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2752 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2754 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2755 uses with LONGEST uses.
2757 2010-06-14 Stan Shebs <stan@codesourcery.com>
2758 Pedro Alves <pedro@codesourcery.com>
2762 * linux-x86-low.c: Include limits.h.
2767 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2768 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2769 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2770 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2771 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2772 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2773 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2774 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2775 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2776 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2777 (amd64_emit_void_call_2): New.
2778 (amd64_emit_ops): New.
2779 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2780 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2781 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2782 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2783 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2784 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2785 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2786 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2787 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2788 (i386_emit_stack_adjust, i386_emit_int_call_1)
2789 (i386_emit_void_call_2): New.
2790 (i386_emit_ops): New.
2791 (x86_emit_ops): New.
2792 (the_low_target): Install x86_emit_ops.
2793 * server.h (struct emit_ops): New.
2794 (get_raw_reg_func_addr): Declare.
2795 (current_insn_ptr, emit_error): Declare.
2796 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2797 (set_trace_state_variable_value): New defines.
2798 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2799 addr_get_trace_state_variable_value and
2800 addr_set_trace_state_variable_value.
2801 (symbol_list): New fields for get_raw_reg,
2802 get_trace_state_variable_value and set_trace_state_variable_value.
2803 (condfn): New typedef.
2804 (struct tracepoint): New field `compiled_cond'.
2805 (do_action_at_tracepoint): Clear compiled_cond.
2806 (get_trace_state_variable_value, set_trace_state_variable_value):
2808 (condition_true_at_tracepoint): If there's a compiled condition,
2810 (current_insn_ptr, emit_error): New globals.
2811 (struct bytecode_address): New.
2812 (get_raw_reg_func_addr): New.
2813 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2814 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2815 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2816 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2817 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2818 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2819 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2820 (compile_tracepoint_condition, compile_bytecodes): New.
2821 * target.h (emit_ops): Forward declare.
2822 (struct target_ops): New field emit_ops.
2823 (target_emit_ops): New.
2824 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2825 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2826 * linux-low.c (linux_emit_ops): New.
2827 (linux_target_ops): Install it.
2828 * linux-low.h (struct linux_target_ops): New field emit_ops.
2830 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2832 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2833 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2835 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2836 Stan Shebs <stan@codesourcery.com>
2838 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2839 (all): Depend on $(extra_libraries).
2840 (install-only): Install the IPA.
2841 (IPA_OBJS, IPA_LIB): New.
2842 (clean): Remove the IPA lib.
2843 (IPAGENT_CFLAGS): New.
2844 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2845 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2846 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2847 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2848 * configure.ac: Check for atomic builtins support in the compiler.
2849 (IPA_DEPFILES, extra_libraries): Define.
2850 * configure.srv (ipa_obj): Add description.
2851 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2852 (i[34567]86-*-linux*): Set ipa_obj.
2853 (x86_64-*-linux*): Set ipa_obj.
2854 * linux-low.c (stabilizing_threads): New.
2855 (supports_fast_tracepoints): New.
2856 (linux_detach): Stabilize threads before detaching.
2857 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2858 the lwp is either not stabilizing, or is moving out of a jump pad.
2859 (linux_fast_tracepoint_collecting): New.
2860 (maybe_move_out_of_jump_pad): New.
2861 (enqueue_one_deferred_signal): New.
2862 (dequeue_one_deferred_signal): New.
2863 (linux_wait_for_event_1): If moving out of a jump pad, defer
2864 pending signals to later.
2865 (linux_stabilize_threads): New.
2866 (linux_wait_1): Check if threads need moving out of jump pads, and
2868 (stuck_in_jump_pad_callback): New.
2869 (move_out_of_jump_pad_callback): New.
2871 (linux_resume_one_lwp): Handle moving out of jump pads.
2872 (linux_set_resume_request): Dequeue deferred signals.
2873 (need_step_over_p): Also step over fast tracepoint jumps.
2874 (start_step_over): Also uninsert fast tracepoint jumps.
2875 (finish_step_over): Also reinsert fast tracepoint jumps.
2876 (linux_install_fast_tracepoint_jump): New.
2877 (linux_target_ops): Install linux_stabilize_threads and
2878 linux_install_fast_tracepoint_jump_pad.
2879 * linux-low.h (linux_target_ops) <get_thread_area,
2880 install_fast_tracepoint_jump_pad>: New fields.
2881 (struct lwp_info) <collecting_fast_tracepoint,
2882 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2883 (linux_get_thread_area): Declare.
2884 * linux-x86-low.c (jump_insn): New.
2885 (x86_get_thread_area): New.
2886 (append_insns): New.
2888 (amd64_install_fast_tracepoint_jump_pad): New.
2889 (i386_install_fast_tracepoint_jump_pad): New.
2890 (x86_install_fast_tracepoint_jump_pad): New.
2891 (the_low_target): Install x86_get_thread_area and
2892 x86_install_fast_tracepoint_jump_pad.
2893 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2894 (struct fast_tracepoint_jump): New.
2895 (fast_tracepoint_jump_insn): New.
2896 (fast_tracepoint_jump_shadow): New.
2897 (find_fast_tracepoint_jump_at): New.
2898 (fast_tracepoint_jump_here): New.
2899 (delete_fast_tracepoint_jump): New.
2900 (set_fast_tracepoint_jump): New.
2901 (uninsert_fast_tracepoint_jumps_at): New.
2902 (reinsert_fast_tracepoint_jumps_at): New.
2903 (set_breakpoint_at): Use write_inferior_memory.
2904 (uninsert_raw_breakpoint): Use write_inferior_memory.
2905 (check_mem_read): Mask out fast tracepoint jumps.
2906 (check_mem_write): Mask out fast tracepoint jumps.
2907 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2908 (set_fast_tracepoint_jump): Declare.
2909 (delete_fast_tracepoint_jump)
2910 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2911 (reinsert_fast_tracepoint_jumps_at): Declare.
2912 * regcache.c: Don't compile many functions when building the
2913 in-process agent library.
2914 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2915 the register buffer in the heap.
2916 (free_register_cache): If the register buffer isn't owned by the
2917 regcache, don't free it.
2918 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2919 pre-existing register caches.
2920 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2922 (convert_ascii_to_int): : Constify `from' parameter type.
2923 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2924 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2925 the needed buffer in-place.
2926 (relocate_instruction): New.
2927 * server.c (handle_query) <qSymbols>: If the target supports
2928 tracepoints, give it a chance of looking up symbols. Report
2929 support for fast tracepoints.
2930 (handle_status): Stabilize threads.
2931 (process_serial_event): Adjust.
2932 * server.h (struct fast_tracepoint_jump): Forward declare.
2933 (struct process_info) <fast_tracepoint_jumps>: New field.
2934 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2935 (decode_X_packet, decode_M_packet): Adjust.
2936 (relocate_instruction): Declare.
2937 (in_process_agent_loaded): Declare.
2938 (tracepoint_look_up_symbols): Declare.
2939 (struct fast_tpoint_collect_status): Declare.
2940 (fast_tracepoint_collecting): Declare.
2941 (force_unlock_trace_buffer): Declare.
2942 (handle_tracepoint_bkpts): Declare.
2943 (initialize_low_tracepoint)
2944 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2945 * target.h (struct target_ops) <stabilize_threads,
2946 install_fast_tracepoint_jump_pad>: New fields.
2947 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2948 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2949 [HAVE_STDINT_H]: Include stdint.h.
2950 (trace_debug_1): Rename to ...
2951 (trace_vdebug): ... this.
2952 (trace_debug): Rename to ...
2953 (trace_debug_1): ... this. Add `level' parameter.
2955 (ATTR_USED, ATTR_NOINLINE): New.
2956 (IP_AGENT_EXPORT): New.
2957 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2958 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2959 (about_to_request_buffer_space, trace_buffer_is_full)
2960 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2961 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2962 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2963 (traceframe_write_count, traceframes_created)
2964 (trace_state_variables)
2965 New renaming defines.
2966 (struct ipa_sym_addresses): New.
2967 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2969 (ipa_sym_addrs): New.
2970 (all_tracepoint_symbols_looked_up): New.
2971 (in_process_agent_loaded): New.
2972 (write_e_ipa_not_loaded): New.
2973 (maybe_write_ipa_not_loaded): New.
2974 (tracepoint_look_up_symbols): New.
2975 (debug_threads) [IN_PROCESS_AGENT]: New.
2976 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2977 (UNKNOWN_SIDE_EFFECTS): New.
2978 (stop_tracing): New.
2979 (flush_trace_buffer): New.
2980 (stop_tracing_bkpt): New.
2981 (flush_trace_buffer_bkpt): New.
2982 (read_inferior_integer): New.
2983 (read_inferior_uinteger): New.
2984 (read_inferior_data_pointer): New.
2985 (write_inferior_data_pointer): New.
2986 (write_inferior_integer): New.
2987 (write_inferior_uinteger): New.
2988 (struct collect_static_trace_data_action): Delete.
2989 (enum tracepoint_type): New.
2990 (struct tracepoint) <type>: New field `type'.
2991 <actions_str, step_actions, step_actions_str>: Only include in
2993 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2994 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2995 (tracepoints): Use IP_AGENT_EXPORT.
2996 (last_tracepoint): Don't include in the IPA.
2997 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2998 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2999 (alloced_trace_state_variables): New.
3000 (trace_state_variables): Use IP_AGENT_EXPORT.
3001 (traceframe_t): Delete unused variable.
3002 (circular_trace_buffer): Don't include in the IPA.
3003 (trace_buffer_start): Delete.
3004 (struct trace_buffer_control): New.
3005 (trace_buffer_free): Delete.
3006 (struct ipa_trace_buffer_control): New.
3007 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3008 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3010 (trace_buffer_ctrl): New.
3011 (TRACE_BUFFER_CTRL_CURR): New.
3012 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3013 Reimplement as macros.
3014 (trace_buffer_wrap): Delete.
3015 (traceframe_write_count, traceframe_read_count)
3016 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3017 (struct tracepoint_hit_ctx) <type>: New field.
3018 (struct fast_tracepoint_ctx): New.
3019 (memory_barrier): New.
3021 (record_tracepoint_error): Update atomically in the IPA.
3022 (clear_inferior_trace_buffer): New.
3023 (about_to_request_buffer_space): New.
3024 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3025 updating the same buffer.
3026 (add_tracepoint): Default the tracepoint's type to trap
3027 tracepoint, and orig_size to -1.
3028 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3030 (create_trace_state_variable): New parameter `gdb'. Handle it.
3031 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3032 (cmd_qtdp): Handle fast tracepoints.
3034 (max_jump_pad_size): New.
3035 (gdb_jump_pad_head): New.
3036 (get_jump_space_head): New.
3037 (claim_jump_space): New.
3038 (sort_tracepoints): New.
3039 (MAX_JUMP_SIZE): New.
3040 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3042 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3043 support. Upload fast traceframes, and delete internal IPA
3045 (stop_tracing_handler): New.
3046 (flush_trace_buffer_handler): New.
3047 (cmd_qtstop): Upload fast tracepoints.
3048 (response_tracepoint): Handle fast tracepoints.
3049 (tracepoint_finished_step): Upload fast traceframes. Set the
3050 tracepoint hit context's tracepoint type.
3051 (handle_tracepoint_bkpts): New.
3052 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3053 type. Add comment about fast tracepoints.
3054 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3055 non-existing action_str field.
3056 (get_context_regcache): Handle fast tracepoints.
3057 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3059 (fast_tracepoint_from_jump_pad_address): New.
3060 (fast_tracepoint_from_ipa_tpoint_address): New.
3061 (collecting_t): New.
3062 (force_unlock_trace_buffer): New.
3063 (fast_tracepoint_collecting): New.
3066 (write_inferior_data_ptr): New.
3067 (target_tp_heap): New.
3068 (target_malloc): New.
3069 (download_agent_expr): New.
3071 (download_tracepoints): New.
3072 (download_trace_state_variables): New.
3073 (upload_fast_traceframes): New.
3074 (IPA_FIRST_TRACEFRAME): New.
3075 (IPA_NEXT_TRACEFRAME_1): New.
3076 (IPA_NEXT_TRACEFRAME): New.
3077 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3078 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3079 (gdb_jump_pad_buffer_end): New.
3080 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3081 (initialize_tracepoint): Adjust.
3082 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3083 buffer. Initialize the low module.
3084 * utils.c (PREFIX, TOOLNAME): New.
3085 (malloc_failure): Use PREFIX.
3086 (error): In the IPA, an error causes an exit.
3087 (fatal, warning): Use PREFIX.
3088 (internal_error): Use TOOLNAME.
3089 (NUMCELLS): Increase to 10.
3090 * configure, config.in: Regenerate.
3092 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3094 * server.c (handle_query) <qSupported>: Do two passes over the
3095 qSupported string to avoid nesting strtok.
3097 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3099 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3101 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3103 * configure: Regenerate.
3104 * proc-service.list: New.
3106 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3108 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3111 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3113 * gdbreplay.c (remote_open): Check error return from socket() call by
3114 its equality to -1 not by it being negative.
3115 * remote-utils.c (remote_open): Likewise.
3117 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3119 * config.h: Regenerate.
3121 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3123 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3124 doesn't provide PTRACE_GET_THREAD_AREA.
3126 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3128 * linux-m68k-low.c: Include <asm/ptrace.h>
3129 (ps_get_thread_area): Implement.
3131 2010-05-03 Doug Evans <dje@google.com>
3133 * event-loop.c (struct callback_event): New struct.
3134 (callback_list): New global.
3135 (append_callback_event, delete_callback_event): New functions.
3136 (process_callback): New function.
3137 (start_event_loop): Call it.
3138 * remote-utils.c (NOT_SCHEDULED): Define.
3139 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3140 moved out of readchar.
3141 (readchar): Rewrite. Call reschedule before returning.
3142 (reset_readchar): New function.
3143 (remote_close): Call it.
3144 (process_remaining, reschedule): New functions.
3145 * server.h (callback_handler_func): New typedef.
3146 (append_callback_event, delete_callback_event): Declare.
3148 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3150 * proc-service.c (ps_pglobal_lookup): Use
3151 thread_db_look_up_one_symbol.
3152 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3153 parameter. Use it instead of all_symbols_looked_up.
3154 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3156 (all_symbols_looked_up): Don't declare.
3157 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3158 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3160 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3161 Set all_symbols_looked_up here.
3162 (thread_db_look_up_one_symbol): New.
3163 (thread_db_get_tls_address): Adjust.
3164 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3165 thread_db object on the heap, and tentatively set it in the
3167 (thread_db_init): Don't set all_symbols_looked_up here.
3168 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3170 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3172 * linux-low.c (linux_kill, linux_detach): Adjust.
3173 (status_pending_p_callback): Remove redundant statement. Check
3174 for !TARGET_WAITIKIND_IGNORE, instead of
3175 TARGET_WAITKIND_STOPPED.
3176 (handle_tracepoints): Make sure LWP is locked. Adjust.
3177 (linux_wait_for_event_1): Adjust.
3178 (linux_cancel_breakpoints): New.
3179 (unsuspend_one_lwp): New.
3180 (unsuspend_all_lwps): New.
3181 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3182 (send_sigstop_callback): Change return type to int, add new
3183 `except' parameter and handle it.
3184 (suspend_and_send_sigstop_callback): New.
3185 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3186 pass them down. If SUSPEND, also increment the lwp's suspend
3188 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3189 (need_step_over_p): Don't consider suspended LWPs.
3190 (start_step_over): Adjust.
3191 (proceed_one_lwp): Change return type to int, add new `except'
3192 parameter and handle it.
3193 (unsuspend_and_proceed_one_lwp): New.
3194 (proceed_all_lwps): Use find_inferior instead of
3196 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3197 also decrement the suspend count of LWPs. Pass `except' down,
3198 instead of hacking its suspend count.
3199 (linux_pause_all): Add `freeze' parameter. Adjust.
3200 (linux_unpause_all): New.
3201 (linux_target_ops): Install linux_unpause_all.
3202 * server.c (handle_status): Adjust.
3203 * target.h (struct target_ops): New fields `unpause_all' and
3204 `cancel_breakpoints'. Add new parameter to `pause_all'.
3205 (pause_all): Add new `freeze' parameter.
3207 (cancel_breakpoints): New.
3208 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3210 (cmd_qtstart): Pause threads.
3211 (stop_tracing): Pause threads, and cancel breakpoints.
3212 * win32-low.c (win32_target_ops): Adjust.
3214 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3216 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3217 the inferior right away from here...
3218 (linux_wait_1): ... to here, and adjust to check the thread's
3219 last_resume_kind instead of the lwp's step or stop_expected flags.
3221 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3223 * README: Use consistent `GDB' and `GDBserver' spellings.
3225 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3227 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3228 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3229 (linux_detach_one_lwp): Assume the lwp is stopped.
3230 (any_thread_of): Delete.
3231 (linux_detach): Stop all lwps here. Don't blindly delete all
3233 (delete_lwp_callback): New.
3234 (linux_mourn): Delete all lwps of the process that is gone.
3235 (linux_wait_1): Don't delete the last lwp of the process here.
3236 * mem-break.h (mark_breakpoints_out): Declare.
3237 * mem-break.c (mark_breakpoints_out): New.
3238 (free_all_breakpoints): Use it.
3239 * server.c (handle_target_event): If the process is gone, mark
3241 * thread-db.c (struct thread_db) <create_bp>: New field.
3242 (thread_db_enable_reporting): Fix prototype. Store a thread event
3243 breakpoint reference in the thread_db struct.
3244 (thread_db_load_search): Clear the thread_db object.
3245 (try_thread_db_load_1): Ditto.
3246 (switch_to_process): New.
3247 (disable_thread_event_reporting): Use it.
3248 (remove_thread_event_breakpoints): New.
3249 (thread_db_detach, thread_db_mourn): Use it.
3251 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3253 * linux-low.c (linux_enable_event_reporting): New.
3254 (linux_wait_for_event_1, handle_extended_wait): Use it.
3256 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3258 * linux-low.c (linux_kill_one_lwp, linux_kill)
3259 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3260 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3261 SIGSTOP even if the LWP is stopped.
3262 (send_sigstop_callback): New.
3263 (stop_all_lwps): Use send_sigstop_callback instead.
3264 (linux_resume_one_thread): Adjust.
3265 (proceed_one_lwp): Still proceed an LWP that the client has
3266 requested to stop, if we haven't reported it as stopped yet. Make
3267 sure that LWPs the client want stopped, have a pending SIGSTOP.
3269 2010-04-26 Doug Evans <dje@google.com>
3271 * server.c (handle_general_set): Make static.
3273 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3274 Print received char after testing for error/eof instead of before.
3275 (input_interrupt): Tweak comment.
3277 2010-04-23 Doug Evans <dje@google.com>
3279 * server.c (start_inferior): Print inferior argv if --debug.
3281 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3283 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3284 * nto-x86-low.c: Include server.h
3286 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3288 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3289 be consistent with other sources of this directory.
3290 (init_registers_amd64): Correct name of source file of this function
3293 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3295 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3298 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3300 * win32-i386-low.c: Add 64-bit support.
3301 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3302 (init_registers_amd64): Declare.
3303 (mappings): Add 64-bit version of array.
3304 (init_windows_x86): New function.
3305 (the_low_target): Change init_arch field to init_windows_x86.
3307 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3309 * win32-low.c: Adapt to support also 64-bit architecture.
3310 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3311 (get_image_name): Use SIZE_T type for local variable `done'.
3312 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3313 (toolhelp_get_dll_name): Idem.
3314 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3315 Use uintptr_t typecast to avoid warning.
3316 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3317 (handle_exception): Use phex_nz to avoid warning.
3318 (win32_wait): Remove unused local variable `process'.
3320 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3322 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3325 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3327 * configure.ac: Use `ws2_32' library for srv_mingw.
3328 * configure: Regenerate.
3329 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3330 * remote-utils.c: Likewise.
3332 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3334 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3335 if __x86_64__ is defined.
3337 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3339 * configure: Regenerate.
3341 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3343 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3344 * target.h (target_ops): New get_tib_address field.
3345 * win32-low.h (win32_thread_info): Add thread_local_base field.
3346 * win32-low.c (child_add_thread): Add tlb argument.
3347 Set thread_local_base field to TLB.
3348 (get_child_debug_event): Adapt to child_add_thread change.
3349 (win32_get_tib_address): New function.
3350 (win32_target_ops): Set get_tib_address field to
3351 win32_get_tib_address.
3352 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3356 * linux-low.c (linux_mourn): Also remove the process.
3357 * server.c (handle_target_event): Don't remove the process here.
3358 * nto-low.c (nto_mourn): New.
3359 (nto_target_ops): Install it.
3360 * spu-low.c (spu_mourn): New.
3361 (spu_target_ops): Install it.
3362 * win32-low.c (win32_mourn): New.
3363 (win32_target_ops): Install it.
3365 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3367 * server.h (buffer_xml_printf): Remove redundant `;'.
3369 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3371 * regcache.c (set_register_cache): Invalidate regcaches before
3372 changing the register cache layout.
3373 (regcache_invalidate_one): Allow a NULL regcache.
3374 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3375 regcaches before changing the register cache layout or the target
3378 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3380 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3381 variable warning on Linux/x86-64.
3383 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3385 GDBserver disconnected tracing support.
3387 * linux-low.c (linux_remove_process): Delete.
3388 (add_lwp): Don't set last_resume_kind here.
3389 (linux_kill): Use `mourn'.
3390 (linux_detach): Use `thread_db_detach', and `mourn'.
3392 (linux_attach_lwp_1): Adjust comment.
3393 (linux_attach): last_resume_kind moved the thread_info; adjust.
3394 (status_pending_p_callback): Adjust.
3395 (linux_wait_for_event_1): Adjust.
3396 (count_events_callback, select_singlestep_lwp_callback)
3397 (select_event_lwp_callback, cancel_breakpoints_callback)
3398 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3399 (proceed_one_lwp): Adjust.
3400 (linux_async): Add debug output.
3401 (linux_thread_stopped): New.
3402 (linux_pause_all): New.
3403 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3405 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3406 (thread_db_free): Delete declaration.
3407 (thread_db_detach, thread_db_mourn): Declare.
3408 * thread-db.c (thread_db_init): Use thread_db_mourn.
3409 (thread_db_free): Delete, split in two.
3410 (disable_thread_event_reporting): New.
3411 (thread_db_detach): New.
3412 (thread_db_mourn): New.
3414 * server.h (struct thread_info) <last_resume_kind>: New field.
3415 <attached>: Add comment.
3416 <gdb_detached>: New field.
3417 (handler_func): Change return type to int.
3418 (handle_serial_event, handle_target_event): Ditto.
3419 (gdb_connected): Declare.
3421 (disconnected_tracing): Declare.
3422 (stop_tracing): Declare.
3424 * server.c (handle_query) <qSupported>: Report support for
3425 disconnected tracing.
3426 (queue_stop_reply_callback): Account for running threads.
3427 (gdb_wants_thread_stopped): New.
3428 (gdb_wants_all_threads_stopped): New.
3429 (gdb_reattached_process): New.
3430 (handle_status): Clear the `gdb_detached' flag of all processes.
3431 In all-stop, stop all threads.
3432 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3433 (process_serial_event): If the remote connection breaks, or if an
3434 exit was forced with "monitor exit", force an event loop exit.
3435 Handle disconnected tracing on detach.
3436 (handle_serial_event): Adjust.
3437 (handle_target_event): If GDB isn't connected, forward events back
3438 to the inferior, unless the last process exited, in which case,
3439 exit gdbserver. Adjust interface.
3441 * remote-utils.c (remote_open): Don't block in accept. Instead
3442 register an event loop source on the listen socket file
3443 descriptor. Refactor bits into ...
3444 (listen_desc): ... this new global.
3445 (gdb_connected): ... this new function.
3446 (enable_async_notification): ... this new function.
3447 (handle_accept_event): ... this new function.
3448 (remote_close): Clear remote_desc.
3450 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3452 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3454 (mourn_inferior): Define.
3455 (target_process_qsupported): Avoid the dangling else problem.
3456 (thread_stopped): Define.
3457 (pause_all): Define.
3458 (target_waitstatus_to_string): Declare.
3459 * target.c (target_waitstatus_to_string): New.
3461 * tracepoint.c (tracing): Make extern.
3462 (disconnected_tracing): New.
3463 (stop_tracing): Make extern. Handle tracing stops due to GDB
3465 (cmd_qtdisconnected): New.
3466 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3467 (handle_tracepoint_general_set): Handle QTDisconnected.
3469 * event-loop.c (event_handler_func): Change return type to int.
3470 (process_event): Bail out if the event handler wants the event
3472 (handle_file_event): Ditto.
3473 (start_event_loop): Bail out if the event handler wants the event
3476 * nto-low.c (nto_target_ops): Adjust.
3477 * spu-low.c (spu_wait): Don't remove the process here.
3478 (spu_target_ops): Adjust.
3479 * win32-low.c (win32_wait): Don't remove the process here.
3480 (win32_target_ops): Adjust.
3482 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3484 * regcache.c (realloc_register_cache): Invalidate inferior's
3485 regcache before recreating it.
3487 2010-04-09 Pedro Alves <pedro@codesourcery.com>
3489 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3491 2010-04-09 Stan Shebs <stan@codesourcery.com>
3492 Pedro Alves <pedro@codesourcery.com>
3494 * server.h (LONGEST): New.
3495 (struct thread_info) <while_stepping>: New field.
3496 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3498 (initialize_tracepoint, handle_tracepoint_general_set)
3499 (handle_tracepoint_query, tracepoint_finished_step)
3500 (tracepoint_was_hit, release_while_stepping_state_list):
3501 (current_traceframe): Declare.
3502 * server.c (handle_general_set): Handle tracepoint packets.
3504 (write_memory): New.
3505 (handle_search_memory_1): Use read_memory.
3506 (handle_query): Report support for conditional tracepoints, trace
3507 state variables, and tracepoint sources. Handle tracepoint
3509 (main): Initialize the tracepoints module.
3510 (process_serial_event): Handle traceframe reads/writes.
3512 * linux-low.c (handle_tracepoints): New.
3513 (linux_wait_1): Call it.
3514 (linux_resume_one_lwp): Handle while-stepping.
3515 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3516 (linux_target_ops): Install them.
3517 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3519 * linux-x86-low.c (x86_supports_tracepoints): New.
3520 (the_low_target). Install it.
3522 * mem-break.h (delete_breakpoint): Declare.
3523 * mem-break.c (delete_breakpoint): Make external.
3525 * target.h (struct target_ops): Add `supports_tracepoints',
3526 `read_pc', and `write_pc' fields.
3527 (target_supports_tracepoints): Define.
3528 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3531 * regcache.h (struct regcache) <registers_owned>: New field.
3532 (init_register_cache, regcache_cpy): Declare.
3533 (regcache_read_pc, regcache_write_pc): Declare.
3534 (register_cache_size): Declare.
3535 (supply_regblock): Declare.
3536 * regcache.c (init_register_cache): New.
3537 (new_register_cache): Use it.
3538 (regcache_cpy): New.
3539 (register_cache_size): New.
3540 (supply_regblock): New.
3541 (regcache_read_pc, regcache_write_pc): New.
3543 * tracepoint.c: New.
3545 * Makefile.in (OBS): Add tracepoint.o.
3546 (tracepoint.o): New rule.
3548 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3550 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3552 (i386-mmx.c): Likewise.
3553 (i386-mmx-linux.o): Likewise.
3554 (i386-mmx-linux.c): Likewise.
3556 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3557 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3558 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3559 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3561 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3562 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3563 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3565 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3567 * Makefile.in (clean): Updated.
3569 (i386-avx.c): Likewise.
3570 (i386-avx-linux.o): Likewise.
3571 (i386-avx-linux.c): Likewise.
3572 (amd64-avx.o): Likewise.
3573 (amd64-avx.c): Likewise.
3574 (amd64-avx-linux.o): Likewise.
3575 (amd64-avx-linux.c): Likewise.
3577 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3578 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3579 (srv_amd64_regobj): Add amd64-avx.o.
3580 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3581 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3582 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3583 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3584 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3585 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3586 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3588 * i387-fp.c: Include "i386-xstate.h".
3590 (i387_cache_to_xsave): Likewise.
3591 (i387_xsave_to_cache): Likewise.
3592 (x86_xcr0): Likewise.
3594 * i387-fp.h (i387_cache_to_xsave): Likewise.
3595 (i387_xsave_to_cache): Likewise.
3596 (x86_xcr0): Likewise.
3598 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3599 * linux-crisv32-low.c (target_regsets): Likewise.
3600 * linux-m68k-low.c (target_regsets): Likewise.
3601 * linux-mips-low.c (target_regsets): Likewise.
3602 * linux-ppc-low.c (target_regsets): Likewise.
3603 * linux-s390-low.c (target_regsets): Likewise.
3604 * linux-sh-low.c (target_regsets): Likewise.
3605 * linux-sparc-low.c (target_regsets): Likewise.
3606 * linux-xtensa-low.c (target_regsets): Likewise.
3608 * linux-low.c: Include <sys/uio.h>.
3609 (regsets_fetch_inferior_registers): Support nt_type.
3610 (regsets_store_inferior_registers): Likewise.
3611 (linux_process_qsupported): New.
3612 (linux_target_ops): Add linux_process_qsupported.
3614 * linux-low.h (regset_info): Add nt_type.
3615 (linux_target_ops): Add process_qsupported.
3617 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3619 (init_registers_i386_avx_linux): New.
3620 (init_registers_amd64_avx_linux): Likewise.
3621 (xmltarget_i386_linux_no_xml): Likewise.
3622 (xmltarget_amd64_linux_no_xml): Likewise.
3623 (PTRACE_GETREGSET): Likewise.
3624 (PTRACE_SETREGSET): Likewise.
3625 (x86_fill_xstateregset): Likewise.
3626 (x86_store_xstateregset): Likewise.
3627 (use_xml): Likewise.
3628 (x86_linux_update_xmltarget): Likewise.
3629 (x86_linux_process_qsupported): Likewise.
3630 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3631 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3632 init_registers_i386_linux here. Call
3633 x86_linux_update_xmltarget.
3634 (the_low_target): Add x86_linux_process_qsupported.
3636 * server.c (handle_query): Call target_process_qsupported.
3638 * target.h (target_ops): Add process_qsupported.
3639 (target_process_qsupported): New.
3641 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3643 * inferiors.c (add_thread): Set last_status kind to
3644 TARGET_WAITKIND_IGNORE.
3645 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3646 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3647 (linux_wait_1): Move `thread' local definition to block that uses
3648 it. Don't NULL initialize `event_child'.
3649 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3650 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3651 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3653 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3655 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3656 an extended waitstatus, or by a watchpoint.
3657 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3658 thread was stepping or has been stopped by a watchpoint.
3660 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3662 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3663 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3664 of another, then delete the previous, and validate all
3666 (validate_inserted_breakpoint): New.
3667 (delete_disabled_breakpoints): New.
3668 (validate_breakpoints): New.
3669 (check_mem_read): Validate breakpoints before trusting their
3670 shadow. Delete disabled breakpoints.
3671 (check_mem_write): Validate breakpoints before trusting they
3672 should be inserted. Delete disabled breakpoints.
3673 * mem-break.h (validate_breakpoints):
3674 * server.c (handle_query): Validate breakpoints when we see a
3677 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3679 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3680 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3681 if we could tell there's a GDB breakpoint at stop_pc.
3682 (need_step_over_p): Don't do a step over if we find a GDB
3683 breakpoint at the resume PC.
3685 * mem-break.c (struct raw_breakpoint): New.
3686 (enum bkpt_type): New type `gdb_breakpoint'.
3687 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3688 fields. New field `raw'.
3689 (find_raw_breakpoint_at): New.
3690 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3692 (set_breakpoint_at): Adjust.
3693 (delete_raw_breakpoint): New.
3694 (release_breakpoint): New.
3695 (delete_breakpoint): Rename to...
3696 (delete_breakpoint_1): ... this. Add proc parameter. Use
3697 release_breakpoint. Return ENOENT.
3698 (delete_breakpoint): Reimplement.
3699 (find_breakpoint_at): Delete.
3700 (find_gdb_breakpoint_at): New.
3701 (delete_breakpoint_at): Delete.
3702 (set_gdb_breakpoint_at): New.
3703 (delete_gdb_breakpoint_at): New.
3704 (gdb_breakpoint_here): New.
3705 (set_reinsert_breakpoint): Use release_breakpoint.
3706 (uninsert_breakpoint): Rename to ...
3707 (uninsert_raw_breakpoint): ... this.
3708 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3709 (reinsert_raw_breakpoint): Change parameter type to
3711 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3713 (check_breakpoints): Adjust. Use release_breakpoint.
3714 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3715 (breakpoint_inserted_here): Ditto.
3716 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3717 Don't trust the breakpoint's shadow if it is not inserted.
3718 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3719 (delete_all_breakpoints): Adjust.
3720 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3721 use delete_breakpoint_1.
3723 * mem-break.h (breakpoints_supported): Delete declaration.
3724 (set_gdb_breakpoint_at): Declare.
3725 (gdb_breakpoint_here): Declare.
3726 (delete_breakpoint_at): Delete.
3727 (delete_gdb_breakpoint_at): Declare.
3729 * server.h (struct raw_breakpoint): Forward declare.
3730 (struct process_info): New field `raw_breakpoints'.
3732 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3735 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3737 * linux-low.c (status_pending_p_callback): Fix comment.
3738 (linux_wait_for_event_1): Move most of the internal breakpoint
3739 handling from here...
3740 (linux_wait_1): ... to here.
3741 (count_events_callback): New.
3742 (select_singlestep_lwp_callback): New.
3743 (select_event_lwp_callback): New.
3744 (cancel_breakpoints_callback): New.
3745 (select_event_lwp): New.
3746 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3747 priority to all LWPs that have had events that should be reported
3748 to the client. Cancel breakpoints when about to reporting the
3749 event to the client, not while stopping lwps. No longer cancel
3750 finished single-steps here.
3751 (cancel_finished_single_step): Delete.
3752 (cancel_finished_single_steps): Delete.
3754 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3756 * mem-break.c (enum bkpt_type): New.
3757 (struct breakpoint): New field `type'.
3758 (set_breakpoint_at): Change return type to struct breakpoint
3759 pointer. Set type to `other_breakpoint' by default.
3760 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3761 in the breakpoint list.
3762 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3763 (reinsert_breakpoint): Rename to ...
3764 (reinsert_raw_breakpoint): ... this.
3765 (reinsert_breakpoints_at): Adjust.
3766 * mem-break.h (struct breakpoint): Declare.
3767 (set_breakpoint_at): Change return type to struct breakpoint
3770 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3772 * server.c (handle_query): Assign, not compare.
3774 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3776 Teach linux gdbserver to step-over-breakpoints.
3778 * linux-low.c (can_hardware_single_step): New.
3779 (supports_breakpoints): New.
3780 (handle_extended_wait): If stopping threads, read the stop pc of
3783 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3784 low target doesn't support retrieving the PC.
3785 (add_lwp): Set last_resume_kind to resume_continue.
3786 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3787 (linux_attach): Don't clear stop_expected. Set the lwp's
3788 last_resume_kind to resume_stop.
3789 (linux_detach_one_lwp): Don't check for removed breakpoints.
3790 (check_removed_breakpoint): Delete.
3791 (status_pending_p): Rename to ...
3792 (status_pending_p_callback): ... this. Don't check for removed
3793 breakpoints. Don't consider threads that are stopped from GDB's
3795 (linux_wait_for_lwp): Always read the stop_pc here.
3796 (cancel_breakpoint): New.
3797 (step_over_bkpt): New global.
3798 (linux_wait_for_event_1): Implement stepping over breakpoints.
3799 (gdb_wants_lwp_stopped): New.
3800 (gdb_wants_all_stopped): New.
3801 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3802 single-step traps here. Store the thread's last reported target
3804 (send_sigstop): Don't clear stop_expected. Always set it,
3806 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3807 (cancel_finished_single_step): New.
3808 (cancel_finished_single_steps): New.
3809 (wait_for_sigstop): Don't cancel finished single-step traps here.
3810 (linux_resume_one_lwp): Don't check for removed breakpoints.
3811 Don't set `step' on non-hardware step archs.
3812 (linux_set_resume_request): Ignore resume_stop requests if already
3813 stopping or stopped. Set the lwp's last_resume_kind.
3814 (resume_status_pending_p): Don't check for removed breakpoints.
3815 (need_step_over_p): New.
3816 (start_step_over): New.
3817 (finish_step_over): New.
3818 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3819 requests. Clear the thread's last reported target waitstatus.
3820 Don't use the `suspended' flag. Don't consider pending breakpoints.
3821 (linux_resume): Start a step-over if necessary.
3822 (proceed_one_lwp): New.
3823 (proceed_all_lwps): New.
3824 (unstop_all_lwps): New.
3825 * linux-low.h (struct lwp_info): Rewrite comment for the
3826 `suspended' flag. Add the `stop_pc' field. Delete the
3827 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3828 Add `'last_resume_kind' and `need_step_over' fields.
3829 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3830 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3831 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3832 (set_raw_breakpoint_at): New.
3833 (set_breakpoint_at): Rewrite to use it.
3834 (reinsert_breakpoint_handler): Delete.
3835 (set_reinsert_breakpoint): New.
3836 (reinsert_breakpoint_by_bp): Delete.
3837 (delete_reinsert_breakpoints): New.
3838 (uninsert_breakpoint): Rewrite.
3839 (uninsert_breakpoints_at): New.
3840 (reinsert_breakpoint): Rewrite.
3841 (reinsert_breakpoints_at): New.
3842 (check_breakpoints): Rewrite.
3843 (breakpoint_here): New.
3844 (breakpoint_inserted_here): New.
3845 (check_mem_read): Adjust.
3846 * mem-break.h (breakpoints_supported, breakpoint_here)
3847 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3848 (reinsert_breakpoint_by_bp): Delete declaration.
3849 (delete_reinsert_breakpoints): Declare.
3850 (reinsert_breakpoint): Delete declaration.
3851 (reinsert_breakpoints_at): Declare.
3852 (uninsert_breakpoint): Delete declaration.
3853 (uninsert_breakpoints_at): Declare.
3854 (check_breakpoints): Adjust prototype.
3855 * server.h: Adjust include order.
3856 (struct thread_info): Declare here. Add a `last_status' field.
3858 2010-03-23 Michael Snyder <msnyder@vmware.com>
3860 * server.c (crc32): New function.
3861 (handle_query): Add handling for 'qCRC:' request.
3863 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3865 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3866 lwp had been stopped by a watchpoint.
3868 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3870 * server.h (internal_error): Declare.
3871 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3872 * utils.c (internal_error): New function.
3874 2010-03-15 Andreas Schwab <schwab@redhat.com>
3876 * configure.srv: Fix typo setting srv_regobj.
3878 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3880 * linux-low.c (fetch_register): Avoid passing a non string literal
3882 (usr_store_inferior_registers): Ditto.
3884 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3886 * linux-low.c (linux_write_memory): Bail out early if peeking
3889 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3891 * linux-low.h (struct lwp_info): New fields
3892 `stopped_by_watchpoint' and `stopped_data_address'.
3893 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3894 here, and cache them in the lwp object.
3895 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3897 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3899 (linux_stopped_by_watchpoint): Rewrite.
3900 (linux_stopped_data_address): Rewrite.
3902 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3904 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3905 switching the current inferior, not before.
3907 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3909 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3910 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3911 i386-linux.c and amd64-linux.c.
3912 (reg-i386.o): Removed.
3913 (reg-i386.c): Likewise.
3914 (reg-i386-linux.o): Likewise.
3915 (reg-i386-linux.c): Likewise.
3916 (reg-x86-64.o): Likewise.
3917 (reg-x86-64.c): Likewise.
3918 (reg-x86-64-linux.o): Likewise.
3919 (reg-x86-64-linux.c): Likewise.
3922 (i386-linux.o): Likewise.
3923 (i386-linux.c): Likewise.
3924 (amd64.o): Likewise.
3925 (amd64.c): Likewise.
3926 (amd64-linux.o): Likewise.
3927 (amd64-linux.c): Likewise.
3929 * configure.srv (srv_i386_regobj): New.
3930 (srv_i386_linux_regobj): Likewise.
3931 (srv_amd64_regobj): Likewise.
3932 (srv_amd64_linux_regobj): Likewise.
3933 (srv_i386_32bit_xmlfiles): Likewise.
3934 (srv_i386_64bit_xmlfiles): Likewise.
3935 (srv_i386_xmlfiles): Likewise.
3936 (srv_amd64_xmlfiles): Likewise.
3937 (srv_i386_linux_xmlfiles): Likewise.
3938 (srv_amd64_linux_xmlfiles): Likewise.
3939 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3940 srv_xmlfiles to $srv_i386_xmlfiles.
3941 (i[34567]86-*-mingw32ce*): Likewise.
3942 (i[34567]86-*-mingw*): Likewise.
3943 (i[34567]86-*-nto*): Likewise.
3944 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3945 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3946 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3947 (x86_64-*-linux*): Likewise.
3949 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3950 (init_registers_amd64_linux): New.
3951 (x86_arch_setup): Replace init_registers_x86_64_linux with
3952 init_registers_amd64_linux.
3954 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3956 * configure.ac: Check for libdl. If it is not available link against
3957 static libthread_db.
3958 * configure: Regenerate.
3960 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3964 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3965 handing a read watchpoint.
3966 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3968 2010-02-12 Doug Evans <dje@google.com>
3970 * linux-low.c (linux_supports_tracefork_flag): Document.
3971 (linux_look_up_symbols): Add comment.
3973 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3975 * regcache.c (supply_register): Clear regcache if buf is NULL.
3977 2010-02-02 Nicolas Roche <roche@sourceware.org>
3978 Joel Brobecker <brobecker@adacore.com>
3980 * inferiors.c (find_inferior): Add function documentation.
3981 (unloaded_dll): Handle the case where the unloaded dll has not
3982 been previously registered in the dll list.
3984 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3986 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3987 (thumb2_breakpoint): New.
3988 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3990 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3992 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3993 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3996 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3998 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4000 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4002 * linux-s390-low.c (s390_collect_ptrace_register)
4003 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4005 2010-01-21 Doug Evans <dje@google.com>
4007 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4008 (PTRACE_ARG4_TYPE): New macro.
4009 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4010 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4011 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4012 (usr_store_inferior_registers): Ditto.
4013 (linux_read_memory, linux_write_memory): Ditto.
4014 (linux_test_for_tracefork): Ditto.
4016 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4017 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4019 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4021 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4024 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4026 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4027 prototype to take a regcache. Adjust.
4029 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4031 * regcache.h (struct thread_info): Forward declare.
4032 (struct regcache): New.
4033 (new_register_cache): Adjust prototype.
4034 (get_thread_regcache): Declare.
4035 (free_register_cache): Adjust prototype.
4036 (registers_to_string, registers_from_string): Ditto.
4037 (supply_register, supply_register_by_name, collect_register)
4038 (collect_register_as_string, collect_register_by_name): Ditto.
4039 * regcache.c (struct inferior_regcache_data): Delete.
4040 (get_regcache): Rename to ...
4041 (get_thread_regcache): ... this. Adjust. Switch inferior before
4043 (regcache_invalidate_one): Adjust.
4044 (regcache_invalidate): Fix prototype.
4045 (new_register_cache): Return the new register cache.
4046 (free_register_cache): Change prototype.
4047 (realloc_register_cache): Adjust.
4048 (registers_to_string): Change prototype to take a regcache. Adjust.
4049 (registers_from_string): Ditto.
4050 (register_data): Ditto.
4051 (supply_register): Ditto.
4052 (supply_register_by_name): Ditto.
4053 (collect_register): Ditto.
4054 (collect_register_as_string): Ditto.
4055 (collect_register_by_name): Ditto.
4056 * server.c (process_serial_event): Adjust.
4057 * linux-low.h (regset_fill_func, regset_store_func): Change
4059 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4061 * linux-low.c (get_stop_pc): Adjust.
4062 (check_removed_breakpoint): Adjust.
4063 (linux_wait_for_event): Adjust.
4064 (linux_resume_one_lwp): Adjust.
4065 (fetch_register): Add regcache parameter. Adjust.
4066 (usr_store_inferior_registers): Ditto.
4067 (regsets_fetch_inferior_registers): Ditto.
4068 (regsets_store_inferior_registers): Ditto.
4069 (linux_fetch_registers, linux_store_registers): Ditto.
4070 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4072 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4074 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4075 prototype to take a regcache.
4076 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4077 * remote-utils.c (convert_ascii_to_int, outreg)
4078 (prepare_resume_reply): Change prototype to take a regcache.
4080 * target.h (struct target_ops) <fetch_registers, store_registers>:
4081 Change prototype to take a regcache.
4082 (fetch_inferior_registers, store_inferior_registers): Change
4083 prototype to take a regcache. Adjust.
4084 * proc-service.c (ps_lgetregs): Adjust.
4085 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4086 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4087 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4088 take a regcache. Adjust.
4089 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4090 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4091 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4092 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4093 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4094 (cris_cannot_fetch_register):
4095 (cris_breakpoint_at): Change prototype to take a regcache.
4097 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4098 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4099 to take a regcache. Adjust.
4100 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4102 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4103 take a regcache. Adjust.
4104 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4105 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4106 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4107 * linux-mips-low.c (mips_get_pc):
4108 (mips_set_pc): Change prototype to take a regcache. Adjust.
4109 (mips_reinsert_addr): Adjust.
4110 (mips_collect_register): Change prototype to take a regcache.
4112 (mips_supply_register):
4113 (mips_collect_register_32bit, mips_supply_register_32bit)
4114 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4115 (mips_store_fpregset): Ditto.
4116 * linux-ppc-low.c (ppc_supply_ptrace_register)
4117 (ppc_supply_ptrace_register): Ditto.
4118 (parse_spufs_run): Adjust.
4119 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4120 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4121 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4122 take a regcache. Adjust.
4123 * linux-s390-low.c (s390_collect_ptrace_register)
4124 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4125 (s390_set_pc): Change prototype to take a regcache. Adjust.
4126 (s390_arch_setup): Adjust.
4127 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4128 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4129 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4130 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4131 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4133 (sparc_breakpoint_at): Adjust.
4134 * linux-xtensa-low.c (xtensa_fill_gregset):
4135 (xtensa_store_gregset):
4136 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4137 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4138 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4139 prototype to take a regcache. Adjust.
4140 * win32-arm-low.c (arm_fetch_inferior_register)
4141 (arm_store_inferior_register): Change prototype to take a
4143 * win32-i386-low.c (i386_fetch_inferior_register)
4144 (i386_store_inferior_register): Change prototype to take a
4146 * win32-low.c (child_fetch_inferior_registers)
4147 (child_store_inferior_registers): Change prototype to take a
4149 (win32_wait): Adjust.
4150 (win32_fetch_inferior_registers): Change prototype to take a
4152 (win32_store_inferior_registers): Adjust.
4153 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4154 store_inferior_register>: Change prototype to take a regcache.
4156 2010-01-20 Doug Evans <dje@google.com>
4158 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4160 (linux_wait_for_event1, linux_init_signals): Ditto.
4161 (W_STOPCODE): Provide definition if missing.
4163 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4165 * linux-low.c (linux_core_of_thread): New.
4166 (compare_ints, show_process, list_threads): New.
4167 (linux_qxfer_osdata): Report threads and cores.
4168 (linux_target_op): Register linux_core_of_thread.
4169 * remote-utils.c (prepare_resume_reply): Report the core.
4170 (buffer_xml_printf): Support %d specifier.
4171 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4173 (handle_query): Handle qXfer:threads. Announce availability
4175 * target.h (struct target_ops): New field core_of_thread.
4177 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4179 * Makefile.in (clean): Remove new generated files.
4180 (reg-s390.o, reg-s390.c): Remove rules.
4181 (reg-s390x.o, reg-s390x.c): Likewise.
4182 (s390-linux32.o, s390-linux32.c): Add rules.
4183 (s390-linux64.o, s390-linux64.c): Likewise.
4184 (s390x-linux64.o, s390x-linux64.c): Likewise.
4185 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4186 * linux-s390-low.c: Include <elf.h>.
4187 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4188 (init_registers_s390): Remove prototype.
4189 (init_registers_s390x): Likewise.
4190 (init_registers_s390_linux32): Add prototype.
4191 (init_registers_s390_linux64): Likewise.
4192 (init_registers_s390x_linux64): Likewise.
4193 (s390_num_regs_3264): New define.
4194 (s390_regmap_3264): New global variable.
4195 (s390_cannot_fetch_register): Remove obsolete check.
4196 (s390_cannot_store_register): Likewise.
4197 (s390_collect_ptrace_register): Handle upper/lower register halves.
4198 (s390_supply_ptrace_register): Likewise.
4199 (s390_fill_gregset): Update to register number changes.
4200 (s390_get_hwcap): New routine.
4201 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4202 Install appropriate regmap and register set.
4204 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4206 * server.c (gdbserver_version): Update copyright year to 2010.
4207 * gdbreplay.c (gdbreplay_version): Likewise.
4209 2009-12-28 Doug Evans <dje@google.com>
4211 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4212 elf/external.h. Include <elf.h> instead but only if necessary.
4214 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4216 * linux-low.c (linux_remove_process): Remove `detaching'
4217 parameter. Don't release/detach from thread_db here.
4218 (linux_kill): Release/detach from thread_db here, ...
4219 (linux_detach): ... and here, before actually detaching.
4220 (linux_wait_1): ... and here, when a process exits.
4221 * thread-db.c (any_thread_of): New.
4222 (thread_db_free): Switch the current inferior to a thread of the
4225 2009-12-21 Doug Evans <dje@google.com>
4227 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4229 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4230 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4231 warning ifndef __NR_tkill. Move setting of errno there too.
4232 Delete unnecessary resetting of errno after syscall.
4233 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4235 * configure.ac: Check for dladdr.
4236 * config.in: Regenerate.
4237 * configure: Regenerate.
4238 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4239 (try_thread_db_load): Update.
4241 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4243 2009-12-18 Doug Evans <dje@google.com>
4245 * event-loop.c: Include unistd.h if it exists.
4247 * linux-low.c (my_waitpid): Move definition away from being in
4248 between linux_tracefork_child/linux_test_for_tracefork.
4250 * gdb_proc_service.h (psaddr_t): Fix type.
4251 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4252 signature to match glibc.
4254 2009-12-16 Doug Evans <dje@google.com>
4256 * linux-low.c (linux_read_memory): Fix argument to read.
4258 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4260 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4261 events, don't leave current_inferior pointing at null.
4263 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4265 * win32-low.c (LOG): Delete.
4266 (OUTMSG): Output to stderr.
4267 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4268 on compile time LOG macro.
4269 (win32_wait): Fix debug output.
4271 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4273 * win32-low.c (win32_add_one_solib): If the dll name is
4274 "ntdll.dll", prepend the system directory to the dll path.
4276 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4278 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4280 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4281 Vladimir Prus <vladimir@codesourcery.com>
4283 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4284 * configure.ac: Check for __mcoldfire__ and set
4285 gdb_cv_m68k_is_coldfire.
4286 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4287 reg-cf.o and reg-m68k.o.
4288 * configure: Regenerated.
4290 2009-11-16 Pedro Alves <pedro@codesourcery.com>
4292 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4293 Pass it to thread_db_free.
4294 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4295 proper `detaching' argument to linux_remove_process.
4296 * linux-low.h (thread_db_free): Add `detaching' parameter.
4297 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4299 (thread_db_free): Add `detaching' parameter. Only
4300 call td_ta_clear_event if detaching from process.
4302 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4304 * thread-db.c (thread_db_free): Fix typo.
4306 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4309 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4311 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4313 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4314 with an i686 compiler.
4315 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4317 * configure: Rebuilt.
4319 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4323 * server.c (handle_search_memory_1): Correct read_addr initialization
4324 in loop for searching subsequent chunks.
4326 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4328 * configure.ac: New --with-libthread-db option.
4329 * thread-db.c: Allow direct dependence on libthread_db.
4330 (thread_db_free): Adjust.
4331 * config.in: Regenerate.
4332 * configure: Likewise.
4334 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4337 * thread-db.c (attach_thread): New function.
4338 (maybe_attach_thread): Return success/failure.
4339 (find_new_threads_callback): Adjust.
4340 (thread_db_find_new_threads): Loop until no new threads.
4342 2009-10-13 Pedro Alves <pedro@codesourcery.com>
4344 * proc-service.c (ps_lgetregs): Formatting.
4346 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4348 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4349 * configure.ac: Adjust.
4350 * linux-low.h (struct process_info_private): Move members to struct
4352 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4353 * linux-low.c (linux_remove_process): Adjust.
4354 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4355 * server.c (handle_query): Move code ...
4356 (handle_monitor_command): ... here. New function.
4357 * target.h (struct target_ops): New member.
4358 * thread-db.c (struct thread_db): New.
4359 (libthread_db_search_path): New variable.
4360 (thread_db_create_event, thread_db_enable_reporting)
4361 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4362 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4363 (try_thread_db_load_1, dladdr_to_soname): New functions.
4364 (try_thread_db_load, thread_db_load_search): New functions.
4365 (thread_db_init): Search for libthread_db.
4366 (thread_db_free): New function.
4367 (thread_db_handle_monitor_command): Likewise.
4368 * config.in: Regenerate.
4369 * configure: Regenerate.
4371 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4373 * spu-low.c (spu_kill): Wait for inferior to terminate.
4374 Call clear_inferiors.
4375 (spu_detach): Call clear_inferiors.
4377 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4379 * aclocal.m4: Regenerate.
4380 * config.in: Likewise.
4381 * configure: Likewise.
4383 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4385 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4386 (parse_spufs_run): New function.
4387 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4388 (ppc_breakpoint_at): Handle SPU breakpoints.
4390 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4392 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4393 (SPUFS_MAGIC): Define.
4394 (spu_enumerate_spu_ids): New function.
4395 (linux_qxfer_spu): New function.
4396 (linux_target_ops): Install linux_qxfer_spu.
4398 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4400 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4401 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4402 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4403 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4404 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4405 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4406 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4407 (init_registers_powerpc_cell32l): Add prototype.
4408 (init_registers_powerpc_cell64l): Likewise.
4409 (ppc_arch_setup): Detect Cell/B.E. architecture.
4411 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4413 * Makefile.in (datarootdir): New variable.
4415 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4417 * linux-low.c (linux_write_memory): Update debugging output.
4418 * Makefile.in (clean): Add new descriptions.
4419 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4420 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4421 * configure.srv: Add new files for arm*-*-linux*.
4422 * linux-arm-low.c: Add new declarations.
4423 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4424 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4425 (HWCAP_VFPv3D16): New.
4426 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4427 instead of __IWMMXT__.
4428 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4429 (arm_arch_setup): New.
4430 (target_regsets): Remove #ifdef. Add VFP regset.
4431 (the_low_target): Use arm_arch_setup.
4433 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4435 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4436 the main thread again.
4438 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4440 Adding Neutrino gdbserver.
4441 * configure: Regenerated.
4442 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4443 * configure.srv (i[34567]86-*-nto*): New target.
4444 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4445 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4446 (nto_comctrl) [__QNX__]: New function.
4447 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4449 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4451 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4454 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4455 Pedro Alves <pedro@codesourcery.com>
4457 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4458 don't support CONTEXT_EXTENDED_REGISTERS.
4459 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4460 (the_low_target): Install them.
4461 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4462 failing with ERROR_PIPE_NOT_CONNECTED.
4464 2009-06-30 Doug Evans <dje@google.com>
4465 Pierre Muller <muller@ics.u-strasbg.fr>
4467 Add h/w watchpoint support to x86-linux, win32-i386.
4468 * Makefile.in (SFILES): Add i386-low.c
4469 (i386_low_h): Define.
4470 (i386-low.o): Add dependencies.
4471 (linux-x86-low.o): Add i386-low.h dependency.
4472 (win32-i386-low.o): Ditto.
4473 * i386-low.c: New file.
4474 * i386-low.h: New file.
4475 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4476 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4477 * linux-low.c (linux_add_process): Initialize arch_private.
4478 (linux_remove_process): Free arch_private.
4479 (add_lwp): Initialize arch_private.
4480 (delete_lwp): Free arch_private.
4481 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4483 * linux-low.h (process_info_private): New member arch_private.
4484 (lwp_info): New member arch_private.
4485 (linux_target_ops): New members new_process, new_thread,
4487 (ptid_of): New macro.
4488 * linux-x86-low.c: Include stddef.h, i386-low.h.
4489 (arch_process_info): New struct.
4490 (arch_lwp_info): New struct.
4491 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4492 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4493 (i386_dr_low_get_status): New function.
4494 (x86_insert_point, x86_remove_point): New functions.
4495 (x86_stopped_by_watchpoint): New function.
4496 (x86_stopped_data_address): New function.
4497 (x86_linux_new_process, x86_linux_new_thread): New functions.
4498 (x86_linux_prepare_to_resume): New function.
4499 (the_low_target): Add entries for insert_point, remove_point,
4500 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4502 * server.c (debug_hw_points): New global.
4503 (monitor_show_help): Document set debug-hw-points.
4504 (handle_query): Process "set debug-hw-points".
4505 * server.h (debug_hw_points): Declare.
4506 (paddress): Declare.
4507 * utils.c (NUMCELLS, CELLSIZE): New macros.
4508 (get_sell, xsnprintf, paddress): New functions.
4509 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4510 remove_point, stopped_by_watchpoint, stopped_data_address.
4511 * win32-i386-low.c: Include i386-low.h.
4512 (debug_reg_state): Replaces dr.
4513 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4514 (i386_dr_low_get_status): New function.
4515 (i386_insert_point, i386_remove_point): New functions.
4516 (i386_stopped_by_watchpoint): New function.
4517 (i386_stopped_data_address): New function.
4518 (i386_initial_stuff): Update.
4519 (get_thread_context,set_thread_context,i386_thread_added): Update.
4520 (the_low_target): Add entries for insert_point,
4521 remove_point, stopped_by_watchpoint, stopped_data_address.
4522 * win32-low.c (win32_insert_watchpoint): New function.
4523 (win32_remove_watchpoint): New function.
4524 (win32_stopped_by_watchpoint): New function.
4525 (win32_stopped_data_address): New function.
4526 (win32_target_ops): Add entries for insert_watchpoint,
4527 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4528 * win32-low.h (win32_target_ops): New members insert_point,
4529 remove_point, stopped_by_watchpoint, stopped_data_address.
4531 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4533 * server.c (process_serial_event): Re-return unsupported, not
4534 error, if the type isn't recognized. Re-allow supporting only
4535 insert or remove packets. Also call require_running for
4536 breakpoints. Add missing break statement to default case. Tidy.
4537 * target.h (struct target_ops): Rename insert_watchpoint to
4538 insert_point, and remove_watchpoint to remove_point.
4540 * linux-low.h (struct linux_target_ops): Likewise.
4541 * linux-low.c (linux_insert_watchpoint): Rename to ...
4542 (linux_insert_point): ... this. Adjust.
4543 (linux_remove_watchpoint): Rename to ...
4544 (linux_remove_point): ... this. Adjust.
4545 (linux_target_ops): Adjust.
4546 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4547 (cris_insert_point): ... this.
4548 (cris_remove_watchpoint): Rename to ...
4549 (cris_remove_point): ... this.
4550 (the_low_target): Adjust.
4552 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4554 * server.c (handle_v_kill): Pass signal_pid to
4555 kill_inferior if multi_process is zero.
4557 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4559 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4560 * target.h (target_ops): Comment for *_watchpoint to make it clear
4561 the functions can get types '0' and '1'.
4563 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4565 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4566 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4567 * regcache.c (get_regcache): Likewise.
4568 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4569 * win32-low.c (child_fetch_inferior_registers): Remove check for
4572 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4573 Pedro Alves <pedro@codesourcery.com>
4575 * target.h (struct target_ops) <supports_multi_process>: New
4577 (target_supports_multi_process): New.
4578 * server.c (handle_query): Even if GDB reports support, only
4579 enable multi-process if the target also supports it. Report
4580 multi-process support only if the target backend supports it.
4581 * linux-low.c (linux_supports_multi_process): New function.
4582 (linux_target_ops): Install it as target_supports_multi_process
4585 2009-05-24 Doug Evans <dje@google.com>
4587 Global renaming of find_thread_pid to find_thread_ptid.
4588 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4589 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4590 All callers updated.
4592 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4593 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4596 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4597 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4598 (linux_resume_one_lwp): Ditto.
4600 2009-05-23 Doug Evans <dje@google.com>
4602 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4603 from struct inferior_list_entry * to struct lwp_info *.
4604 All callers updated.
4606 2009-05-13 Doug Evans <dje@google.com>
4608 * linux-x86-low.c: Don't include assert.h.
4609 (x86_siginfo_fixup): Use fatal, not assert.
4610 (x86_arch_setup): Fix comment.
4612 2009-05-12 Doug Evans <dje@google.com>
4614 Biarch support for i386/amd64 gdbserver.
4615 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4616 Add linux-x86-low.c.
4617 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4618 (linux-x86-low.o): Add.
4619 * linux-x86-64-low.c: Delete.
4620 * linux-i386-low.c: Delete.
4621 * linux-x86-low.c: New file.
4622 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4624 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4626 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4627 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4628 (linux_child_pid_to_exec_file): New function.
4629 (elf_64_header_p, elf_64_file_p): New functions.
4630 (siginfo_fixup): New function.
4631 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4632 give target a chance to convert layout.
4633 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4634 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4636 2009-05-07 Doug Evans <dje@google.com>
4638 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4639 (regsets_store_inferior_registers): Ditto.
4641 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4645 * linux-low.c (must_set_ptrace_flags): Delete.
4646 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4648 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4649 `lwp->must_set_ptrace_flags' instead.
4650 (linux_wait_for_event_1): Set ptrace options here.
4651 (linux_wait_1): ... not here.
4653 2009-04-30 Doug Evans <dje@google.com>
4655 * inferiors.c (started_inferior_callback): New function.
4656 (attached_inferior_callback): New function.
4657 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4658 * server.c (print_started_pid, print_attached_pid): New functions.
4659 (detach_or_kill_for_exit): New function.
4660 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4661 * server.h (have_started_inferiors_p): Declare.
4662 (have_attached_inferiors_p): Declare.
4664 * inferiors.c (remove_process): Fix memory leak, free process.
4665 * linux-low.c (linux_remove_process): New function.
4666 (linux_kill): Call it instead of remove_process.
4667 (linux_detach, linux_wait_1): Ditto.
4669 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4671 * configure.srv: Add x86 Windows CE target.
4673 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4675 * inferiors.c (get_thread_process): Make global.
4676 * server.h (get_thread_process): Add prototype.
4677 * thread-db.c (find_one_thread): Use get_thread_process
4678 instead of current_process.
4679 (thread_db_get_tls_address): Do not crash if called when
4680 thread layer is not yet initialized.
4682 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4684 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4685 * spu-low.c (current_tid): Rename to ...
4686 (current_ptid): ... this.
4687 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4688 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4689 ptid_get_lwp (current_ptid) instead of current_tid.
4690 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4691 instead of current_tid. Use find_process_pid to verify pid
4692 argument is valid. Pass proper argument to remove_process.
4693 (spu_thread_alive): Compare current_ptid instead of current_tid.
4694 (spu_resume): Likewise.
4696 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4698 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4701 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4703 Implement the multiprocess extensions, and add linux multiprocess
4706 * server.h (ULONGEST): Declare.
4707 (struct ptid, ptid_t): New.
4708 (minus_one_ptid, null_ptid): Declare.
4709 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4710 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4711 (struct inferior_list_entry): Change `id' type from unsigned from
4713 (struct sym_cache, struct breakpoint, struct
4714 process_info_private): Forward declare.
4715 (struct process_info): Declare.
4716 (current_process): Declare.
4717 (all_processes): Declare.
4718 (initialize_inferiors): Declare.
4719 (add_thread): Adjust to use ptid_t.
4720 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4721 (add_process, remove_process, find_thread_pid): Declare.
4722 (find_inferior_id): Adjust to use ptid_t.
4723 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4724 (multi_process): Declare.
4725 (push_event): Adjust to use ptid_t.
4726 (read_ptid, write_ptid): Declare.
4727 (prepare_resume_reply): Adjust to use ptid_t.
4728 (clear_symbol_cache): Declare.
4729 * inferiors.c (all_processes): New.
4730 (null_ptid, minus_one_ptid): New.
4731 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4732 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4733 (add_thread): Change unsigned long to ptid. Remove gdb_id
4735 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4736 (gdb_id_to_thread): Rename to ...
4737 (find_thread_pid): ... this. Change unsigned long to ptid.
4738 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4739 (loaded_dll, pull_pid_from_list): Adjust.
4740 (add_process, remove_process, find_process_pid)
4741 (get_thread_process, current_process, initialize_inferiors): New.
4742 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4743 (struct target_waitstatus) <related_pid>: Ditto.
4744 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4746 (struct target_ops) <join>: Add `pid' argument.
4747 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4748 (struct target_ops) <wait>: Add `ptid' field. Change return type
4750 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4751 (mywait): Add `ptid' argument. Change return type to ptid_t.
4752 (target_pid_to_str): Declare.
4753 * target.c (set_desired_inferior): Adjust to use ptids.
4754 (mywait): Add new `ptid' argument. Adjust.
4755 (target_pid_to_str): New.
4756 * mem-break.h (free_all_breakpoints): Declare.
4757 * mem-break.c (breakpoints): Delelete.
4758 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4759 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4760 to use per-process breakpoint list.
4761 (free_all_breakpoints): New.
4762 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4763 (symbol_cache, all_symbols_looked_up): Delete.
4765 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4767 (prepare_resume_reply): Change ptid argument's type from unsigned
4768 long to ptid_t. Adjust. Implement W;process and X;process.
4769 (free_sym_cache, clear_symbol_cache): New.
4770 (look_up_one_symbol): Adjust to per-process symbol cache. *
4771 * server.c (cont_thread, general_thread, step_thread): Change type
4774 (multi_process): New.
4775 (last_ptid): Change type to ptid_t.
4776 (struct vstop_notif) <ptid>: Change type to ptid_t.
4777 (queue_stop_reply, push_event): Change `ptid' argument's type to
4779 (discard_queued_stop_replies): Add `pid' argument.
4780 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4781 changes. Don't reference the `attached' global.
4782 (attach_inferior): Adjust to mywait interface changes.
4783 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4784 features. Handle and report "multiprocess+". Handle
4786 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4788 (handle_v_kill): New.
4789 (handle_v_stopped): Adjust to use target_pid_to_str.
4790 (handle_v_requests): Allow multiple attaches and runs when
4791 multiprocess extensions are in effect. Handle "vKill".
4792 (myresume): Adjust to use ptids.
4793 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4794 (handle_status): Adjust to discard_queued_stop_replies interface
4796 (first_thread_of, kill_inferior_callback)
4797 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4798 (main): Call initialize_inferiors. Adjust to use ptids, killing
4799 and detaching from all inferiors. Handle multiprocess packet
4801 * linux-low.h: Include gdb_proc_service.h.
4802 (struct process_info_private): New.
4803 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4804 <lwpid_of>: Use ptid_get_lwp.
4805 (get_lwp_thread): Adjust.
4806 (struct lwp_info): Add `dead' member.
4807 (find_lwp_pid): Declare.
4808 * linux-low.c (thread_db_active): Delete.
4809 (new_inferior): Adjust comment.
4810 (inferior_pid): Delete.
4811 (linux_add_process): New.
4812 (handle_extended_wait): Adjust.
4813 (add_lwp): Change unsigned long to ptid.
4814 (linux_create_inferior): Add process to processes table. Adjust
4815 to use ptids. Don't set new_inferior here.
4816 (linux_attach_lwp): Rename to ...
4817 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4818 it. Adjust to use ptids.
4819 (linux_attach_lwp): New.
4820 (linux_attach): Add process to processes table. Don't set
4822 (struct counter): New.
4823 (second_thread_of_pid_p, last_thread_of_process_p): New.
4824 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4826 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4827 processes. Remove process from process table.
4828 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4829 to multiple processes.
4830 (any_thread_of): New.
4831 (linux_detach): Add `pid' argument, and handle it. Remove process
4832 from processes table.
4833 (linux_join): Add `pid' argument. Handle it.
4834 (linux_thread_alive): Change unsighed long argument to ptid_t.
4835 Consider dead lwps as not being alive.
4836 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4837 threads we're not interested in.
4838 (same_lwp, find_lwp_pid): New.
4839 (linux_wait_for_lwp): Change `pid' argument's type from int to
4841 (linux_wait_for_event): Rename to ...
4842 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4843 from int to ptid_t. Adjust.
4844 (linux_wait_for_event): New.
4845 (linux_wait_1): Add `ptid' argument. Change return type to
4846 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4847 that exit from the process table.
4848 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4850 (mark_lwp_dead): New.
4851 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4852 stopping all threads, mark its main lwp as dead.
4853 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4855 (fetch_register, usr_store_inferior_registers)
4856 (regsets_fetch_inferior_registers)
4857 (regsets_store_inferior_registers, linux_read_memory)
4858 (linux_write_memory): Inline `inferior_pid'.
4859 (linux_look_up_symbols): Adjust to use per-process
4861 (linux_request_interrupt): Adjust to use ptids.
4862 (linux_read_auxv): Inline `inferior_pid'.
4863 (initialize_low): Don't reference thread_db_active.
4864 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4865 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4866 (ps_getpid): Return the pid of the current inferior.
4867 * thread-db.c (proc_handle, thread_agent): Delete.
4868 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4870 (find_one_thread): Change argument type to ptid_t. Adjust to
4872 (maybe_attach_thread): Adjust to per-process data and ptids.
4873 (thread_db_find_new_threads): Ditto.
4874 (thread_db_init): Ditto.
4875 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4876 processes table. Adjust to use ptids.
4877 (spu_kill, spu_detach): Adjust interface. Remove process from
4879 (spu_join, spu_thread_alive): Adjust interface.
4880 (spu_wait): Adjust interface. Remove process from processes
4881 table. Adjust to use ptids.
4882 * win32-low.c (current_inferior_tid): Delete.
4883 (current_inferior_ptid): New.
4884 (debug_event_ptid): New.
4885 (thread_rec): Take a ptid. Adjust.
4886 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4887 (child_delete_thread): Ditto.
4888 (do_initial_child_stuff): Add `attached' argument. Add process to
4890 (child_fetch_inferior_registers, child_store_inferior_registers):
4892 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4893 (win32_attach): Pass 1 to do_initial_child_stuff.
4894 (win32_kill): Adjust interface. Remove process from processes
4896 (win32_detach): Ditto.
4897 (win32_join): Adjust interface.
4898 (win32_thread_alive): Take a ptid.
4899 (win32_resume): Adjust to use ptids.
4900 (get_child_debug_event): Ditto.
4901 (win32_wait): Adjust interface. Remove exiting process from
4904 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4906 Non-stop mode support.
4908 * server.h (non_stop): Declare.
4909 (gdb_client_data, handler_func): Declare.
4910 (delete_file_handler, add_file_handler, start_event_loop):
4912 (handle_serial_event, handle_target_event, push_event)
4913 (putpkt_notif): Declare.
4914 * target.h (enum resume_kind): New.
4915 (struct thread_resume): Replace `step' field by `kind' field.
4916 (TARGET_WNOHANG): Define.
4917 (struct target_ops) <wait>: Add `options' argument.
4918 <supports_non_stop, async, start_non_stop>: New fields.
4919 (target_supports_non_stop, target_async): New.
4920 (start_non_stop): Declare.
4921 (mywait): Add `options' argument.
4922 * target.c (mywait): Add `options' argument. Print child exit
4924 (start_non_stop): New.
4925 * server.c (non_stop, own_buf, mem_buf): New globals.
4926 (struct vstop_notif): New.
4927 (notif_queue): New global.
4928 (queue_stop_reply, push_event, discard_queued_stop_replies)
4929 (send_next_stop_reply): New.
4930 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4932 (attach_inferior): In non-stop mode, don't wait for the target
4934 (handle_general_set): Handle QNonStop.
4935 (handle_query): When handling qC, return the current general
4936 thread, instead of the first thread of the list.
4937 (handle_query): If the backend supports non-stop mode, include
4938 QNonStop+ in the qSupported query response.
4939 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4941 (handle_v_attach, handle_v_run): Handle non-stop mode.
4942 (handle_v_stopped): New.
4943 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4944 (myresume): Adjust to use resume_kind. Handle non-stop.
4945 (queue_stop_reply_callback): New.
4946 (handle_status): Handle non-stop mode.
4947 (main): Clear non_stop flag on reconnection. Use the event-loop.
4948 Refactor serial protocol handling from here ...
4949 (process_serial_event): ... to this new function. When GDB
4950 selects any thread, select one here. In non-stop mode, wait until
4951 GDB acks all pending events before exiting.
4952 (handle_serial_event, handle_target_event): New.
4953 * remote-utils.c (remote_open): Install remote_desc in the event
4955 (remote_close): Remove remote_desc from the event loop.
4956 (putpkt_binary): Rename to...
4957 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4958 (putpkt_binary): New as wrapper around putpkt_binary_1.
4959 (putpkt_notif): New.
4960 (prepare_resume_reply): In non-stop mode, don't change the
4962 * event-loop.c: New.
4963 * Makefile.in (OBJ): Add event-loop.o.
4964 (event-loop.o): New rule.
4966 * linux-low.h (pid_of): Moved here.
4968 (get_lwp_thread): Use lwpid_of.
4969 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4970 * linux-low.c (pid_of): Delete.
4971 (inferior_pid): Use lwpid_of.
4972 (linux_event_pipe): New.
4973 (target_is_async_p): New.
4975 (handle_extended_wait): Use lwpid_of.
4976 (add_lwp): Don't set lwpid field.
4977 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4978 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4979 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4980 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4981 first. Adjust to linux_wait_for_event interface changes. Use
4983 (linux_detach): Don't delete the main lwp here.
4984 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4985 (status_pending_p): Don't consider explicitly suspended lwps.
4986 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4987 pointer. Add OPTIONS argument. Change return type to int. Use
4988 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4989 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4990 pointer. Add status pointer argument. Return a pid instead of a
4991 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4992 changes. In non-stop mode, don't switch to a random thread.
4993 (linux_wait): Rename to...
4994 (linux_wait_1): ... this. Add target_options argument, and handle
4995 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4996 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4997 clean exit and signal exit code. Don't stop all threads in
4998 non-stop mode. In all-stop mode, only stop all threads when
4999 reporting a stop to GDB. Handle explicit thread stop requests.
5000 (async_file_flush, async_file_mark): New.
5002 (send_sigstop): Use lwpid_of.
5003 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5004 interface changes. In non-stop mode, don't switch to a random
5006 (linux_resume_one_lwp): Use lwpid_of.
5007 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5008 (linux_resume_one_thread): ... this. Handle resume_stop. In
5009 non-stop mode, don't look for pending flag in all threads.
5010 (resume_status_pending_p): Don't consider explicitly suspended
5012 (my_waitpid): Reimplement. Emulate __WALL.
5013 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5015 (sigchld_handler, linux_supports_non_stop, linux_async)
5016 (linux_start_non_stop): New.
5017 (linux_target_ops): Register linux_supports_non_stop, linux_async
5018 and linux_start_non_stop.
5019 (initialize_low): Install SIGCHLD handler.
5020 * thread-db.c (thread_db_create_event, find_one_thread)
5021 (thread_db_get_tls_address): Use lwpid_of.
5022 * win32-low.c (win32_detach): Adjust to use resume_kind.
5023 (win32_wait): Add `options' argument.
5024 * spu-low.c (spu_resume): Adjust to use resume_kind.
5025 (spu_wait): Add `options' argument.
5027 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5029 Decouple target code from remote protocol.
5031 * target.h (enum target_waitkind): New.
5032 (struct target_waitstatus): New.
5033 (struct target_ops) <wait>: Return an unsigned long. Take a
5034 target_waitstatus pointer instead of a char pointer.
5036 * target.c (mywait): Change prototype to return an unsigned long.
5037 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5038 * server.h (thread_from_wait, old_thread_from_wait): Delete
5040 (prepare_resume_reply): Change prototype to take a
5042 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5043 (last_status, last_ptid): New.
5044 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5045 pid instead of a signal.
5046 (attach_inferior): Remove "status" and "signal" parameters.
5048 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5050 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5051 (handle_v_requests, myresume): Remove "status" and "signal"
5053 (handle_status): New.
5054 (main): Delete local `status'. Adjust.
5055 * remote-utils.c: Include target.h.
5056 (prepare_resume_reply): Change prototype to take a
5057 target_waitstatus. Adjust.
5059 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5061 * spu-low.c (spu_wait): Adjust.
5062 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5064 (win32_wait): Adjust.
5066 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5068 * target.h (struct thread_resume): Delete leave_stopped member.
5069 (struct target_ops): Add a `n' argument to the `resume' callback.
5070 * server.c (start_inferior): Adjust.
5071 (handle_v_cont, myresume): Adjust.
5072 * linux-low.c (check_removed_breakpoint): Adjust to resume
5073 interface change, and to removed leave_stopped field.
5074 (resume_ptr): Delete.
5075 (struct thread_resume_array): New.
5076 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5077 resume interface change.
5078 (linux_continue_one_thread, linux_queue_one_thread)
5079 (resume_status_pending_p): Check if the resume field is NULL
5080 instead of checking the leave_stopped member.
5081 (linux_resume): Adjust to the target resume interface change.
5082 * spu-low.c (spu_resume): Adjust to the target resume interface
5084 * win32-low.c (win32_detach, win32_resume): Ditto.
5086 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5088 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5090 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5092 (linux_continue_one_thread): Only preserve the stepping flag if
5093 there's a pending breakpoint.
5095 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5097 * server.c (main): After the inferior having exited, call
5098 remote_close before exiting gdbserver.
5100 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5102 Fix size of FPSCR in Power 7 processors.
5103 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5104 (PPC_FEATURE_HAS_DFP): New #define.
5105 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5108 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5110 * server.c (handle_query) Whitespace and formatting.
5112 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5114 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5115 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5116 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5117 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5118 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5119 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5120 Makefile.in, configure.ac: Fix whitespace throughout.
5121 * configure: Regenerate.
5123 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5125 * inferiors.c (find_inferior): Make it safe for the callback
5126 function to delete the currently iterated inferior.
5128 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5130 * Makefile.in (linuw_low_h): Move higher.
5131 (thread-db.o): Depend on $(linux_low_h).
5133 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5135 Rename "process" to "lwp" throughout.
5137 * linux-low.c (all_processes): Rename to...
5138 (all_lwps): ... this.
5139 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5140 (add_process): Rename to ...
5141 (add_lwp): ... this. Adjust.
5142 (linux_create_inferior): Adjust.
5143 (linux_attach_lwp): Adjust.
5144 (linux_attach): Adjust.
5145 (linux_kill_one_process): Rename to ...
5146 (linux_kill_one_lwp): ... this. Adjust.
5147 (linux_kill): Adjust.
5148 (linux_detach_one_process): Rename to ...
5149 (linux_detach_one_lwp): ... this. Adjust.
5150 (linux_detach): Adjust.
5151 (check_removed_breakpoint): Adjust.
5152 (status_pending_p): Adjust.
5153 (linux_wait_for_process): Rename to ...
5154 (linux_wait_for_lwp): ... this. Adjust.
5155 (linux_wait_for_event): Adjust.
5156 (send_sigstop): Adjust.
5157 (wait_for_sigstop): Adjust.
5158 (stop_all_processes): Rename to ...
5159 (stop_all_lwps): ... this.
5160 (linux_resume_one_process): Rename to ...
5161 (linux_resume_one_lwp): ... this. Adjust.
5162 (linux_set_resume_request, linux_continue_one_thread)
5163 (linux_queue_one_thread, resume_status_pending_p)
5164 (usr_store_inferior_registers, regsets_store_inferior_registers)
5165 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5167 * linux-low.h (get_process): Rename to ...
5168 (get_lwp): ... this. Adjust.
5169 (get_thread_process): Rename to ...
5170 (get_thread_lwp): ... this. Adjust.
5171 (get_process_thread): Rename to ...
5172 (get_lwp_thread): ... this. Adjust.
5173 (struct process_info): Rename to ...
5174 (struct lwp_info): ... this.
5175 (all_processes): Rename to ...
5176 (all_lwps): ... this.
5177 * proc-service.c (ps_lgetregs): Adjust.
5178 * thread-db.c (thread_db_create_event, find_one_thread)
5179 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5181 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5183 * server.c (handle_query): Handle "qAttached".
5185 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5187 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5188 GPLv3, update license URL.
5190 2009-03-01 Doug Evans <dje@google.com>
5192 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5193 (server_h): Add gdb_signals.h.
5194 (signals.o): Update.
5195 * server.h (target_signal_from_host,target_signal_to_host_p)
5196 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5198 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5200 * remote-utils.c (getpkt): Also generate remote-debug
5201 information if noack_mode is set.
5203 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5205 * server.c (handle_query): Report qXfer:siginfo:read and
5206 qXfer:siginfo:write as supported and handle them.
5207 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5208 * linux-low.c (linux_xfer_siginfo): New.
5209 (linux_target_ops): Set it.
5211 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5213 * server.c (gdbserver_usage): Mention --remote-debug.
5214 (main): Accept '--remote-debug' switch.
5216 2009-01-18 Doug Evans <dje@google.com>
5218 * regcache.c (new_register_cache): No need to check result of xcalloc.
5219 * server.c (handle_search_memory): Back out calls to xmalloc,
5220 result is checked and error is returned to user upon failure.
5221 (handle_query): Ditto. Add more checks for result of malloc.
5222 (handle_v_cont): Check result of malloc, report error back to
5224 (handle_v_run): Ditto. Call freeargv.
5225 * server.h (freeargv): Declare.
5226 * utils.c (freeargv): New fn.
5228 2009-01-15 Doug Evans <dje@google.com>
5230 * gdbreplay.c (perror_with_name): Make arg const char *.
5231 * server.h (target_signal_to_name): Make return type const char *.
5232 * thread-db.c (thread_db_err_str): Make return type const char *.
5233 * utils.c (perror_with_name): Make arg const char *.
5235 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5237 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5238 when handling a EXIT_PROCESS_DEBUG_EVENT.
5240 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5242 * gdbreplay.c (gdbreplay_version): Update copyright year.
5243 * server.c (gdbserver_version): Likewise.
5245 2009-01-05 Doug Evans <dje@google.com>
5247 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5248 (handle_extended_wait): Improve comment.
5250 2008-12-13 Doug Evans <dje@google.com>
5252 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5253 * server.h (ATTR_MALLOC): New macro.
5254 (xmalloc,xcalloc,xstrdup): Declare.
5255 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5256 * inferiors.c: Ditto.
5257 * linux-low.c: Ditto.
5258 * mem-break.c: Ditto.
5259 * regcache.c: Ditto.
5260 * remote-utils.c: Ditto.
5263 * win32-low.c: Ditto.
5265 2008-12-12 Doug Evans <dje@google.com>
5267 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5268 in debugging printf.
5270 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5272 2008-12-09 Doug Evans <dje@google.com>
5274 * linux-low.h (struct process_info): Delete member tid, unused.
5275 * thread-db.c (find_one_thread): Update.
5276 (maybe_attach_thread): Update.
5278 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5280 * target.h (struct target_ops): Add qxfer_osdata member.
5281 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5283 (linux_qxfer_osdata): New functions.
5284 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5286 * server.c (handle_query): Handle "qXfer:osdata:read:".
5287 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5288 (buffer_xml_printf): New functions.
5289 * server.h (struct buffer): New.
5290 (buffer_grow_str, buffer_grow_str0): New macros.
5291 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5292 (buffer_xml_printf): Declare.
5294 2008-11-24 Doug Evans <dje@google.com>
5296 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5298 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5300 * server.c (handle_v_run): Always use the supplied argument list.
5302 2008-11-19 Bob Wilson <bob.wilson@acm.org>
5304 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5305 (xtensa_regmap_table): Add entry for scompare1.
5307 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5309 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5310 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5311 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5312 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5313 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5314 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5315 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5316 XML target descriptions.
5317 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5318 when inferior is running on an ISA 2.05 or later processor. Add
5319 special case to return offset for full 64-bit slot of FPSCR when
5322 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5324 * Makefile.in (SFILES, clean): Added sparc64 files.
5325 (reg-sparc64.o, reg-sparc64.c): New.
5326 * configure.srv (sparc*-*-linux*): New configuration.
5327 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5328 syscall arguments for SPARC.
5329 (regsets_store_inferior_registers): Likewise.
5330 * linux-sparc-low.c: New file.
5332 2008-10-21 Doug Evans <dje@google.com>
5334 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5335 (READLINE_DIR,READLINE_DEP): Delete.
5336 (INTERNAL_CFLAGS): Update.
5337 (LINTFLAGS): Update.
5339 2008-10-10 Pedro Alves <pedro@codesourcery.com>
5341 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5342 whole argv from the last run, not just argv[0].
5344 2008-09-08 Pedro Alves <pedro@codesourcery.com>
5346 * regcache.c (new_register_cache): Return NULL if the register
5347 cache size isn't known yet.
5348 (free_register_cache): Avoid dereferencing a NULL regcache.
5350 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5352 * configure.srv: Merge MIPS and MIPS64.
5354 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5356 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5358 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
5360 * Makefile.in: Add required vsx dependencies.
5362 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5363 Declare init_registers_powerpc_vsx32l.
5364 Declare init_registers_powerpc_vsx64l.
5365 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5366 (ppc_arch_setup): Check for VSX in hwcap.
5367 (ppc_fill_vsxregset): New function.
5368 (ppc_store_vsxregset): New function.
5369 Add new VSX entry in regset_info target_regsets.
5371 * configure.srv: Add new VSX dependencies.
5373 2008-08-12 Pedro Alves <pedro@codesourcery.com>
5375 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5376 (remote_open): Set or clear transport_is_reliable.
5377 (putpkt_binary): Don't expect acks in noack mode.
5378 (getpkt): Don't send ack/nac in noack mode.
5379 * server.c (handle_general_set): Handle QStartNoAckMode.
5380 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5382 (main): Reset noack_mode on every connection.
5383 * server.h (noack_mode): Declare.
5385 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5387 * Makefile.in (GDBREPLAY_OBS): New variable.
5388 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5390 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5391 Daniel Jacobowitz <dan@codesourcery.com>
5393 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5394 (usr_store_inferior_registers): Likewise.
5395 (regsets_store_inferior_registers): Likewise.
5397 2008-07-31 Rolf Jansen <rj@surtec.com>
5398 Pedro Alves <pedro@codesourcery.com>
5400 * configure.ac: Check for memmem declaration.
5401 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5402 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5403 (disable_packet_qfThreadInfo): Unconditionally compile.
5404 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5405 * configure, config.in: Regenerate.
5407 2008-07-28 Doug Kwan <dougkwan@google.com>
5409 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5410 (linux_write_memory): Remove declaration of errno.
5412 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5414 * linux-low.c (handle_extended_wait): Do not use "status"
5415 variable uninitialized.
5417 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5419 * server.c (handle_v_attach): Inhibit reporting dll changes.
5421 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5423 * remote-utils.c (prepare_resume_reply): If requested, don't
5424 output "thread:TID" in the T stop reply.
5426 * server.c (disable_packet_vCont, disable_packet_Tthread)
5427 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5428 (handle_query): If requested, disable support for qC, qfThreadInfo
5430 (handle_v_requests): If requested, disable support for vCont.
5431 (gdbserver_show_disableable): New.
5432 (main): Handle --disable-packet and --disable-packet=LIST.
5434 * server.h (disable_packet_vCont, disable_packet_Tthread)
5435 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5437 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5439 * server.c (gdbserver_usage): Mention --version.
5441 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5443 * Makefile.in (gdbreplay.o): New rule.
5445 2008-06-06 Joseph Myers <joseph@codesourcery.com>
5447 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5448 message, not gdbserver.
5450 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5451 Nathan Sidwell <nathan@codesourcery.com>
5452 Joseph Myers <joseph@codesourcery.com>
5454 * acinclude.m4: Include ../../config/acx.m4.
5455 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5456 * configure, config.in: Regenerate.
5457 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5458 * server.c (gdbserver_version): Print PKGVERSION.
5459 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5460 (main): Adjust gdbserver_usage calls.
5461 * gdbreplay.c (version, host_name): Add declarations.
5462 (gdbreplay_version, gdbreplay_usage): New.
5463 (main): Accept --version and --help options.
5465 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5467 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5468 (arm_breakpoint_at): Handle Thumb.
5469 (the_low_target): Add comment.
5471 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5473 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5475 2008-05-09 Doug Evans <dje@google.com>
5477 * server.h (decode_search_memory_packet): Declare.
5478 * remote-utils.c (decode_search_memory_packet): New fn.
5479 * server.c (handle_search_memory_1): New fn.
5480 (handle_search_memory): New fn.
5481 (handle_query): Process qSearch:memory packets.
5483 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5485 * regcache.c (registers_length): Remove.
5486 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5487 full register packet.
5488 * regcache.h (registers_length): Remove prototype.
5489 * server.h (PBUFSIZ): Define to 16384.
5491 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5493 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5494 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5495 powerpc-64l.o, and powerpc-altivec64l.o.
5496 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5497 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5498 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5499 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5500 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5503 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5504 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5505 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5506 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5507 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5508 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5509 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5510 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5511 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5512 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5515 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5516 (init_registers_powerpc_32l): ... this new prototype.
5517 (init_registers_powerpc_32): Remove, replace by ...
5518 (init_registers_powerpc_altivec32l): ... this new prototype.
5519 (init_registers_powerpc_e500): Remove, replace by ...
5520 (init_registers_powerpc_e500l): ... this new prototype.
5521 (init_registers_ppc64): Remove, replace by ...
5522 (init_registers_powerpc_64l): ... this new prototype.
5523 (init_registers_powerpc_64): Remove, replace by ...
5524 (init_registers_powerpc_altivec64l): ... this new prototype.
5525 (ppc_num_regs): Set to 73.
5526 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5527 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5528 (ppc_cannot_store_register): Handle orig_r3 and trap.
5529 (ppc_arch_setup): Update init_registers_... calls.
5530 (ppc_fill_gregset): Handle orig_r3 and trap.
5532 * inferiors.c (clear_inferiors): Reset current_inferior.
5534 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5536 * acinclude.m4: Add override.m4.
5537 * configure: Regenerate.
5539 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5541 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5542 initial call to init_register_ppc64.
5544 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5546 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5547 single powerpc*-*-linux* case.
5548 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5550 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5552 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5553 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5555 * linux-ppc-low.c: Include <elf.h>.
5556 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5557 (ppc_hwcap): New global variable.
5558 (ppc_regmap): Remove __SPE__ #ifdef sections.
5559 (ppc_regmap_e500): New global variable.
5560 (ppc_cannot_store_register): Update __SPE__ special case.
5561 (ppc_get_hwcap): New function.
5562 (ppc_arch_setup): Use it to determine whether inferior supports
5563 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5564 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5565 Do not access registers if target does not support AltiVec.
5566 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5567 Do not access registers if target does not support SPE.
5568 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5570 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5572 * linux-low.c (disabled_regsets, num_regsets): New.
5573 (use_regsets_p): Delete.
5574 (linux_wait_for_process): Clear disabled_regsets.
5575 (regsets_fetch_inferior_registers): Check and set it.
5576 (regsets_store_inferior_registers): Likewise.
5577 (linux_fetch_registers, linux_store_registers): Do not use
5579 (initialize_low): Allocate disabled_regsets.
5581 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5583 * Makefile.in (LIBOBJS): New.
5585 (memmem.o): New rule.
5586 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5587 * configure: Regenerated.
5589 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5591 * server.c (handle_query): Never return "unsupported" for
5592 qXfer:features:read queries.
5594 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5596 * server.c (get_features_xml): Fix inverted condition.
5597 (handle_query): Always support qXfer:feature:read.
5599 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5601 * server.c (wrapper_argv): New.
5602 (start_inferior): Handle wrapper_argv. If set, expect an extra
5604 (gdbserver_usage): Document --wrapper.
5605 (main): Parse --wrapper.
5607 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5609 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5610 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5611 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5612 (ppc_set_pc): Likewise.
5613 (ppc_arch_setup): New function.
5614 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5615 of collect_register.
5616 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5618 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5620 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5621 instead of linux-ppc64-low.o.
5622 * linux-ppc64-low.c: Remove file.
5623 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5624 (linux-ppc64-low.o): Remove rule.
5626 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5627 (init_registers_powerpc_64): Likewise.
5628 (ppc_regmap): Conditionally define depending on __powerpc64__.
5629 (ppc_cannot_store_register): Do not special-case "fpscr" when
5630 compiled on __powerpc64__.
5631 (ppc_collect_ptrace_register): New function.
5632 (ppc_supply_ptrace_register): New function.
5633 (ppc_breakpoint): Change type to "unsigned int".
5634 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5635 (the_low_target): Conditionally provide initializers for the
5636 arch_setup member depending on __powerpc64__. Install
5637 collect_ptrace_register and supply_ptrace_register members.
5639 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5641 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5642 * server.c (gdbserver_xmltarget): Define.
5643 (get_features_xml): Use it to replace "target.xml" and arch_string.
5645 * configure.srv: Remove srv_xmltarget. Add XML files that were
5646 mentioned there to srv_xmlfiles instead. Remove conditional tests
5647 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5648 srv_xmlfiles and srv_regobj to include all possible choices.
5649 * configure.ac (srv_xmltarget): Remove.
5650 (srv_xmlfiles): Do not add "target.xml".
5651 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5652 checks for supplementary target information.
5653 * configure: Regenerate.
5654 * Makefile.in (XML_TARGET): Remove.
5655 (target.xml): Remove rule.
5656 (clean): Do not clean up target.xml.
5657 (.PRECIOUS): Do not mention target.xml.
5659 * target.h (struct target_ops): Remove arch_string member.
5660 * linux-low.c (linux_arch_string): Remove.
5661 (linux_target_ops): Remove arch_string initializer.
5662 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5663 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5664 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5665 * spu-low.c (spu_arch_string): Remove.
5666 (spu_target_ops): Remove arch_string initializer.
5667 * win32-low.c (win32_arch_string): Remove.
5668 (win32_target_ops): Remove arch_string initializer.
5669 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5670 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5671 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5673 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5675 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5676 by collect_ptrace_register and supply_ptrace_register hooks.
5677 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5678 instead of checking for the_low_target.left_pad_xfer.
5679 (usr_store_inferior_registers): Use collect_ptrace_register callback
5680 instead of checking for the_low_target.left_pad_xfer.
5682 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5683 (s390_supply_ptrace_register): Likewise.
5684 (s390_fill_gregset): Call s390_collect_ptrace_register.
5685 (the_low_target): Update.
5687 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5688 (ppc_supply_ptrace_register): Likewise.
5689 (the_low_target): Update.
5691 * linux-i386-low.c (the_low_target): Update.
5692 * linux-x86-64-low.c (the_low_target): Update.
5694 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5696 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5697 reg-s390.o and reg-s390x.o.
5699 * linux-low.c (new_inferior): New global variable.
5700 (linux_create_inferior, linux_attach): Set it.
5701 (linux_wait_for_process): Call the_low_target.arch_setup after the
5702 target has stopped for the first time.
5703 (initialize_low): Do not call the_low_target.arch_setup.
5705 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5706 (s390_set_pc): Likewise.
5707 (s390_arch_setup): New function.
5708 (the_low_target): Use s390_arch_setup as arch_setup routine.
5710 * regcache.c (realloc_register_cache): New function.
5711 (set_register_cache): Call it for each existing regcache.
5713 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5715 * server.h (init_registers): Remove prototype.
5717 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5718 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5719 instead of init_registers ().
5720 * linux-arm-low.c (init_registers_arm): Add prototype.
5721 (init_registers_arm_with_iwmmxt): Likewise.
5722 (the_low_target): Add initializer for arch_setup field.
5723 * linux-cris-low.c (init_registers_cris): Add prototype.
5724 (the_low_target): Add initializer for arch_setup field.
5725 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5726 (the_low_target): Add initializer for arch_setup field.
5727 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5728 (the_low_target): Add initializer for arch_setup field.
5729 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5730 (the_low_target): Add initializer for arch_setup field.
5731 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5732 (the_low_target): Add initializer for arch_setup field.
5733 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5734 (the_low_target): Add initializer for arch_setup field.
5735 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5736 (init_registers_mips64_linux): Likewise.
5737 (the_low_target): Add initializer for arch_setup field.
5738 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5739 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5740 (the_low_target): Add initializer for arch_setup field.
5741 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5742 (init_registers_powerpc_64): Likewise.
5743 (the_low_target): Add initializer for arch_setup field.
5744 * linux-s390-low.c (init_registers_s390): Add prototype.
5745 (init_registers_s390x): Likewise.
5746 (the_low_target): Add initializer for arch_setup field.
5747 * linux-sh-low.c (init_registers_sh): Add prototype.
5748 (the_low_target): Add initializer for arch_setup field.
5749 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5750 (the_low_target): Add initializer for arch_setup field.
5751 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5752 (the_low_target): Add initializer for arch_setup field.
5754 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5755 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5756 instead of init_registers ().
5757 * win32-arm-low.c (init_registers_arm): Add prototype.
5758 (the_low_target): Add initializer for arch_setup field.
5759 * win32-i386-low.c (init_registers_i386): Add prototype.
5760 (the_low_target): Add initializer for arch_setup field.
5762 * spu-low.c (init_registers_spu): Add prototype.
5763 (initialize_low): Call initialie_registers_spu () instead of
5764 initialize_registers ().
5766 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5768 * server.c (handle_v_requests): When handling the vRun and vAttach
5769 packets, if already debugging a process, don't kill it. Return an
5772 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5774 * server.c (handle_query): Correct length check.
5776 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5778 * win32-low.c (do_initial_child_stuff): Add process handle
5779 parameter. Set current_process_handle and current_process_id from the
5780 parameters. Clear globals.
5781 (win32_create_inferior): Don't set current_process_handle and
5782 current_process_id here. Instead pass them on the call to
5783 do_initial_child_stuff.
5784 (win32_attach): Likewise.
5785 (win32_clear_inferiors): New.
5786 (win32_kill): Don't close the current process handle or the
5787 current thread handle here. Instead call win32_clear_inferiors.
5788 (win32_detach): Don't open a new handle to the process. Call
5789 win32_clear_inferiors.
5790 (win32_join): Don't rely on current_process_handle; open a new
5791 handle using the process id.
5792 (win32_wait): Call win32_clear_inferiors when the inferior process
5795 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5797 * server.c (monitor_show_help): Add "exit".
5799 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5801 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5802 (clean): Add reg-xtensa.c.
5803 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5804 * configure.srv (xtensa*-*-linux*) New target.
5805 * linux-xtensa-low.c: New.
5806 * xtensa-xtregs.c: New.
5808 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5810 * hostio.c: Don't include errno.h.
5811 (errno_to_fileio_errno): Move to hostio-errno.
5812 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5813 error number outputting to the target->hostio_last_error callback.
5814 (hostio_packet_error): Use FILEIO_EINVAL directly.
5815 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5816 calls to hostio_error.
5817 * hostio-errno.c: New.
5818 * server.h (hostio_last_error_from_errno): Declare.
5819 * target.h (target_ops): Add hostio_last_error member.
5820 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5821 as hostio_last_error handler.
5822 * spu-low.c (spu_target_ops): Likewise.
5823 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5824 (wince_hostio_last_error): New functions.
5825 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5826 as hostio_last_error handler.
5827 (win32_target_ops) [!_WIN32_WCE]: Register
5828 hostio_last_error_from_errno as hostio_last_error handler.
5829 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5830 (hostio-errno.o): New rule.
5831 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5832 * configure.srv (srv_hostio_err_objs): New variable. Default to
5834 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5835 * configure: Regenerate.
5837 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5839 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5840 (linux_kill, linux_detach): Clean up the process list.
5841 * remote-utils.c (remote_open): Improve port number parsing.
5842 (putpkt_binary, input_interrupt): Only send interrupts if the target
5844 * server.c (extended_protocol): Make static.
5845 (attached): Define earlier.
5846 (exit_requested, response_needed, program_argv): New variables.
5847 (target_running): New.
5848 (start_inferior): Clear attached here.
5849 (attach_inferior): Set attached here.
5850 (require_running): Define.
5851 (handle_query): Use require_running and target_running. Implement
5853 (handle_v_attach, handle_v_run): New.
5854 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5855 (gdbserver_usage): Update.
5856 (main): Redo argument parsing. Handle --debug and --multi. Handle
5857 --attach along with other options or after the port. Save
5858 program_argv. Support no initial program. Resynchronize
5859 communication with GDB after an error. Handle "monitor exit".
5860 Use require_running and target_running. Always allow the extended
5861 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5862 restart in extended mode.
5863 * README: Refer to the GDB manual. Update --attach usage.
5865 2007-12-20 Andreas Schwab <schwab@suse.de>
5867 * linux-low.c (STACK_SIZE): Define.
5868 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5869 (linux_test_for_tracefork): Likewise.
5871 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5873 * linux-low.c (linux_wait_for_event): Update messages. Do not
5874 reinsert auto-delete breakpoints.
5875 * mem-break.c (struct breakpoint): Change return type of handler to
5877 (set_breakpoint_at): Update handler type.
5878 (reinsert_breakpoint_handler): Return 1 instead of calling
5880 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5882 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5883 * mem-break.h (set_breakpoint_at): Update handler type.
5884 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5885 * win32-low.c (auto_delete_breakpoint): New.
5886 (get_child_debug_event): Use it.
5888 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5890 * configure.ac: Check for pread and pwrite.
5891 * hostio.c (handle_pread): Fall back to lseek and read.
5892 (handle_pwrite): Fall back to lseek and write.
5893 * config.in, configure: Regenerated.
5895 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5897 * server.c (myresume): Add own_buf argument.
5898 (main): Update calls.
5900 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5902 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5903 * remote-utils.c (remote_open): Do not call disable_async_io.
5904 (block_async_io): Delete.
5905 (unblock_async_io): Make static.
5906 (initialize_async_io): New.
5907 * server.c (handle_v_cont): Handle async I/O here.
5908 (myresume): Likewise. Move other common resume tasks here...
5909 (main): ... from here. Call initialize_async_io. Disable async
5910 I/O before the main loop.
5911 * server.h (initialize_async_io): Declare.
5912 (block_async_io, unblock_async_io): Delete prototypes.
5913 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5915 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5917 * remote-utils.c (readchar): Allow binary data in received messages.
5919 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5921 * win32-low.c (attaching): New global.
5922 (win32_create_inferior): Clear the `attaching' global.
5923 (win32_attach): Set the `attaching' global.
5924 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5925 attaching. Only set a breakpoint at the entry point if not
5928 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5930 * server.c (main): Don't report dll events on the initial
5931 connection on attaches.
5933 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5935 * server.c (main): Relax numerical bases supported for the pid of
5936 the --attach command line argument.
5938 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5940 * win32-low.c (win32_attach): Call OpenProcess before
5941 DebugActiveProcess, not after. Add last error output to error
5944 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5946 * win32-low.c (win32_get_thread_context)
5947 (win32_set_thread_context): New functions.
5948 (thread_rec): Use win32_get_thread_context.
5949 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5950 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5953 2007-12-03 Leo Zayas
5954 Pedro Alves <pedro_alves@portugalmail.pt>
5956 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5958 (child_add_thread): Minor cleanup.
5959 (child_continue): Resume artificially suspended threads before
5960 calling ContinueDebugEvent.
5961 (suspend_one_thread): New.
5962 (fake_breakpoint_event): New.
5963 (get_child_debug_event): Change return type to int. Check here if
5964 gdb sent an interrupt request. If a soft interrupt was requested,
5965 fake a breakpoint event. Return 0 if there is no event to handle,
5967 (win32_wait): Don't check here if gdb sent an interrupt request.
5968 Ensure there is a valid event to handle.
5969 (win32_request_interrupt): Add soft interruption method as last
5972 2007-12-03 Leo Zayas
5973 Pedro Alves <pedro_alves@portugalmail.pt>
5975 * win32-low.h (win32_thread_info): Add descriptions to the
5976 structure members. Replace `suspend_count' counter by a
5978 * win32-low.c (thread_rec): Update condition of when to get the
5979 context from the inferior. Rely on ContextFlags being set if it
5980 has already been retrieved. Only suspend the inferior thread if
5981 we haven't already. Warn if that fails.
5982 (continue_one_thread): s/suspend_count/suspended/. Only call
5983 ResumeThread once. Warn if that fails.
5985 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5987 * win32-low.c (win32_wait): Don't read from the inferior when it
5990 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5992 * Makefile.in (win32_low_h): New variable.
5993 (win32-low.o): Add dependency on $(win32_low_h).
5994 (win32-arm-low.o, win32-i386-low.o): New rules.
5996 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5998 * hostio.c: Correct copyright year.
6000 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6002 * Makefile.in (OBS): Add hostio.o.
6003 (hostio.o): New rule.
6004 * server.h (handle_vFile): Declare.
6005 * hostio.c: New file.
6006 * server.c (handle_v_requests): Take packet_len and new_packet_len
6007 for binary packets. Call handle_vFile.
6008 (main): Update call to handle_v_requests.
6010 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6012 * linux-low.c: Include <sched.h>.
6014 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6016 * linux-low.c (linux_tracefork_grandchild): New.
6017 (linux_tracefork_child): Use clone.
6018 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6020 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6022 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6024 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6026 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6028 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6030 * inferiors.c (change_inferior_id): Delete.
6031 (add_pid_to_list, pull_pid_from_list): New.
6032 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6033 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6034 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6035 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6036 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6037 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6038 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6039 (using_threads): Always set to 1.
6040 (handle_extended_wait): New.
6041 (add_process): Do not set TID.
6042 (linux_create_inferior): Set must_set_ptrace_flags.
6043 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6044 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6045 (linux_thread_alive): Rename TID argument to LWPID.
6046 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6047 (linux_wait_for_event): Do not use TID or check using_threads. Update
6048 call to dead_thread_notify. Call handle_extended_wait.
6049 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6050 (send_sigstop): Delete sigstop_sent.
6051 (wait_for_sigstop): Avoid TID.
6052 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6053 (linux_test_for_tracefork): New.
6054 (linux_lookup_signals): Use thread_db_active and
6055 linux_supports_tracefork_flag.
6056 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6057 * linux-low.h (get_process_thread): Avoid TID.
6058 (struct process_ifo): Move thread_known and tid to the end. Remove
6060 (linux_attach_lwp, thread_db_init): Update prototypes.
6061 * server.h (change_inferior_id): Delete prototype.
6062 (add_pid_to_list, pull_pid_from_list): New prototypes.
6063 * thread-db.c (thread_db_use_events): New.
6064 (find_first_thread): Rename to...
6065 (find_one_thread): ...this. Update callers and messages. Do not
6066 call fatal. Check thread_db_use_events. Do not call
6067 change_inferior_id or new_thread_notify.
6068 (maybe_attach_thread): Update. Do not call new_thread_notify.
6069 (thread_db_init): Set thread_db_use_events. Check use_events.
6070 * utils.c (fatal, warning): Correct message prefix.
6072 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6074 * Makefile.in (clean): Remove new files.
6075 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6076 (powerpc-64.o, powerpc-64.c): New rules.
6077 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6078 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6080 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6082 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6083 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6084 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6085 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6086 (target_regsets): Add AltiVec and SPE register sets.
6087 * configure.ac: Check for AltiVec and SPE.
6088 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6089 (ppc_fill_vrregset, ppc_store_vrregset): New.
6090 (target_regsets): Add AltiVec register set.
6091 * configure: Regenerated.
6093 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6095 * linux-low.c (O_LARGEFILE): Define.
6096 (linux_read_memory): Use /proc/PID/mem.
6097 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6098 * configure, config.in: Regenerated.
6100 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6102 * linux-low.c (linux_wait_for_event): Do not pass signals while
6105 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6107 * win32-low.c (create_process): New.
6108 (win32_create_inferior): Use create_process instead of
6109 CreateProcess. If create_process failed retry appending an ".exe"
6110 suffix. Store the GetLastError result immediatelly after
6111 create_process calls and use it on the call to error.
6113 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6115 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6117 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6119 * configure.ac: Switch license to GPLv3.
6121 2007-08-01 Michael Snyder <msnyder@access-company.com>
6123 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6125 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6127 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6129 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6130 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6131 CloseToolhelp32Snapshot.
6132 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6133 CloseToolhelp32Snapshot.
6135 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6137 * server.c (main): Check for inferior exit before main loop.
6139 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6141 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6142 instead of on tmp_desc.
6144 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6145 Daniel Jacobowitz <dan@codesourcery.com>
6147 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6148 (add_thread): Minor cleanups.
6149 (clear_inferiors): Move lower in the file. Clear the DLL
6151 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6152 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6153 (xml_escape_text): New.
6154 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6156 (handle_v_cont): Report errors.
6157 (gdbserver_version): Update.
6158 (main): Correct size of own_buf. Do not report initial DLL events.
6159 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6160 (unloaded_dll, xml_escape_text): New.
6161 * win32-low.c (enum target_waitkind): Update comments.
6162 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6163 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6164 (win32_EnumProcessModules, win32_GetModuleInformation)
6165 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6166 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6167 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6168 (win32_Module32First, win32_Module32Next, load_toolhelp)
6169 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6170 (get_child_debug_event): Handle DLL events.
6171 (win32_wait): Likewise.
6173 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6175 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6176 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6178 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6180 * win32-low.c (handle_output_debug_string): Ignore event if not
6183 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6185 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6187 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6189 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6191 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6193 * inferiors.c (change_inferior_id): Add comment.
6194 * linux-low.c (check_removed_breakpoint): Add an early
6195 prototype. Improve debug output.
6196 (linux_attach): Doc update.
6197 (linux_detach_one_process, linux_detach): Clean up before releasing
6199 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6200 * linux-low.h (struct process_info): Doc improvement.
6201 * mem-break.c (delete_all_breakpoints): New.
6202 * mem-break.h (delete_all_breakpoints): New prototype.
6203 * thread-db.c (find_first_thread): New.
6204 (thread_db_create_event): Call it instead of
6205 thread_db_find_new_threads. Clean up unused variables.
6206 (maybe_attach_thread): Remove first thread handling.
6207 (thread_db_find_new_threads): Use find_first_thread.
6208 (thread_db_get_tls_address): Likewise.
6210 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6212 * thread-db.c (thread_db_find_new_threads): Add prototype.
6213 (thread_db_create_event): Check for the main thread before adding
6215 (maybe_attach_thread): Only enable event reporting if TID == 0.
6216 (thread_db_get_tls_address): Check for new threads.
6218 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6220 * linux-low.c (linux_create_inferior): Try execv before execvp.
6221 * spu-low.c (spu_create_inferior): Likewise.
6223 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6225 * linux-low.c (linux_create_inferior): Change execv to execvp.
6226 * spu-low.c (spu_create_inferior): Likewies.
6228 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6230 * Makefile.in (clean): Clean new files instead of deleted ones.
6231 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6232 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6234 * configure.srv: Specify XML files and new regformats for MIPS and
6236 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6237 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6238 an entry for the restart register.
6239 (mips_cannot_fetch_register, mips_cannot_store_register)
6240 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6241 register names to match the XML descriptions.
6242 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6243 restart register instead of $0.
6245 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6246 Markus Deuling <deuling@de.ibm.com>
6248 * remote-utils.c (decode_xfer_write): New function.
6249 * server.h (decode_xfer_write): Add prototype.
6250 * server.c (handle_query): Add PACKET_LEN argument. Support
6251 qXfer:spu:read and qXfer:spu:write packets.
6252 (main): Pass packet_len to handle_query.
6253 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6254 * target.h (target_ops): Add qxfer_spu.
6256 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6258 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6259 accessing non-seekable spufs files.
6261 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6263 * server.c (handle_query): Add reply for qC packet.
6265 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6266 Leo Zayas <lerele@champenstudios@com>
6268 * server.h (check_remote_input_interrupt_request): New function.
6269 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6270 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6271 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6272 (check_remote_input_interrupt_request): New function.
6273 * server.h (check_remote_input_interrupt_request): Declare.
6274 * win32-low.c (winapi_DebugBreakProcess,
6275 winapi_GenerateConsoleCtrlEvent): New typedefs.
6276 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6278 (win32_wait): Check for remote interrupt request
6279 with check_remote_input_interrupt_request.
6280 (win32_request_interrupt): New function.
6281 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6283 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6285 * win32-low.c (debug_registers_changed,
6286 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6287 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6288 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6289 (thread_rec): Get context using the low target.
6290 (child_add_thread): Call thread_added on the low target,
6291 which does the same thing.
6293 (do_initial_child_stuff): Remove debug registers references.
6294 Set context using the low target. Resume threads after
6295 setting the contexts.
6296 (child_continue): Remove dead variable. Remove debug
6297 registers references.
6298 (child_fetch_inferior_registers): Go through the low target.
6299 (do_child_store_inferior_registers): Remove.
6300 (child_store_inferior_registers): Go through the low target.
6301 (win32_resume): Remove debug registers references.
6302 Set context using the low target.
6303 (handle_exception): Change return type to void. Don't record
6304 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6305 first chance exception.
6306 (get_child_debug_event): Change return type to void. Remove
6307 goto loop. Always return after waiting for debug event.
6308 (win32_wait): Convert to switch statement. Handle spurious
6311 * win32-i386-low.c (debug_registers_changed,
6312 debug_registers_used): New.
6313 (initial_stuff): Rename to ...
6314 (i386_initial_stuff): ... this. Clear debug registers
6316 (store_debug_registers): Delete.
6317 (i386_get_thread_context): New.
6318 (load_debug_registers): Delete.
6319 (i386_set_thread_context): New.
6320 (i386_thread_added): New.
6321 (single_step): Rename to ...
6322 (i386_single_step): ... this.
6323 (do_fetch_inferior_registers): Rename to ...
6324 (i386_fetch_inferior_register): ... this.
6325 (i386_store_inferior_register): New.
6326 (the_low_target): Adapt to new interface.
6328 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6329 (arm_get_thread_context): New.
6330 (arm_set_thread_context): New.
6332 (do_fetch_inferior_registers): Rename to ...
6333 (arm_fetch_inferior_register): ... this.
6334 (arm_store_inferior_register): New.
6335 (arm_wince_breakpoint): Reimplement as unsigned long.
6336 (arm_wince_breakpoint_len): Define.
6337 (the_low_target): Adapt to new interface.
6339 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6340 load_debug_registers. Add get_thread_context, set_thread_context,
6341 thread_added and store_inferior_register. Rename
6342 fetch_inferior_registers to fetch_inferior_register.
6343 (regptr): Remove declaration.
6345 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6347 * linux-low.c (linux_detach): Change return type to int. Return 0.
6348 * spu-low.c (spu_detach): Likewise.
6350 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6352 * target.h (target_ops): Change return type of detach to int.
6354 (join_inferior): New.
6355 * server.c (main): Don't skip detach support on mingw32.
6356 If the inferior doesn't support detaching return error.
6357 Call join_inferior instead of using waitpid.
6358 * linux-low.c (linux_join): New.
6359 (linux_target_op): Add linux_join.
6360 * spu-low.c (spu_join): New.
6361 (spu_target_ops): Add spu_join.
6362 * win32-low.c (win32_detach): Adapt to new interface.
6363 Reopen current_process_handle before detaching. Issue a child
6364 resume before detaching.
6366 (win32_target_op): Add win32_join.
6368 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6370 * win32-low.c (win32-attach): Fix return value.
6371 * target.h (target_ops): Describe ATTACH return values.
6373 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6375 * win32-low.c (GETPROCADDRESS): Define.
6376 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6377 (winapi_DebugSetProcessKillOnExit): Likewise.
6378 (win32_create_inferior): Force usage of ansi CreateProcessA.
6379 (win32_attach): Use GETPROCADDRESS.
6380 (win32_detach): Likewise.
6382 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6384 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6386 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6388 * win32-low.c: Commit leftover changes from 2007-03-29.
6390 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6392 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6393 fields short instead of int. Add explicit padding.
6394 (i387_cache_to_fsave): Remove unnecessary casts.
6395 (i387_fsave_to_cache): Doc fix.
6396 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6398 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6400 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6401 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6403 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6405 * configure.srv (arm*-*-mingw32ce*): Move near the other
6408 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6410 * configure.ac: Add errno checking.
6411 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6412 sys/file.h and malloc.h.
6413 (AC_CHECK_DECLS): Add perror.
6414 (srv_mingwce): Handle.
6415 * configure.srv (i[34567]86-*-cygwin*): Add
6416 win32-i386-low.o to srv_tgtobj.
6417 (i[34567]86-*-mingw*): Likewise.
6418 (arm*-*-mingw32ce*): Add case.
6419 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6420 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6421 [__MINGW32CE__] (strerror): New function.
6422 [__MINGW32CE__] (errno): Define to GetLastError.
6423 [__MINGW32CE__] (COUNTOF): New macro.
6424 (remote_open): Remove extra close call.
6425 * mem-break.c (delete_breakpoint_at): New function.
6426 * mem-break.h (delete_breakpoint_at): Declare.
6427 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6428 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6429 [USE_WIN32API] (read, write): Add char* casts.
6430 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6431 * server.h: Include wincecompat.h on Windows CE.
6432 [HAVE_ERRNO_H]: Check.
6433 (perror): Declare if not declared.
6434 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6435 (perror_with_name): Remove errno declaration.
6436 * wincecompat.h: New.
6437 * wincecompat.c: New.
6439 * win32-arm-low.c: New.
6440 * win32-i386-low.c: New.
6441 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6442 (OUTMSG2): Make it safe.
6444 (COUNTOF): New macro.
6445 (NUM_REGS): Get it from the low target.
6446 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6447 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6448 (thread_rec): Let low target handle debug registers.
6449 (child_add_thread): Likewise.
6450 (child_init_thread_list): Likewise.
6451 (continue_one_thread): Likewise.
6453 (do_child_fetch_inferior_registers): Move to ...
6454 * win32-i386-low.c: ... here, and rename to ...
6455 (do_fetch_inferior_registers): ... this.
6456 * win32-low.c (child_fetch_inferior_registers):
6457 Go through the low target.
6458 (do_child_store_inferior_registers): Use regptr.
6459 (strwinerror): New function.
6460 (win32_create_inferior): Handle Windows CE.
6461 Use strwinerror instead of strerror on Windows error
6462 codes. Add program to the error output.
6463 Don't close the main thread handle on Windows CE.
6464 (win32_attach): Use coredll.dll on Windows CE.
6465 (win32_kill): Close current process and current
6467 (win32_detach): Use coredll.dll on Windows CE.
6468 (win32_resume): Let low target handle debug registers, and
6470 (handle_exception): Add/Remove initial breakpoint. Avoid
6471 non-existant WSTOPSIG on Windows CE.
6472 (win32_read_inferior_memory): Cast to remove warning.
6473 (win32_arch_string): Go through the low target.
6474 (initialize_low): Call set_breakpoint_data with the low
6475 target's breakpoint.
6476 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6477 FOP_REGNUM, mappings): Move to ...
6478 * win32-i386-low.c: ... here.
6479 * win32-low.c (win32_thread_info): Move to ...
6480 * win32-low.h: ... here.
6481 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6482 win32-arm-low.c and wincecompat.c.
6483 (all:): Add $EXEEXT.
6484 (install-only:): Likewise.
6485 (gdbserver:): Likewise.
6486 (gdbreplay:): Likewise.
6487 * config.in: Regenerate.
6488 * configure: Regenerate.
6490 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6492 * win32-low.c: Rename typedef thread_info to
6493 win32_thread_info throughout.
6495 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6497 * win32-i386-low.c: Rename to ...
6498 * win32-low.c: ... this.
6499 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6500 * Makefile.in: Likewise.
6502 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6504 * remote-utils.c (monitor_output): Constify msg parameter.
6505 * server.h (monitor_output): Likewise.
6506 * win32-i386-low.c (handle_output_debug_string): New.
6507 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6508 handle_output_debug_string.
6509 (get_child_debug_event): Likewise.
6511 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6513 * server.c (main): Correct strtoul check.
6515 2007-03-27 Jon Ringle <jon@ringle.org>
6517 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6519 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6521 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6523 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6525 * terminal.h: Check HAVE_SGTTY_H.
6527 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6529 * remote-utils.c (remote_open): Print out the assigned port number.
6531 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6533 * remote-utils.c (monitor_output): New function.
6534 * server.c (debug_threads): Define here.
6535 (monitor_show_help): New function.
6536 (handle_query): Handle qRcmd.
6537 (main): Do not handle 'd' packet.
6538 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6539 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6542 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6544 * Makefile.in (EXEEXT): New.
6545 (clean): Use $(EXEEXT).
6547 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6549 * target.h (target_ops): Rename send_signal to request_interrupt,
6550 and remove enum target_signal parameter.
6551 * linux-low.c (linux_request_interrupt): Rename from
6552 linux_send_signal, and always send SIGINT.
6553 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6554 and always send SIGINT.
6555 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6557 (input_interrupt): Likewise.
6559 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6561 * server.c (get_features_xml): Check if target implemented
6563 * win32-i386-low.c (win32_arch_string): New.
6564 (win32_target_ops): Add win32_arch_string as arch_string member.
6566 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6568 * spu-low.c (spu_arch_string): New.
6569 (spu_target_ops): Add spu_arch_string.
6571 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6573 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6574 * configure.ac: Do not check for terminal.h.
6575 * configure, config.in: Regenerated.
6577 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6579 * Makefile.in (OBS): Add $(XML_BUILTIN).
6580 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6582 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6583 (arm-with-iwmmxt.c): New.
6584 * config.in, configure: Regenerate.
6585 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6586 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6587 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6588 (arm*-*-linux*): Add iWMMXt and regset support.
6589 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6590 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6591 (arm_store_wmmxregset, target_regsets): New.
6592 * server.c (get_features_xml): Take annex argument. Check builtin
6594 (handle_query): Handle multiple annexes.
6596 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6598 * remote-utils.c [USE_WIN32API] (read, write): Define.
6599 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6602 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6604 * linux-i386-low.c (the_low_target): Set arch_string.
6605 * linux-x86-64-low.c (the_low_target): Likewise.
6606 * linux-low.c (linux_arch_string): New.
6607 (linux_target_ops): Add it.
6608 * linux-low.h (struct linux_target_ops): Add arch_string.
6609 * server.c (write_qxfer_response): Use const void * for DATA.
6610 (get_features_xml): New.
6611 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6612 * target.h (struct target_ops): Add arch_string method.
6614 2007-01-03 Denis Pilat <denis.pilat@st.com>
6615 Daniel Jacobowitz <dan@codesourcery.com>
6617 * linux-low.c (linux_kill): Handle being called with no threads.
6618 * win32-i386-low.c (win32_kill): Likewise.
6619 (get_child_debug_event): Clear current_process_handle.
6621 2006-12-30 Denis PILAT <denis.pilat@st.com>
6622 Daniel Jacobowitz <dan@codesourcery.com>
6624 * remote-utils.c (remote_open): Check the type of specified
6625 serial port devices before opening them.
6626 * server.c (main): Kill the inferior if an error occurs during
6627 the first remote_open.
6629 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6631 * README: Update supported targets.
6633 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6635 * Makefile.in (clean): Remove reg-mips64.c.
6636 (reg-mips64.c, reg-mips64.o): New rules.
6637 * configure.srv: Handle mips64. Include regset support for mips.
6638 * linux-mips-low.c (union mips_register): New.
6639 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6640 (mips_breakpoint, mips_breakpoint_at): Use int.
6641 (mips_collect_register, mips_supply_register)
6642 (mips_collect_register_32bit, mips_supply_register_32bit)
6643 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6644 (mips_store_fpregset, target_regsets): New.
6645 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6647 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6649 * configure.srv: Add target "spu*-*-*".
6650 * Makefile.in (clean): Remove reg-spu.c.
6651 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6652 * spu-low.c: New file.
6654 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6656 * configure.ac: Correct td_thr_tls_get_addr test.
6657 * configure: Regenerated.
6659 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6661 * linux-low.c (linux_wait_for_event): Reformat. Use the
6663 * remote-utils.c (decode_address_to_semicolon): New.
6664 * server.c (pass_signals, handle_general_set): New.
6665 (handle_query): Mention QPassSignals for qSupported.
6666 (main): Call handle_general_set.
6667 * server.h (pass_signals, decode_address_to_semicolon): New.
6669 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6671 * server.c (handle_query): Correct error handling for read_auxv.
6673 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6675 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6676 and srv_linux_thread_db to yes.
6677 * linux-s390-low.c (s390_fill_gregset): New function.
6678 (target_regsets): Define data structure.
6680 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6682 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6683 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6684 * config.in, configure: Regenerated.
6685 * inferiors.c (gdb_id_to_thread): New function.
6686 (gdb_id_to_thread_id): Use it.
6687 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6688 * linux-low.h (struct process_info): Add th member.
6689 (thread_db_get_tls_address): New prototype.
6690 * remote-utils.c (decode_address): Make non-static.
6691 * server.c (handle_query): Handle qGetTLSAddr.
6692 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6693 * target.h (struct target_ops): Add get_tls_address.
6694 * thread-db.c (maybe_attach_thread): Save the thread handle.
6695 (thread_db_get_tls_address): New.
6697 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6699 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6700 (linux_resume_one_process): Take a siginfo_t *. Update all
6701 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6702 (struct pending_signals): Add a siginfo_t.
6703 (linux_wait_for_process): Always set last_status.
6704 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6705 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6706 * linux-low.h (struct process_info): Add last_status.
6708 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6710 * remote-utils.c (try_rle): New function.
6711 (putpkt_binary): Use it.
6713 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6715 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6716 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6717 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6718 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6719 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6722 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6724 * server.c (terminal_fd): New variable.
6725 (old_foreground_pgrp): Likewise.
6726 (restore_old_foreground_pgrp): New function.
6727 (start_inferior): Record the terminal file descriptor in terminal_fd
6728 and its original foreground group in old_foreground_pgrp. Register
6729 restore_old_foreground_pgrp with atexit().
6731 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6733 * server.c (handle_query): Correct qPart to qXfer.
6735 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6737 * configure.ac: Check for more headers which are missing on
6738 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6739 * configure.srv: Add Cygwin and mingw32.
6740 * remote-utils.c: Don't include headers unconditionally which
6741 are missing on mingw32. Include <winsock.h> for mingw32.
6742 (remote_open): Adjust for mingw32 support. Flush
6743 standard error after writing to it.
6744 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6745 (unblock_async_io, enable_async_io, disable_async_io)
6746 (readchar, getpkt): Update for Winsock support.
6747 (prepare_resume_reply): Expect a protocol signal number.
6748 * server.c: Disable <sys/wait.h> on mingw32.
6749 (start_inferior): Adjust for mingw32 support. Flush
6750 standard error after writing to it.
6751 (attach_inferior): Likewise. Use protocol signal
6753 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6755 * win32-i386-low.c: New file.
6756 * Makefile.in (XM_CLIBS): Set.
6757 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6758 (win32-i386-low.o): New dependency rule.
6759 * linux-low.c (linux_wait): Use target signal numbers.
6760 * target.h (struct target_ops): Doc fix.
6761 * server.h (target_signal_to_name): New prototype.
6762 * gdbreplay.c: Don't include headers unconditionally which
6763 are missing on mingw32. Include <winsock.h> for mingw32.
6764 (remote_close, remote_open): Adjust for Winsock support.
6765 * configure, config.in: Regenerated.
6767 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6769 * server.c (decode_xfer_read, write_qxfer_response): New.
6770 (handle_query): Take a packet length argument. Handle
6771 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6772 the qSupported response.
6773 (main): Update call to handle_query.
6775 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6777 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6778 (putpkt_binary): Renamed from putpkt and adjusted for binary
6780 (putpkt): New wrapper for putpkt_binary.
6781 (readchar): Don't mask off the high bit.
6782 (decode_X_packet): New function.
6783 * server.c (main): Call putpkt_binary if a handler sets the packet
6784 length. Save the length of the incoming packet. Handle 'X'.
6785 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6787 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6789 * server.c (handle_query): Handle qSupported.
6791 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6793 * remote-utils.c (all_symbols_looked_up): New variable.
6794 (look_up_one_symbol): Check it.
6795 * server.h (look_up_one_symbol): New declaration.
6796 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6798 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6800 * Makefile.in (linux-arm-low.o): Update dependencies.
6801 * linux-arm-low.c: Include "gdb_proc_service.h".
6802 (PTRACE_GET_THREAD_AREA): Define.
6803 (ps_get_thread_area): New function.
6805 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6807 * configure.srv (m68k*-*-uclinux*): New target.
6808 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6809 (linux_resume_one_process): Remove extraneous cast.
6810 (linux_read_offsets): New.
6811 (linux_target_op): Add linux_read_offsets on mmuless systems.
6812 * server.c (handle_query): Add qOffsets logic.
6813 * target.h (struct target_ops): Add read_offsets.
6815 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6817 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6818 (PTRACE_GET_THREAD_AREA): Define.
6819 (ps_get_thread_area): New function.
6820 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6821 (linux-x86-64-low.o): Update.
6823 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6825 * configure.ac: Remove checks for prfpregset_t.
6826 * gdb_proc_service.h: New file.
6827 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6828 new "gdb_proc_service.h".
6829 * proc-service.c: Likewise.
6830 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6831 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6832 * Makefile.in (gdb_proc_service_h): Updated.
6833 * configure, config.in: Regenerated.
6835 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6837 * remote-utils.c (prepare_resume_reply): Move declaration
6838 of gdb_id_from_wait to the top of the block.
6840 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6842 * linux-low.c (regsets_store_inferior_registers): Read the regset
6843 from the target before filling it.
6845 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6847 * server.c (attach_inferior): Return SIGTRAP for a successful
6850 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6852 * Makefile.in (OBS): Add version.o.
6853 (STAGESTUFF): Delete.
6854 (version.o): Add dependencies.
6855 (version.c): Replace rule.
6856 (clean): Remove version.c.
6857 * server.c (gdbserver_version): New.
6858 (gdbserver_usage): Use printf.
6859 (main): Handle --version and --help.
6860 * server.h (version, host_name): Add declarations.
6862 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6874 * linux-x86-64-low.c:
6877 * linux-ppc64-low.c:
6886 * linux-crisv32-low.c:
6898 * gdbserver.1: Add (C) after Copyright. Update the FSF
6901 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6903 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6904 (arm_breakpoint_at): Recognize both breakpoints.
6905 (the_low_target): Use the correct breakpoint instruction.
6907 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6909 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6910 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6911 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6912 (the_low_target): Update.
6914 2005-10-25 Andreas Schwab <schwab@suse.de>
6916 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6918 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6919 (ia64_num_regs): Reduce to 462.
6921 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6923 * acinclude.m4: Correct quoting.
6924 * aclocal.m4: Regenerated.
6926 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6927 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6928 (thread_db_init): Call thread_db_err_str.
6929 * configure.ac: Check for TD_VERSION.
6930 * config.in, configure: Regenerated.
6932 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6934 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6936 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6938 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6939 is not available. Define HAVE_PTRACE_GETREGS if it is.
6940 * config.in, configure: Regenerated.
6941 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6942 * linux-i386-low.c, linux-m68k-low.c: Update to use
6943 HAVE_PTRACE_GETREGS.
6944 * linux-low.c (regsets_fetch_inferior_registers)
6945 (regsets_store_inferior_registers): Only return 0 if we processed
6947 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6948 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6950 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6952 * inferiors.c (struct thread_info): Add gdb_id.
6953 (add_thread): Add gdb_id argument.
6954 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6955 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6956 calls to add_thread.
6957 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6958 * server.c (handle_query): Use thread_to_gdb_id.
6959 (handle_v_cont, main): Use gdb_id_to_thread_id.
6960 * server.h (add_thread): Update prototype.
6961 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6964 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6966 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6967 left-padded registers.
6968 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6969 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6971 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6973 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6974 * configure: Regenerate.
6975 * config.in: Regenerate.
6976 * server.h (NEED_DECLARATION_STRERROR):
6977 Replace with !HAVE_DECL_STRERROR.
6979 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6981 * linux-low.c (linux_wait, linux_send_signal): Don't test
6982 an unsigned long variable for > 0 if it could be MAX_ULONG.
6983 * server.c (myresume): Likewise.
6984 * target.c (set_desired_inferior): Likewise.
6986 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6988 * configure.ac: Simplify and improve check for socklen_t.
6989 * configure, config.in: Regenerate.
6991 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6993 * acconfig.h: Remove.
6994 * configure.ac: Add a test for socklen_t. Use three-argument
6995 AC_DEFINE throughout.
6996 * config.in: Regenerated using autoheader 2.59.
6997 * configure: Regenerated.
6999 * gdbreplay.c (socklen_t): Provide a default.
7000 (remote_open): Use socklen_t.
7001 * remote-utils.c (socklen_t): Provide a default.
7002 (remote_open): Use socklen_t.
7003 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7006 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7008 * linux-low.c (linux_read_memory, linux_write_memory)
7009 (linux_read_auxv): Likewise.
7010 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7011 (check_mem_write): Likewise.
7012 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7014 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7015 (registers_from_string, register_data): Likewise.
7016 * server.c (handle_query, main): Likewise.
7017 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7018 (decode_M_packet): Likewise.
7019 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7020 * target.h (struct target_ops): Update read_memory, write_memory,
7022 (read_inferior_memory, write_inferior_memory): Update.
7023 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7025 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7026 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7027 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7028 linux-s390-low.c, linux-sh-low.c: Update for changes in
7029 read_inferior_memory and the_low_target->breakpoint.
7031 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7033 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7034 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7035 * configure.srv: Add powerpc64-*-linux*.
7036 * linux-ppc64-low.c: New file.
7038 2005-05-23 Orjan Friberg <orjanf@axis.com>
7040 * linux-cris-low.c: New file with support for CRIS.
7041 * linux-crisv32-low.c: Ditto for CRISv32.
7042 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7043 (clean): Add reg-cris.c and reg-crisv32.c.
7044 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7045 reg-crisv32.o, and reg-crisv32.c to make rules.
7046 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7049 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7051 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7052 of sizeof (PTRACE_XFER_TYPE).
7053 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7055 2005-05-12 Orjan Friberg <orjanf@axis.com>
7057 * target.h (struct target_ops): Add insert_watchpoint,
7058 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7059 pointers for hardware watchpoint support.
7060 * linux-low.h (struct linux_target_ops): Ditto.
7061 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7062 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7063 to linux_target_ops.
7064 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7066 * server.c (main): Recognize 'Z' and 'z' packets.
7068 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7070 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7071 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7072 (the_low_target): Add new members.
7074 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7076 * proc-service.c (ps_lgetregs): Search all_processes instead of
7079 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7081 * server.c (start_inferior): Change return type to int.
7082 (attach_inferior): Change sigptr to int *.
7083 (handle_v_cont, handle_v_requests): Change signal to int *.
7084 (main): Change signal to int.
7086 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7088 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7089 * configure.srv: Add m32r*-*-linux*.
7090 * linux-m32r-low.c: New file.
7092 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7094 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7096 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7098 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7099 Take unsigned long arguments for PIDs.
7100 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7101 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7102 (wait_for_sigstop, linux_resume_one_process)
7103 (regsets_fetch_inferior_registers, linux_send_signal)
7104 (linux_read_auxv): Likewise. Update the types of variables holding
7105 PIDs. Update format string specifiers.
7106 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7107 * remote-utils.c (prepare_resume_reply): Likewise.
7108 * server.c (cont_thread, general_thread, step_thread)
7109 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7111 (handle_query): Update format specifiers.
7112 (handle_v_cont, main): Use strtoul for thread IDs.
7113 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7114 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7115 (general_thread, step_thread, thread_from_wait)
7116 (old_thread_from_wait): Update.
7117 * target.h (struct thread_resume): Use unsigned long for THREAD.
7118 (struct target_ops): Use unsigned long for arguments to attach and
7121 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7123 * acinclude.m4: Include bfd/bfd.m4 directly.
7124 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7125 <agriffis@toolchain.org>.
7126 * aclocal.m4, configure: Regenerated.
7128 2005-01-07 Andrew Cagney <cagney@gnu.org>
7130 * configure.ac: Rename configure.in, require autoconf 2.59.
7131 * configure: Re-generate.
7133 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7135 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7137 * aclocal.m4: Regenerated.
7138 * configure: Regenerated.
7140 2004-11-21 Andreas Schwab <schwab@suse.de>
7142 * linux-m68k-low.c (m68k_num_gregs): Define.
7143 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7144 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7145 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7146 (m68k_breakpoint_at): New. Add to the_low_target.
7148 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7149 srv_linux_thread_db to yes.
7151 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7153 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7154 (ARCH_SET_FS): Likewise.
7155 (ARCH_GET_FS): Likewise.
7156 (ARCH_GET_GS): Likewise.
7158 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7160 * linux-i386-low.c (ps_get_thread_area): New.
7161 * linux-x86-64-low.c (ps_get_thread_area): New.
7162 * linux-low.c: Include <sys/syscall.h>.
7163 (linux_kill_one_process): Don't kill the first thread here.
7164 (linux_kill): Kill the first thread here.
7165 (kill_lwp): New function.
7166 (send_sigstop, linux_send_signal): Use it.
7167 * proc-service.c: Clean up #ifdefs.
7168 (fpregset_info): Delete.
7169 (ps_lgetregs): Update and enable implementation.
7170 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7172 * remote-utils.c (struct sym_cache, symbol_cache): New.
7173 (input_interrupt): Print a clearer message.
7174 (async_io_enabled): New variable.
7175 (enable_async_io, disable_async_io): Use it. Update comments.
7176 (look_up_one_symbol): Use the symbol cache.
7177 * thread-db.c (thread_db_look_up_symbols): New function.
7178 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7180 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7182 * configure.in: Test for -rdynamic.
7183 * configure: Regenerated.
7184 * Makefile (INTERNAL_LDFLAGS): New.
7185 (gdbserver, gdbreplay): Use it.
7187 2004-09-02 Andrew Cagney <cagney@gnu.org>
7189 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7191 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7193 * linux-low.c (linux_wait): Clear all_processes list also.
7195 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7197 * linux-low.c: Include <errno.h>. Remove extern declaration of
7200 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7202 * gdbreplay.c, server.h, utils.c: Update copyright years.
7204 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7206 * server.c (main): Print child status or termination signal from
7207 variable 'signal', not 'sig'.
7209 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7211 * linux-low.c (linux_read_memory): Change return type to
7212 int. Check for and return error from ptrace().
7213 * target.c (read_inferior_memory): Change return type to int. Pass
7214 back return status from the_target->read_memory().
7215 * target.h (struct target_ops): Adapt *read_memory() prototype.
7217 (read_inferior_memory): Adapt prototype.
7218 * server.c (main): Return an error packet if
7219 read_inferior_memory() returns an error.
7221 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7223 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7224 Unify with other clean targets.
7226 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7228 * server.c (handle_v_cont): Call set_desired_inferior.
7230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7232 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7234 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7236 * linux-low.c (linux_wait): Unblock async I/O.
7237 (linux_resume): Block and enable async I/O.
7238 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7239 * server.h (block_async_io, unblock_async_io): Add prototypes.
7241 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7243 * remote-utils.c (remote_open): Print a status notice after
7245 * server.c (attach_inferior): Print a status notice after
7248 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7250 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7252 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7254 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7256 * server.c, target.h: Update copyright years.
7258 2004-02-25 Roland McGrath <roland@redhat.com>
7260 * target.h (struct target_ops): New member `read_auxv'.
7261 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7262 * linux-low.c (linux_read_auxv): New function.
7263 (linux_target_ops): Initialize `read_auxv' member to that.
7265 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7267 Committed by Jim Blandy <jimb@redhat.com>.
7269 * linux-s390-low.c (s390_num_regs): Update.
7270 (s390_regmap): Remove control registers. Use __s390x__ predefine
7271 instead of GPR_SIZE to distiguish s390 and s390x targets.
7273 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7275 * linux-low.c: Update copyright year.
7276 (check_removed_breakpoint): Clear pending_is_breakpoint.
7277 (linux_set_resume_request, linux_queue_one_thread)
7278 (resume_status_pending_p): New functions.
7279 (linux_continue_one_thread): Use process->resume.
7280 (linux_resume): Only resume threads if there are no pending events.
7281 * linux-low.h (struct process_info): Add resume request
7284 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7286 * regcache.c (new_register_cache): Clear the allocated register
7287 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7289 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
7291 * linux-low.c (linux_resume): Take a struct thread_resume *
7293 (linux_wait): Update call.
7294 (resume_ptr): New static variable.
7295 (linux_continue_one_thread): Renamed from
7296 linux_continue_one_process. Use resume_ptr.
7297 (linux_resume): Use linux_continue_one_thread.
7298 * server.c (handle_v_cont, handle_v_requests): New functions.
7299 (myresume): New function.
7300 (main): Handle 'v' case.
7301 * target.h (struct thread_resume): New type.
7302 (struct target_ops): Change argument of "resume" to struct
7304 (myresume): Delete macro.
7306 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7308 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7309 (uninstall): Support DESTDIR.
7311 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7313 * configure.srv: Add xscale*linux copy of arm*linux entry.
7315 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
7317 * linux-arm-low.c (arm_reinsert_addr): New function.
7318 (the_low_target): Add arm_reinsert_addr.
7320 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7322 * mem-break.c: Remove whitespace at end of file.
7324 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7326 * configure.in: Check whether we need to prototype strerror.
7327 * server.h: Optionally prototype strerror.
7328 * gdbreplay.c (perror_with_name): Use strerror.
7329 * linux-low.c (linux_attach_lwp): Use strerror.
7330 * utils.c (perror_with_name): Use strerror.
7331 * config.in, configure: Regenerated.
7333 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7335 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7336 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7338 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
7340 * Makefile.in (SFILES): Update.
7341 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7342 low-sun3.c: Remove files.
7344 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
7346 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7347 (linux_detach_one_process, linux_detach): New functions.
7348 (linux_target_ops): Add linux_detach.
7349 * server.c (main): Handle 'D' packet.
7350 * target.h (struct target_ops): Add "detach" member.
7351 (detach_inferior): Define.
7353 2003-06-13 Mark Kettenis <kettenis@gnu.org>
7355 From Kelley Cook <kelleycook@wideopenwest.com>:
7356 * configure.srv: Accept i[34567]86 variants.
7358 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
7360 * linux-low.c (linux_wait_for_event): Correct comment typos.
7361 (linux_resume_one_process): Call check_removed_breakpoint.
7362 (linux_send_signal): New function.
7363 (linux_target_ops): Add linux_send_signal.
7364 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7366 * target.h (struct target_ops): Add send_signal.
7368 2003-05-29 Jim Blandy <jimb@redhat.com>
7370 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7371 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7372 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7373 away part of the register's value.
7375 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
7377 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7378 (linux_wait_for_event, linux_init_signals): Likewise.
7380 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
7382 * configure.in: Check for stdlib.h.
7383 * configure: Regenerated.
7384 * config.in: Regenerated.
7386 2003-01-04 Andreas Schwab <schwab@suse.de>
7388 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7390 2003-01-02 Andrew Cagney <ac131313@redhat.com>
7392 * Makefile.in: Remove obsolete code.
7394 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
7396 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7397 defined(PT_FPR0_HI).
7399 2002-11-17 Stuart Hughes <seh@zee2.com>
7401 * linux-arm-low.c (arm_num_regs): Increase.
7402 (arm_regmap): Include status register.
7404 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
7406 * linux-low.c (register_addr): Remove incorrect -1 check.
7408 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
7410 * linux-low.c (linux_create_inferior): Call setpgid. Return
7412 (unstopped_p, linux_signal_pid): Remove.
7413 (linux_target_ops): Remove linux_signal_pid.
7414 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7415 global instead of target method.
7416 * target.h (struct target_ops): Remove signal_pid. Update comment
7417 for create_inferior.
7418 * server.c (signal_pid): New variable.
7419 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7420 gdbserver. Set the child to be the foreground process group.
7421 (attach_inferior): Set signal_pid.
7423 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
7425 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7427 2002-08-20 Jim Blandy <jimb@redhat.com>
7429 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7432 2002-08-01 Andrew Cagney <cagney@redhat.com>
7434 * Makefile.in: Make chill references obsolete.
7436 2002-07-24 Kevin Buettner <kevinb@redhat.com>
7438 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7439 * configure: Regenerate.
7440 * config.in: Regenerate.
7442 2002-07-09 David O'Brien <obrien@FreeBSD.org>
7444 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7445 (perror_with_name, remote_close, remote_open, expect, play): Static.
7447 2002-07-04 Michal Ludvig <mludvig@suse.cz>
7449 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7450 byte offsets instead of an array of indexes.
7451 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7453 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
7455 * regcache.c: Add comment.
7457 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
7459 * thread-db.c: New file.
7460 * proc-service.c: New file.
7461 * acinclude.m4: New file.
7462 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7463 proc-service.o, and thread-db.o.
7464 (linux-low.o): Add USE_THREAD_DB.
7465 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7466 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7467 * aclocal.m4: Regenerated.
7468 * config.in: Regenerated.
7469 * configure: Regenerated.
7470 * configure.in: Check for proc_service.h, sys/procfs.h,
7471 thread_db.h, and linux/elf.h headrs.
7472 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7473 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7474 Check for -lthread_db and thread support.
7475 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7476 PowerPC, and SuperH.
7477 * i387-fp.c: Constify arguments.
7478 * i387-fp.h: Likewise.
7479 * inferiors.c: (struct thread_info): Renamed from
7480 `struct inferior_info'. Remove PID member. Use generic inferior
7481 list header. All uses updated.
7482 (inferiors, signal_pid): Removed.
7483 (all_threads): New variable.
7484 (get_thread): Define.
7485 (add_inferior_to_list): New function.
7486 (for_each_inferior): New function.
7487 (change_inferior_id): New function.
7488 (add_inferior): Removed.
7489 (remove_inferior): New function.
7490 (add_thread): New function.
7491 (free_one_thread): New function.
7492 (remove_thread): New function.
7493 (clear_inferiors): Use for_each_inferior and free_one_thread.
7494 (find_inferior): New function.
7495 (find_inferior_id): New function.
7496 (inferior_target_data): Update argument type.
7497 (set_inferior_target_data): Likewise.
7498 (inferior_regcache_data): Likewise.
7499 (set_inferior_regcache_data): Likewise.
7500 * linux-low.c (linux_bp_reinsert): Remove.
7501 (all_processes, stopping_threads, using_thrads)
7502 (struct pending_signals, debug_threads, pid_of): New.
7503 (inferior_pid): Replace with macro.
7504 (struct inferior_linux_data): Remove.
7505 (get_stop_pc, add_process): New functions.
7506 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7507 Use add_process and add_thread.
7508 (linux_attach_lwp): New function, based on old linux_attach. Use
7509 add_process and add_thread. Set stop_expected for new threads.
7510 (linux_attach): New function.
7511 (linux_kill_one_process): New function.
7512 (linux_kill): Kill all LWPs.
7513 (linux_thread_alive): Use find_inferior_id.
7514 (check_removed_breakpoints, status_pending_p): New functions.
7515 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7516 Update. Use WNOHANG. Wait for cloned processes also. Update process
7517 struct for the found process.
7518 (linux_wait_for_event): New function.
7519 (linux_wait): Use it. Support LWPs.
7520 (send_sigstop, wait_for_sigstop, stop_all_processes)
7521 (linux_resume_one_process, linux_continue_one_process): New functions.
7522 (linux_resume): Support LWPs.
7523 (REGISTER_RAW_SIZE): Remove.
7524 (fetch_register): Use register_size instead. Call supply_register.
7525 (usr_store_inferior_registers): Likewise. Call collect_register.
7527 (regsets_fetch_inferior_registers): Improve error message.
7528 (regsets_store_inferior_registers): Add debugging.
7529 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7530 (unstopped_p, linux_signal_pid): New functions.
7531 (linux_target_ops): Add linux_signal_pid.
7532 (linux_init_signals): New function.
7533 (initialize_low): Call it. Initialize using_threads.
7534 * regcache.c (inferior_regcache_data): Add valid
7536 (get_regcache): Fetch registers lazily. Add fetch argument
7537 and update all callers.
7538 (regcache_invalidate_one, regcache_invalidate): New
7540 (new_register_cache): Renamed from create_register_cache.
7541 Return the new regcache.
7542 (free_register_cache): Change argument to a void *.
7543 (registers_to_string, registers_from_string): Call get_regcache
7544 with fetch flag set.
7545 (register_data): Make static. Pass fetch flag to get_regcache.
7546 (supply_register): Call get_regcache with fetch flag clear.
7547 (collect_register): Call get_regcache with fetch flag set.
7548 (collect_register_as_string): New function.
7549 * regcache.h: Update.
7550 * remote-utils.c (putpkt): Flush after debug output and use
7552 Handle input interrupts while waiting for an ACK.
7553 (input_interrupt): Use signal_pid method.
7554 (getpkt): Flush after debug output and use stderr.
7555 (outreg): Use collect_register_as_string.
7556 (new_thread_notify, dead_thread_notify): New functions.
7557 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7559 (look_up_one_symbol): Flush after debug output.
7560 * server.c (step_thread, server_waiting): New variables.
7561 (start_inferior): Don't use signal_pid. Update call to mywait.
7562 (attach_inferior): Update call to mywait.
7563 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7564 (main): Don't fetch/store registers explicitly. Use
7565 set_desired_inferior. Support proposed ``Hs'' packet. Update
7568 (struct inferior_list, struct_inferior_list_entry): New.
7569 * target.c (set_desired_inferior): New.
7570 (write_inferior_memory): Constify.
7571 (mywait): New function.
7573 (struct target_ops): New signal_pid method.
7574 (mywait): Removed macro, added prototype.
7576 * linux-low.h (regset_func): Removed.
7577 (regset_fill_func, regset_store_func): New.
7578 (enum regset_type): New.
7579 (struct regset_info): Add type field. Use new operation types.
7580 (struct linux_target_ops): stop_pc renamed to get_pc.
7581 Add decr_pc_after_break and breakpoint_at.
7582 (get_process, get_thread_proess, get_process_thread)
7583 (strut process_info, all_processes, linux_attach_lwp)
7584 (thread_db_init): New.
7586 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7587 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7588 (the_low_target): Add new members.
7589 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7590 (i386_store_fpxregset): Constify.
7591 (target_regsets): Add new kind identifier.
7592 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7593 (i386_set_pc): Add debugging.
7594 (i386_breakpoint_at): New function.
7595 (the_low_target): Add new members.
7596 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7597 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7598 (mips_breakpoint_at): New.
7599 (the_low_target): Add new members.
7600 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7601 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7602 (the_low_target): Add new members.
7603 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7604 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7605 (the_low_target): Add new members.
7606 * linux-x86-64-low.c (target_regsets): Add new kind
7609 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7611 From Martin Pool <mbp@samba.org>:
7612 * server.c (gdbserver_usage): New function.
7615 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7617 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7620 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7622 * Makefile.in: Remove obsolete code.
7624 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7626 * linux-low.c (regsets_fetch_inferior_registers),
7627 (regsets_store_inferior_registers): Removed cast to int from
7629 * regcache.h: Added declaration of struct inferior_info.
7631 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7633 * inferiors.c (struct inferior_info): Add regcache_data.
7634 (add_inferior): Call create_register_cache.
7635 (clear_inferiors): Call free_register_cache.
7636 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7637 * regcache.c (struct inferior_regcache_data): New.
7638 (registers): Remove.
7639 (get_regcache): New function.
7640 (create_register_cache, free_register_cache): New functions.
7641 (set_register_cache): Don't initialize the register cache here.
7642 (registers_to_string, registers_from_string, register_data): Call
7644 * regcache.h: Add prototypes.
7645 * server.h: Likewise.
7647 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7649 * mem-break.c: New file.
7650 * mem-break.h: New file.
7651 * Makefile.in: Add mem-break.o rule; update server.h
7653 * inferiors.c (struct inferior_info): Add target_data
7655 (clear_inferiors): Free target_data member if set.
7656 (inferior_target_data, set_inferior_target_data): New functions.
7657 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7658 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7659 * linux-low.c (linux_bp_reinsert): New variable.
7660 (struct inferior_linux_data): New.
7661 (linux_create_inferior): Use set_inferior_target_data.
7662 (linux_attach): Likewise. Call add_inferior.
7663 (linux_wait_for_one_inferior): New function.
7664 (linux_wait): Call it.
7665 (linux_write_memory): Add const.
7666 (initialize_low): Call set_breakpoint_data.
7667 * linux-low.h (struct linux_target_ops): Add breakpoint
7669 * server.c (attach_inferior): Remove extra add_inferior
7671 * server.h: Include mem-break.h. Update inferior.c
7673 * target.c (read_inferior_memory)
7674 (write_inferior_memory): New functions.
7675 * target.h (read_inferior_memory)
7676 (write_inferior_memory): Change macros to prototypes.
7677 (struct target_ops): Update comments. Add const to write_memory
7680 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7682 * linux-low.c (usr_store_inferior_registers): Support
7683 registers which are allowed to fail to store.
7684 * linux-low.h (linux_target_ops): Likewise.
7685 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7686 (ppc_cannot_store_register): FPSCR may not be storable.
7688 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7690 * server.h: Include <string.h> if HAVE_STRING_H.
7691 * ChangeLog: Correct paths in last ChangeLog entry.
7693 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7695 * linux-low.h: Remove obsolete prototypes.
7696 (struct linux_target_ops): New.
7697 (extern the_low_target): New.
7698 * linux-low.c (num_regs, regmap): Remove declarations.
7699 (register_addr): Use the_low_target explicitly.
7700 (fetch_register): Likewise.
7701 (usr_fetch_inferior_registers): Likewise.
7702 (usr_store_inferior_registers): Likewise.
7703 * linux-arm-low.c (num_regs): Remove.
7704 (arm_num_regs): Define.
7705 (arm_regmap): Renamed from regmap, made static.
7706 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7708 (arm_cannot_store_register): Renamed from cannot_store_register,
7710 (the_low_target): New.
7711 * linux-i386-low.c (num_regs): Remove.
7712 (i386_num_regs): Define.
7713 (i386_regmap): Renamed from regmap, made static.
7714 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7716 (i386_cannot_store_register): Renamed from cannot_store_register,
7718 (the_low_target): New.
7719 * linux-ia64-low.c (num_regs): Remove.
7720 (ia64_num_regs): Define.
7721 (ia64_regmap): Renamed from regmap, made static.
7722 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7724 (ia64_cannot_store_register): Renamed from cannot_store_register,
7726 (the_low_target): New.
7727 * linux-m68k-low.c (num_regs): Remove.
7728 (m68k_num_regs): Define.
7729 (m68k_regmap): Renamed from regmap, made static.
7730 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7732 (m68k_cannot_store_register): Renamed from cannot_store_register,
7734 (the_low_target): New.
7735 * linux-mips-low.c (num_regs): Remove.
7736 (mips_num_regs): Define.
7737 (mips_regmap): Renamed from regmap, made static.
7738 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7740 (mips_cannot_store_register): Renamed from cannot_store_register,
7742 (the_low_target): New.
7743 * linux-ppc-low.c (num_regs): Remove.
7744 (ppc_num_regs): Define.
7745 (ppc_regmap): Renamed from regmap, made static.
7746 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7748 (ppc_cannot_store_register): Renamed from cannot_store_register,
7750 (the_low_target): New.
7751 * linux-s390-low.c (num_regs): Remove.
7752 (s390_num_regs): Define.
7753 (s390_regmap): Renamed from regmap, made static.
7754 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7756 (s390_cannot_store_register): Renamed from cannot_store_register,
7758 (the_low_target): New.
7759 * linux-sh-low.c (num_regs): Remove.
7760 (sh_num_regs): Define.
7761 (sh_regmap): Renamed from regmap, made static.
7762 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7764 (sh_cannot_store_register): Renamed from cannot_store_register,
7766 (the_low_target): New.
7767 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7768 (the_low_target): New.
7770 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7772 * Makefile.in: Add stamp-h target.
7773 * configure.in: Create stamp-h.
7774 * configure: Regenerated.
7776 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7778 * inferiors.c: New file.
7779 * target.c: New file.
7780 * target.h: New file.
7781 * Makefile.in: Add target.o and inferiors.o. Update
7783 * linux-low.c (inferior_pid): New static variable,
7784 moved from server.c.
7785 (linux_create_inferior): Renamed from create_inferior.
7786 Call add_inferior. Return 0 on success instead of a PID.
7787 (linux_attach): Renamed from myattach.
7788 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7789 (linux_thread_alive): Renamed from mythread_alive.
7790 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7792 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7793 (regsets_store_inferior_registers): Correct error message.
7794 Add missing ``return 0''.
7795 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7796 (linux_store_registers): Renamed from store_inferior_registers.
7797 (linux_read_memory): Renamed from read_inferior_memory.
7798 (linux_write_memory): Renamed from write_inferior_memory.
7799 (linux_target_ops): New structure.
7800 (initialize_low): Call set_target_ops ().
7801 * remote-utils.c (unhexify): New function.
7802 (hexify): New function.
7803 (input_interrupt): Send signals to ``signal_pid''.
7804 * server.c (inferior_pid): Remove.
7805 (start_inferior): Update create_inferior call.
7806 (attach_inferior): Call add_inferior.
7807 (handle_query): New function.
7808 (main): Call handle_query for `q' packets.
7809 * server.h: Include "target.h". Remove obsolete prototypes.
7810 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7812 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7814 * Makefile.in: Add WARN_CFLAGS. Update configury
7816 * configure.in: Check for <string.h>
7817 * configure: Regenerate.
7818 * config.in: Regenerate.
7819 * gdbreplay.c: Include needed system headers.
7820 (remote_open): Remove strchr prototype.
7821 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7822 * regcache.c (supply_register): Change buf argument to const void *.
7823 (supply_register_by_name): Likewise.
7824 (collect_register): Change buf argument to void *.
7825 (collect_register_by_name): Likewise.
7826 * regcache.h: Add missing prototypes.
7827 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7828 * server.c (handle_query): New function.
7829 (attached): New static variable, moved out of main.
7830 (main): Quiet longjmp clobber warnings.
7831 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7832 * utils.c (error): Remove NORETURN.