1 2013-04-22 Tom Tromey <tromey@redhat.com>
3 * Makefile.in (SFILES): Add filestuff.c.
4 (OBS): Add filestuff.o.
5 (filestuff.o): New target.
6 * config.in, configure: Rebuild.
7 * configure.ac: Check for fdwalk, pipe2.
9 2013-04-17 Pedro Alves <palves@redhat.com>
11 * configure.ac (USE_THREAD_DB): Delete variable.
12 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13 Don't AC_SUBST USE_THREAD_DB.
14 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
15 * config.in, configure: Regenerate.
17 2013-04-16 Pedro Alves <palves@redhat.com>
19 * linux-low.h (struct lwp_info) <thread_known>: Move under
20 the USE_THREAD_DB #ifdef.
22 2013-04-16 Pedro Alves <palves@redhat.com>
24 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
25 (linux-low.o): Delete rule.
26 * linux-low.h: Always include "gdb_thread_db.h" instead of
27 conditionally including thread_db.h.
28 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
31 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
33 * Makefile.in (install-only): Fix make install regression.
35 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
37 Convert man pages to texinfo, new gdbinit.5 texinfo page.
38 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
40 * gdbserver.1: Remove.
42 2013-03-22 Pedro Alves <palves@redhat.com>
44 * linux-low.c (handle_extended_wait): Don't call
45 linux_enable_event_reporting.
47 2013-03-15 Tony Theodore <tonyt@logyst.com>
50 * Makefile.in (SHELL): Use @SHELL@.
52 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
54 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
57 2013-03-13 Joel Brobecker <brobecker@adacore.com>
59 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
60 Remove extraneous NULL element.
62 2013-03-13 Yao Qi <yao@codesourcery.com>
64 * tracepoint.c (traceframe_read_tsv): Look for the last matched
65 'V' block in trace frame.
67 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
69 * target.h (struct target_ops): Add btrace ops.
70 (target_supports_btrace): New macro.
71 (target_enable_btrace): New macro.
72 (target_disable_btrace): New macro.
73 (target_read_btrace): New macro.
74 * gdbthread.h (struct thread_info): Add btrace field.
75 * server.c: Include btrace-common.h.
76 (handle_btrace_general_set): New function.
77 (handle_btrace_enable): New function.
78 (handle_btrace_disable): New function.
79 (handle_general_set): Call handle_btrace_general_set.
80 (handle_qxfer_btrace): New function.
81 (struct qxfer qxfer_packets[]): Add btrace entry.
82 * inferiors.c (remove_thread): Disable btrace.
83 * linux-low: Include linux-btrace.h.
84 (linux_low_enable_btrace): New function.
85 (linux_low_read_btrace): New function.
86 (linux_target_ops): Add btrace ops.
87 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
88 Add srv_linux_btrace=yes.
89 (x86_64-*-linux*): Add linux-btrace.o.
90 Add srv_linux_btrace=yes.
91 * configure.ac: Define HAVE_LINUX_BTRACE.
92 * config.in: Regenerated.
93 * configure: Regenerated.
95 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
97 * server.c (handle_qxfer): Preserve error message if -3 is
99 (qxfer): Document the -3 return value.
101 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
103 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
104 (linux_btrace_h): New variable.
105 (linux-btrace.o): New rule.
107 2013-03-08 Stan Shebs <stan@codesourcery.com>
108 Hafiz Abid Qadeer <abidh@codesourcery.com>
110 * tracepoint.c (trace_buffer_size): New global.
111 (DEFAULT_TRACE_BUFFER_SIZE): New define.
112 (init_trace_buffer): Change to one-argument function. Allocate
114 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
115 handle QTBuffer:size packet.
116 (cmd_bigqtbuffer_size): New function.
117 (initialize_tracepoint): Call init_trace_buffer with
118 DEFAULT_TRACE_BUFFER_SIZE.
119 * server.c (handle_query): Add QTBuffer:size in the
122 2013-03-07 Yao Qi <yao@codesourcery.com>
124 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
125 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
127 (cmd_qtsp): Adjust condition. Do post increment.
128 Set cur_action and cur_step_action back to 0.
130 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
133 * linux-low.c (linux_write_memory): Return early success if LEN is
136 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
138 * configure.srv: Add x86_64-*-cygwin* as target.
140 2013-02-28 Tom Tromey <tromey@redhat.com>
142 * configure.ac: Invoke AC_SYS_LARGEFILE.
143 * configure, config.in: Rebuild.
145 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
147 * win32-low.c: Throughout, fix format strings and casts of
148 printf-like functions to avoid type related warnings on all
150 (get_child_debug_event): Print dwDebugEventCode as hex since
151 that's how it's usually documented.
153 2013-02-28 Yao Qi <yao@codesourcery.com>
155 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
158 2013-02-27 Jiong Wang <jiwang@tilera.com>
160 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
161 (reg-tilegx32.c): New rule.
162 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
163 * linux-tile-low.c (tile_arch_setup): New function. Invoke
164 different register info initializer according to elf class.
165 (init_registers_tilgx32): New function. The tilegx32 register info
167 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
168 (tile_store_gregset): Likewise.
170 2013-02-27 Yao Qi <yao@codesourcery.com>
172 * server.c (process_point_options): Print debug message when
173 debug_threads is true.
175 2013-02-26 Yao Qi <yao@codesourcery.com>
177 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
179 2013-02-19 Pedro Alves <palves@redhat.com>
180 Kai Tietz <ktietz@redhat.com>
184 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
185 instead of strtoul to extract address from packet.
186 (process_serial_event) <'z'>: Likewise.
188 2013-02-18 Yao Qi <yao@codesourcery.com>
190 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
192 2013-02-14 Pedro Alves <palves@redhat.com>
196 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
197 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
199 2013-02-14 Pedro Alves <palves@redhat.com>
201 * tracepoint.c (cmd_qtdpsrc): Use savestring.
203 2013-02-14 Pedro Alves <palves@redhat.com>
205 * tracepoint.c (save_string): Delete.
206 (add_tracepoint_action): Use savestring instead of save_string.
208 2013-02-12 Pedro Alves <palves@redhat.com>
210 * linux-xtensa-low.c: Ditto.
211 * xtensa-xtregs.c: Ditto.
213 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
215 * thread-db.c (thread_db_get_tls_address): NULL pointer check
218 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
220 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
221 aarch64_num_wp_regs and aarch64_num_bp_regs to
222 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
224 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
226 * linux-aarch64-low.c (ps_get_thread_area): Replace
227 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
229 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
230 Marcus Shawcroft <marcus.shawcroft@arm.com>
231 Nigel Stephens <nigel.stephens@arm.com>
232 Yufeng Zhang <yufeng.zhang@arm.com>
234 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
235 (aarch64.c, aarch64-without-fpu.c): New targets.
236 * configure.srv (aarch64*-*-linux*): New.
237 * linux-aarch64-low.c: New file.
239 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
241 * linux-low.c (handle_extended_wait, linux_create_inferior)
242 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
243 (dequeue_one_deferred_signal, linux_resume_one_thread)
244 (fetch_register, linux_write_memory, linux_enable_event_reporting)
245 (linux_tracefork_grandchild, linux_test_for_tracefork)
246 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
247 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
248 where the argument is 0.
250 2013-01-25 Yao Qi <yao@codesourcery.com>
252 * event-loop.c: Include "queue.h".
253 (gdb_event_p): New typedef.
254 (struct gdb_event) <next_event>: Remove.
255 (event_queue): Change to QUEUE(gdb_event_p).
256 (async_queue_event): Remove.
257 (gdb_event_xfree): New.
258 (initialize_event_loop): New.
259 (process_event): Use API from QUEUE.
260 (wait_for_event): Likewise.
261 * server.c (main): Call initialize_event_loop.
262 * server.h (initialize_event_loop): Declare.
264 2013-01-18 Yao Qi <yao@codesourcery.com>
266 * ax.h (struct eval_agent_expr_context): New.
267 (gdb_eval_agent_expr): Update declaration.
268 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
269 TFRAME. Add new argument CTX.
270 * server.h (struct eval_agent_expr_context): Declare.
271 (agent_mem_read, agent_tsv_read): Update declaration.
272 (agent_mem_read_string): Likewise.
273 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
274 (add_traceframe_block): Add new argument TPOINT.
275 Increase TPOINT->traceframe_usage.
276 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
277 eval_tracepoint_agent_expr.
278 (condition_true_at_tracepoint): Likewise.
279 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
280 (agent_mem_read_string, agent_tsv_read): Likewise.
282 2013-01-16 Yao Qi <yao@codesourcery.com>
284 * linux-low.c (linux_resume_one_lwp): Don't check
285 'lwp->bp_reinsert != 0'.
287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
288 Pedro Alves <palves@redhat.com>
290 * lynx-low.c (ptrace_request_to_str): Define a temporary
291 macro and use it to simplify this function's implementation.
293 2013-01-07 Joel Brobecker <brobecker@adacore.com>
295 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
298 2013-01-07 Joel Brobecker <brobecker@adacore.com>
300 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
302 2013-01-07 Joel Brobecker <brobecker@adacore.com>
304 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
306 2013-01-07 Joel Brobecker <brobecker@adacore.com>
308 * lynx-low.c (lynx_resume): Use the resume_info parameter
309 to determine the ptid for the lynx_ptrace call, unless
310 it is equal to minus_one_ptid, in which case we use the
311 ptid of the current_inferior.
312 (lynx_wait_1): After having received a thread create/exit
313 event, resume the inferior's execution using the signaling
314 thread's ptid, rather than the old ptid.
316 2013-01-07 Joel Brobecker <brobecker@adacore.com>
318 * lynx-low.c (lynx_resume): Delete variable ret.
320 2013-01-01 Joel Brobecker <brobecker@adacore.com>
322 * gdbreplay.c (gdbreplay_version): Update copyright year.
323 * server.c (gdbserver_version): Likewise.
325 2012-12-17 Joel Brobecker <brobecker@adacore.com>
327 * lynx-low.c (lynx_wait_1): Add debug trace before adding
330 2012-12-17 Joel Brobecker <brobecker@adacore.com>
332 * lynx-low.c (ptrace_request_to_str): Add handling for
335 2012-12-17 Joel Brobecker <brobecker@adacore.com>
337 * lynx-low.c (lynx_attach): Delete variable new_process.
339 2012-12-17 Joel Brobecker <brobecker@adacore.com>
341 * lynx-low.c (lynx_create_inferior): Delete variable
344 2012-12-17 Joel Brobecker <brobecker@adacore.com>
346 * lynx-low.c (ptrace_request_to_str): Do not handle
347 PTRACE_GETTHREADLIST if this macro does not exist.
349 2012-12-15 Yao Qi <yao@codesourcery.com>
351 * Makefile.in (OBS): Add notif.o.
352 * notif.c, notif.h: New.
353 * server.c: Include "notif.h".
354 (struct vstop_notif) <next>: Remove.
356 (queue_stop_reply): Update.
357 (push_event, send_next_stop_reply): Remove.
358 (discard_queued_stop_replies): Update.
359 (notif_stop): New variable.
360 (handle_v_stopped): Remove.
361 (handle_v_requests): Don't call handle_v_stopped. Call
362 handle_ack_notif instead.
363 (queue_stop_reply_callback): Call notif_event_enque instead
365 (handle_status): Don't call send_next_stop_reply, call
366 notif_write_event instead.
367 (kill_inferior_callback): Likewise.
368 (detach_or_kill_inferior_callback): Likewise.
369 (main): Call initialize_notif.
370 (process_serial_event): Call QUEUE_is_empty.
371 (handle_target_event): Call notif_push instead of push event.
372 * server.h (push_event): Remove declaration.
374 2012-12-10 Tom Tromey <tromey@redhat.com>
376 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
377 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
380 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
381 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
382 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
383 (amd64-linux-ipa.o, ax.o): Rewrite.
384 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
385 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
386 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
387 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
388 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
389 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
390 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
391 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
392 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
393 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
394 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
395 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
396 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
397 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
398 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
399 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
400 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
401 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
402 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
403 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
404 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
405 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
406 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
407 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
408 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
409 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
410 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
411 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
412 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
413 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
414 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
415 (reg-tilegx.o): Remove.
416 (all_object_files): New macro.
418 * aclocal.m4, configure: Rebuild.
419 * acinclude.m4: Include depstand.m4, lead-dot.m4.
420 * configure.ac: Invoke ZW_CREATE_DEPDIR,
421 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
423 2012-12-05 Tom Tromey <tromey@redhat.com>
426 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
428 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
430 * configure.ac: Check for linux/perf_event.h.
431 * config.in: Regenerated.
432 * configure: Regenerated.
434 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
436 * hostio.c (handle_readlink): Decrease buffer size
437 parameter passed to readlink by one byte.
439 2012-11-26 Yao Qi <yao@codesourcery.com>
441 * configure.ac (build_warnings): Append '-Wempty-body'.
442 * configure: Regenerated.
443 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
446 2012-11-15 Pierre Muller <muller@sourceware.org>
448 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
449 * config.in: Regenerate.
450 * configure: Regenerate.
451 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
452 Use "gdb_wait.h" header instead of <sys/wait.h> header.
453 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
454 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
456 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
457 instead of <sys/wait.h> header.
458 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
460 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
462 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
463 (various make rules): Remove -DGDBSERVER
465 2012-11-09 Yao Qi <yao@codesourcery.com>
467 * spu-low.c (current_ptid): Move it to ..
468 * gdbthread.h: ... here. New.
469 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
470 * server.c (myresume, process_serial_event): Likewise.
471 * thread-db.c (thread_db_find_new_threads): Likewise.
472 * tracepoint.c (run_inferior_command): Likewise.
474 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
476 * server.c (handle_search_memory_1): Include access length in
479 2012-09-05 Michael Brandt <michael.brandt@axis.com>
481 * linux-crisv32-low.c: Fix compile errors.
483 2012-09-04 Yao Qi <yao@codesourcery.com>
485 * tracepoint.c (cmd_qtsv): Adjust debug message.
486 Don't check CUR_TPOINT.
488 2012-08-28 Yao Qi <yao@codesourcery.com>
490 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
491 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
492 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
493 Remove declarations of xmalloc, xreallloc, xstrdup and
495 * Makefile.in (libiberty_h): New.
496 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
497 (linux-bfin-low.o): Append dependency 'libiberty.h'.
499 2012-08-23 Yao Qi <yao@codesourcery.com>
501 * server.h: Remove declaration of 'xsnprintf'.
503 2012-08-22 Keith Seitz <keiths@redhat.com>
505 * server.h: Include build-gnulib-gbserver/config.h.
506 * gdbreplay.c: Likewise.
508 2012-08-08 Doug Evans <dje@google.com>
510 * Makefile.in (SFILES): Add gdb_vecs.c.
511 (OBS): Add gdb_vecs.o.
512 (gdb_vecs_h, host_defs_h): New variables.
513 (thread-db.o): Add $(gdb_vecs_h) dependency.
514 (gdb_vecs.o): New rule.
515 * thread-db.c: #include "gdb_vecs.h".
516 (thread_db_load_search): Use a vector to iterate over path elements.
517 Handle text appearing after "$pdir".
519 * configure.ac: Add check for strstr.
520 * config.in: Regenerate.
521 * configure: Regenerate.
523 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
525 * hostio.c (handle_pread): If pread fails, fall back to attempting
527 (handle_pwrite): Likewise for pwrite.
529 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
531 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
532 between unsupported TYPE and unimplementable ADDR/LEN combination.
533 (arm_insert_point): Act on new return value.
535 2012-07-31 Pedro Alves <palves@redhat.com>
537 * server.c (process_point_options): Only skip tokens if we find
538 one that is unrecognized. Don't treat 'X' specially while
539 skipping unrecognized tokens.
541 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
543 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
544 to 4-byte-align HW breakpoint addresses for Thumb.
546 2012-07-27 Yao Qi <yao@codesourcery.com>
550 * server.h: Declare gdb_agent_about_to_close.
551 * target.c (kill_inferior): Include "agent.h".
552 New. Send command 'kill'.
553 * target.h (kill_inferior): Removed macro.
554 * tracepoint.c (gdb_agent_about_to_close): New.
555 (gdb_agent_helper_thread): Handle command 'close'.
556 Wait endlessly until the inferior stops.
557 Install gdb_agent_remove_socket to atexit hook.
558 (agent_socket_name): New static variable.
559 (gdb_agent_socket_init): Replace local variable 'name' with
561 (gdb_agent_remove_socket): New.
563 2012-07-27 Yao Qi <yao@codesourcery.com>
565 * server.c (process_point_options): Stop at 'X' when parsing.
567 2012-07-19 Michael Eager <eager@eagercon.com>
569 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
571 * linux-x86-low.c (x86_insert_point, x86_remove_point):
572 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
575 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
577 * gdbserver/linux-low.c (initialize_low): Call
578 linux_ptrace_init_warnings.
580 2012-07-02 Doug Evans <dje@google.com>
582 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
585 2012-07-02 Stan Shebs <stan@codesourcery.com>
587 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
588 (ax.o): Add it to build rule.
591 (IPA_OBS): Add format.o.
592 * server.c (handle_query): Claim support for breakpoint commands.
593 (process_point_options): Add command case.
594 (process_serial_event): Leave running if there are printfs in
596 * mem-break.h (any_persistent_commands): Declare.
597 (add_breakpoint_commands): Declare.
598 (gdb_no_commands_at_breakpoint): Declare.
599 (run_breakpoint_commands): Declare.
600 * mem-break.c (struct point_command_list): New struct.
601 (struct breakpoint): New field command_list.
602 (any_persistent_commands): New function.
603 (add_commands_to_breakpoint): New function.
604 (add_breakpoint_commands): New function.
605 (gdb_no_commands_at_breakpoint): New function.
606 (run_breakpoint_commands): New function.
607 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
609 * ax.c: Include format.h.
610 (ax_printf): New function.
611 (gdb_eval_agent_expr): Add printf opcode.
613 2012-06-13 Yao Qi <yao@codesourcery.com>
615 * server.c (start_inferior): Remove duplicated writes to fields
616 'last_resume_kind' and 'last_status' of 'current_inferior'.
618 2012-06-12 Yao Qi <yao@codesourcery.com>
619 Pedro Alves <palves@redhat.com>
621 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
623 * server.c (handle_v_cont): Extend comment.
625 2012-06-11 Yao Qi <yao@codesourcery.com>
627 * linux-low.c (linux_attach): Add 'static'.
629 2012-06-06 Yao Qi <yao@codesourcery.com>
631 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
633 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
635 Fix gcc -flto compilation warning.
636 * server.c (main): Make variable multi_mode and attach volatile.
638 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
640 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
641 if the platform doesn't know about it.
643 2012-05-30 Jeff Kenton <jkenton@tilera.com>
645 * Makefile.in (SFILES): Add linux-tile-low.c.
646 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
647 * configure.srv: Handle tilegx-*-linux*.
648 * linux-tile-low.c: New file.
650 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
652 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
654 2012-05-24 Pedro Alves <palves@redhat.com>
658 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
660 2012-05-24 Pedro Alves <palves@redhat.com>
664 Replace target_signal with gdb_signal throughout.
666 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
668 * linux-low.c (linux_store_registers): Avoid the copying sequence
669 when no data has been retrieved by ptrace.
671 2012-05-22 Will Deacon <will.deacon@arm.com>
673 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
674 Include asm/ptrace.h.
675 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
678 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
680 * linux-low.c (linux_store_registers): Don't re-retrieve data
681 with ptrace that has already been obtained from /proc. Always
682 copy any data retrieved with ptrace to the buffer supplied.
684 2012-05-11 Yao Qi <yao@codesourcery.com>
685 Pedro Alves <palves@redhat.com>
687 * linux-low.c (enum stopping_threads_kind): New.
688 (stopping_threads): Change type to `enum stopping_threads_kind'.
689 (handle_extended_wait): If stopping and suspending threads, leave
690 the new_lwp suspended too.
691 (linux_wait_for_event): Adjust.
692 (stop_all_lwps): Set `stopping_threads' to
693 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
694 whether we're suspending threads or just stopping them. Assert no
697 2012-04-29 Yao Qi <yao@codesourcery.com>
699 * server.h: Move some code to ...
700 * gdbthread.h: ... here. New.
701 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
702 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
703 (nto-low.o, win32-low.o): Likewise.
704 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
705 * regcache.c, remote-utils.c, server.c: Likewise.
706 * target.c, tracepoint.c, win32-low.c: Likewise.
708 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
710 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
711 (PTRACE_ARG4_TYPE): Likewise.
712 (PTRACE_XFER_TYPE): Likewise.
713 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
714 ptrace to PTRACE_ARG3_TYPE.
715 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
716 (PTRACE_ARG4_TYPE): Likewise.
717 (PTRACE_XFER_TYPE): Likewise.
718 (linux_detach_one_lwp): Cast fourth argument of
719 ptrace to long then PTRACE_ARG4_TYPE.
720 (regsets_fetch_inferior_registers): Cast third argument of
721 ptrace to long then PTRACE_ARG3_TYPE.
722 (regsets_store_inferior_registers): Likewise.
724 2012-04-20 Pedro Alves <palves@redhat.com>
726 * configure: Regenerate.
728 2012-04-19 Pedro Alves <palves@redhat.com>
730 * Makefile.in (GNULIB_BUILDDIR): New.
731 (LIBGNU, INCGNU, GNULIB_H): Adjust.
732 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
733 (all, install-only, uninstall, clean-info, all-lib, clean): No
734 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
735 (maintainer-clean realclean distclean): Use subdir_do.
737 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
738 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
739 * acinclude.m4: Include acx_configure_dir.m4.
740 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
741 calls. Call AC_PROG_RANLIB. Configure gnulib using
744 (GNULIB_STDINT_H): Adjust.
745 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
746 * gdbreplay.c: Include build-gnulib/config.h.
747 * server.h: Likewise.
748 * aclocal.m4: Regenerate.
749 * config.in: Regenerate.
750 * configure: Regenerate.
752 2012-04-19 Pedro Alves <palves@redhat.com>
754 * Makefile.in (LIBGNU, INCGNU): Adjust.
755 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
756 (all, install-only, uninstall, clean-info, all-lib, clean)
757 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
758 * configure.ac: Adjust AC_OUTPUT output.
759 * aclocal.m4: Regenerate.
760 * configure: Regenerate.
762 2012-04-19 Pedro Alves <palves@redhat.com>
764 * Makefile.in (generated_files): New.
765 (server_h): Remove the explicit dependency on config.h, and depend
768 2012-04-19 Pedro Alves <palves@redhat.com>
770 * Makefile.in (INCGNU): Add -Ignulib.
772 2012-04-19 Pedro Alves <palves@redhat.com>
774 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
775 (INCGNU): ... this, and spell out -I here.
776 (GNULIB_LIB): Rename to ...
778 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
780 2012-04-19 Pedro Alves <palves@redhat.com>
782 * config.in: Regenerate.
784 2012-04-19 Pedro Alves <palves@redhat.com>
786 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
787 * server.h (memmem): Remove declaration.
788 * config.in: Regenerate.
789 * configure: Regenerate.
791 2012-04-19 Yao Qi <yao@codesourcery.com>
793 * Makefile.in (SFILES): Add common/vec.c.
797 2012-04-19 Yao Qi <yao@codesourcery.com>
799 * remote-utils.c (prepare_resume_reply): Replace with macro
800 target_core_of_thread.
801 * server.c (handle_qxfer_threads_proper): Likewise.
802 * target.h (traget_core_of_thread): New macro.
804 2012-04-18 Pedro Alves <palves@redhat.com>
806 * aclocal.m4: Regenerate.
807 * configure: Regenerate.
809 2012-04-16 Yao Qi <yao@codesourcery.com>
811 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
812 duplicated on address.
814 2012-04-16 Yao Qi <yao@codesourcery.com>
816 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
817 (struct tracepoint_action_ops) <send>: New field.
818 (m_tracepoint_action_send, r_tracepoint_action_send): New.
819 (agent_expr_send, x_tracepoint_action_send): New.
820 (l_tracepoint_action_send): New.
821 (cmd_qtdp): Download and install tracepoint
822 according to `use_agent'.
823 (run_inferior_command): Add one more parameter `len'.
825 (tracepoint_send_agent): New.
826 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
828 2012-04-16 Yao Qi <yao@codesourcery.com>
830 * tracepoint.c (download_tracepoints): Moved to ...
831 (cmd_qtstart): ... here.
833 2012-04-14 Yao Qi <yao@codesourcery.com>
835 * tracepoint.c: Include inttypes.h.
836 (struct collect_memory_action): Use sized types.
837 (struct tracepoint): Likewise.
838 (cmd_qtdp, stop_tracing): Update print specifiers.
839 (cmd_qtp, response_tracepoint): Likewise.
840 (collect_data_at_tracepoint): Likewise.
841 (collect_data_at_step): Likewise.
843 2012-04-14 Yao Qi <yao@codesourcery.com>
845 Import gnulib module inttypes.
846 * aclocal.m4, config.in, configure: Regenerated.
848 2012-04-14 Yao Qi <yao@codesourcery.com>
850 * Makefile.in (maintainer-clean, realclean, distclean): Remove
851 Makefile and config.status at last.
853 2012-04-13 Yao Qi <yao@codesourcery.com>
855 * tracepoint.c: Include stdint.h unconditionally.
857 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
859 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
860 on BFD_HAVE_SYS_PROCFS_TYPE.
861 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
862 * configure: Regenerate.
863 * config.in: Likewise.
865 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
867 * Makefile.in (clean): Also remove x32.c x32-linux.c
868 x32-avx.c x32-avx-linux.c.
871 (x32-linux.o): Likewise.
872 (x32-linux.c): Likewise.
873 (x32-avx.o): Likewise.
874 (x32-avx.c): Likewise.
875 (x32-avx-linux.o): Likewise.
876 (x32-avx-linux.c): Likewise.
878 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
879 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
880 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
881 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
882 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
883 i386/x32-avx-linux.xml.
885 * linux-x86-low.c (init_registers_x32_linux): New prototype.
886 (init_registers_x32_avx_linux): Likwise.
887 (x86_linux_update_xmltarget): Call init_registers_x32_linux
888 or init_registers_x32_avx_linux if linux_is_elf64 is false.
890 2012-04-13 Pedro Alves <palves@redhat.com>
892 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
893 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
894 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
895 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
898 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
900 * linux-x86-low.c (compat_x32_clock_t): New.
901 (compat_x32_siginfo_t): Likewise.
902 (compat_x32_siginfo_from_siginfo): Likewise.
903 (siginfo_from_compat_x32_siginfo): Likewise.
904 (linux_is_elf64): Likewise.
905 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
906 and siginfo_from_compat_x32_siginfo for x32.
907 (x86_arch_setup): Set linux_is_elf64.
909 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
912 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
914 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
915 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
916 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
917 compatible with process.
919 2012-04-12 Yao Qi <yao@codesourcery.com>
921 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
922 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
923 (install-only, install-info, clean): Handle sub dir gnulib.
924 (all-lib, am--refresh): New targets.
925 (memmem.o): Remove target.
926 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
927 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
928 (AC_REPLACE_FUNCS): Remove memmem.
929 Invoke gl_INIT and AM_INIT_AUTOMAKE.
930 (AC_OUTPUT): Generate Makefile in gnulib/.
931 * aclocal.m4, config.in, configure: Regenerated.
933 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
935 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
937 2012-04-05 Pedro Alves <palves@redhat.com>
939 -Werror=strict-aliasing
941 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
944 2012-04-04 Pedro Alves <palves@redhat.com>
946 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
947 (sparc_store_gregset_from_stack, sparc_store_gregset)
948 (sparc_breakpoint_at): Fix formatting.
950 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
952 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
954 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
955 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
956 * config.in: Regenerate.
957 * configure: Likewise.
959 2012-03-29 Pedro Alves <palves@redhat.com>
961 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
962 Correct ptrace arguments.
964 2012-03-28 Pedro Alves <palves@redhat.com>
966 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
967 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
968 (IA64_FR1_REGNUM): New defines.
969 (ia64_fetch_register): New.
970 (the_low_target): Install it.
971 * linux-low.h (struct linux_target_ops) <fetch_register>: New
973 * linux-low.c (linux_fetch_registers): Try the
974 the_low_target.fetch_register hook first.
976 * linux-arm-low.c (the_low_target): Adjust.
977 * linux-bfin-low.c (the_low_target): Adjust.
978 * linux-cris-low.c (the_low_target): Adjust.
979 * linux-crisv32-low.c (the_low_target): Adjust.
980 * linux-m32r-low.c (the_low_target): Adjust.
981 * linux-m68k-low.c (the_low_target): Adjust.
982 * linux-mips-low.c (the_low_target): Adjust.
983 * linux-ppc-low.c (the_low_target): Adjust.
984 * linux-s390-low.c (the_low_target): Adjust.
985 * linux-sh-low.c (the_low_target): Adjust.
986 * linux-sparc-low.c (the_low_target): Adjust.
987 * linux-tic6x-low.c (the_low_target): Adjust.
988 * linux-x86-low.c (the_low_target): Adjust.
989 * linux-xtensa-low.c (the_low_target): Adjust.
991 2012-03-26 Pedro Alves <palves@redhat.com>
993 * server.c (handle_qxfer_libraries): Don't bail early if
994 the_target->qxfer_libraries_svr4 is not NULL.
996 2012-03-26 Pedro Alves <palves@redhat.com>
998 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1000 2012-03-23 Pedro Alves <palves@redhat.com>
1002 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1003 "library-list-svr4" element's start tag when the the DSO list is
1006 2012-03-23 Pedro Alves <palves@redhat.com>
1008 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1009 a variable whose type size is the same as the inferior's pointer
1012 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1014 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1016 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1017 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1018 * linux-low.h: Include <signal.h>.
1019 (struct siginfo): Remove forward declaration.
1020 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1023 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1025 * .gitignore: Ignore more files.
1027 2012-03-19 Pedro Alves <palves@redhat.com>
1028 Jan Kratochvil <jan.kratochvil@redhat.com>
1030 * server.c (cont_thread, general_thread): Add describing comments.
1031 (start_inferior): Clear `cont_thread'.
1032 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1035 2012-03-15 Yao Qi <yao@codesourcery.com>
1037 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1039 (cmd_qtdp): ... here.
1041 2012-03-15 Yao Qi <yao@codesourcery.com>
1043 * tracepoint.c (struct tracepoint_action_ops): New.
1044 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1045 (m_tracepoint_action_download): New.
1046 (r_tracepoint_action_download): New.
1047 (x_tracepoint_action_download): New.
1048 (l_tracepoint_action_download): New.
1049 (add_tracepoint_action): Install `action->ops' according type.
1050 (download_tracepoint_1): Move code `download' function pointer
1051 of various tracepoint_action_ops.
1053 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1055 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1056 linux_ptrace_attach_warnings.
1058 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1060 * Makefile.in (linux-ptrace.o): New.
1061 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1062 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1063 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1064 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1065 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1067 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1069 2012-03-08 Yao Qi <yao@codesourcery.com>
1070 Pedro Alves <palves@redhat.com>
1072 Fix PR server/13392.
1073 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1075 * tracepoint.c (remove_tracepoint): New.
1076 (cmd_qtdp): Call remove_tracepoint when failed to install.
1078 2012-03-07 Pedro Alves <palves@redhat.com>
1080 * linux-low.c (get_detach_signal): New.
1081 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1082 Pass on pending signals to PTRACE_DETACH. Check the result of the
1084 * server.c (program_signals, program_signals_p): New.
1085 (handle_general_set): Handle QProgramSignals.
1086 * server.h (program_signals, program_signals_p): Declare.
1088 2012-03-05 Pedro Alves <palves@redhat.com>
1089 Jan Kratochvil <jan.kratochvil@redhat.com>
1091 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1094 2012-03-03 Yao Qi <yao@codesourcery.com>
1096 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1097 agent_look_up_symbols.
1099 2012-03-03 Yao Qi <yao@codesourcery.com>
1101 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1102 (linux-x86-low.o): Likewise.
1103 * server.h: Remove in_process_agent_loaded.
1104 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1108 2012-03-03 Yao Qi <yao@codesourcery.com>
1110 * tracepoint.c (gdb_agent_capability): New global.
1111 (in_process_agent_loaded_ust): Renamed to
1112 `in_process_agent_supports_ust'.
1114 (in_process_agent_supports_ust): Call agent_capability_check.
1115 (clear_installed_tracepoints): Assert that agent supports
1118 2012-03-03 Yao Qi <yao@codesourcery.com>
1120 * linux-low.c (linux_supports_agent): New.
1121 (linux_target_ops): Initialize field `supports_agent' with
1122 linux_supports_agent.
1123 * target.h (struct target_ops) <supports_agent>: New.
1124 (target_supports_agent): New macro.
1125 * server.c (handle_general_set): Handle packet 'QAgent'.
1126 (handle_query): Send `QAgent+'.
1127 * Makefile.in (server.o): Depends on agent.h.
1129 2012-03-03 Yao Qi <yao@codesourcery.com>
1131 * Makefile.in (OBS): Add agent.o.
1132 Add new rule for agent.o.
1133 Track dependence of tracepoint.c on agent.h.
1134 * tracepoint.c (run_inferior_command_1):
1135 (run_inferior_command): Call agent_run_command.
1136 (gdb_ust_connect_sync_socket): Deleted. Move it to
1138 (resume_thread, stop_thread): Likewise.
1139 (gdb_ust_socket_init): Renamed to ...
1140 (gdb_agent_socket_init): ... New.
1141 (gdb_ust_thread): Renamed to ...
1142 (gdb_agent_helper_thread): ... New.
1143 (gdb_ust_init): Move some code to ...
1144 (gdb_agent_init): ... here. New.
1145 [HAVE_UST]: Call gdb_ust_init.
1146 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1147 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1148 * config.in, configure: Regenerated.
1150 2012-03-02 Pedro Alves <palves@redhat.com>
1152 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1153 * linux-low.c (struct simple_pid_list): New.
1154 (stopped_pids): New a struct simple_pid_list pointer.
1155 (add_to_pid_list, pull_pid_from_list): New.
1156 (handle_extended_wait): Don't assume the first signal new children
1157 report is SIGSTOP. Adjust call to pull_pid_from_list.
1158 (linux_wait_for_lwp): Adjust.
1160 2012-03-02 Yao Qi <yao@codesourcery.com>
1162 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1165 2012-03-02 Yao Qi <yao@codesourcery.com>
1167 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1168 `stop_pc' and `tpoint'. Update caller.
1170 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1172 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1173 * linux-low.c (use_linux_regsets): New macro.
1174 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1175 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1176 (linux_register_in_regsets): New function.
1177 (usr_fetch_inferior_registers): Skip registers covered by
1179 (usr_store_inferior_registers): Likewise.
1180 (usr_fetch_inferior_registers): New macro.
1181 (usr_store_inferior_registers): Likewise.
1182 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1183 (linux_store_registers): Likewise.
1184 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1186 (init_registers_mips64_dsp_linux): Likewise.
1187 (init_registers_mips_linux): New macro.
1188 (init_registers_mips_dsp_linux): Likewise.
1189 (mips_dsp_num_regs): Likewise.
1190 (DSP_BASE, DSP_CONTROL): New fallback macros.
1191 (mips_base_regs): New macro.
1192 (mips_regmap): Use it. Fix the size.
1193 (mips_dsp_regmap): New variable.
1194 (mips_dsp_regset_bitmap): Likewise.
1195 (mips_arch_setup): New function.
1196 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1198 (mips_cannot_store_register): Likewise.
1199 (the_low_target): Update .arch_setup, .num_regs and .regmap
1200 initializers. Add .regset_bitmap initializer.
1201 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1203 * linux-bfin-low.c (the_low_target): Likewise.
1204 * linux-cris-low.c (the_low_target): Likewise.
1205 * linux-crisv32-low.c (the_low_target): Likewise.
1206 * linux-ia64-low.c (the_low_target): Likewise.
1207 * linux-m32r-low.c (the_low_target): Likewise.
1208 * linux-m68k-low.c (the_low_target): Likewise.
1209 * linux-ppc-low.c (the_low_target): Likewise.
1210 * linux-s390-low.c (the_low_target): Likewise.
1211 * linux-sh-low.c (the_low_target): Likewise.
1212 * linux-sparc-low.c (the_low_target): Likewise.
1213 * linux-tic6x-low.c (the_low_target): Likewise.
1214 * linux-x86-low.c (the_low_target): Likewise.
1215 * linux-xtensa-low.c (the_low_target): Likewise.
1216 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1217 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1218 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1220 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1221 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1223 2012-02-29 Yao Qi <yao@codesourcery.com>
1224 Pedro Alves <palves@redhat.com>
1226 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1227 `step_over_finished' is true.
1229 2012-02-27 Pedro Alves <palves@redhat.com>
1231 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1232 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1234 2012-02-27 Pedro Alves <palves@redhat.com>
1237 * linux-low.c (pid_is_stopped): New.
1238 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1240 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1242 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1245 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1247 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1249 2012-02-24 Luis Machado <lgustavo@codesourcery>
1251 * server.c (handle_query): Advertise support for target-side
1252 breakpoint condition evaluation.
1253 (process_point_options): New function.
1254 (process_serial_event): When inserting a breakpoint, check for
1255 a target-side condition that should be evaluated.
1257 * mem-break.c: Include regcache.h and ax.h.
1258 (point_cond_list_t): New data structure.
1259 (breakpoint) <cond_list>: New field.
1260 (find_gdb_breakpoint_at): Make non-static.
1261 (delete_gdb_breakpoint_at): Clear any target-side
1263 (clear_gdb_breakpoint_conditions): New function.
1264 (add_condition_to_breakpoint): Likewise.
1265 (add_breakpoint_condition): Likewise.
1266 (gdb_condition_true_at_breakpoint): Likewise.
1267 (gdb_breakpoint_here): Return result directly instead
1268 of going through a local variable.
1270 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1271 (clear_gdb_breakpoint_conditions): Likewise.
1272 (add_breakpoint_condition): Likewise.
1273 (gdb_condition_true_at_breakpoint): Likewise.
1275 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1276 (need_step_over_p): Take target-side breakpoint condition into
1279 2012-02-24 Luis Machado <lgustavo@codesourcery>
1281 * server.h: Include tracepoint.h.
1282 (agent_mem_read, agent_get_trace_state_variable_value,
1283 agent_set_trace_state_variable_value,
1284 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1285 get_set_tsv_func_addr): New prototypes.
1287 * ax.h: New include file.
1288 * ax.c: New source file.
1290 * tracepoint.c: Include ax.h.
1291 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1292 agent_expr, eval_result_type): Move to ax.h.
1293 (parse_agent_expr): Rename to ...
1294 (gdb_parse_agent_expr): ... this, make it non-static and move
1296 (unparse_agent_expr) Rename to ...
1297 (gdb_unparse_agent_expr): ... this, make it non-static and move
1299 (eval_agent_expr): Rename to ...
1300 (eval_tracepoint_agent_expr): ... this.
1301 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1302 forward declarations.
1303 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1304 (agent_get_trace_state_variable_value): New function.
1305 (agent_set_trace_state_variable_value): New function.
1306 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1307 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1308 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1309 (condition_true_at_tracepoint): Likewise.
1310 (parse_agent_expr): Rename to ...
1311 (gdb_parse_agent_expr): ... this and move to ax.c.
1312 (unparse_agent_expr): Rename to ...
1313 (gdb_unparse_agent_expr): ... this and move to ax.c.
1314 (gdb_agent_op_name): Move to ax.c.
1315 (eval_agent_expr): Rename to ...
1316 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1318 (eval_tracepoint_agent_expr): New function.
1319 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1321 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1323 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1324 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1325 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1326 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1327 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1328 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1329 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1330 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1331 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1332 (compile_bytecodes): Remove forward declaration.
1333 (is_goto_target): Move to ax.c.
1334 (compile_bytecodes): Move to ax.c and call
1335 agent_get_trace_state_variable_value (...) and
1336 agent_set_trace_state_variable_value (...).
1338 * Makefile.in: Update ax.c and IPA dependencies.
1340 2012-02-24 Pedro Alves <palves@redhat.com>
1342 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1343 (cmd_bigqtbuffer_circular): ... this. Only handle
1344 'QTBuffer:circular:'.
1345 (handle_tracepoint_general_set): Adjust.
1347 2012-02-16 Yao Qi <yao@codesourcery.com>
1349 * inferiors.c: Move code to ...
1350 * dll.c: .... here. New.
1351 * server.h: Declare clear_dlls.
1352 * Makefile.in (SFILES): Add dll.c.
1356 2012-02-11 Yao Qi <yao@codesourcery.com>
1358 * server.c: (handle_monitor_command): Add a new parameter
1360 (handle_query): Update caller.
1362 2012-02-09 Joel Brobecker <brobecker@adacore.com>
1364 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1365 * configure, config.in: Regenerate.
1366 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1369 2012-02-02 Pedro Alves <palves@redhat.com>
1371 Try SIGKILL first, then PTRACE_KILL.
1372 * linux-low.c (linux_kill_one_lwp): New.
1373 (linux_kill_one_lwp): Rename to ...
1374 (kill_one_lwp_callback): ... this. Use the new
1377 2012-02-02 Pedro Alves <palves@redhat.com>
1379 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1382 2012-01-27 Pedro Alves <palves@redhat.com>
1384 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1385 (elf_64_file_p): Make static.
1386 (linux_pid_exe_is_elf_64_file): New.
1387 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1388 Delete declarations.
1389 (linux_pid_exe_is_elf_64_file): Declare.
1390 * linux-x86-low.c (x86_arch_setup): Use
1391 linux_pid_exe_is_elf_64_file.
1393 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1395 * linux-low.c (linux_wait_for_event_1): Rename to ...
1396 (linux_wait_for_event): ... here and merge it with former
1397 linux_wait_for_event - new variable wait_ptid, use it.
1398 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1400 2012-01-23 Pedro Alves <palves@redhat.com>
1402 * server.c (main): Avoid yet another case of infinite loop while
1403 detaching/killing after a longjmp.
1405 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1408 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1410 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1412 * hostio.c (handle_readlink): New function.
1413 (handle_vFile): Call it to handle "vFile:readlink" packets.
1415 2012-01-20 Pedro Alves <palves@redhat.com>
1416 Ulrich Weigand <ulrich.weigand@linaro.org>
1418 * server.c (handle_v_requests): Only support vAttach and vRun to
1419 start multiple processes when in extended protocol mode.
1421 2012-01-17 Pedro Alves <palves@redhat.com>
1423 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1424 memalign plus mprotect to allocate the scratch buffer.
1426 2012-01-13 Pedro Alves <palves@redhat.com>
1428 * server.c (attach_inferior): Clear `cont_thread'.
1430 2012-01-13 Pedro Alves <palves@redhat.com>
1432 * server.c (main): Avoid infinite loop while detaching/killing
1435 2012-01-09 Doug Evans <dje@google.com>
1437 * server.c (start_inferior): Set last_ptid in --wrapper case.
1439 2012-01-06 Yao Qi <yao@codesourcery.com>
1441 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1443 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1445 2012-01-04 Yao Qi <yao@codesourcery.com>
1447 * tracepoint.c (cmd_qtdp): Print debug message
1448 for static tracepoint.
1450 2012-01-04 Yao Qi <yao@codesourcery.com>
1452 * tracepoint.c (trace_vdebug): Differentiate debug message
1453 between gdbserver and IPA.
1455 2012-01-03 Yao Qi <yao@codesourcery.com>
1457 * tracepoint.c (tracepoint_was_hit): Don't collect for
1460 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1462 * terminal.h: Reformat copyright header.
1464 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1466 * server.c (gdbserver_version): Update copyright year.
1467 * gdbreplay.c (gdbreplay_version): Likewise.
1469 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1471 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1474 2011-12-18 Hui Zhu <teawater@gmail.com>
1475 * linux-low.c (linux_create_inferior): Save return value to ret.
1477 2011-12-18 Hui Zhu <teawater@gmail.com>
1479 * linux-low.c (linux_create_inferior): Save return value to ret.
1481 2011-12-16 Doug Evans <dje@google.com>
1483 * linux-low.c (linux_create_inferior): If stdio connection,
1484 redirect stdin from /dev/null, stdout to stderr.
1485 * remote-utils.c (remote_is_stdio): New static global.
1486 (remote_connection_is_stdio): New function.
1487 (remote_prepare): Handle stdio connection.
1488 (remote_open): Ditto.
1489 (remote_close): Don't close stdin for stdio connections.
1490 (read_prim,write_prim): New functions. Replace all calls to
1491 read/write to these.
1492 * server.c (main): Watch for "-" argument. Move call to
1493 remote_prepare before start_inferior.
1494 * server.h (STDIO_CONNECTION_NAME): New macro.
1495 (remote_connection_is_stdio): Declare.
1497 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1498 in debugging output.
1500 2011-12-15 Yao Qi <yao@codesourcery.com>
1502 * tracepoint.c: Include sys/syscall.h.
1503 (gdb_ust_thread): Remove preprocessor conditional.
1505 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1507 * linux-low.c (linux_detach_one_lwp): Call
1508 the_low_target.prepare_to_resume before detaching.
1510 2011-12-14 Yao Qi <yao@codesourcery.com>
1512 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1515 2011-12-14 Yao Qi <yao@codesourcery.com>
1517 * i386-low.c (i386_low_stopped_data_address): Initialize local
1520 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1524 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1525 DR_CONTROL unless necessary. Extend comments.
1526 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1527 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1529 2011-12-13 Yao Qi <yao@codesourcery.com>
1531 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1533 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1535 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1537 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1538 Print new debug message for such case.
1540 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1542 Fix overlapping memcpy.
1543 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1544 the read_inferior_memory transfer.
1545 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1546 write_inferior_memory transfer.
1547 (set_fast_tracepoint_jump): New variable buf. Use it for the
1548 read_inferior_memory and write_inferior_memory transfers.
1549 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1550 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1551 Use it for the write_inferior_memory transfer.
1552 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1555 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1557 * linux-low.c (fetch_register, store_register): Make code
1558 consistent, fix formatting.
1560 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1562 * linux-low.c (usr_store_inferior_registers): Factor out code
1563 to handle individual registers into...
1564 (store_register): ... this new function.
1566 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1568 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1569 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1570 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1571 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1572 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1573 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1574 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1575 (srv_xmlfiles): Add new XML files.
1577 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1579 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1580 (init_registers_s390_linux32v1): Add prototype.
1581 (init_registers_s390_linux32v2): Likewise.
1582 (init_registers_s390_linux64v1): Likewise.
1583 (init_registers_s390_linux64v2): Likewise.
1584 (init_registers_s390x_linux64v1): Likewise.
1585 (init_registers_s390x_linux64v2): Likewise.
1586 (s390_num_regs): Increment to 52.
1587 (s390_regmap): Add orig_r2 register.
1588 (s390_num_regs_3264): Increment to 68.
1589 (s390_regmap_3264): Add orig_r2 register.
1590 (s390_collect_ptrace_register): Handle orig_r2 register.
1591 (s390_supply_ptrace_register): Likewise.
1592 (s390_fill_last_break): New function.
1593 (s390_store_last_break): Likewise.
1594 (s390_fill_system_call): New function.
1595 (s390_store_system_call): Likewise.
1596 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1598 (s390_check_regset): New function.
1599 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1600 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1601 Update target_regsets for available register sets.
1603 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1604 Jan Kratochvil <jan.kratochvil@redhat.com>
1606 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1607 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1609 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1610 * linux-low.h (struct process_info_private): New member r_debug.
1611 * server.c (handle_qxfer_libraries): Call
1612 the_target->qxfer_libraries_svr4.
1613 (handle_qxfer_libraries_svr4): New function.
1614 (qxfer_packets): New entry "libraries-svr4".
1615 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1616 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1617 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1618 PACKET_qXfer_libraries_svr4.
1620 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1622 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1623 PSW address/mask between 8-byte and 16-byte formats.
1624 (s390_supply_ptrace_register): Likewise.
1625 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1626 basic addressing mode bit.
1628 2011-11-24 Stan Shebs <stan@codesourcery.com>
1630 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1632 2011-11-17 Stan Shebs <stan@codesourcery.com>
1634 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1635 (tracing_start_time): New global.
1636 (tracing_stop_time): New global.
1637 (tracing_user_name): New global.
1638 (tracing_notes): New global.
1639 (tracing_stop_note): New global.
1640 (cmd_qtstart): Set traceframe_usage, start_time.
1641 (stop_tracing): Set stop_time.
1642 (cmd_qtstatus): Report additional status.
1643 (cmd_qtp): New function.
1644 (handle_tracepoint_query): Call it.
1645 (cmd_qtnotes): New function.
1646 (handle_tracepoint_general_set): Call it.
1647 (get_timestamp): Rename from tsv_get_timestamp.
1649 2011-11-14 Stan Shebs <stan@codesourcery.com>
1650 Kwok Cheung Yeung <kcy@codesourcery.com>
1652 * linux-x86-low.c (small_jump_insn): New.
1653 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1654 trampoline and error message, build a trampoline and issue a small
1655 jump instruction to it.
1656 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1657 trampoline and error message.
1658 (x86_get_min_fast_tracepoint_insn_len): New.
1659 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1660 * linux-low.h (struct linux_target_ops): Add arguments to
1661 install_fast_tracepoint_jump_pad operation, add new operation.
1662 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1664 (linux_get_min_fast_tracepoint_insn_len): New function.
1665 (linux_target_op): Add new operation.
1666 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1667 (gdb_trampoline_buffer_end): Ditto.
1668 (gdb_trampoline_buffer_error): Ditto.
1669 (struct ipa_sym_addresses): Add fields for new IPA variables.
1670 (symbol_list): Add entries for new IPA variables.
1671 (struct tracepoint): Add fields to hold the address range of the
1672 trampoline used by the tracepoint.
1673 (trampoline_buffer_head): New static variable.
1674 (trampoline_buffer_tail): Ditto.
1675 (claim_trampoline_space): New function.
1676 (have_fast_tracepoint_trampoline_buffer): New function.
1677 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1679 (install_fast_tracepoint): Ditto, also add error buffer argument.
1680 (cmd_qtminftpilen): New function.
1681 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1682 (fast_tracepoint_from_trampoline_address): New function.
1683 (fast_tracepoint_collecting): Handle trampoline as part of jump
1685 (set_trampoline_buffer_space): New function.
1686 (initialize_tracepoint): Initialize new IPA variables.
1687 * target.h (struct target_ops): Add arguments to
1688 install_fast_tracepoint_jump_pad operation, add new
1689 get_min_fast_tracepoint_insn_len operation.
1690 (target_get_min_fast_tracepoint_insn_len): New.
1691 (install_fast_tracepoint_jump_pad): Add arguments.
1692 * server.h (IPA_BUFSIZ): Define.
1693 * linux-i386-ipa.c: Include extra header files.
1694 (initialize_fast_tracepoint_trampoline_buffer): New function.
1695 (initialize_low_tracepoint): Call it.
1696 * server.h (set_trampoline_buffer_space): Declare.
1697 (claim_trampoline_space): Ditto.
1698 (have_fast_tracepoint_trampoline_buffer): Ditto.
1700 2011-11-14 Yao Qi <yao@codesourcery.com>
1702 * server.c (handle_query): Handle InstallInTrace for qSupported.
1703 * tracepoint.c (add_tracepoint): Sort list.
1704 (install_tracepoint, download_tracepoint): New.
1705 (cmd_qtdp): Call them to install and download tracepoints.
1706 (sort_tracepoints): Removed.
1707 (cmd_qtstart): Update.
1709 2011-11-14 Yao Qi <yao@codesourcery.com>
1711 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1712 * mem-break.h: Declare.
1713 * tracepoint.c (cmd_qtstart): Move some code to ...
1714 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1716 (download_tracepoints): Move some code to ...
1717 (download_tracepoint_1): ... here. New.
1719 2011-11-08 Yao Qi <yao@codesourcery.com>
1721 * remote-utils.c (relocate_instruction): A comment fix.
1723 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1725 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1726 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1727 dr_status_mirror and dr_control_mirror from debug_reg_state.
1728 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1729 (i386_initial_stuff): Remove use of deleted globals.
1730 (i386_get_thread_context, i386_set_thread_context,
1731 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1732 from debug_reg_state.
1734 2011-11-05 Yao Qi <yao@codesourcery.com>
1736 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1737 address as TPOINT's.
1739 2011-11-02 Stan Shebs <stan@codesourcery.com>
1741 * tracepoint.c (agent_mem_read_string): New function.
1742 (eval_agent_expr): Call it for tracenz.
1743 * server.c (handle_query): Report support for tracenz.
1745 2011-11-02 Yao Qi <yao@codesourcery.com>
1747 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1749 2011-11-02 Yao Qi <yao@codesourcery.com>
1751 * target.h: Fix a typo in comment.
1753 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1755 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1756 clobber the breakpoints' shadows with fast tracepoint jumps.
1757 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1758 * target.c (write_inferior_memory): Also pass MYADDR down to
1761 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1763 * configure.ac: Check support for personality routine.
1764 * configure: Regenerate.
1765 * config.in: Likewise.
1766 * linux-low.c: Include <sys/personality.h>.
1767 Define ADDR_NO_RANDOMIZE if necessary.
1768 (linux_create_inferior): Disable address space randomization when
1769 forking inferior, if requested.
1770 (linux_supports_disable_randomization): New function.
1771 (linux_target_ops): Install it.
1772 * server.h (disable_randomization): Declare.
1773 * server.c (disable_randomization): New global variable.
1774 (handle_general_set): Handle QDisableRandomization.
1775 (handle_query): Likewise for qSupported.
1776 (main): Support --disable-randomization and --no-disable-randomization
1777 command line arguments.
1778 * target.h (struct target_ops): Add supports_disable_randomization.
1779 (target_supports_disable_randomization): New macro.
1781 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1783 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1785 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1786 [!PT_GETDSBT] (target_loadmap): New definition.
1787 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1788 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1789 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1790 and PT_GETDSBT to LINUX_LOADMAP.
1791 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1792 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1794 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1796 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1797 (arm_linux_hwbp_cap): New static variable.
1798 (arm_linux_get_hwbp_cap): Replace by ...
1799 (arm_linux_init_hwbp_cap): ... this new function.
1800 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1801 (arm_linux_get_hw_watchpoint_count): Likewise.
1802 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1803 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1804 (arm_prepare_to_resume): Use perror_with_name instead of error.
1806 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1808 * linux-arm-low.c: Include <signal.h>.
1809 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1810 (struct arm_linux_hwbp_cap): New data type.
1811 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1812 (struct arm_linux_hw_breakpoint): New data type.
1813 (MAX_BPTS, MAX_WPTS): Define.
1814 (struct arch_process_info, struct arch_lwp_info): New data types.
1815 (arm_linux_get_hwbp_cap): New function.
1816 (arm_linux_get_hw_breakpoint_count): Likewise.
1817 (arm_linux_get_hw_watchpoint_count): Likewise.
1818 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1819 (arm_hwbp_control_initialize): Likewise.
1820 (arm_hwbp_control_is_enabled): Likewise.
1821 (arm_hwbp_control_is_initialized): Likewise.
1822 (arm_hwbp_control_disable): Likewise.
1823 (arm_linux_hw_breakpoint_equal): Likewise.
1824 (arm_linux_hw_point_initialize): Likewise.
1825 (struct update_registers_data): New data structure.
1826 (update_registers_callback: New function.
1827 (arm_insert_point): Likewise.
1828 (arm_remove_point): Likewise.
1829 (arm_stopped_by_watchpoint): Likewise.
1830 (arm_stopped_data_address): Likewise.
1831 (arm_new_process): Likewise.
1832 (arm_new_thread): Likewise.
1833 (arm_prepare_to_resume): Likewise.
1834 (the_low_target): Register arm_insert_point, arm_remove_point,
1835 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1836 arm_new_thread, and arm_prepare_to_resume.
1838 2011-09-15 Stan Shebs <stan@codesourcery.com>
1840 * server.h (struct emit_ops): Add compare-goto fields.
1841 * tracepoint.c (gdb_agent_op_sizes): New table.
1842 (emit_eq_goto): New function.
1843 (emit_ne_goto): New function.
1844 (emit_lt_goto): New function.
1845 (emit_le_goto): New function.
1846 (emit_gt_goto): New function.
1847 (emit_ge_goto): New function.
1848 (is_goto_target): New function.
1849 (compile_bytecodes): Recognize special cases of compare-goto
1850 combinations and call specialized emitters for them.
1851 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1852 (amd64_emit_ne_goto): New function.
1853 (amd64_emit_lt_goto): New function.
1854 (amd64_emit_le_goto): New function.
1855 (amd64_emit_gt_goto): New function.
1856 (amd64_emit_ge_goto): New function.
1857 (amd64_emit_ops): Add the new functions.
1858 (i386_emit_eq_goto): New function.
1859 (i386_emit_ne_goto): New function.
1860 (i386_emit_lt_goto): New function.
1861 (i386_emit_le_goto): New function.
1862 (i386_emit_gt_goto): New function.
1863 (i386_emit_ge_goto): New function.
1864 (i386_emit_ops): Add the new functions.
1866 2011-09-08 Stan Shebs <stan@codesourcery.com>
1868 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1869 (i386_emit_epilogue): Restore %ebx.
1871 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1873 * server.c (step_thread): Remove definition.
1874 (process_serial_event): Don't handle Hs.
1875 * server.h (step_thread): Remove declaration.
1876 * target.c (set_desired_inferior): Remove use of step_thread.
1878 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1880 * linux-low.c: Include linux-procfs.h.
1881 (linux_attach_lwp_1): Update comments.
1882 (linux_attach): Scan for existing threads when attaching to a
1883 process that is the tgid.
1884 * Makefile.in: Update dependencies.
1886 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1888 * configure.srv: Add linux-procfs.o dependencies.
1890 2011-08-14 Yao Qi <yao@codesourcery.com>
1892 * target.h (struct target_ops): Fix indent.
1893 * win32-low.c (win32_target_ops): Fix comment.
1895 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1896 Yao Qi <yao@codesourcery.com>
1898 * Makefile.in (clean): Remove tic6x-*.c files.
1899 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1900 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1901 (tic6x-c64xp-linux.c): Likewise.
1902 * configure.srv: Add support for tic6x-*-uclinux.
1903 * linux-tic6x-low.c: New.
1904 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1906 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1907 Yao Qi <yao@codesourcery.com>
1909 * target.h (struct target_ops): Add read_loadmap.
1910 * linux-low.c (struct target_loadseg): New type.
1911 (struct target_loadmap): New type.
1912 (linux_read_loadmap): New function.
1913 (linux_target_ops): Add linux_read_loadmap.
1914 * server.c (handle_query): Support qXfer:fdpic:read packet.
1915 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1918 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1920 * win32-low.c: Include <stdint.h>.
1922 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1924 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1925 to the inferior here.
1926 (i386_remove_aligned_watchpoint): Ditto.
1927 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1928 fit part of the watchpoint in the debug registers.
1929 (i386_update_inferior_debug_regs): New.
1930 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1931 registers, and only update the inferior on success.
1932 (i386_low_remove_watchpoint): Ditto.
1934 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1936 * linux-low.c (compare_ints, unique, list_threads, show_process,
1937 linux_core_of_thread): Delete.
1938 (linux_target_ops): Change linux_core_of_thread to
1939 linux_common_core_of_thread.
1940 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1941 * utils.c (malloc_failure): Change type of argument.
1942 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1943 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1944 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1945 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1946 (IPA_OBJS): Add common-utils-ipa.o.
1947 (ptid_h, linux_osdata_h): New macros.
1948 (server_h): Add common/common-utils.h, common/xml-utils.h,
1949 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1951 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1952 ptid.o, buffer.o): New rules.
1953 (linux-low.o): Add common/linux-osdata.h as a dependency.
1954 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1955 * configure.ac: Add AC_HEADER_DIRENT check.
1956 * config.in: Regenerate.
1957 * configure: Regenerate.
1958 * remote-utils.c (xml_escape_text): Delete.
1959 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1960 buffer_xml_printf): Move to common/buffer.c.
1961 * server.c (main): Remove call to initialize_inferiors.
1962 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1963 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1964 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1965 internal_error, gdb_assert, gdb_assert_fail): Delete.
1966 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1967 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1969 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1970 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1971 initialize_inferiors): Delete.
1973 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1975 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1978 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1980 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1982 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1984 2011-05-26 Yao Qi <yao@codesourcery.com>
1986 * Makefile.in (thread-db.o): Track dependence to
1987 common/gdb_thread_db.h.
1988 * thread-db.c: include gdb_thread_db.h from right place.
1990 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1992 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1993 __FILE__ and __LINE__ to internal_error.
1995 2011-05-13 Doug Evans <dje@google.com>
1997 * thread-db.c (try_thread_db_load_from_sdir): New function.
1998 (try_thread_db_load_from_dir): New function.
1999 (thread_db_load_search): Handle $sdir, ignore $pdir.
2000 Remove trying of system directories if search of
2001 libthread-db-search-path fails, that is now done via $sdir.
2003 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2005 * server.c (handle_query): Add EnableDisableTracepoints to the list
2006 of supported features.
2007 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2009 (cmd_qtenable_disable): New.
2010 (cmd_qtstart): Install tracepoints even if disabled.
2011 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2012 receiving a QTEnable or QTDisable packet.
2013 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2014 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2016 (gdb_probe): Skip data collection if static tracepoint is disabled.
2018 2011-05-10 Doug Evans <dje@google.com>
2020 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2022 2011-05-04 Doug Evans <dje@google.com>
2024 * linux-low.c (linux_join): Skip process lookup.
2025 * spu-low.c (spu_join): Ditto.
2026 * server.c (join_inferiors_callback): Delete.
2027 (process_serial_event): For 'D' packet (detach) call join_inferior
2030 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2032 * README: Don't mention xscale*-*-linux*.
2033 * configure.srv (xscale*-*-linux*): Don't handle target.
2035 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2037 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2039 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2040 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2041 (i386_emit_void_call_2): Likewise.
2043 2011-04-26 Yao Qi <yao@codesourcery.com>
2045 * linux-low.c: Move common macros to linux-ptrace.h.
2046 Include linux-ptrace.h.
2047 * Makefile.in (linux_ptrace_h): New.
2048 (linux-low.o): Depends on linux-ptrace.h.
2050 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2052 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2053 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2054 (remote_prepare): New function with most of the TCP code from ...
2055 (remote_open): ... here. Detect PORT here unconditionally. Move also
2056 setting transport_is_reliable.
2057 * server.c (run_once): New variable.
2058 (gdbserver_usage): Document it.
2059 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2060 the first run if RUN_ONCE.
2061 * server.h (run_once, remote_prepare): New declarations.
2063 2011-04-19 Tom Tromey <tromey@redhat.com>
2065 * win32-low.c (handle_load_dll): Remove duplicate "the".
2067 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2069 Remove support for old Cygwin 1.5 versions.
2070 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2071 function to avoid warning.
2072 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2075 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2077 * gdbserver/server.h (Macro _): Define it if not available.
2079 2011-03-14 Michael Snyder <msnyder@vmware.com>
2081 * hostio.c (handle_close): Remove unnecessary null test.
2083 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2085 * Makefile.in (maintainer-clean realclean distclean): Remove
2086 "make ... subdir_do" command.
2088 2011-03-10 Michael Snyder <msnyder@vmware.com>
2090 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2092 * server.c (handle_v_run): Free alloced buffer on early return.
2094 2011-03-09 Yao Qi <yao@codesourcery.com>
2097 2011-03-04 Yao Qi <yao@codesourcery.com>
2099 * Makefile.in: Remove GNU make feature --directory.
2101 2011-03-05 Yao Qi <yao@codesourcery.com>
2103 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2104 (subdir_do): New make target. Copied from gdb/Makefile.
2105 (maintainer-clean, realclean, distclean, clean): Call corresponding
2106 make targets in common/Makefile.
2108 2011-02-11 Yao Qi <yao@codesourcery.com>
2110 * configure.ac: Call AC_PROG_RANLIB.
2111 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2112 * configure: Regenerate.
2114 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2116 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2118 2011-03-06 Yao Qi <yao@codesourcery.com>
2120 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2122 2011-03-05 Yao Qi <yao@codesourcery.com>
2124 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2125 (subdir_do): New make target. Copied from gdb/Makefile.
2126 (maintainer-clean, realclean, distclean, clean): Call corresponding
2127 make targets in common/Makefile.
2129 2011-03-04 Yao Qi <yao@codesourcery.com>
2131 * Makefile.in: Remove GNU make feature --directory.
2133 2011-03-04 Michael Snyder <msnyder@vmware.com>
2135 * server.c (queue_stop_reply): Call xmalloc not malloc.
2137 2011-03-02 Michael Snyder <msnyder@vmware.com>
2139 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2141 2011-02-28 Michael Snyder <msnyder@vmware.com>
2143 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2144 (cmd_qtframe): Ditto.
2145 (cmd_qtbuffer): Ditto.
2146 (cmd_bigqtbuffer): Ditto.
2148 * utils.c (decimal2str): Initialize 'width' to nine, then
2151 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2153 * hostio.c (require_data): Free *data, not data.
2155 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2157 * hostio.c (require_data): Use free, not xfree.
2159 2011-02-27 Michael Snyder <msnyder@vmware.com>
2161 * server.c (handle_query): Discard unused value.
2163 * hostio.c (require_data): Free malloc memory before returning
2166 2011-02-26 Michael Snyder <msnyder@vmware.com>
2168 * linux-low.c (list_threads): Call closedir for dirent.
2170 2011-02-27 Michael Snyder <msnyder@vmware.com>
2172 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2173 a case statement falls through.
2175 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2177 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2180 2011-02-26 Michael Snyder <msnyder@vmware.com>
2182 * utils.c (decimal2str): Eliminate dead code and dead param.
2183 (pulongest): Drop dead param from call to decimal2str.
2186 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2188 Revert the following patch (not approved yet):
2189 2011-02-21 Hui Zhu <teawater@gmail.com>
2190 * tracepoint.c (tp_printf): New function.
2191 (eval_agent_expr): Handle gdb_agent_op_printf.
2193 2011-02-21 Hui Zhu <teawater@gmail.com>
2195 * tracepoint.c (tp_printf): New function.
2196 (eval_agent_expr): Handle gdb_agent_op_printf.
2198 2011-02-18 Tom Tromey <tromey@redhat.com>
2200 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2201 (tracepoint.o): Likewise.
2202 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2203 (gdb_agent_op_names): Likewise.
2205 2011-02-18 Tom Tromey <tromey@redhat.com>
2207 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2208 gdb_agent_op_rot>: New constants.
2209 (gdb_agent_op_names): Add pick and roll.
2210 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2213 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2215 * aclocal.m4: Regenerated with aclocal-1.11.1.
2217 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2219 * server.c (handle_qxfer_traceframe_info): New.
2220 (qxfer_packets): Register "traceframe-info".
2221 (handle_query): Report support for qXfer:traceframe-info:read+.
2222 * tracepoint.c (match_blocktype): New.
2223 (traceframe_find_block_type): Rename to ...
2224 (traceframe_walk_blocks): ... this. Add callback filter argument,
2226 (traceframe_find_block_type): New, reimplemented on top of
2227 traceframe_walk_blocks.
2228 (build_traceframe_info_xml): New.
2229 (traceframe_read_info): New.
2230 * server.h (traceframe_read_info): Declare.
2232 2011-02-11 Yao Qi <yao@codesourcery.com>
2234 * configure.ac: Call AC_PROG_RANLIB.
2235 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2236 * configure: Regenerate.
2238 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2240 * server.c (gdb_read_memory): Change return semantics to allow
2242 (handle_search_memory_1): Adjust.
2243 (process_serial_event) <'m' packet>: Handle partial transfers.
2244 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2246 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2248 * regcache.c (init_register_cache): Initialize
2249 regcache->register_status.
2250 (free_register_cache): Release regcache->register_status.
2251 (regcache_cpy): Copy register_status.
2252 (registers_to_string): Print 'x's for unavailable registers.
2253 (supply_register): Mark the register's status valid or
2254 unavailable, depending on whether a buffer was passed in or not.
2255 (supply_register_zeroed): New.
2256 (supply_regblock): Mark the registers' status valid or
2257 unavailable, depending on whether a buffer was passed in or not.
2258 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2259 (struct regcache): New `register_status' field.
2260 (supply_register_zeroed): Declare.
2261 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2262 supply_register_zeroed, rather than passing a NULL buffer to
2264 * tracepoint.c (fetch_traceframe_registers): Update comment.
2266 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2268 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2271 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2273 * server.h (decode_xfer_write): Change prototype.
2274 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2275 and don't extract the annex here.
2276 * server.c (decode_xfer_read): Remove `annex' parameter,
2277 and don't extract the annex here.
2279 (struct qxfer): New.
2280 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2281 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2282 (handle_qxfer_statictrace): New functions, abstracted out from
2283 handle_query, and made to use the struct qxfer interface.
2284 (handle_threads_qxfer_proper): Rename to ...
2285 (handle_qxfer_threads_proper): ... this.
2286 (handle_threads_qxfer): Rename to ...
2287 (handle_qxfer_threads): ... this. Adjust.
2288 (qxfer_packets): New array.
2289 (handle_qxfer): New function.
2290 (handle_query): Use handle_qxfer.
2292 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2294 * gdbreplay.c: Shorten lines of >= 80 columns.
2295 * linux-low.c: Ditto.
2296 * linux-ppc-low.c: Ditto.
2297 * linux-s390-low.c: Ditto.
2298 * linux-sparc-low.c: Ditto.
2299 * linux-x86-low.c: Ditto.
2300 * linux-xtensa-low.c: Ditto.
2301 * mem-break.c: Ditto.
2303 * regcache.h: Ditto.
2304 * remote-utils.c: Ditto.
2307 * thread-db.c: Ditto.
2308 * tracepoint.c: Ditto.
2310 * win32-low.h: Ditto.
2312 2011-01-05 Joel Brobecker <brobecker@adacore.com>
2314 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2317 2011-01-01 Joel Brobecker <brobecker@adacore.com>
2319 * server.c (gdbserver_version): Update copyright year in version
2321 * gdbreplay.c (gdbreplay_version): Ditto.
2323 2010-12-29 Jie Zhang <jie.zhang@analog.com>
2325 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2326 * linux-bfin-low.c: New file.
2327 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2328 PT_DATA_ADDR for BFIN targets.
2329 * Makefile.in (SFILES): Add linux-bfin-low.c.
2330 (clean): Remove reg-bfin.c.
2331 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2332 * README: Mention supported Blackfin targets.
2334 2010-12-23 Mike Frysinger <vapier@gentoo.org>
2336 * .gitignore: New file.
2338 2010-11-16 Mike Frysinger <vapier@gentoo.org>
2340 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2342 2010-10-22 Jie Zhang <jie@codesourcery.com>
2344 * Makefile.in: Add FLAGS_TO_PASS variable.
2345 (install): Remove dependency of install-only and recursively
2346 invoke make for install-only.
2348 2010-10-04 Doug Evans <dje@google.com>
2350 * Makefile.in (uninstall): Use $(DESTDIR).
2352 2010-09-24 Pedro Alves <pedro@codesourcery.com>
2356 * linux-x86-low.c (compat_siginfo_from_siginfo)
2357 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2358 si_code is < 0. Check for si_code == SI_TIMER before checking for
2361 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2363 * lynx-i386-low.c: New file.
2364 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2366 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2368 * lynx-low.c (ptrace_request_to_str): Remove handling for
2369 request values that have been removed in LynxOS 5.x.
2371 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2373 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2376 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2378 * configure.ac: Add --enable-inprocess-agent option.
2379 * configure: Rebuilt.
2381 2010-09-06 Yao Qi <yao@codesourcery.com>
2383 * linux-low.c (linux_kill): Remove unused variable.
2384 (linux_stabilize_threads): Likewise.
2385 * server.c (start_inferior): Likewise.
2386 (queue_stop_reply_callback): Likewise.
2387 * tracepoint.c (do_action_at_tracepoint): Likewise.
2389 2010-09-06 Yao Qi <yao@codesourcery.com>
2391 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2394 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2396 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2398 2010-09-06 Pedro Alves <pedro@codesourcery.com>
2400 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2403 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2405 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2406 gdbserver/lynx-ppc-low.c: New files.
2407 * Makefile.in (lynx_low_h): New variable.
2408 (lynx-low.o, lynx-ppc-low.o): New rules.
2409 * configure.ac: On LynxOS, link with -lnetinet.
2410 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2411 * configure: regenerate.
2413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2415 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2416 * configure.ac: Add check for vasprintf and vsnprintf.
2417 * configure, config.in: Regenerate.
2418 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2422 * gdbreplay.c: Move include of alloca.h up, next to include of
2424 * server.h: Add include of malloc.h.
2425 * mem-break.c: Remove include of malloc.h.
2426 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2428 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2430 * Makefile.in (memmem.o): Build with -Wno-error.
2432 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2434 * utils.c (xsnprintf): Make non-static.
2435 * server.h: Add xsnprintf declaration.
2436 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2437 replace calls to snprintf by calls to xsnprintf throughout.
2439 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2441 * configure.ac: Add configure check for alloca.
2442 * configure, config.in: Regenerate.
2443 * server.h: Include alloca.h if it exists.
2444 * gdbreplay.c: Include alloca.h if it exists.
2446 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2448 * linux-low.c (__SIGRTMIN): Define if not already defined.
2449 (linux_create_inferior): Check for __ANDROID__ rather than
2451 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2452 are already deferred.
2453 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2454 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2455 stopped and already has a pending signal to report.
2456 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2457 a pending signal to report or is moving out of a jump pad.
2458 (linux_init_signals): Check for __ANDROID__ rather than
2461 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2463 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2464 debug_threads check. Avoid a linear search when not doing debug
2467 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2469 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2470 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2471 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2472 (process_event): Change local fd's type to gdb_fildes_t.
2473 (create_file_handler): Adjust prototype.
2474 (delete_file_handler): Adjust prototype.
2475 (handle_file_event): Adjust prototype. Use pfildes.
2476 (create_file_event): Adjsut prototype.
2477 * remote-utils.c (remote_desc, listen_desc): Change type to
2479 * server.h: New gdb_fildes_t typedef.
2480 [USE_WIN32API]: Include winsock2.h.
2481 (delete_file_handler, add_file_handler): Adjust prototypes.
2483 * utils.c (pfildes): New.
2485 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2487 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2488 * configure: Regenerate.
2490 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2492 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2493 (linux_done_accessing_memory): ... this.
2494 (linux_target_ops): Adjust.
2495 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2496 * nto-low.c (nto_target_ops): Adjust comment.
2497 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2498 * spu-low.c (spu_target_ops): Adjust comment.
2499 * target.h (target_ops): Rename unprepare_to_access_memory field
2500 to done_accessing_memory.
2501 (unprepare_to_access_memory): Rename to ...
2502 (done_accessing_memory): ... this.
2504 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2506 * linux-low.c (linux_prepare_to_access_memory): New.
2507 (linux_unprepare_to_access_memory): New.
2508 (linux_target_ops): Install them.
2509 * server.c (read_memory): Rename to ...
2510 (gdb_read_memory): ... this. Use
2511 prepare_to_access_memory/prepare_to_access_memory.
2512 (write_memory): Rename to ...
2513 (gdb_write_memory): ... this. Use
2514 prepare_to_access_memory/prepare_to_access_memory.
2515 (handle_search_memory_1): Adjust.
2516 (process_serial_event): Adjust.
2517 * target.h (struct target_ops): New fields
2518 prepare_to_access_memory and unprepare_to_access_memory.
2519 (prepare_to_access_memory, unprepare_to_access_memory): New.
2520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2521 prepare_to_access_memory/prepare_to_access_memory.
2522 * nto-low.c (nto_target_ops): Adjust.
2523 * spu-low.c (spu_target_ops): Adjust.
2524 * win32-low.c (win32_target_ops): Adjust.
2526 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2528 * Makefile.in (WARN_CFLAGS): Get it from configure.
2529 (WERROR_CFLAGS): New.
2530 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2531 * configure.ac: Introduce --enable-werror, which adds -Werror to
2532 the compiler command line. Enabled by default. Disable with
2533 --disable-werror. Add -Wdeclaration-after-statement
2534 Wpointer-arith and -Wformat-nonliteral to warning flags.
2535 * configure: Regenerate.
2537 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2539 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2541 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2543 * gdbreplay.c (remote_error): New.
2545 (expect): Use gdbchar. Check for error reading from GDB.
2546 Clarify sync error output.
2547 (play): Check for errors writing to GDB.
2548 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2549 * remote-utils.c (getpkt): Check for errors writing to the remote
2552 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2554 * linux-low.c (linux_wait_1): Move non-debugging code out of
2555 `debug_threads' control.
2557 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2559 * linux-low.c (linux_wait_1): Don't set last_status here.
2560 * server.c (push_event, queue_stop_reply_callback): Assert we're
2561 not pushing a TARGET_WAITKIND_IGNORE event.
2562 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2563 (myresume, handle_target_event): Set the thread's last_resume_kind
2564 and last_status from the target returned status.
2566 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2570 * linux-x86-low.c (update_debug_registers_callback): New.
2571 (i386_dr_low_set_addr): Use it.
2572 (i386_dr_low_get_addr): New.
2573 (i386_dr_low_set_control): Use update_debug_registers_callback.
2574 (i386_dr_low_get_control): New.
2575 (i386_dr_low_get_status): Adjust.
2576 * linux-low.c (linux_stop_lwp): New.
2577 * linux-low.h (linux_stop_lwp): Declare.
2579 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2580 argument instead of a i386_debug_reg_state.
2581 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2582 a i386_debug_reg_state.
2583 (i386_insert_aligned_watchpoint): Adjust.
2584 (i386_remove_aligned_watchpoint): Adjust.
2585 (i386_low_stopped_data_address): Read the debug registers from the
2586 inferior instead of from the mirrors.
2587 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2588 (i386_dr_low_get_addr): Declare.
2589 (i386_dr_low_get_control): Declare.
2590 (i386_dr_low_get_status): Change prototype.
2592 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2593 (i386_dr_low_get_addr): New.
2594 (i386_dr_low_get_control): New.
2595 (i386_dr_low_get_status): Adjust prototype. Return
2597 (i386_initial_stuff): Clear dr_status_mirror and
2599 (i386_get_thread_context): Adjust.
2600 (i386_set_thread_context): Adjust.
2601 (i386_thread_added): Adjust.
2603 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2605 * linux-low.h (linux_thread_area): Delete declaration.
2607 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2609 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2610 after its termination.
2612 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2614 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2615 (gdb_wants_all_stopped): Delete.
2616 (linux_wait_1): Don't call them.
2617 * server.c (handle_v_cont): Tag all threads as want-stopped.
2618 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2619 stopped as "client-wants-stopped".
2621 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2623 * Makefile.in (signals_h): New.
2624 (server_h): Depend on it.
2625 (server.o): Don't depend on $(signals_def).
2626 (signals.o): Depend on $(signals_def).
2628 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2630 * Makefile.in (signals_def): New.
2631 (server_h): Append include/gdb/signals.h and signals_def.
2632 (server.o): Append signals_def.
2634 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2636 * server.c (handle_target_event): Use target_signal_to_host for
2637 resume_info.sig initialization.
2638 * target.h (struct thread_resume) <sig>: New comment.
2640 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2642 * server.c (handle_query): strcpy() the returned string from paddress()
2643 instead of sprintf().
2644 * utils.c (paddress): Return phex_nz().
2646 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2648 * server.c (handle_v_cont): Call mourn_inferior if process
2650 (myresume): Likewise.
2652 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2654 Static tracepoints, and integration with UST.
2656 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2657 * mem-break.c (uninsert_all_breakpoints)
2658 (reinsert_all_breakpoints): New.
2659 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2660 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2661 (gdb_agent_ust_loaded, helper_thread_id)
2662 (gdb_agent_helper_thread_id): New macros.
2663 (struct ipa_sym_addresses): Add addr_ust_loaded,
2664 addr_helper_thread_id, addr_cmd_buf.
2665 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2666 (in_process_agent_loaded_ust): New.
2667 (write_e_ust_not_loaded): New.
2668 (maybe_write_ipa_ust_not_loaded): New.
2669 (struct collect_static_trace_data_action): New.
2670 (enum tracepoint_type) <static_tracepoint>: New.
2671 (struct tracepoint) <handle>: Mention static tracepoints.
2672 (struct static_tracepoint_ctx): New.
2673 (CMD_BUF_SIZE): New.
2674 (add_tracepoint_action): Handle static tracepoint actions.
2675 (unprobe_marker_at): New.
2676 (clear_installed_tracepoints): Handle static tracepoints.
2677 (cmd_qtdp): Handle static tracepoints.
2678 (probe_marker_at): New.
2679 (cmd_qtstart): Handle static tracepoints.
2680 (response_tracepoint): Handle static tracepoints.
2681 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2682 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2683 (get_context_regcache): Handle static tracepoints.
2684 (do_action_at_tracepoint): Handle static tracepoint actions.
2685 (traceframe_find_block_type): Handle static trace data blocks.
2686 (traceframe_read_sdata): New.
2687 (download_tracepoints): Download static tracepoint actions.
2688 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2689 (GDB_PROBE_NAME): New.
2694 (ust_marker_to_static_tracepoint): New.
2696 (collect_ust_data_at_tracepoint): New.
2697 (gdb_ust_probe): New.
2698 (UNIX_PATH_MAX, SOCK_DIR): New.
2699 (gdb_ust_connect_sync_socket): New.
2700 (resume_thread, stop_thread): New.
2701 (run_inferior_command): New.
2702 (init_named_socket): New.
2703 (gdb_ust_socket_init): New.
2704 (cstr_to_hexstr): New.
2706 (first_marker, next_marker): New.
2707 (response_ust_marker): New.
2708 (cmd_qtfstm, cmd_qtsstm): New.
2709 (unprobe_marker_at, probe_marker_at): New.
2710 (cmd_qtstmat, gdb_ust_thread): New.
2711 (gdb_ust_init): New.
2712 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2713 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2715 (x86_64_st_collect_regmap): New.
2716 (X86_64_NUM_ST_COLLECT_GREGS): New.
2717 (AMD64_RIP_REGNUM): New.
2718 (supply_static_tracepoint_registers): New.
2719 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2721 (i386_st_collect_regmap): New.
2722 (i386_NUM_ST_COLLECT_GREGS): New.
2723 (supply_static_tracepoint_registers): New.
2724 * server.c (handle_query): Handle qXfer:statictrace:read.
2725 <qSupported>: Report support for StaticTracepoints, and
2726 qXfer:statictrace:read features.
2727 * server.h (traceframe_read_sdata)
2728 (supply_static_tracepoint_registers): Declare.
2729 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2730 (unpack_varlen_hex): Include in IPA build.
2731 * Makefile.in (ustlibs, ustinc): New.
2732 (IPA_OBJS): Add remote-utils-ipa.o.
2733 ($(IPA_LIB)): Link -ldl and -lpthread.
2735 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2736 * config.in, configure: Regenerate.
2738 2010-06-20 Ian Lance Taylor <iant@google.com>
2739 Pedro Alves <pedro@codesourcery.com>
2741 * linux-x86-low.c (always_true): Delete.
2742 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2743 trying to fool the compiler with always_true.
2745 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2747 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2748 conditions in gdbserver.
2750 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2752 * spu-low.c (spu_read_memory): Wrap around local store limit.
2753 (spu_write_memory): Likewise.
2755 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2757 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2758 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2760 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2762 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2763 uses with LONGEST uses.
2765 2010-06-14 Stan Shebs <stan@codesourcery.com>
2766 Pedro Alves <pedro@codesourcery.com>
2770 * linux-x86-low.c: Include limits.h.
2775 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2776 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2777 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2778 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2779 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2780 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2781 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2782 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2783 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2784 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2785 (amd64_emit_void_call_2): New.
2786 (amd64_emit_ops): New.
2787 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2788 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2789 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2790 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2791 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2792 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2793 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2794 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2795 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2796 (i386_emit_stack_adjust, i386_emit_int_call_1)
2797 (i386_emit_void_call_2): New.
2798 (i386_emit_ops): New.
2799 (x86_emit_ops): New.
2800 (the_low_target): Install x86_emit_ops.
2801 * server.h (struct emit_ops): New.
2802 (get_raw_reg_func_addr): Declare.
2803 (current_insn_ptr, emit_error): Declare.
2804 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2805 (set_trace_state_variable_value): New defines.
2806 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2807 addr_get_trace_state_variable_value and
2808 addr_set_trace_state_variable_value.
2809 (symbol_list): New fields for get_raw_reg,
2810 get_trace_state_variable_value and set_trace_state_variable_value.
2811 (condfn): New typedef.
2812 (struct tracepoint): New field `compiled_cond'.
2813 (do_action_at_tracepoint): Clear compiled_cond.
2814 (get_trace_state_variable_value, set_trace_state_variable_value):
2816 (condition_true_at_tracepoint): If there's a compiled condition,
2818 (current_insn_ptr, emit_error): New globals.
2819 (struct bytecode_address): New.
2820 (get_raw_reg_func_addr): New.
2821 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2822 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2823 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2824 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2825 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2826 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2827 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2828 (compile_tracepoint_condition, compile_bytecodes): New.
2829 * target.h (emit_ops): Forward declare.
2830 (struct target_ops): New field emit_ops.
2831 (target_emit_ops): New.
2832 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2833 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2834 * linux-low.c (linux_emit_ops): New.
2835 (linux_target_ops): Install it.
2836 * linux-low.h (struct linux_target_ops): New field emit_ops.
2838 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2840 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2841 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2843 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2844 Stan Shebs <stan@codesourcery.com>
2846 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2847 (all): Depend on $(extra_libraries).
2848 (install-only): Install the IPA.
2849 (IPA_OBJS, IPA_LIB): New.
2850 (clean): Remove the IPA lib.
2851 (IPAGENT_CFLAGS): New.
2852 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2853 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2854 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2855 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2856 * configure.ac: Check for atomic builtins support in the compiler.
2857 (IPA_DEPFILES, extra_libraries): Define.
2858 * configure.srv (ipa_obj): Add description.
2859 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2860 (i[34567]86-*-linux*): Set ipa_obj.
2861 (x86_64-*-linux*): Set ipa_obj.
2862 * linux-low.c (stabilizing_threads): New.
2863 (supports_fast_tracepoints): New.
2864 (linux_detach): Stabilize threads before detaching.
2865 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2866 the lwp is either not stabilizing, or is moving out of a jump pad.
2867 (linux_fast_tracepoint_collecting): New.
2868 (maybe_move_out_of_jump_pad): New.
2869 (enqueue_one_deferred_signal): New.
2870 (dequeue_one_deferred_signal): New.
2871 (linux_wait_for_event_1): If moving out of a jump pad, defer
2872 pending signals to later.
2873 (linux_stabilize_threads): New.
2874 (linux_wait_1): Check if threads need moving out of jump pads, and
2876 (stuck_in_jump_pad_callback): New.
2877 (move_out_of_jump_pad_callback): New.
2879 (linux_resume_one_lwp): Handle moving out of jump pads.
2880 (linux_set_resume_request): Dequeue deferred signals.
2881 (need_step_over_p): Also step over fast tracepoint jumps.
2882 (start_step_over): Also uninsert fast tracepoint jumps.
2883 (finish_step_over): Also reinsert fast tracepoint jumps.
2884 (linux_install_fast_tracepoint_jump): New.
2885 (linux_target_ops): Install linux_stabilize_threads and
2886 linux_install_fast_tracepoint_jump_pad.
2887 * linux-low.h (linux_target_ops) <get_thread_area,
2888 install_fast_tracepoint_jump_pad>: New fields.
2889 (struct lwp_info) <collecting_fast_tracepoint,
2890 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2891 (linux_get_thread_area): Declare.
2892 * linux-x86-low.c (jump_insn): New.
2893 (x86_get_thread_area): New.
2894 (append_insns): New.
2896 (amd64_install_fast_tracepoint_jump_pad): New.
2897 (i386_install_fast_tracepoint_jump_pad): New.
2898 (x86_install_fast_tracepoint_jump_pad): New.
2899 (the_low_target): Install x86_get_thread_area and
2900 x86_install_fast_tracepoint_jump_pad.
2901 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2902 (struct fast_tracepoint_jump): New.
2903 (fast_tracepoint_jump_insn): New.
2904 (fast_tracepoint_jump_shadow): New.
2905 (find_fast_tracepoint_jump_at): New.
2906 (fast_tracepoint_jump_here): New.
2907 (delete_fast_tracepoint_jump): New.
2908 (set_fast_tracepoint_jump): New.
2909 (uninsert_fast_tracepoint_jumps_at): New.
2910 (reinsert_fast_tracepoint_jumps_at): New.
2911 (set_breakpoint_at): Use write_inferior_memory.
2912 (uninsert_raw_breakpoint): Use write_inferior_memory.
2913 (check_mem_read): Mask out fast tracepoint jumps.
2914 (check_mem_write): Mask out fast tracepoint jumps.
2915 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2916 (set_fast_tracepoint_jump): Declare.
2917 (delete_fast_tracepoint_jump)
2918 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2919 (reinsert_fast_tracepoint_jumps_at): Declare.
2920 * regcache.c: Don't compile many functions when building the
2921 in-process agent library.
2922 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2923 the register buffer in the heap.
2924 (free_register_cache): If the register buffer isn't owned by the
2925 regcache, don't free it.
2926 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2927 pre-existing register caches.
2928 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2930 (convert_ascii_to_int): : Constify `from' parameter type.
2931 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2932 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2933 the needed buffer in-place.
2934 (relocate_instruction): New.
2935 * server.c (handle_query) <qSymbols>: If the target supports
2936 tracepoints, give it a chance of looking up symbols. Report
2937 support for fast tracepoints.
2938 (handle_status): Stabilize threads.
2939 (process_serial_event): Adjust.
2940 * server.h (struct fast_tracepoint_jump): Forward declare.
2941 (struct process_info) <fast_tracepoint_jumps>: New field.
2942 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2943 (decode_X_packet, decode_M_packet): Adjust.
2944 (relocate_instruction): Declare.
2945 (in_process_agent_loaded): Declare.
2946 (tracepoint_look_up_symbols): Declare.
2947 (struct fast_tpoint_collect_status): Declare.
2948 (fast_tracepoint_collecting): Declare.
2949 (force_unlock_trace_buffer): Declare.
2950 (handle_tracepoint_bkpts): Declare.
2951 (initialize_low_tracepoint)
2952 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2953 * target.h (struct target_ops) <stabilize_threads,
2954 install_fast_tracepoint_jump_pad>: New fields.
2955 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2956 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2957 [HAVE_STDINT_H]: Include stdint.h.
2958 (trace_debug_1): Rename to ...
2959 (trace_vdebug): ... this.
2960 (trace_debug): Rename to ...
2961 (trace_debug_1): ... this. Add `level' parameter.
2963 (ATTR_USED, ATTR_NOINLINE): New.
2964 (IP_AGENT_EXPORT): New.
2965 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2966 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2967 (about_to_request_buffer_space, trace_buffer_is_full)
2968 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2969 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2970 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2971 (traceframe_write_count, traceframes_created)
2972 (trace_state_variables)
2973 New renaming defines.
2974 (struct ipa_sym_addresses): New.
2975 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2977 (ipa_sym_addrs): New.
2978 (all_tracepoint_symbols_looked_up): New.
2979 (in_process_agent_loaded): New.
2980 (write_e_ipa_not_loaded): New.
2981 (maybe_write_ipa_not_loaded): New.
2982 (tracepoint_look_up_symbols): New.
2983 (debug_threads) [IN_PROCESS_AGENT]: New.
2984 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2985 (UNKNOWN_SIDE_EFFECTS): New.
2986 (stop_tracing): New.
2987 (flush_trace_buffer): New.
2988 (stop_tracing_bkpt): New.
2989 (flush_trace_buffer_bkpt): New.
2990 (read_inferior_integer): New.
2991 (read_inferior_uinteger): New.
2992 (read_inferior_data_pointer): New.
2993 (write_inferior_data_pointer): New.
2994 (write_inferior_integer): New.
2995 (write_inferior_uinteger): New.
2996 (struct collect_static_trace_data_action): Delete.
2997 (enum tracepoint_type): New.
2998 (struct tracepoint) <type>: New field `type'.
2999 <actions_str, step_actions, step_actions_str>: Only include in
3001 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3002 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3003 (tracepoints): Use IP_AGENT_EXPORT.
3004 (last_tracepoint): Don't include in the IPA.
3005 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3006 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3007 (alloced_trace_state_variables): New.
3008 (trace_state_variables): Use IP_AGENT_EXPORT.
3009 (traceframe_t): Delete unused variable.
3010 (circular_trace_buffer): Don't include in the IPA.
3011 (trace_buffer_start): Delete.
3012 (struct trace_buffer_control): New.
3013 (trace_buffer_free): Delete.
3014 (struct ipa_trace_buffer_control): New.
3015 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3016 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3018 (trace_buffer_ctrl): New.
3019 (TRACE_BUFFER_CTRL_CURR): New.
3020 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3021 Reimplement as macros.
3022 (trace_buffer_wrap): Delete.
3023 (traceframe_write_count, traceframe_read_count)
3024 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3025 (struct tracepoint_hit_ctx) <type>: New field.
3026 (struct fast_tracepoint_ctx): New.
3027 (memory_barrier): New.
3029 (record_tracepoint_error): Update atomically in the IPA.
3030 (clear_inferior_trace_buffer): New.
3031 (about_to_request_buffer_space): New.
3032 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3033 updating the same buffer.
3034 (add_tracepoint): Default the tracepoint's type to trap
3035 tracepoint, and orig_size to -1.
3036 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3038 (create_trace_state_variable): New parameter `gdb'. Handle it.
3039 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3040 (cmd_qtdp): Handle fast tracepoints.
3042 (max_jump_pad_size): New.
3043 (gdb_jump_pad_head): New.
3044 (get_jump_space_head): New.
3045 (claim_jump_space): New.
3046 (sort_tracepoints): New.
3047 (MAX_JUMP_SIZE): New.
3048 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3050 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3051 support. Upload fast traceframes, and delete internal IPA
3053 (stop_tracing_handler): New.
3054 (flush_trace_buffer_handler): New.
3055 (cmd_qtstop): Upload fast tracepoints.
3056 (response_tracepoint): Handle fast tracepoints.
3057 (tracepoint_finished_step): Upload fast traceframes. Set the
3058 tracepoint hit context's tracepoint type.
3059 (handle_tracepoint_bkpts): New.
3060 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3061 type. Add comment about fast tracepoints.
3062 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3063 non-existing action_str field.
3064 (get_context_regcache): Handle fast tracepoints.
3065 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3067 (fast_tracepoint_from_jump_pad_address): New.
3068 (fast_tracepoint_from_ipa_tpoint_address): New.
3069 (collecting_t): New.
3070 (force_unlock_trace_buffer): New.
3071 (fast_tracepoint_collecting): New.
3074 (write_inferior_data_ptr): New.
3075 (target_tp_heap): New.
3076 (target_malloc): New.
3077 (download_agent_expr): New.
3079 (download_tracepoints): New.
3080 (download_trace_state_variables): New.
3081 (upload_fast_traceframes): New.
3082 (IPA_FIRST_TRACEFRAME): New.
3083 (IPA_NEXT_TRACEFRAME_1): New.
3084 (IPA_NEXT_TRACEFRAME): New.
3085 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3086 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3087 (gdb_jump_pad_buffer_end): New.
3088 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3089 (initialize_tracepoint): Adjust.
3090 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3091 buffer. Initialize the low module.
3092 * utils.c (PREFIX, TOOLNAME): New.
3093 (malloc_failure): Use PREFIX.
3094 (error): In the IPA, an error causes an exit.
3095 (fatal, warning): Use PREFIX.
3096 (internal_error): Use TOOLNAME.
3097 (NUMCELLS): Increase to 10.
3098 * configure, config.in: Regenerate.
3100 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3102 * server.c (handle_query) <qSupported>: Do two passes over the
3103 qSupported string to avoid nesting strtok.
3105 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3107 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3109 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3111 * configure: Regenerate.
3112 * proc-service.list: New.
3114 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3116 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3119 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3121 * gdbreplay.c (remote_open): Check error return from socket() call by
3122 its equality to -1 not by it being negative.
3123 * remote-utils.c (remote_open): Likewise.
3125 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3127 * config.h: Regenerate.
3129 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3131 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3132 doesn't provide PTRACE_GET_THREAD_AREA.
3134 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3136 * linux-m68k-low.c: Include <asm/ptrace.h>
3137 (ps_get_thread_area): Implement.
3139 2010-05-03 Doug Evans <dje@google.com>
3141 * event-loop.c (struct callback_event): New struct.
3142 (callback_list): New global.
3143 (append_callback_event, delete_callback_event): New functions.
3144 (process_callback): New function.
3145 (start_event_loop): Call it.
3146 * remote-utils.c (NOT_SCHEDULED): Define.
3147 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3148 moved out of readchar.
3149 (readchar): Rewrite. Call reschedule before returning.
3150 (reset_readchar): New function.
3151 (remote_close): Call it.
3152 (process_remaining, reschedule): New functions.
3153 * server.h (callback_handler_func): New typedef.
3154 (append_callback_event, delete_callback_event): Declare.
3156 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3158 * proc-service.c (ps_pglobal_lookup): Use
3159 thread_db_look_up_one_symbol.
3160 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3161 parameter. Use it instead of all_symbols_looked_up.
3162 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3164 (all_symbols_looked_up): Don't declare.
3165 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3166 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3168 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3169 Set all_symbols_looked_up here.
3170 (thread_db_look_up_one_symbol): New.
3171 (thread_db_get_tls_address): Adjust.
3172 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3173 thread_db object on the heap, and tentatively set it in the
3175 (thread_db_init): Don't set all_symbols_looked_up here.
3176 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3178 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3180 * linux-low.c (linux_kill, linux_detach): Adjust.
3181 (status_pending_p_callback): Remove redundant statement. Check
3182 for !TARGET_WAITIKIND_IGNORE, instead of
3183 TARGET_WAITKIND_STOPPED.
3184 (handle_tracepoints): Make sure LWP is locked. Adjust.
3185 (linux_wait_for_event_1): Adjust.
3186 (linux_cancel_breakpoints): New.
3187 (unsuspend_one_lwp): New.
3188 (unsuspend_all_lwps): New.
3189 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3190 (send_sigstop_callback): Change return type to int, add new
3191 `except' parameter and handle it.
3192 (suspend_and_send_sigstop_callback): New.
3193 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3194 pass them down. If SUSPEND, also increment the lwp's suspend
3196 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3197 (need_step_over_p): Don't consider suspended LWPs.
3198 (start_step_over): Adjust.
3199 (proceed_one_lwp): Change return type to int, add new `except'
3200 parameter and handle it.
3201 (unsuspend_and_proceed_one_lwp): New.
3202 (proceed_all_lwps): Use find_inferior instead of
3204 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3205 also decrement the suspend count of LWPs. Pass `except' down,
3206 instead of hacking its suspend count.
3207 (linux_pause_all): Add `freeze' parameter. Adjust.
3208 (linux_unpause_all): New.
3209 (linux_target_ops): Install linux_unpause_all.
3210 * server.c (handle_status): Adjust.
3211 * target.h (struct target_ops): New fields `unpause_all' and
3212 `cancel_breakpoints'. Add new parameter to `pause_all'.
3213 (pause_all): Add new `freeze' parameter.
3215 (cancel_breakpoints): New.
3216 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3218 (cmd_qtstart): Pause threads.
3219 (stop_tracing): Pause threads, and cancel breakpoints.
3220 * win32-low.c (win32_target_ops): Adjust.
3222 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3224 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3225 the inferior right away from here...
3226 (linux_wait_1): ... to here, and adjust to check the thread's
3227 last_resume_kind instead of the lwp's step or stop_expected flags.
3229 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3231 * README: Use consistent `GDB' and `GDBserver' spellings.
3233 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3235 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3236 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3237 (linux_detach_one_lwp): Assume the lwp is stopped.
3238 (any_thread_of): Delete.
3239 (linux_detach): Stop all lwps here. Don't blindly delete all
3241 (delete_lwp_callback): New.
3242 (linux_mourn): Delete all lwps of the process that is gone.
3243 (linux_wait_1): Don't delete the last lwp of the process here.
3244 * mem-break.h (mark_breakpoints_out): Declare.
3245 * mem-break.c (mark_breakpoints_out): New.
3246 (free_all_breakpoints): Use it.
3247 * server.c (handle_target_event): If the process is gone, mark
3249 * thread-db.c (struct thread_db) <create_bp>: New field.
3250 (thread_db_enable_reporting): Fix prototype. Store a thread event
3251 breakpoint reference in the thread_db struct.
3252 (thread_db_load_search): Clear the thread_db object.
3253 (try_thread_db_load_1): Ditto.
3254 (switch_to_process): New.
3255 (disable_thread_event_reporting): Use it.
3256 (remove_thread_event_breakpoints): New.
3257 (thread_db_detach, thread_db_mourn): Use it.
3259 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3261 * linux-low.c (linux_enable_event_reporting): New.
3262 (linux_wait_for_event_1, handle_extended_wait): Use it.
3264 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3266 * linux-low.c (linux_kill_one_lwp, linux_kill)
3267 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3268 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3269 SIGSTOP even if the LWP is stopped.
3270 (send_sigstop_callback): New.
3271 (stop_all_lwps): Use send_sigstop_callback instead.
3272 (linux_resume_one_thread): Adjust.
3273 (proceed_one_lwp): Still proceed an LWP that the client has
3274 requested to stop, if we haven't reported it as stopped yet. Make
3275 sure that LWPs the client want stopped, have a pending SIGSTOP.
3277 2010-04-26 Doug Evans <dje@google.com>
3279 * server.c (handle_general_set): Make static.
3281 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3282 Print received char after testing for error/eof instead of before.
3283 (input_interrupt): Tweak comment.
3285 2010-04-23 Doug Evans <dje@google.com>
3287 * server.c (start_inferior): Print inferior argv if --debug.
3289 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3291 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3292 * nto-x86-low.c: Include server.h
3294 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3296 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3297 be consistent with other sources of this directory.
3298 (init_registers_amd64): Correct name of source file of this function
3301 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3303 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3306 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3308 * win32-i386-low.c: Add 64-bit support.
3309 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3310 (init_registers_amd64): Declare.
3311 (mappings): Add 64-bit version of array.
3312 (init_windows_x86): New function.
3313 (the_low_target): Change init_arch field to init_windows_x86.
3315 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3317 * win32-low.c: Adapt to support also 64-bit architecture.
3318 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3319 (get_image_name): Use SIZE_T type for local variable `done'.
3320 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3321 (toolhelp_get_dll_name): Idem.
3322 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3323 Use uintptr_t typecast to avoid warning.
3324 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3325 (handle_exception): Use phex_nz to avoid warning.
3326 (win32_wait): Remove unused local variable `process'.
3328 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3330 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3333 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3335 * configure.ac: Use `ws2_32' library for srv_mingw.
3336 * configure: Regenerate.
3337 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3338 * remote-utils.c: Likewise.
3340 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3342 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3343 if __x86_64__ is defined.
3345 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3347 * configure: Regenerate.
3349 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3351 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3352 * target.h (target_ops): New get_tib_address field.
3353 * win32-low.h (win32_thread_info): Add thread_local_base field.
3354 * win32-low.c (child_add_thread): Add tlb argument.
3355 Set thread_local_base field to TLB.
3356 (get_child_debug_event): Adapt to child_add_thread change.
3357 (win32_get_tib_address): New function.
3358 (win32_target_ops): Set get_tib_address field to
3359 win32_get_tib_address.
3360 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3362 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3364 * linux-low.c (linux_mourn): Also remove the process.
3365 * server.c (handle_target_event): Don't remove the process here.
3366 * nto-low.c (nto_mourn): New.
3367 (nto_target_ops): Install it.
3368 * spu-low.c (spu_mourn): New.
3369 (spu_target_ops): Install it.
3370 * win32-low.c (win32_mourn): New.
3371 (win32_target_ops): Install it.
3373 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3375 * server.h (buffer_xml_printf): Remove redundant `;'.
3377 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3379 * regcache.c (set_register_cache): Invalidate regcaches before
3380 changing the register cache layout.
3381 (regcache_invalidate_one): Allow a NULL regcache.
3382 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3383 regcaches before changing the register cache layout or the target
3386 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3388 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3389 variable warning on Linux/x86-64.
3391 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3393 GDBserver disconnected tracing support.
3395 * linux-low.c (linux_remove_process): Delete.
3396 (add_lwp): Don't set last_resume_kind here.
3397 (linux_kill): Use `mourn'.
3398 (linux_detach): Use `thread_db_detach', and `mourn'.
3400 (linux_attach_lwp_1): Adjust comment.
3401 (linux_attach): last_resume_kind moved the thread_info; adjust.
3402 (status_pending_p_callback): Adjust.
3403 (linux_wait_for_event_1): Adjust.
3404 (count_events_callback, select_singlestep_lwp_callback)
3405 (select_event_lwp_callback, cancel_breakpoints_callback)
3406 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3407 (proceed_one_lwp): Adjust.
3408 (linux_async): Add debug output.
3409 (linux_thread_stopped): New.
3410 (linux_pause_all): New.
3411 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3413 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3414 (thread_db_free): Delete declaration.
3415 (thread_db_detach, thread_db_mourn): Declare.
3416 * thread-db.c (thread_db_init): Use thread_db_mourn.
3417 (thread_db_free): Delete, split in two.
3418 (disable_thread_event_reporting): New.
3419 (thread_db_detach): New.
3420 (thread_db_mourn): New.
3422 * server.h (struct thread_info) <last_resume_kind>: New field.
3423 <attached>: Add comment.
3424 <gdb_detached>: New field.
3425 (handler_func): Change return type to int.
3426 (handle_serial_event, handle_target_event): Ditto.
3427 (gdb_connected): Declare.
3429 (disconnected_tracing): Declare.
3430 (stop_tracing): Declare.
3432 * server.c (handle_query) <qSupported>: Report support for
3433 disconnected tracing.
3434 (queue_stop_reply_callback): Account for running threads.
3435 (gdb_wants_thread_stopped): New.
3436 (gdb_wants_all_threads_stopped): New.
3437 (gdb_reattached_process): New.
3438 (handle_status): Clear the `gdb_detached' flag of all processes.
3439 In all-stop, stop all threads.
3440 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3441 (process_serial_event): If the remote connection breaks, or if an
3442 exit was forced with "monitor exit", force an event loop exit.
3443 Handle disconnected tracing on detach.
3444 (handle_serial_event): Adjust.
3445 (handle_target_event): If GDB isn't connected, forward events back
3446 to the inferior, unless the last process exited, in which case,
3447 exit gdbserver. Adjust interface.
3449 * remote-utils.c (remote_open): Don't block in accept. Instead
3450 register an event loop source on the listen socket file
3451 descriptor. Refactor bits into ...
3452 (listen_desc): ... this new global.
3453 (gdb_connected): ... this new function.
3454 (enable_async_notification): ... this new function.
3455 (handle_accept_event): ... this new function.
3456 (remote_close): Clear remote_desc.
3458 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3460 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3462 (mourn_inferior): Define.
3463 (target_process_qsupported): Avoid the dangling else problem.
3464 (thread_stopped): Define.
3465 (pause_all): Define.
3466 (target_waitstatus_to_string): Declare.
3467 * target.c (target_waitstatus_to_string): New.
3469 * tracepoint.c (tracing): Make extern.
3470 (disconnected_tracing): New.
3471 (stop_tracing): Make extern. Handle tracing stops due to GDB
3473 (cmd_qtdisconnected): New.
3474 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3475 (handle_tracepoint_general_set): Handle QTDisconnected.
3477 * event-loop.c (event_handler_func): Change return type to int.
3478 (process_event): Bail out if the event handler wants the event
3480 (handle_file_event): Ditto.
3481 (start_event_loop): Bail out if the event handler wants the event
3484 * nto-low.c (nto_target_ops): Adjust.
3485 * spu-low.c (spu_wait): Don't remove the process here.
3486 (spu_target_ops): Adjust.
3487 * win32-low.c (win32_wait): Don't remove the process here.
3488 (win32_target_ops): Adjust.
3490 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3492 * regcache.c (realloc_register_cache): Invalidate inferior's
3493 regcache before recreating it.
3495 2010-04-09 Pedro Alves <pedro@codesourcery.com>
3497 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3499 2010-04-09 Stan Shebs <stan@codesourcery.com>
3500 Pedro Alves <pedro@codesourcery.com>
3502 * server.h (LONGEST): New.
3503 (struct thread_info) <while_stepping>: New field.
3504 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3506 (initialize_tracepoint, handle_tracepoint_general_set)
3507 (handle_tracepoint_query, tracepoint_finished_step)
3508 (tracepoint_was_hit, release_while_stepping_state_list):
3509 (current_traceframe): Declare.
3510 * server.c (handle_general_set): Handle tracepoint packets.
3512 (write_memory): New.
3513 (handle_search_memory_1): Use read_memory.
3514 (handle_query): Report support for conditional tracepoints, trace
3515 state variables, and tracepoint sources. Handle tracepoint
3517 (main): Initialize the tracepoints module.
3518 (process_serial_event): Handle traceframe reads/writes.
3520 * linux-low.c (handle_tracepoints): New.
3521 (linux_wait_1): Call it.
3522 (linux_resume_one_lwp): Handle while-stepping.
3523 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3524 (linux_target_ops): Install them.
3525 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3527 * linux-x86-low.c (x86_supports_tracepoints): New.
3528 (the_low_target). Install it.
3530 * mem-break.h (delete_breakpoint): Declare.
3531 * mem-break.c (delete_breakpoint): Make external.
3533 * target.h (struct target_ops): Add `supports_tracepoints',
3534 `read_pc', and `write_pc' fields.
3535 (target_supports_tracepoints): Define.
3536 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3539 * regcache.h (struct regcache) <registers_owned>: New field.
3540 (init_register_cache, regcache_cpy): Declare.
3541 (regcache_read_pc, regcache_write_pc): Declare.
3542 (register_cache_size): Declare.
3543 (supply_regblock): Declare.
3544 * regcache.c (init_register_cache): New.
3545 (new_register_cache): Use it.
3546 (regcache_cpy): New.
3547 (register_cache_size): New.
3548 (supply_regblock): New.
3549 (regcache_read_pc, regcache_write_pc): New.
3551 * tracepoint.c: New.
3553 * Makefile.in (OBS): Add tracepoint.o.
3554 (tracepoint.o): New rule.
3556 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3558 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3560 (i386-mmx.c): Likewise.
3561 (i386-mmx-linux.o): Likewise.
3562 (i386-mmx-linux.c): Likewise.
3564 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3565 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3566 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3567 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3569 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3570 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3571 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3573 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3575 * Makefile.in (clean): Updated.
3577 (i386-avx.c): Likewise.
3578 (i386-avx-linux.o): Likewise.
3579 (i386-avx-linux.c): Likewise.
3580 (amd64-avx.o): Likewise.
3581 (amd64-avx.c): Likewise.
3582 (amd64-avx-linux.o): Likewise.
3583 (amd64-avx-linux.c): Likewise.
3585 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3586 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3587 (srv_amd64_regobj): Add amd64-avx.o.
3588 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3589 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3590 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3591 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3592 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3593 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3594 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3596 * i387-fp.c: Include "i386-xstate.h".
3598 (i387_cache_to_xsave): Likewise.
3599 (i387_xsave_to_cache): Likewise.
3600 (x86_xcr0): Likewise.
3602 * i387-fp.h (i387_cache_to_xsave): Likewise.
3603 (i387_xsave_to_cache): Likewise.
3604 (x86_xcr0): Likewise.
3606 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3607 * linux-crisv32-low.c (target_regsets): Likewise.
3608 * linux-m68k-low.c (target_regsets): Likewise.
3609 * linux-mips-low.c (target_regsets): Likewise.
3610 * linux-ppc-low.c (target_regsets): Likewise.
3611 * linux-s390-low.c (target_regsets): Likewise.
3612 * linux-sh-low.c (target_regsets): Likewise.
3613 * linux-sparc-low.c (target_regsets): Likewise.
3614 * linux-xtensa-low.c (target_regsets): Likewise.
3616 * linux-low.c: Include <sys/uio.h>.
3617 (regsets_fetch_inferior_registers): Support nt_type.
3618 (regsets_store_inferior_registers): Likewise.
3619 (linux_process_qsupported): New.
3620 (linux_target_ops): Add linux_process_qsupported.
3622 * linux-low.h (regset_info): Add nt_type.
3623 (linux_target_ops): Add process_qsupported.
3625 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3627 (init_registers_i386_avx_linux): New.
3628 (init_registers_amd64_avx_linux): Likewise.
3629 (xmltarget_i386_linux_no_xml): Likewise.
3630 (xmltarget_amd64_linux_no_xml): Likewise.
3631 (PTRACE_GETREGSET): Likewise.
3632 (PTRACE_SETREGSET): Likewise.
3633 (x86_fill_xstateregset): Likewise.
3634 (x86_store_xstateregset): Likewise.
3635 (use_xml): Likewise.
3636 (x86_linux_update_xmltarget): Likewise.
3637 (x86_linux_process_qsupported): Likewise.
3638 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3639 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3640 init_registers_i386_linux here. Call
3641 x86_linux_update_xmltarget.
3642 (the_low_target): Add x86_linux_process_qsupported.
3644 * server.c (handle_query): Call target_process_qsupported.
3646 * target.h (target_ops): Add process_qsupported.
3647 (target_process_qsupported): New.
3649 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3651 * inferiors.c (add_thread): Set last_status kind to
3652 TARGET_WAITKIND_IGNORE.
3653 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3654 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3655 (linux_wait_1): Move `thread' local definition to block that uses
3656 it. Don't NULL initialize `event_child'.
3657 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3658 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3659 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3661 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3663 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3664 an extended waitstatus, or by a watchpoint.
3665 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3666 thread was stepping or has been stopped by a watchpoint.
3668 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3670 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3671 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3672 of another, then delete the previous, and validate all
3674 (validate_inserted_breakpoint): New.
3675 (delete_disabled_breakpoints): New.
3676 (validate_breakpoints): New.
3677 (check_mem_read): Validate breakpoints before trusting their
3678 shadow. Delete disabled breakpoints.
3679 (check_mem_write): Validate breakpoints before trusting they
3680 should be inserted. Delete disabled breakpoints.
3681 * mem-break.h (validate_breakpoints):
3682 * server.c (handle_query): Validate breakpoints when we see a
3685 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3687 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3688 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3689 if we could tell there's a GDB breakpoint at stop_pc.
3690 (need_step_over_p): Don't do a step over if we find a GDB
3691 breakpoint at the resume PC.
3693 * mem-break.c (struct raw_breakpoint): New.
3694 (enum bkpt_type): New type `gdb_breakpoint'.
3695 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3696 fields. New field `raw'.
3697 (find_raw_breakpoint_at): New.
3698 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3700 (set_breakpoint_at): Adjust.
3701 (delete_raw_breakpoint): New.
3702 (release_breakpoint): New.
3703 (delete_breakpoint): Rename to...
3704 (delete_breakpoint_1): ... this. Add proc parameter. Use
3705 release_breakpoint. Return ENOENT.
3706 (delete_breakpoint): Reimplement.
3707 (find_breakpoint_at): Delete.
3708 (find_gdb_breakpoint_at): New.
3709 (delete_breakpoint_at): Delete.
3710 (set_gdb_breakpoint_at): New.
3711 (delete_gdb_breakpoint_at): New.
3712 (gdb_breakpoint_here): New.
3713 (set_reinsert_breakpoint): Use release_breakpoint.
3714 (uninsert_breakpoint): Rename to ...
3715 (uninsert_raw_breakpoint): ... this.
3716 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3717 (reinsert_raw_breakpoint): Change parameter type to
3719 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3721 (check_breakpoints): Adjust. Use release_breakpoint.
3722 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3723 (breakpoint_inserted_here): Ditto.
3724 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3725 Don't trust the breakpoint's shadow if it is not inserted.
3726 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3727 (delete_all_breakpoints): Adjust.
3728 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3729 use delete_breakpoint_1.
3731 * mem-break.h (breakpoints_supported): Delete declaration.
3732 (set_gdb_breakpoint_at): Declare.
3733 (gdb_breakpoint_here): Declare.
3734 (delete_breakpoint_at): Delete.
3735 (delete_gdb_breakpoint_at): Declare.
3737 * server.h (struct raw_breakpoint): Forward declare.
3738 (struct process_info): New field `raw_breakpoints'.
3740 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3743 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3745 * linux-low.c (status_pending_p_callback): Fix comment.
3746 (linux_wait_for_event_1): Move most of the internal breakpoint
3747 handling from here...
3748 (linux_wait_1): ... to here.
3749 (count_events_callback): New.
3750 (select_singlestep_lwp_callback): New.
3751 (select_event_lwp_callback): New.
3752 (cancel_breakpoints_callback): New.
3753 (select_event_lwp): New.
3754 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3755 priority to all LWPs that have had events that should be reported
3756 to the client. Cancel breakpoints when about to reporting the
3757 event to the client, not while stopping lwps. No longer cancel
3758 finished single-steps here.
3759 (cancel_finished_single_step): Delete.
3760 (cancel_finished_single_steps): Delete.
3762 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3764 * mem-break.c (enum bkpt_type): New.
3765 (struct breakpoint): New field `type'.
3766 (set_breakpoint_at): Change return type to struct breakpoint
3767 pointer. Set type to `other_breakpoint' by default.
3768 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3769 in the breakpoint list.
3770 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3771 (reinsert_breakpoint): Rename to ...
3772 (reinsert_raw_breakpoint): ... this.
3773 (reinsert_breakpoints_at): Adjust.
3774 * mem-break.h (struct breakpoint): Declare.
3775 (set_breakpoint_at): Change return type to struct breakpoint
3778 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3780 * server.c (handle_query): Assign, not compare.
3782 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3784 Teach linux gdbserver to step-over-breakpoints.
3786 * linux-low.c (can_hardware_single_step): New.
3787 (supports_breakpoints): New.
3788 (handle_extended_wait): If stopping threads, read the stop pc of
3791 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3792 low target doesn't support retrieving the PC.
3793 (add_lwp): Set last_resume_kind to resume_continue.
3794 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3795 (linux_attach): Don't clear stop_expected. Set the lwp's
3796 last_resume_kind to resume_stop.
3797 (linux_detach_one_lwp): Don't check for removed breakpoints.
3798 (check_removed_breakpoint): Delete.
3799 (status_pending_p): Rename to ...
3800 (status_pending_p_callback): ... this. Don't check for removed
3801 breakpoints. Don't consider threads that are stopped from GDB's
3803 (linux_wait_for_lwp): Always read the stop_pc here.
3804 (cancel_breakpoint): New.
3805 (step_over_bkpt): New global.
3806 (linux_wait_for_event_1): Implement stepping over breakpoints.
3807 (gdb_wants_lwp_stopped): New.
3808 (gdb_wants_all_stopped): New.
3809 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3810 single-step traps here. Store the thread's last reported target
3812 (send_sigstop): Don't clear stop_expected. Always set it,
3814 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3815 (cancel_finished_single_step): New.
3816 (cancel_finished_single_steps): New.
3817 (wait_for_sigstop): Don't cancel finished single-step traps here.
3818 (linux_resume_one_lwp): Don't check for removed breakpoints.
3819 Don't set `step' on non-hardware step archs.
3820 (linux_set_resume_request): Ignore resume_stop requests if already
3821 stopping or stopped. Set the lwp's last_resume_kind.
3822 (resume_status_pending_p): Don't check for removed breakpoints.
3823 (need_step_over_p): New.
3824 (start_step_over): New.
3825 (finish_step_over): New.
3826 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3827 requests. Clear the thread's last reported target waitstatus.
3828 Don't use the `suspended' flag. Don't consider pending breakpoints.
3829 (linux_resume): Start a step-over if necessary.
3830 (proceed_one_lwp): New.
3831 (proceed_all_lwps): New.
3832 (unstop_all_lwps): New.
3833 * linux-low.h (struct lwp_info): Rewrite comment for the
3834 `suspended' flag. Add the `stop_pc' field. Delete the
3835 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3836 Add `'last_resume_kind' and `need_step_over' fields.
3837 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3838 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3839 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3840 (set_raw_breakpoint_at): New.
3841 (set_breakpoint_at): Rewrite to use it.
3842 (reinsert_breakpoint_handler): Delete.
3843 (set_reinsert_breakpoint): New.
3844 (reinsert_breakpoint_by_bp): Delete.
3845 (delete_reinsert_breakpoints): New.
3846 (uninsert_breakpoint): Rewrite.
3847 (uninsert_breakpoints_at): New.
3848 (reinsert_breakpoint): Rewrite.
3849 (reinsert_breakpoints_at): New.
3850 (check_breakpoints): Rewrite.
3851 (breakpoint_here): New.
3852 (breakpoint_inserted_here): New.
3853 (check_mem_read): Adjust.
3854 * mem-break.h (breakpoints_supported, breakpoint_here)
3855 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3856 (reinsert_breakpoint_by_bp): Delete declaration.
3857 (delete_reinsert_breakpoints): Declare.
3858 (reinsert_breakpoint): Delete declaration.
3859 (reinsert_breakpoints_at): Declare.
3860 (uninsert_breakpoint): Delete declaration.
3861 (uninsert_breakpoints_at): Declare.
3862 (check_breakpoints): Adjust prototype.
3863 * server.h: Adjust include order.
3864 (struct thread_info): Declare here. Add a `last_status' field.
3866 2010-03-23 Michael Snyder <msnyder@vmware.com>
3868 * server.c (crc32): New function.
3869 (handle_query): Add handling for 'qCRC:' request.
3871 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3873 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3874 lwp had been stopped by a watchpoint.
3876 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3878 * server.h (internal_error): Declare.
3879 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3880 * utils.c (internal_error): New function.
3882 2010-03-15 Andreas Schwab <schwab@redhat.com>
3884 * configure.srv: Fix typo setting srv_regobj.
3886 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3888 * linux-low.c (fetch_register): Avoid passing a non string literal
3890 (usr_store_inferior_registers): Ditto.
3892 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3894 * linux-low.c (linux_write_memory): Bail out early if peeking
3897 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3899 * linux-low.h (struct lwp_info): New fields
3900 `stopped_by_watchpoint' and `stopped_data_address'.
3901 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3902 here, and cache them in the lwp object.
3903 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3905 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3907 (linux_stopped_by_watchpoint): Rewrite.
3908 (linux_stopped_data_address): Rewrite.
3910 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3912 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3913 switching the current inferior, not before.
3915 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3917 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3918 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3919 i386-linux.c and amd64-linux.c.
3920 (reg-i386.o): Removed.
3921 (reg-i386.c): Likewise.
3922 (reg-i386-linux.o): Likewise.
3923 (reg-i386-linux.c): Likewise.
3924 (reg-x86-64.o): Likewise.
3925 (reg-x86-64.c): Likewise.
3926 (reg-x86-64-linux.o): Likewise.
3927 (reg-x86-64-linux.c): Likewise.
3930 (i386-linux.o): Likewise.
3931 (i386-linux.c): Likewise.
3932 (amd64.o): Likewise.
3933 (amd64.c): Likewise.
3934 (amd64-linux.o): Likewise.
3935 (amd64-linux.c): Likewise.
3937 * configure.srv (srv_i386_regobj): New.
3938 (srv_i386_linux_regobj): Likewise.
3939 (srv_amd64_regobj): Likewise.
3940 (srv_amd64_linux_regobj): Likewise.
3941 (srv_i386_32bit_xmlfiles): Likewise.
3942 (srv_i386_64bit_xmlfiles): Likewise.
3943 (srv_i386_xmlfiles): Likewise.
3944 (srv_amd64_xmlfiles): Likewise.
3945 (srv_i386_linux_xmlfiles): Likewise.
3946 (srv_amd64_linux_xmlfiles): Likewise.
3947 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3948 srv_xmlfiles to $srv_i386_xmlfiles.
3949 (i[34567]86-*-mingw32ce*): Likewise.
3950 (i[34567]86-*-mingw*): Likewise.
3951 (i[34567]86-*-nto*): Likewise.
3952 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3953 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3954 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3955 (x86_64-*-linux*): Likewise.
3957 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3958 (init_registers_amd64_linux): New.
3959 (x86_arch_setup): Replace init_registers_x86_64_linux with
3960 init_registers_amd64_linux.
3962 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3964 * configure.ac: Check for libdl. If it is not available link against
3965 static libthread_db.
3966 * configure: Regenerate.
3968 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3972 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3973 handing a read watchpoint.
3974 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3976 2010-02-12 Doug Evans <dje@google.com>
3978 * linux-low.c (linux_supports_tracefork_flag): Document.
3979 (linux_look_up_symbols): Add comment.
3981 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3983 * regcache.c (supply_register): Clear regcache if buf is NULL.
3985 2010-02-02 Nicolas Roche <roche@sourceware.org>
3986 Joel Brobecker <brobecker@adacore.com>
3988 * inferiors.c (find_inferior): Add function documentation.
3989 (unloaded_dll): Handle the case where the unloaded dll has not
3990 been previously registered in the dll list.
3992 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3994 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3995 (thumb2_breakpoint): New.
3996 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3998 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4000 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4001 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4004 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4006 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4008 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4010 * linux-s390-low.c (s390_collect_ptrace_register)
4011 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4013 2010-01-21 Doug Evans <dje@google.com>
4015 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4016 (PTRACE_ARG4_TYPE): New macro.
4017 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4018 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4019 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4020 (usr_store_inferior_registers): Ditto.
4021 (linux_read_memory, linux_write_memory): Ditto.
4022 (linux_test_for_tracefork): Ditto.
4024 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4025 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4027 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4029 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4032 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4034 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4035 prototype to take a regcache. Adjust.
4037 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4039 * regcache.h (struct thread_info): Forward declare.
4040 (struct regcache): New.
4041 (new_register_cache): Adjust prototype.
4042 (get_thread_regcache): Declare.
4043 (free_register_cache): Adjust prototype.
4044 (registers_to_string, registers_from_string): Ditto.
4045 (supply_register, supply_register_by_name, collect_register)
4046 (collect_register_as_string, collect_register_by_name): Ditto.
4047 * regcache.c (struct inferior_regcache_data): Delete.
4048 (get_regcache): Rename to ...
4049 (get_thread_regcache): ... this. Adjust. Switch inferior before
4051 (regcache_invalidate_one): Adjust.
4052 (regcache_invalidate): Fix prototype.
4053 (new_register_cache): Return the new register cache.
4054 (free_register_cache): Change prototype.
4055 (realloc_register_cache): Adjust.
4056 (registers_to_string): Change prototype to take a regcache. Adjust.
4057 (registers_from_string): Ditto.
4058 (register_data): Ditto.
4059 (supply_register): Ditto.
4060 (supply_register_by_name): Ditto.
4061 (collect_register): Ditto.
4062 (collect_register_as_string): Ditto.
4063 (collect_register_by_name): Ditto.
4064 * server.c (process_serial_event): Adjust.
4065 * linux-low.h (regset_fill_func, regset_store_func): Change
4067 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4069 * linux-low.c (get_stop_pc): Adjust.
4070 (check_removed_breakpoint): Adjust.
4071 (linux_wait_for_event): Adjust.
4072 (linux_resume_one_lwp): Adjust.
4073 (fetch_register): Add regcache parameter. Adjust.
4074 (usr_store_inferior_registers): Ditto.
4075 (regsets_fetch_inferior_registers): Ditto.
4076 (regsets_store_inferior_registers): Ditto.
4077 (linux_fetch_registers, linux_store_registers): Ditto.
4078 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4080 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4082 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4083 prototype to take a regcache.
4084 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4085 * remote-utils.c (convert_ascii_to_int, outreg)
4086 (prepare_resume_reply): Change prototype to take a regcache.
4088 * target.h (struct target_ops) <fetch_registers, store_registers>:
4089 Change prototype to take a regcache.
4090 (fetch_inferior_registers, store_inferior_registers): Change
4091 prototype to take a regcache. Adjust.
4092 * proc-service.c (ps_lgetregs): Adjust.
4093 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4094 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4095 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4096 take a regcache. Adjust.
4097 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4098 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4099 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4100 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4101 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4102 (cris_cannot_fetch_register):
4103 (cris_breakpoint_at): Change prototype to take a regcache.
4105 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4106 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4107 to take a regcache. Adjust.
4108 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4110 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4111 take a regcache. Adjust.
4112 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4113 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4114 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4115 * linux-mips-low.c (mips_get_pc):
4116 (mips_set_pc): Change prototype to take a regcache. Adjust.
4117 (mips_reinsert_addr): Adjust.
4118 (mips_collect_register): Change prototype to take a regcache.
4120 (mips_supply_register):
4121 (mips_collect_register_32bit, mips_supply_register_32bit)
4122 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4123 (mips_store_fpregset): Ditto.
4124 * linux-ppc-low.c (ppc_supply_ptrace_register)
4125 (ppc_supply_ptrace_register): Ditto.
4126 (parse_spufs_run): Adjust.
4127 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4128 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4129 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4130 take a regcache. Adjust.
4131 * linux-s390-low.c (s390_collect_ptrace_register)
4132 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4133 (s390_set_pc): Change prototype to take a regcache. Adjust.
4134 (s390_arch_setup): Adjust.
4135 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4136 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4137 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4138 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4139 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4141 (sparc_breakpoint_at): Adjust.
4142 * linux-xtensa-low.c (xtensa_fill_gregset):
4143 (xtensa_store_gregset):
4144 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4145 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4146 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4147 prototype to take a regcache. Adjust.
4148 * win32-arm-low.c (arm_fetch_inferior_register)
4149 (arm_store_inferior_register): Change prototype to take a
4151 * win32-i386-low.c (i386_fetch_inferior_register)
4152 (i386_store_inferior_register): Change prototype to take a
4154 * win32-low.c (child_fetch_inferior_registers)
4155 (child_store_inferior_registers): Change prototype to take a
4157 (win32_wait): Adjust.
4158 (win32_fetch_inferior_registers): Change prototype to take a
4160 (win32_store_inferior_registers): Adjust.
4161 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4162 store_inferior_register>: Change prototype to take a regcache.
4164 2010-01-20 Doug Evans <dje@google.com>
4166 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4168 (linux_wait_for_event1, linux_init_signals): Ditto.
4169 (W_STOPCODE): Provide definition if missing.
4171 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4173 * linux-low.c (linux_core_of_thread): New.
4174 (compare_ints, show_process, list_threads): New.
4175 (linux_qxfer_osdata): Report threads and cores.
4176 (linux_target_op): Register linux_core_of_thread.
4177 * remote-utils.c (prepare_resume_reply): Report the core.
4178 (buffer_xml_printf): Support %d specifier.
4179 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4181 (handle_query): Handle qXfer:threads. Announce availability
4183 * target.h (struct target_ops): New field core_of_thread.
4185 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4187 * Makefile.in (clean): Remove new generated files.
4188 (reg-s390.o, reg-s390.c): Remove rules.
4189 (reg-s390x.o, reg-s390x.c): Likewise.
4190 (s390-linux32.o, s390-linux32.c): Add rules.
4191 (s390-linux64.o, s390-linux64.c): Likewise.
4192 (s390x-linux64.o, s390x-linux64.c): Likewise.
4193 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4194 * linux-s390-low.c: Include <elf.h>.
4195 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4196 (init_registers_s390): Remove prototype.
4197 (init_registers_s390x): Likewise.
4198 (init_registers_s390_linux32): Add prototype.
4199 (init_registers_s390_linux64): Likewise.
4200 (init_registers_s390x_linux64): Likewise.
4201 (s390_num_regs_3264): New define.
4202 (s390_regmap_3264): New global variable.
4203 (s390_cannot_fetch_register): Remove obsolete check.
4204 (s390_cannot_store_register): Likewise.
4205 (s390_collect_ptrace_register): Handle upper/lower register halves.
4206 (s390_supply_ptrace_register): Likewise.
4207 (s390_fill_gregset): Update to register number changes.
4208 (s390_get_hwcap): New routine.
4209 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4210 Install appropriate regmap and register set.
4212 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4214 * server.c (gdbserver_version): Update copyright year to 2010.
4215 * gdbreplay.c (gdbreplay_version): Likewise.
4217 2009-12-28 Doug Evans <dje@google.com>
4219 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4220 elf/external.h. Include <elf.h> instead but only if necessary.
4222 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4224 * linux-low.c (linux_remove_process): Remove `detaching'
4225 parameter. Don't release/detach from thread_db here.
4226 (linux_kill): Release/detach from thread_db here, ...
4227 (linux_detach): ... and here, before actually detaching.
4228 (linux_wait_1): ... and here, when a process exits.
4229 * thread-db.c (any_thread_of): New.
4230 (thread_db_free): Switch the current inferior to a thread of the
4233 2009-12-21 Doug Evans <dje@google.com>
4235 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4237 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4238 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4239 warning ifndef __NR_tkill. Move setting of errno there too.
4240 Delete unnecessary resetting of errno after syscall.
4241 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4243 * configure.ac: Check for dladdr.
4244 * config.in: Regenerate.
4245 * configure: Regenerate.
4246 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4247 (try_thread_db_load): Update.
4249 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4251 2009-12-18 Doug Evans <dje@google.com>
4253 * event-loop.c: Include unistd.h if it exists.
4255 * linux-low.c (my_waitpid): Move definition away from being in
4256 between linux_tracefork_child/linux_test_for_tracefork.
4258 * gdb_proc_service.h (psaddr_t): Fix type.
4259 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4260 signature to match glibc.
4262 2009-12-16 Doug Evans <dje@google.com>
4264 * linux-low.c (linux_read_memory): Fix argument to read.
4266 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4268 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4269 events, don't leave current_inferior pointing at null.
4271 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4273 * win32-low.c (LOG): Delete.
4274 (OUTMSG): Output to stderr.
4275 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4276 on compile time LOG macro.
4277 (win32_wait): Fix debug output.
4279 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4281 * win32-low.c (win32_add_one_solib): If the dll name is
4282 "ntdll.dll", prepend the system directory to the dll path.
4284 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4286 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4288 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4289 Vladimir Prus <vladimir@codesourcery.com>
4291 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4292 * configure.ac: Check for __mcoldfire__ and set
4293 gdb_cv_m68k_is_coldfire.
4294 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4295 reg-cf.o and reg-m68k.o.
4296 * configure: Regenerated.
4298 2009-11-16 Pedro Alves <pedro@codesourcery.com>
4300 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4301 Pass it to thread_db_free.
4302 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4303 proper `detaching' argument to linux_remove_process.
4304 * linux-low.h (thread_db_free): Add `detaching' parameter.
4305 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4307 (thread_db_free): Add `detaching' parameter. Only
4308 call td_ta_clear_event if detaching from process.
4310 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4312 * thread-db.c (thread_db_free): Fix typo.
4314 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4317 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4319 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4321 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4322 with an i686 compiler.
4323 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4325 * configure: Rebuilt.
4327 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4331 * server.c (handle_search_memory_1): Correct read_addr initialization
4332 in loop for searching subsequent chunks.
4334 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4336 * configure.ac: New --with-libthread-db option.
4337 * thread-db.c: Allow direct dependence on libthread_db.
4338 (thread_db_free): Adjust.
4339 * config.in: Regenerate.
4340 * configure: Likewise.
4342 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4345 * thread-db.c (attach_thread): New function.
4346 (maybe_attach_thread): Return success/failure.
4347 (find_new_threads_callback): Adjust.
4348 (thread_db_find_new_threads): Loop until no new threads.
4350 2009-10-13 Pedro Alves <pedro@codesourcery.com>
4352 * proc-service.c (ps_lgetregs): Formatting.
4354 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4356 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4357 * configure.ac: Adjust.
4358 * linux-low.h (struct process_info_private): Move members to struct
4360 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4361 * linux-low.c (linux_remove_process): Adjust.
4362 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4363 * server.c (handle_query): Move code ...
4364 (handle_monitor_command): ... here. New function.
4365 * target.h (struct target_ops): New member.
4366 * thread-db.c (struct thread_db): New.
4367 (libthread_db_search_path): New variable.
4368 (thread_db_create_event, thread_db_enable_reporting)
4369 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4370 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4371 (try_thread_db_load_1, dladdr_to_soname): New functions.
4372 (try_thread_db_load, thread_db_load_search): New functions.
4373 (thread_db_init): Search for libthread_db.
4374 (thread_db_free): New function.
4375 (thread_db_handle_monitor_command): Likewise.
4376 * config.in: Regenerate.
4377 * configure: Regenerate.
4379 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4381 * spu-low.c (spu_kill): Wait for inferior to terminate.
4382 Call clear_inferiors.
4383 (spu_detach): Call clear_inferiors.
4385 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4387 * aclocal.m4: Regenerate.
4388 * config.in: Likewise.
4389 * configure: Likewise.
4391 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4393 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4394 (parse_spufs_run): New function.
4395 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4396 (ppc_breakpoint_at): Handle SPU breakpoints.
4398 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4400 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4401 (SPUFS_MAGIC): Define.
4402 (spu_enumerate_spu_ids): New function.
4403 (linux_qxfer_spu): New function.
4404 (linux_target_ops): Install linux_qxfer_spu.
4406 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4408 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4409 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4410 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4411 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4412 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4413 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4414 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4415 (init_registers_powerpc_cell32l): Add prototype.
4416 (init_registers_powerpc_cell64l): Likewise.
4417 (ppc_arch_setup): Detect Cell/B.E. architecture.
4419 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4421 * Makefile.in (datarootdir): New variable.
4423 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4425 * linux-low.c (linux_write_memory): Update debugging output.
4426 * Makefile.in (clean): Add new descriptions.
4427 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4428 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4429 * configure.srv: Add new files for arm*-*-linux*.
4430 * linux-arm-low.c: Add new declarations.
4431 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4432 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4433 (HWCAP_VFPv3D16): New.
4434 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4435 instead of __IWMMXT__.
4436 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4437 (arm_arch_setup): New.
4438 (target_regsets): Remove #ifdef. Add VFP regset.
4439 (the_low_target): Use arm_arch_setup.
4441 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4443 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4444 the main thread again.
4446 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4448 Adding Neutrino gdbserver.
4449 * configure: Regenerated.
4450 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4451 * configure.srv (i[34567]86-*-nto*): New target.
4452 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4453 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4454 (nto_comctrl) [__QNX__]: New function.
4455 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4457 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4459 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4462 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4463 Pedro Alves <pedro@codesourcery.com>
4465 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4466 don't support CONTEXT_EXTENDED_REGISTERS.
4467 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4468 (the_low_target): Install them.
4469 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4470 failing with ERROR_PIPE_NOT_CONNECTED.
4472 2009-06-30 Doug Evans <dje@google.com>
4473 Pierre Muller <muller@ics.u-strasbg.fr>
4475 Add h/w watchpoint support to x86-linux, win32-i386.
4476 * Makefile.in (SFILES): Add i386-low.c
4477 (i386_low_h): Define.
4478 (i386-low.o): Add dependencies.
4479 (linux-x86-low.o): Add i386-low.h dependency.
4480 (win32-i386-low.o): Ditto.
4481 * i386-low.c: New file.
4482 * i386-low.h: New file.
4483 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4484 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4485 * linux-low.c (linux_add_process): Initialize arch_private.
4486 (linux_remove_process): Free arch_private.
4487 (add_lwp): Initialize arch_private.
4488 (delete_lwp): Free arch_private.
4489 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4491 * linux-low.h (process_info_private): New member arch_private.
4492 (lwp_info): New member arch_private.
4493 (linux_target_ops): New members new_process, new_thread,
4495 (ptid_of): New macro.
4496 * linux-x86-low.c: Include stddef.h, i386-low.h.
4497 (arch_process_info): New struct.
4498 (arch_lwp_info): New struct.
4499 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4500 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4501 (i386_dr_low_get_status): New function.
4502 (x86_insert_point, x86_remove_point): New functions.
4503 (x86_stopped_by_watchpoint): New function.
4504 (x86_stopped_data_address): New function.
4505 (x86_linux_new_process, x86_linux_new_thread): New functions.
4506 (x86_linux_prepare_to_resume): New function.
4507 (the_low_target): Add entries for insert_point, remove_point,
4508 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4510 * server.c (debug_hw_points): New global.
4511 (monitor_show_help): Document set debug-hw-points.
4512 (handle_query): Process "set debug-hw-points".
4513 * server.h (debug_hw_points): Declare.
4514 (paddress): Declare.
4515 * utils.c (NUMCELLS, CELLSIZE): New macros.
4516 (get_sell, xsnprintf, paddress): New functions.
4517 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4518 remove_point, stopped_by_watchpoint, stopped_data_address.
4519 * win32-i386-low.c: Include i386-low.h.
4520 (debug_reg_state): Replaces dr.
4521 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4522 (i386_dr_low_get_status): New function.
4523 (i386_insert_point, i386_remove_point): New functions.
4524 (i386_stopped_by_watchpoint): New function.
4525 (i386_stopped_data_address): New function.
4526 (i386_initial_stuff): Update.
4527 (get_thread_context,set_thread_context,i386_thread_added): Update.
4528 (the_low_target): Add entries for insert_point,
4529 remove_point, stopped_by_watchpoint, stopped_data_address.
4530 * win32-low.c (win32_insert_watchpoint): New function.
4531 (win32_remove_watchpoint): New function.
4532 (win32_stopped_by_watchpoint): New function.
4533 (win32_stopped_data_address): New function.
4534 (win32_target_ops): Add entries for insert_watchpoint,
4535 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4536 * win32-low.h (win32_target_ops): New members insert_point,
4537 remove_point, stopped_by_watchpoint, stopped_data_address.
4539 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4541 * server.c (process_serial_event): Re-return unsupported, not
4542 error, if the type isn't recognized. Re-allow supporting only
4543 insert or remove packets. Also call require_running for
4544 breakpoints. Add missing break statement to default case. Tidy.
4545 * target.h (struct target_ops): Rename insert_watchpoint to
4546 insert_point, and remove_watchpoint to remove_point.
4548 * linux-low.h (struct linux_target_ops): Likewise.
4549 * linux-low.c (linux_insert_watchpoint): Rename to ...
4550 (linux_insert_point): ... this. Adjust.
4551 (linux_remove_watchpoint): Rename to ...
4552 (linux_remove_point): ... this. Adjust.
4553 (linux_target_ops): Adjust.
4554 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4555 (cris_insert_point): ... this.
4556 (cris_remove_watchpoint): Rename to ...
4557 (cris_remove_point): ... this.
4558 (the_low_target): Adjust.
4560 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4562 * server.c (handle_v_kill): Pass signal_pid to
4563 kill_inferior if multi_process is zero.
4565 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4567 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4568 * target.h (target_ops): Comment for *_watchpoint to make it clear
4569 the functions can get types '0' and '1'.
4571 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4573 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4574 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4575 * regcache.c (get_regcache): Likewise.
4576 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4577 * win32-low.c (child_fetch_inferior_registers): Remove check for
4580 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4581 Pedro Alves <pedro@codesourcery.com>
4583 * target.h (struct target_ops) <supports_multi_process>: New
4585 (target_supports_multi_process): New.
4586 * server.c (handle_query): Even if GDB reports support, only
4587 enable multi-process if the target also supports it. Report
4588 multi-process support only if the target backend supports it.
4589 * linux-low.c (linux_supports_multi_process): New function.
4590 (linux_target_ops): Install it as target_supports_multi_process
4593 2009-05-24 Doug Evans <dje@google.com>
4595 Global renaming of find_thread_pid to find_thread_ptid.
4596 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4597 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4598 All callers updated.
4600 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4601 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4604 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4605 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4606 (linux_resume_one_lwp): Ditto.
4608 2009-05-23 Doug Evans <dje@google.com>
4610 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4611 from struct inferior_list_entry * to struct lwp_info *.
4612 All callers updated.
4614 2009-05-13 Doug Evans <dje@google.com>
4616 * linux-x86-low.c: Don't include assert.h.
4617 (x86_siginfo_fixup): Use fatal, not assert.
4618 (x86_arch_setup): Fix comment.
4620 2009-05-12 Doug Evans <dje@google.com>
4622 Biarch support for i386/amd64 gdbserver.
4623 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4624 Add linux-x86-low.c.
4625 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4626 (linux-x86-low.o): Add.
4627 * linux-x86-64-low.c: Delete.
4628 * linux-i386-low.c: Delete.
4629 * linux-x86-low.c: New file.
4630 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4632 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4634 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4635 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4636 (linux_child_pid_to_exec_file): New function.
4637 (elf_64_header_p, elf_64_file_p): New functions.
4638 (siginfo_fixup): New function.
4639 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4640 give target a chance to convert layout.
4641 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4642 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4644 2009-05-07 Doug Evans <dje@google.com>
4646 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4647 (regsets_store_inferior_registers): Ditto.
4649 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4653 * linux-low.c (must_set_ptrace_flags): Delete.
4654 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4656 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4657 `lwp->must_set_ptrace_flags' instead.
4658 (linux_wait_for_event_1): Set ptrace options here.
4659 (linux_wait_1): ... not here.
4661 2009-04-30 Doug Evans <dje@google.com>
4663 * inferiors.c (started_inferior_callback): New function.
4664 (attached_inferior_callback): New function.
4665 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4666 * server.c (print_started_pid, print_attached_pid): New functions.
4667 (detach_or_kill_for_exit): New function.
4668 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4669 * server.h (have_started_inferiors_p): Declare.
4670 (have_attached_inferiors_p): Declare.
4672 * inferiors.c (remove_process): Fix memory leak, free process.
4673 * linux-low.c (linux_remove_process): New function.
4674 (linux_kill): Call it instead of remove_process.
4675 (linux_detach, linux_wait_1): Ditto.
4677 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4679 * configure.srv: Add x86 Windows CE target.
4681 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4683 * inferiors.c (get_thread_process): Make global.
4684 * server.h (get_thread_process): Add prototype.
4685 * thread-db.c (find_one_thread): Use get_thread_process
4686 instead of current_process.
4687 (thread_db_get_tls_address): Do not crash if called when
4688 thread layer is not yet initialized.
4690 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4692 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4693 * spu-low.c (current_tid): Rename to ...
4694 (current_ptid): ... this.
4695 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4696 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4697 ptid_get_lwp (current_ptid) instead of current_tid.
4698 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4699 instead of current_tid. Use find_process_pid to verify pid
4700 argument is valid. Pass proper argument to remove_process.
4701 (spu_thread_alive): Compare current_ptid instead of current_tid.
4702 (spu_resume): Likewise.
4704 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4706 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4709 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4711 Implement the multiprocess extensions, and add linux multiprocess
4714 * server.h (ULONGEST): Declare.
4715 (struct ptid, ptid_t): New.
4716 (minus_one_ptid, null_ptid): Declare.
4717 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4718 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4719 (struct inferior_list_entry): Change `id' type from unsigned from
4721 (struct sym_cache, struct breakpoint, struct
4722 process_info_private): Forward declare.
4723 (struct process_info): Declare.
4724 (current_process): Declare.
4725 (all_processes): Declare.
4726 (initialize_inferiors): Declare.
4727 (add_thread): Adjust to use ptid_t.
4728 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4729 (add_process, remove_process, find_thread_pid): Declare.
4730 (find_inferior_id): Adjust to use ptid_t.
4731 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4732 (multi_process): Declare.
4733 (push_event): Adjust to use ptid_t.
4734 (read_ptid, write_ptid): Declare.
4735 (prepare_resume_reply): Adjust to use ptid_t.
4736 (clear_symbol_cache): Declare.
4737 * inferiors.c (all_processes): New.
4738 (null_ptid, minus_one_ptid): New.
4739 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4740 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4741 (add_thread): Change unsigned long to ptid. Remove gdb_id
4743 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4744 (gdb_id_to_thread): Rename to ...
4745 (find_thread_pid): ... this. Change unsigned long to ptid.
4746 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4747 (loaded_dll, pull_pid_from_list): Adjust.
4748 (add_process, remove_process, find_process_pid)
4749 (get_thread_process, current_process, initialize_inferiors): New.
4750 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4751 (struct target_waitstatus) <related_pid>: Ditto.
4752 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4754 (struct target_ops) <join>: Add `pid' argument.
4755 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4756 (struct target_ops) <wait>: Add `ptid' field. Change return type
4758 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4759 (mywait): Add `ptid' argument. Change return type to ptid_t.
4760 (target_pid_to_str): Declare.
4761 * target.c (set_desired_inferior): Adjust to use ptids.
4762 (mywait): Add new `ptid' argument. Adjust.
4763 (target_pid_to_str): New.
4764 * mem-break.h (free_all_breakpoints): Declare.
4765 * mem-break.c (breakpoints): Delelete.
4766 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4767 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4768 to use per-process breakpoint list.
4769 (free_all_breakpoints): New.
4770 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4771 (symbol_cache, all_symbols_looked_up): Delete.
4773 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4775 (prepare_resume_reply): Change ptid argument's type from unsigned
4776 long to ptid_t. Adjust. Implement W;process and X;process.
4777 (free_sym_cache, clear_symbol_cache): New.
4778 (look_up_one_symbol): Adjust to per-process symbol cache. *
4779 * server.c (cont_thread, general_thread, step_thread): Change type
4782 (multi_process): New.
4783 (last_ptid): Change type to ptid_t.
4784 (struct vstop_notif) <ptid>: Change type to ptid_t.
4785 (queue_stop_reply, push_event): Change `ptid' argument's type to
4787 (discard_queued_stop_replies): Add `pid' argument.
4788 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4789 changes. Don't reference the `attached' global.
4790 (attach_inferior): Adjust to mywait interface changes.
4791 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4792 features. Handle and report "multiprocess+". Handle
4794 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4796 (handle_v_kill): New.
4797 (handle_v_stopped): Adjust to use target_pid_to_str.
4798 (handle_v_requests): Allow multiple attaches and runs when
4799 multiprocess extensions are in effect. Handle "vKill".
4800 (myresume): Adjust to use ptids.
4801 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4802 (handle_status): Adjust to discard_queued_stop_replies interface
4804 (first_thread_of, kill_inferior_callback)
4805 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4806 (main): Call initialize_inferiors. Adjust to use ptids, killing
4807 and detaching from all inferiors. Handle multiprocess packet
4809 * linux-low.h: Include gdb_proc_service.h.
4810 (struct process_info_private): New.
4811 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4812 <lwpid_of>: Use ptid_get_lwp.
4813 (get_lwp_thread): Adjust.
4814 (struct lwp_info): Add `dead' member.
4815 (find_lwp_pid): Declare.
4816 * linux-low.c (thread_db_active): Delete.
4817 (new_inferior): Adjust comment.
4818 (inferior_pid): Delete.
4819 (linux_add_process): New.
4820 (handle_extended_wait): Adjust.
4821 (add_lwp): Change unsigned long to ptid.
4822 (linux_create_inferior): Add process to processes table. Adjust
4823 to use ptids. Don't set new_inferior here.
4824 (linux_attach_lwp): Rename to ...
4825 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4826 it. Adjust to use ptids.
4827 (linux_attach_lwp): New.
4828 (linux_attach): Add process to processes table. Don't set
4830 (struct counter): New.
4831 (second_thread_of_pid_p, last_thread_of_process_p): New.
4832 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4834 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4835 processes. Remove process from process table.
4836 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4837 to multiple processes.
4838 (any_thread_of): New.
4839 (linux_detach): Add `pid' argument, and handle it. Remove process
4840 from processes table.
4841 (linux_join): Add `pid' argument. Handle it.
4842 (linux_thread_alive): Change unsighed long argument to ptid_t.
4843 Consider dead lwps as not being alive.
4844 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4845 threads we're not interested in.
4846 (same_lwp, find_lwp_pid): New.
4847 (linux_wait_for_lwp): Change `pid' argument's type from int to
4849 (linux_wait_for_event): Rename to ...
4850 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4851 from int to ptid_t. Adjust.
4852 (linux_wait_for_event): New.
4853 (linux_wait_1): Add `ptid' argument. Change return type to
4854 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4855 that exit from the process table.
4856 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4858 (mark_lwp_dead): New.
4859 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4860 stopping all threads, mark its main lwp as dead.
4861 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4863 (fetch_register, usr_store_inferior_registers)
4864 (regsets_fetch_inferior_registers)
4865 (regsets_store_inferior_registers, linux_read_memory)
4866 (linux_write_memory): Inline `inferior_pid'.
4867 (linux_look_up_symbols): Adjust to use per-process
4869 (linux_request_interrupt): Adjust to use ptids.
4870 (linux_read_auxv): Inline `inferior_pid'.
4871 (initialize_low): Don't reference thread_db_active.
4872 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4873 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4874 (ps_getpid): Return the pid of the current inferior.
4875 * thread-db.c (proc_handle, thread_agent): Delete.
4876 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4878 (find_one_thread): Change argument type to ptid_t. Adjust to
4880 (maybe_attach_thread): Adjust to per-process data and ptids.
4881 (thread_db_find_new_threads): Ditto.
4882 (thread_db_init): Ditto.
4883 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4884 processes table. Adjust to use ptids.
4885 (spu_kill, spu_detach): Adjust interface. Remove process from
4887 (spu_join, spu_thread_alive): Adjust interface.
4888 (spu_wait): Adjust interface. Remove process from processes
4889 table. Adjust to use ptids.
4890 * win32-low.c (current_inferior_tid): Delete.
4891 (current_inferior_ptid): New.
4892 (debug_event_ptid): New.
4893 (thread_rec): Take a ptid. Adjust.
4894 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4895 (child_delete_thread): Ditto.
4896 (do_initial_child_stuff): Add `attached' argument. Add process to
4898 (child_fetch_inferior_registers, child_store_inferior_registers):
4900 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4901 (win32_attach): Pass 1 to do_initial_child_stuff.
4902 (win32_kill): Adjust interface. Remove process from processes
4904 (win32_detach): Ditto.
4905 (win32_join): Adjust interface.
4906 (win32_thread_alive): Take a ptid.
4907 (win32_resume): Adjust to use ptids.
4908 (get_child_debug_event): Ditto.
4909 (win32_wait): Adjust interface. Remove exiting process from
4912 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4914 Non-stop mode support.
4916 * server.h (non_stop): Declare.
4917 (gdb_client_data, handler_func): Declare.
4918 (delete_file_handler, add_file_handler, start_event_loop):
4920 (handle_serial_event, handle_target_event, push_event)
4921 (putpkt_notif): Declare.
4922 * target.h (enum resume_kind): New.
4923 (struct thread_resume): Replace `step' field by `kind' field.
4924 (TARGET_WNOHANG): Define.
4925 (struct target_ops) <wait>: Add `options' argument.
4926 <supports_non_stop, async, start_non_stop>: New fields.
4927 (target_supports_non_stop, target_async): New.
4928 (start_non_stop): Declare.
4929 (mywait): Add `options' argument.
4930 * target.c (mywait): Add `options' argument. Print child exit
4932 (start_non_stop): New.
4933 * server.c (non_stop, own_buf, mem_buf): New globals.
4934 (struct vstop_notif): New.
4935 (notif_queue): New global.
4936 (queue_stop_reply, push_event, discard_queued_stop_replies)
4937 (send_next_stop_reply): New.
4938 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4940 (attach_inferior): In non-stop mode, don't wait for the target
4942 (handle_general_set): Handle QNonStop.
4943 (handle_query): When handling qC, return the current general
4944 thread, instead of the first thread of the list.
4945 (handle_query): If the backend supports non-stop mode, include
4946 QNonStop+ in the qSupported query response.
4947 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4949 (handle_v_attach, handle_v_run): Handle non-stop mode.
4950 (handle_v_stopped): New.
4951 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4952 (myresume): Adjust to use resume_kind. Handle non-stop.
4953 (queue_stop_reply_callback): New.
4954 (handle_status): Handle non-stop mode.
4955 (main): Clear non_stop flag on reconnection. Use the event-loop.
4956 Refactor serial protocol handling from here ...
4957 (process_serial_event): ... to this new function. When GDB
4958 selects any thread, select one here. In non-stop mode, wait until
4959 GDB acks all pending events before exiting.
4960 (handle_serial_event, handle_target_event): New.
4961 * remote-utils.c (remote_open): Install remote_desc in the event
4963 (remote_close): Remove remote_desc from the event loop.
4964 (putpkt_binary): Rename to...
4965 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4966 (putpkt_binary): New as wrapper around putpkt_binary_1.
4967 (putpkt_notif): New.
4968 (prepare_resume_reply): In non-stop mode, don't change the
4970 * event-loop.c: New.
4971 * Makefile.in (OBJ): Add event-loop.o.
4972 (event-loop.o): New rule.
4974 * linux-low.h (pid_of): Moved here.
4976 (get_lwp_thread): Use lwpid_of.
4977 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4978 * linux-low.c (pid_of): Delete.
4979 (inferior_pid): Use lwpid_of.
4980 (linux_event_pipe): New.
4981 (target_is_async_p): New.
4983 (handle_extended_wait): Use lwpid_of.
4984 (add_lwp): Don't set lwpid field.
4985 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4986 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4987 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4988 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4989 first. Adjust to linux_wait_for_event interface changes. Use
4991 (linux_detach): Don't delete the main lwp here.
4992 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4993 (status_pending_p): Don't consider explicitly suspended lwps.
4994 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4995 pointer. Add OPTIONS argument. Change return type to int. Use
4996 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4997 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4998 pointer. Add status pointer argument. Return a pid instead of a
4999 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5000 changes. In non-stop mode, don't switch to a random thread.
5001 (linux_wait): Rename to...
5002 (linux_wait_1): ... this. Add target_options argument, and handle
5003 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5004 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5005 clean exit and signal exit code. Don't stop all threads in
5006 non-stop mode. In all-stop mode, only stop all threads when
5007 reporting a stop to GDB. Handle explicit thread stop requests.
5008 (async_file_flush, async_file_mark): New.
5010 (send_sigstop): Use lwpid_of.
5011 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5012 interface changes. In non-stop mode, don't switch to a random
5014 (linux_resume_one_lwp): Use lwpid_of.
5015 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5016 (linux_resume_one_thread): ... this. Handle resume_stop. In
5017 non-stop mode, don't look for pending flag in all threads.
5018 (resume_status_pending_p): Don't consider explicitly suspended
5020 (my_waitpid): Reimplement. Emulate __WALL.
5021 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5023 (sigchld_handler, linux_supports_non_stop, linux_async)
5024 (linux_start_non_stop): New.
5025 (linux_target_ops): Register linux_supports_non_stop, linux_async
5026 and linux_start_non_stop.
5027 (initialize_low): Install SIGCHLD handler.
5028 * thread-db.c (thread_db_create_event, find_one_thread)
5029 (thread_db_get_tls_address): Use lwpid_of.
5030 * win32-low.c (win32_detach): Adjust to use resume_kind.
5031 (win32_wait): Add `options' argument.
5032 * spu-low.c (spu_resume): Adjust to use resume_kind.
5033 (spu_wait): Add `options' argument.
5035 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5037 Decouple target code from remote protocol.
5039 * target.h (enum target_waitkind): New.
5040 (struct target_waitstatus): New.
5041 (struct target_ops) <wait>: Return an unsigned long. Take a
5042 target_waitstatus pointer instead of a char pointer.
5044 * target.c (mywait): Change prototype to return an unsigned long.
5045 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5046 * server.h (thread_from_wait, old_thread_from_wait): Delete
5048 (prepare_resume_reply): Change prototype to take a
5050 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5051 (last_status, last_ptid): New.
5052 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5053 pid instead of a signal.
5054 (attach_inferior): Remove "status" and "signal" parameters.
5056 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5058 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5059 (handle_v_requests, myresume): Remove "status" and "signal"
5061 (handle_status): New.
5062 (main): Delete local `status'. Adjust.
5063 * remote-utils.c: Include target.h.
5064 (prepare_resume_reply): Change prototype to take a
5065 target_waitstatus. Adjust.
5067 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5069 * spu-low.c (spu_wait): Adjust.
5070 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5072 (win32_wait): Adjust.
5074 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5076 * target.h (struct thread_resume): Delete leave_stopped member.
5077 (struct target_ops): Add a `n' argument to the `resume' callback.
5078 * server.c (start_inferior): Adjust.
5079 (handle_v_cont, myresume): Adjust.
5080 * linux-low.c (check_removed_breakpoint): Adjust to resume
5081 interface change, and to removed leave_stopped field.
5082 (resume_ptr): Delete.
5083 (struct thread_resume_array): New.
5084 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5085 resume interface change.
5086 (linux_continue_one_thread, linux_queue_one_thread)
5087 (resume_status_pending_p): Check if the resume field is NULL
5088 instead of checking the leave_stopped member.
5089 (linux_resume): Adjust to the target resume interface change.
5090 * spu-low.c (spu_resume): Adjust to the target resume interface
5092 * win32-low.c (win32_detach, win32_resume): Ditto.
5094 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5096 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5098 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5100 (linux_continue_one_thread): Only preserve the stepping flag if
5101 there's a pending breakpoint.
5103 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5105 * server.c (main): After the inferior having exited, call
5106 remote_close before exiting gdbserver.
5108 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5110 Fix size of FPSCR in Power 7 processors.
5111 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5112 (PPC_FEATURE_HAS_DFP): New #define.
5113 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5116 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5118 * server.c (handle_query) Whitespace and formatting.
5120 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5122 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5123 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5124 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5125 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5126 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5127 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5128 Makefile.in, configure.ac: Fix whitespace throughout.
5129 * configure: Regenerate.
5131 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5133 * inferiors.c (find_inferior): Make it safe for the callback
5134 function to delete the currently iterated inferior.
5136 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5138 * Makefile.in (linuw_low_h): Move higher.
5139 (thread-db.o): Depend on $(linux_low_h).
5141 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5143 Rename "process" to "lwp" throughout.
5145 * linux-low.c (all_processes): Rename to...
5146 (all_lwps): ... this.
5147 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5148 (add_process): Rename to ...
5149 (add_lwp): ... this. Adjust.
5150 (linux_create_inferior): Adjust.
5151 (linux_attach_lwp): Adjust.
5152 (linux_attach): Adjust.
5153 (linux_kill_one_process): Rename to ...
5154 (linux_kill_one_lwp): ... this. Adjust.
5155 (linux_kill): Adjust.
5156 (linux_detach_one_process): Rename to ...
5157 (linux_detach_one_lwp): ... this. Adjust.
5158 (linux_detach): Adjust.
5159 (check_removed_breakpoint): Adjust.
5160 (status_pending_p): Adjust.
5161 (linux_wait_for_process): Rename to ...
5162 (linux_wait_for_lwp): ... this. Adjust.
5163 (linux_wait_for_event): Adjust.
5164 (send_sigstop): Adjust.
5165 (wait_for_sigstop): Adjust.
5166 (stop_all_processes): Rename to ...
5167 (stop_all_lwps): ... this.
5168 (linux_resume_one_process): Rename to ...
5169 (linux_resume_one_lwp): ... this. Adjust.
5170 (linux_set_resume_request, linux_continue_one_thread)
5171 (linux_queue_one_thread, resume_status_pending_p)
5172 (usr_store_inferior_registers, regsets_store_inferior_registers)
5173 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5175 * linux-low.h (get_process): Rename to ...
5176 (get_lwp): ... this. Adjust.
5177 (get_thread_process): Rename to ...
5178 (get_thread_lwp): ... this. Adjust.
5179 (get_process_thread): Rename to ...
5180 (get_lwp_thread): ... this. Adjust.
5181 (struct process_info): Rename to ...
5182 (struct lwp_info): ... this.
5183 (all_processes): Rename to ...
5184 (all_lwps): ... this.
5185 * proc-service.c (ps_lgetregs): Adjust.
5186 * thread-db.c (thread_db_create_event, find_one_thread)
5187 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5189 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5191 * server.c (handle_query): Handle "qAttached".
5193 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5195 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5196 GPLv3, update license URL.
5198 2009-03-01 Doug Evans <dje@google.com>
5200 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5201 (server_h): Add gdb_signals.h.
5202 (signals.o): Update.
5203 * server.h (target_signal_from_host,target_signal_to_host_p)
5204 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5206 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5208 * remote-utils.c (getpkt): Also generate remote-debug
5209 information if noack_mode is set.
5211 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5213 * server.c (handle_query): Report qXfer:siginfo:read and
5214 qXfer:siginfo:write as supported and handle them.
5215 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5216 * linux-low.c (linux_xfer_siginfo): New.
5217 (linux_target_ops): Set it.
5219 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5221 * server.c (gdbserver_usage): Mention --remote-debug.
5222 (main): Accept '--remote-debug' switch.
5224 2009-01-18 Doug Evans <dje@google.com>
5226 * regcache.c (new_register_cache): No need to check result of xcalloc.
5227 * server.c (handle_search_memory): Back out calls to xmalloc,
5228 result is checked and error is returned to user upon failure.
5229 (handle_query): Ditto. Add more checks for result of malloc.
5230 (handle_v_cont): Check result of malloc, report error back to
5232 (handle_v_run): Ditto. Call freeargv.
5233 * server.h (freeargv): Declare.
5234 * utils.c (freeargv): New fn.
5236 2009-01-15 Doug Evans <dje@google.com>
5238 * gdbreplay.c (perror_with_name): Make arg const char *.
5239 * server.h (target_signal_to_name): Make return type const char *.
5240 * thread-db.c (thread_db_err_str): Make return type const char *.
5241 * utils.c (perror_with_name): Make arg const char *.
5243 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5245 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5246 when handling a EXIT_PROCESS_DEBUG_EVENT.
5248 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5250 * gdbreplay.c (gdbreplay_version): Update copyright year.
5251 * server.c (gdbserver_version): Likewise.
5253 2009-01-05 Doug Evans <dje@google.com>
5255 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5256 (handle_extended_wait): Improve comment.
5258 2008-12-13 Doug Evans <dje@google.com>
5260 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5261 * server.h (ATTR_MALLOC): New macro.
5262 (xmalloc,xcalloc,xstrdup): Declare.
5263 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5264 * inferiors.c: Ditto.
5265 * linux-low.c: Ditto.
5266 * mem-break.c: Ditto.
5267 * regcache.c: Ditto.
5268 * remote-utils.c: Ditto.
5271 * win32-low.c: Ditto.
5273 2008-12-12 Doug Evans <dje@google.com>
5275 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5276 in debugging printf.
5278 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5280 2008-12-09 Doug Evans <dje@google.com>
5282 * linux-low.h (struct process_info): Delete member tid, unused.
5283 * thread-db.c (find_one_thread): Update.
5284 (maybe_attach_thread): Update.
5286 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5288 * target.h (struct target_ops): Add qxfer_osdata member.
5289 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5291 (linux_qxfer_osdata): New functions.
5292 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5294 * server.c (handle_query): Handle "qXfer:osdata:read:".
5295 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5296 (buffer_xml_printf): New functions.
5297 * server.h (struct buffer): New.
5298 (buffer_grow_str, buffer_grow_str0): New macros.
5299 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5300 (buffer_xml_printf): Declare.
5302 2008-11-24 Doug Evans <dje@google.com>
5304 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5306 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5308 * server.c (handle_v_run): Always use the supplied argument list.
5310 2008-11-19 Bob Wilson <bob.wilson@acm.org>
5312 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5313 (xtensa_regmap_table): Add entry for scompare1.
5315 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5317 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5318 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5319 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5320 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5321 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5322 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5323 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5324 XML target descriptions.
5325 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5326 when inferior is running on an ISA 2.05 or later processor. Add
5327 special case to return offset for full 64-bit slot of FPSCR when
5330 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5332 * Makefile.in (SFILES, clean): Added sparc64 files.
5333 (reg-sparc64.o, reg-sparc64.c): New.
5334 * configure.srv (sparc*-*-linux*): New configuration.
5335 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5336 syscall arguments for SPARC.
5337 (regsets_store_inferior_registers): Likewise.
5338 * linux-sparc-low.c: New file.
5340 2008-10-21 Doug Evans <dje@google.com>
5342 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5343 (READLINE_DIR,READLINE_DEP): Delete.
5344 (INTERNAL_CFLAGS): Update.
5345 (LINTFLAGS): Update.
5347 2008-10-10 Pedro Alves <pedro@codesourcery.com>
5349 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5350 whole argv from the last run, not just argv[0].
5352 2008-09-08 Pedro Alves <pedro@codesourcery.com>
5354 * regcache.c (new_register_cache): Return NULL if the register
5355 cache size isn't known yet.
5356 (free_register_cache): Avoid dereferencing a NULL regcache.
5358 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5360 * configure.srv: Merge MIPS and MIPS64.
5362 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5364 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5366 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
5368 * Makefile.in: Add required vsx dependencies.
5370 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5371 Declare init_registers_powerpc_vsx32l.
5372 Declare init_registers_powerpc_vsx64l.
5373 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5374 (ppc_arch_setup): Check for VSX in hwcap.
5375 (ppc_fill_vsxregset): New function.
5376 (ppc_store_vsxregset): New function.
5377 Add new VSX entry in regset_info target_regsets.
5379 * configure.srv: Add new VSX dependencies.
5381 2008-08-12 Pedro Alves <pedro@codesourcery.com>
5383 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5384 (remote_open): Set or clear transport_is_reliable.
5385 (putpkt_binary): Don't expect acks in noack mode.
5386 (getpkt): Don't send ack/nac in noack mode.
5387 * server.c (handle_general_set): Handle QStartNoAckMode.
5388 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5390 (main): Reset noack_mode on every connection.
5391 * server.h (noack_mode): Declare.
5393 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5395 * Makefile.in (GDBREPLAY_OBS): New variable.
5396 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5398 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5399 Daniel Jacobowitz <dan@codesourcery.com>
5401 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5402 (usr_store_inferior_registers): Likewise.
5403 (regsets_store_inferior_registers): Likewise.
5405 2008-07-31 Rolf Jansen <rj@surtec.com>
5406 Pedro Alves <pedro@codesourcery.com>
5408 * configure.ac: Check for memmem declaration.
5409 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5410 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5411 (disable_packet_qfThreadInfo): Unconditionally compile.
5412 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5413 * configure, config.in: Regenerate.
5415 2008-07-28 Doug Kwan <dougkwan@google.com>
5417 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5418 (linux_write_memory): Remove declaration of errno.
5420 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5422 * linux-low.c (handle_extended_wait): Do not use "status"
5423 variable uninitialized.
5425 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5427 * server.c (handle_v_attach): Inhibit reporting dll changes.
5429 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5431 * remote-utils.c (prepare_resume_reply): If requested, don't
5432 output "thread:TID" in the T stop reply.
5434 * server.c (disable_packet_vCont, disable_packet_Tthread)
5435 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5436 (handle_query): If requested, disable support for qC, qfThreadInfo
5438 (handle_v_requests): If requested, disable support for vCont.
5439 (gdbserver_show_disableable): New.
5440 (main): Handle --disable-packet and --disable-packet=LIST.
5442 * server.h (disable_packet_vCont, disable_packet_Tthread)
5443 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5445 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5447 * server.c (gdbserver_usage): Mention --version.
5449 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5451 * Makefile.in (gdbreplay.o): New rule.
5453 2008-06-06 Joseph Myers <joseph@codesourcery.com>
5455 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5456 message, not gdbserver.
5458 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5459 Nathan Sidwell <nathan@codesourcery.com>
5460 Joseph Myers <joseph@codesourcery.com>
5462 * acinclude.m4: Include ../../config/acx.m4.
5463 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5464 * configure, config.in: Regenerate.
5465 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5466 * server.c (gdbserver_version): Print PKGVERSION.
5467 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5468 (main): Adjust gdbserver_usage calls.
5469 * gdbreplay.c (version, host_name): Add declarations.
5470 (gdbreplay_version, gdbreplay_usage): New.
5471 (main): Accept --version and --help options.
5473 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5475 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5476 (arm_breakpoint_at): Handle Thumb.
5477 (the_low_target): Add comment.
5479 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5481 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5483 2008-05-09 Doug Evans <dje@google.com>
5485 * server.h (decode_search_memory_packet): Declare.
5486 * remote-utils.c (decode_search_memory_packet): New fn.
5487 * server.c (handle_search_memory_1): New fn.
5488 (handle_search_memory): New fn.
5489 (handle_query): Process qSearch:memory packets.
5491 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5493 * regcache.c (registers_length): Remove.
5494 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5495 full register packet.
5496 * regcache.h (registers_length): Remove prototype.
5497 * server.h (PBUFSIZ): Define to 16384.
5499 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5501 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5502 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5503 powerpc-64l.o, and powerpc-altivec64l.o.
5504 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5505 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5506 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5507 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5508 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5511 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5512 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5513 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5514 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5515 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5516 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5517 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5518 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5519 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5520 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5523 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5524 (init_registers_powerpc_32l): ... this new prototype.
5525 (init_registers_powerpc_32): Remove, replace by ...
5526 (init_registers_powerpc_altivec32l): ... this new prototype.
5527 (init_registers_powerpc_e500): Remove, replace by ...
5528 (init_registers_powerpc_e500l): ... this new prototype.
5529 (init_registers_ppc64): Remove, replace by ...
5530 (init_registers_powerpc_64l): ... this new prototype.
5531 (init_registers_powerpc_64): Remove, replace by ...
5532 (init_registers_powerpc_altivec64l): ... this new prototype.
5533 (ppc_num_regs): Set to 73.
5534 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5535 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5536 (ppc_cannot_store_register): Handle orig_r3 and trap.
5537 (ppc_arch_setup): Update init_registers_... calls.
5538 (ppc_fill_gregset): Handle orig_r3 and trap.
5540 * inferiors.c (clear_inferiors): Reset current_inferior.
5542 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5544 * acinclude.m4: Add override.m4.
5545 * configure: Regenerate.
5547 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5549 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5550 initial call to init_register_ppc64.
5552 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5554 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5555 single powerpc*-*-linux* case.
5556 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5558 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5560 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5561 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5563 * linux-ppc-low.c: Include <elf.h>.
5564 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5565 (ppc_hwcap): New global variable.
5566 (ppc_regmap): Remove __SPE__ #ifdef sections.
5567 (ppc_regmap_e500): New global variable.
5568 (ppc_cannot_store_register): Update __SPE__ special case.
5569 (ppc_get_hwcap): New function.
5570 (ppc_arch_setup): Use it to determine whether inferior supports
5571 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5572 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5573 Do not access registers if target does not support AltiVec.
5574 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5575 Do not access registers if target does not support SPE.
5576 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5578 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5580 * linux-low.c (disabled_regsets, num_regsets): New.
5581 (use_regsets_p): Delete.
5582 (linux_wait_for_process): Clear disabled_regsets.
5583 (regsets_fetch_inferior_registers): Check and set it.
5584 (regsets_store_inferior_registers): Likewise.
5585 (linux_fetch_registers, linux_store_registers): Do not use
5587 (initialize_low): Allocate disabled_regsets.
5589 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5591 * Makefile.in (LIBOBJS): New.
5593 (memmem.o): New rule.
5594 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5595 * configure: Regenerated.
5597 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5599 * server.c (handle_query): Never return "unsupported" for
5600 qXfer:features:read queries.
5602 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5604 * server.c (get_features_xml): Fix inverted condition.
5605 (handle_query): Always support qXfer:feature:read.
5607 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5609 * server.c (wrapper_argv): New.
5610 (start_inferior): Handle wrapper_argv. If set, expect an extra
5612 (gdbserver_usage): Document --wrapper.
5613 (main): Parse --wrapper.
5615 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5617 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5618 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5619 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5620 (ppc_set_pc): Likewise.
5621 (ppc_arch_setup): New function.
5622 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5623 of collect_register.
5624 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5626 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5628 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5629 instead of linux-ppc64-low.o.
5630 * linux-ppc64-low.c: Remove file.
5631 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5632 (linux-ppc64-low.o): Remove rule.
5634 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5635 (init_registers_powerpc_64): Likewise.
5636 (ppc_regmap): Conditionally define depending on __powerpc64__.
5637 (ppc_cannot_store_register): Do not special-case "fpscr" when
5638 compiled on __powerpc64__.
5639 (ppc_collect_ptrace_register): New function.
5640 (ppc_supply_ptrace_register): New function.
5641 (ppc_breakpoint): Change type to "unsigned int".
5642 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5643 (the_low_target): Conditionally provide initializers for the
5644 arch_setup member depending on __powerpc64__. Install
5645 collect_ptrace_register and supply_ptrace_register members.
5647 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5649 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5650 * server.c (gdbserver_xmltarget): Define.
5651 (get_features_xml): Use it to replace "target.xml" and arch_string.
5653 * configure.srv: Remove srv_xmltarget. Add XML files that were
5654 mentioned there to srv_xmlfiles instead. Remove conditional tests
5655 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5656 srv_xmlfiles and srv_regobj to include all possible choices.
5657 * configure.ac (srv_xmltarget): Remove.
5658 (srv_xmlfiles): Do not add "target.xml".
5659 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5660 checks for supplementary target information.
5661 * configure: Regenerate.
5662 * Makefile.in (XML_TARGET): Remove.
5663 (target.xml): Remove rule.
5664 (clean): Do not clean up target.xml.
5665 (.PRECIOUS): Do not mention target.xml.
5667 * target.h (struct target_ops): Remove arch_string member.
5668 * linux-low.c (linux_arch_string): Remove.
5669 (linux_target_ops): Remove arch_string initializer.
5670 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5671 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5672 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5673 * spu-low.c (spu_arch_string): Remove.
5674 (spu_target_ops): Remove arch_string initializer.
5675 * win32-low.c (win32_arch_string): Remove.
5676 (win32_target_ops): Remove arch_string initializer.
5677 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5678 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5679 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5681 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5683 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5684 by collect_ptrace_register and supply_ptrace_register hooks.
5685 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5686 instead of checking for the_low_target.left_pad_xfer.
5687 (usr_store_inferior_registers): Use collect_ptrace_register callback
5688 instead of checking for the_low_target.left_pad_xfer.
5690 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5691 (s390_supply_ptrace_register): Likewise.
5692 (s390_fill_gregset): Call s390_collect_ptrace_register.
5693 (the_low_target): Update.
5695 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5696 (ppc_supply_ptrace_register): Likewise.
5697 (the_low_target): Update.
5699 * linux-i386-low.c (the_low_target): Update.
5700 * linux-x86-64-low.c (the_low_target): Update.
5702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5704 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5705 reg-s390.o and reg-s390x.o.
5707 * linux-low.c (new_inferior): New global variable.
5708 (linux_create_inferior, linux_attach): Set it.
5709 (linux_wait_for_process): Call the_low_target.arch_setup after the
5710 target has stopped for the first time.
5711 (initialize_low): Do not call the_low_target.arch_setup.
5713 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5714 (s390_set_pc): Likewise.
5715 (s390_arch_setup): New function.
5716 (the_low_target): Use s390_arch_setup as arch_setup routine.
5718 * regcache.c (realloc_register_cache): New function.
5719 (set_register_cache): Call it for each existing regcache.
5721 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5723 * server.h (init_registers): Remove prototype.
5725 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5726 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5727 instead of init_registers ().
5728 * linux-arm-low.c (init_registers_arm): Add prototype.
5729 (init_registers_arm_with_iwmmxt): Likewise.
5730 (the_low_target): Add initializer for arch_setup field.
5731 * linux-cris-low.c (init_registers_cris): Add prototype.
5732 (the_low_target): Add initializer for arch_setup field.
5733 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5734 (the_low_target): Add initializer for arch_setup field.
5735 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5736 (the_low_target): Add initializer for arch_setup field.
5737 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5738 (the_low_target): Add initializer for arch_setup field.
5739 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5740 (the_low_target): Add initializer for arch_setup field.
5741 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5742 (the_low_target): Add initializer for arch_setup field.
5743 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5744 (init_registers_mips64_linux): Likewise.
5745 (the_low_target): Add initializer for arch_setup field.
5746 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5747 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5748 (the_low_target): Add initializer for arch_setup field.
5749 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5750 (init_registers_powerpc_64): Likewise.
5751 (the_low_target): Add initializer for arch_setup field.
5752 * linux-s390-low.c (init_registers_s390): Add prototype.
5753 (init_registers_s390x): Likewise.
5754 (the_low_target): Add initializer for arch_setup field.
5755 * linux-sh-low.c (init_registers_sh): Add prototype.
5756 (the_low_target): Add initializer for arch_setup field.
5757 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5758 (the_low_target): Add initializer for arch_setup field.
5759 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5760 (the_low_target): Add initializer for arch_setup field.
5762 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5763 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5764 instead of init_registers ().
5765 * win32-arm-low.c (init_registers_arm): Add prototype.
5766 (the_low_target): Add initializer for arch_setup field.
5767 * win32-i386-low.c (init_registers_i386): Add prototype.
5768 (the_low_target): Add initializer for arch_setup field.
5770 * spu-low.c (init_registers_spu): Add prototype.
5771 (initialize_low): Call initialie_registers_spu () instead of
5772 initialize_registers ().
5774 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5776 * server.c (handle_v_requests): When handling the vRun and vAttach
5777 packets, if already debugging a process, don't kill it. Return an
5780 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5782 * server.c (handle_query): Correct length check.
5784 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5786 * win32-low.c (do_initial_child_stuff): Add process handle
5787 parameter. Set current_process_handle and current_process_id from the
5788 parameters. Clear globals.
5789 (win32_create_inferior): Don't set current_process_handle and
5790 current_process_id here. Instead pass them on the call to
5791 do_initial_child_stuff.
5792 (win32_attach): Likewise.
5793 (win32_clear_inferiors): New.
5794 (win32_kill): Don't close the current process handle or the
5795 current thread handle here. Instead call win32_clear_inferiors.
5796 (win32_detach): Don't open a new handle to the process. Call
5797 win32_clear_inferiors.
5798 (win32_join): Don't rely on current_process_handle; open a new
5799 handle using the process id.
5800 (win32_wait): Call win32_clear_inferiors when the inferior process
5803 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5805 * server.c (monitor_show_help): Add "exit".
5807 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5809 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5810 (clean): Add reg-xtensa.c.
5811 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5812 * configure.srv (xtensa*-*-linux*) New target.
5813 * linux-xtensa-low.c: New.
5814 * xtensa-xtregs.c: New.
5816 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5818 * hostio.c: Don't include errno.h.
5819 (errno_to_fileio_errno): Move to hostio-errno.
5820 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5821 error number outputting to the target->hostio_last_error callback.
5822 (hostio_packet_error): Use FILEIO_EINVAL directly.
5823 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5824 calls to hostio_error.
5825 * hostio-errno.c: New.
5826 * server.h (hostio_last_error_from_errno): Declare.
5827 * target.h (target_ops): Add hostio_last_error member.
5828 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5829 as hostio_last_error handler.
5830 * spu-low.c (spu_target_ops): Likewise.
5831 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5832 (wince_hostio_last_error): New functions.
5833 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5834 as hostio_last_error handler.
5835 (win32_target_ops) [!_WIN32_WCE]: Register
5836 hostio_last_error_from_errno as hostio_last_error handler.
5837 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5838 (hostio-errno.o): New rule.
5839 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5840 * configure.srv (srv_hostio_err_objs): New variable. Default to
5842 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5843 * configure: Regenerate.
5845 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5847 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5848 (linux_kill, linux_detach): Clean up the process list.
5849 * remote-utils.c (remote_open): Improve port number parsing.
5850 (putpkt_binary, input_interrupt): Only send interrupts if the target
5852 * server.c (extended_protocol): Make static.
5853 (attached): Define earlier.
5854 (exit_requested, response_needed, program_argv): New variables.
5855 (target_running): New.
5856 (start_inferior): Clear attached here.
5857 (attach_inferior): Set attached here.
5858 (require_running): Define.
5859 (handle_query): Use require_running and target_running. Implement
5861 (handle_v_attach, handle_v_run): New.
5862 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5863 (gdbserver_usage): Update.
5864 (main): Redo argument parsing. Handle --debug and --multi. Handle
5865 --attach along with other options or after the port. Save
5866 program_argv. Support no initial program. Resynchronize
5867 communication with GDB after an error. Handle "monitor exit".
5868 Use require_running and target_running. Always allow the extended
5869 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5870 restart in extended mode.
5871 * README: Refer to the GDB manual. Update --attach usage.
5873 2007-12-20 Andreas Schwab <schwab@suse.de>
5875 * linux-low.c (STACK_SIZE): Define.
5876 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5877 (linux_test_for_tracefork): Likewise.
5879 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5881 * linux-low.c (linux_wait_for_event): Update messages. Do not
5882 reinsert auto-delete breakpoints.
5883 * mem-break.c (struct breakpoint): Change return type of handler to
5885 (set_breakpoint_at): Update handler type.
5886 (reinsert_breakpoint_handler): Return 1 instead of calling
5888 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5890 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5891 * mem-break.h (set_breakpoint_at): Update handler type.
5892 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5893 * win32-low.c (auto_delete_breakpoint): New.
5894 (get_child_debug_event): Use it.
5896 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5898 * configure.ac: Check for pread and pwrite.
5899 * hostio.c (handle_pread): Fall back to lseek and read.
5900 (handle_pwrite): Fall back to lseek and write.
5901 * config.in, configure: Regenerated.
5903 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5905 * server.c (myresume): Add own_buf argument.
5906 (main): Update calls.
5908 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5910 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5911 * remote-utils.c (remote_open): Do not call disable_async_io.
5912 (block_async_io): Delete.
5913 (unblock_async_io): Make static.
5914 (initialize_async_io): New.
5915 * server.c (handle_v_cont): Handle async I/O here.
5916 (myresume): Likewise. Move other common resume tasks here...
5917 (main): ... from here. Call initialize_async_io. Disable async
5918 I/O before the main loop.
5919 * server.h (initialize_async_io): Declare.
5920 (block_async_io, unblock_async_io): Delete prototypes.
5921 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5923 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5925 * remote-utils.c (readchar): Allow binary data in received messages.
5927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5929 * win32-low.c (attaching): New global.
5930 (win32_create_inferior): Clear the `attaching' global.
5931 (win32_attach): Set the `attaching' global.
5932 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5933 attaching. Only set a breakpoint at the entry point if not
5936 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5938 * server.c (main): Don't report dll events on the initial
5939 connection on attaches.
5941 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5943 * server.c (main): Relax numerical bases supported for the pid of
5944 the --attach command line argument.
5946 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5948 * win32-low.c (win32_attach): Call OpenProcess before
5949 DebugActiveProcess, not after. Add last error output to error
5952 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5954 * win32-low.c (win32_get_thread_context)
5955 (win32_set_thread_context): New functions.
5956 (thread_rec): Use win32_get_thread_context.
5957 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5958 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5961 2007-12-03 Leo Zayas
5962 Pedro Alves <pedro_alves@portugalmail.pt>
5964 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5966 (child_add_thread): Minor cleanup.
5967 (child_continue): Resume artificially suspended threads before
5968 calling ContinueDebugEvent.
5969 (suspend_one_thread): New.
5970 (fake_breakpoint_event): New.
5971 (get_child_debug_event): Change return type to int. Check here if
5972 gdb sent an interrupt request. If a soft interrupt was requested,
5973 fake a breakpoint event. Return 0 if there is no event to handle,
5975 (win32_wait): Don't check here if gdb sent an interrupt request.
5976 Ensure there is a valid event to handle.
5977 (win32_request_interrupt): Add soft interruption method as last
5980 2007-12-03 Leo Zayas
5981 Pedro Alves <pedro_alves@portugalmail.pt>
5983 * win32-low.h (win32_thread_info): Add descriptions to the
5984 structure members. Replace `suspend_count' counter by a
5986 * win32-low.c (thread_rec): Update condition of when to get the
5987 context from the inferior. Rely on ContextFlags being set if it
5988 has already been retrieved. Only suspend the inferior thread if
5989 we haven't already. Warn if that fails.
5990 (continue_one_thread): s/suspend_count/suspended/. Only call
5991 ResumeThread once. Warn if that fails.
5993 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5995 * win32-low.c (win32_wait): Don't read from the inferior when it
5998 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6000 * Makefile.in (win32_low_h): New variable.
6001 (win32-low.o): Add dependency on $(win32_low_h).
6002 (win32-arm-low.o, win32-i386-low.o): New rules.
6004 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6006 * hostio.c: Correct copyright year.
6008 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6010 * Makefile.in (OBS): Add hostio.o.
6011 (hostio.o): New rule.
6012 * server.h (handle_vFile): Declare.
6013 * hostio.c: New file.
6014 * server.c (handle_v_requests): Take packet_len and new_packet_len
6015 for binary packets. Call handle_vFile.
6016 (main): Update call to handle_v_requests.
6018 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6020 * linux-low.c: Include <sched.h>.
6022 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6024 * linux-low.c (linux_tracefork_grandchild): New.
6025 (linux_tracefork_child): Use clone.
6026 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6028 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6030 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6032 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6034 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6036 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6038 * inferiors.c (change_inferior_id): Delete.
6039 (add_pid_to_list, pull_pid_from_list): New.
6040 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6041 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6042 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6043 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6044 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6045 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6046 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6047 (using_threads): Always set to 1.
6048 (handle_extended_wait): New.
6049 (add_process): Do not set TID.
6050 (linux_create_inferior): Set must_set_ptrace_flags.
6051 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6052 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6053 (linux_thread_alive): Rename TID argument to LWPID.
6054 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6055 (linux_wait_for_event): Do not use TID or check using_threads. Update
6056 call to dead_thread_notify. Call handle_extended_wait.
6057 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6058 (send_sigstop): Delete sigstop_sent.
6059 (wait_for_sigstop): Avoid TID.
6060 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6061 (linux_test_for_tracefork): New.
6062 (linux_lookup_signals): Use thread_db_active and
6063 linux_supports_tracefork_flag.
6064 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6065 * linux-low.h (get_process_thread): Avoid TID.
6066 (struct process_ifo): Move thread_known and tid to the end. Remove
6068 (linux_attach_lwp, thread_db_init): Update prototypes.
6069 * server.h (change_inferior_id): Delete prototype.
6070 (add_pid_to_list, pull_pid_from_list): New prototypes.
6071 * thread-db.c (thread_db_use_events): New.
6072 (find_first_thread): Rename to...
6073 (find_one_thread): ...this. Update callers and messages. Do not
6074 call fatal. Check thread_db_use_events. Do not call
6075 change_inferior_id or new_thread_notify.
6076 (maybe_attach_thread): Update. Do not call new_thread_notify.
6077 (thread_db_init): Set thread_db_use_events. Check use_events.
6078 * utils.c (fatal, warning): Correct message prefix.
6080 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6082 * Makefile.in (clean): Remove new files.
6083 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6084 (powerpc-64.o, powerpc-64.c): New rules.
6085 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6086 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6088 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6090 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6091 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6092 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6093 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6094 (target_regsets): Add AltiVec and SPE register sets.
6095 * configure.ac: Check for AltiVec and SPE.
6096 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6097 (ppc_fill_vrregset, ppc_store_vrregset): New.
6098 (target_regsets): Add AltiVec register set.
6099 * configure: Regenerated.
6101 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6103 * linux-low.c (O_LARGEFILE): Define.
6104 (linux_read_memory): Use /proc/PID/mem.
6105 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6106 * configure, config.in: Regenerated.
6108 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6110 * linux-low.c (linux_wait_for_event): Do not pass signals while
6113 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6115 * win32-low.c (create_process): New.
6116 (win32_create_inferior): Use create_process instead of
6117 CreateProcess. If create_process failed retry appending an ".exe"
6118 suffix. Store the GetLastError result immediatelly after
6119 create_process calls and use it on the call to error.
6121 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6123 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6125 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6127 * configure.ac: Switch license to GPLv3.
6129 2007-08-01 Michael Snyder <msnyder@access-company.com>
6131 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6133 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6135 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6137 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6138 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6139 CloseToolhelp32Snapshot.
6140 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6141 CloseToolhelp32Snapshot.
6143 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6145 * server.c (main): Check for inferior exit before main loop.
6147 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6149 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6150 instead of on tmp_desc.
6152 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6153 Daniel Jacobowitz <dan@codesourcery.com>
6155 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6156 (add_thread): Minor cleanups.
6157 (clear_inferiors): Move lower in the file. Clear the DLL
6159 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6160 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6161 (xml_escape_text): New.
6162 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6164 (handle_v_cont): Report errors.
6165 (gdbserver_version): Update.
6166 (main): Correct size of own_buf. Do not report initial DLL events.
6167 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6168 (unloaded_dll, xml_escape_text): New.
6169 * win32-low.c (enum target_waitkind): Update comments.
6170 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6171 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6172 (win32_EnumProcessModules, win32_GetModuleInformation)
6173 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6174 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6175 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6176 (win32_Module32First, win32_Module32Next, load_toolhelp)
6177 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6178 (get_child_debug_event): Handle DLL events.
6179 (win32_wait): Likewise.
6181 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6183 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6184 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6186 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6188 * win32-low.c (handle_output_debug_string): Ignore event if not
6191 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6193 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6195 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6197 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6199 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6201 * inferiors.c (change_inferior_id): Add comment.
6202 * linux-low.c (check_removed_breakpoint): Add an early
6203 prototype. Improve debug output.
6204 (linux_attach): Doc update.
6205 (linux_detach_one_process, linux_detach): Clean up before releasing
6207 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6208 * linux-low.h (struct process_info): Doc improvement.
6209 * mem-break.c (delete_all_breakpoints): New.
6210 * mem-break.h (delete_all_breakpoints): New prototype.
6211 * thread-db.c (find_first_thread): New.
6212 (thread_db_create_event): Call it instead of
6213 thread_db_find_new_threads. Clean up unused variables.
6214 (maybe_attach_thread): Remove first thread handling.
6215 (thread_db_find_new_threads): Use find_first_thread.
6216 (thread_db_get_tls_address): Likewise.
6218 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6220 * thread-db.c (thread_db_find_new_threads): Add prototype.
6221 (thread_db_create_event): Check for the main thread before adding
6223 (maybe_attach_thread): Only enable event reporting if TID == 0.
6224 (thread_db_get_tls_address): Check for new threads.
6226 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6228 * linux-low.c (linux_create_inferior): Try execv before execvp.
6229 * spu-low.c (spu_create_inferior): Likewise.
6231 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6233 * linux-low.c (linux_create_inferior): Change execv to execvp.
6234 * spu-low.c (spu_create_inferior): Likewies.
6236 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6238 * Makefile.in (clean): Clean new files instead of deleted ones.
6239 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6240 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6242 * configure.srv: Specify XML files and new regformats for MIPS and
6244 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6245 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6246 an entry for the restart register.
6247 (mips_cannot_fetch_register, mips_cannot_store_register)
6248 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6249 register names to match the XML descriptions.
6250 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6251 restart register instead of $0.
6253 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6254 Markus Deuling <deuling@de.ibm.com>
6256 * remote-utils.c (decode_xfer_write): New function.
6257 * server.h (decode_xfer_write): Add prototype.
6258 * server.c (handle_query): Add PACKET_LEN argument. Support
6259 qXfer:spu:read and qXfer:spu:write packets.
6260 (main): Pass packet_len to handle_query.
6261 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6262 * target.h (target_ops): Add qxfer_spu.
6264 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6266 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6267 accessing non-seekable spufs files.
6269 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6271 * server.c (handle_query): Add reply for qC packet.
6273 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6274 Leo Zayas <lerele@champenstudios@com>
6276 * server.h (check_remote_input_interrupt_request): New function.
6277 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6278 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6279 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6280 (check_remote_input_interrupt_request): New function.
6281 * server.h (check_remote_input_interrupt_request): Declare.
6282 * win32-low.c (winapi_DebugBreakProcess,
6283 winapi_GenerateConsoleCtrlEvent): New typedefs.
6284 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6286 (win32_wait): Check for remote interrupt request
6287 with check_remote_input_interrupt_request.
6288 (win32_request_interrupt): New function.
6289 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6291 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6293 * win32-low.c (debug_registers_changed,
6294 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6295 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6296 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6297 (thread_rec): Get context using the low target.
6298 (child_add_thread): Call thread_added on the low target,
6299 which does the same thing.
6301 (do_initial_child_stuff): Remove debug registers references.
6302 Set context using the low target. Resume threads after
6303 setting the contexts.
6304 (child_continue): Remove dead variable. Remove debug
6305 registers references.
6306 (child_fetch_inferior_registers): Go through the low target.
6307 (do_child_store_inferior_registers): Remove.
6308 (child_store_inferior_registers): Go through the low target.
6309 (win32_resume): Remove debug registers references.
6310 Set context using the low target.
6311 (handle_exception): Change return type to void. Don't record
6312 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6313 first chance exception.
6314 (get_child_debug_event): Change return type to void. Remove
6315 goto loop. Always return after waiting for debug event.
6316 (win32_wait): Convert to switch statement. Handle spurious
6319 * win32-i386-low.c (debug_registers_changed,
6320 debug_registers_used): New.
6321 (initial_stuff): Rename to ...
6322 (i386_initial_stuff): ... this. Clear debug registers
6324 (store_debug_registers): Delete.
6325 (i386_get_thread_context): New.
6326 (load_debug_registers): Delete.
6327 (i386_set_thread_context): New.
6328 (i386_thread_added): New.
6329 (single_step): Rename to ...
6330 (i386_single_step): ... this.
6331 (do_fetch_inferior_registers): Rename to ...
6332 (i386_fetch_inferior_register): ... this.
6333 (i386_store_inferior_register): New.
6334 (the_low_target): Adapt to new interface.
6336 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6337 (arm_get_thread_context): New.
6338 (arm_set_thread_context): New.
6340 (do_fetch_inferior_registers): Rename to ...
6341 (arm_fetch_inferior_register): ... this.
6342 (arm_store_inferior_register): New.
6343 (arm_wince_breakpoint): Reimplement as unsigned long.
6344 (arm_wince_breakpoint_len): Define.
6345 (the_low_target): Adapt to new interface.
6347 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6348 load_debug_registers. Add get_thread_context, set_thread_context,
6349 thread_added and store_inferior_register. Rename
6350 fetch_inferior_registers to fetch_inferior_register.
6351 (regptr): Remove declaration.
6353 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6355 * linux-low.c (linux_detach): Change return type to int. Return 0.
6356 * spu-low.c (spu_detach): Likewise.
6358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6360 * target.h (target_ops): Change return type of detach to int.
6362 (join_inferior): New.
6363 * server.c (main): Don't skip detach support on mingw32.
6364 If the inferior doesn't support detaching return error.
6365 Call join_inferior instead of using waitpid.
6366 * linux-low.c (linux_join): New.
6367 (linux_target_op): Add linux_join.
6368 * spu-low.c (spu_join): New.
6369 (spu_target_ops): Add spu_join.
6370 * win32-low.c (win32_detach): Adapt to new interface.
6371 Reopen current_process_handle before detaching. Issue a child
6372 resume before detaching.
6374 (win32_target_op): Add win32_join.
6376 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6378 * win32-low.c (win32-attach): Fix return value.
6379 * target.h (target_ops): Describe ATTACH return values.
6381 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6383 * win32-low.c (GETPROCADDRESS): Define.
6384 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6385 (winapi_DebugSetProcessKillOnExit): Likewise.
6386 (win32_create_inferior): Force usage of ansi CreateProcessA.
6387 (win32_attach): Use GETPROCADDRESS.
6388 (win32_detach): Likewise.
6390 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6392 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6394 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6396 * win32-low.c: Commit leftover changes from 2007-03-29.
6398 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6400 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6401 fields short instead of int. Add explicit padding.
6402 (i387_cache_to_fsave): Remove unnecessary casts.
6403 (i387_fsave_to_cache): Doc fix.
6404 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6406 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6408 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6409 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6411 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6413 * configure.srv (arm*-*-mingw32ce*): Move near the other
6416 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6418 * configure.ac: Add errno checking.
6419 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6420 sys/file.h and malloc.h.
6421 (AC_CHECK_DECLS): Add perror.
6422 (srv_mingwce): Handle.
6423 * configure.srv (i[34567]86-*-cygwin*): Add
6424 win32-i386-low.o to srv_tgtobj.
6425 (i[34567]86-*-mingw*): Likewise.
6426 (arm*-*-mingw32ce*): Add case.
6427 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6428 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6429 [__MINGW32CE__] (strerror): New function.
6430 [__MINGW32CE__] (errno): Define to GetLastError.
6431 [__MINGW32CE__] (COUNTOF): New macro.
6432 (remote_open): Remove extra close call.
6433 * mem-break.c (delete_breakpoint_at): New function.
6434 * mem-break.h (delete_breakpoint_at): Declare.
6435 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6436 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6437 [USE_WIN32API] (read, write): Add char* casts.
6438 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6439 * server.h: Include wincecompat.h on Windows CE.
6440 [HAVE_ERRNO_H]: Check.
6441 (perror): Declare if not declared.
6442 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6443 (perror_with_name): Remove errno declaration.
6444 * wincecompat.h: New.
6445 * wincecompat.c: New.
6447 * win32-arm-low.c: New.
6448 * win32-i386-low.c: New.
6449 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6450 (OUTMSG2): Make it safe.
6452 (COUNTOF): New macro.
6453 (NUM_REGS): Get it from the low target.
6454 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6455 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6456 (thread_rec): Let low target handle debug registers.
6457 (child_add_thread): Likewise.
6458 (child_init_thread_list): Likewise.
6459 (continue_one_thread): Likewise.
6461 (do_child_fetch_inferior_registers): Move to ...
6462 * win32-i386-low.c: ... here, and rename to ...
6463 (do_fetch_inferior_registers): ... this.
6464 * win32-low.c (child_fetch_inferior_registers):
6465 Go through the low target.
6466 (do_child_store_inferior_registers): Use regptr.
6467 (strwinerror): New function.
6468 (win32_create_inferior): Handle Windows CE.
6469 Use strwinerror instead of strerror on Windows error
6470 codes. Add program to the error output.
6471 Don't close the main thread handle on Windows CE.
6472 (win32_attach): Use coredll.dll on Windows CE.
6473 (win32_kill): Close current process and current
6475 (win32_detach): Use coredll.dll on Windows CE.
6476 (win32_resume): Let low target handle debug registers, and
6478 (handle_exception): Add/Remove initial breakpoint. Avoid
6479 non-existant WSTOPSIG on Windows CE.
6480 (win32_read_inferior_memory): Cast to remove warning.
6481 (win32_arch_string): Go through the low target.
6482 (initialize_low): Call set_breakpoint_data with the low
6483 target's breakpoint.
6484 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6485 FOP_REGNUM, mappings): Move to ...
6486 * win32-i386-low.c: ... here.
6487 * win32-low.c (win32_thread_info): Move to ...
6488 * win32-low.h: ... here.
6489 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6490 win32-arm-low.c and wincecompat.c.
6491 (all:): Add $EXEEXT.
6492 (install-only:): Likewise.
6493 (gdbserver:): Likewise.
6494 (gdbreplay:): Likewise.
6495 * config.in: Regenerate.
6496 * configure: Regenerate.
6498 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6500 * win32-low.c: Rename typedef thread_info to
6501 win32_thread_info throughout.
6503 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6505 * win32-i386-low.c: Rename to ...
6506 * win32-low.c: ... this.
6507 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6508 * Makefile.in: Likewise.
6510 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6512 * remote-utils.c (monitor_output): Constify msg parameter.
6513 * server.h (monitor_output): Likewise.
6514 * win32-i386-low.c (handle_output_debug_string): New.
6515 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6516 handle_output_debug_string.
6517 (get_child_debug_event): Likewise.
6519 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6521 * server.c (main): Correct strtoul check.
6523 2007-03-27 Jon Ringle <jon@ringle.org>
6525 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6527 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6529 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6531 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6533 * terminal.h: Check HAVE_SGTTY_H.
6535 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6537 * remote-utils.c (remote_open): Print out the assigned port number.
6539 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6541 * remote-utils.c (monitor_output): New function.
6542 * server.c (debug_threads): Define here.
6543 (monitor_show_help): New function.
6544 (handle_query): Handle qRcmd.
6545 (main): Do not handle 'd' packet.
6546 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6547 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6550 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6552 * Makefile.in (EXEEXT): New.
6553 (clean): Use $(EXEEXT).
6555 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6557 * target.h (target_ops): Rename send_signal to request_interrupt,
6558 and remove enum target_signal parameter.
6559 * linux-low.c (linux_request_interrupt): Rename from
6560 linux_send_signal, and always send SIGINT.
6561 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6562 and always send SIGINT.
6563 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6565 (input_interrupt): Likewise.
6567 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6569 * server.c (get_features_xml): Check if target implemented
6571 * win32-i386-low.c (win32_arch_string): New.
6572 (win32_target_ops): Add win32_arch_string as arch_string member.
6574 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6576 * spu-low.c (spu_arch_string): New.
6577 (spu_target_ops): Add spu_arch_string.
6579 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6581 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6582 * configure.ac: Do not check for terminal.h.
6583 * configure, config.in: Regenerated.
6585 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6587 * Makefile.in (OBS): Add $(XML_BUILTIN).
6588 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6590 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6591 (arm-with-iwmmxt.c): New.
6592 * config.in, configure: Regenerate.
6593 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6594 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6595 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6596 (arm*-*-linux*): Add iWMMXt and regset support.
6597 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6598 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6599 (arm_store_wmmxregset, target_regsets): New.
6600 * server.c (get_features_xml): Take annex argument. Check builtin
6602 (handle_query): Handle multiple annexes.
6604 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6606 * remote-utils.c [USE_WIN32API] (read, write): Define.
6607 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6610 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6612 * linux-i386-low.c (the_low_target): Set arch_string.
6613 * linux-x86-64-low.c (the_low_target): Likewise.
6614 * linux-low.c (linux_arch_string): New.
6615 (linux_target_ops): Add it.
6616 * linux-low.h (struct linux_target_ops): Add arch_string.
6617 * server.c (write_qxfer_response): Use const void * for DATA.
6618 (get_features_xml): New.
6619 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6620 * target.h (struct target_ops): Add arch_string method.
6622 2007-01-03 Denis Pilat <denis.pilat@st.com>
6623 Daniel Jacobowitz <dan@codesourcery.com>
6625 * linux-low.c (linux_kill): Handle being called with no threads.
6626 * win32-i386-low.c (win32_kill): Likewise.
6627 (get_child_debug_event): Clear current_process_handle.
6629 2006-12-30 Denis PILAT <denis.pilat@st.com>
6630 Daniel Jacobowitz <dan@codesourcery.com>
6632 * remote-utils.c (remote_open): Check the type of specified
6633 serial port devices before opening them.
6634 * server.c (main): Kill the inferior if an error occurs during
6635 the first remote_open.
6637 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6639 * README: Update supported targets.
6641 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6643 * Makefile.in (clean): Remove reg-mips64.c.
6644 (reg-mips64.c, reg-mips64.o): New rules.
6645 * configure.srv: Handle mips64. Include regset support for mips.
6646 * linux-mips-low.c (union mips_register): New.
6647 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6648 (mips_breakpoint, mips_breakpoint_at): Use int.
6649 (mips_collect_register, mips_supply_register)
6650 (mips_collect_register_32bit, mips_supply_register_32bit)
6651 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6652 (mips_store_fpregset, target_regsets): New.
6653 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6655 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6657 * configure.srv: Add target "spu*-*-*".
6658 * Makefile.in (clean): Remove reg-spu.c.
6659 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6660 * spu-low.c: New file.
6662 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6664 * configure.ac: Correct td_thr_tls_get_addr test.
6665 * configure: Regenerated.
6667 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6669 * linux-low.c (linux_wait_for_event): Reformat. Use the
6671 * remote-utils.c (decode_address_to_semicolon): New.
6672 * server.c (pass_signals, handle_general_set): New.
6673 (handle_query): Mention QPassSignals for qSupported.
6674 (main): Call handle_general_set.
6675 * server.h (pass_signals, decode_address_to_semicolon): New.
6677 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6679 * server.c (handle_query): Correct error handling for read_auxv.
6681 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6683 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6684 and srv_linux_thread_db to yes.
6685 * linux-s390-low.c (s390_fill_gregset): New function.
6686 (target_regsets): Define data structure.
6688 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6690 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6691 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6692 * config.in, configure: Regenerated.
6693 * inferiors.c (gdb_id_to_thread): New function.
6694 (gdb_id_to_thread_id): Use it.
6695 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6696 * linux-low.h (struct process_info): Add th member.
6697 (thread_db_get_tls_address): New prototype.
6698 * remote-utils.c (decode_address): Make non-static.
6699 * server.c (handle_query): Handle qGetTLSAddr.
6700 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6701 * target.h (struct target_ops): Add get_tls_address.
6702 * thread-db.c (maybe_attach_thread): Save the thread handle.
6703 (thread_db_get_tls_address): New.
6705 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6707 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6708 (linux_resume_one_process): Take a siginfo_t *. Update all
6709 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6710 (struct pending_signals): Add a siginfo_t.
6711 (linux_wait_for_process): Always set last_status.
6712 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6713 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6714 * linux-low.h (struct process_info): Add last_status.
6716 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6718 * remote-utils.c (try_rle): New function.
6719 (putpkt_binary): Use it.
6721 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6723 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6724 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6725 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6726 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6727 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6730 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6732 * server.c (terminal_fd): New variable.
6733 (old_foreground_pgrp): Likewise.
6734 (restore_old_foreground_pgrp): New function.
6735 (start_inferior): Record the terminal file descriptor in terminal_fd
6736 and its original foreground group in old_foreground_pgrp. Register
6737 restore_old_foreground_pgrp with atexit().
6739 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6741 * server.c (handle_query): Correct qPart to qXfer.
6743 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6745 * configure.ac: Check for more headers which are missing on
6746 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6747 * configure.srv: Add Cygwin and mingw32.
6748 * remote-utils.c: Don't include headers unconditionally which
6749 are missing on mingw32. Include <winsock.h> for mingw32.
6750 (remote_open): Adjust for mingw32 support. Flush
6751 standard error after writing to it.
6752 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6753 (unblock_async_io, enable_async_io, disable_async_io)
6754 (readchar, getpkt): Update for Winsock support.
6755 (prepare_resume_reply): Expect a protocol signal number.
6756 * server.c: Disable <sys/wait.h> on mingw32.
6757 (start_inferior): Adjust for mingw32 support. Flush
6758 standard error after writing to it.
6759 (attach_inferior): Likewise. Use protocol signal
6761 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6763 * win32-i386-low.c: New file.
6764 * Makefile.in (XM_CLIBS): Set.
6765 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6766 (win32-i386-low.o): New dependency rule.
6767 * linux-low.c (linux_wait): Use target signal numbers.
6768 * target.h (struct target_ops): Doc fix.
6769 * server.h (target_signal_to_name): New prototype.
6770 * gdbreplay.c: Don't include headers unconditionally which
6771 are missing on mingw32. Include <winsock.h> for mingw32.
6772 (remote_close, remote_open): Adjust for Winsock support.
6773 * configure, config.in: Regenerated.
6775 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6777 * server.c (decode_xfer_read, write_qxfer_response): New.
6778 (handle_query): Take a packet length argument. Handle
6779 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6780 the qSupported response.
6781 (main): Update call to handle_query.
6783 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6785 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6786 (putpkt_binary): Renamed from putpkt and adjusted for binary
6788 (putpkt): New wrapper for putpkt_binary.
6789 (readchar): Don't mask off the high bit.
6790 (decode_X_packet): New function.
6791 * server.c (main): Call putpkt_binary if a handler sets the packet
6792 length. Save the length of the incoming packet. Handle 'X'.
6793 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6795 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6797 * server.c (handle_query): Handle qSupported.
6799 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6801 * remote-utils.c (all_symbols_looked_up): New variable.
6802 (look_up_one_symbol): Check it.
6803 * server.h (look_up_one_symbol): New declaration.
6804 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6806 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6808 * Makefile.in (linux-arm-low.o): Update dependencies.
6809 * linux-arm-low.c: Include "gdb_proc_service.h".
6810 (PTRACE_GET_THREAD_AREA): Define.
6811 (ps_get_thread_area): New function.
6813 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6815 * configure.srv (m68k*-*-uclinux*): New target.
6816 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6817 (linux_resume_one_process): Remove extraneous cast.
6818 (linux_read_offsets): New.
6819 (linux_target_op): Add linux_read_offsets on mmuless systems.
6820 * server.c (handle_query): Add qOffsets logic.
6821 * target.h (struct target_ops): Add read_offsets.
6823 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6825 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6826 (PTRACE_GET_THREAD_AREA): Define.
6827 (ps_get_thread_area): New function.
6828 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6829 (linux-x86-64-low.o): Update.
6831 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6833 * configure.ac: Remove checks for prfpregset_t.
6834 * gdb_proc_service.h: New file.
6835 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6836 new "gdb_proc_service.h".
6837 * proc-service.c: Likewise.
6838 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6839 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6840 * Makefile.in (gdb_proc_service_h): Updated.
6841 * configure, config.in: Regenerated.
6843 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6845 * remote-utils.c (prepare_resume_reply): Move declaration
6846 of gdb_id_from_wait to the top of the block.
6848 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6850 * linux-low.c (regsets_store_inferior_registers): Read the regset
6851 from the target before filling it.
6853 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6855 * server.c (attach_inferior): Return SIGTRAP for a successful
6858 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6860 * Makefile.in (OBS): Add version.o.
6861 (STAGESTUFF): Delete.
6862 (version.o): Add dependencies.
6863 (version.c): Replace rule.
6864 (clean): Remove version.c.
6865 * server.c (gdbserver_version): New.
6866 (gdbserver_usage): Use printf.
6867 (main): Handle --version and --help.
6868 * server.h (version, host_name): Add declarations.
6870 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6882 * linux-x86-64-low.c:
6885 * linux-ppc64-low.c:
6894 * linux-crisv32-low.c:
6906 * gdbserver.1: Add (C) after Copyright. Update the FSF
6909 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6911 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6912 (arm_breakpoint_at): Recognize both breakpoints.
6913 (the_low_target): Use the correct breakpoint instruction.
6915 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6917 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6918 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6919 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6920 (the_low_target): Update.
6922 2005-10-25 Andreas Schwab <schwab@suse.de>
6924 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6926 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6927 (ia64_num_regs): Reduce to 462.
6929 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6931 * acinclude.m4: Correct quoting.
6932 * aclocal.m4: Regenerated.
6934 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6935 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6936 (thread_db_init): Call thread_db_err_str.
6937 * configure.ac: Check for TD_VERSION.
6938 * config.in, configure: Regenerated.
6940 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6942 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6944 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6946 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6947 is not available. Define HAVE_PTRACE_GETREGS if it is.
6948 * config.in, configure: Regenerated.
6949 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6950 * linux-i386-low.c, linux-m68k-low.c: Update to use
6951 HAVE_PTRACE_GETREGS.
6952 * linux-low.c (regsets_fetch_inferior_registers)
6953 (regsets_store_inferior_registers): Only return 0 if we processed
6955 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6956 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6958 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6960 * inferiors.c (struct thread_info): Add gdb_id.
6961 (add_thread): Add gdb_id argument.
6962 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6963 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6964 calls to add_thread.
6965 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6966 * server.c (handle_query): Use thread_to_gdb_id.
6967 (handle_v_cont, main): Use gdb_id_to_thread_id.
6968 * server.h (add_thread): Update prototype.
6969 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6972 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6974 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6975 left-padded registers.
6976 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6977 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6979 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6981 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6982 * configure: Regenerate.
6983 * config.in: Regenerate.
6984 * server.h (NEED_DECLARATION_STRERROR):
6985 Replace with !HAVE_DECL_STRERROR.
6987 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6989 * linux-low.c (linux_wait, linux_send_signal): Don't test
6990 an unsigned long variable for > 0 if it could be MAX_ULONG.
6991 * server.c (myresume): Likewise.
6992 * target.c (set_desired_inferior): Likewise.
6994 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6996 * configure.ac: Simplify and improve check for socklen_t.
6997 * configure, config.in: Regenerate.
6999 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7001 * acconfig.h: Remove.
7002 * configure.ac: Add a test for socklen_t. Use three-argument
7003 AC_DEFINE throughout.
7004 * config.in: Regenerated using autoheader 2.59.
7005 * configure: Regenerated.
7007 * gdbreplay.c (socklen_t): Provide a default.
7008 (remote_open): Use socklen_t.
7009 * remote-utils.c (socklen_t): Provide a default.
7010 (remote_open): Use socklen_t.
7011 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7014 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7016 * linux-low.c (linux_read_memory, linux_write_memory)
7017 (linux_read_auxv): Likewise.
7018 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7019 (check_mem_write): Likewise.
7020 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7022 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7023 (registers_from_string, register_data): Likewise.
7024 * server.c (handle_query, main): Likewise.
7025 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7026 (decode_M_packet): Likewise.
7027 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7028 * target.h (struct target_ops): Update read_memory, write_memory,
7030 (read_inferior_memory, write_inferior_memory): Update.
7031 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7033 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7034 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7035 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7036 linux-s390-low.c, linux-sh-low.c: Update for changes in
7037 read_inferior_memory and the_low_target->breakpoint.
7039 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7041 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7042 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7043 * configure.srv: Add powerpc64-*-linux*.
7044 * linux-ppc64-low.c: New file.
7046 2005-05-23 Orjan Friberg <orjanf@axis.com>
7048 * linux-cris-low.c: New file with support for CRIS.
7049 * linux-crisv32-low.c: Ditto for CRISv32.
7050 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7051 (clean): Add reg-cris.c and reg-crisv32.c.
7052 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7053 reg-crisv32.o, and reg-crisv32.c to make rules.
7054 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7057 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7059 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7060 of sizeof (PTRACE_XFER_TYPE).
7061 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7063 2005-05-12 Orjan Friberg <orjanf@axis.com>
7065 * target.h (struct target_ops): Add insert_watchpoint,
7066 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7067 pointers for hardware watchpoint support.
7068 * linux-low.h (struct linux_target_ops): Ditto.
7069 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7070 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7071 to linux_target_ops.
7072 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7074 * server.c (main): Recognize 'Z' and 'z' packets.
7076 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7078 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7079 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7080 (the_low_target): Add new members.
7082 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7084 * proc-service.c (ps_lgetregs): Search all_processes instead of
7087 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7089 * server.c (start_inferior): Change return type to int.
7090 (attach_inferior): Change sigptr to int *.
7091 (handle_v_cont, handle_v_requests): Change signal to int *.
7092 (main): Change signal to int.
7094 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7096 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7097 * configure.srv: Add m32r*-*-linux*.
7098 * linux-m32r-low.c: New file.
7100 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7102 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7104 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7106 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7107 Take unsigned long arguments for PIDs.
7108 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7109 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7110 (wait_for_sigstop, linux_resume_one_process)
7111 (regsets_fetch_inferior_registers, linux_send_signal)
7112 (linux_read_auxv): Likewise. Update the types of variables holding
7113 PIDs. Update format string specifiers.
7114 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7115 * remote-utils.c (prepare_resume_reply): Likewise.
7116 * server.c (cont_thread, general_thread, step_thread)
7117 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7119 (handle_query): Update format specifiers.
7120 (handle_v_cont, main): Use strtoul for thread IDs.
7121 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7122 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7123 (general_thread, step_thread, thread_from_wait)
7124 (old_thread_from_wait): Update.
7125 * target.h (struct thread_resume): Use unsigned long for THREAD.
7126 (struct target_ops): Use unsigned long for arguments to attach and
7129 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7131 * acinclude.m4: Include bfd/bfd.m4 directly.
7132 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7133 <agriffis@toolchain.org>.
7134 * aclocal.m4, configure: Regenerated.
7136 2005-01-07 Andrew Cagney <cagney@gnu.org>
7138 * configure.ac: Rename configure.in, require autoconf 2.59.
7139 * configure: Re-generate.
7141 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7143 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7145 * aclocal.m4: Regenerated.
7146 * configure: Regenerated.
7148 2004-11-21 Andreas Schwab <schwab@suse.de>
7150 * linux-m68k-low.c (m68k_num_gregs): Define.
7151 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7152 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7153 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7154 (m68k_breakpoint_at): New. Add to the_low_target.
7156 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7157 srv_linux_thread_db to yes.
7159 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7161 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7162 (ARCH_SET_FS): Likewise.
7163 (ARCH_GET_FS): Likewise.
7164 (ARCH_GET_GS): Likewise.
7166 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7168 * linux-i386-low.c (ps_get_thread_area): New.
7169 * linux-x86-64-low.c (ps_get_thread_area): New.
7170 * linux-low.c: Include <sys/syscall.h>.
7171 (linux_kill_one_process): Don't kill the first thread here.
7172 (linux_kill): Kill the first thread here.
7173 (kill_lwp): New function.
7174 (send_sigstop, linux_send_signal): Use it.
7175 * proc-service.c: Clean up #ifdefs.
7176 (fpregset_info): Delete.
7177 (ps_lgetregs): Update and enable implementation.
7178 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7180 * remote-utils.c (struct sym_cache, symbol_cache): New.
7181 (input_interrupt): Print a clearer message.
7182 (async_io_enabled): New variable.
7183 (enable_async_io, disable_async_io): Use it. Update comments.
7184 (look_up_one_symbol): Use the symbol cache.
7185 * thread-db.c (thread_db_look_up_symbols): New function.
7186 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7188 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7190 * configure.in: Test for -rdynamic.
7191 * configure: Regenerated.
7192 * Makefile (INTERNAL_LDFLAGS): New.
7193 (gdbserver, gdbreplay): Use it.
7195 2004-09-02 Andrew Cagney <cagney@gnu.org>
7197 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7199 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7201 * linux-low.c (linux_wait): Clear all_processes list also.
7203 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7205 * linux-low.c: Include <errno.h>. Remove extern declaration of
7208 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7210 * gdbreplay.c, server.h, utils.c: Update copyright years.
7212 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7214 * server.c (main): Print child status or termination signal from
7215 variable 'signal', not 'sig'.
7217 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7219 * linux-low.c (linux_read_memory): Change return type to
7220 int. Check for and return error from ptrace().
7221 * target.c (read_inferior_memory): Change return type to int. Pass
7222 back return status from the_target->read_memory().
7223 * target.h (struct target_ops): Adapt *read_memory() prototype.
7225 (read_inferior_memory): Adapt prototype.
7226 * server.c (main): Return an error packet if
7227 read_inferior_memory() returns an error.
7229 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7231 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7232 Unify with other clean targets.
7234 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7236 * server.c (handle_v_cont): Call set_desired_inferior.
7238 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7240 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7242 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7244 * linux-low.c (linux_wait): Unblock async I/O.
7245 (linux_resume): Block and enable async I/O.
7246 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7247 * server.h (block_async_io, unblock_async_io): Add prototypes.
7249 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7251 * remote-utils.c (remote_open): Print a status notice after
7253 * server.c (attach_inferior): Print a status notice after
7256 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7258 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7260 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7262 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7264 * server.c, target.h: Update copyright years.
7266 2004-02-25 Roland McGrath <roland@redhat.com>
7268 * target.h (struct target_ops): New member `read_auxv'.
7269 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7270 * linux-low.c (linux_read_auxv): New function.
7271 (linux_target_ops): Initialize `read_auxv' member to that.
7273 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7275 Committed by Jim Blandy <jimb@redhat.com>.
7277 * linux-s390-low.c (s390_num_regs): Update.
7278 (s390_regmap): Remove control registers. Use __s390x__ predefine
7279 instead of GPR_SIZE to distiguish s390 and s390x targets.
7281 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7283 * linux-low.c: Update copyright year.
7284 (check_removed_breakpoint): Clear pending_is_breakpoint.
7285 (linux_set_resume_request, linux_queue_one_thread)
7286 (resume_status_pending_p): New functions.
7287 (linux_continue_one_thread): Use process->resume.
7288 (linux_resume): Only resume threads if there are no pending events.
7289 * linux-low.h (struct process_info): Add resume request
7292 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7294 * regcache.c (new_register_cache): Clear the allocated register
7295 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7297 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
7299 * linux-low.c (linux_resume): Take a struct thread_resume *
7301 (linux_wait): Update call.
7302 (resume_ptr): New static variable.
7303 (linux_continue_one_thread): Renamed from
7304 linux_continue_one_process. Use resume_ptr.
7305 (linux_resume): Use linux_continue_one_thread.
7306 * server.c (handle_v_cont, handle_v_requests): New functions.
7307 (myresume): New function.
7308 (main): Handle 'v' case.
7309 * target.h (struct thread_resume): New type.
7310 (struct target_ops): Change argument of "resume" to struct
7312 (myresume): Delete macro.
7314 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7316 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7317 (uninstall): Support DESTDIR.
7319 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7321 * configure.srv: Add xscale*linux copy of arm*linux entry.
7323 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
7325 * linux-arm-low.c (arm_reinsert_addr): New function.
7326 (the_low_target): Add arm_reinsert_addr.
7328 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7330 * mem-break.c: Remove whitespace at end of file.
7332 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7334 * configure.in: Check whether we need to prototype strerror.
7335 * server.h: Optionally prototype strerror.
7336 * gdbreplay.c (perror_with_name): Use strerror.
7337 * linux-low.c (linux_attach_lwp): Use strerror.
7338 * utils.c (perror_with_name): Use strerror.
7339 * config.in, configure: Regenerated.
7341 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7343 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7344 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7346 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
7348 * Makefile.in (SFILES): Update.
7349 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7350 low-sun3.c: Remove files.
7352 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
7354 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7355 (linux_detach_one_process, linux_detach): New functions.
7356 (linux_target_ops): Add linux_detach.
7357 * server.c (main): Handle 'D' packet.
7358 * target.h (struct target_ops): Add "detach" member.
7359 (detach_inferior): Define.
7361 2003-06-13 Mark Kettenis <kettenis@gnu.org>
7363 From Kelley Cook <kelleycook@wideopenwest.com>:
7364 * configure.srv: Accept i[34567]86 variants.
7366 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
7368 * linux-low.c (linux_wait_for_event): Correct comment typos.
7369 (linux_resume_one_process): Call check_removed_breakpoint.
7370 (linux_send_signal): New function.
7371 (linux_target_ops): Add linux_send_signal.
7372 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7374 * target.h (struct target_ops): Add send_signal.
7376 2003-05-29 Jim Blandy <jimb@redhat.com>
7378 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7379 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7380 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7381 away part of the register's value.
7383 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
7385 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7386 (linux_wait_for_event, linux_init_signals): Likewise.
7388 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
7390 * configure.in: Check for stdlib.h.
7391 * configure: Regenerated.
7392 * config.in: Regenerated.
7394 2003-01-04 Andreas Schwab <schwab@suse.de>
7396 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7398 2003-01-02 Andrew Cagney <ac131313@redhat.com>
7400 * Makefile.in: Remove obsolete code.
7402 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
7404 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7405 defined(PT_FPR0_HI).
7407 2002-11-17 Stuart Hughes <seh@zee2.com>
7409 * linux-arm-low.c (arm_num_regs): Increase.
7410 (arm_regmap): Include status register.
7412 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
7414 * linux-low.c (register_addr): Remove incorrect -1 check.
7416 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
7418 * linux-low.c (linux_create_inferior): Call setpgid. Return
7420 (unstopped_p, linux_signal_pid): Remove.
7421 (linux_target_ops): Remove linux_signal_pid.
7422 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7423 global instead of target method.
7424 * target.h (struct target_ops): Remove signal_pid. Update comment
7425 for create_inferior.
7426 * server.c (signal_pid): New variable.
7427 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7428 gdbserver. Set the child to be the foreground process group.
7429 (attach_inferior): Set signal_pid.
7431 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
7433 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7435 2002-08-20 Jim Blandy <jimb@redhat.com>
7437 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7440 2002-08-01 Andrew Cagney <cagney@redhat.com>
7442 * Makefile.in: Make chill references obsolete.
7444 2002-07-24 Kevin Buettner <kevinb@redhat.com>
7446 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7447 * configure: Regenerate.
7448 * config.in: Regenerate.
7450 2002-07-09 David O'Brien <obrien@FreeBSD.org>
7452 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7453 (perror_with_name, remote_close, remote_open, expect, play): Static.
7455 2002-07-04 Michal Ludvig <mludvig@suse.cz>
7457 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7458 byte offsets instead of an array of indexes.
7459 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7461 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
7463 * regcache.c: Add comment.
7465 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
7467 * thread-db.c: New file.
7468 * proc-service.c: New file.
7469 * acinclude.m4: New file.
7470 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7471 proc-service.o, and thread-db.o.
7472 (linux-low.o): Add USE_THREAD_DB.
7473 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7474 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7475 * aclocal.m4: Regenerated.
7476 * config.in: Regenerated.
7477 * configure: Regenerated.
7478 * configure.in: Check for proc_service.h, sys/procfs.h,
7479 thread_db.h, and linux/elf.h headrs.
7480 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7481 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7482 Check for -lthread_db and thread support.
7483 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7484 PowerPC, and SuperH.
7485 * i387-fp.c: Constify arguments.
7486 * i387-fp.h: Likewise.
7487 * inferiors.c: (struct thread_info): Renamed from
7488 `struct inferior_info'. Remove PID member. Use generic inferior
7489 list header. All uses updated.
7490 (inferiors, signal_pid): Removed.
7491 (all_threads): New variable.
7492 (get_thread): Define.
7493 (add_inferior_to_list): New function.
7494 (for_each_inferior): New function.
7495 (change_inferior_id): New function.
7496 (add_inferior): Removed.
7497 (remove_inferior): New function.
7498 (add_thread): New function.
7499 (free_one_thread): New function.
7500 (remove_thread): New function.
7501 (clear_inferiors): Use for_each_inferior and free_one_thread.
7502 (find_inferior): New function.
7503 (find_inferior_id): New function.
7504 (inferior_target_data): Update argument type.
7505 (set_inferior_target_data): Likewise.
7506 (inferior_regcache_data): Likewise.
7507 (set_inferior_regcache_data): Likewise.
7508 * linux-low.c (linux_bp_reinsert): Remove.
7509 (all_processes, stopping_threads, using_thrads)
7510 (struct pending_signals, debug_threads, pid_of): New.
7511 (inferior_pid): Replace with macro.
7512 (struct inferior_linux_data): Remove.
7513 (get_stop_pc, add_process): New functions.
7514 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7515 Use add_process and add_thread.
7516 (linux_attach_lwp): New function, based on old linux_attach. Use
7517 add_process and add_thread. Set stop_expected for new threads.
7518 (linux_attach): New function.
7519 (linux_kill_one_process): New function.
7520 (linux_kill): Kill all LWPs.
7521 (linux_thread_alive): Use find_inferior_id.
7522 (check_removed_breakpoints, status_pending_p): New functions.
7523 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7524 Update. Use WNOHANG. Wait for cloned processes also. Update process
7525 struct for the found process.
7526 (linux_wait_for_event): New function.
7527 (linux_wait): Use it. Support LWPs.
7528 (send_sigstop, wait_for_sigstop, stop_all_processes)
7529 (linux_resume_one_process, linux_continue_one_process): New functions.
7530 (linux_resume): Support LWPs.
7531 (REGISTER_RAW_SIZE): Remove.
7532 (fetch_register): Use register_size instead. Call supply_register.
7533 (usr_store_inferior_registers): Likewise. Call collect_register.
7535 (regsets_fetch_inferior_registers): Improve error message.
7536 (regsets_store_inferior_registers): Add debugging.
7537 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7538 (unstopped_p, linux_signal_pid): New functions.
7539 (linux_target_ops): Add linux_signal_pid.
7540 (linux_init_signals): New function.
7541 (initialize_low): Call it. Initialize using_threads.
7542 * regcache.c (inferior_regcache_data): Add valid
7544 (get_regcache): Fetch registers lazily. Add fetch argument
7545 and update all callers.
7546 (regcache_invalidate_one, regcache_invalidate): New
7548 (new_register_cache): Renamed from create_register_cache.
7549 Return the new regcache.
7550 (free_register_cache): Change argument to a void *.
7551 (registers_to_string, registers_from_string): Call get_regcache
7552 with fetch flag set.
7553 (register_data): Make static. Pass fetch flag to get_regcache.
7554 (supply_register): Call get_regcache with fetch flag clear.
7555 (collect_register): Call get_regcache with fetch flag set.
7556 (collect_register_as_string): New function.
7557 * regcache.h: Update.
7558 * remote-utils.c (putpkt): Flush after debug output and use
7560 Handle input interrupts while waiting for an ACK.
7561 (input_interrupt): Use signal_pid method.
7562 (getpkt): Flush after debug output and use stderr.
7563 (outreg): Use collect_register_as_string.
7564 (new_thread_notify, dead_thread_notify): New functions.
7565 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7567 (look_up_one_symbol): Flush after debug output.
7568 * server.c (step_thread, server_waiting): New variables.
7569 (start_inferior): Don't use signal_pid. Update call to mywait.
7570 (attach_inferior): Update call to mywait.
7571 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7572 (main): Don't fetch/store registers explicitly. Use
7573 set_desired_inferior. Support proposed ``Hs'' packet. Update
7576 (struct inferior_list, struct_inferior_list_entry): New.
7577 * target.c (set_desired_inferior): New.
7578 (write_inferior_memory): Constify.
7579 (mywait): New function.
7581 (struct target_ops): New signal_pid method.
7582 (mywait): Removed macro, added prototype.
7584 * linux-low.h (regset_func): Removed.
7585 (regset_fill_func, regset_store_func): New.
7586 (enum regset_type): New.
7587 (struct regset_info): Add type field. Use new operation types.
7588 (struct linux_target_ops): stop_pc renamed to get_pc.
7589 Add decr_pc_after_break and breakpoint_at.
7590 (get_process, get_thread_proess, get_process_thread)
7591 (strut process_info, all_processes, linux_attach_lwp)
7592 (thread_db_init): New.
7594 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7595 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7596 (the_low_target): Add new members.
7597 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7598 (i386_store_fpxregset): Constify.
7599 (target_regsets): Add new kind identifier.
7600 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7601 (i386_set_pc): Add debugging.
7602 (i386_breakpoint_at): New function.
7603 (the_low_target): Add new members.
7604 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7605 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7606 (mips_breakpoint_at): New.
7607 (the_low_target): Add new members.
7608 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7609 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7610 (the_low_target): Add new members.
7611 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7612 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7613 (the_low_target): Add new members.
7614 * linux-x86-64-low.c (target_regsets): Add new kind
7617 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7619 From Martin Pool <mbp@samba.org>:
7620 * server.c (gdbserver_usage): New function.
7623 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7625 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7628 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7630 * Makefile.in: Remove obsolete code.
7632 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7634 * linux-low.c (regsets_fetch_inferior_registers),
7635 (regsets_store_inferior_registers): Removed cast to int from
7637 * regcache.h: Added declaration of struct inferior_info.
7639 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7641 * inferiors.c (struct inferior_info): Add regcache_data.
7642 (add_inferior): Call create_register_cache.
7643 (clear_inferiors): Call free_register_cache.
7644 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7645 * regcache.c (struct inferior_regcache_data): New.
7646 (registers): Remove.
7647 (get_regcache): New function.
7648 (create_register_cache, free_register_cache): New functions.
7649 (set_register_cache): Don't initialize the register cache here.
7650 (registers_to_string, registers_from_string, register_data): Call
7652 * regcache.h: Add prototypes.
7653 * server.h: Likewise.
7655 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7657 * mem-break.c: New file.
7658 * mem-break.h: New file.
7659 * Makefile.in: Add mem-break.o rule; update server.h
7661 * inferiors.c (struct inferior_info): Add target_data
7663 (clear_inferiors): Free target_data member if set.
7664 (inferior_target_data, set_inferior_target_data): New functions.
7665 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7666 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7667 * linux-low.c (linux_bp_reinsert): New variable.
7668 (struct inferior_linux_data): New.
7669 (linux_create_inferior): Use set_inferior_target_data.
7670 (linux_attach): Likewise. Call add_inferior.
7671 (linux_wait_for_one_inferior): New function.
7672 (linux_wait): Call it.
7673 (linux_write_memory): Add const.
7674 (initialize_low): Call set_breakpoint_data.
7675 * linux-low.h (struct linux_target_ops): Add breakpoint
7677 * server.c (attach_inferior): Remove extra add_inferior
7679 * server.h: Include mem-break.h. Update inferior.c
7681 * target.c (read_inferior_memory)
7682 (write_inferior_memory): New functions.
7683 * target.h (read_inferior_memory)
7684 (write_inferior_memory): Change macros to prototypes.
7685 (struct target_ops): Update comments. Add const to write_memory
7688 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7690 * linux-low.c (usr_store_inferior_registers): Support
7691 registers which are allowed to fail to store.
7692 * linux-low.h (linux_target_ops): Likewise.
7693 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7694 (ppc_cannot_store_register): FPSCR may not be storable.
7696 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7698 * server.h: Include <string.h> if HAVE_STRING_H.
7699 * ChangeLog: Correct paths in last ChangeLog entry.
7701 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7703 * linux-low.h: Remove obsolete prototypes.
7704 (struct linux_target_ops): New.
7705 (extern the_low_target): New.
7706 * linux-low.c (num_regs, regmap): Remove declarations.
7707 (register_addr): Use the_low_target explicitly.
7708 (fetch_register): Likewise.
7709 (usr_fetch_inferior_registers): Likewise.
7710 (usr_store_inferior_registers): Likewise.
7711 * linux-arm-low.c (num_regs): Remove.
7712 (arm_num_regs): Define.
7713 (arm_regmap): Renamed from regmap, made static.
7714 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7716 (arm_cannot_store_register): Renamed from cannot_store_register,
7718 (the_low_target): New.
7719 * linux-i386-low.c (num_regs): Remove.
7720 (i386_num_regs): Define.
7721 (i386_regmap): Renamed from regmap, made static.
7722 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7724 (i386_cannot_store_register): Renamed from cannot_store_register,
7726 (the_low_target): New.
7727 * linux-ia64-low.c (num_regs): Remove.
7728 (ia64_num_regs): Define.
7729 (ia64_regmap): Renamed from regmap, made static.
7730 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7732 (ia64_cannot_store_register): Renamed from cannot_store_register,
7734 (the_low_target): New.
7735 * linux-m68k-low.c (num_regs): Remove.
7736 (m68k_num_regs): Define.
7737 (m68k_regmap): Renamed from regmap, made static.
7738 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7740 (m68k_cannot_store_register): Renamed from cannot_store_register,
7742 (the_low_target): New.
7743 * linux-mips-low.c (num_regs): Remove.
7744 (mips_num_regs): Define.
7745 (mips_regmap): Renamed from regmap, made static.
7746 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7748 (mips_cannot_store_register): Renamed from cannot_store_register,
7750 (the_low_target): New.
7751 * linux-ppc-low.c (num_regs): Remove.
7752 (ppc_num_regs): Define.
7753 (ppc_regmap): Renamed from regmap, made static.
7754 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7756 (ppc_cannot_store_register): Renamed from cannot_store_register,
7758 (the_low_target): New.
7759 * linux-s390-low.c (num_regs): Remove.
7760 (s390_num_regs): Define.
7761 (s390_regmap): Renamed from regmap, made static.
7762 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7764 (s390_cannot_store_register): Renamed from cannot_store_register,
7766 (the_low_target): New.
7767 * linux-sh-low.c (num_regs): Remove.
7768 (sh_num_regs): Define.
7769 (sh_regmap): Renamed from regmap, made static.
7770 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7772 (sh_cannot_store_register): Renamed from cannot_store_register,
7774 (the_low_target): New.
7775 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7776 (the_low_target): New.
7778 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7780 * Makefile.in: Add stamp-h target.
7781 * configure.in: Create stamp-h.
7782 * configure: Regenerated.
7784 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7786 * inferiors.c: New file.
7787 * target.c: New file.
7788 * target.h: New file.
7789 * Makefile.in: Add target.o and inferiors.o. Update
7791 * linux-low.c (inferior_pid): New static variable,
7792 moved from server.c.
7793 (linux_create_inferior): Renamed from create_inferior.
7794 Call add_inferior. Return 0 on success instead of a PID.
7795 (linux_attach): Renamed from myattach.
7796 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7797 (linux_thread_alive): Renamed from mythread_alive.
7798 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7800 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7801 (regsets_store_inferior_registers): Correct error message.
7802 Add missing ``return 0''.
7803 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7804 (linux_store_registers): Renamed from store_inferior_registers.
7805 (linux_read_memory): Renamed from read_inferior_memory.
7806 (linux_write_memory): Renamed from write_inferior_memory.
7807 (linux_target_ops): New structure.
7808 (initialize_low): Call set_target_ops ().
7809 * remote-utils.c (unhexify): New function.
7810 (hexify): New function.
7811 (input_interrupt): Send signals to ``signal_pid''.
7812 * server.c (inferior_pid): Remove.
7813 (start_inferior): Update create_inferior call.
7814 (attach_inferior): Call add_inferior.
7815 (handle_query): New function.
7816 (main): Call handle_query for `q' packets.
7817 * server.h: Include "target.h". Remove obsolete prototypes.
7818 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7820 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7822 * Makefile.in: Add WARN_CFLAGS. Update configury
7824 * configure.in: Check for <string.h>
7825 * configure: Regenerate.
7826 * config.in: Regenerate.
7827 * gdbreplay.c: Include needed system headers.
7828 (remote_open): Remove strchr prototype.
7829 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7830 * regcache.c (supply_register): Change buf argument to const void *.
7831 (supply_register_by_name): Likewise.
7832 (collect_register): Change buf argument to void *.
7833 (collect_register_by_name): Likewise.
7834 * regcache.h: Add missing prototypes.
7835 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7836 * server.c (handle_query): New function.
7837 (attached): New static variable, moved out of main.
7838 (main): Quiet longjmp clobber warnings.
7839 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7840 * utils.c (error): Remove NORETURN.