1 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8 * hostio.c (handle_readlink): New function.
9 (handle_vFile): Call it to handle "vFile:readlink" packets.
11 2012-01-20 Pedro Alves <palves@redhat.com>
12 Ulrich Weigand <ulrich.weigand@linaro.org>
14 * server.c (handle_v_requests): Only support vAttach and vRun to
15 start multiple processes when in extended protocol mode.
17 2012-01-17 Pedro Alves <palves@redhat.com>
19 * tracepoint.c (initialize_tracepoint): Use mmap instead of
20 memalign plus mprotect to allocate the scratch buffer.
22 2012-01-13 Pedro Alves <palves@redhat.com>
24 * server.c (attach_inferior): Clear `cont_thread'.
26 2012-01-13 Pedro Alves <palves@redhat.com>
28 * server.c (main): Avoid infinite loop while detaching/killing
31 2012-01-09 Doug Evans <dje@google.com>
33 * server.c (start_inferior): Set last_ptid in --wrapper case.
35 2012-01-06 Yao Qi <yao@codesourcery.com>
37 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
39 [IN_PROCESS_AGENT] (debug_agent): New global variable.
41 2012-01-04 Yao Qi <yao@codesourcery.com>
43 * tracepoint.c (cmd_qtdp): Print debug message
44 for static tracepoint.
46 2012-01-04 Yao Qi <yao@codesourcery.com>
48 * tracepoint.c (trace_vdebug): Differentiate debug message
49 between gdbserver and IPA.
51 2012-01-03 Yao Qi <yao@codesourcery.com>
53 * tracepoint.c (tracepoint_was_hit): Don't collect for
56 2012-01-02 Joel Brobecker <brobecker@adacore.com>
58 * terminal.h: Reformat copyright header.
60 2012-01-02 Joel Brobecker <brobecker@adacore.com>
62 * server.c (gdbserver_version): Update copyright year.
63 * gdbreplay.c (gdbreplay_version): Likewise.
65 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
67 * linux-low.c (linux_create_inferior): Put empty if clause for write.
70 2011-12-18 Hui Zhu <teawater@gmail.com>
71 * linux-low.c (linux_create_inferior): Save return value to ret.
73 2011-12-18 Hui Zhu <teawater@gmail.com>
75 * linux-low.c (linux_create_inferior): Save return value to ret.
77 2011-12-16 Doug Evans <dje@google.com>
79 * linux-low.c (linux_create_inferior): If stdio connection,
80 redirect stdin from /dev/null, stdout to stderr.
81 * remote-utils.c (remote_is_stdio): New static global.
82 (remote_connection_is_stdio): New function.
83 (remote_prepare): Handle stdio connection.
85 (remote_close): Don't close stdin for stdio connections.
86 (read_prim,write_prim): New functions. Replace all calls to
88 * server.c (main): Watch for "-" argument. Move call to
89 remote_prepare before start_inferior.
90 * server.h (STDIO_CONNECTION_NAME): New macro.
91 (remote_connection_is_stdio): Declare.
93 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
96 2011-12-15 Yao Qi <yao@codesourcery.com>
98 * tracepoint.c: Include sys/syscall.h.
99 (gdb_ust_thread): Remove preprocessor conditional.
101 2011-12-14 Pedro Alves <pedro@codesourcery.com>
103 * linux-low.c (linux_detach_one_lwp): Call
104 the_low_target.prepare_to_resume before detaching.
106 2011-12-14 Yao Qi <yao@codesourcery.com>
108 * tracepoint.c (gdb_ust_thread): Don't ignore return value
111 2011-12-14 Yao Qi <yao@codesourcery.com>
113 * i386-low.c (i386_low_stopped_data_address): Initialize local
116 2011-12-13 Pedro Alves <pedro@codesourcery.com>
120 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
121 DR_CONTROL unless necessary. Extend comments.
122 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
123 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
125 2011-12-13 Yao Qi <yao@codesourcery.com>
127 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
129 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
131 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
133 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
134 Print new debug message for such case.
136 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
138 Fix overlapping memcpy.
139 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
140 the read_inferior_memory transfer.
141 (delete_fast_tracepoint_jump): New variable buf. Use it for the
142 write_inferior_memory transfer.
143 (set_fast_tracepoint_jump): New variable buf. Use it for the
144 read_inferior_memory and write_inferior_memory transfers.
145 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
146 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
147 Use it for the write_inferior_memory transfer.
148 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
151 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
153 * linux-low.c (fetch_register, store_register): Make code
154 consistent, fix formatting.
156 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
158 * linux-low.c (usr_store_inferior_registers): Factor out code
159 to handle individual registers into...
160 (store_register): ... this new function.
162 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
164 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
165 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
166 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
167 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
168 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
169 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
170 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
171 (srv_xmlfiles): Add new XML files.
173 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
175 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
176 (init_registers_s390_linux32v1): Add prototype.
177 (init_registers_s390_linux32v2): Likewise.
178 (init_registers_s390_linux64v1): Likewise.
179 (init_registers_s390_linux64v2): Likewise.
180 (init_registers_s390x_linux64v1): Likewise.
181 (init_registers_s390x_linux64v2): Likewise.
182 (s390_num_regs): Increment to 52.
183 (s390_regmap): Add orig_r2 register.
184 (s390_num_regs_3264): Increment to 68.
185 (s390_regmap_3264): Add orig_r2 register.
186 (s390_collect_ptrace_register): Handle orig_r2 register.
187 (s390_supply_ptrace_register): Likewise.
188 (s390_fill_last_break): New function.
189 (s390_store_last_break): Likewise.
190 (s390_fill_system_call): New function.
191 (s390_store_system_call): Likewise.
192 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
194 (s390_check_regset): New function.
195 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
196 NT_S390_SYSTEM_CALL regsets and use appropriate description.
197 Update target_regsets for available register sets.
199 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
200 Jan Kratochvil <jan.kratochvil@redhat.com>
202 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
203 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
205 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
206 * linux-low.h (struct process_info_private): New member r_debug.
207 * server.c (handle_qxfer_libraries): Call
208 the_target->qxfer_libraries_svr4.
209 (handle_qxfer_libraries_svr4): New function.
210 (qxfer_packets): New entry "libraries-svr4".
211 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
212 * target.h (struct target_ops): New member qxfer_libraries_svr4.
213 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
214 PACKET_qXfer_libraries_svr4.
216 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
218 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
219 PSW address/mask between 8-byte and 16-byte formats.
220 (s390_supply_ptrace_register): Likewise.
221 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
222 basic addressing mode bit.
224 2011-11-24 Stan Shebs <stan@codesourcery.com>
226 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
228 2011-11-17 Stan Shebs <stan@codesourcery.com>
230 * tracepoint.c (struct tracepoint): New field traceframe_usage.
231 (tracing_start_time): New global.
232 (tracing_stop_time): New global.
233 (tracing_user_name): New global.
234 (tracing_notes): New global.
235 (tracing_stop_note): New global.
236 (cmd_qtstart): Set traceframe_usage, start_time.
237 (stop_tracing): Set stop_time.
238 (cmd_qtstatus): Report additional status.
239 (cmd_qtp): New function.
240 (handle_tracepoint_query): Call it.
241 (cmd_qtnotes): New function.
242 (handle_tracepoint_general_set): Call it.
243 (get_timestamp): Rename from tsv_get_timestamp.
245 2011-11-14 Stan Shebs <stan@codesourcery.com>
246 Kwok Cheung Yeung <kcy@codesourcery.com>
248 * linux-x86-low.c (small_jump_insn): New.
249 (i386_install_fast_tracepoint_jump_pad): Add arguments for
250 trampoline and error message, build a trampoline and issue a small
251 jump instruction to it.
252 (x86_install_fast_tracepoint_jump_pad): Add arguments for
253 trampoline and error message.
254 (x86_get_min_fast_tracepoint_insn_len): New.
255 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
256 * linux-low.h (struct linux_target_ops): Add arguments to
257 install_fast_tracepoint_jump_pad operation, add new operation.
258 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
260 (linux_get_min_fast_tracepoint_insn_len): New function.
261 (linux_target_op): Add new operation.
262 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
263 (gdb_trampoline_buffer_end): Ditto.
264 (gdb_trampoline_buffer_error): Ditto.
265 (struct ipa_sym_addresses): Add fields for new IPA variables.
266 (symbol_list): Add entries for new IPA variables.
267 (struct tracepoint): Add fields to hold the address range of the
268 trampoline used by the tracepoint.
269 (trampoline_buffer_head): New static variable.
270 (trampoline_buffer_tail): Ditto.
271 (claim_trampoline_space): New function.
272 (have_fast_tracepoint_trampoline_buffer): New function.
273 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
275 (install_fast_tracepoint): Ditto, also add error buffer argument.
276 (cmd_qtminftpilen): New function.
277 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
278 (fast_tracepoint_from_trampoline_address): New function.
279 (fast_tracepoint_collecting): Handle trampoline as part of jump
281 (set_trampoline_buffer_space): New function.
282 (initialize_tracepoint): Initialize new IPA variables.
283 * target.h (struct target_ops): Add arguments to
284 install_fast_tracepoint_jump_pad operation, add new
285 get_min_fast_tracepoint_insn_len operation.
286 (target_get_min_fast_tracepoint_insn_len): New.
287 (install_fast_tracepoint_jump_pad): Add arguments.
288 * server.h (IPA_BUFSIZ): Define.
289 * linux-i386-ipa.c: Include extra header files.
290 (initialize_fast_tracepoint_trampoline_buffer): New function.
291 (initialize_low_tracepoint): Call it.
292 * server.h (set_trampoline_buffer_space): Declare.
293 (claim_trampoline_space): Ditto.
294 (have_fast_tracepoint_trampoline_buffer): Ditto.
296 2011-11-14 Yao Qi <yao@codesourcery.com>
298 * server.c (handle_query): Handle InstallInTrace for qSupported.
299 * tracepoint.c (add_tracepoint): Sort list.
300 (install_tracepoint, download_tracepoint): New.
301 (cmd_qtdp): Call them to install and download tracepoints.
302 (sort_tracepoints): Removed.
303 (cmd_qtstart): Update.
305 2011-11-14 Yao Qi <yao@codesourcery.com>
307 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
308 * mem-break.h: Declare.
309 * tracepoint.c (cmd_qtstart): Move some code to ...
310 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
312 (download_tracepoints): Move some code to ...
313 (download_tracepoint_1): ... here. New.
315 2011-11-08 Yao Qi <yao@codesourcery.com>
317 * remote-utils.c (relocate_instruction): A comment fix.
319 2011-11-07 Joel Brobecker <brobecker@adacore.com>
321 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
322 (i386_dr_low_get_control, i386_dr_low_get_status): Use
323 dr_status_mirror and dr_control_mirror from debug_reg_state.
324 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
325 (i386_initial_stuff): Remove use of deleted globals.
326 (i386_get_thread_context, i386_set_thread_context,
327 i386_thread_added): Use dr_status_mirror and dr_control_mirror
328 from debug_reg_state.
330 2011-11-05 Yao Qi <yao@codesourcery.com>
332 * tracepoint.c (gdb_collect): Loop over tracepoints of same
335 2011-11-02 Stan Shebs <stan@codesourcery.com>
337 * tracepoint.c (agent_mem_read_string): New function.
338 (eval_agent_expr): Call it for tracenz.
339 * server.c (handle_query): Report support for tracenz.
341 2011-11-02 Yao Qi <yao@codesourcery.com>
343 * tracepoint.c (cmd_qtstart): Remove unused local variables.
345 2011-11-02 Yao Qi <yao@codesourcery.com>
347 * target.h: Fix a typo in comment.
349 2011-10-31 Pedro Alves <pedro@codesourcery.com>
351 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
352 clobber the breakpoints' shadows with fast tracepoint jumps.
353 * mem-break.h (check_mem_write): Add `myaddr' parameter.
354 * target.c (write_inferior_memory): Also pass MYADDR down to
357 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
359 * configure.ac: Check support for personality routine.
360 * configure: Regenerate.
361 * config.in: Likewise.
362 * linux-low.c: Include <sys/personality.h>.
363 Define ADDR_NO_RANDOMIZE if necessary.
364 (linux_create_inferior): Disable address space randomization when
365 forking inferior, if requested.
366 (linux_supports_disable_randomization): New function.
367 (linux_target_ops): Install it.
368 * server.h (disable_randomization): Declare.
369 * server.c (disable_randomization): New global variable.
370 (handle_general_set): Handle QDisableRandomization.
371 (handle_query): Likewise for qSupported.
372 (main): Support --disable-randomization and --no-disable-randomization
373 command line arguments.
374 * target.h (struct target_ops): Add supports_disable_randomization.
375 (target_supports_disable_randomization): New macro.
377 2011-09-29 Mike Frysinger <vapier@gentoo.org>
379 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
381 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
382 [!PT_GETDSBT] (target_loadmap): New definition.
383 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
384 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
385 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
386 and PT_GETDSBT to LINUX_LOADMAP.
387 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
388 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
390 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
392 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
393 (arm_linux_hwbp_cap): New static variable.
394 (arm_linux_get_hwbp_cap): Replace by ...
395 (arm_linux_init_hwbp_cap): ... this new function.
396 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
397 (arm_linux_get_hw_watchpoint_count): Likewise.
398 (arm_linux_get_hw_watchpoint_max_length): Likewise.
399 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
400 (arm_prepare_to_resume): Use perror_with_name instead of error.
402 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
404 * linux-arm-low.c: Include <signal.h>.
405 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
406 (struct arm_linux_hwbp_cap): New data type.
407 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
408 (struct arm_linux_hw_breakpoint): New data type.
409 (MAX_BPTS, MAX_WPTS): Define.
410 (struct arch_process_info, struct arch_lwp_info): New data types.
411 (arm_linux_get_hwbp_cap): New function.
412 (arm_linux_get_hw_breakpoint_count): Likewise.
413 (arm_linux_get_hw_watchpoint_count): Likewise.
414 (arm_linux_get_hw_watchpoint_max_length): Likewise.
415 (arm_hwbp_control_initialize): Likewise.
416 (arm_hwbp_control_is_enabled): Likewise.
417 (arm_hwbp_control_is_initialized): Likewise.
418 (arm_hwbp_control_disable): Likewise.
419 (arm_linux_hw_breakpoint_equal): Likewise.
420 (arm_linux_hw_point_initialize): Likewise.
421 (struct update_registers_data): New data structure.
422 (update_registers_callback: New function.
423 (arm_insert_point): Likewise.
424 (arm_remove_point): Likewise.
425 (arm_stopped_by_watchpoint): Likewise.
426 (arm_stopped_data_address): Likewise.
427 (arm_new_process): Likewise.
428 (arm_new_thread): Likewise.
429 (arm_prepare_to_resume): Likewise.
430 (the_low_target): Register arm_insert_point, arm_remove_point,
431 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
432 arm_new_thread, and arm_prepare_to_resume.
434 2011-09-15 Stan Shebs <stan@codesourcery.com>
436 * server.h (struct emit_ops): Add compare-goto fields.
437 * tracepoint.c (gdb_agent_op_sizes): New table.
438 (emit_eq_goto): New function.
439 (emit_ne_goto): New function.
440 (emit_lt_goto): New function.
441 (emit_le_goto): New function.
442 (emit_gt_goto): New function.
443 (emit_ge_goto): New function.
444 (is_goto_target): New function.
445 (compile_bytecodes): Recognize special cases of compare-goto
446 combinations and call specialized emitters for them.
447 * linux-x86-low.c (amd64_emit_eq_goto): New function.
448 (amd64_emit_ne_goto): New function.
449 (amd64_emit_lt_goto): New function.
450 (amd64_emit_le_goto): New function.
451 (amd64_emit_gt_goto): New function.
452 (amd64_emit_ge_goto): New function.
453 (amd64_emit_ops): Add the new functions.
454 (i386_emit_eq_goto): New function.
455 (i386_emit_ne_goto): New function.
456 (i386_emit_lt_goto): New function.
457 (i386_emit_le_goto): New function.
458 (i386_emit_gt_goto): New function.
459 (i386_emit_ge_goto): New function.
460 (i386_emit_ops): Add the new functions.
462 2011-09-08 Stan Shebs <stan@codesourcery.com>
464 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
465 (i386_emit_epilogue): Restore %ebx.
467 2011-08-31 Jie Zhang <jzhang918@gmail.com>
469 * server.c (step_thread): Remove definition.
470 (process_serial_event): Don't handle Hs.
471 * server.h (step_thread): Remove declaration.
472 * target.c (set_desired_inferior): Remove use of step_thread.
474 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
476 * linux-low.c: Include linux-procfs.h.
477 (linux_attach_lwp_1): Update comments.
478 (linux_attach): Scan for existing threads when attaching to a
479 process that is the tgid.
480 * Makefile.in: Update dependencies.
482 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
484 * configure.srv: Add linux-procfs.o dependencies.
486 2011-08-14 Yao Qi <yao@codesourcery.com>
488 * target.h (struct target_ops): Fix indent.
489 * win32-low.c (win32_target_ops): Fix comment.
491 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
492 Yao Qi <yao@codesourcery.com>
494 * Makefile.in (clean): Remove tic6x-*.c files.
495 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
496 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
497 (tic6x-c64xp-linux.c): Likewise.
498 * configure.srv: Add support for tic6x-*-uclinux.
499 * linux-tic6x-low.c: New.
500 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
502 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
503 Yao Qi <yao@codesourcery.com>
505 * target.h (struct target_ops): Add read_loadmap.
506 * linux-low.c (struct target_loadseg): New type.
507 (struct target_loadmap): New type.
508 (linux_read_loadmap): New function.
509 (linux_target_ops): Add linux_read_loadmap.
510 * server.c (handle_query): Support qXfer:fdpic:read packet.
511 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
513 2011-08-05 Eli Zaretskii <eliz@gnu.org>
515 * win32-low.c: Include <stdint.h>.
517 2011-07-22 Pedro Alves <pedro@codesourcery.com>
519 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
520 to the inferior here.
521 (i386_remove_aligned_watchpoint): Ditto.
522 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
523 fit part of the watchpoint in the debug registers.
524 (i386_update_inferior_debug_regs): New.
525 (i386_low_insert_watchpoint): Work on a local mirror of the debug
526 registers, and only update the inferior on success.
527 (i386_low_remove_watchpoint): Ditto.
529 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
531 * linux-low.c (compare_ints, unique, list_threads, show_process,
532 linux_core_of_thread): Delete.
533 (linux_target_ops): Change linux_core_of_thread to
534 linux_common_core_of_thread.
535 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
536 * utils.c (malloc_failure): Change type of argument.
537 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
538 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
539 common/linux-osdata.c, common/ptid.c and common/buffer.c.
540 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
541 (IPA_OBJS): Add common-utils-ipa.o.
542 (ptid_h, linux_osdata_h): New macros.
543 (server_h): Add common/common-utils.h, common/xml-utils.h,
544 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
546 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
547 ptid.o, buffer.o): New rules.
548 (linux-low.o): Add common/linux-osdata.h as a dependency.
549 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
550 * configure.ac: Add AC_HEADER_DIRENT check.
551 * config.in: Regenerate.
552 * configure: Regenerate.
553 * remote-utils.c (xml_escape_text): Delete.
554 (buffer_grow, buffer_free, buffer_init, buffer_finish,
555 buffer_xml_printf): Move to common/buffer.c.
556 * server.c (main): Remove call to initialize_inferiors.
557 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
558 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
559 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
560 internal_error, gdb_assert, gdb_assert_fail): Delete.
561 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
562 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
564 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
565 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
566 initialize_inferiors): Delete.
568 2011-07-20 Pedro Alves <pedro@codesourcery.com>
570 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
573 2011-05-31 Pedro Alves <pedro@codesourcery.com>
575 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
577 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
579 2011-05-26 Yao Qi <yao@codesourcery.com>
581 * Makefile.in (thread-db.o): Track dependence to
582 common/gdb_thread_db.h.
583 * thread-db.c: include gdb_thread_db.h from right place.
585 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
587 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
588 __FILE__ and __LINE__ to internal_error.
590 2011-05-13 Doug Evans <dje@google.com>
592 * thread-db.c (try_thread_db_load_from_sdir): New function.
593 (try_thread_db_load_from_dir): New function.
594 (thread_db_load_search): Handle $sdir, ignore $pdir.
595 Remove trying of system directories if search of
596 libthread-db-search-path fails, that is now done via $sdir.
598 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
600 * server.c (handle_query): Add EnableDisableTracepoints to the list
601 of supported features.
602 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
604 (cmd_qtenable_disable): New.
605 (cmd_qtstart): Install tracepoints even if disabled.
606 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
607 receiving a QTEnable or QTDisable packet.
608 (gdb_collect): Skip data collection if fast tracepoint is disabled.
609 (ust_marker_to_static_tracepoint): Do not ignore disabled static
611 (gdb_probe): Skip data collection if static tracepoint is disabled.
613 2011-05-10 Doug Evans <dje@google.com>
615 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
617 2011-05-04 Doug Evans <dje@google.com>
619 * linux-low.c (linux_join): Skip process lookup.
620 * spu-low.c (spu_join): Ditto.
621 * server.c (join_inferiors_callback): Delete.
622 (process_serial_event): For 'D' packet (detach) call join_inferior
625 2011-05-04 Joseph Myers <joseph@codesourcery.com>
627 * README: Don't mention xscale*-*-linux*.
628 * configure.srv (xscale*-*-linux*): Don't handle target.
630 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
632 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
634 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
635 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
636 (i386_emit_void_call_2): Likewise.
638 2011-04-26 Yao Qi <yao@codesourcery.com>
640 * linux-low.c: Move common macros to linux-ptrace.h.
641 Include linux-ptrace.h.
642 * Makefile.in (linux_ptrace_h): New.
643 (linux-low.o): Depends on linux-ptrace.h.
645 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
647 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
648 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
649 (remote_prepare): New function with most of the TCP code from ...
650 (remote_open): ... here. Detect PORT here unconditionally. Move also
651 setting transport_is_reliable.
652 * server.c (run_once): New variable.
653 (gdbserver_usage): Document it.
654 (main): Set run_once for `--once'. Call remote_prepare. Exit after
655 the first run if RUN_ONCE.
656 * server.h (run_once, remote_prepare): New declarations.
658 2011-04-19 Tom Tromey <tromey@redhat.com>
660 * win32-low.c (handle_load_dll): Remove duplicate "the".
662 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
664 Remove support for old Cygwin 1.5 versions.
665 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
666 function to avoid warning.
667 (win32_add_one_solib): Use cygwin_conv_path function to avoid
670 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
672 * gdbserver/server.h (Macro _): Define it if not available.
674 2011-03-14 Michael Snyder <msnyder@vmware.com>
676 * hostio.c (handle_close): Remove unnecessary null test.
678 2011-03-10 Joel Brobecker <brobecker@adacore.com>
680 * Makefile.in (maintainer-clean realclean distclean): Remove
681 "make ... subdir_do" command.
683 2011-03-10 Michael Snyder <msnyder@vmware.com>
685 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
687 * server.c (handle_v_run): Free alloced buffer on early return.
689 2011-03-09 Yao Qi <yao@codesourcery.com>
692 2011-03-04 Yao Qi <yao@codesourcery.com>
694 * Makefile.in: Remove GNU make feature --directory.
696 2011-03-05 Yao Qi <yao@codesourcery.com>
698 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
699 (subdir_do): New make target. Copied from gdb/Makefile.
700 (maintainer-clean, realclean, distclean, clean): Call corresponding
701 make targets in common/Makefile.
703 2011-02-11 Yao Qi <yao@codesourcery.com>
705 * configure.ac: Call AC_PROG_RANLIB.
706 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
707 * configure: Regenerate.
709 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
711 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
713 2011-03-06 Yao Qi <yao@codesourcery.com>
715 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
717 2011-03-05 Yao Qi <yao@codesourcery.com>
719 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
720 (subdir_do): New make target. Copied from gdb/Makefile.
721 (maintainer-clean, realclean, distclean, clean): Call corresponding
722 make targets in common/Makefile.
724 2011-03-04 Yao Qi <yao@codesourcery.com>
726 * Makefile.in: Remove GNU make feature --directory.
728 2011-03-04 Michael Snyder <msnyder@vmware.com>
730 * server.c (queue_stop_reply): Call xmalloc not malloc.
732 2011-03-02 Michael Snyder <msnyder@vmware.com>
734 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
736 2011-02-28 Michael Snyder <msnyder@vmware.com>
738 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
739 (cmd_qtframe): Ditto.
740 (cmd_qtbuffer): Ditto.
741 (cmd_bigqtbuffer): Ditto.
743 * utils.c (decimal2str): Initialize 'width' to nine, then
746 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
748 * hostio.c (require_data): Free *data, not data.
750 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
752 * hostio.c (require_data): Use free, not xfree.
754 2011-02-27 Michael Snyder <msnyder@vmware.com>
756 * server.c (handle_query): Discard unused value.
758 * hostio.c (require_data): Free malloc memory before returning
761 2011-02-26 Michael Snyder <msnyder@vmware.com>
763 * linux-low.c (list_threads): Call closedir for dirent.
765 2011-02-27 Michael Snyder <msnyder@vmware.com>
767 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
768 a case statement falls through.
770 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
772 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
775 2011-02-26 Michael Snyder <msnyder@vmware.com>
777 * utils.c (decimal2str): Eliminate dead code and dead param.
778 (pulongest): Drop dead param from call to decimal2str.
781 2011-02-24 Joel Brobecker <brobecker@adacore.com>
783 Revert the following patch (not approved yet):
784 2011-02-21 Hui Zhu <teawater@gmail.com>
785 * tracepoint.c (tp_printf): New function.
786 (eval_agent_expr): Handle gdb_agent_op_printf.
788 2011-02-21 Hui Zhu <teawater@gmail.com>
790 * tracepoint.c (tp_printf): New function.
791 (eval_agent_expr): Handle gdb_agent_op_printf.
793 2011-02-18 Tom Tromey <tromey@redhat.com>
795 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
796 (tracepoint.o): Likewise.
797 * tracepoint.c (enum gdb_agent_op): Use ax.def.
798 (gdb_agent_op_names): Likewise.
800 2011-02-18 Tom Tromey <tromey@redhat.com>
802 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
803 gdb_agent_op_rot>: New constants.
804 (gdb_agent_op_names): Add pick and roll.
805 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
808 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
810 * aclocal.m4: Regenerated with aclocal-1.11.1.
812 2011-02-14 Pedro Alves <pedro@codesourcery.com>
814 * server.c (handle_qxfer_traceframe_info): New.
815 (qxfer_packets): Register "traceframe-info".
816 (handle_query): Report support for qXfer:traceframe-info:read+.
817 * tracepoint.c (match_blocktype): New.
818 (traceframe_find_block_type): Rename to ...
819 (traceframe_walk_blocks): ... this. Add callback filter argument,
821 (traceframe_find_block_type): New, reimplemented on top of
822 traceframe_walk_blocks.
823 (build_traceframe_info_xml): New.
824 (traceframe_read_info): New.
825 * server.h (traceframe_read_info): Declare.
827 2011-02-11 Yao Qi <yao@codesourcery.com>
829 * configure.ac: Call AC_PROG_RANLIB.
830 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
831 * configure: Regenerate.
833 2011-02-07 Pedro Alves <pedro@codesourcery.com>
835 * server.c (gdb_read_memory): Change return semantics to allow
837 (handle_search_memory_1): Adjust.
838 (process_serial_event) <'m' packet>: Handle partial transfers.
839 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
841 2011-01-28 Pedro Alves <pedro@codesourcery.com>
843 * regcache.c (init_register_cache): Initialize
844 regcache->register_status.
845 (free_register_cache): Release regcache->register_status.
846 (regcache_cpy): Copy register_status.
847 (registers_to_string): Print 'x's for unavailable registers.
848 (supply_register): Mark the register's status valid or
849 unavailable, depending on whether a buffer was passed in or not.
850 (supply_register_zeroed): New.
851 (supply_regblock): Mark the registers' status valid or
852 unavailable, depending on whether a buffer was passed in or not.
853 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
854 (struct regcache): New `register_status' field.
855 (supply_register_zeroed): Declare.
856 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
857 supply_register_zeroed, rather than passing a NULL buffer to
859 * tracepoint.c (fetch_traceframe_registers): Update comment.
861 2011-01-28 Pedro Alves <pedro@codesourcery.com>
863 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
866 2011-01-25 Pedro Alves <pedro@codesourcery.com>
868 * server.h (decode_xfer_write): Change prototype.
869 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
870 and don't extract the annex here.
871 * server.c (decode_xfer_read): Remove `annex' parameter,
872 and don't extract the annex here.
875 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
876 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
877 (handle_qxfer_statictrace): New functions, abstracted out from
878 handle_query, and made to use the struct qxfer interface.
879 (handle_threads_qxfer_proper): Rename to ...
880 (handle_qxfer_threads_proper): ... this.
881 (handle_threads_qxfer): Rename to ...
882 (handle_qxfer_threads): ... this. Adjust.
883 (qxfer_packets): New array.
884 (handle_qxfer): New function.
885 (handle_query): Use handle_qxfer.
887 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
889 * gdbreplay.c: Shorten lines of >= 80 columns.
890 * linux-low.c: Ditto.
891 * linux-ppc-low.c: Ditto.
892 * linux-s390-low.c: Ditto.
893 * linux-sparc-low.c: Ditto.
894 * linux-x86-low.c: Ditto.
895 * linux-xtensa-low.c: Ditto.
896 * mem-break.c: Ditto.
899 * remote-utils.c: Ditto.
902 * thread-db.c: Ditto.
903 * tracepoint.c: Ditto.
905 * win32-low.h: Ditto.
907 2011-01-05 Joel Brobecker <brobecker@adacore.com>
909 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
912 2011-01-01 Joel Brobecker <brobecker@adacore.com>
914 * server.c (gdbserver_version): Update copyright year in version
916 * gdbreplay.c (gdbreplay_version): Ditto.
918 2010-12-29 Jie Zhang <jie.zhang@analog.com>
920 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
921 * linux-bfin-low.c: New file.
922 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
923 PT_DATA_ADDR for BFIN targets.
924 * Makefile.in (SFILES): Add linux-bfin-low.c.
925 (clean): Remove reg-bfin.c.
926 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
927 * README: Mention supported Blackfin targets.
929 2010-12-23 Mike Frysinger <vapier@gentoo.org>
931 * .gitignore: New file.
933 2010-11-16 Mike Frysinger <vapier@gentoo.org>
935 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
937 2010-10-22 Jie Zhang <jie@codesourcery.com>
939 * Makefile.in: Add FLAGS_TO_PASS variable.
940 (install): Remove dependency of install-only and recursively
941 invoke make for install-only.
943 2010-10-04 Doug Evans <dje@google.com>
945 * Makefile.in (uninstall): Use $(DESTDIR).
947 2010-09-24 Pedro Alves <pedro@codesourcery.com>
951 * linux-x86-low.c (compat_siginfo_from_siginfo)
952 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
953 si_code is < 0. Check for si_code == SI_TIMER before checking for
956 2010-09-13 Joel Brobecker <brobecker@adacore.com>
958 * lynx-i386-low.c: New file.
959 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
961 2010-09-13 Joel Brobecker <brobecker@adacore.com>
963 * lynx-low.c (ptrace_request_to_str): Remove handling for
964 request values that have been removed in LynxOS 5.x.
966 2010-09-13 Joel Brobecker <brobecker@adacore.com>
968 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
971 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
973 * configure.ac: Add --enable-inprocess-agent option.
974 * configure: Rebuilt.
976 2010-09-06 Yao Qi <yao@codesourcery.com>
978 * linux-low.c (linux_kill): Remove unused variable.
979 (linux_stabilize_threads): Likewise.
980 * server.c (start_inferior): Likewise.
981 (queue_stop_reply_callback): Likewise.
982 * tracepoint.c (do_action_at_tracepoint): Likewise.
984 2010-09-06 Yao Qi <yao@codesourcery.com>
986 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
989 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
991 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
993 2010-09-06 Pedro Alves <pedro@codesourcery.com>
995 * Makefile.in (install-only): Replace $IPA_DEPFILES with
998 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1000 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1001 gdbserver/lynx-ppc-low.c: New files.
1002 * Makefile.in (lynx_low_h): New variable.
1003 (lynx-low.o, lynx-ppc-low.o): New rules.
1004 * configure.ac: On LynxOS, link with -lnetinet.
1005 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1006 * configure: regenerate.
1008 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1010 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1011 * configure.ac: Add check for vasprintf and vsnprintf.
1012 * configure, config.in: Regenerate.
1013 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1015 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1017 * gdbreplay.c: Move include of alloca.h up, next to include of
1019 * server.h: Add include of malloc.h.
1020 * mem-break.c: Remove include of malloc.h.
1021 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1023 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1025 * Makefile.in (memmem.o): Build with -Wno-error.
1027 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1029 * utils.c (xsnprintf): Make non-static.
1030 * server.h: Add xsnprintf declaration.
1031 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1032 replace calls to snprintf by calls to xsnprintf throughout.
1034 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1036 * configure.ac: Add configure check for alloca.
1037 * configure, config.in: Regenerate.
1038 * server.h: Include alloca.h if it exists.
1039 * gdbreplay.c: Include alloca.h if it exists.
1041 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1043 * linux-low.c (__SIGRTMIN): Define if not already defined.
1044 (linux_create_inferior): Check for __ANDROID__ rather than
1046 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1047 are already deferred.
1048 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1049 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1050 stopped and already has a pending signal to report.
1051 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1052 a pending signal to report or is moving out of a jump pad.
1053 (linux_init_signals): Check for __ANDROID__ rather than
1056 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1058 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1059 debug_threads check. Avoid a linear search when not doing debug
1062 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1064 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1065 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1066 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1067 (process_event): Change local fd's type to gdb_fildes_t.
1068 (create_file_handler): Adjust prototype.
1069 (delete_file_handler): Adjust prototype.
1070 (handle_file_event): Adjust prototype. Use pfildes.
1071 (create_file_event): Adjsut prototype.
1072 * remote-utils.c (remote_desc, listen_desc): Change type to
1074 * server.h: New gdb_fildes_t typedef.
1075 [USE_WIN32API]: Include winsock2.h.
1076 (delete_file_handler, add_file_handler): Adjust prototypes.
1078 * utils.c (pfildes): New.
1080 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1082 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1083 * configure: Regenerate.
1085 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1087 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1088 (linux_done_accessing_memory): ... this.
1089 (linux_target_ops): Adjust.
1090 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1091 * nto-low.c (nto_target_ops): Adjust comment.
1092 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1093 * spu-low.c (spu_target_ops): Adjust comment.
1094 * target.h (target_ops): Rename unprepare_to_access_memory field
1095 to done_accessing_memory.
1096 (unprepare_to_access_memory): Rename to ...
1097 (done_accessing_memory): ... this.
1099 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1101 * linux-low.c (linux_prepare_to_access_memory): New.
1102 (linux_unprepare_to_access_memory): New.
1103 (linux_target_ops): Install them.
1104 * server.c (read_memory): Rename to ...
1105 (gdb_read_memory): ... this. Use
1106 prepare_to_access_memory/prepare_to_access_memory.
1107 (write_memory): Rename to ...
1108 (gdb_write_memory): ... this. Use
1109 prepare_to_access_memory/prepare_to_access_memory.
1110 (handle_search_memory_1): Adjust.
1111 (process_serial_event): Adjust.
1112 * target.h (struct target_ops): New fields
1113 prepare_to_access_memory and unprepare_to_access_memory.
1114 (prepare_to_access_memory, unprepare_to_access_memory): New.
1115 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1116 prepare_to_access_memory/prepare_to_access_memory.
1117 * nto-low.c (nto_target_ops): Adjust.
1118 * spu-low.c (spu_target_ops): Adjust.
1119 * win32-low.c (win32_target_ops): Adjust.
1121 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1123 * Makefile.in (WARN_CFLAGS): Get it from configure.
1124 (WERROR_CFLAGS): New.
1125 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1126 * configure.ac: Introduce --enable-werror, which adds -Werror to
1127 the compiler command line. Enabled by default. Disable with
1128 --disable-werror. Add -Wdeclaration-after-statement
1129 Wpointer-arith and -Wformat-nonliteral to warning flags.
1130 * configure: Regenerate.
1132 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1134 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1136 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1138 * gdbreplay.c (remote_error): New.
1140 (expect): Use gdbchar. Check for error reading from GDB.
1141 Clarify sync error output.
1142 (play): Check for errors writing to GDB.
1143 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1144 * remote-utils.c (getpkt): Check for errors writing to the remote
1147 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1149 * linux-low.c (linux_wait_1): Move non-debugging code out of
1150 `debug_threads' control.
1152 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1154 * linux-low.c (linux_wait_1): Don't set last_status here.
1155 * server.c (push_event, queue_stop_reply_callback): Assert we're
1156 not pushing a TARGET_WAITKIND_IGNORE event.
1157 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1158 (myresume, handle_target_event): Set the thread's last_resume_kind
1159 and last_status from the target returned status.
1161 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1165 * linux-x86-low.c (update_debug_registers_callback): New.
1166 (i386_dr_low_set_addr): Use it.
1167 (i386_dr_low_get_addr): New.
1168 (i386_dr_low_set_control): Use update_debug_registers_callback.
1169 (i386_dr_low_get_control): New.
1170 (i386_dr_low_get_status): Adjust.
1171 * linux-low.c (linux_stop_lwp): New.
1172 * linux-low.h (linux_stop_lwp): Declare.
1174 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1175 argument instead of a i386_debug_reg_state.
1176 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1177 a i386_debug_reg_state.
1178 (i386_insert_aligned_watchpoint): Adjust.
1179 (i386_remove_aligned_watchpoint): Adjust.
1180 (i386_low_stopped_data_address): Read the debug registers from the
1181 inferior instead of from the mirrors.
1182 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1183 (i386_dr_low_get_addr): Declare.
1184 (i386_dr_low_get_control): Declare.
1185 (i386_dr_low_get_status): Change prototype.
1187 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1188 (i386_dr_low_get_addr): New.
1189 (i386_dr_low_get_control): New.
1190 (i386_dr_low_get_status): Adjust prototype. Return
1192 (i386_initial_stuff): Clear dr_status_mirror and
1194 (i386_get_thread_context): Adjust.
1195 (i386_set_thread_context): Adjust.
1196 (i386_thread_added): Adjust.
1198 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1200 * linux-low.h (linux_thread_area): Delete declaration.
1202 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1204 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1205 after its termination.
1207 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1209 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1210 (gdb_wants_all_stopped): Delete.
1211 (linux_wait_1): Don't call them.
1212 * server.c (handle_v_cont): Tag all threads as want-stopped.
1213 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1214 stopped as "client-wants-stopped".
1216 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1218 * Makefile.in (signals_h): New.
1219 (server_h): Depend on it.
1220 (server.o): Don't depend on $(signals_def).
1221 (signals.o): Depend on $(signals_def).
1223 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1225 * Makefile.in (signals_def): New.
1226 (server_h): Append include/gdb/signals.h and signals_def.
1227 (server.o): Append signals_def.
1229 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1231 * server.c (handle_target_event): Use target_signal_to_host for
1232 resume_info.sig initialization.
1233 * target.h (struct thread_resume) <sig>: New comment.
1235 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1237 * server.c (handle_query): strcpy() the returned string from paddress()
1238 instead of sprintf().
1239 * utils.c (paddress): Return phex_nz().
1241 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1243 * server.c (handle_v_cont): Call mourn_inferior if process
1245 (myresume): Likewise.
1247 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1249 Static tracepoints, and integration with UST.
1251 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1252 * mem-break.c (uninsert_all_breakpoints)
1253 (reinsert_all_breakpoints): New.
1254 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1255 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1256 (gdb_agent_ust_loaded, helper_thread_id)
1257 (gdb_agent_helper_thread_id): New macros.
1258 (struct ipa_sym_addresses): Add addr_ust_loaded,
1259 addr_helper_thread_id, addr_cmd_buf.
1260 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1261 (in_process_agent_loaded_ust): New.
1262 (write_e_ust_not_loaded): New.
1263 (maybe_write_ipa_ust_not_loaded): New.
1264 (struct collect_static_trace_data_action): New.
1265 (enum tracepoint_type) <static_tracepoint>: New.
1266 (struct tracepoint) <handle>: Mention static tracepoints.
1267 (struct static_tracepoint_ctx): New.
1268 (CMD_BUF_SIZE): New.
1269 (add_tracepoint_action): Handle static tracepoint actions.
1270 (unprobe_marker_at): New.
1271 (clear_installed_tracepoints): Handle static tracepoints.
1272 (cmd_qtdp): Handle static tracepoints.
1273 (probe_marker_at): New.
1274 (cmd_qtstart): Handle static tracepoints.
1275 (response_tracepoint): Handle static tracepoints.
1276 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1277 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1278 (get_context_regcache): Handle static tracepoints.
1279 (do_action_at_tracepoint): Handle static tracepoint actions.
1280 (traceframe_find_block_type): Handle static trace data blocks.
1281 (traceframe_read_sdata): New.
1282 (download_tracepoints): Download static tracepoint actions.
1283 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1284 (GDB_PROBE_NAME): New.
1289 (ust_marker_to_static_tracepoint): New.
1291 (collect_ust_data_at_tracepoint): New.
1292 (gdb_ust_probe): New.
1293 (UNIX_PATH_MAX, SOCK_DIR): New.
1294 (gdb_ust_connect_sync_socket): New.
1295 (resume_thread, stop_thread): New.
1296 (run_inferior_command): New.
1297 (init_named_socket): New.
1298 (gdb_ust_socket_init): New.
1299 (cstr_to_hexstr): New.
1301 (first_marker, next_marker): New.
1302 (response_ust_marker): New.
1303 (cmd_qtfstm, cmd_qtsstm): New.
1304 (unprobe_marker_at, probe_marker_at): New.
1305 (cmd_qtstmat, gdb_ust_thread): New.
1306 (gdb_ust_init): New.
1307 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1308 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1310 (x86_64_st_collect_regmap): New.
1311 (X86_64_NUM_ST_COLLECT_GREGS): New.
1312 (AMD64_RIP_REGNUM): New.
1313 (supply_static_tracepoint_registers): New.
1314 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1316 (i386_st_collect_regmap): New.
1317 (i386_NUM_ST_COLLECT_GREGS): New.
1318 (supply_static_tracepoint_registers): New.
1319 * server.c (handle_query): Handle qXfer:statictrace:read.
1320 <qSupported>: Report support for StaticTracepoints, and
1321 qXfer:statictrace:read features.
1322 * server.h (traceframe_read_sdata)
1323 (supply_static_tracepoint_registers): Declare.
1324 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1325 (unpack_varlen_hex): Include in IPA build.
1326 * Makefile.in (ustlibs, ustinc): New.
1327 (IPA_OBJS): Add remote-utils-ipa.o.
1328 ($(IPA_LIB)): Link -ldl and -lpthread.
1330 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1331 * config.in, configure: Regenerate.
1333 2010-06-20 Ian Lance Taylor <iant@google.com>
1334 Pedro Alves <pedro@codesourcery.com>
1336 * linux-x86-low.c (always_true): Delete.
1337 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1338 trying to fool the compiler with always_true.
1340 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1342 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1343 conditions in gdbserver.
1345 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1347 * spu-low.c (spu_read_memory): Wrap around local store limit.
1348 (spu_write_memory): Likewise.
1350 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1352 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1353 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1355 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1357 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1358 uses with LONGEST uses.
1360 2010-06-14 Stan Shebs <stan@codesourcery.com>
1361 Pedro Alves <pedro@codesourcery.com>
1365 * linux-x86-low.c: Include limits.h.
1370 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1371 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1372 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1373 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1374 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1375 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1376 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1377 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1378 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1379 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1380 (amd64_emit_void_call_2): New.
1381 (amd64_emit_ops): New.
1382 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1383 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1384 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1385 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1386 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1387 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1388 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1389 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1390 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1391 (i386_emit_stack_adjust, i386_emit_int_call_1)
1392 (i386_emit_void_call_2): New.
1393 (i386_emit_ops): New.
1394 (x86_emit_ops): New.
1395 (the_low_target): Install x86_emit_ops.
1396 * server.h (struct emit_ops): New.
1397 (get_raw_reg_func_addr): Declare.
1398 (current_insn_ptr, emit_error): Declare.
1399 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1400 (set_trace_state_variable_value): New defines.
1401 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1402 addr_get_trace_state_variable_value and
1403 addr_set_trace_state_variable_value.
1404 (symbol_list): New fields for get_raw_reg,
1405 get_trace_state_variable_value and set_trace_state_variable_value.
1406 (condfn): New typedef.
1407 (struct tracepoint): New field `compiled_cond'.
1408 (do_action_at_tracepoint): Clear compiled_cond.
1409 (get_trace_state_variable_value, set_trace_state_variable_value):
1411 (condition_true_at_tracepoint): If there's a compiled condition,
1413 (current_insn_ptr, emit_error): New globals.
1414 (struct bytecode_address): New.
1415 (get_raw_reg_func_addr): New.
1416 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1417 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1418 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1419 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1420 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1421 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1422 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1423 (compile_tracepoint_condition, compile_bytecodes): New.
1424 * target.h (emit_ops): Forward declare.
1425 (struct target_ops): New field emit_ops.
1426 (target_emit_ops): New.
1427 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1428 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1429 * linux-low.c (linux_emit_ops): New.
1430 (linux_target_ops): Install it.
1431 * linux-low.h (struct linux_target_ops): New field emit_ops.
1433 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1435 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1436 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1438 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1439 Stan Shebs <stan@codesourcery.com>
1441 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1442 (all): Depend on $(extra_libraries).
1443 (install-only): Install the IPA.
1444 (IPA_OBJS, IPA_LIB): New.
1445 (clean): Remove the IPA lib.
1446 (IPAGENT_CFLAGS): New.
1447 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1448 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1449 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1450 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1451 * configure.ac: Check for atomic builtins support in the compiler.
1452 (IPA_DEPFILES, extra_libraries): Define.
1453 * configure.srv (ipa_obj): Add description.
1454 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1455 (i[34567]86-*-linux*): Set ipa_obj.
1456 (x86_64-*-linux*): Set ipa_obj.
1457 * linux-low.c (stabilizing_threads): New.
1458 (supports_fast_tracepoints): New.
1459 (linux_detach): Stabilize threads before detaching.
1460 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1461 the lwp is either not stabilizing, or is moving out of a jump pad.
1462 (linux_fast_tracepoint_collecting): New.
1463 (maybe_move_out_of_jump_pad): New.
1464 (enqueue_one_deferred_signal): New.
1465 (dequeue_one_deferred_signal): New.
1466 (linux_wait_for_event_1): If moving out of a jump pad, defer
1467 pending signals to later.
1468 (linux_stabilize_threads): New.
1469 (linux_wait_1): Check if threads need moving out of jump pads, and
1471 (stuck_in_jump_pad_callback): New.
1472 (move_out_of_jump_pad_callback): New.
1474 (linux_resume_one_lwp): Handle moving out of jump pads.
1475 (linux_set_resume_request): Dequeue deferred signals.
1476 (need_step_over_p): Also step over fast tracepoint jumps.
1477 (start_step_over): Also uninsert fast tracepoint jumps.
1478 (finish_step_over): Also reinsert fast tracepoint jumps.
1479 (linux_install_fast_tracepoint_jump): New.
1480 (linux_target_ops): Install linux_stabilize_threads and
1481 linux_install_fast_tracepoint_jump_pad.
1482 * linux-low.h (linux_target_ops) <get_thread_area,
1483 install_fast_tracepoint_jump_pad>: New fields.
1484 (struct lwp_info) <collecting_fast_tracepoint,
1485 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1486 (linux_get_thread_area): Declare.
1487 * linux-x86-low.c (jump_insn): New.
1488 (x86_get_thread_area): New.
1489 (append_insns): New.
1491 (amd64_install_fast_tracepoint_jump_pad): New.
1492 (i386_install_fast_tracepoint_jump_pad): New.
1493 (x86_install_fast_tracepoint_jump_pad): New.
1494 (the_low_target): Install x86_get_thread_area and
1495 x86_install_fast_tracepoint_jump_pad.
1496 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1497 (struct fast_tracepoint_jump): New.
1498 (fast_tracepoint_jump_insn): New.
1499 (fast_tracepoint_jump_shadow): New.
1500 (find_fast_tracepoint_jump_at): New.
1501 (fast_tracepoint_jump_here): New.
1502 (delete_fast_tracepoint_jump): New.
1503 (set_fast_tracepoint_jump): New.
1504 (uninsert_fast_tracepoint_jumps_at): New.
1505 (reinsert_fast_tracepoint_jumps_at): New.
1506 (set_breakpoint_at): Use write_inferior_memory.
1507 (uninsert_raw_breakpoint): Use write_inferior_memory.
1508 (check_mem_read): Mask out fast tracepoint jumps.
1509 (check_mem_write): Mask out fast tracepoint jumps.
1510 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1511 (set_fast_tracepoint_jump): Declare.
1512 (delete_fast_tracepoint_jump)
1513 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1514 (reinsert_fast_tracepoint_jumps_at): Declare.
1515 * regcache.c: Don't compile many functions when building the
1516 in-process agent library.
1517 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1518 the register buffer in the heap.
1519 (free_register_cache): If the register buffer isn't owned by the
1520 regcache, don't free it.
1521 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1522 pre-existing register caches.
1523 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1525 (convert_ascii_to_int): : Constify `from' parameter type.
1526 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1527 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1528 the needed buffer in-place.
1529 (relocate_instruction): New.
1530 * server.c (handle_query) <qSymbols>: If the target supports
1531 tracepoints, give it a chance of looking up symbols. Report
1532 support for fast tracepoints.
1533 (handle_status): Stabilize threads.
1534 (process_serial_event): Adjust.
1535 * server.h (struct fast_tracepoint_jump): Forward declare.
1536 (struct process_info) <fast_tracepoint_jumps>: New field.
1537 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1538 (decode_X_packet, decode_M_packet): Adjust.
1539 (relocate_instruction): Declare.
1540 (in_process_agent_loaded): Declare.
1541 (tracepoint_look_up_symbols): Declare.
1542 (struct fast_tpoint_collect_status): Declare.
1543 (fast_tracepoint_collecting): Declare.
1544 (force_unlock_trace_buffer): Declare.
1545 (handle_tracepoint_bkpts): Declare.
1546 (initialize_low_tracepoint)
1547 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1548 * target.h (struct target_ops) <stabilize_threads,
1549 install_fast_tracepoint_jump_pad>: New fields.
1550 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1551 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1552 [HAVE_STDINT_H]: Include stdint.h.
1553 (trace_debug_1): Rename to ...
1554 (trace_vdebug): ... this.
1555 (trace_debug): Rename to ...
1556 (trace_debug_1): ... this. Add `level' parameter.
1558 (ATTR_USED, ATTR_NOINLINE): New.
1559 (IP_AGENT_EXPORT): New.
1560 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1561 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1562 (about_to_request_buffer_space, trace_buffer_is_full)
1563 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1564 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1565 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1566 (traceframe_write_count, traceframes_created)
1567 (trace_state_variables)
1568 New renaming defines.
1569 (struct ipa_sym_addresses): New.
1570 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1572 (ipa_sym_addrs): New.
1573 (all_tracepoint_symbols_looked_up): New.
1574 (in_process_agent_loaded): New.
1575 (write_e_ipa_not_loaded): New.
1576 (maybe_write_ipa_not_loaded): New.
1577 (tracepoint_look_up_symbols): New.
1578 (debug_threads) [IN_PROCESS_AGENT]: New.
1579 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1580 (UNKNOWN_SIDE_EFFECTS): New.
1581 (stop_tracing): New.
1582 (flush_trace_buffer): New.
1583 (stop_tracing_bkpt): New.
1584 (flush_trace_buffer_bkpt): New.
1585 (read_inferior_integer): New.
1586 (read_inferior_uinteger): New.
1587 (read_inferior_data_pointer): New.
1588 (write_inferior_data_pointer): New.
1589 (write_inferior_integer): New.
1590 (write_inferior_uinteger): New.
1591 (struct collect_static_trace_data_action): Delete.
1592 (enum tracepoint_type): New.
1593 (struct tracepoint) <type>: New field `type'.
1594 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1595 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1596 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1597 (tracepoints): Use IP_AGENT_EXPORT.
1598 (last_tracepoint): Don't include in the IPA.
1599 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1600 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1601 (alloced_trace_state_variables): New.
1602 (trace_state_variables): Use IP_AGENT_EXPORT.
1603 (traceframe_t): Delete unused variable.
1604 (circular_trace_buffer): Don't include in the IPA.
1605 (trace_buffer_start): Delete.
1606 (struct trace_buffer_control): New.
1607 (trace_buffer_free): Delete.
1608 (struct ipa_trace_buffer_control): New.
1609 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1610 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1612 (trace_buffer_ctrl): New.
1613 (TRACE_BUFFER_CTRL_CURR): New.
1614 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1615 Reimplement as macros.
1616 (trace_buffer_wrap): Delete.
1617 (traceframe_write_count, traceframe_read_count)
1618 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1619 (struct tracepoint_hit_ctx) <type>: New field.
1620 (struct fast_tracepoint_ctx): New.
1621 (memory_barrier): New.
1623 (record_tracepoint_error): Update atomically in the IPA.
1624 (clear_inferior_trace_buffer): New.
1625 (about_to_request_buffer_space): New.
1626 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1627 updating the same buffer.
1628 (add_tracepoint): Default the tracepoint's type to trap
1629 tracepoint, and orig_size to -1.
1630 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1632 (create_trace_state_variable): New parameter `gdb'. Handle it.
1633 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1634 (cmd_qtdp): Handle fast tracepoints.
1636 (max_jump_pad_size): New.
1637 (gdb_jump_pad_head): New.
1638 (get_jump_space_head): New.
1639 (claim_jump_space): New.
1640 (sort_tracepoints): New.
1641 (MAX_JUMP_SIZE): New.
1642 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1644 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1645 support. Upload fast traceframes, and delete internal IPA
1647 (stop_tracing_handler): New.
1648 (flush_trace_buffer_handler): New.
1649 (cmd_qtstop): Upload fast tracepoints.
1650 (response_tracepoint): Handle fast tracepoints.
1651 (tracepoint_finished_step): Upload fast traceframes. Set the
1652 tracepoint hit context's tracepoint type.
1653 (handle_tracepoint_bkpts): New.
1654 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1655 type. Add comment about fast tracepoints.
1656 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1657 non-existing action_str field.
1658 (get_context_regcache): Handle fast tracepoints.
1659 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1661 (fast_tracepoint_from_jump_pad_address): New.
1662 (fast_tracepoint_from_ipa_tpoint_address): New.
1663 (collecting_t): New.
1664 (force_unlock_trace_buffer): New.
1665 (fast_tracepoint_collecting): New.
1668 (write_inferior_data_ptr): New.
1669 (target_tp_heap): New.
1670 (target_malloc): New.
1671 (download_agent_expr): New.
1673 (download_tracepoints): New.
1674 (download_trace_state_variables): New.
1675 (upload_fast_traceframes): New.
1676 (IPA_FIRST_TRACEFRAME): New.
1677 (IPA_NEXT_TRACEFRAME_1): New.
1678 (IPA_NEXT_TRACEFRAME): New.
1679 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1680 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1681 (gdb_jump_pad_buffer_end): New.
1682 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1683 (initialize_tracepoint): Adjust.
1684 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1685 buffer. Initialize the low module.
1686 * utils.c (PREFIX, TOOLNAME): New.
1687 (malloc_failure): Use PREFIX.
1688 (error): In the IPA, an error causes an exit.
1689 (fatal, warning): Use PREFIX.
1690 (internal_error): Use TOOLNAME.
1691 (NUMCELLS): Increase to 10.
1692 * configure, config.in: Regenerate.
1694 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1696 * server.c (handle_query) <qSupported>: Do two passes over the
1697 qSupported string to avoid nesting strtok.
1699 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1701 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1703 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1705 * configure: Regenerate.
1706 * proc-service.list: New.
1708 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1710 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1713 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1715 * gdbreplay.c (remote_open): Check error return from socket() call by
1716 its equality to -1 not by it being negative.
1717 * remote-utils.c (remote_open): Likewise.
1719 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1721 * config.h: Regenerate.
1723 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1725 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1726 doesn't provide PTRACE_GET_THREAD_AREA.
1728 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1730 * linux-m68k-low.c: Include <asm/ptrace.h>
1731 (ps_get_thread_area): Implement.
1733 2010-05-03 Doug Evans <dje@google.com>
1735 * event-loop.c (struct callback_event): New struct.
1736 (callback_list): New global.
1737 (append_callback_event, delete_callback_event): New functions.
1738 (process_callback): New function.
1739 (start_event_loop): Call it.
1740 * remote-utils.c (NOT_SCHEDULED): Define.
1741 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1742 moved out of readchar.
1743 (readchar): Rewrite. Call reschedule before returning.
1744 (reset_readchar): New function.
1745 (remote_close): Call it.
1746 (process_remaining, reschedule): New functions.
1747 * server.h (callback_handler_func): New typedef.
1748 (append_callback_event, delete_callback_event): Declare.
1750 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1752 * proc-service.c (ps_pglobal_lookup): Use
1753 thread_db_look_up_one_symbol.
1754 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1755 parameter. Use it instead of all_symbols_looked_up.
1756 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1758 (all_symbols_looked_up): Don't declare.
1759 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1760 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1762 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1763 Set all_symbols_looked_up here.
1764 (thread_db_look_up_one_symbol): New.
1765 (thread_db_get_tls_address): Adjust.
1766 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1767 thread_db object on the heap, and tentatively set it in the
1769 (thread_db_init): Don't set all_symbols_looked_up here.
1770 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1772 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1774 * linux-low.c (linux_kill, linux_detach): Adjust.
1775 (status_pending_p_callback): Remove redundant statement. Check
1776 for !TARGET_WAITIKIND_IGNORE, instead of
1777 TARGET_WAITKIND_STOPPED.
1778 (handle_tracepoints): Make sure LWP is locked. Adjust.
1779 (linux_wait_for_event_1): Adjust.
1780 (linux_cancel_breakpoints): New.
1781 (unsuspend_one_lwp): New.
1782 (unsuspend_all_lwps): New.
1783 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1784 (send_sigstop_callback): Change return type to int, add new
1785 `except' parameter and handle it.
1786 (suspend_and_send_sigstop_callback): New.
1787 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1788 pass them down. If SUSPEND, also increment the lwp's suspend
1790 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1791 (need_step_over_p): Don't consider suspended LWPs.
1792 (start_step_over): Adjust.
1793 (proceed_one_lwp): Change return type to int, add new `except'
1794 parameter and handle it.
1795 (unsuspend_and_proceed_one_lwp): New.
1796 (proceed_all_lwps): Use find_inferior instead of
1798 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1799 also decrement the suspend count of LWPs. Pass `except' down,
1800 instead of hacking its suspend count.
1801 (linux_pause_all): Add `freeze' parameter. Adjust.
1802 (linux_unpause_all): New.
1803 (linux_target_ops): Install linux_unpause_all.
1804 * server.c (handle_status): Adjust.
1805 * target.h (struct target_ops): New fields `unpause_all' and
1806 `cancel_breakpoints'. Add new parameter to `pause_all'.
1807 (pause_all): Add new `freeze' parameter.
1809 (cancel_breakpoints): New.
1810 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1812 (cmd_qtstart): Pause threads.
1813 (stop_tracing): Pause threads, and cancel breakpoints.
1814 * win32-low.c (win32_target_ops): Adjust.
1816 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1818 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1819 the inferior right away from here...
1820 (linux_wait_1): ... to here, and adjust to check the thread's
1821 last_resume_kind instead of the lwp's step or stop_expected flags.
1823 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1825 * README: Use consistent `GDB' and `GDBserver' spellings.
1827 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1829 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1830 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1831 (linux_detach_one_lwp): Assume the lwp is stopped.
1832 (any_thread_of): Delete.
1833 (linux_detach): Stop all lwps here. Don't blindly delete all
1835 (delete_lwp_callback): New.
1836 (linux_mourn): Delete all lwps of the process that is gone.
1837 (linux_wait_1): Don't delete the last lwp of the process here.
1838 * mem-break.h (mark_breakpoints_out): Declare.
1839 * mem-break.c (mark_breakpoints_out): New.
1840 (free_all_breakpoints): Use it.
1841 * server.c (handle_target_event): If the process is gone, mark
1843 * thread-db.c (struct thread_db) <create_bp>: New field.
1844 (thread_db_enable_reporting): Fix prototype. Store a thread event
1845 breakpoint reference in the thread_db struct.
1846 (thread_db_load_search): Clear the thread_db object.
1847 (try_thread_db_load_1): Ditto.
1848 (switch_to_process): New.
1849 (disable_thread_event_reporting): Use it.
1850 (remove_thread_event_breakpoints): New.
1851 (thread_db_detach, thread_db_mourn): Use it.
1853 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1855 * linux-low.c (linux_enable_event_reporting): New.
1856 (linux_wait_for_event_1, handle_extended_wait): Use it.
1858 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1860 * linux-low.c (linux_kill_one_lwp, linux_kill)
1861 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1862 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1863 SIGSTOP even if the LWP is stopped.
1864 (send_sigstop_callback): New.
1865 (stop_all_lwps): Use send_sigstop_callback instead.
1866 (linux_resume_one_thread): Adjust.
1867 (proceed_one_lwp): Still proceed an LWP that the client has
1868 requested to stop, if we haven't reported it as stopped yet. Make
1869 sure that LWPs the client want stopped, have a pending SIGSTOP.
1871 2010-04-26 Doug Evans <dje@google.com>
1873 * server.c (handle_general_set): Make static.
1875 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1876 Print received char after testing for error/eof instead of before.
1877 (input_interrupt): Tweak comment.
1879 2010-04-23 Doug Evans <dje@google.com>
1881 * server.c (start_inferior): Print inferior argv if --debug.
1883 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1885 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1886 * nto-x86-low.c: Include server.h
1888 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1890 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1891 be consistent with other sources of this directory.
1892 (init_registers_amd64): Correct name of source file of this function
1895 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1897 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1900 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1902 * win32-i386-low.c: Add 64-bit support.
1903 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1904 (init_registers_amd64): Declare.
1905 (mappings): Add 64-bit version of array.
1906 (init_windows_x86): New function.
1907 (the_low_target): Change init_arch field to init_windows_x86.
1909 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1911 * win32-low.c: Adapt to support also 64-bit architecture.
1912 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1913 (get_image_name): Use SIZE_T type for local variable `done'.
1914 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1915 (toolhelp_get_dll_name): Idem.
1916 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1917 Use uintptr_t typecast to avoid warning.
1918 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1919 (handle_exception): Use phex_nz to avoid warning.
1920 (win32_wait): Remove unused local variable `process'.
1922 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1924 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1927 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1929 * configure.ac: Use `ws2_32' library for srv_mingw.
1930 * configure: Regenerate.
1931 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1932 * remote-utils.c: Likewise.
1934 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1936 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1937 if __x86_64__ is defined.
1939 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1941 * configure: Regenerate.
1943 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1945 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1946 * target.h (target_ops): New get_tib_address field.
1947 * win32-low.h (win32_thread_info): Add thread_local_base field.
1948 * win32-low.c (child_add_thread): Add tlb argument.
1949 Set thread_local_base field to TLB.
1950 (get_child_debug_event): Adapt to child_add_thread change.
1951 (win32_get_tib_address): New function.
1952 (win32_target_ops): Set get_tib_address field to
1953 win32_get_tib_address.
1954 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1956 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1958 * linux-low.c (linux_mourn): Also remove the process.
1959 * server.c (handle_target_event): Don't remove the process here.
1960 * nto-low.c (nto_mourn): New.
1961 (nto_target_ops): Install it.
1962 * spu-low.c (spu_mourn): New.
1963 (spu_target_ops): Install it.
1964 * win32-low.c (win32_mourn): New.
1965 (win32_target_ops): Install it.
1967 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1969 * server.h (buffer_xml_printf): Remove redundant `;'.
1971 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1973 * regcache.c (set_register_cache): Invalidate regcaches before
1974 changing the register cache layout.
1975 (regcache_invalidate_one): Allow a NULL regcache.
1976 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1977 regcaches before changing the register cache layout or the target
1980 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1982 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1983 variable warning on Linux/x86-64.
1985 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1987 GDBserver disconnected tracing support.
1989 * linux-low.c (linux_remove_process): Delete.
1990 (add_lwp): Don't set last_resume_kind here.
1991 (linux_kill): Use `mourn'.
1992 (linux_detach): Use `thread_db_detach', and `mourn'.
1994 (linux_attach_lwp_1): Adjust comment.
1995 (linux_attach): last_resume_kind moved the thread_info; adjust.
1996 (status_pending_p_callback): Adjust.
1997 (linux_wait_for_event_1): Adjust.
1998 (count_events_callback, select_singlestep_lwp_callback)
1999 (select_event_lwp_callback, cancel_breakpoints_callback)
2000 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2001 (proceed_one_lwp): Adjust.
2002 (linux_async): Add debug output.
2003 (linux_thread_stopped): New.
2004 (linux_pause_all): New.
2005 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2007 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2008 (thread_db_free): Delete declaration.
2009 (thread_db_detach, thread_db_mourn): Declare.
2010 * thread-db.c (thread_db_init): Use thread_db_mourn.
2011 (thread_db_free): Delete, split in two.
2012 (disable_thread_event_reporting): New.
2013 (thread_db_detach): New.
2014 (thread_db_mourn): New.
2016 * server.h (struct thread_info) <last_resume_kind>: New field.
2017 <attached>: Add comment.
2018 <gdb_detached>: New field.
2019 (handler_func): Change return type to int.
2020 (handle_serial_event, handle_target_event): Ditto.
2021 (gdb_connected): Declare.
2023 (disconnected_tracing): Declare.
2024 (stop_tracing): Declare.
2026 * server.c (handle_query) <qSupported>: Report support for
2027 disconnected tracing.
2028 (queue_stop_reply_callback): Account for running threads.
2029 (gdb_wants_thread_stopped): New.
2030 (gdb_wants_all_threads_stopped): New.
2031 (gdb_reattached_process): New.
2032 (handle_status): Clear the `gdb_detached' flag of all processes.
2033 In all-stop, stop all threads.
2034 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2035 (process_serial_event): If the remote connection breaks, or if an
2036 exit was forced with "monitor exit", force an event loop exit.
2037 Handle disconnected tracing on detach.
2038 (handle_serial_event): Adjust.
2039 (handle_target_event): If GDB isn't connected, forward events back
2040 to the inferior, unless the last process exited, in which case,
2041 exit gdbserver. Adjust interface.
2043 * remote-utils.c (remote_open): Don't block in accept. Instead
2044 register an event loop source on the listen socket file
2045 descriptor. Refactor bits into ...
2046 (listen_desc): ... this new global.
2047 (gdb_connected): ... this new function.
2048 (enable_async_notification): ... this new function.
2049 (handle_accept_event): ... this new function.
2050 (remote_close): Clear remote_desc.
2052 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2054 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2056 (mourn_inferior): Define.
2057 (target_process_qsupported): Avoid the dangling else problem.
2058 (thread_stopped): Define.
2059 (pause_all): Define.
2060 (target_waitstatus_to_string): Declare.
2061 * target.c (target_waitstatus_to_string): New.
2063 * tracepoint.c (tracing): Make extern.
2064 (disconnected_tracing): New.
2065 (stop_tracing): Make extern. Handle tracing stops due to GDB
2067 (cmd_qtdisconnected): New.
2068 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2069 (handle_tracepoint_general_set): Handle QTDisconnected.
2071 * event-loop.c (event_handler_func): Change return type to int.
2072 (process_event): Bail out if the event handler wants the event
2074 (handle_file_event): Ditto.
2075 (start_event_loop): Bail out if the event handler wants the event
2078 * nto-low.c (nto_target_ops): Adjust.
2079 * spu-low.c (spu_wait): Don't remove the process here.
2080 (spu_target_ops): Adjust.
2081 * win32-low.c (win32_wait): Don't remove the process here.
2082 (win32_target_ops): Adjust.
2084 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2086 * regcache.c (realloc_register_cache): Invalidate inferior's
2087 regcache before recreating it.
2089 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2091 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2093 2010-04-09 Stan Shebs <stan@codesourcery.com>
2094 Pedro Alves <pedro@codesourcery.com>
2096 * server.h (LONGEST): New.
2097 (struct thread_info) <while_stepping>: New field.
2098 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2100 (initialize_tracepoint, handle_tracepoint_general_set)
2101 (handle_tracepoint_query, tracepoint_finished_step)
2102 (tracepoint_was_hit, release_while_stepping_state_list):
2103 (current_traceframe): Declare.
2104 * server.c (handle_general_set): Handle tracepoint packets.
2106 (write_memory): New.
2107 (handle_search_memory_1): Use read_memory.
2108 (handle_query): Report support for conditional tracepoints, trace
2109 state variables, and tracepoint sources. Handle tracepoint
2111 (main): Initialize the tracepoints module.
2112 (process_serial_event): Handle traceframe reads/writes.
2114 * linux-low.c (handle_tracepoints): New.
2115 (linux_wait_1): Call it.
2116 (linux_resume_one_lwp): Handle while-stepping.
2117 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2118 (linux_target_ops): Install them.
2119 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2121 * linux-x86-low.c (x86_supports_tracepoints): New.
2122 (the_low_target). Install it.
2124 * mem-break.h (delete_breakpoint): Declare.
2125 * mem-break.c (delete_breakpoint): Make external.
2127 * target.h (struct target_ops): Add `supports_tracepoints',
2128 `read_pc', and `write_pc' fields.
2129 (target_supports_tracepoints): Define.
2130 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2133 * regcache.h (struct regcache) <registers_owned>: New field.
2134 (init_register_cache, regcache_cpy): Declare.
2135 (regcache_read_pc, regcache_write_pc): Declare.
2136 (register_cache_size): Declare.
2137 (supply_regblock): Declare.
2138 * regcache.c (init_register_cache): New.
2139 (new_register_cache): Use it.
2140 (regcache_cpy): New.
2141 (register_cache_size): New.
2142 (supply_regblock): New.
2143 (regcache_read_pc, regcache_write_pc): New.
2145 * tracepoint.c: New.
2147 * Makefile.in (OBS): Add tracepoint.o.
2148 (tracepoint.o): New rule.
2150 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2152 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2154 (i386-mmx.c): Likewise.
2155 (i386-mmx-linux.o): Likewise.
2156 (i386-mmx-linux.c): Likewise.
2158 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2159 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2160 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2161 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2163 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2164 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2165 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2167 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2169 * Makefile.in (clean): Updated.
2171 (i386-avx.c): Likewise.
2172 (i386-avx-linux.o): Likewise.
2173 (i386-avx-linux.c): Likewise.
2174 (amd64-avx.o): Likewise.
2175 (amd64-avx.c): Likewise.
2176 (amd64-avx-linux.o): Likewise.
2177 (amd64-avx-linux.c): Likewise.
2179 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2180 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2181 (srv_amd64_regobj): Add amd64-avx.o.
2182 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2183 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2184 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2185 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2186 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2187 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2188 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2190 * i387-fp.c: Include "i386-xstate.h".
2192 (i387_cache_to_xsave): Likewise.
2193 (i387_xsave_to_cache): Likewise.
2194 (x86_xcr0): Likewise.
2196 * i387-fp.h (i387_cache_to_xsave): Likewise.
2197 (i387_xsave_to_cache): Likewise.
2198 (x86_xcr0): Likewise.
2200 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2201 * linux-crisv32-low.c (target_regsets): Likewise.
2202 * linux-m68k-low.c (target_regsets): Likewise.
2203 * linux-mips-low.c (target_regsets): Likewise.
2204 * linux-ppc-low.c (target_regsets): Likewise.
2205 * linux-s390-low.c (target_regsets): Likewise.
2206 * linux-sh-low.c (target_regsets): Likewise.
2207 * linux-sparc-low.c (target_regsets): Likewise.
2208 * linux-xtensa-low.c (target_regsets): Likewise.
2210 * linux-low.c: Include <sys/uio.h>.
2211 (regsets_fetch_inferior_registers): Support nt_type.
2212 (regsets_store_inferior_registers): Likewise.
2213 (linux_process_qsupported): New.
2214 (linux_target_ops): Add linux_process_qsupported.
2216 * linux-low.h (regset_info): Add nt_type.
2217 (linux_target_ops): Add process_qsupported.
2219 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2221 (init_registers_i386_avx_linux): New.
2222 (init_registers_amd64_avx_linux): Likewise.
2223 (xmltarget_i386_linux_no_xml): Likewise.
2224 (xmltarget_amd64_linux_no_xml): Likewise.
2225 (PTRACE_GETREGSET): Likewise.
2226 (PTRACE_SETREGSET): Likewise.
2227 (x86_fill_xstateregset): Likewise.
2228 (x86_store_xstateregset): Likewise.
2229 (use_xml): Likewise.
2230 (x86_linux_update_xmltarget): Likewise.
2231 (x86_linux_process_qsupported): Likewise.
2232 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2233 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2234 init_registers_i386_linux here. Call
2235 x86_linux_update_xmltarget.
2236 (the_low_target): Add x86_linux_process_qsupported.
2238 * server.c (handle_query): Call target_process_qsupported.
2240 * target.h (target_ops): Add process_qsupported.
2241 (target_process_qsupported): New.
2243 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2245 * inferiors.c (add_thread): Set last_status kind to
2246 TARGET_WAITKIND_IGNORE.
2247 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2248 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2249 (linux_wait_1): Move `thread' local definition to block that uses
2250 it. Don't NULL initialize `event_child'.
2251 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2252 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2253 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2255 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2257 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2258 an extended waitstatus, or by a watchpoint.
2259 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2260 thread was stepping or has been stopped by a watchpoint.
2262 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2264 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2265 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2266 of another, then delete the previous, and validate all
2268 (validate_inserted_breakpoint): New.
2269 (delete_disabled_breakpoints): New.
2270 (validate_breakpoints): New.
2271 (check_mem_read): Validate breakpoints before trusting their
2272 shadow. Delete disabled breakpoints.
2273 (check_mem_write): Validate breakpoints before trusting they
2274 should be inserted. Delete disabled breakpoints.
2275 * mem-break.h (validate_breakpoints):
2276 * server.c (handle_query): Validate breakpoints when we see a
2279 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2281 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2282 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2283 if we could tell there's a GDB breakpoint at stop_pc.
2284 (need_step_over_p): Don't do a step over if we find a GDB
2285 breakpoint at the resume PC.
2287 * mem-break.c (struct raw_breakpoint): New.
2288 (enum bkpt_type): New type `gdb_breakpoint'.
2289 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2290 fields. New field `raw'.
2291 (find_raw_breakpoint_at): New.
2292 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2294 (set_breakpoint_at): Adjust.
2295 (delete_raw_breakpoint): New.
2296 (release_breakpoint): New.
2297 (delete_breakpoint): Rename to...
2298 (delete_breakpoint_1): ... this. Add proc parameter. Use
2299 release_breakpoint. Return ENOENT.
2300 (delete_breakpoint): Reimplement.
2301 (find_breakpoint_at): Delete.
2302 (find_gdb_breakpoint_at): New.
2303 (delete_breakpoint_at): Delete.
2304 (set_gdb_breakpoint_at): New.
2305 (delete_gdb_breakpoint_at): New.
2306 (gdb_breakpoint_here): New.
2307 (set_reinsert_breakpoint): Use release_breakpoint.
2308 (uninsert_breakpoint): Rename to ...
2309 (uninsert_raw_breakpoint): ... this.
2310 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2311 (reinsert_raw_breakpoint): Change parameter type to
2313 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2315 (check_breakpoints): Adjust. Use release_breakpoint.
2316 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2317 (breakpoint_inserted_here): Ditto.
2318 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2319 Don't trust the breakpoint's shadow if it is not inserted.
2320 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2321 (delete_all_breakpoints): Adjust.
2322 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2323 use delete_breakpoint_1.
2325 * mem-break.h (breakpoints_supported): Delete declaration.
2326 (set_gdb_breakpoint_at): Declare.
2327 (gdb_breakpoint_here): Declare.
2328 (delete_breakpoint_at): Delete.
2329 (delete_gdb_breakpoint_at): Declare.
2331 * server.h (struct raw_breakpoint): Forward declare.
2332 (struct process_info): New field `raw_breakpoints'.
2334 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2337 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2339 * linux-low.c (status_pending_p_callback): Fix comment.
2340 (linux_wait_for_event_1): Move most of the internal breakpoint
2341 handling from here...
2342 (linux_wait_1): ... to here.
2343 (count_events_callback): New.
2344 (select_singlestep_lwp_callback): New.
2345 (select_event_lwp_callback): New.
2346 (cancel_breakpoints_callback): New.
2347 (select_event_lwp): New.
2348 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2349 priority to all LWPs that have had events that should be reported
2350 to the client. Cancel breakpoints when about to reporting the
2351 event to the client, not while stopping lwps. No longer cancel
2352 finished single-steps here.
2353 (cancel_finished_single_step): Delete.
2354 (cancel_finished_single_steps): Delete.
2356 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2358 * mem-break.c (enum bkpt_type): New.
2359 (struct breakpoint): New field `type'.
2360 (set_breakpoint_at): Change return type to struct breakpoint
2361 pointer. Set type to `other_breakpoint' by default.
2362 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2363 in the breakpoint list.
2364 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2365 (reinsert_breakpoint): Rename to ...
2366 (reinsert_raw_breakpoint): ... this.
2367 (reinsert_breakpoints_at): Adjust.
2368 * mem-break.h (struct breakpoint): Declare.
2369 (set_breakpoint_at): Change return type to struct breakpoint
2372 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2374 * server.c (handle_query): Assign, not compare.
2376 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2378 Teach linux gdbserver to step-over-breakpoints.
2380 * linux-low.c (can_hardware_single_step): New.
2381 (supports_breakpoints): New.
2382 (handle_extended_wait): If stopping threads, read the stop pc of
2385 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2386 low target doesn't support retrieving the PC.
2387 (add_lwp): Set last_resume_kind to resume_continue.
2388 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2389 (linux_attach): Don't clear stop_expected. Set the lwp's
2390 last_resume_kind to resume_stop.
2391 (linux_detach_one_lwp): Don't check for removed breakpoints.
2392 (check_removed_breakpoint): Delete.
2393 (status_pending_p): Rename to ...
2394 (status_pending_p_callback): ... this. Don't check for removed
2395 breakpoints. Don't consider threads that are stopped from GDB's
2397 (linux_wait_for_lwp): Always read the stop_pc here.
2398 (cancel_breakpoint): New.
2399 (step_over_bkpt): New global.
2400 (linux_wait_for_event_1): Implement stepping over breakpoints.
2401 (gdb_wants_lwp_stopped): New.
2402 (gdb_wants_all_stopped): New.
2403 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2404 single-step traps here. Store the thread's last reported target
2406 (send_sigstop): Don't clear stop_expected. Always set it,
2408 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2409 (cancel_finished_single_step): New.
2410 (cancel_finished_single_steps): New.
2411 (wait_for_sigstop): Don't cancel finished single-step traps here.
2412 (linux_resume_one_lwp): Don't check for removed breakpoints.
2413 Don't set `step' on non-hardware step archs.
2414 (linux_set_resume_request): Ignore resume_stop requests if already
2415 stopping or stopped. Set the lwp's last_resume_kind.
2416 (resume_status_pending_p): Don't check for removed breakpoints.
2417 (need_step_over_p): New.
2418 (start_step_over): New.
2419 (finish_step_over): New.
2420 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2421 requests. Clear the thread's last reported target waitstatus.
2422 Don't use the `suspended' flag. Don't consider pending breakpoints.
2423 (linux_resume): Start a step-over if necessary.
2424 (proceed_one_lwp): New.
2425 (proceed_all_lwps): New.
2426 (unstop_all_lwps): New.
2427 * linux-low.h (struct lwp_info): Rewrite comment for the
2428 `suspended' flag. Add the `stop_pc' field. Delete the
2429 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2430 Add `'last_resume_kind' and `need_step_over' fields.
2431 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2432 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2433 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2434 (set_raw_breakpoint_at): New.
2435 (set_breakpoint_at): Rewrite to use it.
2436 (reinsert_breakpoint_handler): Delete.
2437 (set_reinsert_breakpoint): New.
2438 (reinsert_breakpoint_by_bp): Delete.
2439 (delete_reinsert_breakpoints): New.
2440 (uninsert_breakpoint): Rewrite.
2441 (uninsert_breakpoints_at): New.
2442 (reinsert_breakpoint): Rewrite.
2443 (reinsert_breakpoints_at): New.
2444 (check_breakpoints): Rewrite.
2445 (breakpoint_here): New.
2446 (breakpoint_inserted_here): New.
2447 (check_mem_read): Adjust.
2448 * mem-break.h (breakpoints_supported, breakpoint_here)
2449 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2450 (reinsert_breakpoint_by_bp): Delete declaration.
2451 (delete_reinsert_breakpoints): Declare.
2452 (reinsert_breakpoint): Delete declaration.
2453 (reinsert_breakpoints_at): Declare.
2454 (uninsert_breakpoint): Delete declaration.
2455 (uninsert_breakpoints_at): Declare.
2456 (check_breakpoints): Adjust prototype.
2457 * server.h: Adjust include order.
2458 (struct thread_info): Declare here. Add a `last_status' field.
2460 2010-03-23 Michael Snyder <msnyder@vmware.com>
2462 * server.c (crc32): New function.
2463 (handle_query): Add handling for 'qCRC:' request.
2465 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2467 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2468 lwp had been stopped by a watchpoint.
2470 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2472 * server.h (internal_error): Declare.
2473 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2474 * utils.c (internal_error): New function.
2476 2010-03-15 Andreas Schwab <schwab@redhat.com>
2478 * configure.srv: Fix typo setting srv_regobj.
2480 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2482 * linux-low.c (fetch_register): Avoid passing a non string literal
2484 (usr_store_inferior_registers): Ditto.
2486 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2488 * linux-low.c (linux_write_memory): Bail out early if peeking
2491 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2493 * linux-low.h (struct lwp_info): New fields
2494 `stopped_by_watchpoint' and `stopped_data_address'.
2495 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2496 here, and cache them in the lwp object.
2497 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2499 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2501 (linux_stopped_by_watchpoint): Rewrite.
2502 (linux_stopped_data_address): Rewrite.
2504 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2506 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2507 switching the current inferior, not before.
2509 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2511 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2512 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2513 i386-linux.c and amd64-linux.c.
2514 (reg-i386.o): Removed.
2515 (reg-i386.c): Likewise.
2516 (reg-i386-linux.o): Likewise.
2517 (reg-i386-linux.c): Likewise.
2518 (reg-x86-64.o): Likewise.
2519 (reg-x86-64.c): Likewise.
2520 (reg-x86-64-linux.o): Likewise.
2521 (reg-x86-64-linux.c): Likewise.
2524 (i386-linux.o): Likewise.
2525 (i386-linux.c): Likewise.
2526 (amd64.o): Likewise.
2527 (amd64.c): Likewise.
2528 (amd64-linux.o): Likewise.
2529 (amd64-linux.c): Likewise.
2531 * configure.srv (srv_i386_regobj): New.
2532 (srv_i386_linux_regobj): Likewise.
2533 (srv_amd64_regobj): Likewise.
2534 (srv_amd64_linux_regobj): Likewise.
2535 (srv_i386_32bit_xmlfiles): Likewise.
2536 (srv_i386_64bit_xmlfiles): Likewise.
2537 (srv_i386_xmlfiles): Likewise.
2538 (srv_amd64_xmlfiles): Likewise.
2539 (srv_i386_linux_xmlfiles): Likewise.
2540 (srv_amd64_linux_xmlfiles): Likewise.
2541 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2542 srv_xmlfiles to $srv_i386_xmlfiles.
2543 (i[34567]86-*-mingw32ce*): Likewise.
2544 (i[34567]86-*-mingw*): Likewise.
2545 (i[34567]86-*-nto*): Likewise.
2546 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2547 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2548 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2549 (x86_64-*-linux*): Likewise.
2551 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2552 (init_registers_amd64_linux): New.
2553 (x86_arch_setup): Replace init_registers_x86_64_linux with
2554 init_registers_amd64_linux.
2556 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2558 * configure.ac: Check for libdl. If it is not available link against
2559 static libthread_db.
2560 * configure: Regenerate.
2562 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2566 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2567 handing a read watchpoint.
2568 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2570 2010-02-12 Doug Evans <dje@google.com>
2572 * linux-low.c (linux_supports_tracefork_flag): Document.
2573 (linux_look_up_symbols): Add comment.
2575 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2577 * regcache.c (supply_register): Clear regcache if buf is NULL.
2579 2010-02-02 Nicolas Roche <roche@sourceware.org>
2580 Joel Brobecker <brobecker@adacore.com>
2582 * inferiors.c (find_inferior): Add function documentation.
2583 (unloaded_dll): Handle the case where the unloaded dll has not
2584 been previously registered in the dll list.
2586 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2588 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2589 (thumb2_breakpoint): New.
2590 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2592 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2594 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2595 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2598 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2600 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2602 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2604 * linux-s390-low.c (s390_collect_ptrace_register)
2605 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2607 2010-01-21 Doug Evans <dje@google.com>
2609 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2610 (PTRACE_ARG4_TYPE): New macro.
2611 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2612 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2613 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2614 (usr_store_inferior_registers): Ditto.
2615 (linux_read_memory, linux_write_memory): Ditto.
2616 (linux_test_for_tracefork): Ditto.
2618 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2619 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2621 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2623 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2626 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2628 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2629 prototype to take a regcache. Adjust.
2631 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2633 * regcache.h (struct thread_info): Forward declare.
2634 (struct regcache): New.
2635 (new_register_cache): Adjust prototype.
2636 (get_thread_regcache): Declare.
2637 (free_register_cache): Adjust prototype.
2638 (registers_to_string, registers_from_string): Ditto.
2639 (supply_register, supply_register_by_name, collect_register)
2640 (collect_register_as_string, collect_register_by_name): Ditto.
2641 * regcache.c (struct inferior_regcache_data): Delete.
2642 (get_regcache): Rename to ...
2643 (get_thread_regcache): ... this. Adjust. Switch inferior before
2645 (regcache_invalidate_one): Adjust.
2646 (regcache_invalidate): Fix prototype.
2647 (new_register_cache): Return the new register cache.
2648 (free_register_cache): Change prototype.
2649 (realloc_register_cache): Adjust.
2650 (registers_to_string): Change prototype to take a regcache. Adjust.
2651 (registers_from_string): Ditto.
2652 (register_data): Ditto.
2653 (supply_register): Ditto.
2654 (supply_register_by_name): Ditto.
2655 (collect_register): Ditto.
2656 (collect_register_as_string): Ditto.
2657 (collect_register_by_name): Ditto.
2658 * server.c (process_serial_event): Adjust.
2659 * linux-low.h (regset_fill_func, regset_store_func): Change
2661 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2663 * linux-low.c (get_stop_pc): Adjust.
2664 (check_removed_breakpoint): Adjust.
2665 (linux_wait_for_event): Adjust.
2666 (linux_resume_one_lwp): Adjust.
2667 (fetch_register): Add regcache parameter. Adjust.
2668 (usr_store_inferior_registers): Ditto.
2669 (regsets_fetch_inferior_registers): Ditto.
2670 (regsets_store_inferior_registers): Ditto.
2671 (linux_fetch_registers, linux_store_registers): Ditto.
2672 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2674 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2675 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2676 prototype to take a regcache.
2677 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2678 * remote-utils.c (convert_ascii_to_int, outreg)
2679 (prepare_resume_reply): Change prototype to take a regcache.
2681 * target.h (struct target_ops) <fetch_registers, store_registers>:
2682 Change prototype to take a regcache.
2683 (fetch_inferior_registers, store_inferior_registers): Change
2684 prototype to take a regcache. Adjust.
2685 * proc-service.c (ps_lgetregs): Adjust.
2686 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2687 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2688 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2689 take a regcache. Adjust.
2690 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2691 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2692 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2693 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2694 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2695 (cris_cannot_fetch_register):
2696 (cris_breakpoint_at): Change prototype to take a regcache.
2698 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2699 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2700 to take a regcache. Adjust.
2701 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2703 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2704 take a regcache. Adjust.
2705 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2706 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2707 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2708 * linux-mips-low.c (mips_get_pc):
2709 (mips_set_pc): Change prototype to take a regcache. Adjust.
2710 (mips_reinsert_addr): Adjust.
2711 (mips_collect_register): Change prototype to take a regcache.
2713 (mips_supply_register):
2714 (mips_collect_register_32bit, mips_supply_register_32bit)
2715 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2716 (mips_store_fpregset): Ditto.
2717 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2719 (parse_spufs_run): Adjust.
2720 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2721 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2722 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2723 take a regcache. Adjust.
2724 * linux-s390-low.c (s390_collect_ptrace_register)
2725 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2726 (s390_set_pc): Change prototype to take a regcache. Adjust.
2727 (s390_arch_setup): Adjust.
2728 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2729 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2730 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2731 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2732 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2734 (sparc_breakpoint_at): Adjust.
2735 * linux-xtensa-low.c (xtensa_fill_gregset):
2736 (xtensa_store_gregset):
2737 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2738 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2739 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2740 prototype to take a regcache. Adjust.
2741 * win32-arm-low.c (arm_fetch_inferior_register)
2742 (arm_store_inferior_register): Change prototype to take a
2744 * win32-i386-low.c (i386_fetch_inferior_register)
2745 (i386_store_inferior_register): Change prototype to take a
2747 * win32-low.c (child_fetch_inferior_registers)
2748 (child_store_inferior_registers): Change prototype to take a
2750 (win32_wait): Adjust.
2751 (win32_fetch_inferior_registers): Change prototype to take a
2753 (win32_store_inferior_registers): Adjust.
2754 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2755 store_inferior_register>: Change prototype to take a regcache.
2757 2010-01-20 Doug Evans <dje@google.com>
2759 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2761 (linux_wait_for_event1, linux_init_signals): Ditto.
2762 (W_STOPCODE): Provide definition if missing.
2764 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2766 * linux-low.c (linux_core_of_thread): New.
2767 (compare_ints, show_process, list_threads): New.
2768 (linux_qxfer_osdata): Report threads and cores.
2769 (linux_target_op): Register linux_core_of_thread.
2770 * remote-utils.c (prepare_resume_reply): Report the core.
2771 (buffer_xml_printf): Support %d specifier.
2772 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2774 (handle_query): Handle qXfer:threads. Announce availability
2776 * target.h (struct target_ops): New field core_of_thread.
2778 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2780 * Makefile.in (clean): Remove new generated files.
2781 (reg-s390.o, reg-s390.c): Remove rules.
2782 (reg-s390x.o, reg-s390x.c): Likewise.
2783 (s390-linux32.o, s390-linux32.c): Add rules.
2784 (s390-linux64.o, s390-linux64.c): Likewise.
2785 (s390x-linux64.o, s390x-linux64.c): Likewise.
2786 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2787 * linux-s390-low.c: Include <elf.h>.
2788 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2789 (init_registers_s390): Remove prototype.
2790 (init_registers_s390x): Likewise.
2791 (init_registers_s390_linux32): Add prototype.
2792 (init_registers_s390_linux64): Likewise.
2793 (init_registers_s390x_linux64): Likewise.
2794 (s390_num_regs_3264): New define.
2795 (s390_regmap_3264): New global variable.
2796 (s390_cannot_fetch_register): Remove obsolete check.
2797 (s390_cannot_store_register): Likewise.
2798 (s390_collect_ptrace_register): Handle upper/lower register halves.
2799 (s390_supply_ptrace_register): Likewise.
2800 (s390_fill_gregset): Update to register number changes.
2801 (s390_get_hwcap): New routine.
2802 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2803 Install appropriate regmap and register set.
2805 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2807 * server.c (gdbserver_version): Update copyright year to 2010.
2808 * gdbreplay.c (gdbreplay_version): Likewise.
2810 2009-12-28 Doug Evans <dje@google.com>
2812 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2813 elf/external.h. Include <elf.h> instead but only if necessary.
2815 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2817 * linux-low.c (linux_remove_process): Remove `detaching'
2818 parameter. Don't release/detach from thread_db here.
2819 (linux_kill): Release/detach from thread_db here, ...
2820 (linux_detach): ... and here, before actually detaching.
2821 (linux_wait_1): ... and here, when a process exits.
2822 * thread-db.c (any_thread_of): New.
2823 (thread_db_free): Switch the current inferior to a thread of the
2826 2009-12-21 Doug Evans <dje@google.com>
2828 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2830 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2831 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2832 warning ifndef __NR_tkill. Move setting of errno there too.
2833 Delete unnecessary resetting of errno after syscall.
2834 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2836 * configure.ac: Check for dladdr.
2837 * config.in: Regenerate.
2838 * configure: Regenerate.
2839 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2840 (try_thread_db_load): Update.
2842 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2844 2009-12-18 Doug Evans <dje@google.com>
2846 * event-loop.c: Include unistd.h if it exists.
2848 * linux-low.c (my_waitpid): Move definition away from being in
2849 between linux_tracefork_child/linux_test_for_tracefork.
2851 * gdb_proc_service.h (psaddr_t): Fix type.
2852 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2853 signature to match glibc.
2855 2009-12-16 Doug Evans <dje@google.com>
2857 * linux-low.c (linux_read_memory): Fix argument to read.
2859 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2861 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2862 events, don't leave current_inferior pointing at null.
2864 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2866 * win32-low.c (LOG): Delete.
2867 (OUTMSG): Output to stderr.
2868 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2869 on compile time LOG macro.
2870 (win32_wait): Fix debug output.
2872 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2874 * win32-low.c (win32_add_one_solib): If the dll name is
2875 "ntdll.dll", prepend the system directory to the dll path.
2877 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2879 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2881 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2882 Vladimir Prus <vladimir@codesourcery.com>
2884 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2885 * configure.ac: Check for __mcoldfire__ and set
2886 gdb_cv_m68k_is_coldfire.
2887 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2888 reg-cf.o and reg-m68k.o.
2889 * configure: Regenerated.
2891 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2893 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2894 Pass it to thread_db_free.
2895 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2896 proper `detaching' argument to linux_remove_process.
2897 * linux-low.h (thread_db_free): Add `detaching' parameter.
2898 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2900 (thread_db_free): Add `detaching' parameter. Only
2901 call td_ta_clear_event if detaching from process.
2903 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2905 * thread-db.c (thread_db_free): Fix typo.
2907 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2910 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2912 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2914 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2915 with an i686 compiler.
2916 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2918 * configure: Rebuilt.
2920 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2924 * server.c (handle_search_memory_1): Correct read_addr initialization
2925 in loop for searching subsequent chunks.
2927 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2929 * configure.ac: New --with-libthread-db option.
2930 * thread-db.c: Allow direct dependence on libthread_db.
2931 (thread_db_free): Adjust.
2932 * config.in: Regenerate.
2933 * configure: Likewise.
2935 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2938 * thread-db.c (attach_thread): New function.
2939 (maybe_attach_thread): Return success/failure.
2940 (find_new_threads_callback): Adjust.
2941 (thread_db_find_new_threads): Loop until no new threads.
2943 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2945 * proc-service.c (ps_lgetregs): Formatting.
2947 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2949 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2950 * configure.ac: Adjust.
2951 * linux-low.h (struct process_info_private): Move members to struct
2953 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2954 * linux-low.c (linux_remove_process): Adjust.
2955 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2956 * server.c (handle_query): Move code ...
2957 (handle_monitor_command): ... here. New function.
2958 * target.h (struct target_ops): New member.
2959 * thread-db.c (struct thread_db): New.
2960 (libthread_db_search_path): New variable.
2961 (thread_db_create_event, thread_db_enable_reporting)
2962 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2963 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2964 (try_thread_db_load_1, dladdr_to_soname): New functions.
2965 (try_thread_db_load, thread_db_load_search): New functions.
2966 (thread_db_init): Search for libthread_db.
2967 (thread_db_free): New function.
2968 (thread_db_handle_monitor_command): Likewise.
2969 * config.in: Regenerate.
2970 * configure: Regenerate.
2972 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2974 * spu-low.c (spu_kill): Wait for inferior to terminate.
2975 Call clear_inferiors.
2976 (spu_detach): Call clear_inferiors.
2978 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2980 * aclocal.m4: Regenerate.
2981 * config.in: Likewise.
2982 * configure: Likewise.
2984 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2986 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2987 (parse_spufs_run): New function.
2988 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2989 (ppc_breakpoint_at): Handle SPU breakpoints.
2991 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2993 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2994 (SPUFS_MAGIC): Define.
2995 (spu_enumerate_spu_ids): New function.
2996 (linux_qxfer_spu): New function.
2997 (linux_target_ops): Install linux_qxfer_spu.
2999 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3001 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3002 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3003 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3004 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3005 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3006 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3007 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3008 (init_registers_powerpc_cell32l): Add prototype.
3009 (init_registers_powerpc_cell64l): Likewise.
3010 (ppc_arch_setup): Detect Cell/B.E. architecture.
3012 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3014 * Makefile.in (datarootdir): New variable.
3016 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3018 * linux-low.c (linux_write_memory): Update debugging output.
3019 * Makefile.in (clean): Add new descriptions.
3020 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3021 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3022 * configure.srv: Add new files for arm*-*-linux*.
3023 * linux-arm-low.c: Add new declarations.
3024 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3025 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3026 (HWCAP_VFPv3D16): New.
3027 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3028 instead of __IWMMXT__.
3029 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3030 (arm_arch_setup): New.
3031 (target_regsets): Remove #ifdef. Add VFP regset.
3032 (the_low_target): Use arm_arch_setup.
3034 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3036 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3037 the main thread again.
3039 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3041 Adding Neutrino gdbserver.
3042 * configure: Regenerated.
3043 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3044 * configure.srv (i[34567]86-*-nto*): New target.
3045 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3046 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3047 (nto_comctrl) [__QNX__]: New function.
3048 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3050 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3052 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3055 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3056 Pedro Alves <pedro@codesourcery.com>
3058 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3059 don't support CONTEXT_EXTENDED_REGISTERS.
3060 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3061 (the_low_target): Install them.
3062 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3063 failing with ERROR_PIPE_NOT_CONNECTED.
3065 2009-06-30 Doug Evans <dje@google.com>
3066 Pierre Muller <muller@ics.u-strasbg.fr>
3068 Add h/w watchpoint support to x86-linux, win32-i386.
3069 * Makefile.in (SFILES): Add i386-low.c
3070 (i386_low_h): Define.
3071 (i386-low.o): Add dependencies.
3072 (linux-x86-low.o): Add i386-low.h dependency.
3073 (win32-i386-low.o): Ditto.
3074 * i386-low.c: New file.
3075 * i386-low.h: New file.
3076 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3077 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3078 * linux-low.c (linux_add_process): Initialize arch_private.
3079 (linux_remove_process): Free arch_private.
3080 (add_lwp): Initialize arch_private.
3081 (delete_lwp): Free arch_private.
3082 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3084 * linux-low.h (process_info_private): New member arch_private.
3085 (lwp_info): New member arch_private.
3086 (linux_target_ops): New members new_process, new_thread,
3088 (ptid_of): New macro.
3089 * linux-x86-low.c: Include stddef.h, i386-low.h.
3090 (arch_process_info): New struct.
3091 (arch_lwp_info): New struct.
3092 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3093 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3094 (i386_dr_low_get_status): New function.
3095 (x86_insert_point, x86_remove_point): New functions.
3096 (x86_stopped_by_watchpoint): New function.
3097 (x86_stopped_data_address): New function.
3098 (x86_linux_new_process, x86_linux_new_thread): New functions.
3099 (x86_linux_prepare_to_resume): New function.
3100 (the_low_target): Add entries for insert_point, remove_point,
3101 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3103 * server.c (debug_hw_points): New global.
3104 (monitor_show_help): Document set debug-hw-points.
3105 (handle_query): Process "set debug-hw-points".
3106 * server.h (debug_hw_points): Declare.
3107 (paddress): Declare.
3108 * utils.c (NUMCELLS, CELLSIZE): New macros.
3109 (get_sell, xsnprintf, paddress): New functions.
3110 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3111 remove_point, stopped_by_watchpoint, stopped_data_address.
3112 * win32-i386-low.c: Include i386-low.h.
3113 (debug_reg_state): Replaces dr.
3114 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3115 (i386_dr_low_get_status): New function.
3116 (i386_insert_point, i386_remove_point): New functions.
3117 (i386_stopped_by_watchpoint): New function.
3118 (i386_stopped_data_address): New function.
3119 (i386_initial_stuff): Update.
3120 (get_thread_context,set_thread_context,i386_thread_added): Update.
3121 (the_low_target): Add entries for insert_point,
3122 remove_point, stopped_by_watchpoint, stopped_data_address.
3123 * win32-low.c (win32_insert_watchpoint): New function.
3124 (win32_remove_watchpoint): New function.
3125 (win32_stopped_by_watchpoint): New function.
3126 (win32_stopped_data_address): New function.
3127 (win32_target_ops): Add entries for insert_watchpoint,
3128 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3129 * win32-low.h (win32_target_ops): New members insert_point,
3130 remove_point, stopped_by_watchpoint, stopped_data_address.
3132 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3134 * server.c (process_serial_event): Re-return unsupported, not
3135 error, if the type isn't recognized. Re-allow supporting only
3136 insert or remove packets. Also call require_running for
3137 breakpoints. Add missing break statement to default case. Tidy.
3138 * target.h (struct target_ops): Rename insert_watchpoint to
3139 insert_point, and remove_watchpoint to remove_point.
3141 * linux-low.h (struct linux_target_ops): Likewise.
3142 * linux-low.c (linux_insert_watchpoint): Rename to ...
3143 (linux_insert_point): ... this. Adjust.
3144 (linux_remove_watchpoint): Rename to ...
3145 (linux_remove_point): ... this. Adjust.
3146 (linux_target_ops): Adjust.
3147 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3148 (cris_insert_point): ... this.
3149 (cris_remove_watchpoint): Rename to ...
3150 (cris_remove_point): ... this.
3151 (the_low_target): Adjust.
3153 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3155 * server.c (handle_v_kill): Pass signal_pid to
3156 kill_inferior if multi_process is zero.
3158 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3160 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3161 * target.h (target_ops): Comment for *_watchpoint to make it clear
3162 the functions can get types '0' and '1'.
3164 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3166 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3167 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3168 * regcache.c (get_regcache): Likewise.
3169 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3170 * win32-low.c (child_fetch_inferior_registers): Remove check for
3173 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3174 Pedro Alves <pedro@codesourcery.com>
3176 * target.h (struct target_ops) <supports_multi_process>: New
3178 (target_supports_multi_process): New.
3179 * server.c (handle_query): Even if GDB reports support, only
3180 enable multi-process if the target also supports it. Report
3181 multi-process support only if the target backend supports it.
3182 * linux-low.c (linux_supports_multi_process): New function.
3183 (linux_target_ops): Install it as target_supports_multi_process
3186 2009-05-24 Doug Evans <dje@google.com>
3188 Global renaming of find_thread_pid to find_thread_ptid.
3189 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3190 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3191 All callers updated.
3193 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3194 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3197 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3198 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3199 (linux_resume_one_lwp): Ditto.
3201 2009-05-23 Doug Evans <dje@google.com>
3203 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3204 from struct inferior_list_entry * to struct lwp_info *.
3205 All callers updated.
3207 2009-05-13 Doug Evans <dje@google.com>
3209 * linux-x86-low.c: Don't include assert.h.
3210 (x86_siginfo_fixup): Use fatal, not assert.
3211 (x86_arch_setup): Fix comment.
3213 2009-05-12 Doug Evans <dje@google.com>
3215 Biarch support for i386/amd64 gdbserver.
3216 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3217 Add linux-x86-low.c.
3218 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3219 (linux-x86-low.o): Add.
3220 * linux-x86-64-low.c: Delete.
3221 * linux-i386-low.c: Delete.
3222 * linux-x86-low.c: New file.
3223 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3225 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3227 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3228 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3229 (linux_child_pid_to_exec_file): New function.
3230 (elf_64_header_p, elf_64_file_p): New functions.
3231 (siginfo_fixup): New function.
3232 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3233 give target a chance to convert layout.
3234 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3235 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3237 2009-05-07 Doug Evans <dje@google.com>
3239 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3240 (regsets_store_inferior_registers): Ditto.
3242 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3246 * linux-low.c (must_set_ptrace_flags): Delete.
3247 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3249 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3250 `lwp->must_set_ptrace_flags' instead.
3251 (linux_wait_for_event_1): Set ptrace options here.
3252 (linux_wait_1): ... not here.
3254 2009-04-30 Doug Evans <dje@google.com>
3256 * inferiors.c (started_inferior_callback): New function.
3257 (attached_inferior_callback): New function.
3258 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3259 * server.c (print_started_pid, print_attached_pid): New functions.
3260 (detach_or_kill_for_exit): New function.
3261 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3262 * server.h (have_started_inferiors_p): Declare.
3263 (have_attached_inferiors_p): Declare.
3265 * inferiors.c (remove_process): Fix memory leak, free process.
3266 * linux-low.c (linux_remove_process): New function.
3267 (linux_kill): Call it instead of remove_process.
3268 (linux_detach, linux_wait_1): Ditto.
3270 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3272 * configure.srv: Add x86 Windows CE target.
3274 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3276 * inferiors.c (get_thread_process): Make global.
3277 * server.h (get_thread_process): Add prototype.
3278 * thread-db.c (find_one_thread): Use get_thread_process
3279 instead of current_process.
3280 (thread_db_get_tls_address): Do not crash if called when
3281 thread layer is not yet initialized.
3283 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3285 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3286 * spu-low.c (current_tid): Rename to ...
3287 (current_ptid): ... this.
3288 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3289 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3290 ptid_get_lwp (current_ptid) instead of current_tid.
3291 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3292 instead of current_tid. Use find_process_pid to verify pid
3293 argument is valid. Pass proper argument to remove_process.
3294 (spu_thread_alive): Compare current_ptid instead of current_tid.
3295 (spu_resume): Likewise.
3297 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3299 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3302 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3304 Implement the multiprocess extensions, and add linux multiprocess
3307 * server.h (ULONGEST): Declare.
3308 (struct ptid, ptid_t): New.
3309 (minus_one_ptid, null_ptid): Declare.
3310 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3311 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3312 (struct inferior_list_entry): Change `id' type from unsigned from
3314 (struct sym_cache, struct breakpoint, struct
3315 process_info_private): Forward declare.
3316 (struct process_info): Declare.
3317 (current_process): Declare.
3318 (all_processes): Declare.
3319 (initialize_inferiors): Declare.
3320 (add_thread): Adjust to use ptid_t.
3321 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3322 (add_process, remove_process, find_thread_pid): Declare.
3323 (find_inferior_id): Adjust to use ptid_t.
3324 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3325 (multi_process): Declare.
3326 (push_event): Adjust to use ptid_t.
3327 (read_ptid, write_ptid): Declare.
3328 (prepare_resume_reply): Adjust to use ptid_t.
3329 (clear_symbol_cache): Declare.
3330 * inferiors.c (all_processes): New.
3331 (null_ptid, minus_one_ptid): New.
3332 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3333 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3334 (add_thread): Change unsigned long to ptid. Remove gdb_id
3336 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3337 (gdb_id_to_thread): Rename to ...
3338 (find_thread_pid): ... this. Change unsigned long to ptid.
3339 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3340 (loaded_dll, pull_pid_from_list): Adjust.
3341 (add_process, remove_process, find_process_pid)
3342 (get_thread_process, current_process, initialize_inferiors): New.
3343 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3344 (struct target_waitstatus) <related_pid>: Ditto.
3345 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3347 (struct target_ops) <join>: Add `pid' argument.
3348 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3349 (struct target_ops) <wait>: Add `ptid' field. Change return type
3351 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3352 (mywait): Add `ptid' argument. Change return type to ptid_t.
3353 (target_pid_to_str): Declare.
3354 * target.c (set_desired_inferior): Adjust to use ptids.
3355 (mywait): Add new `ptid' argument. Adjust.
3356 (target_pid_to_str): New.
3357 * mem-break.h (free_all_breakpoints): Declare.
3358 * mem-break.c (breakpoints): Delelete.
3359 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3360 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3361 to use per-process breakpoint list.
3362 (free_all_breakpoints): New.
3363 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3364 (symbol_cache, all_symbols_looked_up): Delete.
3366 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3368 (prepare_resume_reply): Change ptid argument's type from unsigned
3369 long to ptid_t. Adjust. Implement W;process and X;process.
3370 (free_sym_cache, clear_symbol_cache): New.
3371 (look_up_one_symbol): Adjust to per-process symbol cache. *
3372 * server.c (cont_thread, general_thread, step_thread): Change type
3375 (multi_process): New.
3376 (last_ptid): Change type to ptid_t.
3377 (struct vstop_notif) <ptid>: Change type to ptid_t.
3378 (queue_stop_reply, push_event): Change `ptid' argument's type to
3380 (discard_queued_stop_replies): Add `pid' argument.
3381 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3382 changes. Don't reference the `attached' global.
3383 (attach_inferior): Adjust to mywait interface changes.
3384 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3385 features. Handle and report "multiprocess+". Handle
3387 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3389 (handle_v_kill): New.
3390 (handle_v_stopped): Adjust to use target_pid_to_str.
3391 (handle_v_requests): Allow multiple attaches and runs when
3392 multiprocess extensions are in effect. Handle "vKill".
3393 (myresume): Adjust to use ptids.
3394 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3395 (handle_status): Adjust to discard_queued_stop_replies interface
3397 (first_thread_of, kill_inferior_callback)
3398 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3399 (main): Call initialize_inferiors. Adjust to use ptids, killing
3400 and detaching from all inferiors. Handle multiprocess packet
3402 * linux-low.h: Include gdb_proc_service.h.
3403 (struct process_info_private): New.
3404 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3405 <lwpid_of>: Use ptid_get_lwp.
3406 (get_lwp_thread): Adjust.
3407 (struct lwp_info): Add `dead' member.
3408 (find_lwp_pid): Declare.
3409 * linux-low.c (thread_db_active): Delete.
3410 (new_inferior): Adjust comment.
3411 (inferior_pid): Delete.
3412 (linux_add_process): New.
3413 (handle_extended_wait): Adjust.
3414 (add_lwp): Change unsigned long to ptid.
3415 (linux_create_inferior): Add process to processes table. Adjust
3416 to use ptids. Don't set new_inferior here.
3417 (linux_attach_lwp): Rename to ...
3418 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3419 it. Adjust to use ptids.
3420 (linux_attach_lwp): New.
3421 (linux_attach): Add process to processes table. Don't set
3423 (struct counter): New.
3424 (second_thread_of_pid_p, last_thread_of_process_p): New.
3425 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3427 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3428 processes. Remove process from process table.
3429 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3430 to multiple processes.
3431 (any_thread_of): New.
3432 (linux_detach): Add `pid' argument, and handle it. Remove process
3433 from processes table.
3434 (linux_join): Add `pid' argument. Handle it.
3435 (linux_thread_alive): Change unsighed long argument to ptid_t.
3436 Consider dead lwps as not being alive.
3437 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3438 threads we're not interested in.
3439 (same_lwp, find_lwp_pid): New.
3440 (linux_wait_for_lwp): Change `pid' argument's type from int to
3442 (linux_wait_for_event): Rename to ...
3443 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3444 from int to ptid_t. Adjust.
3445 (linux_wait_for_event): New.
3446 (linux_wait_1): Add `ptid' argument. Change return type to
3447 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3448 that exit from the process table.
3449 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3451 (mark_lwp_dead): New.
3452 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3453 stopping all threads, mark its main lwp as dead.
3454 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3456 (fetch_register, usr_store_inferior_registers)
3457 (regsets_fetch_inferior_registers)
3458 (regsets_store_inferior_registers, linux_read_memory)
3459 (linux_write_memory): Inline `inferior_pid'.
3460 (linux_look_up_symbols): Adjust to use per-process
3462 (linux_request_interrupt): Adjust to use ptids.
3463 (linux_read_auxv): Inline `inferior_pid'.
3464 (initialize_low): Don't reference thread_db_active.
3465 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3466 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3467 (ps_getpid): Return the pid of the current inferior.
3468 * thread-db.c (proc_handle, thread_agent): Delete.
3469 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3471 (find_one_thread): Change argument type to ptid_t. Adjust to
3473 (maybe_attach_thread): Adjust to per-process data and ptids.
3474 (thread_db_find_new_threads): Ditto.
3475 (thread_db_init): Ditto.
3476 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3477 processes table. Adjust to use ptids.
3478 (spu_kill, spu_detach): Adjust interface. Remove process from
3480 (spu_join, spu_thread_alive): Adjust interface.
3481 (spu_wait): Adjust interface. Remove process from processes
3482 table. Adjust to use ptids.
3483 * win32-low.c (current_inferior_tid): Delete.
3484 (current_inferior_ptid): New.
3485 (debug_event_ptid): New.
3486 (thread_rec): Take a ptid. Adjust.
3487 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3488 (child_delete_thread): Ditto.
3489 (do_initial_child_stuff): Add `attached' argument. Add process to
3491 (child_fetch_inferior_registers, child_store_inferior_registers):
3493 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3494 (win32_attach): Pass 1 to do_initial_child_stuff.
3495 (win32_kill): Adjust interface. Remove process from processes
3497 (win32_detach): Ditto.
3498 (win32_join): Adjust interface.
3499 (win32_thread_alive): Take a ptid.
3500 (win32_resume): Adjust to use ptids.
3501 (get_child_debug_event): Ditto.
3502 (win32_wait): Adjust interface. Remove exiting process from
3505 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3507 Non-stop mode support.
3509 * server.h (non_stop): Declare.
3510 (gdb_client_data, handler_func): Declare.
3511 (delete_file_handler, add_file_handler, start_event_loop):
3513 (handle_serial_event, handle_target_event, push_event)
3514 (putpkt_notif): Declare.
3515 * target.h (enum resume_kind): New.
3516 (struct thread_resume): Replace `step' field by `kind' field.
3517 (TARGET_WNOHANG): Define.
3518 (struct target_ops) <wait>: Add `options' argument.
3519 <supports_non_stop, async, start_non_stop>: New fields.
3520 (target_supports_non_stop, target_async): New.
3521 (start_non_stop): Declare.
3522 (mywait): Add `options' argument.
3523 * target.c (mywait): Add `options' argument. Print child exit
3525 (start_non_stop): New.
3526 * server.c (non_stop, own_buf, mem_buf): New globals.
3527 (struct vstop_notif): New.
3528 (notif_queue): New global.
3529 (queue_stop_reply, push_event, discard_queued_stop_replies)
3530 (send_next_stop_reply): New.
3531 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3533 (attach_inferior): In non-stop mode, don't wait for the target
3535 (handle_general_set): Handle QNonStop.
3536 (handle_query): When handling qC, return the current general
3537 thread, instead of the first thread of the list.
3538 (handle_query): If the backend supports non-stop mode, include
3539 QNonStop+ in the qSupported query response.
3540 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3542 (handle_v_attach, handle_v_run): Handle non-stop mode.
3543 (handle_v_stopped): New.
3544 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3545 (myresume): Adjust to use resume_kind. Handle non-stop.
3546 (queue_stop_reply_callback): New.
3547 (handle_status): Handle non-stop mode.
3548 (main): Clear non_stop flag on reconnection. Use the event-loop.
3549 Refactor serial protocol handling from here ...
3550 (process_serial_event): ... to this new function. When GDB
3551 selects any thread, select one here. In non-stop mode, wait until
3552 GDB acks all pending events before exiting.
3553 (handle_serial_event, handle_target_event): New.
3554 * remote-utils.c (remote_open): Install remote_desc in the event
3556 (remote_close): Remove remote_desc from the event loop.
3557 (putpkt_binary): Rename to...
3558 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3559 (putpkt_binary): New as wrapper around putpkt_binary_1.
3560 (putpkt_notif): New.
3561 (prepare_resume_reply): In non-stop mode, don't change the
3563 * event-loop.c: New.
3564 * Makefile.in (OBJ): Add event-loop.o.
3565 (event-loop.o): New rule.
3567 * linux-low.h (pid_of): Moved here.
3569 (get_lwp_thread): Use lwpid_of.
3570 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3571 * linux-low.c (pid_of): Delete.
3572 (inferior_pid): Use lwpid_of.
3573 (linux_event_pipe): New.
3574 (target_is_async_p): New.
3576 (handle_extended_wait): Use lwpid_of.
3577 (add_lwp): Don't set lwpid field.
3578 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3579 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3580 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3581 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3582 first. Adjust to linux_wait_for_event interface changes. Use
3584 (linux_detach): Don't delete the main lwp here.
3585 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3586 (status_pending_p): Don't consider explicitly suspended lwps.
3587 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3588 pointer. Add OPTIONS argument. Change return type to int. Use
3589 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3590 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3591 pointer. Add status pointer argument. Return a pid instead of a
3592 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3593 changes. In non-stop mode, don't switch to a random thread.
3594 (linux_wait): Rename to...
3595 (linux_wait_1): ... this. Add target_options argument, and handle
3596 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3597 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3598 clean exit and signal exit code. Don't stop all threads in
3599 non-stop mode. In all-stop mode, only stop all threads when
3600 reporting a stop to GDB. Handle explicit thread stop requests.
3601 (async_file_flush, async_file_mark): New.
3603 (send_sigstop): Use lwpid_of.
3604 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3605 interface changes. In non-stop mode, don't switch to a random
3607 (linux_resume_one_lwp): Use lwpid_of.
3608 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3609 (linux_resume_one_thread): ... this. Handle resume_stop. In
3610 non-stop mode, don't look for pending flag in all threads.
3611 (resume_status_pending_p): Don't consider explicitly suspended
3613 (my_waitpid): Reimplement. Emulate __WALL.
3614 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3616 (sigchld_handler, linux_supports_non_stop, linux_async)
3617 (linux_start_non_stop): New.
3618 (linux_target_ops): Register linux_supports_non_stop, linux_async
3619 and linux_start_non_stop.
3620 (initialize_low): Install SIGCHLD handler.
3621 * thread-db.c (thread_db_create_event, find_one_thread)
3622 (thread_db_get_tls_address): Use lwpid_of.
3623 * win32-low.c (win32_detach): Adjust to use resume_kind.
3624 (win32_wait): Add `options' argument.
3625 * spu-low.c (spu_resume): Adjust to use resume_kind.
3626 (spu_wait): Add `options' argument.
3628 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3630 Decouple target code from remote protocol.
3632 * target.h (enum target_waitkind): New.
3633 (struct target_waitstatus): New.
3634 (struct target_ops) <wait>: Return an unsigned long. Take a
3635 target_waitstatus pointer instead of a char pointer.
3637 * target.c (mywait): Change prototype to return an unsigned long.
3638 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3639 * server.h (thread_from_wait, old_thread_from_wait): Delete
3641 (prepare_resume_reply): Change prototype to take a
3643 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3644 (last_status, last_ptid): New.
3645 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3646 pid instead of a signal.
3647 (attach_inferior): Remove "status" and "signal" parameters.
3649 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3651 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3652 (handle_v_requests, myresume): Remove "status" and "signal"
3654 (handle_status): New.
3655 (main): Delete local `status'. Adjust.
3656 * remote-utils.c: Include target.h.
3657 (prepare_resume_reply): Change prototype to take a
3658 target_waitstatus. Adjust.
3660 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3662 * spu-low.c (spu_wait): Adjust.
3663 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3665 (win32_wait): Adjust.
3667 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3669 * target.h (struct thread_resume): Delete leave_stopped member.
3670 (struct target_ops): Add a `n' argument to the `resume' callback.
3671 * server.c (start_inferior): Adjust.
3672 (handle_v_cont, myresume): Adjust.
3673 * linux-low.c (check_removed_breakpoint): Adjust to resume
3674 interface change, and to removed leave_stopped field.
3675 (resume_ptr): Delete.
3676 (struct thread_resume_array): New.
3677 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3678 resume interface change.
3679 (linux_continue_one_thread, linux_queue_one_thread)
3680 (resume_status_pending_p): Check if the resume field is NULL
3681 instead of checking the leave_stopped member.
3682 (linux_resume): Adjust to the target resume interface change.
3683 * spu-low.c (spu_resume): Adjust to the target resume interface
3685 * win32-low.c (win32_detach, win32_resume): Ditto.
3687 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3689 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3691 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3693 (linux_continue_one_thread): Only preserve the stepping flag if
3694 there's a pending breakpoint.
3696 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3698 * server.c (main): After the inferior having exited, call
3699 remote_close before exiting gdbserver.
3701 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3703 Fix size of FPSCR in Power 7 processors.
3704 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3705 (PPC_FEATURE_HAS_DFP): New #define.
3706 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3709 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3711 * server.c (handle_query) Whitespace and formatting.
3713 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3715 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3716 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3717 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3718 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3719 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3720 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3721 Makefile.in, configure.ac: Fix whitespace throughout.
3722 * configure: Regenerate.
3724 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3726 * inferiors.c (find_inferior): Make it safe for the callback
3727 function to delete the currently iterated inferior.
3729 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3731 * Makefile.in (linuw_low_h): Move higher.
3732 (thread-db.o): Depend on $(linux_low_h).
3734 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3736 Rename "process" to "lwp" throughout.
3738 * linux-low.c (all_processes): Rename to...
3739 (all_lwps): ... this.
3740 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3741 (add_process): Rename to ...
3742 (add_lwp): ... this. Adjust.
3743 (linux_create_inferior): Adjust.
3744 (linux_attach_lwp): Adjust.
3745 (linux_attach): Adjust.
3746 (linux_kill_one_process): Rename to ...
3747 (linux_kill_one_lwp): ... this. Adjust.
3748 (linux_kill): Adjust.
3749 (linux_detach_one_process): Rename to ...
3750 (linux_detach_one_lwp): ... this. Adjust.
3751 (linux_detach): Adjust.
3752 (check_removed_breakpoint): Adjust.
3753 (status_pending_p): Adjust.
3754 (linux_wait_for_process): Rename to ...
3755 (linux_wait_for_lwp): ... this. Adjust.
3756 (linux_wait_for_event): Adjust.
3757 (send_sigstop): Adjust.
3758 (wait_for_sigstop): Adjust.
3759 (stop_all_processes): Rename to ...
3760 (stop_all_lwps): ... this.
3761 (linux_resume_one_process): Rename to ...
3762 (linux_resume_one_lwp): ... this. Adjust.
3763 (linux_set_resume_request, linux_continue_one_thread)
3764 (linux_queue_one_thread, resume_status_pending_p)
3765 (usr_store_inferior_registers, regsets_store_inferior_registers)
3766 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3768 * linux-low.h (get_process): Rename to ...
3769 (get_lwp): ... this. Adjust.
3770 (get_thread_process): Rename to ...
3771 (get_thread_lwp): ... this. Adjust.
3772 (get_process_thread): Rename to ...
3773 (get_lwp_thread): ... this. Adjust.
3774 (struct process_info): Rename to ...
3775 (struct lwp_info): ... this.
3776 (all_processes): Rename to ...
3777 (all_lwps): ... this.
3778 * proc-service.c (ps_lgetregs): Adjust.
3779 * thread-db.c (thread_db_create_event, find_one_thread)
3780 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3782 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3784 * server.c (handle_query): Handle "qAttached".
3786 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3788 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3789 GPLv3, update license URL.
3791 2009-03-01 Doug Evans <dje@google.com>
3793 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3794 (server_h): Add gdb_signals.h.
3795 (signals.o): Update.
3796 * server.h (target_signal_from_host,target_signal_to_host_p)
3797 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3799 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3801 * remote-utils.c (getpkt): Also generate remote-debug
3802 information if noack_mode is set.
3804 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3806 * server.c (handle_query): Report qXfer:siginfo:read and
3807 qXfer:siginfo:write as supported and handle them.
3808 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3809 * linux-low.c (linux_xfer_siginfo): New.
3810 (linux_target_ops): Set it.
3812 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3814 * server.c (gdbserver_usage): Mention --remote-debug.
3815 (main): Accept '--remote-debug' switch.
3817 2009-01-18 Doug Evans <dje@google.com>
3819 * regcache.c (new_register_cache): No need to check result of xcalloc.
3820 * server.c (handle_search_memory): Back out calls to xmalloc,
3821 result is checked and error is returned to user upon failure.
3822 (handle_query): Ditto. Add more checks for result of malloc.
3823 (handle_v_cont): Check result of malloc, report error back to
3825 (handle_v_run): Ditto. Call freeargv.
3826 * server.h (freeargv): Declare.
3827 * utils.c (freeargv): New fn.
3829 2009-01-15 Doug Evans <dje@google.com>
3831 * gdbreplay.c (perror_with_name): Make arg const char *.
3832 * server.h (target_signal_to_name): Make return type const char *.
3833 * thread-db.c (thread_db_err_str): Make return type const char *.
3834 * utils.c (perror_with_name): Make arg const char *.
3836 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3838 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3839 when handling a EXIT_PROCESS_DEBUG_EVENT.
3841 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3843 * gdbreplay.c (gdbreplay_version): Update copyright year.
3844 * server.c (gdbserver_version): Likewise.
3846 2009-01-05 Doug Evans <dje@google.com>
3848 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3849 (handle_extended_wait): Improve comment.
3851 2008-12-13 Doug Evans <dje@google.com>
3853 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3854 * server.h (ATTR_MALLOC): New macro.
3855 (xmalloc,xcalloc,xstrdup): Declare.
3856 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3857 * inferiors.c: Ditto.
3858 * linux-low.c: Ditto.
3859 * mem-break.c: Ditto.
3860 * regcache.c: Ditto.
3861 * remote-utils.c: Ditto.
3864 * win32-low.c: Ditto.
3866 2008-12-12 Doug Evans <dje@google.com>
3868 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3869 in debugging printf.
3871 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3873 2008-12-09 Doug Evans <dje@google.com>
3875 * linux-low.h (struct process_info): Delete member tid, unused.
3876 * thread-db.c (find_one_thread): Update.
3877 (maybe_attach_thread): Update.
3879 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3881 * target.h (struct target_ops): Add qxfer_osdata member.
3882 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3884 (linux_qxfer_osdata): New functions.
3885 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3887 * server.c (handle_query): Handle "qXfer:osdata:read:".
3888 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3889 (buffer_xml_printf): New functions.
3890 * server.h (struct buffer): New.
3891 (buffer_grow_str, buffer_grow_str0): New macros.
3892 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3893 (buffer_xml_printf): Declare.
3895 2008-11-24 Doug Evans <dje@google.com>
3897 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3899 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3901 * server.c (handle_v_run): Always use the supplied argument list.
3903 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3905 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3906 (xtensa_regmap_table): Add entry for scompare1.
3908 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3910 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3911 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3912 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3913 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3914 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3915 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3916 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3917 XML target descriptions.
3918 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3919 when inferior is running on an ISA 2.05 or later processor. Add
3920 special case to return offset for full 64-bit slot of FPSCR when
3923 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3925 * Makefile.in (SFILES, clean): Added sparc64 files.
3926 (reg-sparc64.o, reg-sparc64.c): New.
3927 * configure.srv (sparc*-*-linux*): New configuration.
3928 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3929 syscall arguments for SPARC.
3930 (regsets_store_inferior_registers): Likewise.
3931 * linux-sparc-low.c: New file.
3933 2008-10-21 Doug Evans <dje@google.com>
3935 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3936 (READLINE_DIR,READLINE_DEP): Delete.
3937 (INTERNAL_CFLAGS): Update.
3938 (LINTFLAGS): Update.
3940 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3942 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3943 whole argv from the last run, not just argv[0].
3945 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3947 * regcache.c (new_register_cache): Return NULL if the register
3948 cache size isn't known yet.
3949 (free_register_cache): Avoid dereferencing a NULL regcache.
3951 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3953 * configure.srv: Merge MIPS and MIPS64.
3955 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3957 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3959 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3961 * Makefile.in: Add required vsx dependencies.
3963 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3964 Declare init_registers_powerpc_vsx32l.
3965 Declare init_registers_powerpc_vsx64l.
3966 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3967 (ppc_arch_setup): Check for VSX in hwcap.
3968 (ppc_fill_vsxregset): New function.
3969 (ppc_store_vsxregset): New function.
3970 Add new VSX entry in regset_info target_regsets.
3972 * configure.srv: Add new VSX dependencies.
3974 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3976 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3977 (remote_open): Set or clear transport_is_reliable.
3978 (putpkt_binary): Don't expect acks in noack mode.
3979 (getpkt): Don't send ack/nac in noack mode.
3980 * server.c (handle_general_set): Handle QStartNoAckMode.
3981 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3983 (main): Reset noack_mode on every connection.
3984 * server.h (noack_mode): Declare.
3986 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3988 * Makefile.in (GDBREPLAY_OBS): New variable.
3989 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3991 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3992 Daniel Jacobowitz <dan@codesourcery.com>
3994 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3995 (usr_store_inferior_registers): Likewise.
3996 (regsets_store_inferior_registers): Likewise.
3998 2008-07-31 Rolf Jansen <rj@surtec.com>
3999 Pedro Alves <pedro@codesourcery.com>
4001 * configure.ac: Check for memmem declaration.
4002 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4003 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4004 (disable_packet_qfThreadInfo): Unconditionally compile.
4005 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4006 * configure, config.in: Regenerate.
4008 2008-07-28 Doug Kwan <dougkwan@google.com>
4010 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4011 (linux_write_memory): Remove declaration of errno.
4013 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4015 * linux-low.c (handle_extended_wait): Do not use "status"
4016 variable uninitialized.
4018 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4020 * server.c (handle_v_attach): Inhibit reporting dll changes.
4022 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4024 * remote-utils.c (prepare_resume_reply): If requested, don't
4025 output "thread:TID" in the T stop reply.
4027 * server.c (disable_packet_vCont, disable_packet_Tthread)
4028 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4029 (handle_query): If requested, disable support for qC, qfThreadInfo
4031 (handle_v_requests): If requested, disable support for vCont.
4032 (gdbserver_show_disableable): New.
4033 (main): Handle --disable-packet and --disable-packet=LIST.
4035 * server.h (disable_packet_vCont, disable_packet_Tthread)
4036 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4038 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4040 * server.c (gdbserver_usage): Mention --version.
4042 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4044 * Makefile.in (gdbreplay.o): New rule.
4046 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4048 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4049 message, not gdbserver.
4051 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4052 Nathan Sidwell <nathan@codesourcery.com>
4053 Joseph Myers <joseph@codesourcery.com>
4055 * acinclude.m4: Include ../../config/acx.m4.
4056 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4057 * configure, config.in: Regenerate.
4058 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4059 * server.c (gdbserver_version): Print PKGVERSION.
4060 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4061 (main): Adjust gdbserver_usage calls.
4062 * gdbreplay.c (version, host_name): Add declarations.
4063 (gdbreplay_version, gdbreplay_usage): New.
4064 (main): Accept --version and --help options.
4066 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4068 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4069 (arm_breakpoint_at): Handle Thumb.
4070 (the_low_target): Add comment.
4072 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4074 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4076 2008-05-09 Doug Evans <dje@google.com>
4078 * server.h (decode_search_memory_packet): Declare.
4079 * remote-utils.c (decode_search_memory_packet): New fn.
4080 * server.c (handle_search_memory_1): New fn.
4081 (handle_search_memory): New fn.
4082 (handle_query): Process qSearch:memory packets.
4084 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4086 * regcache.c (registers_length): Remove.
4087 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4088 full register packet.
4089 * regcache.h (registers_length): Remove prototype.
4090 * server.h (PBUFSIZ): Define to 16384.
4092 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4094 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4095 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4096 powerpc-64l.o, and powerpc-altivec64l.o.
4097 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4098 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4099 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4100 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4101 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4104 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4105 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4106 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4107 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4108 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4109 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4110 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4111 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4112 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4113 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4116 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4117 (init_registers_powerpc_32l): ... this new prototype.
4118 (init_registers_powerpc_32): Remove, replace by ...
4119 (init_registers_powerpc_altivec32l): ... this new prototype.
4120 (init_registers_powerpc_e500): Remove, replace by ...
4121 (init_registers_powerpc_e500l): ... this new prototype.
4122 (init_registers_ppc64): Remove, replace by ...
4123 (init_registers_powerpc_64l): ... this new prototype.
4124 (init_registers_powerpc_64): Remove, replace by ...
4125 (init_registers_powerpc_altivec64l): ... this new prototype.
4126 (ppc_num_regs): Set to 73.
4127 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4128 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4129 (ppc_cannot_store_register): Handle orig_r3 and trap.
4130 (ppc_arch_setup): Update init_registers_... calls.
4131 (ppc_fill_gregset): Handle orig_r3 and trap.
4133 * inferiors.c (clear_inferiors): Reset current_inferior.
4135 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4137 * acinclude.m4: Add override.m4.
4138 * configure: Regenerate.
4140 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4142 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4143 initial call to init_register_ppc64.
4145 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4147 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4148 powerpc*-*-linux* case.
4149 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4151 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4153 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4154 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4156 * linux-ppc-low.c: Include <elf.h>.
4157 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4158 (ppc_hwcap): New global variable.
4159 (ppc_regmap): Remove __SPE__ #ifdef sections.
4160 (ppc_regmap_e500): New global variable.
4161 (ppc_cannot_store_register): Update __SPE__ special case.
4162 (ppc_get_hwcap): New function.
4163 (ppc_arch_setup): Use it to determine whether inferior supports
4164 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4165 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4166 Do not access registers if target does not support AltiVec.
4167 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4168 Do not access registers if target does not support SPE.
4169 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4171 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4173 * linux-low.c (disabled_regsets, num_regsets): New.
4174 (use_regsets_p): Delete.
4175 (linux_wait_for_process): Clear disabled_regsets.
4176 (regsets_fetch_inferior_registers): Check and set it.
4177 (regsets_store_inferior_registers): Likewise.
4178 (linux_fetch_registers, linux_store_registers): Do not use
4180 (initialize_low): Allocate disabled_regsets.
4182 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4184 * Makefile.in (LIBOBJS): New.
4186 (memmem.o): New rule.
4187 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4188 * configure: Regenerated.
4190 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4192 * server.c (handle_query): Never return "unsupported" for
4193 qXfer:features:read queries.
4195 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4197 * server.c (get_features_xml): Fix inverted condition.
4198 (handle_query): Always support qXfer:feature:read.
4200 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4202 * server.c (wrapper_argv): New.
4203 (start_inferior): Handle wrapper_argv. If set, expect an extra
4205 (gdbserver_usage): Document --wrapper.
4206 (main): Parse --wrapper.
4208 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4210 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4211 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4212 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4213 (ppc_set_pc): Likewise.
4214 (ppc_arch_setup): New function.
4215 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4216 of collect_register.
4217 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4219 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4221 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4222 instead of linux-ppc64-low.o.
4223 * linux-ppc64-low.c: Remove file.
4224 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4225 (linux-ppc64-low.o): Remove rule.
4227 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4228 (init_registers_powerpc_64): Likewise.
4229 (ppc_regmap): Conditionally define depending on __powerpc64__.
4230 (ppc_cannot_store_register): Do not special-case "fpscr" when
4231 compiled on __powerpc64__.
4232 (ppc_collect_ptrace_register): New function.
4233 (ppc_supply_ptrace_register): New function.
4234 (ppc_breakpoint): Change type to "unsigned int".
4235 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4236 (the_low_target): Conditionally provide initializers for the
4237 arch_setup member depending on __powerpc64__. Install
4238 collect_ptrace_register and supply_ptrace_register members.
4240 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4242 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4243 * server.c (gdbserver_xmltarget): Define.
4244 (get_features_xml): Use it to replace "target.xml" and arch_string.
4246 * configure.srv: Remove srv_xmltarget. Add XML files that were
4247 mentioned there to srv_xmlfiles instead. Remove conditional tests
4248 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4249 srv_xmlfiles and srv_regobj to include all possible choices.
4250 * configure.ac (srv_xmltarget): Remove.
4251 (srv_xmlfiles): Do not add "target.xml".
4252 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4253 checks for supplementary target information.
4254 * configure: Regenerate.
4255 * Makefile.in (XML_TARGET): Remove.
4256 (target.xml): Remove rule.
4257 (clean): Do not clean up target.xml.
4258 (.PRECIOUS): Do not mention target.xml.
4260 * target.h (struct target_ops): Remove arch_string member.
4261 * linux-low.c (linux_arch_string): Remove.
4262 (linux_target_ops): Remove arch_string initializer.
4263 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4264 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4265 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4266 * spu-low.c (spu_arch_string): Remove.
4267 (spu_target_ops): Remove arch_string initializer.
4268 * win32-low.c (win32_arch_string): Remove.
4269 (win32_target_ops): Remove arch_string initializer.
4270 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4271 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4272 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4274 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4276 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4277 by collect_ptrace_register and supply_ptrace_register hooks.
4278 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4279 instead of checking for the_low_target.left_pad_xfer.
4280 (usr_store_inferior_registers): Use collect_ptrace_register callback
4281 instead of checking for the_low_target.left_pad_xfer.
4283 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4284 (s390_supply_ptrace_register): Likewise.
4285 (s390_fill_gregset): Call s390_collect_ptrace_register.
4286 (the_low_target): Update.
4288 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4289 (ppc_supply_ptrace_register): Likewise.
4290 (the_low_target): Update.
4292 * linux-i386-low.c (the_low_target): Update.
4293 * linux-x86-64-low.c (the_low_target): Update.
4295 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4297 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4298 reg-s390.o and reg-s390x.o.
4300 * linux-low.c (new_inferior): New global variable.
4301 (linux_create_inferior, linux_attach): Set it.
4302 (linux_wait_for_process): Call the_low_target.arch_setup after the
4303 target has stopped for the first time.
4304 (initialize_low): Do not call the_low_target.arch_setup.
4306 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4307 (s390_set_pc): Likewise.
4308 (s390_arch_setup): New function.
4309 (the_low_target): Use s390_arch_setup as arch_setup routine.
4311 * regcache.c (realloc_register_cache): New function.
4312 (set_register_cache): Call it for each existing regcache.
4314 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4316 * server.h (init_registers): Remove prototype.
4318 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4319 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4320 instead of init_registers ().
4321 * linux-arm-low.c (init_registers_arm): Add prototype.
4322 (init_registers_arm_with_iwmmxt): Likewise.
4323 (the_low_target): Add initializer for arch_setup field.
4324 * linux-cris-low.c (init_registers_cris): Add prototype.
4325 (the_low_target): Add initializer for arch_setup field.
4326 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4327 (the_low_target): Add initializer for arch_setup field.
4328 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4329 (the_low_target): Add initializer for arch_setup field.
4330 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4331 (the_low_target): Add initializer for arch_setup field.
4332 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4333 (the_low_target): Add initializer for arch_setup field.
4334 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4335 (the_low_target): Add initializer for arch_setup field.
4336 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4337 (init_registers_mips64_linux): Likewise.
4338 (the_low_target): Add initializer for arch_setup field.
4339 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4340 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4341 (the_low_target): Add initializer for arch_setup field.
4342 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4343 (init_registers_powerpc_64): Likewise.
4344 (the_low_target): Add initializer for arch_setup field.
4345 * linux-s390-low.c (init_registers_s390): Add prototype.
4346 (init_registers_s390x): Likewise.
4347 (the_low_target): Add initializer for arch_setup field.
4348 * linux-sh-low.c (init_registers_sh): Add prototype.
4349 (the_low_target): Add initializer for arch_setup field.
4350 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4351 (the_low_target): Add initializer for arch_setup field.
4352 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4353 (the_low_target): Add initializer for arch_setup field.
4355 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4356 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4357 instead of init_registers ().
4358 * win32-arm-low.c (init_registers_arm): Add prototype.
4359 (the_low_target): Add initializer for arch_setup field.
4360 * win32-i386-low.c (init_registers_i386): Add prototype.
4361 (the_low_target): Add initializer for arch_setup field.
4363 * spu-low.c (init_registers_spu): Add prototype.
4364 (initialize_low): Call initialie_registers_spu () instead of
4365 initialize_registers ().
4367 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4369 * server.c (handle_v_requests): When handling the vRun and vAttach
4370 packets, if already debugging a process, don't kill it. Return an
4373 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4375 * server.c (handle_query): Correct length check.
4377 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4379 * win32-low.c (do_initial_child_stuff): Add process handle
4380 parameter. Set current_process_handle and current_process_id from the
4381 parameters. Clear globals.
4382 (win32_create_inferior): Don't set current_process_handle and
4383 current_process_id here. Instead pass them on the call to
4384 do_initial_child_stuff.
4385 (win32_attach): Likewise.
4386 (win32_clear_inferiors): New.
4387 (win32_kill): Don't close the current process handle or the
4388 current thread handle here. Instead call win32_clear_inferiors.
4389 (win32_detach): Don't open a new handle to the process. Call
4390 win32_clear_inferiors.
4391 (win32_join): Don't rely on current_process_handle; open a new
4392 handle using the process id.
4393 (win32_wait): Call win32_clear_inferiors when the inferior process
4396 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4398 * server.c (monitor_show_help): Add "exit".
4400 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4402 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4403 (clean): Add reg-xtensa.c.
4404 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4405 * configure.srv (xtensa*-*-linux*) New target.
4406 * linux-xtensa-low.c: New.
4407 * xtensa-xtregs.c: New.
4409 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4411 * hostio.c: Don't include errno.h.
4412 (errno_to_fileio_errno): Move to hostio-errno.
4413 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4414 error number outputting to the target->hostio_last_error callback.
4415 (hostio_packet_error): Use FILEIO_EINVAL directly.
4416 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4417 calls to hostio_error.
4418 * hostio-errno.c: New.
4419 * server.h (hostio_last_error_from_errno): Declare.
4420 * target.h (target_ops): Add hostio_last_error member.
4421 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4422 as hostio_last_error handler.
4423 * spu-low.c (spu_target_ops): Likewise.
4424 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4425 (wince_hostio_last_error): New functions.
4426 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4427 as hostio_last_error handler.
4428 (win32_target_ops) [!_WIN32_WCE]: Register
4429 hostio_last_error_from_errno as hostio_last_error handler.
4430 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4431 (hostio-errno.o): New rule.
4432 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4433 * configure.srv (srv_hostio_err_objs): New variable. Default to
4435 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4436 * configure: Regenerate.
4438 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4440 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4441 (linux_kill, linux_detach): Clean up the process list.
4442 * remote-utils.c (remote_open): Improve port number parsing.
4443 (putpkt_binary, input_interrupt): Only send interrupts if the target
4445 * server.c (extended_protocol): Make static.
4446 (attached): Define earlier.
4447 (exit_requested, response_needed, program_argv): New variables.
4448 (target_running): New.
4449 (start_inferior): Clear attached here.
4450 (attach_inferior): Set attached here.
4451 (require_running): Define.
4452 (handle_query): Use require_running and target_running. Implement
4454 (handle_v_attach, handle_v_run): New.
4455 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4456 (gdbserver_usage): Update.
4457 (main): Redo argument parsing. Handle --debug and --multi. Handle
4458 --attach along with other options or after the port. Save
4459 program_argv. Support no initial program. Resynchronize
4460 communication with GDB after an error. Handle "monitor exit".
4461 Use require_running and target_running. Always allow the extended
4462 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4463 restart in extended mode.
4464 * README: Refer to the GDB manual. Update --attach usage.
4466 2007-12-20 Andreas Schwab <schwab@suse.de>
4468 * linux-low.c (STACK_SIZE): Define.
4469 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4470 (linux_test_for_tracefork): Likewise.
4472 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4474 * linux-low.c (linux_wait_for_event): Update messages. Do not
4475 reinsert auto-delete breakpoints.
4476 * mem-break.c (struct breakpoint): Change return type of handler to
4478 (set_breakpoint_at): Update handler type.
4479 (reinsert_breakpoint_handler): Return 1 instead of calling
4481 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4483 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4484 * mem-break.h (set_breakpoint_at): Update handler type.
4485 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4486 * win32-low.c (auto_delete_breakpoint): New.
4487 (get_child_debug_event): Use it.
4489 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4491 * configure.ac: Check for pread and pwrite.
4492 * hostio.c (handle_pread): Fall back to lseek and read.
4493 (handle_pwrite): Fall back to lseek and write.
4494 * config.in, configure: Regenerated.
4496 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4498 * server.c (myresume): Add own_buf argument.
4499 (main): Update calls.
4501 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4503 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4504 * remote-utils.c (remote_open): Do not call disable_async_io.
4505 (block_async_io): Delete.
4506 (unblock_async_io): Make static.
4507 (initialize_async_io): New.
4508 * server.c (handle_v_cont): Handle async I/O here.
4509 (myresume): Likewise. Move other common resume tasks here...
4510 (main): ... from here. Call initialize_async_io. Disable async
4511 I/O before the main loop.
4512 * server.h (initialize_async_io): Declare.
4513 (block_async_io, unblock_async_io): Delete prototypes.
4514 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4516 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4518 * remote-utils.c (readchar): Allow binary data in received messages.
4520 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4522 * win32-low.c (attaching): New global.
4523 (win32_create_inferior): Clear the `attaching' global.
4524 (win32_attach): Set the `attaching' global.
4525 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4526 attaching. Only set a breakpoint at the entry point if not
4529 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4531 * server.c (main): Don't report dll events on the initial
4532 connection on attaches.
4534 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4536 * server.c (main): Relax numerical bases supported for the pid of
4537 the --attach command line argument.
4539 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4541 * win32-low.c (win32_attach): Call OpenProcess before
4542 DebugActiveProcess, not after. Add last error output to error
4545 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4547 * win32-low.c (win32_get_thread_context)
4548 (win32_set_thread_context): New functions.
4549 (thread_rec): Use win32_get_thread_context.
4550 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4551 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4554 2007-12-03 Leo Zayas
4555 Pedro Alves <pedro_alves@portugalmail.pt>
4557 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4559 (child_add_thread): Minor cleanup.
4560 (child_continue): Resume artificially suspended threads before
4561 calling ContinueDebugEvent.
4562 (suspend_one_thread): New.
4563 (fake_breakpoint_event): New.
4564 (get_child_debug_event): Change return type to int. Check here if
4565 gdb sent an interrupt request. If a soft interrupt was requested,
4566 fake a breakpoint event. Return 0 if there is no event to handle,
4568 (win32_wait): Don't check here if gdb sent an interrupt request.
4569 Ensure there is a valid event to handle.
4570 (win32_request_interrupt): Add soft interruption method as last
4573 2007-12-03 Leo Zayas
4574 Pedro Alves <pedro_alves@portugalmail.pt>
4576 * win32-low.h (win32_thread_info): Add descriptions to the
4577 structure members. Replace `suspend_count' counter by a
4579 * win32-low.c (thread_rec): Update condition of when to get the
4580 context from the inferior. Rely on ContextFlags being set if it
4581 has already been retrieved. Only suspend the inferior thread if
4582 we haven't already. Warn if that fails.
4583 (continue_one_thread): s/suspend_count/suspended/. Only call
4584 ResumeThread once. Warn if that fails.
4586 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4588 * win32-low.c (win32_wait): Don't read from the inferior when it
4591 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4593 * Makefile.in (win32_low_h): New variable.
4594 (win32-low.o): Add dependency on $(win32_low_h).
4595 (win32-arm-low.o, win32-i386-low.o): New rules.
4597 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4599 * hostio.c: Correct copyright year.
4601 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4603 * Makefile.in (OBS): Add hostio.o.
4604 (hostio.o): New rule.
4605 * server.h (handle_vFile): Declare.
4606 * hostio.c: New file.
4607 * server.c (handle_v_requests): Take packet_len and new_packet_len
4608 for binary packets. Call handle_vFile.
4609 (main): Update call to handle_v_requests.
4611 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4613 * linux-low.c: Include <sched.h>.
4615 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4617 * linux-low.c (linux_tracefork_grandchild): New.
4618 (linux_tracefork_child): Use clone.
4619 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4621 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4623 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4625 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4627 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4629 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4631 * inferiors.c (change_inferior_id): Delete.
4632 (add_pid_to_list, pull_pid_from_list): New.
4633 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4634 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4635 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4636 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4637 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4638 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4639 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4640 (using_threads): Always set to 1.
4641 (handle_extended_wait): New.
4642 (add_process): Do not set TID.
4643 (linux_create_inferior): Set must_set_ptrace_flags.
4644 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4645 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4646 (linux_thread_alive): Rename TID argument to LWPID.
4647 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4648 (linux_wait_for_event): Do not use TID or check using_threads. Update
4649 call to dead_thread_notify. Call handle_extended_wait.
4650 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4651 (send_sigstop): Delete sigstop_sent.
4652 (wait_for_sigstop): Avoid TID.
4653 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4654 (linux_test_for_tracefork): New.
4655 (linux_lookup_signals): Use thread_db_active and
4656 linux_supports_tracefork_flag.
4657 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4658 * linux-low.h (get_process_thread): Avoid TID.
4659 (struct process_ifo): Move thread_known and tid to the end. Remove
4661 (linux_attach_lwp, thread_db_init): Update prototypes.
4662 * server.h (change_inferior_id): Delete prototype.
4663 (add_pid_to_list, pull_pid_from_list): New prototypes.
4664 * thread-db.c (thread_db_use_events): New.
4665 (find_first_thread): Rename to...
4666 (find_one_thread): ...this. Update callers and messages. Do not
4667 call fatal. Check thread_db_use_events. Do not call
4668 change_inferior_id or new_thread_notify.
4669 (maybe_attach_thread): Update. Do not call new_thread_notify.
4670 (thread_db_init): Set thread_db_use_events. Check use_events.
4671 * utils.c (fatal, warning): Correct message prefix.
4673 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4675 * Makefile.in (clean): Remove new files.
4676 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4677 (powerpc-64.o, powerpc-64.c): New rules.
4678 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4679 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4681 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4683 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4684 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4685 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4686 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4687 (target_regsets): Add AltiVec and SPE register sets.
4688 * configure.ac: Check for AltiVec and SPE.
4689 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4690 (ppc_fill_vrregset, ppc_store_vrregset): New.
4691 (target_regsets): Add AltiVec register set.
4692 * configure: Regenerated.
4694 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4696 * linux-low.c (O_LARGEFILE): Define.
4697 (linux_read_memory): Use /proc/PID/mem.
4698 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4699 * configure, config.in: Regenerated.
4701 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4703 * linux-low.c (linux_wait_for_event): Do not pass signals while
4706 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4708 * win32-low.c (create_process): New.
4709 (win32_create_inferior): Use create_process instead of
4710 CreateProcess. If create_process failed retry appending an ".exe"
4711 suffix. Store the GetLastError result immediatelly after
4712 create_process calls and use it on the call to error.
4714 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4716 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4718 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4720 * configure.ac: Switch license to GPLv3.
4722 2007-08-01 Michael Snyder <msnyder@access-company.com>
4724 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4726 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4728 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4730 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4731 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4732 CloseToolhelp32Snapshot.
4733 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4734 CloseToolhelp32Snapshot.
4736 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4738 * server.c (main): Check for inferior exit before main loop.
4740 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4742 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4743 instead of on tmp_desc.
4745 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4746 Daniel Jacobowitz <dan@codesourcery.com>
4748 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4749 (add_thread): Minor cleanups.
4750 (clear_inferiors): Move lower in the file. Clear the DLL
4752 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4753 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4754 (xml_escape_text): New.
4755 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4757 (handle_v_cont): Report errors.
4758 (gdbserver_version): Update.
4759 (main): Correct size of own_buf. Do not report initial DLL events.
4760 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4761 (unloaded_dll, xml_escape_text): New.
4762 * win32-low.c (enum target_waitkind): Update comments.
4763 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4764 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4765 (win32_EnumProcessModules, win32_GetModuleInformation)
4766 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4767 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4768 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4769 (win32_Module32First, win32_Module32Next, load_toolhelp)
4770 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4771 (get_child_debug_event): Handle DLL events.
4772 (win32_wait): Likewise.
4774 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4776 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4777 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4779 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4781 * win32-low.c (handle_output_debug_string): Ignore event if not
4784 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4786 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4788 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4790 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4792 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4794 * inferiors.c (change_inferior_id): Add comment.
4795 * linux-low.c (check_removed_breakpoint): Add an early
4796 prototype. Improve debug output.
4797 (linux_attach): Doc update.
4798 (linux_detach_one_process, linux_detach): Clean up before releasing
4800 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4801 * linux-low.h (struct process_info): Doc improvement.
4802 * mem-break.c (delete_all_breakpoints): New.
4803 * mem-break.h (delete_all_breakpoints): New prototype.
4804 * thread-db.c (find_first_thread): New.
4805 (thread_db_create_event): Call it instead of
4806 thread_db_find_new_threads. Clean up unused variables.
4807 (maybe_attach_thread): Remove first thread handling.
4808 (thread_db_find_new_threads): Use find_first_thread.
4809 (thread_db_get_tls_address): Likewise.
4811 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4813 * thread-db.c (thread_db_find_new_threads): Add prototype.
4814 (thread_db_create_event): Check for the main thread before adding
4816 (maybe_attach_thread): Only enable event reporting if TID == 0.
4817 (thread_db_get_tls_address): Check for new threads.
4819 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4821 * linux-low.c (linux_create_inferior): Try execv before execvp.
4822 * spu-low.c (spu_create_inferior): Likewise.
4824 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4826 * linux-low.c (linux_create_inferior): Change execv to execvp.
4827 * spu-low.c (spu_create_inferior): Likewies.
4829 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4831 * Makefile.in (clean): Clean new files instead of deleted ones.
4832 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4833 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4835 * configure.srv: Specify XML files and new regformats for MIPS and
4837 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4838 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4839 an entry for the restart register.
4840 (mips_cannot_fetch_register, mips_cannot_store_register)
4841 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4842 register names to match the XML descriptions.
4843 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4844 restart register instead of $0.
4846 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4847 Markus Deuling <deuling@de.ibm.com>
4849 * remote-utils.c (decode_xfer_write): New function.
4850 * server.h (decode_xfer_write): Add prototype.
4851 * server.c (handle_query): Add PACKET_LEN argument. Support
4852 qXfer:spu:read and qXfer:spu:write packets.
4853 (main): Pass packet_len to handle_query.
4854 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4855 * target.h (target_ops): Add qxfer_spu.
4857 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4859 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4860 accessing non-seekable spufs files.
4862 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4864 * server.c (handle_query): Add reply for qC packet.
4866 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4867 Leo Zayas <lerele@champenstudios@com>
4869 * server.h (check_remote_input_interrupt_request): New function.
4870 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4871 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4872 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4873 (check_remote_input_interrupt_request): New function.
4874 * server.h (check_remote_input_interrupt_request): Declare.
4875 * win32-low.c (winapi_DebugBreakProcess,
4876 winapi_GenerateConsoleCtrlEvent): New typedefs.
4877 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4879 (win32_wait): Check for remote interrupt request
4880 with check_remote_input_interrupt_request.
4881 (win32_request_interrupt): New function.
4882 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4884 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4886 * win32-low.c (debug_registers_changed,
4887 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4888 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4889 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4890 (thread_rec): Get context using the low target.
4891 (child_add_thread): Call thread_added on the low target,
4892 which does the same thing.
4894 (do_initial_child_stuff): Remove debug registers references.
4895 Set context using the low target. Resume threads after
4896 setting the contexts.
4897 (child_continue): Remove dead variable. Remove debug
4898 registers references.
4899 (child_fetch_inferior_registers): Go through the low target.
4900 (do_child_store_inferior_registers): Remove.
4901 (child_store_inferior_registers): Go through the low target.
4902 (win32_resume): Remove debug registers references.
4903 Set context using the low target.
4904 (handle_exception): Change return type to void. Don't record
4905 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4906 first chance exception.
4907 (get_child_debug_event): Change return type to void. Remove
4908 goto loop. Always return after waiting for debug event.
4909 (win32_wait): Convert to switch statement. Handle spurious
4912 * win32-i386-low.c (debug_registers_changed,
4913 debug_registers_used): New.
4914 (initial_stuff): Rename to ...
4915 (i386_initial_stuff): ... this. Clear debug registers
4917 (store_debug_registers): Delete.
4918 (i386_get_thread_context): New.
4919 (load_debug_registers): Delete.
4920 (i386_set_thread_context): New.
4921 (i386_thread_added): New.
4922 (single_step): Rename to ...
4923 (i386_single_step): ... this.
4924 (do_fetch_inferior_registers): Rename to ...
4925 (i386_fetch_inferior_register): ... this.
4926 (i386_store_inferior_register): New.
4927 (the_low_target): Adapt to new interface.
4929 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4930 (arm_get_thread_context): New.
4931 (arm_set_thread_context): New.
4933 (do_fetch_inferior_registers): Rename to ...
4934 (arm_fetch_inferior_register): ... this.
4935 (arm_store_inferior_register): New.
4936 (arm_wince_breakpoint): Reimplement as unsigned long.
4937 (arm_wince_breakpoint_len): Define.
4938 (the_low_target): Adapt to new interface.
4940 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4941 load_debug_registers. Add get_thread_context, set_thread_context,
4942 thread_added and store_inferior_register. Rename
4943 fetch_inferior_registers to fetch_inferior_register.
4944 (regptr): Remove declaration.
4946 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4948 * linux-low.c (linux_detach): Change return type to int. Return 0.
4949 * spu-low.c (spu_detach): Likewise.
4951 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4953 * target.h (target_ops): Change return type of detach to int.
4955 (join_inferior): New.
4956 * server.c (main): Don't skip detach support on mingw32.
4957 If the inferior doesn't support detaching return error.
4958 Call join_inferior instead of using waitpid.
4959 * linux-low.c (linux_join): New.
4960 (linux_target_op): Add linux_join.
4961 * spu-low.c (spu_join): New.
4962 (spu_target_ops): Add spu_join.
4963 * win32-low.c (win32_detach): Adapt to new interface.
4964 Reopen current_process_handle before detaching. Issue a child
4965 resume before detaching.
4967 (win32_target_op): Add win32_join.
4969 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4971 * win32-low.c (win32-attach): Fix return value.
4972 * target.h (target_ops): Describe ATTACH return values.
4974 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4976 * win32-low.c (GETPROCADDRESS): Define.
4977 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4978 (winapi_DebugSetProcessKillOnExit): Likewise.
4979 (win32_create_inferior): Force usage of ansi CreateProcessA.
4980 (win32_attach): Use GETPROCADDRESS.
4981 (win32_detach): Likewise.
4983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4985 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4987 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4989 * win32-low.c: Commit leftover changes from 2007-03-29.
4991 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4993 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4994 fields short instead of int. Add explicit padding.
4995 (i387_cache_to_fsave): Remove unnecessary casts.
4996 (i387_fsave_to_cache): Doc fix.
4997 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4999 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5001 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5002 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5004 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5006 * configure.srv (arm*-*-mingw32ce*): Move near the other
5009 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5011 * configure.ac: Add errno checking.
5012 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5013 sys/file.h and malloc.h.
5014 (AC_CHECK_DECLS): Add perror.
5015 (srv_mingwce): Handle.
5016 * configure.srv (i[34567]86-*-cygwin*): Add
5017 win32-i386-low.o to srv_tgtobj.
5018 (i[34567]86-*-mingw*): Likewise.
5019 (arm*-*-mingw32ce*): Add case.
5020 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5021 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5022 [__MINGW32CE__] (strerror): New function.
5023 [__MINGW32CE__] (errno): Define to GetLastError.
5024 [__MINGW32CE__] (COUNTOF): New macro.
5025 (remote_open): Remove extra close call.
5026 * mem-break.c (delete_breakpoint_at): New function.
5027 * mem-break.h (delete_breakpoint_at): Declare.
5028 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5029 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5030 [USE_WIN32API] (read, write): Add char* casts.
5031 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5032 * server.h: Include wincecompat.h on Windows CE.
5033 [HAVE_ERRNO_H]: Check.
5034 (perror): Declare if not declared.
5035 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5036 (perror_with_name): Remove errno declaration.
5037 * wincecompat.h: New.
5038 * wincecompat.c: New.
5040 * win32-arm-low.c: New.
5041 * win32-i386-low.c: New.
5042 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5043 (OUTMSG2): Make it safe.
5045 (COUNTOF): New macro.
5046 (NUM_REGS): Get it from the low target.
5047 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5048 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5049 (thread_rec): Let low target handle debug registers.
5050 (child_add_thread): Likewise.
5051 (child_init_thread_list): Likewise.
5052 (continue_one_thread): Likewise.
5054 (do_child_fetch_inferior_registers): Move to ...
5055 * win32-i386-low.c: ... here, and rename to ...
5056 (do_fetch_inferior_registers): ... this.
5057 * win32-low.c (child_fetch_inferior_registers):
5058 Go through the low target.
5059 (do_child_store_inferior_registers): Use regptr.
5060 (strwinerror): New function.
5061 (win32_create_inferior): Handle Windows CE.
5062 Use strwinerror instead of strerror on Windows error
5063 codes. Add program to the error output.
5064 Don't close the main thread handle on Windows CE.
5065 (win32_attach): Use coredll.dll on Windows CE.
5066 (win32_kill): Close current process and current
5068 (win32_detach): Use coredll.dll on Windows CE.
5069 (win32_resume): Let low target handle debug registers, and
5071 (handle_exception): Add/Remove initial breakpoint. Avoid
5072 non-existant WSTOPSIG on Windows CE.
5073 (win32_read_inferior_memory): Cast to remove warning.
5074 (win32_arch_string): Go through the low target.
5075 (initialize_low): Call set_breakpoint_data with the low
5076 target's breakpoint.
5077 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5078 FOP_REGNUM, mappings): Move to ...
5079 * win32-i386-low.c: ... here.
5080 * win32-low.c (win32_thread_info): Move to ...
5081 * win32-low.h: ... here.
5082 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5083 win32-arm-low.c and wincecompat.c.
5084 (all:): Add $EXEEXT.
5085 (install-only:): Likewise.
5086 (gdbserver:): Likewise.
5087 (gdbreplay:): Likewise.
5088 * config.in: Regenerate.
5089 * configure: Regenerate.
5091 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5093 * win32-low.c: Rename typedef thread_info to
5094 win32_thread_info throughout.
5096 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5098 * win32-i386-low.c: Rename to ...
5099 * win32-low.c: ... this.
5100 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5101 * Makefile.in: Likewise.
5103 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5105 * remote-utils.c (monitor_output): Constify msg parameter.
5106 * server.h (monitor_output): Likewise.
5107 * win32-i386-low.c (handle_output_debug_string): New.
5108 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5109 handle_output_debug_string.
5110 (get_child_debug_event): Likewise.
5112 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5114 * server.c (main): Correct strtoul check.
5116 2007-03-27 Jon Ringle <jon@ringle.org>
5118 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5120 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5122 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5124 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5126 * terminal.h: Check HAVE_SGTTY_H.
5128 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5130 * remote-utils.c (remote_open): Print out the assigned port number.
5132 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5134 * remote-utils.c (monitor_output): New function.
5135 * server.c (debug_threads): Define here.
5136 (monitor_show_help): New function.
5137 (handle_query): Handle qRcmd.
5138 (main): Do not handle 'd' packet.
5139 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5140 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5143 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5145 * Makefile.in (EXEEXT): New.
5146 (clean): Use $(EXEEXT).
5148 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5150 * target.h (target_ops): Rename send_signal to request_interrupt,
5151 and remove enum target_signal parameter.
5152 * linux-low.c (linux_request_interrupt): Rename from
5153 linux_send_signal, and always send SIGINT.
5154 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5155 and always send SIGINT.
5156 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5158 (input_interrupt): Likewise.
5160 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5162 * server.c (get_features_xml): Check if target implemented
5164 * win32-i386-low.c (win32_arch_string): New.
5165 (win32_target_ops): Add win32_arch_string as arch_string member.
5167 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5169 * spu-low.c (spu_arch_string): New.
5170 (spu_target_ops): Add spu_arch_string.
5172 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5174 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5175 * configure.ac: Do not check for terminal.h.
5176 * configure, config.in: Regenerated.
5178 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5180 * Makefile.in (OBS): Add $(XML_BUILTIN).
5181 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5183 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5184 (arm-with-iwmmxt.c): New.
5185 * config.in, configure: Regenerate.
5186 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5187 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5188 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5189 (arm*-*-linux*): Add iWMMXt and regset support.
5190 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5191 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5192 (arm_store_wmmxregset, target_regsets): New.
5193 * server.c (get_features_xml): Take annex argument. Check builtin
5195 (handle_query): Handle multiple annexes.
5197 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5199 * remote-utils.c [USE_WIN32API] (read, write): Define.
5200 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5203 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5205 * linux-i386-low.c (the_low_target): Set arch_string.
5206 * linux-x86-64-low.c (the_low_target): Likewise.
5207 * linux-low.c (linux_arch_string): New.
5208 (linux_target_ops): Add it.
5209 * linux-low.h (struct linux_target_ops): Add arch_string.
5210 * server.c (write_qxfer_response): Use const void * for DATA.
5211 (get_features_xml): New.
5212 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5213 * target.h (struct target_ops): Add arch_string method.
5215 2007-01-03 Denis Pilat <denis.pilat@st.com>
5216 Daniel Jacobowitz <dan@codesourcery.com>
5218 * linux-low.c (linux_kill): Handle being called with no threads.
5219 * win32-i386-low.c (win32_kill): Likewise.
5220 (get_child_debug_event): Clear current_process_handle.
5222 2006-12-30 Denis PILAT <denis.pilat@st.com>
5223 Daniel Jacobowitz <dan@codesourcery.com>
5225 * remote-utils.c (remote_open): Check the type of specified
5226 serial port devices before opening them.
5227 * server.c (main): Kill the inferior if an error occurs during
5228 the first remote_open.
5230 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5232 * README: Update supported targets.
5234 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5236 * Makefile.in (clean): Remove reg-mips64.c.
5237 (reg-mips64.c, reg-mips64.o): New rules.
5238 * configure.srv: Handle mips64. Include regset support for mips.
5239 * linux-mips-low.c (union mips_register): New.
5240 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5241 (mips_breakpoint, mips_breakpoint_at): Use int.
5242 (mips_collect_register, mips_supply_register)
5243 (mips_collect_register_32bit, mips_supply_register_32bit)
5244 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5245 (mips_store_fpregset, target_regsets): New.
5246 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5248 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5250 * configure.srv: Add target "spu*-*-*".
5251 * Makefile.in (clean): Remove reg-spu.c.
5252 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5253 * spu-low.c: New file.
5255 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5257 * configure.ac: Correct td_thr_tls_get_addr test.
5258 * configure: Regenerated.
5260 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5262 * linux-low.c (linux_wait_for_event): Reformat. Use the
5264 * remote-utils.c (decode_address_to_semicolon): New.
5265 * server.c (pass_signals, handle_general_set): New.
5266 (handle_query): Mention QPassSignals for qSupported.
5267 (main): Call handle_general_set.
5268 * server.h (pass_signals, decode_address_to_semicolon): New.
5270 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5272 * server.c (handle_query): Correct error handling for read_auxv.
5274 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5276 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5277 and srv_linux_thread_db to yes.
5278 * linux-s390-low.c (s390_fill_gregset): New function.
5279 (target_regsets): Define data structure.
5281 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5283 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5284 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5285 * config.in, configure: Regenerated.
5286 * inferiors.c (gdb_id_to_thread): New function.
5287 (gdb_id_to_thread_id): Use it.
5288 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5289 * linux-low.h (struct process_info): Add th member.
5290 (thread_db_get_tls_address): New prototype.
5291 * remote-utils.c (decode_address): Make non-static.
5292 * server.c (handle_query): Handle qGetTLSAddr.
5293 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5294 * target.h (struct target_ops): Add get_tls_address.
5295 * thread-db.c (maybe_attach_thread): Save the thread handle.
5296 (thread_db_get_tls_address): New.
5298 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5300 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5301 (linux_resume_one_process): Take a siginfo_t *. Update all
5302 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5303 (struct pending_signals): Add a siginfo_t.
5304 (linux_wait_for_process): Always set last_status.
5305 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5306 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5307 * linux-low.h (struct process_info): Add last_status.
5309 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5311 * remote-utils.c (try_rle): New function.
5312 (putpkt_binary): Use it.
5314 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5316 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5317 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5318 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5319 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5320 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5323 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5325 * server.c (terminal_fd): New variable.
5326 (old_foreground_pgrp): Likewise.
5327 (restore_old_foreground_pgrp): New function.
5328 (start_inferior): Record the terminal file descriptor in terminal_fd
5329 and its original foreground group in old_foreground_pgrp. Register
5330 restore_old_foreground_pgrp with atexit().
5332 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5334 * server.c (handle_query): Correct qPart to qXfer.
5336 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5338 * configure.ac: Check for more headers which are missing on
5339 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5340 * configure.srv: Add Cygwin and mingw32.
5341 * remote-utils.c: Don't include headers unconditionally which
5342 are missing on mingw32. Include <winsock.h> for mingw32.
5343 (remote_open): Adjust for mingw32 support. Flush
5344 standard error after writing to it.
5345 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5346 (unblock_async_io, enable_async_io, disable_async_io)
5347 (readchar, getpkt): Update for Winsock support.
5348 (prepare_resume_reply): Expect a protocol signal number.
5349 * server.c: Disable <sys/wait.h> on mingw32.
5350 (start_inferior): Adjust for mingw32 support. Flush
5351 standard error after writing to it.
5352 (attach_inferior): Likewise. Use protocol signal
5354 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5356 * win32-i386-low.c: New file.
5357 * Makefile.in (XM_CLIBS): Set.
5358 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5359 (win32-i386-low.o): New dependency rule.
5360 * linux-low.c (linux_wait): Use target signal numbers.
5361 * target.h (struct target_ops): Doc fix.
5362 * server.h (target_signal_to_name): New prototype.
5363 * gdbreplay.c: Don't include headers unconditionally which
5364 are missing on mingw32. Include <winsock.h> for mingw32.
5365 (remote_close, remote_open): Adjust for Winsock support.
5366 * configure, config.in: Regenerated.
5368 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5370 * server.c (decode_xfer_read, write_qxfer_response): New.
5371 (handle_query): Take a packet length argument. Handle
5372 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5373 the qSupported response.
5374 (main): Update call to handle_query.
5376 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5378 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5379 (putpkt_binary): Renamed from putpkt and adjusted for binary
5381 (putpkt): New wrapper for putpkt_binary.
5382 (readchar): Don't mask off the high bit.
5383 (decode_X_packet): New function.
5384 * server.c (main): Call putpkt_binary if a handler sets the packet
5385 length. Save the length of the incoming packet. Handle 'X'.
5386 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5388 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5390 * server.c (handle_query): Handle qSupported.
5392 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5394 * remote-utils.c (all_symbols_looked_up): New variable.
5395 (look_up_one_symbol): Check it.
5396 * server.h (look_up_one_symbol): New declaration.
5397 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5399 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5401 * Makefile.in (linux-arm-low.o): Update dependencies.
5402 * linux-arm-low.c: Include "gdb_proc_service.h".
5403 (PTRACE_GET_THREAD_AREA): Define.
5404 (ps_get_thread_area): New function.
5406 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5408 * configure.srv (m68k*-*-uclinux*): New target.
5409 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5410 (linux_resume_one_process): Remove extraneous cast.
5411 (linux_read_offsets): New.
5412 (linux_target_op): Add linux_read_offsets on mmuless systems.
5413 * server.c (handle_query): Add qOffsets logic.
5414 * target.h (struct target_ops): Add read_offsets.
5416 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5418 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5419 (PTRACE_GET_THREAD_AREA): Define.
5420 (ps_get_thread_area): New function.
5421 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5422 (linux-x86-64-low.o): Update.
5424 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5426 * configure.ac: Remove checks for prfpregset_t.
5427 * gdb_proc_service.h: New file.
5428 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5429 new "gdb_proc_service.h".
5430 * proc-service.c: Likewise.
5431 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5432 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5433 * Makefile.in (gdb_proc_service_h): Updated.
5434 * configure, config.in: Regenerated.
5436 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5438 * remote-utils.c (prepare_resume_reply): Move declaration
5439 of gdb_id_from_wait to the top of the block.
5441 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5443 * linux-low.c (regsets_store_inferior_registers): Read the regset
5444 from the target before filling it.
5446 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5448 * server.c (attach_inferior): Return SIGTRAP for a successful
5451 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5453 * Makefile.in (OBS): Add version.o.
5454 (STAGESTUFF): Delete.
5455 (version.o): Add dependencies.
5456 (version.c): Replace rule.
5457 (clean): Remove version.c.
5458 * server.c (gdbserver_version): New.
5459 (gdbserver_usage): Use printf.
5460 (main): Handle --version and --help.
5461 * server.h (version, host_name): Add declarations.
5463 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5475 * linux-x86-64-low.c:
5478 * linux-ppc64-low.c:
5487 * linux-crisv32-low.c:
5499 * gdbserver.1: Add (C) after Copyright. Update the FSF
5502 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5504 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5505 (arm_breakpoint_at): Recognize both breakpoints.
5506 (the_low_target): Use the correct breakpoint instruction.
5508 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5510 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5511 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5512 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5513 (the_low_target): Update.
5515 2005-10-25 Andreas Schwab <schwab@suse.de>
5517 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5519 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5520 (ia64_num_regs): Reduce to 462.
5522 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5524 * acinclude.m4: Correct quoting.
5525 * aclocal.m4: Regenerated.
5527 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5528 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5529 (thread_db_init): Call thread_db_err_str.
5530 * configure.ac: Check for TD_VERSION.
5531 * config.in, configure: Regenerated.
5533 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5535 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5537 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5539 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5540 is not available. Define HAVE_PTRACE_GETREGS if it is.
5541 * config.in, configure: Regenerated.
5542 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5543 * linux-i386-low.c, linux-m68k-low.c: Update to use
5544 HAVE_PTRACE_GETREGS.
5545 * linux-low.c (regsets_fetch_inferior_registers)
5546 (regsets_store_inferior_registers): Only return 0 if we processed
5548 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5549 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5551 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5553 * inferiors.c (struct thread_info): Add gdb_id.
5554 (add_thread): Add gdb_id argument.
5555 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5556 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5557 calls to add_thread.
5558 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5559 * server.c (handle_query): Use thread_to_gdb_id.
5560 (handle_v_cont, main): Use gdb_id_to_thread_id.
5561 * server.h (add_thread): Update prototype.
5562 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5565 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5567 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5568 left-padded registers.
5569 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5570 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5572 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5574 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5575 * configure: Regenerate.
5576 * config.in: Regenerate.
5577 * server.h (NEED_DECLARATION_STRERROR):
5578 Replace with !HAVE_DECL_STRERROR.
5580 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5582 * linux-low.c (linux_wait, linux_send_signal): Don't test
5583 an unsigned long variable for > 0 if it could be MAX_ULONG.
5584 * server.c (myresume): Likewise.
5585 * target.c (set_desired_inferior): Likewise.
5587 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5589 * configure.ac: Simplify and improve check for socklen_t.
5590 * configure, config.in: Regenerate.
5592 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5594 * acconfig.h: Remove.
5595 * configure.ac: Add a test for socklen_t. Use three-argument
5596 AC_DEFINE throughout.
5597 * config.in: Regenerated using autoheader 2.59.
5598 * configure: Regenerated.
5600 * gdbreplay.c (socklen_t): Provide a default.
5601 (remote_open): Use socklen_t.
5602 * remote-utils.c (socklen_t): Provide a default.
5603 (remote_open): Use socklen_t.
5604 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5607 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5609 * linux-low.c (linux_read_memory, linux_write_memory)
5610 (linux_read_auxv): Likewise.
5611 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5612 (check_mem_write): Likewise.
5613 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5615 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5616 (registers_from_string, register_data): Likewise.
5617 * server.c (handle_query, main): Likewise.
5618 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5619 (decode_M_packet): Likewise.
5620 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5621 * target.h (struct target_ops): Update read_memory, write_memory,
5623 (read_inferior_memory, write_inferior_memory): Update.
5624 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5626 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5627 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5628 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5629 linux-s390-low.c, linux-sh-low.c: Update for changes in
5630 read_inferior_memory and the_low_target->breakpoint.
5632 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5634 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5635 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5636 * configure.srv: Add powerpc64-*-linux*.
5637 * linux-ppc64-low.c: New file.
5639 2005-05-23 Orjan Friberg <orjanf@axis.com>
5641 * linux-cris-low.c: New file with support for CRIS.
5642 * linux-crisv32-low.c: Ditto for CRISv32.
5643 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5644 (clean): Add reg-cris.c and reg-crisv32.c.
5645 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5646 reg-crisv32.o, and reg-crisv32.c to make rules.
5647 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5650 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5652 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5653 of sizeof (PTRACE_XFER_TYPE).
5654 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5656 2005-05-12 Orjan Friberg <orjanf@axis.com>
5658 * target.h (struct target_ops): Add insert_watchpoint,
5659 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5660 pointers for hardware watchpoint support.
5661 * linux-low.h (struct linux_target_ops): Ditto.
5662 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5663 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5664 to linux_target_ops.
5665 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5667 * server.c (main): Recognize 'Z' and 'z' packets.
5669 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5671 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5672 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5673 (the_low_target): Add new members.
5675 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5677 * proc-service.c (ps_lgetregs): Search all_processes instead of
5680 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5682 * server.c (start_inferior): Change return type to int.
5683 (attach_inferior): Change sigptr to int *.
5684 (handle_v_cont, handle_v_requests): Change signal to int *.
5685 (main): Change signal to int.
5687 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5689 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5690 * configure.srv: Add m32r*-*-linux*.
5691 * linux-m32r-low.c: New file.
5693 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5695 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5697 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5699 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5700 Take unsigned long arguments for PIDs.
5701 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5702 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5703 (wait_for_sigstop, linux_resume_one_process)
5704 (regsets_fetch_inferior_registers, linux_send_signal)
5705 (linux_read_auxv): Likewise. Update the types of variables holding
5706 PIDs. Update format string specifiers.
5707 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5708 * remote-utils.c (prepare_resume_reply): Likewise.
5709 * server.c (cont_thread, general_thread, step_thread)
5710 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5712 (handle_query): Update format specifiers.
5713 (handle_v_cont, main): Use strtoul for thread IDs.
5714 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5715 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5716 (general_thread, step_thread, thread_from_wait)
5717 (old_thread_from_wait): Update.
5718 * target.h (struct thread_resume): Use unsigned long for THREAD.
5719 (struct target_ops): Use unsigned long for arguments to attach and
5722 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5724 * acinclude.m4: Include bfd/bfd.m4 directly.
5725 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5726 <agriffis@toolchain.org>.
5727 * aclocal.m4, configure: Regenerated.
5729 2005-01-07 Andrew Cagney <cagney@gnu.org>
5731 * configure.ac: Rename configure.in, require autoconf 2.59.
5732 * configure: Re-generate.
5734 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5736 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5738 * aclocal.m4: Regenerated.
5739 * configure: Regenerated.
5741 2004-11-21 Andreas Schwab <schwab@suse.de>
5743 * linux-m68k-low.c (m68k_num_gregs): Define.
5744 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5745 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5746 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5747 (m68k_breakpoint_at): New. Add to the_low_target.
5749 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5750 srv_linux_thread_db to yes.
5752 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5754 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5755 (ARCH_SET_FS): Likewise.
5756 (ARCH_GET_FS): Likewise.
5757 (ARCH_GET_GS): Likewise.
5759 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5761 * linux-i386-low.c (ps_get_thread_area): New.
5762 * linux-x86-64-low.c (ps_get_thread_area): New.
5763 * linux-low.c: Include <sys/syscall.h>.
5764 (linux_kill_one_process): Don't kill the first thread here.
5765 (linux_kill): Kill the first thread here.
5766 (kill_lwp): New function.
5767 (send_sigstop, linux_send_signal): Use it.
5768 * proc-service.c: Clean up #ifdefs.
5769 (fpregset_info): Delete.
5770 (ps_lgetregs): Update and enable implementation.
5771 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5773 * remote-utils.c (struct sym_cache, symbol_cache): New.
5774 (input_interrupt): Print a clearer message.
5775 (async_io_enabled): New variable.
5776 (enable_async_io, disable_async_io): Use it. Update comments.
5777 (look_up_one_symbol): Use the symbol cache.
5778 * thread-db.c (thread_db_look_up_symbols): New function.
5779 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5781 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5783 * configure.in: Test for -rdynamic.
5784 * configure: Regenerated.
5785 * Makefile (INTERNAL_LDFLAGS): New.
5786 (gdbserver, gdbreplay): Use it.
5788 2004-09-02 Andrew Cagney <cagney@gnu.org>
5790 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5792 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5794 * linux-low.c (linux_wait): Clear all_processes list also.
5796 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5798 * linux-low.c: Include <errno.h>. Remove extern declaration of
5801 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5803 * gdbreplay.c, server.h, utils.c: Update copyright years.
5805 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5807 * server.c (main): Print child status or termination signal from
5808 variable 'signal', not 'sig'.
5810 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5812 * linux-low.c (linux_read_memory): Change return type to
5813 int. Check for and return error from ptrace().
5814 * target.c (read_inferior_memory): Change return type to int. Pass
5815 back return status from the_target->read_memory().
5816 * target.h (struct target_ops): Adapt *read_memory() prototype.
5818 (read_inferior_memory): Adapt prototype.
5819 * server.c (main): Return an error packet if
5820 read_inferior_memory() returns an error.
5822 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5824 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5825 Unify with other clean targets.
5827 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5829 * server.c (handle_v_cont): Call set_desired_inferior.
5831 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5833 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5837 * linux-low.c (linux_wait): Unblock async I/O.
5838 (linux_resume): Block and enable async I/O.
5839 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5840 * server.h (block_async_io, unblock_async_io): Add prototypes.
5842 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5844 * remote-utils.c (remote_open): Print a status notice after
5846 * server.c (attach_inferior): Print a status notice after
5849 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5851 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5853 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5855 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5857 * server.c, target.h: Update copyright years.
5859 2004-02-25 Roland McGrath <roland@redhat.com>
5861 * target.h (struct target_ops): New member `read_auxv'.
5862 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5863 * linux-low.c (linux_read_auxv): New function.
5864 (linux_target_ops): Initialize `read_auxv' member to that.
5866 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5868 Committed by Jim Blandy <jimb@redhat.com>.
5870 * linux-s390-low.c (s390_num_regs): Update.
5871 (s390_regmap): Remove control registers. Use __s390x__ predefine
5872 instead of GPR_SIZE to distiguish s390 and s390x targets.
5874 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5876 * linux-low.c: Update copyright year.
5877 (check_removed_breakpoint): Clear pending_is_breakpoint.
5878 (linux_set_resume_request, linux_queue_one_thread)
5879 (resume_status_pending_p): New functions.
5880 (linux_continue_one_thread): Use process->resume.
5881 (linux_resume): Only resume threads if there are no pending events.
5882 * linux-low.h (struct process_info): Add resume request
5885 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5887 * regcache.c (new_register_cache): Clear the allocated register
5888 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5890 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5892 * linux-low.c (linux_resume): Take a struct thread_resume *
5894 (linux_wait): Update call.
5895 (resume_ptr): New static variable.
5896 (linux_continue_one_thread): Renamed from
5897 linux_continue_one_process. Use resume_ptr.
5898 (linux_resume): Use linux_continue_one_thread.
5899 * server.c (handle_v_cont, handle_v_requests): New functions.
5900 (myresume): New function.
5901 (main): Handle 'v' case.
5902 * target.h (struct thread_resume): New type.
5903 (struct target_ops): Change argument of "resume" to struct
5905 (myresume): Delete macro.
5907 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5909 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5910 (uninstall): Support DESTDIR.
5912 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5914 * configure.srv: Add xscale*linux copy of arm*linux entry.
5916 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5918 * linux-arm-low.c (arm_reinsert_addr): New function.
5919 (the_low_target): Add arm_reinsert_addr.
5921 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5923 * mem-break.c: Remove whitespace at end of file.
5925 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5927 * configure.in: Check whether we need to prototype strerror.
5928 * server.h: Optionally prototype strerror.
5929 * gdbreplay.c (perror_with_name): Use strerror.
5930 * linux-low.c (linux_attach_lwp): Use strerror.
5931 * utils.c (perror_with_name): Use strerror.
5932 * config.in, configure: Regenerated.
5934 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5936 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5937 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5939 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5941 * Makefile.in (SFILES): Update.
5942 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5943 low-sun3.c: Remove files.
5945 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5947 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5948 (linux_detach_one_process, linux_detach): New functions.
5949 (linux_target_ops): Add linux_detach.
5950 * server.c (main): Handle 'D' packet.
5951 * target.h (struct target_ops): Add "detach" member.
5952 (detach_inferior): Define.
5954 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5956 From Kelley Cook <kelleycook@wideopenwest.com>:
5957 * configure.srv: Accept i[34567]86 variants.
5959 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5961 * linux-low.c (linux_wait_for_event): Correct comment typos.
5962 (linux_resume_one_process): Call check_removed_breakpoint.
5963 (linux_send_signal): New function.
5964 (linux_target_ops): Add linux_send_signal.
5965 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5967 * target.h (struct target_ops): Add send_signal.
5969 2003-05-29 Jim Blandy <jimb@redhat.com>
5971 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5972 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5973 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5974 away part of the register's value.
5976 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5978 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5979 (linux_wait_for_event, linux_init_signals): Likewise.
5981 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5983 * configure.in: Check for stdlib.h.
5984 * configure: Regenerated.
5985 * config.in: Regenerated.
5987 2003-01-04 Andreas Schwab <schwab@suse.de>
5989 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5991 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5993 * Makefile.in: Remove obsolete code.
5995 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5997 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5998 defined(PT_FPR0_HI).
6000 2002-11-17 Stuart Hughes <seh@zee2.com>
6002 * linux-arm-low.c (arm_num_regs): Increase.
6003 (arm_regmap): Include status register.
6005 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6007 * linux-low.c (register_addr): Remove incorrect -1 check.
6009 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6011 * linux-low.c (linux_create_inferior): Call setpgid. Return
6013 (unstopped_p, linux_signal_pid): Remove.
6014 (linux_target_ops): Remove linux_signal_pid.
6015 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6016 global instead of target method.
6017 * target.h (struct target_ops): Remove signal_pid. Update comment
6018 for create_inferior.
6019 * server.c (signal_pid): New variable.
6020 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6021 gdbserver. Set the child to be the foreground process group.
6022 (attach_inferior): Set signal_pid.
6024 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6026 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6028 2002-08-20 Jim Blandy <jimb@redhat.com>
6030 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6033 2002-08-01 Andrew Cagney <cagney@redhat.com>
6035 * Makefile.in: Make chill references obsolete.
6037 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6039 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6040 * configure: Regenerate.
6041 * config.in: Regenerate.
6043 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6045 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6046 (perror_with_name, remote_close, remote_open, expect, play): Static.
6048 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6050 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6051 byte offsets instead of an array of indexes.
6052 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6054 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6056 * regcache.c: Add comment.
6058 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6060 * thread-db.c: New file.
6061 * proc-service.c: New file.
6062 * acinclude.m4: New file.
6063 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6064 proc-service.o, and thread-db.o.
6065 (linux-low.o): Add USE_THREAD_DB.
6066 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6067 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6068 * aclocal.m4: Regenerated.
6069 * config.in: Regenerated.
6070 * configure: Regenerated.
6071 * configure.in: Check for proc_service.h, sys/procfs.h,
6072 thread_db.h, and linux/elf.h headrs.
6073 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6074 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6075 Check for -lthread_db and thread support.
6076 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6077 PowerPC, and SuperH.
6078 * i387-fp.c: Constify arguments.
6079 * i387-fp.h: Likewise.
6080 * inferiors.c: (struct thread_info): Renamed from
6081 `struct inferior_info'. Remove PID member. Use generic inferior
6082 list header. All uses updated.
6083 (inferiors, signal_pid): Removed.
6084 (all_threads): New variable.
6085 (get_thread): Define.
6086 (add_inferior_to_list): New function.
6087 (for_each_inferior): New function.
6088 (change_inferior_id): New function.
6089 (add_inferior): Removed.
6090 (remove_inferior): New function.
6091 (add_thread): New function.
6092 (free_one_thread): New function.
6093 (remove_thread): New function.
6094 (clear_inferiors): Use for_each_inferior and free_one_thread.
6095 (find_inferior): New function.
6096 (find_inferior_id): New function.
6097 (inferior_target_data): Update argument type.
6098 (set_inferior_target_data): Likewise.
6099 (inferior_regcache_data): Likewise.
6100 (set_inferior_regcache_data): Likewise.
6101 * linux-low.c (linux_bp_reinsert): Remove.
6102 (all_processes, stopping_threads, using_thrads)
6103 (struct pending_signals, debug_threads, pid_of): New.
6104 (inferior_pid): Replace with macro.
6105 (struct inferior_linux_data): Remove.
6106 (get_stop_pc, add_process): New functions.
6107 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6108 Use add_process and add_thread.
6109 (linux_attach_lwp): New function, based on old linux_attach. Use
6110 add_process and add_thread. Set stop_expected for new threads.
6111 (linux_attach): New function.
6112 (linux_kill_one_process): New function.
6113 (linux_kill): Kill all LWPs.
6114 (linux_thread_alive): Use find_inferior_id.
6115 (check_removed_breakpoints, status_pending_p): New functions.
6116 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6117 Update. Use WNOHANG. Wait for cloned processes also. Update process
6118 struct for the found process.
6119 (linux_wait_for_event): New function.
6120 (linux_wait): Use it. Support LWPs.
6121 (send_sigstop, wait_for_sigstop, stop_all_processes)
6122 (linux_resume_one_process, linux_continue_one_process): New functions.
6123 (linux_resume): Support LWPs.
6124 (REGISTER_RAW_SIZE): Remove.
6125 (fetch_register): Use register_size instead. Call supply_register.
6126 (usr_store_inferior_registers): Likewise. Call collect_register.
6128 (regsets_fetch_inferior_registers): Improve error message.
6129 (regsets_store_inferior_registers): Add debugging.
6130 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6131 (unstopped_p, linux_signal_pid): New functions.
6132 (linux_target_ops): Add linux_signal_pid.
6133 (linux_init_signals): New function.
6134 (initialize_low): Call it. Initialize using_threads.
6135 * regcache.c (inferior_regcache_data): Add valid
6137 (get_regcache): Fetch registers lazily. Add fetch argument
6138 and update all callers.
6139 (regcache_invalidate_one, regcache_invalidate): New
6141 (new_register_cache): Renamed from create_register_cache.
6142 Return the new regcache.
6143 (free_register_cache): Change argument to a void *.
6144 (registers_to_string, registers_from_string): Call get_regcache
6145 with fetch flag set.
6146 (register_data): Make static. Pass fetch flag to get_regcache.
6147 (supply_register): Call get_regcache with fetch flag clear.
6148 (collect_register): Call get_regcache with fetch flag set.
6149 (collect_register_as_string): New function.
6150 * regcache.h: Update.
6151 * remote-utils.c (putpkt): Flush after debug output and use
6153 Handle input interrupts while waiting for an ACK.
6154 (input_interrupt): Use signal_pid method.
6155 (getpkt): Flush after debug output and use stderr.
6156 (outreg): Use collect_register_as_string.
6157 (new_thread_notify, dead_thread_notify): New functions.
6158 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6160 (look_up_one_symbol): Flush after debug output.
6161 * server.c (step_thread, server_waiting): New variables.
6162 (start_inferior): Don't use signal_pid. Update call to mywait.
6163 (attach_inferior): Update call to mywait.
6164 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6165 (main): Don't fetch/store registers explicitly. Use
6166 set_desired_inferior. Support proposed ``Hs'' packet. Update
6169 (struct inferior_list, struct_inferior_list_entry): New.
6170 * target.c (set_desired_inferior): New.
6171 (write_inferior_memory): Constify.
6172 (mywait): New function.
6174 (struct target_ops): New signal_pid method.
6175 (mywait): Removed macro, added prototype.
6177 * linux-low.h (regset_func): Removed.
6178 (regset_fill_func, regset_store_func): New.
6179 (enum regset_type): New.
6180 (struct regset_info): Add type field. Use new operation types.
6181 (struct linux_target_ops): stop_pc renamed to get_pc.
6182 Add decr_pc_after_break and breakpoint_at.
6183 (get_process, get_thread_proess, get_process_thread)
6184 (strut process_info, all_processes, linux_attach_lwp)
6185 (thread_db_init): New.
6187 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6188 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6189 (the_low_target): Add new members.
6190 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6191 (i386_store_fpxregset): Constify.
6192 (target_regsets): Add new kind identifier.
6193 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6194 (i386_set_pc): Add debugging.
6195 (i386_breakpoint_at): New function.
6196 (the_low_target): Add new members.
6197 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6198 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6199 (mips_breakpoint_at): New.
6200 (the_low_target): Add new members.
6201 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6202 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6203 (the_low_target): Add new members.
6204 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6205 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6206 (the_low_target): Add new members.
6207 * linux-x86-64-low.c (target_regsets): Add new kind
6210 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6212 From Martin Pool <mbp@samba.org>:
6213 * server.c (gdbserver_usage): New function.
6216 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6218 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6221 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6223 * Makefile.in: Remove obsolete code.
6225 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6227 * linux-low.c (regsets_fetch_inferior_registers),
6228 (regsets_store_inferior_registers): Removed cast to int from
6230 * regcache.h: Added declaration of struct inferior_info.
6232 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6234 * inferiors.c (struct inferior_info): Add regcache_data.
6235 (add_inferior): Call create_register_cache.
6236 (clear_inferiors): Call free_register_cache.
6237 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6238 * regcache.c (struct inferior_regcache_data): New.
6239 (registers): Remove.
6240 (get_regcache): New function.
6241 (create_register_cache, free_register_cache): New functions.
6242 (set_register_cache): Don't initialize the register cache here.
6243 (registers_to_string, registers_from_string, register_data): Call
6245 * regcache.h: Add prototypes.
6246 * server.h: Likewise.
6248 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6250 * mem-break.c: New file.
6251 * mem-break.h: New file.
6252 * Makefile.in: Add mem-break.o rule; update server.h
6254 * inferiors.c (struct inferior_info): Add target_data
6256 (clear_inferiors): Free target_data member if set.
6257 (inferior_target_data, set_inferior_target_data): New functions.
6258 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6259 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6260 * linux-low.c (linux_bp_reinsert): New variable.
6261 (struct inferior_linux_data): New.
6262 (linux_create_inferior): Use set_inferior_target_data.
6263 (linux_attach): Likewise. Call add_inferior.
6264 (linux_wait_for_one_inferior): New function.
6265 (linux_wait): Call it.
6266 (linux_write_memory): Add const.
6267 (initialize_low): Call set_breakpoint_data.
6268 * linux-low.h (struct linux_target_ops): Add breakpoint
6270 * server.c (attach_inferior): Remove extra add_inferior
6272 * server.h: Include mem-break.h. Update inferior.c
6274 * target.c (read_inferior_memory)
6275 (write_inferior_memory): New functions.
6276 * target.h (read_inferior_memory)
6277 (write_inferior_memory): Change macros to prototypes.
6278 (struct target_ops): Update comments. Add const to write_memory
6281 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6283 * linux-low.c (usr_store_inferior_registers): Support
6284 registers which are allowed to fail to store.
6285 * linux-low.h (linux_target_ops): Likewise.
6286 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6287 (ppc_cannot_store_register): FPSCR may not be storable.
6289 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6291 * server.h: Include <string.h> if HAVE_STRING_H.
6292 * ChangeLog: Correct paths in last ChangeLog entry.
6294 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6296 * linux-low.h: Remove obsolete prototypes.
6297 (struct linux_target_ops): New.
6298 (extern the_low_target): New.
6299 * linux-low.c (num_regs, regmap): Remove declarations.
6300 (register_addr): Use the_low_target explicitly.
6301 (fetch_register): Likewise.
6302 (usr_fetch_inferior_registers): Likewise.
6303 (usr_store_inferior_registers): Likewise.
6304 * linux-arm-low.c (num_regs): Remove.
6305 (arm_num_regs): Define.
6306 (arm_regmap): Renamed from regmap, made static.
6307 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6309 (arm_cannot_store_register): Renamed from cannot_store_register,
6311 (the_low_target): New.
6312 * linux-i386-low.c (num_regs): Remove.
6313 (i386_num_regs): Define.
6314 (i386_regmap): Renamed from regmap, made static.
6315 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6317 (i386_cannot_store_register): Renamed from cannot_store_register,
6319 (the_low_target): New.
6320 * linux-ia64-low.c (num_regs): Remove.
6321 (ia64_num_regs): Define.
6322 (ia64_regmap): Renamed from regmap, made static.
6323 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6325 (ia64_cannot_store_register): Renamed from cannot_store_register,
6327 (the_low_target): New.
6328 * linux-m68k-low.c (num_regs): Remove.
6329 (m68k_num_regs): Define.
6330 (m68k_regmap): Renamed from regmap, made static.
6331 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6333 (m68k_cannot_store_register): Renamed from cannot_store_register,
6335 (the_low_target): New.
6336 * linux-mips-low.c (num_regs): Remove.
6337 (mips_num_regs): Define.
6338 (mips_regmap): Renamed from regmap, made static.
6339 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6341 (mips_cannot_store_register): Renamed from cannot_store_register,
6343 (the_low_target): New.
6344 * linux-ppc-low.c (num_regs): Remove.
6345 (ppc_num_regs): Define.
6346 (ppc_regmap): Renamed from regmap, made static.
6347 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6349 (ppc_cannot_store_register): Renamed from cannot_store_register,
6351 (the_low_target): New.
6352 * linux-s390-low.c (num_regs): Remove.
6353 (s390_num_regs): Define.
6354 (s390_regmap): Renamed from regmap, made static.
6355 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6357 (s390_cannot_store_register): Renamed from cannot_store_register,
6359 (the_low_target): New.
6360 * linux-sh-low.c (num_regs): Remove.
6361 (sh_num_regs): Define.
6362 (sh_regmap): Renamed from regmap, made static.
6363 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6365 (sh_cannot_store_register): Renamed from cannot_store_register,
6367 (the_low_target): New.
6368 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6369 (the_low_target): New.
6371 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6373 * Makefile.in: Add stamp-h target.
6374 * configure.in: Create stamp-h.
6375 * configure: Regenerated.
6377 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6379 * inferiors.c: New file.
6380 * target.c: New file.
6381 * target.h: New file.
6382 * Makefile.in: Add target.o and inferiors.o. Update
6384 * linux-low.c (inferior_pid): New static variable,
6385 moved from server.c.
6386 (linux_create_inferior): Renamed from create_inferior.
6387 Call add_inferior. Return 0 on success instead of a PID.
6388 (linux_attach): Renamed from myattach.
6389 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6390 (linux_thread_alive): Renamed from mythread_alive.
6391 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6393 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6394 (regsets_store_inferior_registers): Correct error message.
6395 Add missing ``return 0''.
6396 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6397 (linux_store_registers): Renamed from store_inferior_registers.
6398 (linux_read_memory): Renamed from read_inferior_memory.
6399 (linux_write_memory): Renamed from write_inferior_memory.
6400 (linux_target_ops): New structure.
6401 (initialize_low): Call set_target_ops ().
6402 * remote-utils.c (unhexify): New function.
6403 (hexify): New function.
6404 (input_interrupt): Send signals to ``signal_pid''.
6405 * server.c (inferior_pid): Remove.
6406 (start_inferior): Update create_inferior call.
6407 (attach_inferior): Call add_inferior.
6408 (handle_query): New function.
6409 (main): Call handle_query for `q' packets.
6410 * server.h: Include "target.h". Remove obsolete prototypes.
6411 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6413 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6415 * Makefile.in: Add WARN_CFLAGS. Update configury
6417 * configure.in: Check for <string.h>
6418 * configure: Regenerate.
6419 * config.in: Regenerate.
6420 * gdbreplay.c: Include needed system headers.
6421 (remote_open): Remove strchr prototype.
6422 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6423 * regcache.c (supply_register): Change buf argument to const void *.
6424 (supply_register_by_name): Likewise.
6425 (collect_register): Change buf argument to void *.
6426 (collect_register_by_name): Likewise.
6427 * regcache.h: Add missing prototypes.
6428 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6429 * server.c (handle_query): New function.
6430 (attached): New static variable, moved out of main.
6431 (main): Quiet longjmp clobber warnings.
6432 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6433 * utils.c (error): Remove NORETURN.