1 2013-03-08 Stan Shebs <stan@codesourcery.com>
2 Hafiz Abid Qadeer <abidh@codesourcery.com>
4 * tracepoint.c (trace_buffer_size): New global.
5 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6 (init_trace_buffer): Change to one-argument function. Allocate
8 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9 handle QTBuffer:size packet.
10 (cmd_bigqtbuffer_size): New function.
11 (initialize_tracepoint): Call init_trace_buffer with
12 DEFAULT_TRACE_BUFFER_SIZE.
13 * server.c (handle_query): Add QTBuffer:size in the
16 2013-03-07 Yao Qi <yao@codesourcery.com>
18 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
19 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
21 (cmd_qtsp): Adjust condition. Do post increment.
22 Set cur_action and cur_step_action back to 0.
24 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
27 * linux-low.c (linux_write_memory): Return early success if LEN is
30 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
32 * configure.srv: Add x86_64-*-cygwin* as target.
34 2013-02-28 Tom Tromey <tromey@redhat.com>
36 * configure.ac: Invoke AC_SYS_LARGEFILE.
37 * configure, config.in: Rebuild.
39 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
41 * win32-low.c: Throughout, fix format strings and casts of
42 printf-like functions to avoid type related warnings on all
44 (get_child_debug_event): Print dwDebugEventCode as hex since
45 that's how it's usually documented.
47 2013-02-28 Yao Qi <yao@codesourcery.com>
49 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
52 2013-02-27 Jiong Wang <jiwang@tilera.com>
54 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
55 (reg-tilegx32.c): New rule.
56 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
57 * linux-tile-low.c (tile_arch_setup): New function. Invoke
58 different register info initializer according to elf class.
59 (init_registers_tilgx32): New function. The tilegx32 register info
61 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
62 (tile_store_gregset): Likewise.
64 2013-02-27 Yao Qi <yao@codesourcery.com>
66 * server.c (process_point_options): Print debug message when
67 debug_threads is true.
69 2013-02-26 Yao Qi <yao@codesourcery.com>
71 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
73 2013-02-19 Pedro Alves <palves@redhat.com>
74 Kai Tietz <ktietz@redhat.com>
78 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
79 instead of strtoul to extract address from packet.
80 (process_serial_event) <'z'>: Likewise.
82 2013-02-18 Yao Qi <yao@codesourcery.com>
84 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
86 2013-02-14 Pedro Alves <palves@redhat.com>
90 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
91 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
93 2013-02-14 Pedro Alves <palves@redhat.com>
95 * tracepoint.c (cmd_qtdpsrc): Use savestring.
97 2013-02-14 Pedro Alves <palves@redhat.com>
99 * tracepoint.c (save_string): Delete.
100 (add_tracepoint_action): Use savestring instead of save_string.
102 2013-02-12 Pedro Alves <palves@redhat.com>
104 * linux-xtensa-low.c: Ditto.
105 * xtensa-xtregs.c: Ditto.
107 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
109 * thread-db.c (thread_db_get_tls_address): NULL pointer check
112 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
114 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
115 aarch64_num_wp_regs and aarch64_num_bp_regs to
116 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
118 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
120 * linux-aarch64-low.c (ps_get_thread_area): Replace
121 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
123 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
124 Marcus Shawcroft <marcus.shawcroft@arm.com>
125 Nigel Stephens <nigel.stephens@arm.com>
126 Yufeng Zhang <yufeng.zhang@arm.com>
128 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
129 (aarch64.c, aarch64-without-fpu.c): New targets.
130 * configure.srv (aarch64*-*-linux*): New.
131 * linux-aarch64-low.c: New file.
133 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
135 * linux-low.c (handle_extended_wait, linux_create_inferior)
136 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
137 (dequeue_one_deferred_signal, linux_resume_one_thread)
138 (fetch_register, linux_write_memory, linux_enable_event_reporting)
139 (linux_tracefork_grandchild, linux_test_for_tracefork)
140 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
141 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
142 where the argument is 0.
144 2013-01-25 Yao Qi <yao@codesourcery.com>
146 * event-loop.c: Include "queue.h".
147 (gdb_event_p): New typedef.
148 (struct gdb_event) <next_event>: Remove.
149 (event_queue): Change to QUEUE(gdb_event_p).
150 (async_queue_event): Remove.
151 (gdb_event_xfree): New.
152 (initialize_event_loop): New.
153 (process_event): Use API from QUEUE.
154 (wait_for_event): Likewise.
155 * server.c (main): Call initialize_event_loop.
156 * server.h (initialize_event_loop): Declare.
158 2013-01-18 Yao Qi <yao@codesourcery.com>
160 * ax.h (struct eval_agent_expr_context): New.
161 (gdb_eval_agent_expr): Update declaration.
162 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
163 TFRAME. Add new argument CTX.
164 * server.h (struct eval_agent_expr_context): Declare.
165 (agent_mem_read, agent_tsv_read): Update declaration.
166 (agent_mem_read_string): Likewise.
167 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
168 (add_traceframe_block): Add new argument TPOINT.
169 Increase TPOINT->traceframe_usage.
170 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
171 eval_tracepoint_agent_expr.
172 (condition_true_at_tracepoint): Likewise.
173 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
174 (agent_mem_read_string, agent_tsv_read): Likewise.
176 2013-01-16 Yao Qi <yao@codesourcery.com>
178 * linux-low.c (linux_resume_one_lwp): Don't check
179 'lwp->bp_reinsert != 0'.
181 2013-01-07 Joel Brobecker <brobecker@adacore.com>
182 Pedro Alves <palves@redhat.com>
184 * lynx-low.c (ptrace_request_to_str): Define a temporary
185 macro and use it to simplify this function's implementation.
187 2013-01-07 Joel Brobecker <brobecker@adacore.com>
189 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
192 2013-01-07 Joel Brobecker <brobecker@adacore.com>
194 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
196 2013-01-07 Joel Brobecker <brobecker@adacore.com>
198 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
200 2013-01-07 Joel Brobecker <brobecker@adacore.com>
202 * lynx-low.c (lynx_resume): Use the resume_info parameter
203 to determine the ptid for the lynx_ptrace call, unless
204 it is equal to minus_one_ptid, in which case we use the
205 ptid of the current_inferior.
206 (lynx_wait_1): After having received a thread create/exit
207 event, resume the inferior's execution using the signaling
208 thread's ptid, rather than the old ptid.
210 2013-01-07 Joel Brobecker <brobecker@adacore.com>
212 * lynx-low.c (lynx_resume): Delete variable ret.
214 2013-01-01 Joel Brobecker <brobecker@adacore.com>
216 * gdbreplay.c (gdbreplay_version): Update copyright year.
217 * server.c (gdbserver_version): Likewise.
219 2012-12-17 Joel Brobecker <brobecker@adacore.com>
221 * lynx-low.c (lynx_wait_1): Add debug trace before adding
224 2012-12-17 Joel Brobecker <brobecker@adacore.com>
226 * lynx-low.c (ptrace_request_to_str): Add handling for
229 2012-12-17 Joel Brobecker <brobecker@adacore.com>
231 * lynx-low.c (lynx_attach): Delete variable new_process.
233 2012-12-17 Joel Brobecker <brobecker@adacore.com>
235 * lynx-low.c (lynx_create_inferior): Delete variable
238 2012-12-17 Joel Brobecker <brobecker@adacore.com>
240 * lynx-low.c (ptrace_request_to_str): Do not handle
241 PTRACE_GETTHREADLIST if this macro does not exist.
243 2012-12-15 Yao Qi <yao@codesourcery.com>
245 * Makefile.in (OBS): Add notif.o.
246 * notif.c, notif.h: New.
247 * server.c: Include "notif.h".
248 (struct vstop_notif) <next>: Remove.
250 (queue_stop_reply): Update.
251 (push_event, send_next_stop_reply): Remove.
252 (discard_queued_stop_replies): Update.
253 (notif_stop): New variable.
254 (handle_v_stopped): Remove.
255 (handle_v_requests): Don't call handle_v_stopped. Call
256 handle_ack_notif instead.
257 (queue_stop_reply_callback): Call notif_event_enque instead
259 (handle_status): Don't call send_next_stop_reply, call
260 notif_write_event instead.
261 (kill_inferior_callback): Likewise.
262 (detach_or_kill_inferior_callback): Likewise.
263 (main): Call initialize_notif.
264 (process_serial_event): Call QUEUE_is_empty.
265 (handle_target_event): Call notif_push instead of push event.
266 * server.h (push_event): Remove declaration.
268 2012-12-10 Tom Tromey <tromey@redhat.com>
270 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
271 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
274 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
275 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
276 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
277 (amd64-linux-ipa.o, ax.o): Rewrite.
278 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
279 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
280 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
281 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
282 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
283 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
284 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
285 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
286 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
287 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
288 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
289 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
290 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
291 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
292 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
293 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
294 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
295 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
296 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
297 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
298 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
299 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
300 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
301 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
302 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
303 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
304 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
305 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
306 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
307 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
308 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
309 (reg-tilegx.o): Remove.
310 (all_object_files): New macro.
312 * aclocal.m4, configure: Rebuild.
313 * acinclude.m4: Include depstand.m4, lead-dot.m4.
314 * configure.ac: Invoke ZW_CREATE_DEPDIR,
315 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
317 2012-12-05 Tom Tromey <tromey@redhat.com>
320 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
322 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
324 * configure.ac: Check for linux/perf_event.h.
325 * config.in: Regenerated.
326 * configure: Regenerated.
328 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
330 * hostio.c (handle_readlink): Decrease buffer size
331 parameter passed to readlink by one byte.
333 2012-11-26 Yao Qi <yao@codesourcery.com>
335 * configure.ac (build_warnings): Append '-Wempty-body'.
336 * configure: Regenerated.
337 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
340 2012-11-15 Pierre Muller <muller@sourceware.org>
342 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
343 * config.in: Regenerate.
344 * configure: Regenerate.
345 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
346 Use "gdb_wait.h" header instead of <sys/wait.h> header.
347 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
348 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
350 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
351 instead of <sys/wait.h> header.
352 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
354 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
356 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
357 (various make rules): Remove -DGDBSERVER
359 2012-11-09 Yao Qi <yao@codesourcery.com>
361 * spu-low.c (current_ptid): Move it to ..
362 * gdbthread.h: ... here. New.
363 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
364 * server.c (myresume, process_serial_event): Likewise.
365 * thread-db.c (thread_db_find_new_threads): Likewise.
366 * tracepoint.c (run_inferior_command): Likewise.
368 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
370 * server.c (handle_search_memory_1): Include access length in
373 2012-09-05 Michael Brandt <michael.brandt@axis.com>
375 * linux-crisv32-low.c: Fix compile errors.
377 2012-09-04 Yao Qi <yao@codesourcery.com>
379 * tracepoint.c (cmd_qtsv): Adjust debug message.
380 Don't check CUR_TPOINT.
382 2012-08-28 Yao Qi <yao@codesourcery.com>
384 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
385 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
386 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
387 Remove declarations of xmalloc, xreallloc, xstrdup and
389 * Makefile.in (libiberty_h): New.
390 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
391 (linux-bfin-low.o): Append dependency 'libiberty.h'.
393 2012-08-23 Yao Qi <yao@codesourcery.com>
395 * server.h: Remove declaration of 'xsnprintf'.
397 2012-08-22 Keith Seitz <keiths@redhat.com>
399 * server.h: Include build-gnulib-gbserver/config.h.
400 * gdbreplay.c: Likewise.
402 2012-08-08 Doug Evans <dje@google.com>
404 * Makefile.in (SFILES): Add gdb_vecs.c.
405 (OBS): Add gdb_vecs.o.
406 (gdb_vecs_h, host_defs_h): New variables.
407 (thread-db.o): Add $(gdb_vecs_h) dependency.
408 (gdb_vecs.o): New rule.
409 * thread-db.c: #include "gdb_vecs.h".
410 (thread_db_load_search): Use a vector to iterate over path elements.
411 Handle text appearing after "$pdir".
413 * configure.ac: Add check for strstr.
414 * config.in: Regenerate.
415 * configure: Regenerate.
417 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
419 * hostio.c (handle_pread): If pread fails, fall back to attempting
421 (handle_pwrite): Likewise for pwrite.
423 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
425 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
426 between unsupported TYPE and unimplementable ADDR/LEN combination.
427 (arm_insert_point): Act on new return value.
429 2012-07-31 Pedro Alves <palves@redhat.com>
431 * server.c (process_point_options): Only skip tokens if we find
432 one that is unrecognized. Don't treat 'X' specially while
433 skipping unrecognized tokens.
435 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
437 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
438 to 4-byte-align HW breakpoint addresses for Thumb.
440 2012-07-27 Yao Qi <yao@codesourcery.com>
444 * server.h: Declare gdb_agent_about_to_close.
445 * target.c (kill_inferior): Include "agent.h".
446 New. Send command 'kill'.
447 * target.h (kill_inferior): Removed macro.
448 * tracepoint.c (gdb_agent_about_to_close): New.
449 (gdb_agent_helper_thread): Handle command 'close'.
450 Wait endlessly until the inferior stops.
451 Install gdb_agent_remove_socket to atexit hook.
452 (agent_socket_name): New static variable.
453 (gdb_agent_socket_init): Replace local variable 'name' with
455 (gdb_agent_remove_socket): New.
457 2012-07-27 Yao Qi <yao@codesourcery.com>
459 * server.c (process_point_options): Stop at 'X' when parsing.
461 2012-07-19 Michael Eager <eager@eagercon.com>
463 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
465 * linux-x86-low.c (x86_insert_point, x86_remove_point):
466 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
469 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
471 * gdbserver/linux-low.c (initialize_low): Call
472 linux_ptrace_init_warnings.
474 2012-07-02 Doug Evans <dje@google.com>
476 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
479 2012-07-02 Stan Shebs <stan@codesourcery.com>
481 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
482 (ax.o): Add it to build rule.
485 (IPA_OBS): Add format.o.
486 * server.c (handle_query): Claim support for breakpoint commands.
487 (process_point_options): Add command case.
488 (process_serial_event): Leave running if there are printfs in
490 * mem-break.h (any_persistent_commands): Declare.
491 (add_breakpoint_commands): Declare.
492 (gdb_no_commands_at_breakpoint): Declare.
493 (run_breakpoint_commands): Declare.
494 * mem-break.c (struct point_command_list): New struct.
495 (struct breakpoint): New field command_list.
496 (any_persistent_commands): New function.
497 (add_commands_to_breakpoint): New function.
498 (add_breakpoint_commands): New function.
499 (gdb_no_commands_at_breakpoint): New function.
500 (run_breakpoint_commands): New function.
501 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
503 * ax.c: Include format.h.
504 (ax_printf): New function.
505 (gdb_eval_agent_expr): Add printf opcode.
507 2012-06-13 Yao Qi <yao@codesourcery.com>
509 * server.c (start_inferior): Remove duplicated writes to fields
510 'last_resume_kind' and 'last_status' of 'current_inferior'.
512 2012-06-12 Yao Qi <yao@codesourcery.com>
513 Pedro Alves <palves@redhat.com>
515 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
517 * server.c (handle_v_cont): Extend comment.
519 2012-06-11 Yao Qi <yao@codesourcery.com>
521 * linux-low.c (linux_attach): Add 'static'.
523 2012-06-06 Yao Qi <yao@codesourcery.com>
525 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
527 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
529 Fix gcc -flto compilation warning.
530 * server.c (main): Make variable multi_mode and attach volatile.
532 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
534 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
535 if the platform doesn't know about it.
537 2012-05-30 Jeff Kenton <jkenton@tilera.com>
539 * Makefile.in (SFILES): Add linux-tile-low.c.
540 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
541 * configure.srv: Handle tilegx-*-linux*.
542 * linux-tile-low.c: New file.
544 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
546 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
548 2012-05-24 Pedro Alves <palves@redhat.com>
552 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
554 2012-05-24 Pedro Alves <palves@redhat.com>
558 Replace target_signal with gdb_signal throughout.
560 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
562 * linux-low.c (linux_store_registers): Avoid the copying sequence
563 when no data has been retrieved by ptrace.
565 2012-05-22 Will Deacon <will.deacon@arm.com>
567 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
568 Include asm/ptrace.h.
569 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
572 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
574 * linux-low.c (linux_store_registers): Don't re-retrieve data
575 with ptrace that has already been obtained from /proc. Always
576 copy any data retrieved with ptrace to the buffer supplied.
578 2012-05-11 Yao Qi <yao@codesourcery.com>
579 Pedro Alves <palves@redhat.com>
581 * linux-low.c (enum stopping_threads_kind): New.
582 (stopping_threads): Change type to `enum stopping_threads_kind'.
583 (handle_extended_wait): If stopping and suspending threads, leave
584 the new_lwp suspended too.
585 (linux_wait_for_event): Adjust.
586 (stop_all_lwps): Set `stopping_threads' to
587 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
588 whether we're suspending threads or just stopping them. Assert no
591 2012-04-29 Yao Qi <yao@codesourcery.com>
593 * server.h: Move some code to ...
594 * gdbthread.h: ... here. New.
595 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
596 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
597 (nto-low.o, win32-low.o): Likewise.
598 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
599 * regcache.c, remote-utils.c, server.c: Likewise.
600 * target.c, tracepoint.c, win32-low.c: Likewise.
602 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
604 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
605 (PTRACE_ARG4_TYPE): Likewise.
606 (PTRACE_XFER_TYPE): Likewise.
607 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
608 ptrace to PTRACE_ARG3_TYPE.
609 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
610 (PTRACE_ARG4_TYPE): Likewise.
611 (PTRACE_XFER_TYPE): Likewise.
612 (linux_detach_one_lwp): Cast fourth argument of
613 ptrace to long then PTRACE_ARG4_TYPE.
614 (regsets_fetch_inferior_registers): Cast third argument of
615 ptrace to long then PTRACE_ARG3_TYPE.
616 (regsets_store_inferior_registers): Likewise.
618 2012-04-20 Pedro Alves <palves@redhat.com>
620 * configure: Regenerate.
622 2012-04-19 Pedro Alves <palves@redhat.com>
624 * Makefile.in (GNULIB_BUILDDIR): New.
625 (LIBGNU, INCGNU, GNULIB_H): Adjust.
626 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
627 (all, install-only, uninstall, clean-info, all-lib, clean): No
628 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
629 (maintainer-clean realclean distclean): Use subdir_do.
631 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
632 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
633 * acinclude.m4: Include acx_configure_dir.m4.
634 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
635 calls. Call AC_PROG_RANLIB. Configure gnulib using
638 (GNULIB_STDINT_H): Adjust.
639 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
640 * gdbreplay.c: Include build-gnulib/config.h.
641 * server.h: Likewise.
642 * aclocal.m4: Regenerate.
643 * config.in: Regenerate.
644 * configure: Regenerate.
646 2012-04-19 Pedro Alves <palves@redhat.com>
648 * Makefile.in (LIBGNU, INCGNU): Adjust.
649 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
650 (all, install-only, uninstall, clean-info, all-lib, clean)
651 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
652 * configure.ac: Adjust AC_OUTPUT output.
653 * aclocal.m4: Regenerate.
654 * configure: Regenerate.
656 2012-04-19 Pedro Alves <palves@redhat.com>
658 * Makefile.in (generated_files): New.
659 (server_h): Remove the explicit dependency on config.h, and depend
662 2012-04-19 Pedro Alves <palves@redhat.com>
664 * Makefile.in (INCGNU): Add -Ignulib.
666 2012-04-19 Pedro Alves <palves@redhat.com>
668 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
669 (INCGNU): ... this, and spell out -I here.
670 (GNULIB_LIB): Rename to ...
672 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
674 2012-04-19 Pedro Alves <palves@redhat.com>
676 * config.in: Regenerate.
678 2012-04-19 Pedro Alves <palves@redhat.com>
680 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
681 * server.h (memmem): Remove declaration.
682 * config.in: Regenerate.
683 * configure: Regenerate.
685 2012-04-19 Yao Qi <yao@codesourcery.com>
687 * Makefile.in (SFILES): Add common/vec.c.
691 2012-04-19 Yao Qi <yao@codesourcery.com>
693 * remote-utils.c (prepare_resume_reply): Replace with macro
694 target_core_of_thread.
695 * server.c (handle_qxfer_threads_proper): Likewise.
696 * target.h (traget_core_of_thread): New macro.
698 2012-04-18 Pedro Alves <palves@redhat.com>
700 * aclocal.m4: Regenerate.
701 * configure: Regenerate.
703 2012-04-16 Yao Qi <yao@codesourcery.com>
705 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
706 duplicated on address.
708 2012-04-16 Yao Qi <yao@codesourcery.com>
710 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
711 (struct tracepoint_action_ops) <send>: New field.
712 (m_tracepoint_action_send, r_tracepoint_action_send): New.
713 (agent_expr_send, x_tracepoint_action_send): New.
714 (l_tracepoint_action_send): New.
715 (cmd_qtdp): Download and install tracepoint
716 according to `use_agent'.
717 (run_inferior_command): Add one more parameter `len'.
719 (tracepoint_send_agent): New.
720 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
722 2012-04-16 Yao Qi <yao@codesourcery.com>
724 * tracepoint.c (download_tracepoints): Moved to ...
725 (cmd_qtstart): ... here.
727 2012-04-14 Yao Qi <yao@codesourcery.com>
729 * tracepoint.c: Include inttypes.h.
730 (struct collect_memory_action): Use sized types.
731 (struct tracepoint): Likewise.
732 (cmd_qtdp, stop_tracing): Update print specifiers.
733 (cmd_qtp, response_tracepoint): Likewise.
734 (collect_data_at_tracepoint): Likewise.
735 (collect_data_at_step): Likewise.
737 2012-04-14 Yao Qi <yao@codesourcery.com>
739 Import gnulib module inttypes.
740 * aclocal.m4, config.in, configure: Regenerated.
742 2012-04-14 Yao Qi <yao@codesourcery.com>
744 * Makefile.in (maintainer-clean, realclean, distclean): Remove
745 Makefile and config.status at last.
747 2012-04-13 Yao Qi <yao@codesourcery.com>
749 * tracepoint.c: Include stdint.h unconditionally.
751 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
753 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
754 on BFD_HAVE_SYS_PROCFS_TYPE.
755 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
756 * configure: Regenerate.
757 * config.in: Likewise.
759 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
761 * Makefile.in (clean): Also remove x32.c x32-linux.c
762 x32-avx.c x32-avx-linux.c.
765 (x32-linux.o): Likewise.
766 (x32-linux.c): Likewise.
767 (x32-avx.o): Likewise.
768 (x32-avx.c): Likewise.
769 (x32-avx-linux.o): Likewise.
770 (x32-avx-linux.c): Likewise.
772 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
773 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
774 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
775 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
776 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
777 i386/x32-avx-linux.xml.
779 * linux-x86-low.c (init_registers_x32_linux): New prototype.
780 (init_registers_x32_avx_linux): Likwise.
781 (x86_linux_update_xmltarget): Call init_registers_x32_linux
782 or init_registers_x32_avx_linux if linux_is_elf64 is false.
784 2012-04-13 Pedro Alves <palves@redhat.com>
786 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
787 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
788 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
789 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
792 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
794 * linux-x86-low.c (compat_x32_clock_t): New.
795 (compat_x32_siginfo_t): Likewise.
796 (compat_x32_siginfo_from_siginfo): Likewise.
797 (siginfo_from_compat_x32_siginfo): Likewise.
798 (linux_is_elf64): Likewise.
799 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
800 and siginfo_from_compat_x32_siginfo for x32.
801 (x86_arch_setup): Set linux_is_elf64.
803 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
806 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
808 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
809 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
810 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
811 compatible with process.
813 2012-04-12 Yao Qi <yao@codesourcery.com>
815 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
816 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
817 (install-only, install-info, clean): Handle sub dir gnulib.
818 (all-lib, am--refresh): New targets.
819 (memmem.o): Remove target.
820 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
821 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
822 (AC_REPLACE_FUNCS): Remove memmem.
823 Invoke gl_INIT and AM_INIT_AUTOMAKE.
824 (AC_OUTPUT): Generate Makefile in gnulib/.
825 * aclocal.m4, config.in, configure: Regenerated.
827 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
829 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
831 2012-04-05 Pedro Alves <palves@redhat.com>
833 -Werror=strict-aliasing
835 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
838 2012-04-04 Pedro Alves <palves@redhat.com>
840 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
841 (sparc_store_gregset_from_stack, sparc_store_gregset)
842 (sparc_breakpoint_at): Fix formatting.
844 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
846 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
848 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
849 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
850 * config.in: Regenerate.
851 * configure: Likewise.
853 2012-03-29 Pedro Alves <palves@redhat.com>
855 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
856 Correct ptrace arguments.
858 2012-03-28 Pedro Alves <palves@redhat.com>
860 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
861 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
862 (IA64_FR1_REGNUM): New defines.
863 (ia64_fetch_register): New.
864 (the_low_target): Install it.
865 * linux-low.h (struct linux_target_ops) <fetch_register>: New
867 * linux-low.c (linux_fetch_registers): Try the
868 the_low_target.fetch_register hook first.
870 * linux-arm-low.c (the_low_target): Adjust.
871 * linux-bfin-low.c (the_low_target): Adjust.
872 * linux-cris-low.c (the_low_target): Adjust.
873 * linux-crisv32-low.c (the_low_target): Adjust.
874 * linux-m32r-low.c (the_low_target): Adjust.
875 * linux-m68k-low.c (the_low_target): Adjust.
876 * linux-mips-low.c (the_low_target): Adjust.
877 * linux-ppc-low.c (the_low_target): Adjust.
878 * linux-s390-low.c (the_low_target): Adjust.
879 * linux-sh-low.c (the_low_target): Adjust.
880 * linux-sparc-low.c (the_low_target): Adjust.
881 * linux-tic6x-low.c (the_low_target): Adjust.
882 * linux-x86-low.c (the_low_target): Adjust.
883 * linux-xtensa-low.c (the_low_target): Adjust.
885 2012-03-26 Pedro Alves <palves@redhat.com>
887 * server.c (handle_qxfer_libraries): Don't bail early if
888 the_target->qxfer_libraries_svr4 is not NULL.
890 2012-03-26 Pedro Alves <palves@redhat.com>
892 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
894 2012-03-23 Pedro Alves <palves@redhat.com>
896 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
897 "library-list-svr4" element's start tag when the the DSO list is
900 2012-03-23 Pedro Alves <palves@redhat.com>
902 * linux-low.c (read_one_ptr): Read the inferior's pointer through
903 a variable whose type size is the same as the inferior's pointer
906 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
908 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
910 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
911 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
912 * linux-low.h: Include <signal.h>.
913 (struct siginfo): Remove forward declaration.
914 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
917 2012-03-21 Mike Frysinger <vapier@gentoo.org>
919 * .gitignore: Ignore more files.
921 2012-03-19 Pedro Alves <palves@redhat.com>
922 Jan Kratochvil <jan.kratochvil@redhat.com>
924 * server.c (cont_thread, general_thread): Add describing comments.
925 (start_inferior): Clear `cont_thread'.
926 (handle_v_cont): Don't set `cont_thread' if resuming all threads
929 2012-03-15 Yao Qi <yao@codesourcery.com>
931 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
933 (cmd_qtdp): ... here.
935 2012-03-15 Yao Qi <yao@codesourcery.com>
937 * tracepoint.c (struct tracepoint_action_ops): New.
938 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
939 (m_tracepoint_action_download): New.
940 (r_tracepoint_action_download): New.
941 (x_tracepoint_action_download): New.
942 (l_tracepoint_action_download): New.
943 (add_tracepoint_action): Install `action->ops' according type.
944 (download_tracepoint_1): Move code `download' function pointer
945 of various tracepoint_action_ops.
947 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
949 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
950 linux_ptrace_attach_warnings.
952 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
954 * Makefile.in (linux-ptrace.o): New.
955 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
956 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
957 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
958 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
959 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
961 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
963 2012-03-08 Yao Qi <yao@codesourcery.com>
964 Pedro Alves <palves@redhat.com>
967 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
969 * tracepoint.c (remove_tracepoint): New.
970 (cmd_qtdp): Call remove_tracepoint when failed to install.
972 2012-03-07 Pedro Alves <palves@redhat.com>
974 * linux-low.c (get_detach_signal): New.
975 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
976 Pass on pending signals to PTRACE_DETACH. Check the result of the
978 * server.c (program_signals, program_signals_p): New.
979 (handle_general_set): Handle QProgramSignals.
980 * server.h (program_signals, program_signals_p): Declare.
982 2012-03-05 Pedro Alves <palves@redhat.com>
983 Jan Kratochvil <jan.kratochvil@redhat.com>
985 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
988 2012-03-03 Yao Qi <yao@codesourcery.com>
990 * tracepoint.c (tracepoint_look_up_symbols): Update call to
991 agent_look_up_symbols.
993 2012-03-03 Yao Qi <yao@codesourcery.com>
995 * Makefile.in (linux-low.o): Keep dependence on agent.h.
996 (linux-x86-low.o): Likewise.
997 * server.h: Remove in_process_agent_loaded.
998 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1002 2012-03-03 Yao Qi <yao@codesourcery.com>
1004 * tracepoint.c (gdb_agent_capability): New global.
1005 (in_process_agent_loaded_ust): Renamed to
1006 `in_process_agent_supports_ust'.
1008 (in_process_agent_supports_ust): Call agent_capability_check.
1009 (clear_installed_tracepoints): Assert that agent supports
1012 2012-03-03 Yao Qi <yao@codesourcery.com>
1014 * linux-low.c (linux_supports_agent): New.
1015 (linux_target_ops): Initialize field `supports_agent' with
1016 linux_supports_agent.
1017 * target.h (struct target_ops) <supports_agent>: New.
1018 (target_supports_agent): New macro.
1019 * server.c (handle_general_set): Handle packet 'QAgent'.
1020 (handle_query): Send `QAgent+'.
1021 * Makefile.in (server.o): Depends on agent.h.
1023 2012-03-03 Yao Qi <yao@codesourcery.com>
1025 * Makefile.in (OBS): Add agent.o.
1026 Add new rule for agent.o.
1027 Track dependence of tracepoint.c on agent.h.
1028 * tracepoint.c (run_inferior_command_1):
1029 (run_inferior_command): Call agent_run_command.
1030 (gdb_ust_connect_sync_socket): Deleted. Move it to
1032 (resume_thread, stop_thread): Likewise.
1033 (gdb_ust_socket_init): Renamed to ...
1034 (gdb_agent_socket_init): ... New.
1035 (gdb_ust_thread): Renamed to ...
1036 (gdb_agent_helper_thread): ... New.
1037 (gdb_ust_init): Move some code to ...
1038 (gdb_agent_init): ... here. New.
1039 [HAVE_UST]: Call gdb_ust_init.
1040 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1041 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1042 * config.in, configure: Regenerated.
1044 2012-03-02 Pedro Alves <palves@redhat.com>
1046 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1047 * linux-low.c (struct simple_pid_list): New.
1048 (stopped_pids): New a struct simple_pid_list pointer.
1049 (add_to_pid_list, pull_pid_from_list): New.
1050 (handle_extended_wait): Don't assume the first signal new children
1051 report is SIGSTOP. Adjust call to pull_pid_from_list.
1052 (linux_wait_for_lwp): Adjust.
1054 2012-03-02 Yao Qi <yao@codesourcery.com>
1056 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1059 2012-03-02 Yao Qi <yao@codesourcery.com>
1061 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1062 `stop_pc' and `tpoint'. Update caller.
1064 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1066 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1067 * linux-low.c (use_linux_regsets): New macro.
1068 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1069 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1070 (linux_register_in_regsets): New function.
1071 (usr_fetch_inferior_registers): Skip registers covered by
1073 (usr_store_inferior_registers): Likewise.
1074 (usr_fetch_inferior_registers): New macro.
1075 (usr_store_inferior_registers): Likewise.
1076 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1077 (linux_store_registers): Likewise.
1078 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1080 (init_registers_mips64_dsp_linux): Likewise.
1081 (init_registers_mips_linux): New macro.
1082 (init_registers_mips_dsp_linux): Likewise.
1083 (mips_dsp_num_regs): Likewise.
1084 (DSP_BASE, DSP_CONTROL): New fallback macros.
1085 (mips_base_regs): New macro.
1086 (mips_regmap): Use it. Fix the size.
1087 (mips_dsp_regmap): New variable.
1088 (mips_dsp_regset_bitmap): Likewise.
1089 (mips_arch_setup): New function.
1090 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1092 (mips_cannot_store_register): Likewise.
1093 (the_low_target): Update .arch_setup, .num_regs and .regmap
1094 initializers. Add .regset_bitmap initializer.
1095 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1097 * linux-bfin-low.c (the_low_target): Likewise.
1098 * linux-cris-low.c (the_low_target): Likewise.
1099 * linux-crisv32-low.c (the_low_target): Likewise.
1100 * linux-ia64-low.c (the_low_target): Likewise.
1101 * linux-m32r-low.c (the_low_target): Likewise.
1102 * linux-m68k-low.c (the_low_target): Likewise.
1103 * linux-ppc-low.c (the_low_target): Likewise.
1104 * linux-s390-low.c (the_low_target): Likewise.
1105 * linux-sh-low.c (the_low_target): Likewise.
1106 * linux-sparc-low.c (the_low_target): Likewise.
1107 * linux-tic6x-low.c (the_low_target): Likewise.
1108 * linux-x86-low.c (the_low_target): Likewise.
1109 * linux-xtensa-low.c (the_low_target): Likewise.
1110 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1111 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1112 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1114 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1115 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1117 2012-02-29 Yao Qi <yao@codesourcery.com>
1118 Pedro Alves <palves@redhat.com>
1120 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1121 `step_over_finished' is true.
1123 2012-02-27 Pedro Alves <palves@redhat.com>
1125 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1126 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1128 2012-02-27 Pedro Alves <palves@redhat.com>
1131 * linux-low.c (pid_is_stopped): New.
1132 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1134 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1136 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1139 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1141 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1143 2012-02-24 Luis Machado <lgustavo@codesourcery>
1145 * server.c (handle_query): Advertise support for target-side
1146 breakpoint condition evaluation.
1147 (process_point_options): New function.
1148 (process_serial_event): When inserting a breakpoint, check for
1149 a target-side condition that should be evaluated.
1151 * mem-break.c: Include regcache.h and ax.h.
1152 (point_cond_list_t): New data structure.
1153 (breakpoint) <cond_list>: New field.
1154 (find_gdb_breakpoint_at): Make non-static.
1155 (delete_gdb_breakpoint_at): Clear any target-side
1157 (clear_gdb_breakpoint_conditions): New function.
1158 (add_condition_to_breakpoint): Likewise.
1159 (add_breakpoint_condition): Likewise.
1160 (gdb_condition_true_at_breakpoint): Likewise.
1161 (gdb_breakpoint_here): Return result directly instead
1162 of going through a local variable.
1164 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1165 (clear_gdb_breakpoint_conditions): Likewise.
1166 (add_breakpoint_condition): Likewise.
1167 (gdb_condition_true_at_breakpoint): Likewise.
1169 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1170 (need_step_over_p): Take target-side breakpoint condition into
1173 2012-02-24 Luis Machado <lgustavo@codesourcery>
1175 * server.h: Include tracepoint.h.
1176 (agent_mem_read, agent_get_trace_state_variable_value,
1177 agent_set_trace_state_variable_value,
1178 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1179 get_set_tsv_func_addr): New prototypes.
1181 * ax.h: New include file.
1182 * ax.c: New source file.
1184 * tracepoint.c: Include ax.h.
1185 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1186 agent_expr, eval_result_type): Move to ax.h.
1187 (parse_agent_expr): Rename to ...
1188 (gdb_parse_agent_expr): ... this, make it non-static and move
1190 (unparse_agent_expr) Rename to ...
1191 (gdb_unparse_agent_expr): ... this, make it non-static and move
1193 (eval_agent_expr): Rename to ...
1194 (eval_tracepoint_agent_expr): ... this.
1195 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1196 forward declarations.
1197 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1198 (agent_get_trace_state_variable_value): New function.
1199 (agent_set_trace_state_variable_value): New function.
1200 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1201 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1202 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1203 (condition_true_at_tracepoint): Likewise.
1204 (parse_agent_expr): Rename to ...
1205 (gdb_parse_agent_expr): ... this and move to ax.c.
1206 (unparse_agent_expr): Rename to ...
1207 (gdb_unparse_agent_expr): ... this and move to ax.c.
1208 (gdb_agent_op_name): Move to ax.c.
1209 (eval_agent_expr): Rename to ...
1210 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1212 (eval_tracepoint_agent_expr): New function.
1213 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1215 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1217 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1218 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1219 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1220 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1221 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1222 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1223 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1224 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1225 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1226 (compile_bytecodes): Remove forward declaration.
1227 (is_goto_target): Move to ax.c.
1228 (compile_bytecodes): Move to ax.c and call
1229 agent_get_trace_state_variable_value (...) and
1230 agent_set_trace_state_variable_value (...).
1232 * Makefile.in: Update ax.c and IPA dependencies.
1234 2012-02-24 Pedro Alves <palves@redhat.com>
1236 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1237 (cmd_bigqtbuffer_circular): ... this. Only handle
1238 'QTBuffer:circular:'.
1239 (handle_tracepoint_general_set): Adjust.
1241 2012-02-16 Yao Qi <yao@codesourcery.com>
1243 * inferiors.c: Move code to ...
1244 * dll.c: .... here. New.
1245 * server.h: Declare clear_dlls.
1246 * Makefile.in (SFILES): Add dll.c.
1250 2012-02-11 Yao Qi <yao@codesourcery.com>
1252 * server.c: (handle_monitor_command): Add a new parameter
1254 (handle_query): Update caller.
1256 2012-02-09 Joel Brobecker <brobecker@adacore.com>
1258 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1259 * configure, config.in: Regenerate.
1260 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1263 2012-02-02 Pedro Alves <palves@redhat.com>
1265 Try SIGKILL first, then PTRACE_KILL.
1266 * linux-low.c (linux_kill_one_lwp): New.
1267 (linux_kill_one_lwp): Rename to ...
1268 (kill_one_lwp_callback): ... this. Use the new
1271 2012-02-02 Pedro Alves <palves@redhat.com>
1273 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1276 2012-01-27 Pedro Alves <palves@redhat.com>
1278 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1279 (elf_64_file_p): Make static.
1280 (linux_pid_exe_is_elf_64_file): New.
1281 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1282 Delete declarations.
1283 (linux_pid_exe_is_elf_64_file): Declare.
1284 * linux-x86-low.c (x86_arch_setup): Use
1285 linux_pid_exe_is_elf_64_file.
1287 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1289 * linux-low.c (linux_wait_for_event_1): Rename to ...
1290 (linux_wait_for_event): ... here and merge it with former
1291 linux_wait_for_event - new variable wait_ptid, use it.
1292 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1294 2012-01-23 Pedro Alves <palves@redhat.com>
1296 * server.c (main): Avoid yet another case of infinite loop while
1297 detaching/killing after a longjmp.
1299 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1302 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1304 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1306 * hostio.c (handle_readlink): New function.
1307 (handle_vFile): Call it to handle "vFile:readlink" packets.
1309 2012-01-20 Pedro Alves <palves@redhat.com>
1310 Ulrich Weigand <ulrich.weigand@linaro.org>
1312 * server.c (handle_v_requests): Only support vAttach and vRun to
1313 start multiple processes when in extended protocol mode.
1315 2012-01-17 Pedro Alves <palves@redhat.com>
1317 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1318 memalign plus mprotect to allocate the scratch buffer.
1320 2012-01-13 Pedro Alves <palves@redhat.com>
1322 * server.c (attach_inferior): Clear `cont_thread'.
1324 2012-01-13 Pedro Alves <palves@redhat.com>
1326 * server.c (main): Avoid infinite loop while detaching/killing
1329 2012-01-09 Doug Evans <dje@google.com>
1331 * server.c (start_inferior): Set last_ptid in --wrapper case.
1333 2012-01-06 Yao Qi <yao@codesourcery.com>
1335 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1337 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1339 2012-01-04 Yao Qi <yao@codesourcery.com>
1341 * tracepoint.c (cmd_qtdp): Print debug message
1342 for static tracepoint.
1344 2012-01-04 Yao Qi <yao@codesourcery.com>
1346 * tracepoint.c (trace_vdebug): Differentiate debug message
1347 between gdbserver and IPA.
1349 2012-01-03 Yao Qi <yao@codesourcery.com>
1351 * tracepoint.c (tracepoint_was_hit): Don't collect for
1354 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1356 * terminal.h: Reformat copyright header.
1358 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1360 * server.c (gdbserver_version): Update copyright year.
1361 * gdbreplay.c (gdbreplay_version): Likewise.
1363 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1365 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1368 2011-12-18 Hui Zhu <teawater@gmail.com>
1369 * linux-low.c (linux_create_inferior): Save return value to ret.
1371 2011-12-18 Hui Zhu <teawater@gmail.com>
1373 * linux-low.c (linux_create_inferior): Save return value to ret.
1375 2011-12-16 Doug Evans <dje@google.com>
1377 * linux-low.c (linux_create_inferior): If stdio connection,
1378 redirect stdin from /dev/null, stdout to stderr.
1379 * remote-utils.c (remote_is_stdio): New static global.
1380 (remote_connection_is_stdio): New function.
1381 (remote_prepare): Handle stdio connection.
1382 (remote_open): Ditto.
1383 (remote_close): Don't close stdin for stdio connections.
1384 (read_prim,write_prim): New functions. Replace all calls to
1385 read/write to these.
1386 * server.c (main): Watch for "-" argument. Move call to
1387 remote_prepare before start_inferior.
1388 * server.h (STDIO_CONNECTION_NAME): New macro.
1389 (remote_connection_is_stdio): Declare.
1391 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1392 in debugging output.
1394 2011-12-15 Yao Qi <yao@codesourcery.com>
1396 * tracepoint.c: Include sys/syscall.h.
1397 (gdb_ust_thread): Remove preprocessor conditional.
1399 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1401 * linux-low.c (linux_detach_one_lwp): Call
1402 the_low_target.prepare_to_resume before detaching.
1404 2011-12-14 Yao Qi <yao@codesourcery.com>
1406 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1409 2011-12-14 Yao Qi <yao@codesourcery.com>
1411 * i386-low.c (i386_low_stopped_data_address): Initialize local
1414 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1418 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1419 DR_CONTROL unless necessary. Extend comments.
1420 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1421 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1423 2011-12-13 Yao Qi <yao@codesourcery.com>
1425 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1427 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1429 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1431 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1432 Print new debug message for such case.
1434 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1436 Fix overlapping memcpy.
1437 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1438 the read_inferior_memory transfer.
1439 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1440 write_inferior_memory transfer.
1441 (set_fast_tracepoint_jump): New variable buf. Use it for the
1442 read_inferior_memory and write_inferior_memory transfers.
1443 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1444 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1445 Use it for the write_inferior_memory transfer.
1446 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1449 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1451 * linux-low.c (fetch_register, store_register): Make code
1452 consistent, fix formatting.
1454 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1456 * linux-low.c (usr_store_inferior_registers): Factor out code
1457 to handle individual registers into...
1458 (store_register): ... this new function.
1460 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1462 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1463 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1464 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1465 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1466 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1467 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1468 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1469 (srv_xmlfiles): Add new XML files.
1471 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1473 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1474 (init_registers_s390_linux32v1): Add prototype.
1475 (init_registers_s390_linux32v2): Likewise.
1476 (init_registers_s390_linux64v1): Likewise.
1477 (init_registers_s390_linux64v2): Likewise.
1478 (init_registers_s390x_linux64v1): Likewise.
1479 (init_registers_s390x_linux64v2): Likewise.
1480 (s390_num_regs): Increment to 52.
1481 (s390_regmap): Add orig_r2 register.
1482 (s390_num_regs_3264): Increment to 68.
1483 (s390_regmap_3264): Add orig_r2 register.
1484 (s390_collect_ptrace_register): Handle orig_r2 register.
1485 (s390_supply_ptrace_register): Likewise.
1486 (s390_fill_last_break): New function.
1487 (s390_store_last_break): Likewise.
1488 (s390_fill_system_call): New function.
1489 (s390_store_system_call): Likewise.
1490 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1492 (s390_check_regset): New function.
1493 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1494 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1495 Update target_regsets for available register sets.
1497 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1498 Jan Kratochvil <jan.kratochvil@redhat.com>
1500 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1501 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1503 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1504 * linux-low.h (struct process_info_private): New member r_debug.
1505 * server.c (handle_qxfer_libraries): Call
1506 the_target->qxfer_libraries_svr4.
1507 (handle_qxfer_libraries_svr4): New function.
1508 (qxfer_packets): New entry "libraries-svr4".
1509 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1510 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1511 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1512 PACKET_qXfer_libraries_svr4.
1514 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1516 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1517 PSW address/mask between 8-byte and 16-byte formats.
1518 (s390_supply_ptrace_register): Likewise.
1519 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1520 basic addressing mode bit.
1522 2011-11-24 Stan Shebs <stan@codesourcery.com>
1524 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1526 2011-11-17 Stan Shebs <stan@codesourcery.com>
1528 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1529 (tracing_start_time): New global.
1530 (tracing_stop_time): New global.
1531 (tracing_user_name): New global.
1532 (tracing_notes): New global.
1533 (tracing_stop_note): New global.
1534 (cmd_qtstart): Set traceframe_usage, start_time.
1535 (stop_tracing): Set stop_time.
1536 (cmd_qtstatus): Report additional status.
1537 (cmd_qtp): New function.
1538 (handle_tracepoint_query): Call it.
1539 (cmd_qtnotes): New function.
1540 (handle_tracepoint_general_set): Call it.
1541 (get_timestamp): Rename from tsv_get_timestamp.
1543 2011-11-14 Stan Shebs <stan@codesourcery.com>
1544 Kwok Cheung Yeung <kcy@codesourcery.com>
1546 * linux-x86-low.c (small_jump_insn): New.
1547 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1548 trampoline and error message, build a trampoline and issue a small
1549 jump instruction to it.
1550 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1551 trampoline and error message.
1552 (x86_get_min_fast_tracepoint_insn_len): New.
1553 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1554 * linux-low.h (struct linux_target_ops): Add arguments to
1555 install_fast_tracepoint_jump_pad operation, add new operation.
1556 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1558 (linux_get_min_fast_tracepoint_insn_len): New function.
1559 (linux_target_op): Add new operation.
1560 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1561 (gdb_trampoline_buffer_end): Ditto.
1562 (gdb_trampoline_buffer_error): Ditto.
1563 (struct ipa_sym_addresses): Add fields for new IPA variables.
1564 (symbol_list): Add entries for new IPA variables.
1565 (struct tracepoint): Add fields to hold the address range of the
1566 trampoline used by the tracepoint.
1567 (trampoline_buffer_head): New static variable.
1568 (trampoline_buffer_tail): Ditto.
1569 (claim_trampoline_space): New function.
1570 (have_fast_tracepoint_trampoline_buffer): New function.
1571 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1573 (install_fast_tracepoint): Ditto, also add error buffer argument.
1574 (cmd_qtminftpilen): New function.
1575 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1576 (fast_tracepoint_from_trampoline_address): New function.
1577 (fast_tracepoint_collecting): Handle trampoline as part of jump
1579 (set_trampoline_buffer_space): New function.
1580 (initialize_tracepoint): Initialize new IPA variables.
1581 * target.h (struct target_ops): Add arguments to
1582 install_fast_tracepoint_jump_pad operation, add new
1583 get_min_fast_tracepoint_insn_len operation.
1584 (target_get_min_fast_tracepoint_insn_len): New.
1585 (install_fast_tracepoint_jump_pad): Add arguments.
1586 * server.h (IPA_BUFSIZ): Define.
1587 * linux-i386-ipa.c: Include extra header files.
1588 (initialize_fast_tracepoint_trampoline_buffer): New function.
1589 (initialize_low_tracepoint): Call it.
1590 * server.h (set_trampoline_buffer_space): Declare.
1591 (claim_trampoline_space): Ditto.
1592 (have_fast_tracepoint_trampoline_buffer): Ditto.
1594 2011-11-14 Yao Qi <yao@codesourcery.com>
1596 * server.c (handle_query): Handle InstallInTrace for qSupported.
1597 * tracepoint.c (add_tracepoint): Sort list.
1598 (install_tracepoint, download_tracepoint): New.
1599 (cmd_qtdp): Call them to install and download tracepoints.
1600 (sort_tracepoints): Removed.
1601 (cmd_qtstart): Update.
1603 2011-11-14 Yao Qi <yao@codesourcery.com>
1605 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1606 * mem-break.h: Declare.
1607 * tracepoint.c (cmd_qtstart): Move some code to ...
1608 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1610 (download_tracepoints): Move some code to ...
1611 (download_tracepoint_1): ... here. New.
1613 2011-11-08 Yao Qi <yao@codesourcery.com>
1615 * remote-utils.c (relocate_instruction): A comment fix.
1617 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1619 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1620 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1621 dr_status_mirror and dr_control_mirror from debug_reg_state.
1622 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1623 (i386_initial_stuff): Remove use of deleted globals.
1624 (i386_get_thread_context, i386_set_thread_context,
1625 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1626 from debug_reg_state.
1628 2011-11-05 Yao Qi <yao@codesourcery.com>
1630 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1631 address as TPOINT's.
1633 2011-11-02 Stan Shebs <stan@codesourcery.com>
1635 * tracepoint.c (agent_mem_read_string): New function.
1636 (eval_agent_expr): Call it for tracenz.
1637 * server.c (handle_query): Report support for tracenz.
1639 2011-11-02 Yao Qi <yao@codesourcery.com>
1641 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1643 2011-11-02 Yao Qi <yao@codesourcery.com>
1645 * target.h: Fix a typo in comment.
1647 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1649 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1650 clobber the breakpoints' shadows with fast tracepoint jumps.
1651 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1652 * target.c (write_inferior_memory): Also pass MYADDR down to
1655 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1657 * configure.ac: Check support for personality routine.
1658 * configure: Regenerate.
1659 * config.in: Likewise.
1660 * linux-low.c: Include <sys/personality.h>.
1661 Define ADDR_NO_RANDOMIZE if necessary.
1662 (linux_create_inferior): Disable address space randomization when
1663 forking inferior, if requested.
1664 (linux_supports_disable_randomization): New function.
1665 (linux_target_ops): Install it.
1666 * server.h (disable_randomization): Declare.
1667 * server.c (disable_randomization): New global variable.
1668 (handle_general_set): Handle QDisableRandomization.
1669 (handle_query): Likewise for qSupported.
1670 (main): Support --disable-randomization and --no-disable-randomization
1671 command line arguments.
1672 * target.h (struct target_ops): Add supports_disable_randomization.
1673 (target_supports_disable_randomization): New macro.
1675 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1677 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1679 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1680 [!PT_GETDSBT] (target_loadmap): New definition.
1681 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1682 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1683 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1684 and PT_GETDSBT to LINUX_LOADMAP.
1685 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1686 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1688 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1690 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1691 (arm_linux_hwbp_cap): New static variable.
1692 (arm_linux_get_hwbp_cap): Replace by ...
1693 (arm_linux_init_hwbp_cap): ... this new function.
1694 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1695 (arm_linux_get_hw_watchpoint_count): Likewise.
1696 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1697 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1698 (arm_prepare_to_resume): Use perror_with_name instead of error.
1700 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1702 * linux-arm-low.c: Include <signal.h>.
1703 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1704 (struct arm_linux_hwbp_cap): New data type.
1705 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1706 (struct arm_linux_hw_breakpoint): New data type.
1707 (MAX_BPTS, MAX_WPTS): Define.
1708 (struct arch_process_info, struct arch_lwp_info): New data types.
1709 (arm_linux_get_hwbp_cap): New function.
1710 (arm_linux_get_hw_breakpoint_count): Likewise.
1711 (arm_linux_get_hw_watchpoint_count): Likewise.
1712 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1713 (arm_hwbp_control_initialize): Likewise.
1714 (arm_hwbp_control_is_enabled): Likewise.
1715 (arm_hwbp_control_is_initialized): Likewise.
1716 (arm_hwbp_control_disable): Likewise.
1717 (arm_linux_hw_breakpoint_equal): Likewise.
1718 (arm_linux_hw_point_initialize): Likewise.
1719 (struct update_registers_data): New data structure.
1720 (update_registers_callback: New function.
1721 (arm_insert_point): Likewise.
1722 (arm_remove_point): Likewise.
1723 (arm_stopped_by_watchpoint): Likewise.
1724 (arm_stopped_data_address): Likewise.
1725 (arm_new_process): Likewise.
1726 (arm_new_thread): Likewise.
1727 (arm_prepare_to_resume): Likewise.
1728 (the_low_target): Register arm_insert_point, arm_remove_point,
1729 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1730 arm_new_thread, and arm_prepare_to_resume.
1732 2011-09-15 Stan Shebs <stan@codesourcery.com>
1734 * server.h (struct emit_ops): Add compare-goto fields.
1735 * tracepoint.c (gdb_agent_op_sizes): New table.
1736 (emit_eq_goto): New function.
1737 (emit_ne_goto): New function.
1738 (emit_lt_goto): New function.
1739 (emit_le_goto): New function.
1740 (emit_gt_goto): New function.
1741 (emit_ge_goto): New function.
1742 (is_goto_target): New function.
1743 (compile_bytecodes): Recognize special cases of compare-goto
1744 combinations and call specialized emitters for them.
1745 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1746 (amd64_emit_ne_goto): New function.
1747 (amd64_emit_lt_goto): New function.
1748 (amd64_emit_le_goto): New function.
1749 (amd64_emit_gt_goto): New function.
1750 (amd64_emit_ge_goto): New function.
1751 (amd64_emit_ops): Add the new functions.
1752 (i386_emit_eq_goto): New function.
1753 (i386_emit_ne_goto): New function.
1754 (i386_emit_lt_goto): New function.
1755 (i386_emit_le_goto): New function.
1756 (i386_emit_gt_goto): New function.
1757 (i386_emit_ge_goto): New function.
1758 (i386_emit_ops): Add the new functions.
1760 2011-09-08 Stan Shebs <stan@codesourcery.com>
1762 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1763 (i386_emit_epilogue): Restore %ebx.
1765 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1767 * server.c (step_thread): Remove definition.
1768 (process_serial_event): Don't handle Hs.
1769 * server.h (step_thread): Remove declaration.
1770 * target.c (set_desired_inferior): Remove use of step_thread.
1772 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1774 * linux-low.c: Include linux-procfs.h.
1775 (linux_attach_lwp_1): Update comments.
1776 (linux_attach): Scan for existing threads when attaching to a
1777 process that is the tgid.
1778 * Makefile.in: Update dependencies.
1780 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1782 * configure.srv: Add linux-procfs.o dependencies.
1784 2011-08-14 Yao Qi <yao@codesourcery.com>
1786 * target.h (struct target_ops): Fix indent.
1787 * win32-low.c (win32_target_ops): Fix comment.
1789 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1790 Yao Qi <yao@codesourcery.com>
1792 * Makefile.in (clean): Remove tic6x-*.c files.
1793 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1794 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1795 (tic6x-c64xp-linux.c): Likewise.
1796 * configure.srv: Add support for tic6x-*-uclinux.
1797 * linux-tic6x-low.c: New.
1798 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1800 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1801 Yao Qi <yao@codesourcery.com>
1803 * target.h (struct target_ops): Add read_loadmap.
1804 * linux-low.c (struct target_loadseg): New type.
1805 (struct target_loadmap): New type.
1806 (linux_read_loadmap): New function.
1807 (linux_target_ops): Add linux_read_loadmap.
1808 * server.c (handle_query): Support qXfer:fdpic:read packet.
1809 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1812 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1814 * win32-low.c: Include <stdint.h>.
1816 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1818 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1819 to the inferior here.
1820 (i386_remove_aligned_watchpoint): Ditto.
1821 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1822 fit part of the watchpoint in the debug registers.
1823 (i386_update_inferior_debug_regs): New.
1824 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1825 registers, and only update the inferior on success.
1826 (i386_low_remove_watchpoint): Ditto.
1828 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1830 * linux-low.c (compare_ints, unique, list_threads, show_process,
1831 linux_core_of_thread): Delete.
1832 (linux_target_ops): Change linux_core_of_thread to
1833 linux_common_core_of_thread.
1834 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1835 * utils.c (malloc_failure): Change type of argument.
1836 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1837 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1838 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1839 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1840 (IPA_OBJS): Add common-utils-ipa.o.
1841 (ptid_h, linux_osdata_h): New macros.
1842 (server_h): Add common/common-utils.h, common/xml-utils.h,
1843 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1845 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1846 ptid.o, buffer.o): New rules.
1847 (linux-low.o): Add common/linux-osdata.h as a dependency.
1848 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1849 * configure.ac: Add AC_HEADER_DIRENT check.
1850 * config.in: Regenerate.
1851 * configure: Regenerate.
1852 * remote-utils.c (xml_escape_text): Delete.
1853 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1854 buffer_xml_printf): Move to common/buffer.c.
1855 * server.c (main): Remove call to initialize_inferiors.
1856 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1857 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1858 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1859 internal_error, gdb_assert, gdb_assert_fail): Delete.
1860 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1861 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1863 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1864 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1865 initialize_inferiors): Delete.
1867 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1869 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1872 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1874 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1876 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1878 2011-05-26 Yao Qi <yao@codesourcery.com>
1880 * Makefile.in (thread-db.o): Track dependence to
1881 common/gdb_thread_db.h.
1882 * thread-db.c: include gdb_thread_db.h from right place.
1884 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1886 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1887 __FILE__ and __LINE__ to internal_error.
1889 2011-05-13 Doug Evans <dje@google.com>
1891 * thread-db.c (try_thread_db_load_from_sdir): New function.
1892 (try_thread_db_load_from_dir): New function.
1893 (thread_db_load_search): Handle $sdir, ignore $pdir.
1894 Remove trying of system directories if search of
1895 libthread-db-search-path fails, that is now done via $sdir.
1897 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1899 * server.c (handle_query): Add EnableDisableTracepoints to the list
1900 of supported features.
1901 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1903 (cmd_qtenable_disable): New.
1904 (cmd_qtstart): Install tracepoints even if disabled.
1905 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1906 receiving a QTEnable or QTDisable packet.
1907 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1908 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1910 (gdb_probe): Skip data collection if static tracepoint is disabled.
1912 2011-05-10 Doug Evans <dje@google.com>
1914 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1916 2011-05-04 Doug Evans <dje@google.com>
1918 * linux-low.c (linux_join): Skip process lookup.
1919 * spu-low.c (spu_join): Ditto.
1920 * server.c (join_inferiors_callback): Delete.
1921 (process_serial_event): For 'D' packet (detach) call join_inferior
1924 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1926 * README: Don't mention xscale*-*-linux*.
1927 * configure.srv (xscale*-*-linux*): Don't handle target.
1929 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1931 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1933 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1934 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1935 (i386_emit_void_call_2): Likewise.
1937 2011-04-26 Yao Qi <yao@codesourcery.com>
1939 * linux-low.c: Move common macros to linux-ptrace.h.
1940 Include linux-ptrace.h.
1941 * Makefile.in (linux_ptrace_h): New.
1942 (linux-low.o): Depends on linux-ptrace.h.
1944 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1946 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1947 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1948 (remote_prepare): New function with most of the TCP code from ...
1949 (remote_open): ... here. Detect PORT here unconditionally. Move also
1950 setting transport_is_reliable.
1951 * server.c (run_once): New variable.
1952 (gdbserver_usage): Document it.
1953 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1954 the first run if RUN_ONCE.
1955 * server.h (run_once, remote_prepare): New declarations.
1957 2011-04-19 Tom Tromey <tromey@redhat.com>
1959 * win32-low.c (handle_load_dll): Remove duplicate "the".
1961 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1963 Remove support for old Cygwin 1.5 versions.
1964 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1965 function to avoid warning.
1966 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1969 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1971 * gdbserver/server.h (Macro _): Define it if not available.
1973 2011-03-14 Michael Snyder <msnyder@vmware.com>
1975 * hostio.c (handle_close): Remove unnecessary null test.
1977 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1979 * Makefile.in (maintainer-clean realclean distclean): Remove
1980 "make ... subdir_do" command.
1982 2011-03-10 Michael Snyder <msnyder@vmware.com>
1984 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1986 * server.c (handle_v_run): Free alloced buffer on early return.
1988 2011-03-09 Yao Qi <yao@codesourcery.com>
1991 2011-03-04 Yao Qi <yao@codesourcery.com>
1993 * Makefile.in: Remove GNU make feature --directory.
1995 2011-03-05 Yao Qi <yao@codesourcery.com>
1997 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1998 (subdir_do): New make target. Copied from gdb/Makefile.
1999 (maintainer-clean, realclean, distclean, clean): Call corresponding
2000 make targets in common/Makefile.
2002 2011-02-11 Yao Qi <yao@codesourcery.com>
2004 * configure.ac: Call AC_PROG_RANLIB.
2005 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2006 * configure: Regenerate.
2008 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2010 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2012 2011-03-06 Yao Qi <yao@codesourcery.com>
2014 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2016 2011-03-05 Yao Qi <yao@codesourcery.com>
2018 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2019 (subdir_do): New make target. Copied from gdb/Makefile.
2020 (maintainer-clean, realclean, distclean, clean): Call corresponding
2021 make targets in common/Makefile.
2023 2011-03-04 Yao Qi <yao@codesourcery.com>
2025 * Makefile.in: Remove GNU make feature --directory.
2027 2011-03-04 Michael Snyder <msnyder@vmware.com>
2029 * server.c (queue_stop_reply): Call xmalloc not malloc.
2031 2011-03-02 Michael Snyder <msnyder@vmware.com>
2033 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2035 2011-02-28 Michael Snyder <msnyder@vmware.com>
2037 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2038 (cmd_qtframe): Ditto.
2039 (cmd_qtbuffer): Ditto.
2040 (cmd_bigqtbuffer): Ditto.
2042 * utils.c (decimal2str): Initialize 'width' to nine, then
2045 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2047 * hostio.c (require_data): Free *data, not data.
2049 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2051 * hostio.c (require_data): Use free, not xfree.
2053 2011-02-27 Michael Snyder <msnyder@vmware.com>
2055 * server.c (handle_query): Discard unused value.
2057 * hostio.c (require_data): Free malloc memory before returning
2060 2011-02-26 Michael Snyder <msnyder@vmware.com>
2062 * linux-low.c (list_threads): Call closedir for dirent.
2064 2011-02-27 Michael Snyder <msnyder@vmware.com>
2066 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2067 a case statement falls through.
2069 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2071 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2074 2011-02-26 Michael Snyder <msnyder@vmware.com>
2076 * utils.c (decimal2str): Eliminate dead code and dead param.
2077 (pulongest): Drop dead param from call to decimal2str.
2080 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2082 Revert the following patch (not approved yet):
2083 2011-02-21 Hui Zhu <teawater@gmail.com>
2084 * tracepoint.c (tp_printf): New function.
2085 (eval_agent_expr): Handle gdb_agent_op_printf.
2087 2011-02-21 Hui Zhu <teawater@gmail.com>
2089 * tracepoint.c (tp_printf): New function.
2090 (eval_agent_expr): Handle gdb_agent_op_printf.
2092 2011-02-18 Tom Tromey <tromey@redhat.com>
2094 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2095 (tracepoint.o): Likewise.
2096 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2097 (gdb_agent_op_names): Likewise.
2099 2011-02-18 Tom Tromey <tromey@redhat.com>
2101 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2102 gdb_agent_op_rot>: New constants.
2103 (gdb_agent_op_names): Add pick and roll.
2104 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2107 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2109 * aclocal.m4: Regenerated with aclocal-1.11.1.
2111 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2113 * server.c (handle_qxfer_traceframe_info): New.
2114 (qxfer_packets): Register "traceframe-info".
2115 (handle_query): Report support for qXfer:traceframe-info:read+.
2116 * tracepoint.c (match_blocktype): New.
2117 (traceframe_find_block_type): Rename to ...
2118 (traceframe_walk_blocks): ... this. Add callback filter argument,
2120 (traceframe_find_block_type): New, reimplemented on top of
2121 traceframe_walk_blocks.
2122 (build_traceframe_info_xml): New.
2123 (traceframe_read_info): New.
2124 * server.h (traceframe_read_info): Declare.
2126 2011-02-11 Yao Qi <yao@codesourcery.com>
2128 * configure.ac: Call AC_PROG_RANLIB.
2129 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2130 * configure: Regenerate.
2132 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2134 * server.c (gdb_read_memory): Change return semantics to allow
2136 (handle_search_memory_1): Adjust.
2137 (process_serial_event) <'m' packet>: Handle partial transfers.
2138 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2140 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2142 * regcache.c (init_register_cache): Initialize
2143 regcache->register_status.
2144 (free_register_cache): Release regcache->register_status.
2145 (regcache_cpy): Copy register_status.
2146 (registers_to_string): Print 'x's for unavailable registers.
2147 (supply_register): Mark the register's status valid or
2148 unavailable, depending on whether a buffer was passed in or not.
2149 (supply_register_zeroed): New.
2150 (supply_regblock): Mark the registers' status valid or
2151 unavailable, depending on whether a buffer was passed in or not.
2152 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2153 (struct regcache): New `register_status' field.
2154 (supply_register_zeroed): Declare.
2155 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2156 supply_register_zeroed, rather than passing a NULL buffer to
2158 * tracepoint.c (fetch_traceframe_registers): Update comment.
2160 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2162 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2165 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2167 * server.h (decode_xfer_write): Change prototype.
2168 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2169 and don't extract the annex here.
2170 * server.c (decode_xfer_read): Remove `annex' parameter,
2171 and don't extract the annex here.
2173 (struct qxfer): New.
2174 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2175 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2176 (handle_qxfer_statictrace): New functions, abstracted out from
2177 handle_query, and made to use the struct qxfer interface.
2178 (handle_threads_qxfer_proper): Rename to ...
2179 (handle_qxfer_threads_proper): ... this.
2180 (handle_threads_qxfer): Rename to ...
2181 (handle_qxfer_threads): ... this. Adjust.
2182 (qxfer_packets): New array.
2183 (handle_qxfer): New function.
2184 (handle_query): Use handle_qxfer.
2186 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2188 * gdbreplay.c: Shorten lines of >= 80 columns.
2189 * linux-low.c: Ditto.
2190 * linux-ppc-low.c: Ditto.
2191 * linux-s390-low.c: Ditto.
2192 * linux-sparc-low.c: Ditto.
2193 * linux-x86-low.c: Ditto.
2194 * linux-xtensa-low.c: Ditto.
2195 * mem-break.c: Ditto.
2197 * regcache.h: Ditto.
2198 * remote-utils.c: Ditto.
2201 * thread-db.c: Ditto.
2202 * tracepoint.c: Ditto.
2204 * win32-low.h: Ditto.
2206 2011-01-05 Joel Brobecker <brobecker@adacore.com>
2208 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2211 2011-01-01 Joel Brobecker <brobecker@adacore.com>
2213 * server.c (gdbserver_version): Update copyright year in version
2215 * gdbreplay.c (gdbreplay_version): Ditto.
2217 2010-12-29 Jie Zhang <jie.zhang@analog.com>
2219 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2220 * linux-bfin-low.c: New file.
2221 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2222 PT_DATA_ADDR for BFIN targets.
2223 * Makefile.in (SFILES): Add linux-bfin-low.c.
2224 (clean): Remove reg-bfin.c.
2225 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2226 * README: Mention supported Blackfin targets.
2228 2010-12-23 Mike Frysinger <vapier@gentoo.org>
2230 * .gitignore: New file.
2232 2010-11-16 Mike Frysinger <vapier@gentoo.org>
2234 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2236 2010-10-22 Jie Zhang <jie@codesourcery.com>
2238 * Makefile.in: Add FLAGS_TO_PASS variable.
2239 (install): Remove dependency of install-only and recursively
2240 invoke make for install-only.
2242 2010-10-04 Doug Evans <dje@google.com>
2244 * Makefile.in (uninstall): Use $(DESTDIR).
2246 2010-09-24 Pedro Alves <pedro@codesourcery.com>
2250 * linux-x86-low.c (compat_siginfo_from_siginfo)
2251 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2252 si_code is < 0. Check for si_code == SI_TIMER before checking for
2255 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2257 * lynx-i386-low.c: New file.
2258 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2260 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2262 * lynx-low.c (ptrace_request_to_str): Remove handling for
2263 request values that have been removed in LynxOS 5.x.
2265 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2267 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2270 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2272 * configure.ac: Add --enable-inprocess-agent option.
2273 * configure: Rebuilt.
2275 2010-09-06 Yao Qi <yao@codesourcery.com>
2277 * linux-low.c (linux_kill): Remove unused variable.
2278 (linux_stabilize_threads): Likewise.
2279 * server.c (start_inferior): Likewise.
2280 (queue_stop_reply_callback): Likewise.
2281 * tracepoint.c (do_action_at_tracepoint): Likewise.
2283 2010-09-06 Yao Qi <yao@codesourcery.com>
2285 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2288 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2290 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2292 2010-09-06 Pedro Alves <pedro@codesourcery.com>
2294 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2297 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2299 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2300 gdbserver/lynx-ppc-low.c: New files.
2301 * Makefile.in (lynx_low_h): New variable.
2302 (lynx-low.o, lynx-ppc-low.o): New rules.
2303 * configure.ac: On LynxOS, link with -lnetinet.
2304 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2305 * configure: regenerate.
2307 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2309 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2310 * configure.ac: Add check for vasprintf and vsnprintf.
2311 * configure, config.in: Regenerate.
2312 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2314 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2316 * gdbreplay.c: Move include of alloca.h up, next to include of
2318 * server.h: Add include of malloc.h.
2319 * mem-break.c: Remove include of malloc.h.
2320 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2322 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2324 * Makefile.in (memmem.o): Build with -Wno-error.
2326 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2328 * utils.c (xsnprintf): Make non-static.
2329 * server.h: Add xsnprintf declaration.
2330 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2331 replace calls to snprintf by calls to xsnprintf throughout.
2333 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2335 * configure.ac: Add configure check for alloca.
2336 * configure, config.in: Regenerate.
2337 * server.h: Include alloca.h if it exists.
2338 * gdbreplay.c: Include alloca.h if it exists.
2340 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2342 * linux-low.c (__SIGRTMIN): Define if not already defined.
2343 (linux_create_inferior): Check for __ANDROID__ rather than
2345 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2346 are already deferred.
2347 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2348 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2349 stopped and already has a pending signal to report.
2350 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2351 a pending signal to report or is moving out of a jump pad.
2352 (linux_init_signals): Check for __ANDROID__ rather than
2355 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2357 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2358 debug_threads check. Avoid a linear search when not doing debug
2361 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2363 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2364 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2365 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2366 (process_event): Change local fd's type to gdb_fildes_t.
2367 (create_file_handler): Adjust prototype.
2368 (delete_file_handler): Adjust prototype.
2369 (handle_file_event): Adjust prototype. Use pfildes.
2370 (create_file_event): Adjsut prototype.
2371 * remote-utils.c (remote_desc, listen_desc): Change type to
2373 * server.h: New gdb_fildes_t typedef.
2374 [USE_WIN32API]: Include winsock2.h.
2375 (delete_file_handler, add_file_handler): Adjust prototypes.
2377 * utils.c (pfildes): New.
2379 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2381 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2382 * configure: Regenerate.
2384 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2386 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2387 (linux_done_accessing_memory): ... this.
2388 (linux_target_ops): Adjust.
2389 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2390 * nto-low.c (nto_target_ops): Adjust comment.
2391 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2392 * spu-low.c (spu_target_ops): Adjust comment.
2393 * target.h (target_ops): Rename unprepare_to_access_memory field
2394 to done_accessing_memory.
2395 (unprepare_to_access_memory): Rename to ...
2396 (done_accessing_memory): ... this.
2398 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2400 * linux-low.c (linux_prepare_to_access_memory): New.
2401 (linux_unprepare_to_access_memory): New.
2402 (linux_target_ops): Install them.
2403 * server.c (read_memory): Rename to ...
2404 (gdb_read_memory): ... this. Use
2405 prepare_to_access_memory/prepare_to_access_memory.
2406 (write_memory): Rename to ...
2407 (gdb_write_memory): ... this. Use
2408 prepare_to_access_memory/prepare_to_access_memory.
2409 (handle_search_memory_1): Adjust.
2410 (process_serial_event): Adjust.
2411 * target.h (struct target_ops): New fields
2412 prepare_to_access_memory and unprepare_to_access_memory.
2413 (prepare_to_access_memory, unprepare_to_access_memory): New.
2414 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2415 prepare_to_access_memory/prepare_to_access_memory.
2416 * nto-low.c (nto_target_ops): Adjust.
2417 * spu-low.c (spu_target_ops): Adjust.
2418 * win32-low.c (win32_target_ops): Adjust.
2420 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2422 * Makefile.in (WARN_CFLAGS): Get it from configure.
2423 (WERROR_CFLAGS): New.
2424 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2425 * configure.ac: Introduce --enable-werror, which adds -Werror to
2426 the compiler command line. Enabled by default. Disable with
2427 --disable-werror. Add -Wdeclaration-after-statement
2428 Wpointer-arith and -Wformat-nonliteral to warning flags.
2429 * configure: Regenerate.
2431 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2433 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2435 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2437 * gdbreplay.c (remote_error): New.
2439 (expect): Use gdbchar. Check for error reading from GDB.
2440 Clarify sync error output.
2441 (play): Check for errors writing to GDB.
2442 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2443 * remote-utils.c (getpkt): Check for errors writing to the remote
2446 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2448 * linux-low.c (linux_wait_1): Move non-debugging code out of
2449 `debug_threads' control.
2451 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2453 * linux-low.c (linux_wait_1): Don't set last_status here.
2454 * server.c (push_event, queue_stop_reply_callback): Assert we're
2455 not pushing a TARGET_WAITKIND_IGNORE event.
2456 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2457 (myresume, handle_target_event): Set the thread's last_resume_kind
2458 and last_status from the target returned status.
2460 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2464 * linux-x86-low.c (update_debug_registers_callback): New.
2465 (i386_dr_low_set_addr): Use it.
2466 (i386_dr_low_get_addr): New.
2467 (i386_dr_low_set_control): Use update_debug_registers_callback.
2468 (i386_dr_low_get_control): New.
2469 (i386_dr_low_get_status): Adjust.
2470 * linux-low.c (linux_stop_lwp): New.
2471 * linux-low.h (linux_stop_lwp): Declare.
2473 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2474 argument instead of a i386_debug_reg_state.
2475 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2476 a i386_debug_reg_state.
2477 (i386_insert_aligned_watchpoint): Adjust.
2478 (i386_remove_aligned_watchpoint): Adjust.
2479 (i386_low_stopped_data_address): Read the debug registers from the
2480 inferior instead of from the mirrors.
2481 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2482 (i386_dr_low_get_addr): Declare.
2483 (i386_dr_low_get_control): Declare.
2484 (i386_dr_low_get_status): Change prototype.
2486 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2487 (i386_dr_low_get_addr): New.
2488 (i386_dr_low_get_control): New.
2489 (i386_dr_low_get_status): Adjust prototype. Return
2491 (i386_initial_stuff): Clear dr_status_mirror and
2493 (i386_get_thread_context): Adjust.
2494 (i386_set_thread_context): Adjust.
2495 (i386_thread_added): Adjust.
2497 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2499 * linux-low.h (linux_thread_area): Delete declaration.
2501 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2503 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2504 after its termination.
2506 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2508 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2509 (gdb_wants_all_stopped): Delete.
2510 (linux_wait_1): Don't call them.
2511 * server.c (handle_v_cont): Tag all threads as want-stopped.
2512 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2513 stopped as "client-wants-stopped".
2515 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2517 * Makefile.in (signals_h): New.
2518 (server_h): Depend on it.
2519 (server.o): Don't depend on $(signals_def).
2520 (signals.o): Depend on $(signals_def).
2522 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2524 * Makefile.in (signals_def): New.
2525 (server_h): Append include/gdb/signals.h and signals_def.
2526 (server.o): Append signals_def.
2528 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2530 * server.c (handle_target_event): Use target_signal_to_host for
2531 resume_info.sig initialization.
2532 * target.h (struct thread_resume) <sig>: New comment.
2534 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2536 * server.c (handle_query): strcpy() the returned string from paddress()
2537 instead of sprintf().
2538 * utils.c (paddress): Return phex_nz().
2540 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2542 * server.c (handle_v_cont): Call mourn_inferior if process
2544 (myresume): Likewise.
2546 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2548 Static tracepoints, and integration with UST.
2550 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2551 * mem-break.c (uninsert_all_breakpoints)
2552 (reinsert_all_breakpoints): New.
2553 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2554 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2555 (gdb_agent_ust_loaded, helper_thread_id)
2556 (gdb_agent_helper_thread_id): New macros.
2557 (struct ipa_sym_addresses): Add addr_ust_loaded,
2558 addr_helper_thread_id, addr_cmd_buf.
2559 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2560 (in_process_agent_loaded_ust): New.
2561 (write_e_ust_not_loaded): New.
2562 (maybe_write_ipa_ust_not_loaded): New.
2563 (struct collect_static_trace_data_action): New.
2564 (enum tracepoint_type) <static_tracepoint>: New.
2565 (struct tracepoint) <handle>: Mention static tracepoints.
2566 (struct static_tracepoint_ctx): New.
2567 (CMD_BUF_SIZE): New.
2568 (add_tracepoint_action): Handle static tracepoint actions.
2569 (unprobe_marker_at): New.
2570 (clear_installed_tracepoints): Handle static tracepoints.
2571 (cmd_qtdp): Handle static tracepoints.
2572 (probe_marker_at): New.
2573 (cmd_qtstart): Handle static tracepoints.
2574 (response_tracepoint): Handle static tracepoints.
2575 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2576 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2577 (get_context_regcache): Handle static tracepoints.
2578 (do_action_at_tracepoint): Handle static tracepoint actions.
2579 (traceframe_find_block_type): Handle static trace data blocks.
2580 (traceframe_read_sdata): New.
2581 (download_tracepoints): Download static tracepoint actions.
2582 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2583 (GDB_PROBE_NAME): New.
2588 (ust_marker_to_static_tracepoint): New.
2590 (collect_ust_data_at_tracepoint): New.
2591 (gdb_ust_probe): New.
2592 (UNIX_PATH_MAX, SOCK_DIR): New.
2593 (gdb_ust_connect_sync_socket): New.
2594 (resume_thread, stop_thread): New.
2595 (run_inferior_command): New.
2596 (init_named_socket): New.
2597 (gdb_ust_socket_init): New.
2598 (cstr_to_hexstr): New.
2600 (first_marker, next_marker): New.
2601 (response_ust_marker): New.
2602 (cmd_qtfstm, cmd_qtsstm): New.
2603 (unprobe_marker_at, probe_marker_at): New.
2604 (cmd_qtstmat, gdb_ust_thread): New.
2605 (gdb_ust_init): New.
2606 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2607 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2609 (x86_64_st_collect_regmap): New.
2610 (X86_64_NUM_ST_COLLECT_GREGS): New.
2611 (AMD64_RIP_REGNUM): New.
2612 (supply_static_tracepoint_registers): New.
2613 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2615 (i386_st_collect_regmap): New.
2616 (i386_NUM_ST_COLLECT_GREGS): New.
2617 (supply_static_tracepoint_registers): New.
2618 * server.c (handle_query): Handle qXfer:statictrace:read.
2619 <qSupported>: Report support for StaticTracepoints, and
2620 qXfer:statictrace:read features.
2621 * server.h (traceframe_read_sdata)
2622 (supply_static_tracepoint_registers): Declare.
2623 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2624 (unpack_varlen_hex): Include in IPA build.
2625 * Makefile.in (ustlibs, ustinc): New.
2626 (IPA_OBJS): Add remote-utils-ipa.o.
2627 ($(IPA_LIB)): Link -ldl and -lpthread.
2629 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2630 * config.in, configure: Regenerate.
2632 2010-06-20 Ian Lance Taylor <iant@google.com>
2633 Pedro Alves <pedro@codesourcery.com>
2635 * linux-x86-low.c (always_true): Delete.
2636 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2637 trying to fool the compiler with always_true.
2639 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2641 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2642 conditions in gdbserver.
2644 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2646 * spu-low.c (spu_read_memory): Wrap around local store limit.
2647 (spu_write_memory): Likewise.
2649 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2651 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2652 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2654 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2656 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2657 uses with LONGEST uses.
2659 2010-06-14 Stan Shebs <stan@codesourcery.com>
2660 Pedro Alves <pedro@codesourcery.com>
2664 * linux-x86-low.c: Include limits.h.
2669 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2670 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2671 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2672 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2673 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2674 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2675 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2676 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2677 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2678 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2679 (amd64_emit_void_call_2): New.
2680 (amd64_emit_ops): New.
2681 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2682 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2683 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2684 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2685 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2686 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2687 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2688 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2689 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2690 (i386_emit_stack_adjust, i386_emit_int_call_1)
2691 (i386_emit_void_call_2): New.
2692 (i386_emit_ops): New.
2693 (x86_emit_ops): New.
2694 (the_low_target): Install x86_emit_ops.
2695 * server.h (struct emit_ops): New.
2696 (get_raw_reg_func_addr): Declare.
2697 (current_insn_ptr, emit_error): Declare.
2698 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2699 (set_trace_state_variable_value): New defines.
2700 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2701 addr_get_trace_state_variable_value and
2702 addr_set_trace_state_variable_value.
2703 (symbol_list): New fields for get_raw_reg,
2704 get_trace_state_variable_value and set_trace_state_variable_value.
2705 (condfn): New typedef.
2706 (struct tracepoint): New field `compiled_cond'.
2707 (do_action_at_tracepoint): Clear compiled_cond.
2708 (get_trace_state_variable_value, set_trace_state_variable_value):
2710 (condition_true_at_tracepoint): If there's a compiled condition,
2712 (current_insn_ptr, emit_error): New globals.
2713 (struct bytecode_address): New.
2714 (get_raw_reg_func_addr): New.
2715 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2716 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2717 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2718 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2719 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2720 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2721 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2722 (compile_tracepoint_condition, compile_bytecodes): New.
2723 * target.h (emit_ops): Forward declare.
2724 (struct target_ops): New field emit_ops.
2725 (target_emit_ops): New.
2726 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2727 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2728 * linux-low.c (linux_emit_ops): New.
2729 (linux_target_ops): Install it.
2730 * linux-low.h (struct linux_target_ops): New field emit_ops.
2732 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2734 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2735 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2737 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2738 Stan Shebs <stan@codesourcery.com>
2740 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2741 (all): Depend on $(extra_libraries).
2742 (install-only): Install the IPA.
2743 (IPA_OBJS, IPA_LIB): New.
2744 (clean): Remove the IPA lib.
2745 (IPAGENT_CFLAGS): New.
2746 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2747 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2748 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2749 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2750 * configure.ac: Check for atomic builtins support in the compiler.
2751 (IPA_DEPFILES, extra_libraries): Define.
2752 * configure.srv (ipa_obj): Add description.
2753 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2754 (i[34567]86-*-linux*): Set ipa_obj.
2755 (x86_64-*-linux*): Set ipa_obj.
2756 * linux-low.c (stabilizing_threads): New.
2757 (supports_fast_tracepoints): New.
2758 (linux_detach): Stabilize threads before detaching.
2759 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2760 the lwp is either not stabilizing, or is moving out of a jump pad.
2761 (linux_fast_tracepoint_collecting): New.
2762 (maybe_move_out_of_jump_pad): New.
2763 (enqueue_one_deferred_signal): New.
2764 (dequeue_one_deferred_signal): New.
2765 (linux_wait_for_event_1): If moving out of a jump pad, defer
2766 pending signals to later.
2767 (linux_stabilize_threads): New.
2768 (linux_wait_1): Check if threads need moving out of jump pads, and
2770 (stuck_in_jump_pad_callback): New.
2771 (move_out_of_jump_pad_callback): New.
2773 (linux_resume_one_lwp): Handle moving out of jump pads.
2774 (linux_set_resume_request): Dequeue deferred signals.
2775 (need_step_over_p): Also step over fast tracepoint jumps.
2776 (start_step_over): Also uninsert fast tracepoint jumps.
2777 (finish_step_over): Also reinsert fast tracepoint jumps.
2778 (linux_install_fast_tracepoint_jump): New.
2779 (linux_target_ops): Install linux_stabilize_threads and
2780 linux_install_fast_tracepoint_jump_pad.
2781 * linux-low.h (linux_target_ops) <get_thread_area,
2782 install_fast_tracepoint_jump_pad>: New fields.
2783 (struct lwp_info) <collecting_fast_tracepoint,
2784 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2785 (linux_get_thread_area): Declare.
2786 * linux-x86-low.c (jump_insn): New.
2787 (x86_get_thread_area): New.
2788 (append_insns): New.
2790 (amd64_install_fast_tracepoint_jump_pad): New.
2791 (i386_install_fast_tracepoint_jump_pad): New.
2792 (x86_install_fast_tracepoint_jump_pad): New.
2793 (the_low_target): Install x86_get_thread_area and
2794 x86_install_fast_tracepoint_jump_pad.
2795 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2796 (struct fast_tracepoint_jump): New.
2797 (fast_tracepoint_jump_insn): New.
2798 (fast_tracepoint_jump_shadow): New.
2799 (find_fast_tracepoint_jump_at): New.
2800 (fast_tracepoint_jump_here): New.
2801 (delete_fast_tracepoint_jump): New.
2802 (set_fast_tracepoint_jump): New.
2803 (uninsert_fast_tracepoint_jumps_at): New.
2804 (reinsert_fast_tracepoint_jumps_at): New.
2805 (set_breakpoint_at): Use write_inferior_memory.
2806 (uninsert_raw_breakpoint): Use write_inferior_memory.
2807 (check_mem_read): Mask out fast tracepoint jumps.
2808 (check_mem_write): Mask out fast tracepoint jumps.
2809 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2810 (set_fast_tracepoint_jump): Declare.
2811 (delete_fast_tracepoint_jump)
2812 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2813 (reinsert_fast_tracepoint_jumps_at): Declare.
2814 * regcache.c: Don't compile many functions when building the
2815 in-process agent library.
2816 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2817 the register buffer in the heap.
2818 (free_register_cache): If the register buffer isn't owned by the
2819 regcache, don't free it.
2820 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2821 pre-existing register caches.
2822 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2824 (convert_ascii_to_int): : Constify `from' parameter type.
2825 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2826 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2827 the needed buffer in-place.
2828 (relocate_instruction): New.
2829 * server.c (handle_query) <qSymbols>: If the target supports
2830 tracepoints, give it a chance of looking up symbols. Report
2831 support for fast tracepoints.
2832 (handle_status): Stabilize threads.
2833 (process_serial_event): Adjust.
2834 * server.h (struct fast_tracepoint_jump): Forward declare.
2835 (struct process_info) <fast_tracepoint_jumps>: New field.
2836 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2837 (decode_X_packet, decode_M_packet): Adjust.
2838 (relocate_instruction): Declare.
2839 (in_process_agent_loaded): Declare.
2840 (tracepoint_look_up_symbols): Declare.
2841 (struct fast_tpoint_collect_status): Declare.
2842 (fast_tracepoint_collecting): Declare.
2843 (force_unlock_trace_buffer): Declare.
2844 (handle_tracepoint_bkpts): Declare.
2845 (initialize_low_tracepoint)
2846 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2847 * target.h (struct target_ops) <stabilize_threads,
2848 install_fast_tracepoint_jump_pad>: New fields.
2849 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2850 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2851 [HAVE_STDINT_H]: Include stdint.h.
2852 (trace_debug_1): Rename to ...
2853 (trace_vdebug): ... this.
2854 (trace_debug): Rename to ...
2855 (trace_debug_1): ... this. Add `level' parameter.
2857 (ATTR_USED, ATTR_NOINLINE): New.
2858 (IP_AGENT_EXPORT): New.
2859 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2860 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2861 (about_to_request_buffer_space, trace_buffer_is_full)
2862 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2863 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2864 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2865 (traceframe_write_count, traceframes_created)
2866 (trace_state_variables)
2867 New renaming defines.
2868 (struct ipa_sym_addresses): New.
2869 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2871 (ipa_sym_addrs): New.
2872 (all_tracepoint_symbols_looked_up): New.
2873 (in_process_agent_loaded): New.
2874 (write_e_ipa_not_loaded): New.
2875 (maybe_write_ipa_not_loaded): New.
2876 (tracepoint_look_up_symbols): New.
2877 (debug_threads) [IN_PROCESS_AGENT]: New.
2878 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2879 (UNKNOWN_SIDE_EFFECTS): New.
2880 (stop_tracing): New.
2881 (flush_trace_buffer): New.
2882 (stop_tracing_bkpt): New.
2883 (flush_trace_buffer_bkpt): New.
2884 (read_inferior_integer): New.
2885 (read_inferior_uinteger): New.
2886 (read_inferior_data_pointer): New.
2887 (write_inferior_data_pointer): New.
2888 (write_inferior_integer): New.
2889 (write_inferior_uinteger): New.
2890 (struct collect_static_trace_data_action): Delete.
2891 (enum tracepoint_type): New.
2892 (struct tracepoint) <type>: New field `type'.
2893 <actions_str, step_actions, step_actions_str>: Only include in
2895 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2896 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2897 (tracepoints): Use IP_AGENT_EXPORT.
2898 (last_tracepoint): Don't include in the IPA.
2899 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2900 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2901 (alloced_trace_state_variables): New.
2902 (trace_state_variables): Use IP_AGENT_EXPORT.
2903 (traceframe_t): Delete unused variable.
2904 (circular_trace_buffer): Don't include in the IPA.
2905 (trace_buffer_start): Delete.
2906 (struct trace_buffer_control): New.
2907 (trace_buffer_free): Delete.
2908 (struct ipa_trace_buffer_control): New.
2909 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2910 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2912 (trace_buffer_ctrl): New.
2913 (TRACE_BUFFER_CTRL_CURR): New.
2914 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2915 Reimplement as macros.
2916 (trace_buffer_wrap): Delete.
2917 (traceframe_write_count, traceframe_read_count)
2918 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2919 (struct tracepoint_hit_ctx) <type>: New field.
2920 (struct fast_tracepoint_ctx): New.
2921 (memory_barrier): New.
2923 (record_tracepoint_error): Update atomically in the IPA.
2924 (clear_inferior_trace_buffer): New.
2925 (about_to_request_buffer_space): New.
2926 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2927 updating the same buffer.
2928 (add_tracepoint): Default the tracepoint's type to trap
2929 tracepoint, and orig_size to -1.
2930 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2932 (create_trace_state_variable): New parameter `gdb'. Handle it.
2933 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2934 (cmd_qtdp): Handle fast tracepoints.
2936 (max_jump_pad_size): New.
2937 (gdb_jump_pad_head): New.
2938 (get_jump_space_head): New.
2939 (claim_jump_space): New.
2940 (sort_tracepoints): New.
2941 (MAX_JUMP_SIZE): New.
2942 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2944 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2945 support. Upload fast traceframes, and delete internal IPA
2947 (stop_tracing_handler): New.
2948 (flush_trace_buffer_handler): New.
2949 (cmd_qtstop): Upload fast tracepoints.
2950 (response_tracepoint): Handle fast tracepoints.
2951 (tracepoint_finished_step): Upload fast traceframes. Set the
2952 tracepoint hit context's tracepoint type.
2953 (handle_tracepoint_bkpts): New.
2954 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2955 type. Add comment about fast tracepoints.
2956 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2957 non-existing action_str field.
2958 (get_context_regcache): Handle fast tracepoints.
2959 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2961 (fast_tracepoint_from_jump_pad_address): New.
2962 (fast_tracepoint_from_ipa_tpoint_address): New.
2963 (collecting_t): New.
2964 (force_unlock_trace_buffer): New.
2965 (fast_tracepoint_collecting): New.
2968 (write_inferior_data_ptr): New.
2969 (target_tp_heap): New.
2970 (target_malloc): New.
2971 (download_agent_expr): New.
2973 (download_tracepoints): New.
2974 (download_trace_state_variables): New.
2975 (upload_fast_traceframes): New.
2976 (IPA_FIRST_TRACEFRAME): New.
2977 (IPA_NEXT_TRACEFRAME_1): New.
2978 (IPA_NEXT_TRACEFRAME): New.
2979 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2980 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2981 (gdb_jump_pad_buffer_end): New.
2982 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2983 (initialize_tracepoint): Adjust.
2984 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2985 buffer. Initialize the low module.
2986 * utils.c (PREFIX, TOOLNAME): New.
2987 (malloc_failure): Use PREFIX.
2988 (error): In the IPA, an error causes an exit.
2989 (fatal, warning): Use PREFIX.
2990 (internal_error): Use TOOLNAME.
2991 (NUMCELLS): Increase to 10.
2992 * configure, config.in: Regenerate.
2994 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2996 * server.c (handle_query) <qSupported>: Do two passes over the
2997 qSupported string to avoid nesting strtok.
2999 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3001 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3003 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3005 * configure: Regenerate.
3006 * proc-service.list: New.
3008 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3010 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3013 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3015 * gdbreplay.c (remote_open): Check error return from socket() call by
3016 its equality to -1 not by it being negative.
3017 * remote-utils.c (remote_open): Likewise.
3019 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3021 * config.h: Regenerate.
3023 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3025 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3026 doesn't provide PTRACE_GET_THREAD_AREA.
3028 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3030 * linux-m68k-low.c: Include <asm/ptrace.h>
3031 (ps_get_thread_area): Implement.
3033 2010-05-03 Doug Evans <dje@google.com>
3035 * event-loop.c (struct callback_event): New struct.
3036 (callback_list): New global.
3037 (append_callback_event, delete_callback_event): New functions.
3038 (process_callback): New function.
3039 (start_event_loop): Call it.
3040 * remote-utils.c (NOT_SCHEDULED): Define.
3041 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3042 moved out of readchar.
3043 (readchar): Rewrite. Call reschedule before returning.
3044 (reset_readchar): New function.
3045 (remote_close): Call it.
3046 (process_remaining, reschedule): New functions.
3047 * server.h (callback_handler_func): New typedef.
3048 (append_callback_event, delete_callback_event): Declare.
3050 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3052 * proc-service.c (ps_pglobal_lookup): Use
3053 thread_db_look_up_one_symbol.
3054 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3055 parameter. Use it instead of all_symbols_looked_up.
3056 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3058 (all_symbols_looked_up): Don't declare.
3059 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3060 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3062 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3063 Set all_symbols_looked_up here.
3064 (thread_db_look_up_one_symbol): New.
3065 (thread_db_get_tls_address): Adjust.
3066 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3067 thread_db object on the heap, and tentatively set it in the
3069 (thread_db_init): Don't set all_symbols_looked_up here.
3070 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3072 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3074 * linux-low.c (linux_kill, linux_detach): Adjust.
3075 (status_pending_p_callback): Remove redundant statement. Check
3076 for !TARGET_WAITIKIND_IGNORE, instead of
3077 TARGET_WAITKIND_STOPPED.
3078 (handle_tracepoints): Make sure LWP is locked. Adjust.
3079 (linux_wait_for_event_1): Adjust.
3080 (linux_cancel_breakpoints): New.
3081 (unsuspend_one_lwp): New.
3082 (unsuspend_all_lwps): New.
3083 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3084 (send_sigstop_callback): Change return type to int, add new
3085 `except' parameter and handle it.
3086 (suspend_and_send_sigstop_callback): New.
3087 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3088 pass them down. If SUSPEND, also increment the lwp's suspend
3090 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3091 (need_step_over_p): Don't consider suspended LWPs.
3092 (start_step_over): Adjust.
3093 (proceed_one_lwp): Change return type to int, add new `except'
3094 parameter and handle it.
3095 (unsuspend_and_proceed_one_lwp): New.
3096 (proceed_all_lwps): Use find_inferior instead of
3098 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3099 also decrement the suspend count of LWPs. Pass `except' down,
3100 instead of hacking its suspend count.
3101 (linux_pause_all): Add `freeze' parameter. Adjust.
3102 (linux_unpause_all): New.
3103 (linux_target_ops): Install linux_unpause_all.
3104 * server.c (handle_status): Adjust.
3105 * target.h (struct target_ops): New fields `unpause_all' and
3106 `cancel_breakpoints'. Add new parameter to `pause_all'.
3107 (pause_all): Add new `freeze' parameter.
3109 (cancel_breakpoints): New.
3110 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3112 (cmd_qtstart): Pause threads.
3113 (stop_tracing): Pause threads, and cancel breakpoints.
3114 * win32-low.c (win32_target_ops): Adjust.
3116 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3118 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3119 the inferior right away from here...
3120 (linux_wait_1): ... to here, and adjust to check the thread's
3121 last_resume_kind instead of the lwp's step or stop_expected flags.
3123 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3125 * README: Use consistent `GDB' and `GDBserver' spellings.
3127 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3129 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3130 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3131 (linux_detach_one_lwp): Assume the lwp is stopped.
3132 (any_thread_of): Delete.
3133 (linux_detach): Stop all lwps here. Don't blindly delete all
3135 (delete_lwp_callback): New.
3136 (linux_mourn): Delete all lwps of the process that is gone.
3137 (linux_wait_1): Don't delete the last lwp of the process here.
3138 * mem-break.h (mark_breakpoints_out): Declare.
3139 * mem-break.c (mark_breakpoints_out): New.
3140 (free_all_breakpoints): Use it.
3141 * server.c (handle_target_event): If the process is gone, mark
3143 * thread-db.c (struct thread_db) <create_bp>: New field.
3144 (thread_db_enable_reporting): Fix prototype. Store a thread event
3145 breakpoint reference in the thread_db struct.
3146 (thread_db_load_search): Clear the thread_db object.
3147 (try_thread_db_load_1): Ditto.
3148 (switch_to_process): New.
3149 (disable_thread_event_reporting): Use it.
3150 (remove_thread_event_breakpoints): New.
3151 (thread_db_detach, thread_db_mourn): Use it.
3153 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3155 * linux-low.c (linux_enable_event_reporting): New.
3156 (linux_wait_for_event_1, handle_extended_wait): Use it.
3158 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3160 * linux-low.c (linux_kill_one_lwp, linux_kill)
3161 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3162 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3163 SIGSTOP even if the LWP is stopped.
3164 (send_sigstop_callback): New.
3165 (stop_all_lwps): Use send_sigstop_callback instead.
3166 (linux_resume_one_thread): Adjust.
3167 (proceed_one_lwp): Still proceed an LWP that the client has
3168 requested to stop, if we haven't reported it as stopped yet. Make
3169 sure that LWPs the client want stopped, have a pending SIGSTOP.
3171 2010-04-26 Doug Evans <dje@google.com>
3173 * server.c (handle_general_set): Make static.
3175 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3176 Print received char after testing for error/eof instead of before.
3177 (input_interrupt): Tweak comment.
3179 2010-04-23 Doug Evans <dje@google.com>
3181 * server.c (start_inferior): Print inferior argv if --debug.
3183 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3185 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3186 * nto-x86-low.c: Include server.h
3188 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3190 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3191 be consistent with other sources of this directory.
3192 (init_registers_amd64): Correct name of source file of this function
3195 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3197 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3200 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3202 * win32-i386-low.c: Add 64-bit support.
3203 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3204 (init_registers_amd64): Declare.
3205 (mappings): Add 64-bit version of array.
3206 (init_windows_x86): New function.
3207 (the_low_target): Change init_arch field to init_windows_x86.
3209 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3211 * win32-low.c: Adapt to support also 64-bit architecture.
3212 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3213 (get_image_name): Use SIZE_T type for local variable `done'.
3214 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3215 (toolhelp_get_dll_name): Idem.
3216 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3217 Use uintptr_t typecast to avoid warning.
3218 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3219 (handle_exception): Use phex_nz to avoid warning.
3220 (win32_wait): Remove unused local variable `process'.
3222 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3224 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3227 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3229 * configure.ac: Use `ws2_32' library for srv_mingw.
3230 * configure: Regenerate.
3231 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3232 * remote-utils.c: Likewise.
3234 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3236 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3237 if __x86_64__ is defined.
3239 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3241 * configure: Regenerate.
3243 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3245 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3246 * target.h (target_ops): New get_tib_address field.
3247 * win32-low.h (win32_thread_info): Add thread_local_base field.
3248 * win32-low.c (child_add_thread): Add tlb argument.
3249 Set thread_local_base field to TLB.
3250 (get_child_debug_event): Adapt to child_add_thread change.
3251 (win32_get_tib_address): New function.
3252 (win32_target_ops): Set get_tib_address field to
3253 win32_get_tib_address.
3254 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3256 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3258 * linux-low.c (linux_mourn): Also remove the process.
3259 * server.c (handle_target_event): Don't remove the process here.
3260 * nto-low.c (nto_mourn): New.
3261 (nto_target_ops): Install it.
3262 * spu-low.c (spu_mourn): New.
3263 (spu_target_ops): Install it.
3264 * win32-low.c (win32_mourn): New.
3265 (win32_target_ops): Install it.
3267 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3269 * server.h (buffer_xml_printf): Remove redundant `;'.
3271 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3273 * regcache.c (set_register_cache): Invalidate regcaches before
3274 changing the register cache layout.
3275 (regcache_invalidate_one): Allow a NULL regcache.
3276 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3277 regcaches before changing the register cache layout or the target
3280 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3282 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3283 variable warning on Linux/x86-64.
3285 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3287 GDBserver disconnected tracing support.
3289 * linux-low.c (linux_remove_process): Delete.
3290 (add_lwp): Don't set last_resume_kind here.
3291 (linux_kill): Use `mourn'.
3292 (linux_detach): Use `thread_db_detach', and `mourn'.
3294 (linux_attach_lwp_1): Adjust comment.
3295 (linux_attach): last_resume_kind moved the thread_info; adjust.
3296 (status_pending_p_callback): Adjust.
3297 (linux_wait_for_event_1): Adjust.
3298 (count_events_callback, select_singlestep_lwp_callback)
3299 (select_event_lwp_callback, cancel_breakpoints_callback)
3300 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3301 (proceed_one_lwp): Adjust.
3302 (linux_async): Add debug output.
3303 (linux_thread_stopped): New.
3304 (linux_pause_all): New.
3305 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3307 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3308 (thread_db_free): Delete declaration.
3309 (thread_db_detach, thread_db_mourn): Declare.
3310 * thread-db.c (thread_db_init): Use thread_db_mourn.
3311 (thread_db_free): Delete, split in two.
3312 (disable_thread_event_reporting): New.
3313 (thread_db_detach): New.
3314 (thread_db_mourn): New.
3316 * server.h (struct thread_info) <last_resume_kind>: New field.
3317 <attached>: Add comment.
3318 <gdb_detached>: New field.
3319 (handler_func): Change return type to int.
3320 (handle_serial_event, handle_target_event): Ditto.
3321 (gdb_connected): Declare.
3323 (disconnected_tracing): Declare.
3324 (stop_tracing): Declare.
3326 * server.c (handle_query) <qSupported>: Report support for
3327 disconnected tracing.
3328 (queue_stop_reply_callback): Account for running threads.
3329 (gdb_wants_thread_stopped): New.
3330 (gdb_wants_all_threads_stopped): New.
3331 (gdb_reattached_process): New.
3332 (handle_status): Clear the `gdb_detached' flag of all processes.
3333 In all-stop, stop all threads.
3334 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3335 (process_serial_event): If the remote connection breaks, or if an
3336 exit was forced with "monitor exit", force an event loop exit.
3337 Handle disconnected tracing on detach.
3338 (handle_serial_event): Adjust.
3339 (handle_target_event): If GDB isn't connected, forward events back
3340 to the inferior, unless the last process exited, in which case,
3341 exit gdbserver. Adjust interface.
3343 * remote-utils.c (remote_open): Don't block in accept. Instead
3344 register an event loop source on the listen socket file
3345 descriptor. Refactor bits into ...
3346 (listen_desc): ... this new global.
3347 (gdb_connected): ... this new function.
3348 (enable_async_notification): ... this new function.
3349 (handle_accept_event): ... this new function.
3350 (remote_close): Clear remote_desc.
3352 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3354 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3356 (mourn_inferior): Define.
3357 (target_process_qsupported): Avoid the dangling else problem.
3358 (thread_stopped): Define.
3359 (pause_all): Define.
3360 (target_waitstatus_to_string): Declare.
3361 * target.c (target_waitstatus_to_string): New.
3363 * tracepoint.c (tracing): Make extern.
3364 (disconnected_tracing): New.
3365 (stop_tracing): Make extern. Handle tracing stops due to GDB
3367 (cmd_qtdisconnected): New.
3368 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3369 (handle_tracepoint_general_set): Handle QTDisconnected.
3371 * event-loop.c (event_handler_func): Change return type to int.
3372 (process_event): Bail out if the event handler wants the event
3374 (handle_file_event): Ditto.
3375 (start_event_loop): Bail out if the event handler wants the event
3378 * nto-low.c (nto_target_ops): Adjust.
3379 * spu-low.c (spu_wait): Don't remove the process here.
3380 (spu_target_ops): Adjust.
3381 * win32-low.c (win32_wait): Don't remove the process here.
3382 (win32_target_ops): Adjust.
3384 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3386 * regcache.c (realloc_register_cache): Invalidate inferior's
3387 regcache before recreating it.
3389 2010-04-09 Pedro Alves <pedro@codesourcery.com>
3391 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3393 2010-04-09 Stan Shebs <stan@codesourcery.com>
3394 Pedro Alves <pedro@codesourcery.com>
3396 * server.h (LONGEST): New.
3397 (struct thread_info) <while_stepping>: New field.
3398 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3400 (initialize_tracepoint, handle_tracepoint_general_set)
3401 (handle_tracepoint_query, tracepoint_finished_step)
3402 (tracepoint_was_hit, release_while_stepping_state_list):
3403 (current_traceframe): Declare.
3404 * server.c (handle_general_set): Handle tracepoint packets.
3406 (write_memory): New.
3407 (handle_search_memory_1): Use read_memory.
3408 (handle_query): Report support for conditional tracepoints, trace
3409 state variables, and tracepoint sources. Handle tracepoint
3411 (main): Initialize the tracepoints module.
3412 (process_serial_event): Handle traceframe reads/writes.
3414 * linux-low.c (handle_tracepoints): New.
3415 (linux_wait_1): Call it.
3416 (linux_resume_one_lwp): Handle while-stepping.
3417 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3418 (linux_target_ops): Install them.
3419 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3421 * linux-x86-low.c (x86_supports_tracepoints): New.
3422 (the_low_target). Install it.
3424 * mem-break.h (delete_breakpoint): Declare.
3425 * mem-break.c (delete_breakpoint): Make external.
3427 * target.h (struct target_ops): Add `supports_tracepoints',
3428 `read_pc', and `write_pc' fields.
3429 (target_supports_tracepoints): Define.
3430 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3433 * regcache.h (struct regcache) <registers_owned>: New field.
3434 (init_register_cache, regcache_cpy): Declare.
3435 (regcache_read_pc, regcache_write_pc): Declare.
3436 (register_cache_size): Declare.
3437 (supply_regblock): Declare.
3438 * regcache.c (init_register_cache): New.
3439 (new_register_cache): Use it.
3440 (regcache_cpy): New.
3441 (register_cache_size): New.
3442 (supply_regblock): New.
3443 (regcache_read_pc, regcache_write_pc): New.
3445 * tracepoint.c: New.
3447 * Makefile.in (OBS): Add tracepoint.o.
3448 (tracepoint.o): New rule.
3450 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3452 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3454 (i386-mmx.c): Likewise.
3455 (i386-mmx-linux.o): Likewise.
3456 (i386-mmx-linux.c): Likewise.
3458 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3459 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3460 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3461 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3463 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3464 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3465 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3467 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3469 * Makefile.in (clean): Updated.
3471 (i386-avx.c): Likewise.
3472 (i386-avx-linux.o): Likewise.
3473 (i386-avx-linux.c): Likewise.
3474 (amd64-avx.o): Likewise.
3475 (amd64-avx.c): Likewise.
3476 (amd64-avx-linux.o): Likewise.
3477 (amd64-avx-linux.c): Likewise.
3479 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3480 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3481 (srv_amd64_regobj): Add amd64-avx.o.
3482 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3483 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3484 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3485 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3486 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3487 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3488 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3490 * i387-fp.c: Include "i386-xstate.h".
3492 (i387_cache_to_xsave): Likewise.
3493 (i387_xsave_to_cache): Likewise.
3494 (x86_xcr0): Likewise.
3496 * i387-fp.h (i387_cache_to_xsave): Likewise.
3497 (i387_xsave_to_cache): Likewise.
3498 (x86_xcr0): Likewise.
3500 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3501 * linux-crisv32-low.c (target_regsets): Likewise.
3502 * linux-m68k-low.c (target_regsets): Likewise.
3503 * linux-mips-low.c (target_regsets): Likewise.
3504 * linux-ppc-low.c (target_regsets): Likewise.
3505 * linux-s390-low.c (target_regsets): Likewise.
3506 * linux-sh-low.c (target_regsets): Likewise.
3507 * linux-sparc-low.c (target_regsets): Likewise.
3508 * linux-xtensa-low.c (target_regsets): Likewise.
3510 * linux-low.c: Include <sys/uio.h>.
3511 (regsets_fetch_inferior_registers): Support nt_type.
3512 (regsets_store_inferior_registers): Likewise.
3513 (linux_process_qsupported): New.
3514 (linux_target_ops): Add linux_process_qsupported.
3516 * linux-low.h (regset_info): Add nt_type.
3517 (linux_target_ops): Add process_qsupported.
3519 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3521 (init_registers_i386_avx_linux): New.
3522 (init_registers_amd64_avx_linux): Likewise.
3523 (xmltarget_i386_linux_no_xml): Likewise.
3524 (xmltarget_amd64_linux_no_xml): Likewise.
3525 (PTRACE_GETREGSET): Likewise.
3526 (PTRACE_SETREGSET): Likewise.
3527 (x86_fill_xstateregset): Likewise.
3528 (x86_store_xstateregset): Likewise.
3529 (use_xml): Likewise.
3530 (x86_linux_update_xmltarget): Likewise.
3531 (x86_linux_process_qsupported): Likewise.
3532 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3533 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3534 init_registers_i386_linux here. Call
3535 x86_linux_update_xmltarget.
3536 (the_low_target): Add x86_linux_process_qsupported.
3538 * server.c (handle_query): Call target_process_qsupported.
3540 * target.h (target_ops): Add process_qsupported.
3541 (target_process_qsupported): New.
3543 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3545 * inferiors.c (add_thread): Set last_status kind to
3546 TARGET_WAITKIND_IGNORE.
3547 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3548 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3549 (linux_wait_1): Move `thread' local definition to block that uses
3550 it. Don't NULL initialize `event_child'.
3551 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3552 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3553 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3555 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3557 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3558 an extended waitstatus, or by a watchpoint.
3559 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3560 thread was stepping or has been stopped by a watchpoint.
3562 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3564 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3565 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3566 of another, then delete the previous, and validate all
3568 (validate_inserted_breakpoint): New.
3569 (delete_disabled_breakpoints): New.
3570 (validate_breakpoints): New.
3571 (check_mem_read): Validate breakpoints before trusting their
3572 shadow. Delete disabled breakpoints.
3573 (check_mem_write): Validate breakpoints before trusting they
3574 should be inserted. Delete disabled breakpoints.
3575 * mem-break.h (validate_breakpoints):
3576 * server.c (handle_query): Validate breakpoints when we see a
3579 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3581 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3582 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3583 if we could tell there's a GDB breakpoint at stop_pc.
3584 (need_step_over_p): Don't do a step over if we find a GDB
3585 breakpoint at the resume PC.
3587 * mem-break.c (struct raw_breakpoint): New.
3588 (enum bkpt_type): New type `gdb_breakpoint'.
3589 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3590 fields. New field `raw'.
3591 (find_raw_breakpoint_at): New.
3592 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3594 (set_breakpoint_at): Adjust.
3595 (delete_raw_breakpoint): New.
3596 (release_breakpoint): New.
3597 (delete_breakpoint): Rename to...
3598 (delete_breakpoint_1): ... this. Add proc parameter. Use
3599 release_breakpoint. Return ENOENT.
3600 (delete_breakpoint): Reimplement.
3601 (find_breakpoint_at): Delete.
3602 (find_gdb_breakpoint_at): New.
3603 (delete_breakpoint_at): Delete.
3604 (set_gdb_breakpoint_at): New.
3605 (delete_gdb_breakpoint_at): New.
3606 (gdb_breakpoint_here): New.
3607 (set_reinsert_breakpoint): Use release_breakpoint.
3608 (uninsert_breakpoint): Rename to ...
3609 (uninsert_raw_breakpoint): ... this.
3610 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3611 (reinsert_raw_breakpoint): Change parameter type to
3613 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3615 (check_breakpoints): Adjust. Use release_breakpoint.
3616 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3617 (breakpoint_inserted_here): Ditto.
3618 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3619 Don't trust the breakpoint's shadow if it is not inserted.
3620 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3621 (delete_all_breakpoints): Adjust.
3622 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3623 use delete_breakpoint_1.
3625 * mem-break.h (breakpoints_supported): Delete declaration.
3626 (set_gdb_breakpoint_at): Declare.
3627 (gdb_breakpoint_here): Declare.
3628 (delete_breakpoint_at): Delete.
3629 (delete_gdb_breakpoint_at): Declare.
3631 * server.h (struct raw_breakpoint): Forward declare.
3632 (struct process_info): New field `raw_breakpoints'.
3634 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3637 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3639 * linux-low.c (status_pending_p_callback): Fix comment.
3640 (linux_wait_for_event_1): Move most of the internal breakpoint
3641 handling from here...
3642 (linux_wait_1): ... to here.
3643 (count_events_callback): New.
3644 (select_singlestep_lwp_callback): New.
3645 (select_event_lwp_callback): New.
3646 (cancel_breakpoints_callback): New.
3647 (select_event_lwp): New.
3648 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3649 priority to all LWPs that have had events that should be reported
3650 to the client. Cancel breakpoints when about to reporting the
3651 event to the client, not while stopping lwps. No longer cancel
3652 finished single-steps here.
3653 (cancel_finished_single_step): Delete.
3654 (cancel_finished_single_steps): Delete.
3656 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3658 * mem-break.c (enum bkpt_type): New.
3659 (struct breakpoint): New field `type'.
3660 (set_breakpoint_at): Change return type to struct breakpoint
3661 pointer. Set type to `other_breakpoint' by default.
3662 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3663 in the breakpoint list.
3664 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3665 (reinsert_breakpoint): Rename to ...
3666 (reinsert_raw_breakpoint): ... this.
3667 (reinsert_breakpoints_at): Adjust.
3668 * mem-break.h (struct breakpoint): Declare.
3669 (set_breakpoint_at): Change return type to struct breakpoint
3672 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3674 * server.c (handle_query): Assign, not compare.
3676 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3678 Teach linux gdbserver to step-over-breakpoints.
3680 * linux-low.c (can_hardware_single_step): New.
3681 (supports_breakpoints): New.
3682 (handle_extended_wait): If stopping threads, read the stop pc of
3685 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3686 low target doesn't support retrieving the PC.
3687 (add_lwp): Set last_resume_kind to resume_continue.
3688 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3689 (linux_attach): Don't clear stop_expected. Set the lwp's
3690 last_resume_kind to resume_stop.
3691 (linux_detach_one_lwp): Don't check for removed breakpoints.
3692 (check_removed_breakpoint): Delete.
3693 (status_pending_p): Rename to ...
3694 (status_pending_p_callback): ... this. Don't check for removed
3695 breakpoints. Don't consider threads that are stopped from GDB's
3697 (linux_wait_for_lwp): Always read the stop_pc here.
3698 (cancel_breakpoint): New.
3699 (step_over_bkpt): New global.
3700 (linux_wait_for_event_1): Implement stepping over breakpoints.
3701 (gdb_wants_lwp_stopped): New.
3702 (gdb_wants_all_stopped): New.
3703 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3704 single-step traps here. Store the thread's last reported target
3706 (send_sigstop): Don't clear stop_expected. Always set it,
3708 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3709 (cancel_finished_single_step): New.
3710 (cancel_finished_single_steps): New.
3711 (wait_for_sigstop): Don't cancel finished single-step traps here.
3712 (linux_resume_one_lwp): Don't check for removed breakpoints.
3713 Don't set `step' on non-hardware step archs.
3714 (linux_set_resume_request): Ignore resume_stop requests if already
3715 stopping or stopped. Set the lwp's last_resume_kind.
3716 (resume_status_pending_p): Don't check for removed breakpoints.
3717 (need_step_over_p): New.
3718 (start_step_over): New.
3719 (finish_step_over): New.
3720 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3721 requests. Clear the thread's last reported target waitstatus.
3722 Don't use the `suspended' flag. Don't consider pending breakpoints.
3723 (linux_resume): Start a step-over if necessary.
3724 (proceed_one_lwp): New.
3725 (proceed_all_lwps): New.
3726 (unstop_all_lwps): New.
3727 * linux-low.h (struct lwp_info): Rewrite comment for the
3728 `suspended' flag. Add the `stop_pc' field. Delete the
3729 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3730 Add `'last_resume_kind' and `need_step_over' fields.
3731 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3732 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3733 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3734 (set_raw_breakpoint_at): New.
3735 (set_breakpoint_at): Rewrite to use it.
3736 (reinsert_breakpoint_handler): Delete.
3737 (set_reinsert_breakpoint): New.
3738 (reinsert_breakpoint_by_bp): Delete.
3739 (delete_reinsert_breakpoints): New.
3740 (uninsert_breakpoint): Rewrite.
3741 (uninsert_breakpoints_at): New.
3742 (reinsert_breakpoint): Rewrite.
3743 (reinsert_breakpoints_at): New.
3744 (check_breakpoints): Rewrite.
3745 (breakpoint_here): New.
3746 (breakpoint_inserted_here): New.
3747 (check_mem_read): Adjust.
3748 * mem-break.h (breakpoints_supported, breakpoint_here)
3749 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3750 (reinsert_breakpoint_by_bp): Delete declaration.
3751 (delete_reinsert_breakpoints): Declare.
3752 (reinsert_breakpoint): Delete declaration.
3753 (reinsert_breakpoints_at): Declare.
3754 (uninsert_breakpoint): Delete declaration.
3755 (uninsert_breakpoints_at): Declare.
3756 (check_breakpoints): Adjust prototype.
3757 * server.h: Adjust include order.
3758 (struct thread_info): Declare here. Add a `last_status' field.
3760 2010-03-23 Michael Snyder <msnyder@vmware.com>
3762 * server.c (crc32): New function.
3763 (handle_query): Add handling for 'qCRC:' request.
3765 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3767 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3768 lwp had been stopped by a watchpoint.
3770 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3772 * server.h (internal_error): Declare.
3773 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3774 * utils.c (internal_error): New function.
3776 2010-03-15 Andreas Schwab <schwab@redhat.com>
3778 * configure.srv: Fix typo setting srv_regobj.
3780 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3782 * linux-low.c (fetch_register): Avoid passing a non string literal
3784 (usr_store_inferior_registers): Ditto.
3786 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3788 * linux-low.c (linux_write_memory): Bail out early if peeking
3791 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3793 * linux-low.h (struct lwp_info): New fields
3794 `stopped_by_watchpoint' and `stopped_data_address'.
3795 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3796 here, and cache them in the lwp object.
3797 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3799 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3801 (linux_stopped_by_watchpoint): Rewrite.
3802 (linux_stopped_data_address): Rewrite.
3804 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3806 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3807 switching the current inferior, not before.
3809 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3811 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3812 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3813 i386-linux.c and amd64-linux.c.
3814 (reg-i386.o): Removed.
3815 (reg-i386.c): Likewise.
3816 (reg-i386-linux.o): Likewise.
3817 (reg-i386-linux.c): Likewise.
3818 (reg-x86-64.o): Likewise.
3819 (reg-x86-64.c): Likewise.
3820 (reg-x86-64-linux.o): Likewise.
3821 (reg-x86-64-linux.c): Likewise.
3824 (i386-linux.o): Likewise.
3825 (i386-linux.c): Likewise.
3826 (amd64.o): Likewise.
3827 (amd64.c): Likewise.
3828 (amd64-linux.o): Likewise.
3829 (amd64-linux.c): Likewise.
3831 * configure.srv (srv_i386_regobj): New.
3832 (srv_i386_linux_regobj): Likewise.
3833 (srv_amd64_regobj): Likewise.
3834 (srv_amd64_linux_regobj): Likewise.
3835 (srv_i386_32bit_xmlfiles): Likewise.
3836 (srv_i386_64bit_xmlfiles): Likewise.
3837 (srv_i386_xmlfiles): Likewise.
3838 (srv_amd64_xmlfiles): Likewise.
3839 (srv_i386_linux_xmlfiles): Likewise.
3840 (srv_amd64_linux_xmlfiles): Likewise.
3841 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3842 srv_xmlfiles to $srv_i386_xmlfiles.
3843 (i[34567]86-*-mingw32ce*): Likewise.
3844 (i[34567]86-*-mingw*): Likewise.
3845 (i[34567]86-*-nto*): Likewise.
3846 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3847 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3848 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3849 (x86_64-*-linux*): Likewise.
3851 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3852 (init_registers_amd64_linux): New.
3853 (x86_arch_setup): Replace init_registers_x86_64_linux with
3854 init_registers_amd64_linux.
3856 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3858 * configure.ac: Check for libdl. If it is not available link against
3859 static libthread_db.
3860 * configure: Regenerate.
3862 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3866 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3867 handing a read watchpoint.
3868 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3870 2010-02-12 Doug Evans <dje@google.com>
3872 * linux-low.c (linux_supports_tracefork_flag): Document.
3873 (linux_look_up_symbols): Add comment.
3875 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3877 * regcache.c (supply_register): Clear regcache if buf is NULL.
3879 2010-02-02 Nicolas Roche <roche@sourceware.org>
3880 Joel Brobecker <brobecker@adacore.com>
3882 * inferiors.c (find_inferior): Add function documentation.
3883 (unloaded_dll): Handle the case where the unloaded dll has not
3884 been previously registered in the dll list.
3886 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3888 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3889 (thumb2_breakpoint): New.
3890 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3892 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3894 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3895 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3898 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3900 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3902 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3904 * linux-s390-low.c (s390_collect_ptrace_register)
3905 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3907 2010-01-21 Doug Evans <dje@google.com>
3909 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3910 (PTRACE_ARG4_TYPE): New macro.
3911 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3912 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3913 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3914 (usr_store_inferior_registers): Ditto.
3915 (linux_read_memory, linux_write_memory): Ditto.
3916 (linux_test_for_tracefork): Ditto.
3918 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3919 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3921 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3923 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3926 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3928 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3929 prototype to take a regcache. Adjust.
3931 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3933 * regcache.h (struct thread_info): Forward declare.
3934 (struct regcache): New.
3935 (new_register_cache): Adjust prototype.
3936 (get_thread_regcache): Declare.
3937 (free_register_cache): Adjust prototype.
3938 (registers_to_string, registers_from_string): Ditto.
3939 (supply_register, supply_register_by_name, collect_register)
3940 (collect_register_as_string, collect_register_by_name): Ditto.
3941 * regcache.c (struct inferior_regcache_data): Delete.
3942 (get_regcache): Rename to ...
3943 (get_thread_regcache): ... this. Adjust. Switch inferior before
3945 (regcache_invalidate_one): Adjust.
3946 (regcache_invalidate): Fix prototype.
3947 (new_register_cache): Return the new register cache.
3948 (free_register_cache): Change prototype.
3949 (realloc_register_cache): Adjust.
3950 (registers_to_string): Change prototype to take a regcache. Adjust.
3951 (registers_from_string): Ditto.
3952 (register_data): Ditto.
3953 (supply_register): Ditto.
3954 (supply_register_by_name): Ditto.
3955 (collect_register): Ditto.
3956 (collect_register_as_string): Ditto.
3957 (collect_register_by_name): Ditto.
3958 * server.c (process_serial_event): Adjust.
3959 * linux-low.h (regset_fill_func, regset_store_func): Change
3961 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3963 * linux-low.c (get_stop_pc): Adjust.
3964 (check_removed_breakpoint): Adjust.
3965 (linux_wait_for_event): Adjust.
3966 (linux_resume_one_lwp): Adjust.
3967 (fetch_register): Add regcache parameter. Adjust.
3968 (usr_store_inferior_registers): Ditto.
3969 (regsets_fetch_inferior_registers): Ditto.
3970 (regsets_store_inferior_registers): Ditto.
3971 (linux_fetch_registers, linux_store_registers): Ditto.
3972 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3974 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
3976 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3977 prototype to take a regcache.
3978 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3979 * remote-utils.c (convert_ascii_to_int, outreg)
3980 (prepare_resume_reply): Change prototype to take a regcache.
3982 * target.h (struct target_ops) <fetch_registers, store_registers>:
3983 Change prototype to take a regcache.
3984 (fetch_inferior_registers, store_inferior_registers): Change
3985 prototype to take a regcache. Adjust.
3986 * proc-service.c (ps_lgetregs): Adjust.
3987 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3988 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3989 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3990 take a regcache. Adjust.
3991 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3992 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3993 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3994 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3995 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3996 (cris_cannot_fetch_register):
3997 (cris_breakpoint_at): Change prototype to take a regcache.
3999 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4000 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4001 to take a regcache. Adjust.
4002 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4004 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4005 take a regcache. Adjust.
4006 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4007 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4008 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4009 * linux-mips-low.c (mips_get_pc):
4010 (mips_set_pc): Change prototype to take a regcache. Adjust.
4011 (mips_reinsert_addr): Adjust.
4012 (mips_collect_register): Change prototype to take a regcache.
4014 (mips_supply_register):
4015 (mips_collect_register_32bit, mips_supply_register_32bit)
4016 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4017 (mips_store_fpregset): Ditto.
4018 * linux-ppc-low.c (ppc_supply_ptrace_register)
4019 (ppc_supply_ptrace_register): Ditto.
4020 (parse_spufs_run): Adjust.
4021 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4022 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4023 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4024 take a regcache. Adjust.
4025 * linux-s390-low.c (s390_collect_ptrace_register)
4026 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4027 (s390_set_pc): Change prototype to take a regcache. Adjust.
4028 (s390_arch_setup): Adjust.
4029 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4030 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4031 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4032 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4033 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4035 (sparc_breakpoint_at): Adjust.
4036 * linux-xtensa-low.c (xtensa_fill_gregset):
4037 (xtensa_store_gregset):
4038 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4039 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4040 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4041 prototype to take a regcache. Adjust.
4042 * win32-arm-low.c (arm_fetch_inferior_register)
4043 (arm_store_inferior_register): Change prototype to take a
4045 * win32-i386-low.c (i386_fetch_inferior_register)
4046 (i386_store_inferior_register): Change prototype to take a
4048 * win32-low.c (child_fetch_inferior_registers)
4049 (child_store_inferior_registers): Change prototype to take a
4051 (win32_wait): Adjust.
4052 (win32_fetch_inferior_registers): Change prototype to take a
4054 (win32_store_inferior_registers): Adjust.
4055 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4056 store_inferior_register>: Change prototype to take a regcache.
4058 2010-01-20 Doug Evans <dje@google.com>
4060 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4062 (linux_wait_for_event1, linux_init_signals): Ditto.
4063 (W_STOPCODE): Provide definition if missing.
4065 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4067 * linux-low.c (linux_core_of_thread): New.
4068 (compare_ints, show_process, list_threads): New.
4069 (linux_qxfer_osdata): Report threads and cores.
4070 (linux_target_op): Register linux_core_of_thread.
4071 * remote-utils.c (prepare_resume_reply): Report the core.
4072 (buffer_xml_printf): Support %d specifier.
4073 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4075 (handle_query): Handle qXfer:threads. Announce availability
4077 * target.h (struct target_ops): New field core_of_thread.
4079 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4081 * Makefile.in (clean): Remove new generated files.
4082 (reg-s390.o, reg-s390.c): Remove rules.
4083 (reg-s390x.o, reg-s390x.c): Likewise.
4084 (s390-linux32.o, s390-linux32.c): Add rules.
4085 (s390-linux64.o, s390-linux64.c): Likewise.
4086 (s390x-linux64.o, s390x-linux64.c): Likewise.
4087 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4088 * linux-s390-low.c: Include <elf.h>.
4089 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4090 (init_registers_s390): Remove prototype.
4091 (init_registers_s390x): Likewise.
4092 (init_registers_s390_linux32): Add prototype.
4093 (init_registers_s390_linux64): Likewise.
4094 (init_registers_s390x_linux64): Likewise.
4095 (s390_num_regs_3264): New define.
4096 (s390_regmap_3264): New global variable.
4097 (s390_cannot_fetch_register): Remove obsolete check.
4098 (s390_cannot_store_register): Likewise.
4099 (s390_collect_ptrace_register): Handle upper/lower register halves.
4100 (s390_supply_ptrace_register): Likewise.
4101 (s390_fill_gregset): Update to register number changes.
4102 (s390_get_hwcap): New routine.
4103 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4104 Install appropriate regmap and register set.
4106 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4108 * server.c (gdbserver_version): Update copyright year to 2010.
4109 * gdbreplay.c (gdbreplay_version): Likewise.
4111 2009-12-28 Doug Evans <dje@google.com>
4113 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4114 elf/external.h. Include <elf.h> instead but only if necessary.
4116 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4118 * linux-low.c (linux_remove_process): Remove `detaching'
4119 parameter. Don't release/detach from thread_db here.
4120 (linux_kill): Release/detach from thread_db here, ...
4121 (linux_detach): ... and here, before actually detaching.
4122 (linux_wait_1): ... and here, when a process exits.
4123 * thread-db.c (any_thread_of): New.
4124 (thread_db_free): Switch the current inferior to a thread of the
4127 2009-12-21 Doug Evans <dje@google.com>
4129 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4131 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4132 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4133 warning ifndef __NR_tkill. Move setting of errno there too.
4134 Delete unnecessary resetting of errno after syscall.
4135 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4137 * configure.ac: Check for dladdr.
4138 * config.in: Regenerate.
4139 * configure: Regenerate.
4140 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4141 (try_thread_db_load): Update.
4143 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4145 2009-12-18 Doug Evans <dje@google.com>
4147 * event-loop.c: Include unistd.h if it exists.
4149 * linux-low.c (my_waitpid): Move definition away from being in
4150 between linux_tracefork_child/linux_test_for_tracefork.
4152 * gdb_proc_service.h (psaddr_t): Fix type.
4153 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4154 signature to match glibc.
4156 2009-12-16 Doug Evans <dje@google.com>
4158 * linux-low.c (linux_read_memory): Fix argument to read.
4160 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4162 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4163 events, don't leave current_inferior pointing at null.
4165 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4167 * win32-low.c (LOG): Delete.
4168 (OUTMSG): Output to stderr.
4169 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4170 on compile time LOG macro.
4171 (win32_wait): Fix debug output.
4173 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4175 * win32-low.c (win32_add_one_solib): If the dll name is
4176 "ntdll.dll", prepend the system directory to the dll path.
4178 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4180 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4182 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4183 Vladimir Prus <vladimir@codesourcery.com>
4185 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4186 * configure.ac: Check for __mcoldfire__ and set
4187 gdb_cv_m68k_is_coldfire.
4188 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4189 reg-cf.o and reg-m68k.o.
4190 * configure: Regenerated.
4192 2009-11-16 Pedro Alves <pedro@codesourcery.com>
4194 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4195 Pass it to thread_db_free.
4196 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4197 proper `detaching' argument to linux_remove_process.
4198 * linux-low.h (thread_db_free): Add `detaching' parameter.
4199 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4201 (thread_db_free): Add `detaching' parameter. Only
4202 call td_ta_clear_event if detaching from process.
4204 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4206 * thread-db.c (thread_db_free): Fix typo.
4208 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4211 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4213 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4215 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4216 with an i686 compiler.
4217 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4219 * configure: Rebuilt.
4221 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4225 * server.c (handle_search_memory_1): Correct read_addr initialization
4226 in loop for searching subsequent chunks.
4228 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4230 * configure.ac: New --with-libthread-db option.
4231 * thread-db.c: Allow direct dependence on libthread_db.
4232 (thread_db_free): Adjust.
4233 * config.in: Regenerate.
4234 * configure: Likewise.
4236 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4239 * thread-db.c (attach_thread): New function.
4240 (maybe_attach_thread): Return success/failure.
4241 (find_new_threads_callback): Adjust.
4242 (thread_db_find_new_threads): Loop until no new threads.
4244 2009-10-13 Pedro Alves <pedro@codesourcery.com>
4246 * proc-service.c (ps_lgetregs): Formatting.
4248 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4250 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4251 * configure.ac: Adjust.
4252 * linux-low.h (struct process_info_private): Move members to struct
4254 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4255 * linux-low.c (linux_remove_process): Adjust.
4256 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4257 * server.c (handle_query): Move code ...
4258 (handle_monitor_command): ... here. New function.
4259 * target.h (struct target_ops): New member.
4260 * thread-db.c (struct thread_db): New.
4261 (libthread_db_search_path): New variable.
4262 (thread_db_create_event, thread_db_enable_reporting)
4263 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4264 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4265 (try_thread_db_load_1, dladdr_to_soname): New functions.
4266 (try_thread_db_load, thread_db_load_search): New functions.
4267 (thread_db_init): Search for libthread_db.
4268 (thread_db_free): New function.
4269 (thread_db_handle_monitor_command): Likewise.
4270 * config.in: Regenerate.
4271 * configure: Regenerate.
4273 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4275 * spu-low.c (spu_kill): Wait for inferior to terminate.
4276 Call clear_inferiors.
4277 (spu_detach): Call clear_inferiors.
4279 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4281 * aclocal.m4: Regenerate.
4282 * config.in: Likewise.
4283 * configure: Likewise.
4285 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4287 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4288 (parse_spufs_run): New function.
4289 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4290 (ppc_breakpoint_at): Handle SPU breakpoints.
4292 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4294 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4295 (SPUFS_MAGIC): Define.
4296 (spu_enumerate_spu_ids): New function.
4297 (linux_qxfer_spu): New function.
4298 (linux_target_ops): Install linux_qxfer_spu.
4300 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4302 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4303 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4304 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4305 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4306 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4307 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4308 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4309 (init_registers_powerpc_cell32l): Add prototype.
4310 (init_registers_powerpc_cell64l): Likewise.
4311 (ppc_arch_setup): Detect Cell/B.E. architecture.
4313 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4315 * Makefile.in (datarootdir): New variable.
4317 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4319 * linux-low.c (linux_write_memory): Update debugging output.
4320 * Makefile.in (clean): Add new descriptions.
4321 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4322 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4323 * configure.srv: Add new files for arm*-*-linux*.
4324 * linux-arm-low.c: Add new declarations.
4325 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4326 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4327 (HWCAP_VFPv3D16): New.
4328 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4329 instead of __IWMMXT__.
4330 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4331 (arm_arch_setup): New.
4332 (target_regsets): Remove #ifdef. Add VFP regset.
4333 (the_low_target): Use arm_arch_setup.
4335 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4337 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4338 the main thread again.
4340 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4342 Adding Neutrino gdbserver.
4343 * configure: Regenerated.
4344 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4345 * configure.srv (i[34567]86-*-nto*): New target.
4346 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4347 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4348 (nto_comctrl) [__QNX__]: New function.
4349 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4351 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4353 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4356 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4357 Pedro Alves <pedro@codesourcery.com>
4359 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4360 don't support CONTEXT_EXTENDED_REGISTERS.
4361 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4362 (the_low_target): Install them.
4363 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4364 failing with ERROR_PIPE_NOT_CONNECTED.
4366 2009-06-30 Doug Evans <dje@google.com>
4367 Pierre Muller <muller@ics.u-strasbg.fr>
4369 Add h/w watchpoint support to x86-linux, win32-i386.
4370 * Makefile.in (SFILES): Add i386-low.c
4371 (i386_low_h): Define.
4372 (i386-low.o): Add dependencies.
4373 (linux-x86-low.o): Add i386-low.h dependency.
4374 (win32-i386-low.o): Ditto.
4375 * i386-low.c: New file.
4376 * i386-low.h: New file.
4377 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4378 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4379 * linux-low.c (linux_add_process): Initialize arch_private.
4380 (linux_remove_process): Free arch_private.
4381 (add_lwp): Initialize arch_private.
4382 (delete_lwp): Free arch_private.
4383 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4385 * linux-low.h (process_info_private): New member arch_private.
4386 (lwp_info): New member arch_private.
4387 (linux_target_ops): New members new_process, new_thread,
4389 (ptid_of): New macro.
4390 * linux-x86-low.c: Include stddef.h, i386-low.h.
4391 (arch_process_info): New struct.
4392 (arch_lwp_info): New struct.
4393 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4394 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4395 (i386_dr_low_get_status): New function.
4396 (x86_insert_point, x86_remove_point): New functions.
4397 (x86_stopped_by_watchpoint): New function.
4398 (x86_stopped_data_address): New function.
4399 (x86_linux_new_process, x86_linux_new_thread): New functions.
4400 (x86_linux_prepare_to_resume): New function.
4401 (the_low_target): Add entries for insert_point, remove_point,
4402 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4404 * server.c (debug_hw_points): New global.
4405 (monitor_show_help): Document set debug-hw-points.
4406 (handle_query): Process "set debug-hw-points".
4407 * server.h (debug_hw_points): Declare.
4408 (paddress): Declare.
4409 * utils.c (NUMCELLS, CELLSIZE): New macros.
4410 (get_sell, xsnprintf, paddress): New functions.
4411 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4412 remove_point, stopped_by_watchpoint, stopped_data_address.
4413 * win32-i386-low.c: Include i386-low.h.
4414 (debug_reg_state): Replaces dr.
4415 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4416 (i386_dr_low_get_status): New function.
4417 (i386_insert_point, i386_remove_point): New functions.
4418 (i386_stopped_by_watchpoint): New function.
4419 (i386_stopped_data_address): New function.
4420 (i386_initial_stuff): Update.
4421 (get_thread_context,set_thread_context,i386_thread_added): Update.
4422 (the_low_target): Add entries for insert_point,
4423 remove_point, stopped_by_watchpoint, stopped_data_address.
4424 * win32-low.c (win32_insert_watchpoint): New function.
4425 (win32_remove_watchpoint): New function.
4426 (win32_stopped_by_watchpoint): New function.
4427 (win32_stopped_data_address): New function.
4428 (win32_target_ops): Add entries for insert_watchpoint,
4429 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4430 * win32-low.h (win32_target_ops): New members insert_point,
4431 remove_point, stopped_by_watchpoint, stopped_data_address.
4433 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4435 * server.c (process_serial_event): Re-return unsupported, not
4436 error, if the type isn't recognized. Re-allow supporting only
4437 insert or remove packets. Also call require_running for
4438 breakpoints. Add missing break statement to default case. Tidy.
4439 * target.h (struct target_ops): Rename insert_watchpoint to
4440 insert_point, and remove_watchpoint to remove_point.
4442 * linux-low.h (struct linux_target_ops): Likewise.
4443 * linux-low.c (linux_insert_watchpoint): Rename to ...
4444 (linux_insert_point): ... this. Adjust.
4445 (linux_remove_watchpoint): Rename to ...
4446 (linux_remove_point): ... this. Adjust.
4447 (linux_target_ops): Adjust.
4448 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4449 (cris_insert_point): ... this.
4450 (cris_remove_watchpoint): Rename to ...
4451 (cris_remove_point): ... this.
4452 (the_low_target): Adjust.
4454 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4456 * server.c (handle_v_kill): Pass signal_pid to
4457 kill_inferior if multi_process is zero.
4459 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4461 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4462 * target.h (target_ops): Comment for *_watchpoint to make it clear
4463 the functions can get types '0' and '1'.
4465 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4467 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4468 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4469 * regcache.c (get_regcache): Likewise.
4470 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4471 * win32-low.c (child_fetch_inferior_registers): Remove check for
4474 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4475 Pedro Alves <pedro@codesourcery.com>
4477 * target.h (struct target_ops) <supports_multi_process>: New
4479 (target_supports_multi_process): New.
4480 * server.c (handle_query): Even if GDB reports support, only
4481 enable multi-process if the target also supports it. Report
4482 multi-process support only if the target backend supports it.
4483 * linux-low.c (linux_supports_multi_process): New function.
4484 (linux_target_ops): Install it as target_supports_multi_process
4487 2009-05-24 Doug Evans <dje@google.com>
4489 Global renaming of find_thread_pid to find_thread_ptid.
4490 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4491 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4492 All callers updated.
4494 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4495 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4498 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4499 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4500 (linux_resume_one_lwp): Ditto.
4502 2009-05-23 Doug Evans <dje@google.com>
4504 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4505 from struct inferior_list_entry * to struct lwp_info *.
4506 All callers updated.
4508 2009-05-13 Doug Evans <dje@google.com>
4510 * linux-x86-low.c: Don't include assert.h.
4511 (x86_siginfo_fixup): Use fatal, not assert.
4512 (x86_arch_setup): Fix comment.
4514 2009-05-12 Doug Evans <dje@google.com>
4516 Biarch support for i386/amd64 gdbserver.
4517 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4518 Add linux-x86-low.c.
4519 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4520 (linux-x86-low.o): Add.
4521 * linux-x86-64-low.c: Delete.
4522 * linux-i386-low.c: Delete.
4523 * linux-x86-low.c: New file.
4524 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4526 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4528 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4529 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4530 (linux_child_pid_to_exec_file): New function.
4531 (elf_64_header_p, elf_64_file_p): New functions.
4532 (siginfo_fixup): New function.
4533 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4534 give target a chance to convert layout.
4535 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4536 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4538 2009-05-07 Doug Evans <dje@google.com>
4540 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4541 (regsets_store_inferior_registers): Ditto.
4543 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4547 * linux-low.c (must_set_ptrace_flags): Delete.
4548 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4550 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4551 `lwp->must_set_ptrace_flags' instead.
4552 (linux_wait_for_event_1): Set ptrace options here.
4553 (linux_wait_1): ... not here.
4555 2009-04-30 Doug Evans <dje@google.com>
4557 * inferiors.c (started_inferior_callback): New function.
4558 (attached_inferior_callback): New function.
4559 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4560 * server.c (print_started_pid, print_attached_pid): New functions.
4561 (detach_or_kill_for_exit): New function.
4562 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4563 * server.h (have_started_inferiors_p): Declare.
4564 (have_attached_inferiors_p): Declare.
4566 * inferiors.c (remove_process): Fix memory leak, free process.
4567 * linux-low.c (linux_remove_process): New function.
4568 (linux_kill): Call it instead of remove_process.
4569 (linux_detach, linux_wait_1): Ditto.
4571 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4573 * configure.srv: Add x86 Windows CE target.
4575 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4577 * inferiors.c (get_thread_process): Make global.
4578 * server.h (get_thread_process): Add prototype.
4579 * thread-db.c (find_one_thread): Use get_thread_process
4580 instead of current_process.
4581 (thread_db_get_tls_address): Do not crash if called when
4582 thread layer is not yet initialized.
4584 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4586 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4587 * spu-low.c (current_tid): Rename to ...
4588 (current_ptid): ... this.
4589 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4590 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4591 ptid_get_lwp (current_ptid) instead of current_tid.
4592 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4593 instead of current_tid. Use find_process_pid to verify pid
4594 argument is valid. Pass proper argument to remove_process.
4595 (spu_thread_alive): Compare current_ptid instead of current_tid.
4596 (spu_resume): Likewise.
4598 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4600 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4603 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4605 Implement the multiprocess extensions, and add linux multiprocess
4608 * server.h (ULONGEST): Declare.
4609 (struct ptid, ptid_t): New.
4610 (minus_one_ptid, null_ptid): Declare.
4611 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4612 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4613 (struct inferior_list_entry): Change `id' type from unsigned from
4615 (struct sym_cache, struct breakpoint, struct
4616 process_info_private): Forward declare.
4617 (struct process_info): Declare.
4618 (current_process): Declare.
4619 (all_processes): Declare.
4620 (initialize_inferiors): Declare.
4621 (add_thread): Adjust to use ptid_t.
4622 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4623 (add_process, remove_process, find_thread_pid): Declare.
4624 (find_inferior_id): Adjust to use ptid_t.
4625 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4626 (multi_process): Declare.
4627 (push_event): Adjust to use ptid_t.
4628 (read_ptid, write_ptid): Declare.
4629 (prepare_resume_reply): Adjust to use ptid_t.
4630 (clear_symbol_cache): Declare.
4631 * inferiors.c (all_processes): New.
4632 (null_ptid, minus_one_ptid): New.
4633 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4634 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4635 (add_thread): Change unsigned long to ptid. Remove gdb_id
4637 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4638 (gdb_id_to_thread): Rename to ...
4639 (find_thread_pid): ... this. Change unsigned long to ptid.
4640 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4641 (loaded_dll, pull_pid_from_list): Adjust.
4642 (add_process, remove_process, find_process_pid)
4643 (get_thread_process, current_process, initialize_inferiors): New.
4644 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4645 (struct target_waitstatus) <related_pid>: Ditto.
4646 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4648 (struct target_ops) <join>: Add `pid' argument.
4649 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4650 (struct target_ops) <wait>: Add `ptid' field. Change return type
4652 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4653 (mywait): Add `ptid' argument. Change return type to ptid_t.
4654 (target_pid_to_str): Declare.
4655 * target.c (set_desired_inferior): Adjust to use ptids.
4656 (mywait): Add new `ptid' argument. Adjust.
4657 (target_pid_to_str): New.
4658 * mem-break.h (free_all_breakpoints): Declare.
4659 * mem-break.c (breakpoints): Delelete.
4660 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4661 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4662 to use per-process breakpoint list.
4663 (free_all_breakpoints): New.
4664 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4665 (symbol_cache, all_symbols_looked_up): Delete.
4667 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4669 (prepare_resume_reply): Change ptid argument's type from unsigned
4670 long to ptid_t. Adjust. Implement W;process and X;process.
4671 (free_sym_cache, clear_symbol_cache): New.
4672 (look_up_one_symbol): Adjust to per-process symbol cache. *
4673 * server.c (cont_thread, general_thread, step_thread): Change type
4676 (multi_process): New.
4677 (last_ptid): Change type to ptid_t.
4678 (struct vstop_notif) <ptid>: Change type to ptid_t.
4679 (queue_stop_reply, push_event): Change `ptid' argument's type to
4681 (discard_queued_stop_replies): Add `pid' argument.
4682 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4683 changes. Don't reference the `attached' global.
4684 (attach_inferior): Adjust to mywait interface changes.
4685 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4686 features. Handle and report "multiprocess+". Handle
4688 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4690 (handle_v_kill): New.
4691 (handle_v_stopped): Adjust to use target_pid_to_str.
4692 (handle_v_requests): Allow multiple attaches and runs when
4693 multiprocess extensions are in effect. Handle "vKill".
4694 (myresume): Adjust to use ptids.
4695 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4696 (handle_status): Adjust to discard_queued_stop_replies interface
4698 (first_thread_of, kill_inferior_callback)
4699 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4700 (main): Call initialize_inferiors. Adjust to use ptids, killing
4701 and detaching from all inferiors. Handle multiprocess packet
4703 * linux-low.h: Include gdb_proc_service.h.
4704 (struct process_info_private): New.
4705 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4706 <lwpid_of>: Use ptid_get_lwp.
4707 (get_lwp_thread): Adjust.
4708 (struct lwp_info): Add `dead' member.
4709 (find_lwp_pid): Declare.
4710 * linux-low.c (thread_db_active): Delete.
4711 (new_inferior): Adjust comment.
4712 (inferior_pid): Delete.
4713 (linux_add_process): New.
4714 (handle_extended_wait): Adjust.
4715 (add_lwp): Change unsigned long to ptid.
4716 (linux_create_inferior): Add process to processes table. Adjust
4717 to use ptids. Don't set new_inferior here.
4718 (linux_attach_lwp): Rename to ...
4719 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4720 it. Adjust to use ptids.
4721 (linux_attach_lwp): New.
4722 (linux_attach): Add process to processes table. Don't set
4724 (struct counter): New.
4725 (second_thread_of_pid_p, last_thread_of_process_p): New.
4726 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4728 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4729 processes. Remove process from process table.
4730 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4731 to multiple processes.
4732 (any_thread_of): New.
4733 (linux_detach): Add `pid' argument, and handle it. Remove process
4734 from processes table.
4735 (linux_join): Add `pid' argument. Handle it.
4736 (linux_thread_alive): Change unsighed long argument to ptid_t.
4737 Consider dead lwps as not being alive.
4738 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4739 threads we're not interested in.
4740 (same_lwp, find_lwp_pid): New.
4741 (linux_wait_for_lwp): Change `pid' argument's type from int to
4743 (linux_wait_for_event): Rename to ...
4744 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4745 from int to ptid_t. Adjust.
4746 (linux_wait_for_event): New.
4747 (linux_wait_1): Add `ptid' argument. Change return type to
4748 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4749 that exit from the process table.
4750 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4752 (mark_lwp_dead): New.
4753 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4754 stopping all threads, mark its main lwp as dead.
4755 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4757 (fetch_register, usr_store_inferior_registers)
4758 (regsets_fetch_inferior_registers)
4759 (regsets_store_inferior_registers, linux_read_memory)
4760 (linux_write_memory): Inline `inferior_pid'.
4761 (linux_look_up_symbols): Adjust to use per-process
4763 (linux_request_interrupt): Adjust to use ptids.
4764 (linux_read_auxv): Inline `inferior_pid'.
4765 (initialize_low): Don't reference thread_db_active.
4766 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4767 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4768 (ps_getpid): Return the pid of the current inferior.
4769 * thread-db.c (proc_handle, thread_agent): Delete.
4770 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4772 (find_one_thread): Change argument type to ptid_t. Adjust to
4774 (maybe_attach_thread): Adjust to per-process data and ptids.
4775 (thread_db_find_new_threads): Ditto.
4776 (thread_db_init): Ditto.
4777 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4778 processes table. Adjust to use ptids.
4779 (spu_kill, spu_detach): Adjust interface. Remove process from
4781 (spu_join, spu_thread_alive): Adjust interface.
4782 (spu_wait): Adjust interface. Remove process from processes
4783 table. Adjust to use ptids.
4784 * win32-low.c (current_inferior_tid): Delete.
4785 (current_inferior_ptid): New.
4786 (debug_event_ptid): New.
4787 (thread_rec): Take a ptid. Adjust.
4788 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4789 (child_delete_thread): Ditto.
4790 (do_initial_child_stuff): Add `attached' argument. Add process to
4792 (child_fetch_inferior_registers, child_store_inferior_registers):
4794 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4795 (win32_attach): Pass 1 to do_initial_child_stuff.
4796 (win32_kill): Adjust interface. Remove process from processes
4798 (win32_detach): Ditto.
4799 (win32_join): Adjust interface.
4800 (win32_thread_alive): Take a ptid.
4801 (win32_resume): Adjust to use ptids.
4802 (get_child_debug_event): Ditto.
4803 (win32_wait): Adjust interface. Remove exiting process from
4806 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4808 Non-stop mode support.
4810 * server.h (non_stop): Declare.
4811 (gdb_client_data, handler_func): Declare.
4812 (delete_file_handler, add_file_handler, start_event_loop):
4814 (handle_serial_event, handle_target_event, push_event)
4815 (putpkt_notif): Declare.
4816 * target.h (enum resume_kind): New.
4817 (struct thread_resume): Replace `step' field by `kind' field.
4818 (TARGET_WNOHANG): Define.
4819 (struct target_ops) <wait>: Add `options' argument.
4820 <supports_non_stop, async, start_non_stop>: New fields.
4821 (target_supports_non_stop, target_async): New.
4822 (start_non_stop): Declare.
4823 (mywait): Add `options' argument.
4824 * target.c (mywait): Add `options' argument. Print child exit
4826 (start_non_stop): New.
4827 * server.c (non_stop, own_buf, mem_buf): New globals.
4828 (struct vstop_notif): New.
4829 (notif_queue): New global.
4830 (queue_stop_reply, push_event, discard_queued_stop_replies)
4831 (send_next_stop_reply): New.
4832 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4834 (attach_inferior): In non-stop mode, don't wait for the target
4836 (handle_general_set): Handle QNonStop.
4837 (handle_query): When handling qC, return the current general
4838 thread, instead of the first thread of the list.
4839 (handle_query): If the backend supports non-stop mode, include
4840 QNonStop+ in the qSupported query response.
4841 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4843 (handle_v_attach, handle_v_run): Handle non-stop mode.
4844 (handle_v_stopped): New.
4845 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4846 (myresume): Adjust to use resume_kind. Handle non-stop.
4847 (queue_stop_reply_callback): New.
4848 (handle_status): Handle non-stop mode.
4849 (main): Clear non_stop flag on reconnection. Use the event-loop.
4850 Refactor serial protocol handling from here ...
4851 (process_serial_event): ... to this new function. When GDB
4852 selects any thread, select one here. In non-stop mode, wait until
4853 GDB acks all pending events before exiting.
4854 (handle_serial_event, handle_target_event): New.
4855 * remote-utils.c (remote_open): Install remote_desc in the event
4857 (remote_close): Remove remote_desc from the event loop.
4858 (putpkt_binary): Rename to...
4859 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4860 (putpkt_binary): New as wrapper around putpkt_binary_1.
4861 (putpkt_notif): New.
4862 (prepare_resume_reply): In non-stop mode, don't change the
4864 * event-loop.c: New.
4865 * Makefile.in (OBJ): Add event-loop.o.
4866 (event-loop.o): New rule.
4868 * linux-low.h (pid_of): Moved here.
4870 (get_lwp_thread): Use lwpid_of.
4871 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4872 * linux-low.c (pid_of): Delete.
4873 (inferior_pid): Use lwpid_of.
4874 (linux_event_pipe): New.
4875 (target_is_async_p): New.
4877 (handle_extended_wait): Use lwpid_of.
4878 (add_lwp): Don't set lwpid field.
4879 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4880 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4881 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4882 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4883 first. Adjust to linux_wait_for_event interface changes. Use
4885 (linux_detach): Don't delete the main lwp here.
4886 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4887 (status_pending_p): Don't consider explicitly suspended lwps.
4888 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4889 pointer. Add OPTIONS argument. Change return type to int. Use
4890 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4891 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4892 pointer. Add status pointer argument. Return a pid instead of a
4893 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4894 changes. In non-stop mode, don't switch to a random thread.
4895 (linux_wait): Rename to...
4896 (linux_wait_1): ... this. Add target_options argument, and handle
4897 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4898 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4899 clean exit and signal exit code. Don't stop all threads in
4900 non-stop mode. In all-stop mode, only stop all threads when
4901 reporting a stop to GDB. Handle explicit thread stop requests.
4902 (async_file_flush, async_file_mark): New.
4904 (send_sigstop): Use lwpid_of.
4905 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4906 interface changes. In non-stop mode, don't switch to a random
4908 (linux_resume_one_lwp): Use lwpid_of.
4909 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4910 (linux_resume_one_thread): ... this. Handle resume_stop. In
4911 non-stop mode, don't look for pending flag in all threads.
4912 (resume_status_pending_p): Don't consider explicitly suspended
4914 (my_waitpid): Reimplement. Emulate __WALL.
4915 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4917 (sigchld_handler, linux_supports_non_stop, linux_async)
4918 (linux_start_non_stop): New.
4919 (linux_target_ops): Register linux_supports_non_stop, linux_async
4920 and linux_start_non_stop.
4921 (initialize_low): Install SIGCHLD handler.
4922 * thread-db.c (thread_db_create_event, find_one_thread)
4923 (thread_db_get_tls_address): Use lwpid_of.
4924 * win32-low.c (win32_detach): Adjust to use resume_kind.
4925 (win32_wait): Add `options' argument.
4926 * spu-low.c (spu_resume): Adjust to use resume_kind.
4927 (spu_wait): Add `options' argument.
4929 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4931 Decouple target code from remote protocol.
4933 * target.h (enum target_waitkind): New.
4934 (struct target_waitstatus): New.
4935 (struct target_ops) <wait>: Return an unsigned long. Take a
4936 target_waitstatus pointer instead of a char pointer.
4938 * target.c (mywait): Change prototype to return an unsigned long.
4939 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4940 * server.h (thread_from_wait, old_thread_from_wait): Delete
4942 (prepare_resume_reply): Change prototype to take a
4944 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4945 (last_status, last_ptid): New.
4946 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4947 pid instead of a signal.
4948 (attach_inferior): Remove "status" and "signal" parameters.
4950 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4952 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4953 (handle_v_requests, myresume): Remove "status" and "signal"
4955 (handle_status): New.
4956 (main): Delete local `status'. Adjust.
4957 * remote-utils.c: Include target.h.
4958 (prepare_resume_reply): Change prototype to take a
4959 target_waitstatus. Adjust.
4961 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4963 * spu-low.c (spu_wait): Adjust.
4964 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4966 (win32_wait): Adjust.
4968 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4970 * target.h (struct thread_resume): Delete leave_stopped member.
4971 (struct target_ops): Add a `n' argument to the `resume' callback.
4972 * server.c (start_inferior): Adjust.
4973 (handle_v_cont, myresume): Adjust.
4974 * linux-low.c (check_removed_breakpoint): Adjust to resume
4975 interface change, and to removed leave_stopped field.
4976 (resume_ptr): Delete.
4977 (struct thread_resume_array): New.
4978 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4979 resume interface change.
4980 (linux_continue_one_thread, linux_queue_one_thread)
4981 (resume_status_pending_p): Check if the resume field is NULL
4982 instead of checking the leave_stopped member.
4983 (linux_resume): Adjust to the target resume interface change.
4984 * spu-low.c (spu_resume): Adjust to the target resume interface
4986 * win32-low.c (win32_detach, win32_resume): Ditto.
4988 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4990 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4992 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4994 (linux_continue_one_thread): Only preserve the stepping flag if
4995 there's a pending breakpoint.
4997 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4999 * server.c (main): After the inferior having exited, call
5000 remote_close before exiting gdbserver.
5002 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5004 Fix size of FPSCR in Power 7 processors.
5005 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5006 (PPC_FEATURE_HAS_DFP): New #define.
5007 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5010 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5012 * server.c (handle_query) Whitespace and formatting.
5014 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5016 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5017 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5018 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5019 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5020 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5021 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5022 Makefile.in, configure.ac: Fix whitespace throughout.
5023 * configure: Regenerate.
5025 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5027 * inferiors.c (find_inferior): Make it safe for the callback
5028 function to delete the currently iterated inferior.
5030 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5032 * Makefile.in (linuw_low_h): Move higher.
5033 (thread-db.o): Depend on $(linux_low_h).
5035 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5037 Rename "process" to "lwp" throughout.
5039 * linux-low.c (all_processes): Rename to...
5040 (all_lwps): ... this.
5041 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5042 (add_process): Rename to ...
5043 (add_lwp): ... this. Adjust.
5044 (linux_create_inferior): Adjust.
5045 (linux_attach_lwp): Adjust.
5046 (linux_attach): Adjust.
5047 (linux_kill_one_process): Rename to ...
5048 (linux_kill_one_lwp): ... this. Adjust.
5049 (linux_kill): Adjust.
5050 (linux_detach_one_process): Rename to ...
5051 (linux_detach_one_lwp): ... this. Adjust.
5052 (linux_detach): Adjust.
5053 (check_removed_breakpoint): Adjust.
5054 (status_pending_p): Adjust.
5055 (linux_wait_for_process): Rename to ...
5056 (linux_wait_for_lwp): ... this. Adjust.
5057 (linux_wait_for_event): Adjust.
5058 (send_sigstop): Adjust.
5059 (wait_for_sigstop): Adjust.
5060 (stop_all_processes): Rename to ...
5061 (stop_all_lwps): ... this.
5062 (linux_resume_one_process): Rename to ...
5063 (linux_resume_one_lwp): ... this. Adjust.
5064 (linux_set_resume_request, linux_continue_one_thread)
5065 (linux_queue_one_thread, resume_status_pending_p)
5066 (usr_store_inferior_registers, regsets_store_inferior_registers)
5067 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5069 * linux-low.h (get_process): Rename to ...
5070 (get_lwp): ... this. Adjust.
5071 (get_thread_process): Rename to ...
5072 (get_thread_lwp): ... this. Adjust.
5073 (get_process_thread): Rename to ...
5074 (get_lwp_thread): ... this. Adjust.
5075 (struct process_info): Rename to ...
5076 (struct lwp_info): ... this.
5077 (all_processes): Rename to ...
5078 (all_lwps): ... this.
5079 * proc-service.c (ps_lgetregs): Adjust.
5080 * thread-db.c (thread_db_create_event, find_one_thread)
5081 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5083 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5085 * server.c (handle_query): Handle "qAttached".
5087 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5089 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5090 GPLv3, update license URL.
5092 2009-03-01 Doug Evans <dje@google.com>
5094 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5095 (server_h): Add gdb_signals.h.
5096 (signals.o): Update.
5097 * server.h (target_signal_from_host,target_signal_to_host_p)
5098 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5100 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5102 * remote-utils.c (getpkt): Also generate remote-debug
5103 information if noack_mode is set.
5105 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5107 * server.c (handle_query): Report qXfer:siginfo:read and
5108 qXfer:siginfo:write as supported and handle them.
5109 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5110 * linux-low.c (linux_xfer_siginfo): New.
5111 (linux_target_ops): Set it.
5113 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5115 * server.c (gdbserver_usage): Mention --remote-debug.
5116 (main): Accept '--remote-debug' switch.
5118 2009-01-18 Doug Evans <dje@google.com>
5120 * regcache.c (new_register_cache): No need to check result of xcalloc.
5121 * server.c (handle_search_memory): Back out calls to xmalloc,
5122 result is checked and error is returned to user upon failure.
5123 (handle_query): Ditto. Add more checks for result of malloc.
5124 (handle_v_cont): Check result of malloc, report error back to
5126 (handle_v_run): Ditto. Call freeargv.
5127 * server.h (freeargv): Declare.
5128 * utils.c (freeargv): New fn.
5130 2009-01-15 Doug Evans <dje@google.com>
5132 * gdbreplay.c (perror_with_name): Make arg const char *.
5133 * server.h (target_signal_to_name): Make return type const char *.
5134 * thread-db.c (thread_db_err_str): Make return type const char *.
5135 * utils.c (perror_with_name): Make arg const char *.
5137 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5139 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5140 when handling a EXIT_PROCESS_DEBUG_EVENT.
5142 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5144 * gdbreplay.c (gdbreplay_version): Update copyright year.
5145 * server.c (gdbserver_version): Likewise.
5147 2009-01-05 Doug Evans <dje@google.com>
5149 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5150 (handle_extended_wait): Improve comment.
5152 2008-12-13 Doug Evans <dje@google.com>
5154 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5155 * server.h (ATTR_MALLOC): New macro.
5156 (xmalloc,xcalloc,xstrdup): Declare.
5157 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5158 * inferiors.c: Ditto.
5159 * linux-low.c: Ditto.
5160 * mem-break.c: Ditto.
5161 * regcache.c: Ditto.
5162 * remote-utils.c: Ditto.
5165 * win32-low.c: Ditto.
5167 2008-12-12 Doug Evans <dje@google.com>
5169 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5170 in debugging printf.
5172 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5174 2008-12-09 Doug Evans <dje@google.com>
5176 * linux-low.h (struct process_info): Delete member tid, unused.
5177 * thread-db.c (find_one_thread): Update.
5178 (maybe_attach_thread): Update.
5180 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5182 * target.h (struct target_ops): Add qxfer_osdata member.
5183 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5185 (linux_qxfer_osdata): New functions.
5186 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5188 * server.c (handle_query): Handle "qXfer:osdata:read:".
5189 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5190 (buffer_xml_printf): New functions.
5191 * server.h (struct buffer): New.
5192 (buffer_grow_str, buffer_grow_str0): New macros.
5193 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5194 (buffer_xml_printf): Declare.
5196 2008-11-24 Doug Evans <dje@google.com>
5198 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5200 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5202 * server.c (handle_v_run): Always use the supplied argument list.
5204 2008-11-19 Bob Wilson <bob.wilson@acm.org>
5206 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5207 (xtensa_regmap_table): Add entry for scompare1.
5209 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5211 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5212 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5213 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5214 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5215 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5216 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5217 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5218 XML target descriptions.
5219 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5220 when inferior is running on an ISA 2.05 or later processor. Add
5221 special case to return offset for full 64-bit slot of FPSCR when
5224 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5226 * Makefile.in (SFILES, clean): Added sparc64 files.
5227 (reg-sparc64.o, reg-sparc64.c): New.
5228 * configure.srv (sparc*-*-linux*): New configuration.
5229 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5230 syscall arguments for SPARC.
5231 (regsets_store_inferior_registers): Likewise.
5232 * linux-sparc-low.c: New file.
5234 2008-10-21 Doug Evans <dje@google.com>
5236 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5237 (READLINE_DIR,READLINE_DEP): Delete.
5238 (INTERNAL_CFLAGS): Update.
5239 (LINTFLAGS): Update.
5241 2008-10-10 Pedro Alves <pedro@codesourcery.com>
5243 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5244 whole argv from the last run, not just argv[0].
5246 2008-09-08 Pedro Alves <pedro@codesourcery.com>
5248 * regcache.c (new_register_cache): Return NULL if the register
5249 cache size isn't known yet.
5250 (free_register_cache): Avoid dereferencing a NULL regcache.
5252 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5254 * configure.srv: Merge MIPS and MIPS64.
5256 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5258 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5260 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
5262 * Makefile.in: Add required vsx dependencies.
5264 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5265 Declare init_registers_powerpc_vsx32l.
5266 Declare init_registers_powerpc_vsx64l.
5267 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5268 (ppc_arch_setup): Check for VSX in hwcap.
5269 (ppc_fill_vsxregset): New function.
5270 (ppc_store_vsxregset): New function.
5271 Add new VSX entry in regset_info target_regsets.
5273 * configure.srv: Add new VSX dependencies.
5275 2008-08-12 Pedro Alves <pedro@codesourcery.com>
5277 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5278 (remote_open): Set or clear transport_is_reliable.
5279 (putpkt_binary): Don't expect acks in noack mode.
5280 (getpkt): Don't send ack/nac in noack mode.
5281 * server.c (handle_general_set): Handle QStartNoAckMode.
5282 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5284 (main): Reset noack_mode on every connection.
5285 * server.h (noack_mode): Declare.
5287 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5289 * Makefile.in (GDBREPLAY_OBS): New variable.
5290 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5292 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5293 Daniel Jacobowitz <dan@codesourcery.com>
5295 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5296 (usr_store_inferior_registers): Likewise.
5297 (regsets_store_inferior_registers): Likewise.
5299 2008-07-31 Rolf Jansen <rj@surtec.com>
5300 Pedro Alves <pedro@codesourcery.com>
5302 * configure.ac: Check for memmem declaration.
5303 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5304 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5305 (disable_packet_qfThreadInfo): Unconditionally compile.
5306 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5307 * configure, config.in: Regenerate.
5309 2008-07-28 Doug Kwan <dougkwan@google.com>
5311 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5312 (linux_write_memory): Remove declaration of errno.
5314 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5316 * linux-low.c (handle_extended_wait): Do not use "status"
5317 variable uninitialized.
5319 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5321 * server.c (handle_v_attach): Inhibit reporting dll changes.
5323 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5325 * remote-utils.c (prepare_resume_reply): If requested, don't
5326 output "thread:TID" in the T stop reply.
5328 * server.c (disable_packet_vCont, disable_packet_Tthread)
5329 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5330 (handle_query): If requested, disable support for qC, qfThreadInfo
5332 (handle_v_requests): If requested, disable support for vCont.
5333 (gdbserver_show_disableable): New.
5334 (main): Handle --disable-packet and --disable-packet=LIST.
5336 * server.h (disable_packet_vCont, disable_packet_Tthread)
5337 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5339 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5341 * server.c (gdbserver_usage): Mention --version.
5343 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5345 * Makefile.in (gdbreplay.o): New rule.
5347 2008-06-06 Joseph Myers <joseph@codesourcery.com>
5349 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5350 message, not gdbserver.
5352 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5353 Nathan Sidwell <nathan@codesourcery.com>
5354 Joseph Myers <joseph@codesourcery.com>
5356 * acinclude.m4: Include ../../config/acx.m4.
5357 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5358 * configure, config.in: Regenerate.
5359 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5360 * server.c (gdbserver_version): Print PKGVERSION.
5361 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5362 (main): Adjust gdbserver_usage calls.
5363 * gdbreplay.c (version, host_name): Add declarations.
5364 (gdbreplay_version, gdbreplay_usage): New.
5365 (main): Accept --version and --help options.
5367 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5369 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5370 (arm_breakpoint_at): Handle Thumb.
5371 (the_low_target): Add comment.
5373 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5375 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5377 2008-05-09 Doug Evans <dje@google.com>
5379 * server.h (decode_search_memory_packet): Declare.
5380 * remote-utils.c (decode_search_memory_packet): New fn.
5381 * server.c (handle_search_memory_1): New fn.
5382 (handle_search_memory): New fn.
5383 (handle_query): Process qSearch:memory packets.
5385 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5387 * regcache.c (registers_length): Remove.
5388 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5389 full register packet.
5390 * regcache.h (registers_length): Remove prototype.
5391 * server.h (PBUFSIZ): Define to 16384.
5393 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5395 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5396 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5397 powerpc-64l.o, and powerpc-altivec64l.o.
5398 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5399 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5400 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5401 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5402 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5405 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5406 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5407 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5408 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5409 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5410 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5411 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5412 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5413 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5414 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5417 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5418 (init_registers_powerpc_32l): ... this new prototype.
5419 (init_registers_powerpc_32): Remove, replace by ...
5420 (init_registers_powerpc_altivec32l): ... this new prototype.
5421 (init_registers_powerpc_e500): Remove, replace by ...
5422 (init_registers_powerpc_e500l): ... this new prototype.
5423 (init_registers_ppc64): Remove, replace by ...
5424 (init_registers_powerpc_64l): ... this new prototype.
5425 (init_registers_powerpc_64): Remove, replace by ...
5426 (init_registers_powerpc_altivec64l): ... this new prototype.
5427 (ppc_num_regs): Set to 73.
5428 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5429 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5430 (ppc_cannot_store_register): Handle orig_r3 and trap.
5431 (ppc_arch_setup): Update init_registers_... calls.
5432 (ppc_fill_gregset): Handle orig_r3 and trap.
5434 * inferiors.c (clear_inferiors): Reset current_inferior.
5436 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5438 * acinclude.m4: Add override.m4.
5439 * configure: Regenerate.
5441 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5443 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5444 initial call to init_register_ppc64.
5446 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5448 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5449 single powerpc*-*-linux* case.
5450 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5452 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5454 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5455 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5457 * linux-ppc-low.c: Include <elf.h>.
5458 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5459 (ppc_hwcap): New global variable.
5460 (ppc_regmap): Remove __SPE__ #ifdef sections.
5461 (ppc_regmap_e500): New global variable.
5462 (ppc_cannot_store_register): Update __SPE__ special case.
5463 (ppc_get_hwcap): New function.
5464 (ppc_arch_setup): Use it to determine whether inferior supports
5465 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5466 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5467 Do not access registers if target does not support AltiVec.
5468 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5469 Do not access registers if target does not support SPE.
5470 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5472 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5474 * linux-low.c (disabled_regsets, num_regsets): New.
5475 (use_regsets_p): Delete.
5476 (linux_wait_for_process): Clear disabled_regsets.
5477 (regsets_fetch_inferior_registers): Check and set it.
5478 (regsets_store_inferior_registers): Likewise.
5479 (linux_fetch_registers, linux_store_registers): Do not use
5481 (initialize_low): Allocate disabled_regsets.
5483 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5485 * Makefile.in (LIBOBJS): New.
5487 (memmem.o): New rule.
5488 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5489 * configure: Regenerated.
5491 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5493 * server.c (handle_query): Never return "unsupported" for
5494 qXfer:features:read queries.
5496 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5498 * server.c (get_features_xml): Fix inverted condition.
5499 (handle_query): Always support qXfer:feature:read.
5501 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5503 * server.c (wrapper_argv): New.
5504 (start_inferior): Handle wrapper_argv. If set, expect an extra
5506 (gdbserver_usage): Document --wrapper.
5507 (main): Parse --wrapper.
5509 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5511 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5512 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5513 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5514 (ppc_set_pc): Likewise.
5515 (ppc_arch_setup): New function.
5516 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5517 of collect_register.
5518 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5520 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5522 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5523 instead of linux-ppc64-low.o.
5524 * linux-ppc64-low.c: Remove file.
5525 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5526 (linux-ppc64-low.o): Remove rule.
5528 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5529 (init_registers_powerpc_64): Likewise.
5530 (ppc_regmap): Conditionally define depending on __powerpc64__.
5531 (ppc_cannot_store_register): Do not special-case "fpscr" when
5532 compiled on __powerpc64__.
5533 (ppc_collect_ptrace_register): New function.
5534 (ppc_supply_ptrace_register): New function.
5535 (ppc_breakpoint): Change type to "unsigned int".
5536 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5537 (the_low_target): Conditionally provide initializers for the
5538 arch_setup member depending on __powerpc64__. Install
5539 collect_ptrace_register and supply_ptrace_register members.
5541 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5543 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5544 * server.c (gdbserver_xmltarget): Define.
5545 (get_features_xml): Use it to replace "target.xml" and arch_string.
5547 * configure.srv: Remove srv_xmltarget. Add XML files that were
5548 mentioned there to srv_xmlfiles instead. Remove conditional tests
5549 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5550 srv_xmlfiles and srv_regobj to include all possible choices.
5551 * configure.ac (srv_xmltarget): Remove.
5552 (srv_xmlfiles): Do not add "target.xml".
5553 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5554 checks for supplementary target information.
5555 * configure: Regenerate.
5556 * Makefile.in (XML_TARGET): Remove.
5557 (target.xml): Remove rule.
5558 (clean): Do not clean up target.xml.
5559 (.PRECIOUS): Do not mention target.xml.
5561 * target.h (struct target_ops): Remove arch_string member.
5562 * linux-low.c (linux_arch_string): Remove.
5563 (linux_target_ops): Remove arch_string initializer.
5564 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5565 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5566 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5567 * spu-low.c (spu_arch_string): Remove.
5568 (spu_target_ops): Remove arch_string initializer.
5569 * win32-low.c (win32_arch_string): Remove.
5570 (win32_target_ops): Remove arch_string initializer.
5571 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5572 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5573 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5575 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5577 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5578 by collect_ptrace_register and supply_ptrace_register hooks.
5579 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5580 instead of checking for the_low_target.left_pad_xfer.
5581 (usr_store_inferior_registers): Use collect_ptrace_register callback
5582 instead of checking for the_low_target.left_pad_xfer.
5584 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5585 (s390_supply_ptrace_register): Likewise.
5586 (s390_fill_gregset): Call s390_collect_ptrace_register.
5587 (the_low_target): Update.
5589 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5590 (ppc_supply_ptrace_register): Likewise.
5591 (the_low_target): Update.
5593 * linux-i386-low.c (the_low_target): Update.
5594 * linux-x86-64-low.c (the_low_target): Update.
5596 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5598 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5599 reg-s390.o and reg-s390x.o.
5601 * linux-low.c (new_inferior): New global variable.
5602 (linux_create_inferior, linux_attach): Set it.
5603 (linux_wait_for_process): Call the_low_target.arch_setup after the
5604 target has stopped for the first time.
5605 (initialize_low): Do not call the_low_target.arch_setup.
5607 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5608 (s390_set_pc): Likewise.
5609 (s390_arch_setup): New function.
5610 (the_low_target): Use s390_arch_setup as arch_setup routine.
5612 * regcache.c (realloc_register_cache): New function.
5613 (set_register_cache): Call it for each existing regcache.
5615 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5617 * server.h (init_registers): Remove prototype.
5619 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5620 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5621 instead of init_registers ().
5622 * linux-arm-low.c (init_registers_arm): Add prototype.
5623 (init_registers_arm_with_iwmmxt): Likewise.
5624 (the_low_target): Add initializer for arch_setup field.
5625 * linux-cris-low.c (init_registers_cris): Add prototype.
5626 (the_low_target): Add initializer for arch_setup field.
5627 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5628 (the_low_target): Add initializer for arch_setup field.
5629 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5630 (the_low_target): Add initializer for arch_setup field.
5631 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5632 (the_low_target): Add initializer for arch_setup field.
5633 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5634 (the_low_target): Add initializer for arch_setup field.
5635 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5636 (the_low_target): Add initializer for arch_setup field.
5637 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5638 (init_registers_mips64_linux): Likewise.
5639 (the_low_target): Add initializer for arch_setup field.
5640 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5641 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5642 (the_low_target): Add initializer for arch_setup field.
5643 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5644 (init_registers_powerpc_64): Likewise.
5645 (the_low_target): Add initializer for arch_setup field.
5646 * linux-s390-low.c (init_registers_s390): Add prototype.
5647 (init_registers_s390x): Likewise.
5648 (the_low_target): Add initializer for arch_setup field.
5649 * linux-sh-low.c (init_registers_sh): Add prototype.
5650 (the_low_target): Add initializer for arch_setup field.
5651 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5652 (the_low_target): Add initializer for arch_setup field.
5653 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5654 (the_low_target): Add initializer for arch_setup field.
5656 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5657 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5658 instead of init_registers ().
5659 * win32-arm-low.c (init_registers_arm): Add prototype.
5660 (the_low_target): Add initializer for arch_setup field.
5661 * win32-i386-low.c (init_registers_i386): Add prototype.
5662 (the_low_target): Add initializer for arch_setup field.
5664 * spu-low.c (init_registers_spu): Add prototype.
5665 (initialize_low): Call initialie_registers_spu () instead of
5666 initialize_registers ().
5668 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5670 * server.c (handle_v_requests): When handling the vRun and vAttach
5671 packets, if already debugging a process, don't kill it. Return an
5674 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5676 * server.c (handle_query): Correct length check.
5678 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5680 * win32-low.c (do_initial_child_stuff): Add process handle
5681 parameter. Set current_process_handle and current_process_id from the
5682 parameters. Clear globals.
5683 (win32_create_inferior): Don't set current_process_handle and
5684 current_process_id here. Instead pass them on the call to
5685 do_initial_child_stuff.
5686 (win32_attach): Likewise.
5687 (win32_clear_inferiors): New.
5688 (win32_kill): Don't close the current process handle or the
5689 current thread handle here. Instead call win32_clear_inferiors.
5690 (win32_detach): Don't open a new handle to the process. Call
5691 win32_clear_inferiors.
5692 (win32_join): Don't rely on current_process_handle; open a new
5693 handle using the process id.
5694 (win32_wait): Call win32_clear_inferiors when the inferior process
5697 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5699 * server.c (monitor_show_help): Add "exit".
5701 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5703 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5704 (clean): Add reg-xtensa.c.
5705 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5706 * configure.srv (xtensa*-*-linux*) New target.
5707 * linux-xtensa-low.c: New.
5708 * xtensa-xtregs.c: New.
5710 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5712 * hostio.c: Don't include errno.h.
5713 (errno_to_fileio_errno): Move to hostio-errno.
5714 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5715 error number outputting to the target->hostio_last_error callback.
5716 (hostio_packet_error): Use FILEIO_EINVAL directly.
5717 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5718 calls to hostio_error.
5719 * hostio-errno.c: New.
5720 * server.h (hostio_last_error_from_errno): Declare.
5721 * target.h (target_ops): Add hostio_last_error member.
5722 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5723 as hostio_last_error handler.
5724 * spu-low.c (spu_target_ops): Likewise.
5725 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5726 (wince_hostio_last_error): New functions.
5727 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5728 as hostio_last_error handler.
5729 (win32_target_ops) [!_WIN32_WCE]: Register
5730 hostio_last_error_from_errno as hostio_last_error handler.
5731 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5732 (hostio-errno.o): New rule.
5733 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5734 * configure.srv (srv_hostio_err_objs): New variable. Default to
5736 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5737 * configure: Regenerate.
5739 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5741 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5742 (linux_kill, linux_detach): Clean up the process list.
5743 * remote-utils.c (remote_open): Improve port number parsing.
5744 (putpkt_binary, input_interrupt): Only send interrupts if the target
5746 * server.c (extended_protocol): Make static.
5747 (attached): Define earlier.
5748 (exit_requested, response_needed, program_argv): New variables.
5749 (target_running): New.
5750 (start_inferior): Clear attached here.
5751 (attach_inferior): Set attached here.
5752 (require_running): Define.
5753 (handle_query): Use require_running and target_running. Implement
5755 (handle_v_attach, handle_v_run): New.
5756 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5757 (gdbserver_usage): Update.
5758 (main): Redo argument parsing. Handle --debug and --multi. Handle
5759 --attach along with other options or after the port. Save
5760 program_argv. Support no initial program. Resynchronize
5761 communication with GDB after an error. Handle "monitor exit".
5762 Use require_running and target_running. Always allow the extended
5763 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5764 restart in extended mode.
5765 * README: Refer to the GDB manual. Update --attach usage.
5767 2007-12-20 Andreas Schwab <schwab@suse.de>
5769 * linux-low.c (STACK_SIZE): Define.
5770 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5771 (linux_test_for_tracefork): Likewise.
5773 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5775 * linux-low.c (linux_wait_for_event): Update messages. Do not
5776 reinsert auto-delete breakpoints.
5777 * mem-break.c (struct breakpoint): Change return type of handler to
5779 (set_breakpoint_at): Update handler type.
5780 (reinsert_breakpoint_handler): Return 1 instead of calling
5782 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5784 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5785 * mem-break.h (set_breakpoint_at): Update handler type.
5786 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5787 * win32-low.c (auto_delete_breakpoint): New.
5788 (get_child_debug_event): Use it.
5790 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5792 * configure.ac: Check for pread and pwrite.
5793 * hostio.c (handle_pread): Fall back to lseek and read.
5794 (handle_pwrite): Fall back to lseek and write.
5795 * config.in, configure: Regenerated.
5797 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5799 * server.c (myresume): Add own_buf argument.
5800 (main): Update calls.
5802 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5804 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5805 * remote-utils.c (remote_open): Do not call disable_async_io.
5806 (block_async_io): Delete.
5807 (unblock_async_io): Make static.
5808 (initialize_async_io): New.
5809 * server.c (handle_v_cont): Handle async I/O here.
5810 (myresume): Likewise. Move other common resume tasks here...
5811 (main): ... from here. Call initialize_async_io. Disable async
5812 I/O before the main loop.
5813 * server.h (initialize_async_io): Declare.
5814 (block_async_io, unblock_async_io): Delete prototypes.
5815 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5817 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5819 * remote-utils.c (readchar): Allow binary data in received messages.
5821 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5823 * win32-low.c (attaching): New global.
5824 (win32_create_inferior): Clear the `attaching' global.
5825 (win32_attach): Set the `attaching' global.
5826 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5827 attaching. Only set a breakpoint at the entry point if not
5830 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5832 * server.c (main): Don't report dll events on the initial
5833 connection on attaches.
5835 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5837 * server.c (main): Relax numerical bases supported for the pid of
5838 the --attach command line argument.
5840 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5842 * win32-low.c (win32_attach): Call OpenProcess before
5843 DebugActiveProcess, not after. Add last error output to error
5846 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5848 * win32-low.c (win32_get_thread_context)
5849 (win32_set_thread_context): New functions.
5850 (thread_rec): Use win32_get_thread_context.
5851 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5852 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5855 2007-12-03 Leo Zayas
5856 Pedro Alves <pedro_alves@portugalmail.pt>
5858 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5860 (child_add_thread): Minor cleanup.
5861 (child_continue): Resume artificially suspended threads before
5862 calling ContinueDebugEvent.
5863 (suspend_one_thread): New.
5864 (fake_breakpoint_event): New.
5865 (get_child_debug_event): Change return type to int. Check here if
5866 gdb sent an interrupt request. If a soft interrupt was requested,
5867 fake a breakpoint event. Return 0 if there is no event to handle,
5869 (win32_wait): Don't check here if gdb sent an interrupt request.
5870 Ensure there is a valid event to handle.
5871 (win32_request_interrupt): Add soft interruption method as last
5874 2007-12-03 Leo Zayas
5875 Pedro Alves <pedro_alves@portugalmail.pt>
5877 * win32-low.h (win32_thread_info): Add descriptions to the
5878 structure members. Replace `suspend_count' counter by a
5880 * win32-low.c (thread_rec): Update condition of when to get the
5881 context from the inferior. Rely on ContextFlags being set if it
5882 has already been retrieved. Only suspend the inferior thread if
5883 we haven't already. Warn if that fails.
5884 (continue_one_thread): s/suspend_count/suspended/. Only call
5885 ResumeThread once. Warn if that fails.
5887 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5889 * win32-low.c (win32_wait): Don't read from the inferior when it
5892 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5894 * Makefile.in (win32_low_h): New variable.
5895 (win32-low.o): Add dependency on $(win32_low_h).
5896 (win32-arm-low.o, win32-i386-low.o): New rules.
5898 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5900 * hostio.c: Correct copyright year.
5902 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5904 * Makefile.in (OBS): Add hostio.o.
5905 (hostio.o): New rule.
5906 * server.h (handle_vFile): Declare.
5907 * hostio.c: New file.
5908 * server.c (handle_v_requests): Take packet_len and new_packet_len
5909 for binary packets. Call handle_vFile.
5910 (main): Update call to handle_v_requests.
5912 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5914 * linux-low.c: Include <sched.h>.
5916 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5918 * linux-low.c (linux_tracefork_grandchild): New.
5919 (linux_tracefork_child): Use clone.
5920 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5922 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5924 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5926 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5928 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5930 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5932 * inferiors.c (change_inferior_id): Delete.
5933 (add_pid_to_list, pull_pid_from_list): New.
5934 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5935 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5936 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5937 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5938 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5939 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5940 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5941 (using_threads): Always set to 1.
5942 (handle_extended_wait): New.
5943 (add_process): Do not set TID.
5944 (linux_create_inferior): Set must_set_ptrace_flags.
5945 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5946 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5947 (linux_thread_alive): Rename TID argument to LWPID.
5948 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5949 (linux_wait_for_event): Do not use TID or check using_threads. Update
5950 call to dead_thread_notify. Call handle_extended_wait.
5951 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5952 (send_sigstop): Delete sigstop_sent.
5953 (wait_for_sigstop): Avoid TID.
5954 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5955 (linux_test_for_tracefork): New.
5956 (linux_lookup_signals): Use thread_db_active and
5957 linux_supports_tracefork_flag.
5958 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5959 * linux-low.h (get_process_thread): Avoid TID.
5960 (struct process_ifo): Move thread_known and tid to the end. Remove
5962 (linux_attach_lwp, thread_db_init): Update prototypes.
5963 * server.h (change_inferior_id): Delete prototype.
5964 (add_pid_to_list, pull_pid_from_list): New prototypes.
5965 * thread-db.c (thread_db_use_events): New.
5966 (find_first_thread): Rename to...
5967 (find_one_thread): ...this. Update callers and messages. Do not
5968 call fatal. Check thread_db_use_events. Do not call
5969 change_inferior_id or new_thread_notify.
5970 (maybe_attach_thread): Update. Do not call new_thread_notify.
5971 (thread_db_init): Set thread_db_use_events. Check use_events.
5972 * utils.c (fatal, warning): Correct message prefix.
5974 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5976 * Makefile.in (clean): Remove new files.
5977 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5978 (powerpc-64.o, powerpc-64.c): New rules.
5979 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5980 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5982 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5984 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5985 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5986 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5987 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5988 (target_regsets): Add AltiVec and SPE register sets.
5989 * configure.ac: Check for AltiVec and SPE.
5990 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5991 (ppc_fill_vrregset, ppc_store_vrregset): New.
5992 (target_regsets): Add AltiVec register set.
5993 * configure: Regenerated.
5995 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5997 * linux-low.c (O_LARGEFILE): Define.
5998 (linux_read_memory): Use /proc/PID/mem.
5999 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6000 * configure, config.in: Regenerated.
6002 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6004 * linux-low.c (linux_wait_for_event): Do not pass signals while
6007 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6009 * win32-low.c (create_process): New.
6010 (win32_create_inferior): Use create_process instead of
6011 CreateProcess. If create_process failed retry appending an ".exe"
6012 suffix. Store the GetLastError result immediatelly after
6013 create_process calls and use it on the call to error.
6015 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6017 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6019 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6021 * configure.ac: Switch license to GPLv3.
6023 2007-08-01 Michael Snyder <msnyder@access-company.com>
6025 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6027 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6029 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6031 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6032 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6033 CloseToolhelp32Snapshot.
6034 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6035 CloseToolhelp32Snapshot.
6037 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6039 * server.c (main): Check for inferior exit before main loop.
6041 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6043 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6044 instead of on tmp_desc.
6046 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6047 Daniel Jacobowitz <dan@codesourcery.com>
6049 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6050 (add_thread): Minor cleanups.
6051 (clear_inferiors): Move lower in the file. Clear the DLL
6053 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6054 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6055 (xml_escape_text): New.
6056 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6058 (handle_v_cont): Report errors.
6059 (gdbserver_version): Update.
6060 (main): Correct size of own_buf. Do not report initial DLL events.
6061 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6062 (unloaded_dll, xml_escape_text): New.
6063 * win32-low.c (enum target_waitkind): Update comments.
6064 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6065 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6066 (win32_EnumProcessModules, win32_GetModuleInformation)
6067 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6068 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6069 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6070 (win32_Module32First, win32_Module32Next, load_toolhelp)
6071 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6072 (get_child_debug_event): Handle DLL events.
6073 (win32_wait): Likewise.
6075 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6077 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6078 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6080 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6082 * win32-low.c (handle_output_debug_string): Ignore event if not
6085 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6087 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6089 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6091 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6093 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6095 * inferiors.c (change_inferior_id): Add comment.
6096 * linux-low.c (check_removed_breakpoint): Add an early
6097 prototype. Improve debug output.
6098 (linux_attach): Doc update.
6099 (linux_detach_one_process, linux_detach): Clean up before releasing
6101 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6102 * linux-low.h (struct process_info): Doc improvement.
6103 * mem-break.c (delete_all_breakpoints): New.
6104 * mem-break.h (delete_all_breakpoints): New prototype.
6105 * thread-db.c (find_first_thread): New.
6106 (thread_db_create_event): Call it instead of
6107 thread_db_find_new_threads. Clean up unused variables.
6108 (maybe_attach_thread): Remove first thread handling.
6109 (thread_db_find_new_threads): Use find_first_thread.
6110 (thread_db_get_tls_address): Likewise.
6112 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6114 * thread-db.c (thread_db_find_new_threads): Add prototype.
6115 (thread_db_create_event): Check for the main thread before adding
6117 (maybe_attach_thread): Only enable event reporting if TID == 0.
6118 (thread_db_get_tls_address): Check for new threads.
6120 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6122 * linux-low.c (linux_create_inferior): Try execv before execvp.
6123 * spu-low.c (spu_create_inferior): Likewise.
6125 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6127 * linux-low.c (linux_create_inferior): Change execv to execvp.
6128 * spu-low.c (spu_create_inferior): Likewies.
6130 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6132 * Makefile.in (clean): Clean new files instead of deleted ones.
6133 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6134 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6136 * configure.srv: Specify XML files and new regformats for MIPS and
6138 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6139 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6140 an entry for the restart register.
6141 (mips_cannot_fetch_register, mips_cannot_store_register)
6142 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6143 register names to match the XML descriptions.
6144 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6145 restart register instead of $0.
6147 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6148 Markus Deuling <deuling@de.ibm.com>
6150 * remote-utils.c (decode_xfer_write): New function.
6151 * server.h (decode_xfer_write): Add prototype.
6152 * server.c (handle_query): Add PACKET_LEN argument. Support
6153 qXfer:spu:read and qXfer:spu:write packets.
6154 (main): Pass packet_len to handle_query.
6155 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6156 * target.h (target_ops): Add qxfer_spu.
6158 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6160 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6161 accessing non-seekable spufs files.
6163 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6165 * server.c (handle_query): Add reply for qC packet.
6167 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6168 Leo Zayas <lerele@champenstudios@com>
6170 * server.h (check_remote_input_interrupt_request): New function.
6171 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6172 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6173 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6174 (check_remote_input_interrupt_request): New function.
6175 * server.h (check_remote_input_interrupt_request): Declare.
6176 * win32-low.c (winapi_DebugBreakProcess,
6177 winapi_GenerateConsoleCtrlEvent): New typedefs.
6178 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6180 (win32_wait): Check for remote interrupt request
6181 with check_remote_input_interrupt_request.
6182 (win32_request_interrupt): New function.
6183 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6185 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6187 * win32-low.c (debug_registers_changed,
6188 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6189 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6190 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6191 (thread_rec): Get context using the low target.
6192 (child_add_thread): Call thread_added on the low target,
6193 which does the same thing.
6195 (do_initial_child_stuff): Remove debug registers references.
6196 Set context using the low target. Resume threads after
6197 setting the contexts.
6198 (child_continue): Remove dead variable. Remove debug
6199 registers references.
6200 (child_fetch_inferior_registers): Go through the low target.
6201 (do_child_store_inferior_registers): Remove.
6202 (child_store_inferior_registers): Go through the low target.
6203 (win32_resume): Remove debug registers references.
6204 Set context using the low target.
6205 (handle_exception): Change return type to void. Don't record
6206 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6207 first chance exception.
6208 (get_child_debug_event): Change return type to void. Remove
6209 goto loop. Always return after waiting for debug event.
6210 (win32_wait): Convert to switch statement. Handle spurious
6213 * win32-i386-low.c (debug_registers_changed,
6214 debug_registers_used): New.
6215 (initial_stuff): Rename to ...
6216 (i386_initial_stuff): ... this. Clear debug registers
6218 (store_debug_registers): Delete.
6219 (i386_get_thread_context): New.
6220 (load_debug_registers): Delete.
6221 (i386_set_thread_context): New.
6222 (i386_thread_added): New.
6223 (single_step): Rename to ...
6224 (i386_single_step): ... this.
6225 (do_fetch_inferior_registers): Rename to ...
6226 (i386_fetch_inferior_register): ... this.
6227 (i386_store_inferior_register): New.
6228 (the_low_target): Adapt to new interface.
6230 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6231 (arm_get_thread_context): New.
6232 (arm_set_thread_context): New.
6234 (do_fetch_inferior_registers): Rename to ...
6235 (arm_fetch_inferior_register): ... this.
6236 (arm_store_inferior_register): New.
6237 (arm_wince_breakpoint): Reimplement as unsigned long.
6238 (arm_wince_breakpoint_len): Define.
6239 (the_low_target): Adapt to new interface.
6241 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6242 load_debug_registers. Add get_thread_context, set_thread_context,
6243 thread_added and store_inferior_register. Rename
6244 fetch_inferior_registers to fetch_inferior_register.
6245 (regptr): Remove declaration.
6247 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6249 * linux-low.c (linux_detach): Change return type to int. Return 0.
6250 * spu-low.c (spu_detach): Likewise.
6252 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6254 * target.h (target_ops): Change return type of detach to int.
6256 (join_inferior): New.
6257 * server.c (main): Don't skip detach support on mingw32.
6258 If the inferior doesn't support detaching return error.
6259 Call join_inferior instead of using waitpid.
6260 * linux-low.c (linux_join): New.
6261 (linux_target_op): Add linux_join.
6262 * spu-low.c (spu_join): New.
6263 (spu_target_ops): Add spu_join.
6264 * win32-low.c (win32_detach): Adapt to new interface.
6265 Reopen current_process_handle before detaching. Issue a child
6266 resume before detaching.
6268 (win32_target_op): Add win32_join.
6270 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6272 * win32-low.c (win32-attach): Fix return value.
6273 * target.h (target_ops): Describe ATTACH return values.
6275 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6277 * win32-low.c (GETPROCADDRESS): Define.
6278 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6279 (winapi_DebugSetProcessKillOnExit): Likewise.
6280 (win32_create_inferior): Force usage of ansi CreateProcessA.
6281 (win32_attach): Use GETPROCADDRESS.
6282 (win32_detach): Likewise.
6284 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6286 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6288 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6290 * win32-low.c: Commit leftover changes from 2007-03-29.
6292 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6294 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6295 fields short instead of int. Add explicit padding.
6296 (i387_cache_to_fsave): Remove unnecessary casts.
6297 (i387_fsave_to_cache): Doc fix.
6298 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6300 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6302 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6303 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6305 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6307 * configure.srv (arm*-*-mingw32ce*): Move near the other
6310 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6312 * configure.ac: Add errno checking.
6313 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6314 sys/file.h and malloc.h.
6315 (AC_CHECK_DECLS): Add perror.
6316 (srv_mingwce): Handle.
6317 * configure.srv (i[34567]86-*-cygwin*): Add
6318 win32-i386-low.o to srv_tgtobj.
6319 (i[34567]86-*-mingw*): Likewise.
6320 (arm*-*-mingw32ce*): Add case.
6321 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6322 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6323 [__MINGW32CE__] (strerror): New function.
6324 [__MINGW32CE__] (errno): Define to GetLastError.
6325 [__MINGW32CE__] (COUNTOF): New macro.
6326 (remote_open): Remove extra close call.
6327 * mem-break.c (delete_breakpoint_at): New function.
6328 * mem-break.h (delete_breakpoint_at): Declare.
6329 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6330 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6331 [USE_WIN32API] (read, write): Add char* casts.
6332 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6333 * server.h: Include wincecompat.h on Windows CE.
6334 [HAVE_ERRNO_H]: Check.
6335 (perror): Declare if not declared.
6336 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6337 (perror_with_name): Remove errno declaration.
6338 * wincecompat.h: New.
6339 * wincecompat.c: New.
6341 * win32-arm-low.c: New.
6342 * win32-i386-low.c: New.
6343 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6344 (OUTMSG2): Make it safe.
6346 (COUNTOF): New macro.
6347 (NUM_REGS): Get it from the low target.
6348 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6349 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6350 (thread_rec): Let low target handle debug registers.
6351 (child_add_thread): Likewise.
6352 (child_init_thread_list): Likewise.
6353 (continue_one_thread): Likewise.
6355 (do_child_fetch_inferior_registers): Move to ...
6356 * win32-i386-low.c: ... here, and rename to ...
6357 (do_fetch_inferior_registers): ... this.
6358 * win32-low.c (child_fetch_inferior_registers):
6359 Go through the low target.
6360 (do_child_store_inferior_registers): Use regptr.
6361 (strwinerror): New function.
6362 (win32_create_inferior): Handle Windows CE.
6363 Use strwinerror instead of strerror on Windows error
6364 codes. Add program to the error output.
6365 Don't close the main thread handle on Windows CE.
6366 (win32_attach): Use coredll.dll on Windows CE.
6367 (win32_kill): Close current process and current
6369 (win32_detach): Use coredll.dll on Windows CE.
6370 (win32_resume): Let low target handle debug registers, and
6372 (handle_exception): Add/Remove initial breakpoint. Avoid
6373 non-existant WSTOPSIG on Windows CE.
6374 (win32_read_inferior_memory): Cast to remove warning.
6375 (win32_arch_string): Go through the low target.
6376 (initialize_low): Call set_breakpoint_data with the low
6377 target's breakpoint.
6378 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6379 FOP_REGNUM, mappings): Move to ...
6380 * win32-i386-low.c: ... here.
6381 * win32-low.c (win32_thread_info): Move to ...
6382 * win32-low.h: ... here.
6383 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6384 win32-arm-low.c and wincecompat.c.
6385 (all:): Add $EXEEXT.
6386 (install-only:): Likewise.
6387 (gdbserver:): Likewise.
6388 (gdbreplay:): Likewise.
6389 * config.in: Regenerate.
6390 * configure: Regenerate.
6392 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6394 * win32-low.c: Rename typedef thread_info to
6395 win32_thread_info throughout.
6397 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6399 * win32-i386-low.c: Rename to ...
6400 * win32-low.c: ... this.
6401 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6402 * Makefile.in: Likewise.
6404 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6406 * remote-utils.c (monitor_output): Constify msg parameter.
6407 * server.h (monitor_output): Likewise.
6408 * win32-i386-low.c (handle_output_debug_string): New.
6409 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6410 handle_output_debug_string.
6411 (get_child_debug_event): Likewise.
6413 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6415 * server.c (main): Correct strtoul check.
6417 2007-03-27 Jon Ringle <jon@ringle.org>
6419 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6421 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6423 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6425 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6427 * terminal.h: Check HAVE_SGTTY_H.
6429 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6431 * remote-utils.c (remote_open): Print out the assigned port number.
6433 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6435 * remote-utils.c (monitor_output): New function.
6436 * server.c (debug_threads): Define here.
6437 (monitor_show_help): New function.
6438 (handle_query): Handle qRcmd.
6439 (main): Do not handle 'd' packet.
6440 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6441 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6444 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6446 * Makefile.in (EXEEXT): New.
6447 (clean): Use $(EXEEXT).
6449 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6451 * target.h (target_ops): Rename send_signal to request_interrupt,
6452 and remove enum target_signal parameter.
6453 * linux-low.c (linux_request_interrupt): Rename from
6454 linux_send_signal, and always send SIGINT.
6455 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6456 and always send SIGINT.
6457 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6459 (input_interrupt): Likewise.
6461 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6463 * server.c (get_features_xml): Check if target implemented
6465 * win32-i386-low.c (win32_arch_string): New.
6466 (win32_target_ops): Add win32_arch_string as arch_string member.
6468 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6470 * spu-low.c (spu_arch_string): New.
6471 (spu_target_ops): Add spu_arch_string.
6473 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6475 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6476 * configure.ac: Do not check for terminal.h.
6477 * configure, config.in: Regenerated.
6479 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6481 * Makefile.in (OBS): Add $(XML_BUILTIN).
6482 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6484 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6485 (arm-with-iwmmxt.c): New.
6486 * config.in, configure: Regenerate.
6487 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6488 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6489 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6490 (arm*-*-linux*): Add iWMMXt and regset support.
6491 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6492 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6493 (arm_store_wmmxregset, target_regsets): New.
6494 * server.c (get_features_xml): Take annex argument. Check builtin
6496 (handle_query): Handle multiple annexes.
6498 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6500 * remote-utils.c [USE_WIN32API] (read, write): Define.
6501 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6504 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6506 * linux-i386-low.c (the_low_target): Set arch_string.
6507 * linux-x86-64-low.c (the_low_target): Likewise.
6508 * linux-low.c (linux_arch_string): New.
6509 (linux_target_ops): Add it.
6510 * linux-low.h (struct linux_target_ops): Add arch_string.
6511 * server.c (write_qxfer_response): Use const void * for DATA.
6512 (get_features_xml): New.
6513 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6514 * target.h (struct target_ops): Add arch_string method.
6516 2007-01-03 Denis Pilat <denis.pilat@st.com>
6517 Daniel Jacobowitz <dan@codesourcery.com>
6519 * linux-low.c (linux_kill): Handle being called with no threads.
6520 * win32-i386-low.c (win32_kill): Likewise.
6521 (get_child_debug_event): Clear current_process_handle.
6523 2006-12-30 Denis PILAT <denis.pilat@st.com>
6524 Daniel Jacobowitz <dan@codesourcery.com>
6526 * remote-utils.c (remote_open): Check the type of specified
6527 serial port devices before opening them.
6528 * server.c (main): Kill the inferior if an error occurs during
6529 the first remote_open.
6531 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6533 * README: Update supported targets.
6535 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6537 * Makefile.in (clean): Remove reg-mips64.c.
6538 (reg-mips64.c, reg-mips64.o): New rules.
6539 * configure.srv: Handle mips64. Include regset support for mips.
6540 * linux-mips-low.c (union mips_register): New.
6541 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6542 (mips_breakpoint, mips_breakpoint_at): Use int.
6543 (mips_collect_register, mips_supply_register)
6544 (mips_collect_register_32bit, mips_supply_register_32bit)
6545 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6546 (mips_store_fpregset, target_regsets): New.
6547 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6549 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6551 * configure.srv: Add target "spu*-*-*".
6552 * Makefile.in (clean): Remove reg-spu.c.
6553 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6554 * spu-low.c: New file.
6556 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6558 * configure.ac: Correct td_thr_tls_get_addr test.
6559 * configure: Regenerated.
6561 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6563 * linux-low.c (linux_wait_for_event): Reformat. Use the
6565 * remote-utils.c (decode_address_to_semicolon): New.
6566 * server.c (pass_signals, handle_general_set): New.
6567 (handle_query): Mention QPassSignals for qSupported.
6568 (main): Call handle_general_set.
6569 * server.h (pass_signals, decode_address_to_semicolon): New.
6571 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6573 * server.c (handle_query): Correct error handling for read_auxv.
6575 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6577 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6578 and srv_linux_thread_db to yes.
6579 * linux-s390-low.c (s390_fill_gregset): New function.
6580 (target_regsets): Define data structure.
6582 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6584 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6585 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6586 * config.in, configure: Regenerated.
6587 * inferiors.c (gdb_id_to_thread): New function.
6588 (gdb_id_to_thread_id): Use it.
6589 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6590 * linux-low.h (struct process_info): Add th member.
6591 (thread_db_get_tls_address): New prototype.
6592 * remote-utils.c (decode_address): Make non-static.
6593 * server.c (handle_query): Handle qGetTLSAddr.
6594 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6595 * target.h (struct target_ops): Add get_tls_address.
6596 * thread-db.c (maybe_attach_thread): Save the thread handle.
6597 (thread_db_get_tls_address): New.
6599 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6601 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6602 (linux_resume_one_process): Take a siginfo_t *. Update all
6603 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6604 (struct pending_signals): Add a siginfo_t.
6605 (linux_wait_for_process): Always set last_status.
6606 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6607 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6608 * linux-low.h (struct process_info): Add last_status.
6610 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6612 * remote-utils.c (try_rle): New function.
6613 (putpkt_binary): Use it.
6615 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6617 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6618 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6619 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6620 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6621 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6624 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6626 * server.c (terminal_fd): New variable.
6627 (old_foreground_pgrp): Likewise.
6628 (restore_old_foreground_pgrp): New function.
6629 (start_inferior): Record the terminal file descriptor in terminal_fd
6630 and its original foreground group in old_foreground_pgrp. Register
6631 restore_old_foreground_pgrp with atexit().
6633 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6635 * server.c (handle_query): Correct qPart to qXfer.
6637 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6639 * configure.ac: Check for more headers which are missing on
6640 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6641 * configure.srv: Add Cygwin and mingw32.
6642 * remote-utils.c: Don't include headers unconditionally which
6643 are missing on mingw32. Include <winsock.h> for mingw32.
6644 (remote_open): Adjust for mingw32 support. Flush
6645 standard error after writing to it.
6646 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6647 (unblock_async_io, enable_async_io, disable_async_io)
6648 (readchar, getpkt): Update for Winsock support.
6649 (prepare_resume_reply): Expect a protocol signal number.
6650 * server.c: Disable <sys/wait.h> on mingw32.
6651 (start_inferior): Adjust for mingw32 support. Flush
6652 standard error after writing to it.
6653 (attach_inferior): Likewise. Use protocol signal
6655 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6657 * win32-i386-low.c: New file.
6658 * Makefile.in (XM_CLIBS): Set.
6659 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6660 (win32-i386-low.o): New dependency rule.
6661 * linux-low.c (linux_wait): Use target signal numbers.
6662 * target.h (struct target_ops): Doc fix.
6663 * server.h (target_signal_to_name): New prototype.
6664 * gdbreplay.c: Don't include headers unconditionally which
6665 are missing on mingw32. Include <winsock.h> for mingw32.
6666 (remote_close, remote_open): Adjust for Winsock support.
6667 * configure, config.in: Regenerated.
6669 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6671 * server.c (decode_xfer_read, write_qxfer_response): New.
6672 (handle_query): Take a packet length argument. Handle
6673 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6674 the qSupported response.
6675 (main): Update call to handle_query.
6677 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6679 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6680 (putpkt_binary): Renamed from putpkt and adjusted for binary
6682 (putpkt): New wrapper for putpkt_binary.
6683 (readchar): Don't mask off the high bit.
6684 (decode_X_packet): New function.
6685 * server.c (main): Call putpkt_binary if a handler sets the packet
6686 length. Save the length of the incoming packet. Handle 'X'.
6687 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6689 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6691 * server.c (handle_query): Handle qSupported.
6693 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6695 * remote-utils.c (all_symbols_looked_up): New variable.
6696 (look_up_one_symbol): Check it.
6697 * server.h (look_up_one_symbol): New declaration.
6698 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6700 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6702 * Makefile.in (linux-arm-low.o): Update dependencies.
6703 * linux-arm-low.c: Include "gdb_proc_service.h".
6704 (PTRACE_GET_THREAD_AREA): Define.
6705 (ps_get_thread_area): New function.
6707 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6709 * configure.srv (m68k*-*-uclinux*): New target.
6710 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6711 (linux_resume_one_process): Remove extraneous cast.
6712 (linux_read_offsets): New.
6713 (linux_target_op): Add linux_read_offsets on mmuless systems.
6714 * server.c (handle_query): Add qOffsets logic.
6715 * target.h (struct target_ops): Add read_offsets.
6717 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6719 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6720 (PTRACE_GET_THREAD_AREA): Define.
6721 (ps_get_thread_area): New function.
6722 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6723 (linux-x86-64-low.o): Update.
6725 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6727 * configure.ac: Remove checks for prfpregset_t.
6728 * gdb_proc_service.h: New file.
6729 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6730 new "gdb_proc_service.h".
6731 * proc-service.c: Likewise.
6732 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6733 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6734 * Makefile.in (gdb_proc_service_h): Updated.
6735 * configure, config.in: Regenerated.
6737 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6739 * remote-utils.c (prepare_resume_reply): Move declaration
6740 of gdb_id_from_wait to the top of the block.
6742 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6744 * linux-low.c (regsets_store_inferior_registers): Read the regset
6745 from the target before filling it.
6747 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6749 * server.c (attach_inferior): Return SIGTRAP for a successful
6752 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6754 * Makefile.in (OBS): Add version.o.
6755 (STAGESTUFF): Delete.
6756 (version.o): Add dependencies.
6757 (version.c): Replace rule.
6758 (clean): Remove version.c.
6759 * server.c (gdbserver_version): New.
6760 (gdbserver_usage): Use printf.
6761 (main): Handle --version and --help.
6762 * server.h (version, host_name): Add declarations.
6764 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6776 * linux-x86-64-low.c:
6779 * linux-ppc64-low.c:
6788 * linux-crisv32-low.c:
6800 * gdbserver.1: Add (C) after Copyright. Update the FSF
6803 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6805 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6806 (arm_breakpoint_at): Recognize both breakpoints.
6807 (the_low_target): Use the correct breakpoint instruction.
6809 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6811 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6812 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6813 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6814 (the_low_target): Update.
6816 2005-10-25 Andreas Schwab <schwab@suse.de>
6818 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6820 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6821 (ia64_num_regs): Reduce to 462.
6823 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6825 * acinclude.m4: Correct quoting.
6826 * aclocal.m4: Regenerated.
6828 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6829 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6830 (thread_db_init): Call thread_db_err_str.
6831 * configure.ac: Check for TD_VERSION.
6832 * config.in, configure: Regenerated.
6834 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6836 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6838 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6840 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6841 is not available. Define HAVE_PTRACE_GETREGS if it is.
6842 * config.in, configure: Regenerated.
6843 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6844 * linux-i386-low.c, linux-m68k-low.c: Update to use
6845 HAVE_PTRACE_GETREGS.
6846 * linux-low.c (regsets_fetch_inferior_registers)
6847 (regsets_store_inferior_registers): Only return 0 if we processed
6849 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6850 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6852 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6854 * inferiors.c (struct thread_info): Add gdb_id.
6855 (add_thread): Add gdb_id argument.
6856 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6857 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6858 calls to add_thread.
6859 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6860 * server.c (handle_query): Use thread_to_gdb_id.
6861 (handle_v_cont, main): Use gdb_id_to_thread_id.
6862 * server.h (add_thread): Update prototype.
6863 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6866 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6868 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6869 left-padded registers.
6870 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6871 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6873 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6875 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6876 * configure: Regenerate.
6877 * config.in: Regenerate.
6878 * server.h (NEED_DECLARATION_STRERROR):
6879 Replace with !HAVE_DECL_STRERROR.
6881 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6883 * linux-low.c (linux_wait, linux_send_signal): Don't test
6884 an unsigned long variable for > 0 if it could be MAX_ULONG.
6885 * server.c (myresume): Likewise.
6886 * target.c (set_desired_inferior): Likewise.
6888 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6890 * configure.ac: Simplify and improve check for socklen_t.
6891 * configure, config.in: Regenerate.
6893 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6895 * acconfig.h: Remove.
6896 * configure.ac: Add a test for socklen_t. Use three-argument
6897 AC_DEFINE throughout.
6898 * config.in: Regenerated using autoheader 2.59.
6899 * configure: Regenerated.
6901 * gdbreplay.c (socklen_t): Provide a default.
6902 (remote_open): Use socklen_t.
6903 * remote-utils.c (socklen_t): Provide a default.
6904 (remote_open): Use socklen_t.
6905 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6908 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6910 * linux-low.c (linux_read_memory, linux_write_memory)
6911 (linux_read_auxv): Likewise.
6912 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6913 (check_mem_write): Likewise.
6914 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6916 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6917 (registers_from_string, register_data): Likewise.
6918 * server.c (handle_query, main): Likewise.
6919 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6920 (decode_M_packet): Likewise.
6921 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6922 * target.h (struct target_ops): Update read_memory, write_memory,
6924 (read_inferior_memory, write_inferior_memory): Update.
6925 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6927 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6928 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6929 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6930 linux-s390-low.c, linux-sh-low.c: Update for changes in
6931 read_inferior_memory and the_low_target->breakpoint.
6933 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6935 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6936 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6937 * configure.srv: Add powerpc64-*-linux*.
6938 * linux-ppc64-low.c: New file.
6940 2005-05-23 Orjan Friberg <orjanf@axis.com>
6942 * linux-cris-low.c: New file with support for CRIS.
6943 * linux-crisv32-low.c: Ditto for CRISv32.
6944 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6945 (clean): Add reg-cris.c and reg-crisv32.c.
6946 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6947 reg-crisv32.o, and reg-crisv32.c to make rules.
6948 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6951 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6953 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6954 of sizeof (PTRACE_XFER_TYPE).
6955 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6957 2005-05-12 Orjan Friberg <orjanf@axis.com>
6959 * target.h (struct target_ops): Add insert_watchpoint,
6960 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6961 pointers for hardware watchpoint support.
6962 * linux-low.h (struct linux_target_ops): Ditto.
6963 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6964 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6965 to linux_target_ops.
6966 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6968 * server.c (main): Recognize 'Z' and 'z' packets.
6970 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6972 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6973 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6974 (the_low_target): Add new members.
6976 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6978 * proc-service.c (ps_lgetregs): Search all_processes instead of
6981 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6983 * server.c (start_inferior): Change return type to int.
6984 (attach_inferior): Change sigptr to int *.
6985 (handle_v_cont, handle_v_requests): Change signal to int *.
6986 (main): Change signal to int.
6988 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6990 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6991 * configure.srv: Add m32r*-*-linux*.
6992 * linux-m32r-low.c: New file.
6994 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6996 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6998 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7000 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7001 Take unsigned long arguments for PIDs.
7002 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7003 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7004 (wait_for_sigstop, linux_resume_one_process)
7005 (regsets_fetch_inferior_registers, linux_send_signal)
7006 (linux_read_auxv): Likewise. Update the types of variables holding
7007 PIDs. Update format string specifiers.
7008 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7009 * remote-utils.c (prepare_resume_reply): Likewise.
7010 * server.c (cont_thread, general_thread, step_thread)
7011 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7013 (handle_query): Update format specifiers.
7014 (handle_v_cont, main): Use strtoul for thread IDs.
7015 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7016 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7017 (general_thread, step_thread, thread_from_wait)
7018 (old_thread_from_wait): Update.
7019 * target.h (struct thread_resume): Use unsigned long for THREAD.
7020 (struct target_ops): Use unsigned long for arguments to attach and
7023 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7025 * acinclude.m4: Include bfd/bfd.m4 directly.
7026 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7027 <agriffis@toolchain.org>.
7028 * aclocal.m4, configure: Regenerated.
7030 2005-01-07 Andrew Cagney <cagney@gnu.org>
7032 * configure.ac: Rename configure.in, require autoconf 2.59.
7033 * configure: Re-generate.
7035 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7037 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7039 * aclocal.m4: Regenerated.
7040 * configure: Regenerated.
7042 2004-11-21 Andreas Schwab <schwab@suse.de>
7044 * linux-m68k-low.c (m68k_num_gregs): Define.
7045 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7046 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7047 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7048 (m68k_breakpoint_at): New. Add to the_low_target.
7050 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7051 srv_linux_thread_db to yes.
7053 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7055 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7056 (ARCH_SET_FS): Likewise.
7057 (ARCH_GET_FS): Likewise.
7058 (ARCH_GET_GS): Likewise.
7060 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7062 * linux-i386-low.c (ps_get_thread_area): New.
7063 * linux-x86-64-low.c (ps_get_thread_area): New.
7064 * linux-low.c: Include <sys/syscall.h>.
7065 (linux_kill_one_process): Don't kill the first thread here.
7066 (linux_kill): Kill the first thread here.
7067 (kill_lwp): New function.
7068 (send_sigstop, linux_send_signal): Use it.
7069 * proc-service.c: Clean up #ifdefs.
7070 (fpregset_info): Delete.
7071 (ps_lgetregs): Update and enable implementation.
7072 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7074 * remote-utils.c (struct sym_cache, symbol_cache): New.
7075 (input_interrupt): Print a clearer message.
7076 (async_io_enabled): New variable.
7077 (enable_async_io, disable_async_io): Use it. Update comments.
7078 (look_up_one_symbol): Use the symbol cache.
7079 * thread-db.c (thread_db_look_up_symbols): New function.
7080 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7082 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7084 * configure.in: Test for -rdynamic.
7085 * configure: Regenerated.
7086 * Makefile (INTERNAL_LDFLAGS): New.
7087 (gdbserver, gdbreplay): Use it.
7089 2004-09-02 Andrew Cagney <cagney@gnu.org>
7091 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7093 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7095 * linux-low.c (linux_wait): Clear all_processes list also.
7097 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7099 * linux-low.c: Include <errno.h>. Remove extern declaration of
7102 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7104 * gdbreplay.c, server.h, utils.c: Update copyright years.
7106 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7108 * server.c (main): Print child status or termination signal from
7109 variable 'signal', not 'sig'.
7111 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7113 * linux-low.c (linux_read_memory): Change return type to
7114 int. Check for and return error from ptrace().
7115 * target.c (read_inferior_memory): Change return type to int. Pass
7116 back return status from the_target->read_memory().
7117 * target.h (struct target_ops): Adapt *read_memory() prototype.
7119 (read_inferior_memory): Adapt prototype.
7120 * server.c (main): Return an error packet if
7121 read_inferior_memory() returns an error.
7123 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7125 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7126 Unify with other clean targets.
7128 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7130 * server.c (handle_v_cont): Call set_desired_inferior.
7132 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7134 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7136 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7138 * linux-low.c (linux_wait): Unblock async I/O.
7139 (linux_resume): Block and enable async I/O.
7140 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7141 * server.h (block_async_io, unblock_async_io): Add prototypes.
7143 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7145 * remote-utils.c (remote_open): Print a status notice after
7147 * server.c (attach_inferior): Print a status notice after
7150 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7152 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7154 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7156 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7158 * server.c, target.h: Update copyright years.
7160 2004-02-25 Roland McGrath <roland@redhat.com>
7162 * target.h (struct target_ops): New member `read_auxv'.
7163 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7164 * linux-low.c (linux_read_auxv): New function.
7165 (linux_target_ops): Initialize `read_auxv' member to that.
7167 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7169 Committed by Jim Blandy <jimb@redhat.com>.
7171 * linux-s390-low.c (s390_num_regs): Update.
7172 (s390_regmap): Remove control registers. Use __s390x__ predefine
7173 instead of GPR_SIZE to distiguish s390 and s390x targets.
7175 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7177 * linux-low.c: Update copyright year.
7178 (check_removed_breakpoint): Clear pending_is_breakpoint.
7179 (linux_set_resume_request, linux_queue_one_thread)
7180 (resume_status_pending_p): New functions.
7181 (linux_continue_one_thread): Use process->resume.
7182 (linux_resume): Only resume threads if there are no pending events.
7183 * linux-low.h (struct process_info): Add resume request
7186 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7188 * regcache.c (new_register_cache): Clear the allocated register
7189 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7191 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
7193 * linux-low.c (linux_resume): Take a struct thread_resume *
7195 (linux_wait): Update call.
7196 (resume_ptr): New static variable.
7197 (linux_continue_one_thread): Renamed from
7198 linux_continue_one_process. Use resume_ptr.
7199 (linux_resume): Use linux_continue_one_thread.
7200 * server.c (handle_v_cont, handle_v_requests): New functions.
7201 (myresume): New function.
7202 (main): Handle 'v' case.
7203 * target.h (struct thread_resume): New type.
7204 (struct target_ops): Change argument of "resume" to struct
7206 (myresume): Delete macro.
7208 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7210 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7211 (uninstall): Support DESTDIR.
7213 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7215 * configure.srv: Add xscale*linux copy of arm*linux entry.
7217 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
7219 * linux-arm-low.c (arm_reinsert_addr): New function.
7220 (the_low_target): Add arm_reinsert_addr.
7222 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7224 * mem-break.c: Remove whitespace at end of file.
7226 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7228 * configure.in: Check whether we need to prototype strerror.
7229 * server.h: Optionally prototype strerror.
7230 * gdbreplay.c (perror_with_name): Use strerror.
7231 * linux-low.c (linux_attach_lwp): Use strerror.
7232 * utils.c (perror_with_name): Use strerror.
7233 * config.in, configure: Regenerated.
7235 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7237 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7238 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7240 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
7242 * Makefile.in (SFILES): Update.
7243 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7244 low-sun3.c: Remove files.
7246 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
7248 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7249 (linux_detach_one_process, linux_detach): New functions.
7250 (linux_target_ops): Add linux_detach.
7251 * server.c (main): Handle 'D' packet.
7252 * target.h (struct target_ops): Add "detach" member.
7253 (detach_inferior): Define.
7255 2003-06-13 Mark Kettenis <kettenis@gnu.org>
7257 From Kelley Cook <kelleycook@wideopenwest.com>:
7258 * configure.srv: Accept i[34567]86 variants.
7260 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
7262 * linux-low.c (linux_wait_for_event): Correct comment typos.
7263 (linux_resume_one_process): Call check_removed_breakpoint.
7264 (linux_send_signal): New function.
7265 (linux_target_ops): Add linux_send_signal.
7266 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7268 * target.h (struct target_ops): Add send_signal.
7270 2003-05-29 Jim Blandy <jimb@redhat.com>
7272 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7273 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7274 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7275 away part of the register's value.
7277 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
7279 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7280 (linux_wait_for_event, linux_init_signals): Likewise.
7282 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
7284 * configure.in: Check for stdlib.h.
7285 * configure: Regenerated.
7286 * config.in: Regenerated.
7288 2003-01-04 Andreas Schwab <schwab@suse.de>
7290 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7292 2003-01-02 Andrew Cagney <ac131313@redhat.com>
7294 * Makefile.in: Remove obsolete code.
7296 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
7298 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7299 defined(PT_FPR0_HI).
7301 2002-11-17 Stuart Hughes <seh@zee2.com>
7303 * linux-arm-low.c (arm_num_regs): Increase.
7304 (arm_regmap): Include status register.
7306 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
7308 * linux-low.c (register_addr): Remove incorrect -1 check.
7310 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
7312 * linux-low.c (linux_create_inferior): Call setpgid. Return
7314 (unstopped_p, linux_signal_pid): Remove.
7315 (linux_target_ops): Remove linux_signal_pid.
7316 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7317 global instead of target method.
7318 * target.h (struct target_ops): Remove signal_pid. Update comment
7319 for create_inferior.
7320 * server.c (signal_pid): New variable.
7321 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7322 gdbserver. Set the child to be the foreground process group.
7323 (attach_inferior): Set signal_pid.
7325 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
7327 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7329 2002-08-20 Jim Blandy <jimb@redhat.com>
7331 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7334 2002-08-01 Andrew Cagney <cagney@redhat.com>
7336 * Makefile.in: Make chill references obsolete.
7338 2002-07-24 Kevin Buettner <kevinb@redhat.com>
7340 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7341 * configure: Regenerate.
7342 * config.in: Regenerate.
7344 2002-07-09 David O'Brien <obrien@FreeBSD.org>
7346 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7347 (perror_with_name, remote_close, remote_open, expect, play): Static.
7349 2002-07-04 Michal Ludvig <mludvig@suse.cz>
7351 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7352 byte offsets instead of an array of indexes.
7353 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7355 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
7357 * regcache.c: Add comment.
7359 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
7361 * thread-db.c: New file.
7362 * proc-service.c: New file.
7363 * acinclude.m4: New file.
7364 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7365 proc-service.o, and thread-db.o.
7366 (linux-low.o): Add USE_THREAD_DB.
7367 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7368 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7369 * aclocal.m4: Regenerated.
7370 * config.in: Regenerated.
7371 * configure: Regenerated.
7372 * configure.in: Check for proc_service.h, sys/procfs.h,
7373 thread_db.h, and linux/elf.h headrs.
7374 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7375 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7376 Check for -lthread_db and thread support.
7377 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7378 PowerPC, and SuperH.
7379 * i387-fp.c: Constify arguments.
7380 * i387-fp.h: Likewise.
7381 * inferiors.c: (struct thread_info): Renamed from
7382 `struct inferior_info'. Remove PID member. Use generic inferior
7383 list header. All uses updated.
7384 (inferiors, signal_pid): Removed.
7385 (all_threads): New variable.
7386 (get_thread): Define.
7387 (add_inferior_to_list): New function.
7388 (for_each_inferior): New function.
7389 (change_inferior_id): New function.
7390 (add_inferior): Removed.
7391 (remove_inferior): New function.
7392 (add_thread): New function.
7393 (free_one_thread): New function.
7394 (remove_thread): New function.
7395 (clear_inferiors): Use for_each_inferior and free_one_thread.
7396 (find_inferior): New function.
7397 (find_inferior_id): New function.
7398 (inferior_target_data): Update argument type.
7399 (set_inferior_target_data): Likewise.
7400 (inferior_regcache_data): Likewise.
7401 (set_inferior_regcache_data): Likewise.
7402 * linux-low.c (linux_bp_reinsert): Remove.
7403 (all_processes, stopping_threads, using_thrads)
7404 (struct pending_signals, debug_threads, pid_of): New.
7405 (inferior_pid): Replace with macro.
7406 (struct inferior_linux_data): Remove.
7407 (get_stop_pc, add_process): New functions.
7408 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7409 Use add_process and add_thread.
7410 (linux_attach_lwp): New function, based on old linux_attach. Use
7411 add_process and add_thread. Set stop_expected for new threads.
7412 (linux_attach): New function.
7413 (linux_kill_one_process): New function.
7414 (linux_kill): Kill all LWPs.
7415 (linux_thread_alive): Use find_inferior_id.
7416 (check_removed_breakpoints, status_pending_p): New functions.
7417 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7418 Update. Use WNOHANG. Wait for cloned processes also. Update process
7419 struct for the found process.
7420 (linux_wait_for_event): New function.
7421 (linux_wait): Use it. Support LWPs.
7422 (send_sigstop, wait_for_sigstop, stop_all_processes)
7423 (linux_resume_one_process, linux_continue_one_process): New functions.
7424 (linux_resume): Support LWPs.
7425 (REGISTER_RAW_SIZE): Remove.
7426 (fetch_register): Use register_size instead. Call supply_register.
7427 (usr_store_inferior_registers): Likewise. Call collect_register.
7429 (regsets_fetch_inferior_registers): Improve error message.
7430 (regsets_store_inferior_registers): Add debugging.
7431 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7432 (unstopped_p, linux_signal_pid): New functions.
7433 (linux_target_ops): Add linux_signal_pid.
7434 (linux_init_signals): New function.
7435 (initialize_low): Call it. Initialize using_threads.
7436 * regcache.c (inferior_regcache_data): Add valid
7438 (get_regcache): Fetch registers lazily. Add fetch argument
7439 and update all callers.
7440 (regcache_invalidate_one, regcache_invalidate): New
7442 (new_register_cache): Renamed from create_register_cache.
7443 Return the new regcache.
7444 (free_register_cache): Change argument to a void *.
7445 (registers_to_string, registers_from_string): Call get_regcache
7446 with fetch flag set.
7447 (register_data): Make static. Pass fetch flag to get_regcache.
7448 (supply_register): Call get_regcache with fetch flag clear.
7449 (collect_register): Call get_regcache with fetch flag set.
7450 (collect_register_as_string): New function.
7451 * regcache.h: Update.
7452 * remote-utils.c (putpkt): Flush after debug output and use
7454 Handle input interrupts while waiting for an ACK.
7455 (input_interrupt): Use signal_pid method.
7456 (getpkt): Flush after debug output and use stderr.
7457 (outreg): Use collect_register_as_string.
7458 (new_thread_notify, dead_thread_notify): New functions.
7459 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7461 (look_up_one_symbol): Flush after debug output.
7462 * server.c (step_thread, server_waiting): New variables.
7463 (start_inferior): Don't use signal_pid. Update call to mywait.
7464 (attach_inferior): Update call to mywait.
7465 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7466 (main): Don't fetch/store registers explicitly. Use
7467 set_desired_inferior. Support proposed ``Hs'' packet. Update
7470 (struct inferior_list, struct_inferior_list_entry): New.
7471 * target.c (set_desired_inferior): New.
7472 (write_inferior_memory): Constify.
7473 (mywait): New function.
7475 (struct target_ops): New signal_pid method.
7476 (mywait): Removed macro, added prototype.
7478 * linux-low.h (regset_func): Removed.
7479 (regset_fill_func, regset_store_func): New.
7480 (enum regset_type): New.
7481 (struct regset_info): Add type field. Use new operation types.
7482 (struct linux_target_ops): stop_pc renamed to get_pc.
7483 Add decr_pc_after_break and breakpoint_at.
7484 (get_process, get_thread_proess, get_process_thread)
7485 (strut process_info, all_processes, linux_attach_lwp)
7486 (thread_db_init): New.
7488 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7489 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7490 (the_low_target): Add new members.
7491 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7492 (i386_store_fpxregset): Constify.
7493 (target_regsets): Add new kind identifier.
7494 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7495 (i386_set_pc): Add debugging.
7496 (i386_breakpoint_at): New function.
7497 (the_low_target): Add new members.
7498 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7499 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7500 (mips_breakpoint_at): New.
7501 (the_low_target): Add new members.
7502 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7503 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7504 (the_low_target): Add new members.
7505 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7506 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7507 (the_low_target): Add new members.
7508 * linux-x86-64-low.c (target_regsets): Add new kind
7511 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7513 From Martin Pool <mbp@samba.org>:
7514 * server.c (gdbserver_usage): New function.
7517 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7519 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7522 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7524 * Makefile.in: Remove obsolete code.
7526 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7528 * linux-low.c (regsets_fetch_inferior_registers),
7529 (regsets_store_inferior_registers): Removed cast to int from
7531 * regcache.h: Added declaration of struct inferior_info.
7533 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7535 * inferiors.c (struct inferior_info): Add regcache_data.
7536 (add_inferior): Call create_register_cache.
7537 (clear_inferiors): Call free_register_cache.
7538 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7539 * regcache.c (struct inferior_regcache_data): New.
7540 (registers): Remove.
7541 (get_regcache): New function.
7542 (create_register_cache, free_register_cache): New functions.
7543 (set_register_cache): Don't initialize the register cache here.
7544 (registers_to_string, registers_from_string, register_data): Call
7546 * regcache.h: Add prototypes.
7547 * server.h: Likewise.
7549 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7551 * mem-break.c: New file.
7552 * mem-break.h: New file.
7553 * Makefile.in: Add mem-break.o rule; update server.h
7555 * inferiors.c (struct inferior_info): Add target_data
7557 (clear_inferiors): Free target_data member if set.
7558 (inferior_target_data, set_inferior_target_data): New functions.
7559 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7560 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7561 * linux-low.c (linux_bp_reinsert): New variable.
7562 (struct inferior_linux_data): New.
7563 (linux_create_inferior): Use set_inferior_target_data.
7564 (linux_attach): Likewise. Call add_inferior.
7565 (linux_wait_for_one_inferior): New function.
7566 (linux_wait): Call it.
7567 (linux_write_memory): Add const.
7568 (initialize_low): Call set_breakpoint_data.
7569 * linux-low.h (struct linux_target_ops): Add breakpoint
7571 * server.c (attach_inferior): Remove extra add_inferior
7573 * server.h: Include mem-break.h. Update inferior.c
7575 * target.c (read_inferior_memory)
7576 (write_inferior_memory): New functions.
7577 * target.h (read_inferior_memory)
7578 (write_inferior_memory): Change macros to prototypes.
7579 (struct target_ops): Update comments. Add const to write_memory
7582 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7584 * linux-low.c (usr_store_inferior_registers): Support
7585 registers which are allowed to fail to store.
7586 * linux-low.h (linux_target_ops): Likewise.
7587 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7588 (ppc_cannot_store_register): FPSCR may not be storable.
7590 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7592 * server.h: Include <string.h> if HAVE_STRING_H.
7593 * ChangeLog: Correct paths in last ChangeLog entry.
7595 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7597 * linux-low.h: Remove obsolete prototypes.
7598 (struct linux_target_ops): New.
7599 (extern the_low_target): New.
7600 * linux-low.c (num_regs, regmap): Remove declarations.
7601 (register_addr): Use the_low_target explicitly.
7602 (fetch_register): Likewise.
7603 (usr_fetch_inferior_registers): Likewise.
7604 (usr_store_inferior_registers): Likewise.
7605 * linux-arm-low.c (num_regs): Remove.
7606 (arm_num_regs): Define.
7607 (arm_regmap): Renamed from regmap, made static.
7608 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7610 (arm_cannot_store_register): Renamed from cannot_store_register,
7612 (the_low_target): New.
7613 * linux-i386-low.c (num_regs): Remove.
7614 (i386_num_regs): Define.
7615 (i386_regmap): Renamed from regmap, made static.
7616 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7618 (i386_cannot_store_register): Renamed from cannot_store_register,
7620 (the_low_target): New.
7621 * linux-ia64-low.c (num_regs): Remove.
7622 (ia64_num_regs): Define.
7623 (ia64_regmap): Renamed from regmap, made static.
7624 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7626 (ia64_cannot_store_register): Renamed from cannot_store_register,
7628 (the_low_target): New.
7629 * linux-m68k-low.c (num_regs): Remove.
7630 (m68k_num_regs): Define.
7631 (m68k_regmap): Renamed from regmap, made static.
7632 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7634 (m68k_cannot_store_register): Renamed from cannot_store_register,
7636 (the_low_target): New.
7637 * linux-mips-low.c (num_regs): Remove.
7638 (mips_num_regs): Define.
7639 (mips_regmap): Renamed from regmap, made static.
7640 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7642 (mips_cannot_store_register): Renamed from cannot_store_register,
7644 (the_low_target): New.
7645 * linux-ppc-low.c (num_regs): Remove.
7646 (ppc_num_regs): Define.
7647 (ppc_regmap): Renamed from regmap, made static.
7648 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7650 (ppc_cannot_store_register): Renamed from cannot_store_register,
7652 (the_low_target): New.
7653 * linux-s390-low.c (num_regs): Remove.
7654 (s390_num_regs): Define.
7655 (s390_regmap): Renamed from regmap, made static.
7656 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7658 (s390_cannot_store_register): Renamed from cannot_store_register,
7660 (the_low_target): New.
7661 * linux-sh-low.c (num_regs): Remove.
7662 (sh_num_regs): Define.
7663 (sh_regmap): Renamed from regmap, made static.
7664 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7666 (sh_cannot_store_register): Renamed from cannot_store_register,
7668 (the_low_target): New.
7669 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7670 (the_low_target): New.
7672 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7674 * Makefile.in: Add stamp-h target.
7675 * configure.in: Create stamp-h.
7676 * configure: Regenerated.
7678 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7680 * inferiors.c: New file.
7681 * target.c: New file.
7682 * target.h: New file.
7683 * Makefile.in: Add target.o and inferiors.o. Update
7685 * linux-low.c (inferior_pid): New static variable,
7686 moved from server.c.
7687 (linux_create_inferior): Renamed from create_inferior.
7688 Call add_inferior. Return 0 on success instead of a PID.
7689 (linux_attach): Renamed from myattach.
7690 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7691 (linux_thread_alive): Renamed from mythread_alive.
7692 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7694 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7695 (regsets_store_inferior_registers): Correct error message.
7696 Add missing ``return 0''.
7697 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7698 (linux_store_registers): Renamed from store_inferior_registers.
7699 (linux_read_memory): Renamed from read_inferior_memory.
7700 (linux_write_memory): Renamed from write_inferior_memory.
7701 (linux_target_ops): New structure.
7702 (initialize_low): Call set_target_ops ().
7703 * remote-utils.c (unhexify): New function.
7704 (hexify): New function.
7705 (input_interrupt): Send signals to ``signal_pid''.
7706 * server.c (inferior_pid): Remove.
7707 (start_inferior): Update create_inferior call.
7708 (attach_inferior): Call add_inferior.
7709 (handle_query): New function.
7710 (main): Call handle_query for `q' packets.
7711 * server.h: Include "target.h". Remove obsolete prototypes.
7712 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7714 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7716 * Makefile.in: Add WARN_CFLAGS. Update configury
7718 * configure.in: Check for <string.h>
7719 * configure: Regenerate.
7720 * config.in: Regenerate.
7721 * gdbreplay.c: Include needed system headers.
7722 (remote_open): Remove strchr prototype.
7723 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7724 * regcache.c (supply_register): Change buf argument to const void *.
7725 (supply_register_by_name): Likewise.
7726 (collect_register): Change buf argument to void *.
7727 (collect_register_by_name): Likewise.
7728 * regcache.h: Add missing prototypes.
7729 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7730 * server.c (handle_query): New function.
7731 (attached): New static variable, moved out of main.
7732 (main): Quiet longjmp clobber warnings.
7733 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7734 * utils.c (error): Remove NORETURN.