1 2011-12-14 Yao Qi <yao@codesourcery.com>
3 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6 2011-12-14 Yao Qi <yao@codesourcery.com>
8 * i386-low.c (i386_low_stopped_data_address): Initialize local
11 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16 DR_CONTROL unless necessary. Extend comments.
17 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
18 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
20 2011-12-13 Yao Qi <yao@codesourcery.com>
22 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
24 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
26 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
28 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
29 Print new debug message for such case.
31 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
33 Fix overlapping memcpy.
34 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
35 the read_inferior_memory transfer.
36 (delete_fast_tracepoint_jump): New variable buf. Use it for the
37 write_inferior_memory transfer.
38 (set_fast_tracepoint_jump): New variable buf. Use it for the
39 read_inferior_memory and write_inferior_memory transfers.
40 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
41 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
42 Use it for the write_inferior_memory transfer.
43 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
46 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
48 * linux-low.c (fetch_register, store_register): Make code
49 consistent, fix formatting.
51 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
53 * linux-low.c (usr_store_inferior_registers): Factor out code
54 to handle individual registers into...
55 (store_register): ... this new function.
57 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
59 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
60 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
61 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
62 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
63 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
64 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
65 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
66 (srv_xmlfiles): Add new XML files.
68 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
70 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
71 (init_registers_s390_linux32v1): Add prototype.
72 (init_registers_s390_linux32v2): Likewise.
73 (init_registers_s390_linux64v1): Likewise.
74 (init_registers_s390_linux64v2): Likewise.
75 (init_registers_s390x_linux64v1): Likewise.
76 (init_registers_s390x_linux64v2): Likewise.
77 (s390_num_regs): Increment to 52.
78 (s390_regmap): Add orig_r2 register.
79 (s390_num_regs_3264): Increment to 68.
80 (s390_regmap_3264): Add orig_r2 register.
81 (s390_collect_ptrace_register): Handle orig_r2 register.
82 (s390_supply_ptrace_register): Likewise.
83 (s390_fill_last_break): New function.
84 (s390_store_last_break): Likewise.
85 (s390_fill_system_call): New function.
86 (s390_store_system_call): Likewise.
87 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
89 (s390_check_regset): New function.
90 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
91 NT_S390_SYSTEM_CALL regsets and use appropriate description.
92 Update target_regsets for available register sets.
94 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
95 Jan Kratochvil <jan.kratochvil@redhat.com>
97 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
98 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
100 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
101 * linux-low.h (struct process_info_private): New member r_debug.
102 * server.c (handle_qxfer_libraries): Call
103 the_target->qxfer_libraries_svr4.
104 (handle_qxfer_libraries_svr4): New function.
105 (qxfer_packets): New entry "libraries-svr4".
106 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
107 * target.h (struct target_ops): New member qxfer_libraries_svr4.
108 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
109 PACKET_qXfer_libraries_svr4.
111 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
113 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
114 PSW address/mask between 8-byte and 16-byte formats.
115 (s390_supply_ptrace_register): Likewise.
116 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
117 basic addressing mode bit.
119 2011-11-24 Stan Shebs <stan@codesourcery.com>
121 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
123 2011-11-17 Stan Shebs <stan@codesourcery.com>
125 * tracepoint.c (struct tracepoint): New field traceframe_usage.
126 (tracing_start_time): New global.
127 (tracing_stop_time): New global.
128 (tracing_user_name): New global.
129 (tracing_notes): New global.
130 (tracing_stop_note): New global.
131 (cmd_qtstart): Set traceframe_usage, start_time.
132 (stop_tracing): Set stop_time.
133 (cmd_qtstatus): Report additional status.
134 (cmd_qtp): New function.
135 (handle_tracepoint_query): Call it.
136 (cmd_qtnotes): New function.
137 (handle_tracepoint_general_set): Call it.
138 (get_timestamp): Rename from tsv_get_timestamp.
140 2011-11-14 Stan Shebs <stan@codesourcery.com>
141 Kwok Cheung Yeung <kcy@codesourcery.com>
143 * linux-x86-low.c (small_jump_insn): New.
144 (i386_install_fast_tracepoint_jump_pad): Add arguments for
145 trampoline and error message, build a trampoline and issue a small
146 jump instruction to it.
147 (x86_install_fast_tracepoint_jump_pad): Add arguments for
148 trampoline and error message.
149 (x86_get_min_fast_tracepoint_insn_len): New.
150 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
151 * linux-low.h (struct linux_target_ops): Add arguments to
152 install_fast_tracepoint_jump_pad operation, add new operation.
153 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
155 (linux_get_min_fast_tracepoint_insn_len): New function.
156 (linux_target_op): Add new operation.
157 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
158 (gdb_trampoline_buffer_end): Ditto.
159 (gdb_trampoline_buffer_error): Ditto.
160 (struct ipa_sym_addresses): Add fields for new IPA variables.
161 (symbol_list): Add entries for new IPA variables.
162 (struct tracepoint): Add fields to hold the address range of the
163 trampoline used by the tracepoint.
164 (trampoline_buffer_head): New static variable.
165 (trampoline_buffer_tail): Ditto.
166 (claim_trampoline_space): New function.
167 (have_fast_tracepoint_trampoline_buffer): New function.
168 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
170 (install_fast_tracepoint): Ditto, also add error buffer argument.
171 (cmd_qtminftpilen): New function.
172 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
173 (fast_tracepoint_from_trampoline_address): New function.
174 (fast_tracepoint_collecting): Handle trampoline as part of jump
176 (set_trampoline_buffer_space): New function.
177 (initialize_tracepoint): Initialize new IPA variables.
178 * target.h (struct target_ops): Add arguments to
179 install_fast_tracepoint_jump_pad operation, add new
180 get_min_fast_tracepoint_insn_len operation.
181 (target_get_min_fast_tracepoint_insn_len): New.
182 (install_fast_tracepoint_jump_pad): Add arguments.
183 * server.h (IPA_BUFSIZ): Define.
184 * linux-i386-ipa.c: Include extra header files.
185 (initialize_fast_tracepoint_trampoline_buffer): New function.
186 (initialize_low_tracepoint): Call it.
187 * server.h (set_trampoline_buffer_space): Declare.
188 (claim_trampoline_space): Ditto.
189 (have_fast_tracepoint_trampoline_buffer): Ditto.
191 2011-11-14 Yao Qi <yao@codesourcery.com>
193 * server.c (handle_query): Handle InstallInTrace for qSupported.
194 * tracepoint.c (add_tracepoint): Sort list.
195 (install_tracepoint, download_tracepoint): New.
196 (cmd_qtdp): Call them to install and download tracepoints.
197 (sort_tracepoints): Removed.
198 (cmd_qtstart): Update.
200 2011-11-14 Yao Qi <yao@codesourcery.com>
202 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
203 * mem-break.h: Declare.
204 * tracepoint.c (cmd_qtstart): Move some code to ...
205 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
207 (download_tracepoints): Move some code to ...
208 (download_tracepoint_1): ... here. New.
210 2011-11-08 Yao Qi <yao@codesourcery.com>
212 * remote-utils.c (relocate_instruction): A comment fix.
214 2011-11-07 Joel Brobecker <brobecker@adacore.com>
216 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
217 (i386_dr_low_get_control, i386_dr_low_get_status): Use
218 dr_status_mirror and dr_control_mirror from debug_reg_state.
219 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
220 (i386_initial_stuff): Remove use of deleted globals.
221 (i386_get_thread_context, i386_set_thread_context,
222 i386_thread_added): Use dr_status_mirror and dr_control_mirror
223 from debug_reg_state.
225 2011-11-05 Yao Qi <yao@codesourcery.com>
227 * tracepoint.c (gdb_collect): Loop over tracepoints of same
230 2011-11-02 Stan Shebs <stan@codesourcery.com>
232 * tracepoint.c (agent_mem_read_string): New function.
233 (eval_agent_expr): Call it for tracenz.
234 * server.c (handle_query): Report support for tracenz.
236 2011-11-02 Yao Qi <yao@codesourcery.com>
238 * tracepoint.c (cmd_qtstart): Remove unused local variables.
240 2011-11-02 Yao Qi <yao@codesourcery.com>
242 * target.h: Fix a typo in comment.
244 2011-10-31 Pedro Alves <pedro@codesourcery.com>
246 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
247 clobber the breakpoints' shadows with fast tracepoint jumps.
248 * mem-break.h (check_mem_write): Add `myaddr' parameter.
249 * target.c (write_inferior_memory): Also pass MYADDR down to
252 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
254 * configure.ac: Check support for personality routine.
255 * configure: Regenerate.
256 * config.in: Likewise.
257 * linux-low.c: Include <sys/personality.h>.
258 Define ADDR_NO_RANDOMIZE if necessary.
259 (linux_create_inferior): Disable address space randomization when
260 forking inferior, if requested.
261 (linux_supports_disable_randomization): New function.
262 (linux_target_ops): Install it.
263 * server.h (disable_randomization): Declare.
264 * server.c (disable_randomization): New global variable.
265 (handle_general_set): Handle QDisableRandomization.
266 (handle_query): Likewise for qSupported.
267 (main): Support --disable-randomization and --no-disable-randomization
268 command line arguments.
269 * target.h (struct target_ops): Add supports_disable_randomization.
270 (target_supports_disable_randomization): New macro.
272 2011-09-29 Mike Frysinger <vapier@gentoo.org>
274 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
276 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
277 [!PT_GETDSBT] (target_loadmap): New definition.
278 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
279 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
280 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
281 and PT_GETDSBT to LINUX_LOADMAP.
282 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
283 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
285 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
287 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
288 (arm_linux_hwbp_cap): New static variable.
289 (arm_linux_get_hwbp_cap): Replace by ...
290 (arm_linux_init_hwbp_cap): ... this new function.
291 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
292 (arm_linux_get_hw_watchpoint_count): Likewise.
293 (arm_linux_get_hw_watchpoint_max_length): Likewise.
294 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
295 (arm_prepare_to_resume): Use perror_with_name instead of error.
297 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
299 * linux-arm-low.c: Include <signal.h>.
300 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
301 (struct arm_linux_hwbp_cap): New data type.
302 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
303 (struct arm_linux_hw_breakpoint): New data type.
304 (MAX_BPTS, MAX_WPTS): Define.
305 (struct arch_process_info, struct arch_lwp_info): New data types.
306 (arm_linux_get_hwbp_cap): New function.
307 (arm_linux_get_hw_breakpoint_count): Likewise.
308 (arm_linux_get_hw_watchpoint_count): Likewise.
309 (arm_linux_get_hw_watchpoint_max_length): Likewise.
310 (arm_hwbp_control_initialize): Likewise.
311 (arm_hwbp_control_is_enabled): Likewise.
312 (arm_hwbp_control_is_initialized): Likewise.
313 (arm_hwbp_control_disable): Likewise.
314 (arm_linux_hw_breakpoint_equal): Likewise.
315 (arm_linux_hw_point_initialize): Likewise.
316 (struct update_registers_data): New data structure.
317 (update_registers_callback: New function.
318 (arm_insert_point): Likewise.
319 (arm_remove_point): Likewise.
320 (arm_stopped_by_watchpoint): Likewise.
321 (arm_stopped_data_address): Likewise.
322 (arm_new_process): Likewise.
323 (arm_new_thread): Likewise.
324 (arm_prepare_to_resume): Likewise.
325 (the_low_target): Register arm_insert_point, arm_remove_point,
326 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
327 arm_new_thread, and arm_prepare_to_resume.
329 2011-09-15 Stan Shebs <stan@codesourcery.com>
331 * server.h (struct emit_ops): Add compare-goto fields.
332 * tracepoint.c (gdb_agent_op_sizes): New table.
333 (emit_eq_goto): New function.
334 (emit_ne_goto): New function.
335 (emit_lt_goto): New function.
336 (emit_le_goto): New function.
337 (emit_gt_goto): New function.
338 (emit_ge_goto): New function.
339 (is_goto_target): New function.
340 (compile_bytecodes): Recognize special cases of compare-goto
341 combinations and call specialized emitters for them.
342 * linux-x86-low.c (amd64_emit_eq_goto): New function.
343 (amd64_emit_ne_goto): New function.
344 (amd64_emit_lt_goto): New function.
345 (amd64_emit_le_goto): New function.
346 (amd64_emit_gt_goto): New function.
347 (amd64_emit_ge_goto): New function.
348 (amd64_emit_ops): Add the new functions.
349 (i386_emit_eq_goto): New function.
350 (i386_emit_ne_goto): New function.
351 (i386_emit_lt_goto): New function.
352 (i386_emit_le_goto): New function.
353 (i386_emit_gt_goto): New function.
354 (i386_emit_ge_goto): New function.
355 (i386_emit_ops): Add the new functions.
357 2011-09-08 Stan Shebs <stan@codesourcery.com>
359 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
360 (i386_emit_epilogue): Restore %ebx.
362 2011-08-31 Jie Zhang <jzhang918@gmail.com>
364 * server.c (step_thread): Remove definition.
365 (process_serial_event): Don't handle Hs.
366 * server.h (step_thread): Remove declaration.
367 * target.c (set_desired_inferior): Remove use of step_thread.
369 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
371 * linux-low.c: Include linux-procfs.h.
372 (linux_attach_lwp_1): Update comments.
373 (linux_attach): Scan for existing threads when attaching to a
374 process that is the tgid.
375 * Makefile.in: Update dependencies.
377 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
379 * configure.srv: Add linux-procfs.o dependencies.
381 2011-08-14 Yao Qi <yao@codesourcery.com>
383 * target.h (struct target_ops): Fix indent.
384 * win32-low.c (win32_target_ops): Fix comment.
386 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
387 Yao Qi <yao@codesourcery.com>
389 * Makefile.in (clean): Remove tic6x-*.c files.
390 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
391 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
392 (tic6x-c64xp-linux.c): Likewise.
393 * configure.srv: Add support for tic6x-*-uclinux.
394 * linux-tic6x-low.c: New.
395 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
397 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
398 Yao Qi <yao@codesourcery.com>
400 * target.h (struct target_ops): Add read_loadmap.
401 * linux-low.c (struct target_loadseg): New type.
402 (struct target_loadmap): New type.
403 (linux_read_loadmap): New function.
404 (linux_target_ops): Add linux_read_loadmap.
405 * server.c (handle_query): Support qXfer:fdpic:read packet.
406 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
408 2011-08-05 Eli Zaretskii <eliz@gnu.org>
410 * win32-low.c: Include <stdint.h>.
412 2011-07-22 Pedro Alves <pedro@codesourcery.com>
414 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
415 to the inferior here.
416 (i386_remove_aligned_watchpoint): Ditto.
417 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
418 fit part of the watchpoint in the debug registers.
419 (i386_update_inferior_debug_regs): New.
420 (i386_low_insert_watchpoint): Work on a local mirror of the debug
421 registers, and only update the inferior on success.
422 (i386_low_remove_watchpoint): Ditto.
424 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
426 * linux-low.c (compare_ints, unique, list_threads, show_process,
427 linux_core_of_thread): Delete.
428 (linux_target_ops): Change linux_core_of_thread to
429 linux_common_core_of_thread.
430 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
431 * utils.c (malloc_failure): Change type of argument.
432 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
433 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
434 common/linux-osdata.c, common/ptid.c and common/buffer.c.
435 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
436 (IPA_OBJS): Add common-utils-ipa.o.
437 (ptid_h, linux_osdata_h): New macros.
438 (server_h): Add common/common-utils.h, common/xml-utils.h,
439 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
441 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
442 ptid.o, buffer.o): New rules.
443 (linux-low.o): Add common/linux-osdata.h as a dependency.
444 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
445 * configure.ac: Add AC_HEADER_DIRENT check.
446 * config.in: Regenerate.
447 * configure: Regenerate.
448 * remote-utils.c (xml_escape_text): Delete.
449 (buffer_grow, buffer_free, buffer_init, buffer_finish,
450 buffer_xml_printf): Move to common/buffer.c.
451 * server.c (main): Remove call to initialize_inferiors.
452 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
453 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
454 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
455 internal_error, gdb_assert, gdb_assert_fail): Delete.
456 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
457 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
459 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
460 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
461 initialize_inferiors): Delete.
463 2011-07-20 Pedro Alves <pedro@codesourcery.com>
465 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
468 2011-05-31 Pedro Alves <pedro@codesourcery.com>
470 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
472 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
474 2011-05-26 Yao Qi <yao@codesourcery.com>
476 * Makefile.in (thread-db.o): Track dependence to
477 common/gdb_thread_db.h.
478 * thread-db.c: include gdb_thread_db.h from right place.
480 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
482 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
483 __FILE__ and __LINE__ to internal_error.
485 2011-05-13 Doug Evans <dje@google.com>
487 * thread-db.c (try_thread_db_load_from_sdir): New function.
488 (try_thread_db_load_from_dir): New function.
489 (thread_db_load_search): Handle $sdir, ignore $pdir.
490 Remove trying of system directories if search of
491 libthread-db-search-path fails, that is now done via $sdir.
493 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
495 * server.c (handle_query): Add EnableDisableTracepoints to the list
496 of supported features.
497 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
499 (cmd_qtenable_disable): New.
500 (cmd_qtstart): Install tracepoints even if disabled.
501 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
502 receiving a QTEnable or QTDisable packet.
503 (gdb_collect): Skip data collection if fast tracepoint is disabled.
504 (ust_marker_to_static_tracepoint): Do not ignore disabled static
506 (gdb_probe): Skip data collection if static tracepoint is disabled.
508 2011-05-10 Doug Evans <dje@google.com>
510 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
512 2011-05-04 Doug Evans <dje@google.com>
514 * linux-low.c (linux_join): Skip process lookup.
515 * spu-low.c (spu_join): Ditto.
516 * server.c (join_inferiors_callback): Delete.
517 (process_serial_event): For 'D' packet (detach) call join_inferior
520 2011-05-04 Joseph Myers <joseph@codesourcery.com>
522 * README: Don't mention xscale*-*-linux*.
523 * configure.srv (xscale*-*-linux*): Don't handle target.
525 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
527 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
529 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
530 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
531 (i386_emit_void_call_2): Likewise.
533 2011-04-26 Yao Qi <yao@codesourcery.com>
535 * linux-low.c: Move common macros to linux-ptrace.h.
536 Include linux-ptrace.h.
537 * Makefile.in (linux_ptrace_h): New.
538 (linux-low.o): Depends on linux-ptrace.h.
540 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
542 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
543 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
544 (remote_prepare): New function with most of the TCP code from ...
545 (remote_open): ... here. Detect PORT here unconditionally. Move also
546 setting transport_is_reliable.
547 * server.c (run_once): New variable.
548 (gdbserver_usage): Document it.
549 (main): Set run_once for `--once'. Call remote_prepare. Exit after
550 the first run if RUN_ONCE.
551 * server.h (run_once, remote_prepare): New declarations.
553 2011-04-19 Tom Tromey <tromey@redhat.com>
555 * win32-low.c (handle_load_dll): Remove duplicate "the".
557 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
559 Remove support for old Cygwin 1.5 versions.
560 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
561 function to avoid warning.
562 (win32_add_one_solib): Use cygwin_conv_path function to avoid
565 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
567 * gdbserver/server.h (Macro _): Define it if not available.
569 2011-03-14 Michael Snyder <msnyder@vmware.com>
571 * hostio.c (handle_close): Remove unnecessary null test.
573 2011-03-10 Joel Brobecker <brobecker@adacore.com>
575 * Makefile.in (maintainer-clean realclean distclean): Remove
576 "make ... subdir_do" command.
578 2011-03-10 Michael Snyder <msnyder@vmware.com>
580 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
582 * server.c (handle_v_run): Free alloced buffer on early return.
584 2011-03-09 Yao Qi <yao@codesourcery.com>
587 2011-03-04 Yao Qi <yao@codesourcery.com>
589 * Makefile.in: Remove GNU make feature --directory.
591 2011-03-05 Yao Qi <yao@codesourcery.com>
593 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
594 (subdir_do): New make target. Copied from gdb/Makefile.
595 (maintainer-clean, realclean, distclean, clean): Call corresponding
596 make targets in common/Makefile.
598 2011-02-11 Yao Qi <yao@codesourcery.com>
600 * configure.ac: Call AC_PROG_RANLIB.
601 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
602 * configure: Regenerate.
604 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
606 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
608 2011-03-06 Yao Qi <yao@codesourcery.com>
610 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
612 2011-03-05 Yao Qi <yao@codesourcery.com>
614 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
615 (subdir_do): New make target. Copied from gdb/Makefile.
616 (maintainer-clean, realclean, distclean, clean): Call corresponding
617 make targets in common/Makefile.
619 2011-03-04 Yao Qi <yao@codesourcery.com>
621 * Makefile.in: Remove GNU make feature --directory.
623 2011-03-04 Michael Snyder <msnyder@vmware.com>
625 * server.c (queue_stop_reply): Call xmalloc not malloc.
627 2011-03-02 Michael Snyder <msnyder@vmware.com>
629 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
631 2011-02-28 Michael Snyder <msnyder@vmware.com>
633 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
634 (cmd_qtframe): Ditto.
635 (cmd_qtbuffer): Ditto.
636 (cmd_bigqtbuffer): Ditto.
638 * utils.c (decimal2str): Initialize 'width' to nine, then
641 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
643 * hostio.c (require_data): Free *data, not data.
645 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
647 * hostio.c (require_data): Use free, not xfree.
649 2011-02-27 Michael Snyder <msnyder@vmware.com>
651 * server.c (handle_query): Discard unused value.
653 * hostio.c (require_data): Free malloc memory before returning
656 2011-02-26 Michael Snyder <msnyder@vmware.com>
658 * linux-low.c (list_threads): Call closedir for dirent.
660 2011-02-27 Michael Snyder <msnyder@vmware.com>
662 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
663 a case statement falls through.
665 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
667 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
670 2011-02-26 Michael Snyder <msnyder@vmware.com>
672 * utils.c (decimal2str): Eliminate dead code and dead param.
673 (pulongest): Drop dead param from call to decimal2str.
676 2011-02-24 Joel Brobecker <brobecker@adacore.com>
678 Revert the following patch (not approved yet):
679 2011-02-21 Hui Zhu <teawater@gmail.com>
680 * tracepoint.c (tp_printf): New function.
681 (eval_agent_expr): Handle gdb_agent_op_printf.
683 2011-02-21 Hui Zhu <teawater@gmail.com>
685 * tracepoint.c (tp_printf): New function.
686 (eval_agent_expr): Handle gdb_agent_op_printf.
688 2011-02-18 Tom Tromey <tromey@redhat.com>
690 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
691 (tracepoint.o): Likewise.
692 * tracepoint.c (enum gdb_agent_op): Use ax.def.
693 (gdb_agent_op_names): Likewise.
695 2011-02-18 Tom Tromey <tromey@redhat.com>
697 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
698 gdb_agent_op_rot>: New constants.
699 (gdb_agent_op_names): Add pick and roll.
700 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
703 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
705 * aclocal.m4: Regenerated with aclocal-1.11.1.
707 2011-02-14 Pedro Alves <pedro@codesourcery.com>
709 * server.c (handle_qxfer_traceframe_info): New.
710 (qxfer_packets): Register "traceframe-info".
711 (handle_query): Report support for qXfer:traceframe-info:read+.
712 * tracepoint.c (match_blocktype): New.
713 (traceframe_find_block_type): Rename to ...
714 (traceframe_walk_blocks): ... this. Add callback filter argument,
716 (traceframe_find_block_type): New, reimplemented on top of
717 traceframe_walk_blocks.
718 (build_traceframe_info_xml): New.
719 (traceframe_read_info): New.
720 * server.h (traceframe_read_info): Declare.
722 2011-02-11 Yao Qi <yao@codesourcery.com>
724 * configure.ac: Call AC_PROG_RANLIB.
725 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
726 * configure: Regenerate.
728 2011-02-07 Pedro Alves <pedro@codesourcery.com>
730 * server.c (gdb_read_memory): Change return semantics to allow
732 (handle_search_memory_1): Adjust.
733 (process_serial_event) <'m' packet>: Handle partial transfers.
734 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
736 2011-01-28 Pedro Alves <pedro@codesourcery.com>
738 * regcache.c (init_register_cache): Initialize
739 regcache->register_status.
740 (free_register_cache): Release regcache->register_status.
741 (regcache_cpy): Copy register_status.
742 (registers_to_string): Print 'x's for unavailable registers.
743 (supply_register): Mark the register's status valid or
744 unavailable, depending on whether a buffer was passed in or not.
745 (supply_register_zeroed): New.
746 (supply_regblock): Mark the registers' status valid or
747 unavailable, depending on whether a buffer was passed in or not.
748 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
749 (struct regcache): New `register_status' field.
750 (supply_register_zeroed): Declare.
751 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
752 supply_register_zeroed, rather than passing a NULL buffer to
754 * tracepoint.c (fetch_traceframe_registers): Update comment.
756 2011-01-28 Pedro Alves <pedro@codesourcery.com>
758 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
761 2011-01-25 Pedro Alves <pedro@codesourcery.com>
763 * server.h (decode_xfer_write): Change prototype.
764 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
765 and don't extract the annex here.
766 * server.c (decode_xfer_read): Remove `annex' parameter,
767 and don't extract the annex here.
770 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
771 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
772 (handle_qxfer_statictrace): New functions, abstracted out from
773 handle_query, and made to use the struct qxfer interface.
774 (handle_threads_qxfer_proper): Rename to ...
775 (handle_qxfer_threads_proper): ... this.
776 (handle_threads_qxfer): Rename to ...
777 (handle_qxfer_threads): ... this. Adjust.
778 (qxfer_packets): New array.
779 (handle_qxfer): New function.
780 (handle_query): Use handle_qxfer.
782 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
784 * gdbreplay.c: Shorten lines of >= 80 columns.
785 * linux-low.c: Ditto.
786 * linux-ppc-low.c: Ditto.
787 * linux-s390-low.c: Ditto.
788 * linux-sparc-low.c: Ditto.
789 * linux-x86-low.c: Ditto.
790 * linux-xtensa-low.c: Ditto.
791 * mem-break.c: Ditto.
794 * remote-utils.c: Ditto.
797 * thread-db.c: Ditto.
798 * tracepoint.c: Ditto.
800 * win32-low.h: Ditto.
802 2011-01-05 Joel Brobecker <brobecker@adacore.com>
804 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
807 2011-01-01 Joel Brobecker <brobecker@adacore.com>
809 * server.c (gdbserver_version): Update copyright year in version
811 * gdbreplay.c (gdbreplay_version): Ditto.
813 2010-12-29 Jie Zhang <jie.zhang@analog.com>
815 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
816 * linux-bfin-low.c: New file.
817 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
818 PT_DATA_ADDR for BFIN targets.
819 * Makefile.in (SFILES): Add linux-bfin-low.c.
820 (clean): Remove reg-bfin.c.
821 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
822 * README: Mention supported Blackfin targets.
824 2010-12-23 Mike Frysinger <vapier@gentoo.org>
826 * .gitignore: New file.
828 2010-11-16 Mike Frysinger <vapier@gentoo.org>
830 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
832 2010-10-22 Jie Zhang <jie@codesourcery.com>
834 * Makefile.in: Add FLAGS_TO_PASS variable.
835 (install): Remove dependency of install-only and recursively
836 invoke make for install-only.
838 2010-10-04 Doug Evans <dje@google.com>
840 * Makefile.in (uninstall): Use $(DESTDIR).
842 2010-09-24 Pedro Alves <pedro@codesourcery.com>
846 * linux-x86-low.c (compat_siginfo_from_siginfo)
847 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
848 si_code is < 0. Check for si_code == SI_TIMER before checking for
851 2010-09-13 Joel Brobecker <brobecker@adacore.com>
853 * lynx-i386-low.c: New file.
854 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
856 2010-09-13 Joel Brobecker <brobecker@adacore.com>
858 * lynx-low.c (ptrace_request_to_str): Remove handling for
859 request values that have been removed in LynxOS 5.x.
861 2010-09-13 Joel Brobecker <brobecker@adacore.com>
863 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
866 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
868 * configure.ac: Add --enable-inprocess-agent option.
869 * configure: Rebuilt.
871 2010-09-06 Yao Qi <yao@codesourcery.com>
873 * linux-low.c (linux_kill): Remove unused variable.
874 (linux_stabilize_threads): Likewise.
875 * server.c (start_inferior): Likewise.
876 (queue_stop_reply_callback): Likewise.
877 * tracepoint.c (do_action_at_tracepoint): Likewise.
879 2010-09-06 Yao Qi <yao@codesourcery.com>
881 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
884 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
886 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
888 2010-09-06 Pedro Alves <pedro@codesourcery.com>
890 * Makefile.in (install-only): Replace $IPA_DEPFILES with
893 2010-09-01 Joel Brobecker <brobecker@adacore.com>
895 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
896 gdbserver/lynx-ppc-low.c: New files.
897 * Makefile.in (lynx_low_h): New variable.
898 (lynx-low.o, lynx-ppc-low.o): New rules.
899 * configure.ac: On LynxOS, link with -lnetinet.
900 * configure.srv: Add handling of powerpc-*-lynxos* targets.
901 * configure: regenerate.
903 2010-09-01 Joel Brobecker <brobecker@adacore.com>
905 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
906 * configure.ac: Add check for vasprintf and vsnprintf.
907 * configure, config.in: Regenerate.
908 * server.h (vasprintf, vsnprintf): Add conditional declarations.
910 2010-09-01 Joel Brobecker <brobecker@adacore.com>
912 * gdbreplay.c: Move include of alloca.h up, next to include of
914 * server.h: Add include of malloc.h.
915 * mem-break.c: Remove include of malloc.h.
916 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
918 2010-09-01 Joel Brobecker <brobecker@adacore.com>
920 * Makefile.in (memmem.o): Build with -Wno-error.
922 2010-09-01 Joel Brobecker <brobecker@adacore.com>
924 * utils.c (xsnprintf): Make non-static.
925 * server.h: Add xsnprintf declaration.
926 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
927 replace calls to snprintf by calls to xsnprintf throughout.
929 2010-09-01 Joel Brobecker <brobecker@adacore.com>
931 * configure.ac: Add configure check for alloca.
932 * configure, config.in: Regenerate.
933 * server.h: Include alloca.h if it exists.
934 * gdbreplay.c: Include alloca.h if it exists.
936 2010-08-28 Pedro Alves <pedro@codesourcery.com>
938 * linux-low.c (__SIGRTMIN): Define if not already defined.
939 (linux_create_inferior): Check for __ANDROID__ rather than
941 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
942 are already deferred.
943 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
944 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
945 stopped and already has a pending signal to report.
946 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
947 a pending signal to report or is moving out of a jump pad.
948 (linux_init_signals): Check for __ANDROID__ rather than
951 2010-08-28 Pedro Alves <pedro@codesourcery.com>
953 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
954 debug_threads check. Avoid a linear search when not doing debug
957 2010-08-27 Pedro Alves <pedro@codesourcery.com>
959 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
960 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
961 (struct file_handler) <fd>: Change type to gdb_fildes_t.
962 (process_event): Change local fd's type to gdb_fildes_t.
963 (create_file_handler): Adjust prototype.
964 (delete_file_handler): Adjust prototype.
965 (handle_file_event): Adjust prototype. Use pfildes.
966 (create_file_event): Adjsut prototype.
967 * remote-utils.c (remote_desc, listen_desc): Change type to
969 * server.h: New gdb_fildes_t typedef.
970 [USE_WIN32API]: Include winsock2.h.
971 (delete_file_handler, add_file_handler): Adjust prototypes.
973 * utils.c (pfildes): New.
975 2010-08-27 Pedro Alves <pedro@codesourcery.com>
977 * configure.ac (build_warnings): Add -Wno-char-subscripts.
978 * configure: Regenerate.
980 2010-08-27 Pedro Alves <pedro@codesourcery.com>
982 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
983 (linux_done_accessing_memory): ... this.
984 (linux_target_ops): Adjust.
985 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
986 * nto-low.c (nto_target_ops): Adjust comment.
987 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
988 * spu-low.c (spu_target_ops): Adjust comment.
989 * target.h (target_ops): Rename unprepare_to_access_memory field
990 to done_accessing_memory.
991 (unprepare_to_access_memory): Rename to ...
992 (done_accessing_memory): ... this.
994 2010-08-26 Pedro Alves <pedro@codesourcery.com>
996 * linux-low.c (linux_prepare_to_access_memory): New.
997 (linux_unprepare_to_access_memory): New.
998 (linux_target_ops): Install them.
999 * server.c (read_memory): Rename to ...
1000 (gdb_read_memory): ... this. Use
1001 prepare_to_access_memory/prepare_to_access_memory.
1002 (write_memory): Rename to ...
1003 (gdb_write_memory): ... this. Use
1004 prepare_to_access_memory/prepare_to_access_memory.
1005 (handle_search_memory_1): Adjust.
1006 (process_serial_event): Adjust.
1007 * target.h (struct target_ops): New fields
1008 prepare_to_access_memory and unprepare_to_access_memory.
1009 (prepare_to_access_memory, unprepare_to_access_memory): New.
1010 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1011 prepare_to_access_memory/prepare_to_access_memory.
1012 * nto-low.c (nto_target_ops): Adjust.
1013 * spu-low.c (spu_target_ops): Adjust.
1014 * win32-low.c (win32_target_ops): Adjust.
1016 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1018 * Makefile.in (WARN_CFLAGS): Get it from configure.
1019 (WERROR_CFLAGS): New.
1020 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1021 * configure.ac: Introduce --enable-werror, which adds -Werror to
1022 the compiler command line. Enabled by default. Disable with
1023 --disable-werror. Add -Wdeclaration-after-statement
1024 Wpointer-arith and -Wformat-nonliteral to warning flags.
1025 * configure: Regenerate.
1027 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1029 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1031 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1033 * gdbreplay.c (remote_error): New.
1035 (expect): Use gdbchar. Check for error reading from GDB.
1036 Clarify sync error output.
1037 (play): Check for errors writing to GDB.
1038 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1039 * remote-utils.c (getpkt): Check for errors writing to the remote
1042 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1044 * linux-low.c (linux_wait_1): Move non-debugging code out of
1045 `debug_threads' control.
1047 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1049 * linux-low.c (linux_wait_1): Don't set last_status here.
1050 * server.c (push_event, queue_stop_reply_callback): Assert we're
1051 not pushing a TARGET_WAITKIND_IGNORE event.
1052 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1053 (myresume, handle_target_event): Set the thread's last_resume_kind
1054 and last_status from the target returned status.
1056 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1060 * linux-x86-low.c (update_debug_registers_callback): New.
1061 (i386_dr_low_set_addr): Use it.
1062 (i386_dr_low_get_addr): New.
1063 (i386_dr_low_set_control): Use update_debug_registers_callback.
1064 (i386_dr_low_get_control): New.
1065 (i386_dr_low_get_status): Adjust.
1066 * linux-low.c (linux_stop_lwp): New.
1067 * linux-low.h (linux_stop_lwp): Declare.
1069 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1070 argument instead of a i386_debug_reg_state.
1071 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1072 a i386_debug_reg_state.
1073 (i386_insert_aligned_watchpoint): Adjust.
1074 (i386_remove_aligned_watchpoint): Adjust.
1075 (i386_low_stopped_data_address): Read the debug registers from the
1076 inferior instead of from the mirrors.
1077 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1078 (i386_dr_low_get_addr): Declare.
1079 (i386_dr_low_get_control): Declare.
1080 (i386_dr_low_get_status): Change prototype.
1082 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1083 (i386_dr_low_get_addr): New.
1084 (i386_dr_low_get_control): New.
1085 (i386_dr_low_get_status): Adjust prototype. Return
1087 (i386_initial_stuff): Clear dr_status_mirror and
1089 (i386_get_thread_context): Adjust.
1090 (i386_set_thread_context): Adjust.
1091 (i386_thread_added): Adjust.
1093 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1095 * linux-low.h (linux_thread_area): Delete declaration.
1097 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1099 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1100 after its termination.
1102 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1104 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1105 (gdb_wants_all_stopped): Delete.
1106 (linux_wait_1): Don't call them.
1107 * server.c (handle_v_cont): Tag all threads as want-stopped.
1108 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1109 stopped as "client-wants-stopped".
1111 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1113 * Makefile.in (signals_h): New.
1114 (server_h): Depend on it.
1115 (server.o): Don't depend on $(signals_def).
1116 (signals.o): Depend on $(signals_def).
1118 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1120 * Makefile.in (signals_def): New.
1121 (server_h): Append include/gdb/signals.h and signals_def.
1122 (server.o): Append signals_def.
1124 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1126 * server.c (handle_target_event): Use target_signal_to_host for
1127 resume_info.sig initialization.
1128 * target.h (struct thread_resume) <sig>: New comment.
1130 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1132 * server.c (handle_query): strcpy() the returned string from paddress()
1133 instead of sprintf().
1134 * utils.c (paddress): Return phex_nz().
1136 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1138 * server.c (handle_v_cont): Call mourn_inferior if process
1140 (myresume): Likewise.
1142 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1144 Static tracepoints, and integration with UST.
1146 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1147 * mem-break.c (uninsert_all_breakpoints)
1148 (reinsert_all_breakpoints): New.
1149 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1150 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1151 (gdb_agent_ust_loaded, helper_thread_id)
1152 (gdb_agent_helper_thread_id): New macros.
1153 (struct ipa_sym_addresses): Add addr_ust_loaded,
1154 addr_helper_thread_id, addr_cmd_buf.
1155 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1156 (in_process_agent_loaded_ust): New.
1157 (write_e_ust_not_loaded): New.
1158 (maybe_write_ipa_ust_not_loaded): New.
1159 (struct collect_static_trace_data_action): New.
1160 (enum tracepoint_type) <static_tracepoint>: New.
1161 (struct tracepoint) <handle>: Mention static tracepoints.
1162 (struct static_tracepoint_ctx): New.
1163 (CMD_BUF_SIZE): New.
1164 (add_tracepoint_action): Handle static tracepoint actions.
1165 (unprobe_marker_at): New.
1166 (clear_installed_tracepoints): Handle static tracepoints.
1167 (cmd_qtdp): Handle static tracepoints.
1168 (probe_marker_at): New.
1169 (cmd_qtstart): Handle static tracepoints.
1170 (response_tracepoint): Handle static tracepoints.
1171 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1172 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1173 (get_context_regcache): Handle static tracepoints.
1174 (do_action_at_tracepoint): Handle static tracepoint actions.
1175 (traceframe_find_block_type): Handle static trace data blocks.
1176 (traceframe_read_sdata): New.
1177 (download_tracepoints): Download static tracepoint actions.
1178 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1179 (GDB_PROBE_NAME): New.
1184 (ust_marker_to_static_tracepoint): New.
1186 (collect_ust_data_at_tracepoint): New.
1187 (gdb_ust_probe): New.
1188 (UNIX_PATH_MAX, SOCK_DIR): New.
1189 (gdb_ust_connect_sync_socket): New.
1190 (resume_thread, stop_thread): New.
1191 (run_inferior_command): New.
1192 (init_named_socket): New.
1193 (gdb_ust_socket_init): New.
1194 (cstr_to_hexstr): New.
1196 (first_marker, next_marker): New.
1197 (response_ust_marker): New.
1198 (cmd_qtfstm, cmd_qtsstm): New.
1199 (unprobe_marker_at, probe_marker_at): New.
1200 (cmd_qtstmat, gdb_ust_thread): New.
1201 (gdb_ust_init): New.
1202 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1203 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1205 (x86_64_st_collect_regmap): New.
1206 (X86_64_NUM_ST_COLLECT_GREGS): New.
1207 (AMD64_RIP_REGNUM): New.
1208 (supply_static_tracepoint_registers): New.
1209 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1211 (i386_st_collect_regmap): New.
1212 (i386_NUM_ST_COLLECT_GREGS): New.
1213 (supply_static_tracepoint_registers): New.
1214 * server.c (handle_query): Handle qXfer:statictrace:read.
1215 <qSupported>: Report support for StaticTracepoints, and
1216 qXfer:statictrace:read features.
1217 * server.h (traceframe_read_sdata)
1218 (supply_static_tracepoint_registers): Declare.
1219 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1220 (unpack_varlen_hex): Include in IPA build.
1221 * Makefile.in (ustlibs, ustinc): New.
1222 (IPA_OBJS): Add remote-utils-ipa.o.
1223 ($(IPA_LIB)): Link -ldl and -lpthread.
1225 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1226 * config.in, configure: Regenerate.
1228 2010-06-20 Ian Lance Taylor <iant@google.com>
1229 Pedro Alves <pedro@codesourcery.com>
1231 * linux-x86-low.c (always_true): Delete.
1232 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1233 trying to fool the compiler with always_true.
1235 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1237 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1238 conditions in gdbserver.
1240 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1242 * spu-low.c (spu_read_memory): Wrap around local store limit.
1243 (spu_write_memory): Likewise.
1245 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1247 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1248 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1250 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1252 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1253 uses with LONGEST uses.
1255 2010-06-14 Stan Shebs <stan@codesourcery.com>
1256 Pedro Alves <pedro@codesourcery.com>
1260 * linux-x86-low.c: Include limits.h.
1265 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1266 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1267 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1268 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1269 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1270 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1271 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1272 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1273 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1274 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1275 (amd64_emit_void_call_2): New.
1276 (amd64_emit_ops): New.
1277 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1278 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1279 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1280 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1281 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1282 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1283 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1284 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1285 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1286 (i386_emit_stack_adjust, i386_emit_int_call_1)
1287 (i386_emit_void_call_2): New.
1288 (i386_emit_ops): New.
1289 (x86_emit_ops): New.
1290 (the_low_target): Install x86_emit_ops.
1291 * server.h (struct emit_ops): New.
1292 (get_raw_reg_func_addr): Declare.
1293 (current_insn_ptr, emit_error): Declare.
1294 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1295 (set_trace_state_variable_value): New defines.
1296 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1297 addr_get_trace_state_variable_value and
1298 addr_set_trace_state_variable_value.
1299 (symbol_list): New fields for get_raw_reg,
1300 get_trace_state_variable_value and set_trace_state_variable_value.
1301 (condfn): New typedef.
1302 (struct tracepoint): New field `compiled_cond'.
1303 (do_action_at_tracepoint): Clear compiled_cond.
1304 (get_trace_state_variable_value, set_trace_state_variable_value):
1306 (condition_true_at_tracepoint): If there's a compiled condition,
1308 (current_insn_ptr, emit_error): New globals.
1309 (struct bytecode_address): New.
1310 (get_raw_reg_func_addr): New.
1311 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1312 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1313 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1314 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1315 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1316 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1317 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1318 (compile_tracepoint_condition, compile_bytecodes): New.
1319 * target.h (emit_ops): Forward declare.
1320 (struct target_ops): New field emit_ops.
1321 (target_emit_ops): New.
1322 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1323 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1324 * linux-low.c (linux_emit_ops): New.
1325 (linux_target_ops): Install it.
1326 * linux-low.h (struct linux_target_ops): New field emit_ops.
1328 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1330 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1331 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1333 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1334 Stan Shebs <stan@codesourcery.com>
1336 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1337 (all): Depend on $(extra_libraries).
1338 (install-only): Install the IPA.
1339 (IPA_OBJS, IPA_LIB): New.
1340 (clean): Remove the IPA lib.
1341 (IPAGENT_CFLAGS): New.
1342 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1343 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1344 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1345 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1346 * configure.ac: Check for atomic builtins support in the compiler.
1347 (IPA_DEPFILES, extra_libraries): Define.
1348 * configure.srv (ipa_obj): Add description.
1349 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1350 (i[34567]86-*-linux*): Set ipa_obj.
1351 (x86_64-*-linux*): Set ipa_obj.
1352 * linux-low.c (stabilizing_threads): New.
1353 (supports_fast_tracepoints): New.
1354 (linux_detach): Stabilize threads before detaching.
1355 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1356 the lwp is either not stabilizing, or is moving out of a jump pad.
1357 (linux_fast_tracepoint_collecting): New.
1358 (maybe_move_out_of_jump_pad): New.
1359 (enqueue_one_deferred_signal): New.
1360 (dequeue_one_deferred_signal): New.
1361 (linux_wait_for_event_1): If moving out of a jump pad, defer
1362 pending signals to later.
1363 (linux_stabilize_threads): New.
1364 (linux_wait_1): Check if threads need moving out of jump pads, and
1366 (stuck_in_jump_pad_callback): New.
1367 (move_out_of_jump_pad_callback): New.
1369 (linux_resume_one_lwp): Handle moving out of jump pads.
1370 (linux_set_resume_request): Dequeue deferred signals.
1371 (need_step_over_p): Also step over fast tracepoint jumps.
1372 (start_step_over): Also uninsert fast tracepoint jumps.
1373 (finish_step_over): Also reinsert fast tracepoint jumps.
1374 (linux_install_fast_tracepoint_jump): New.
1375 (linux_target_ops): Install linux_stabilize_threads and
1376 linux_install_fast_tracepoint_jump_pad.
1377 * linux-low.h (linux_target_ops) <get_thread_area,
1378 install_fast_tracepoint_jump_pad>: New fields.
1379 (struct lwp_info) <collecting_fast_tracepoint,
1380 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1381 (linux_get_thread_area): Declare.
1382 * linux-x86-low.c (jump_insn): New.
1383 (x86_get_thread_area): New.
1384 (append_insns): New.
1386 (amd64_install_fast_tracepoint_jump_pad): New.
1387 (i386_install_fast_tracepoint_jump_pad): New.
1388 (x86_install_fast_tracepoint_jump_pad): New.
1389 (the_low_target): Install x86_get_thread_area and
1390 x86_install_fast_tracepoint_jump_pad.
1391 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1392 (struct fast_tracepoint_jump): New.
1393 (fast_tracepoint_jump_insn): New.
1394 (fast_tracepoint_jump_shadow): New.
1395 (find_fast_tracepoint_jump_at): New.
1396 (fast_tracepoint_jump_here): New.
1397 (delete_fast_tracepoint_jump): New.
1398 (set_fast_tracepoint_jump): New.
1399 (uninsert_fast_tracepoint_jumps_at): New.
1400 (reinsert_fast_tracepoint_jumps_at): New.
1401 (set_breakpoint_at): Use write_inferior_memory.
1402 (uninsert_raw_breakpoint): Use write_inferior_memory.
1403 (check_mem_read): Mask out fast tracepoint jumps.
1404 (check_mem_write): Mask out fast tracepoint jumps.
1405 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1406 (set_fast_tracepoint_jump): Declare.
1407 (delete_fast_tracepoint_jump)
1408 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1409 (reinsert_fast_tracepoint_jumps_at): Declare.
1410 * regcache.c: Don't compile many functions when building the
1411 in-process agent library.
1412 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1413 the register buffer in the heap.
1414 (free_register_cache): If the register buffer isn't owned by the
1415 regcache, don't free it.
1416 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1417 pre-existing register caches.
1418 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1420 (convert_ascii_to_int): : Constify `from' parameter type.
1421 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1422 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1423 the needed buffer in-place.
1424 (relocate_instruction): New.
1425 * server.c (handle_query) <qSymbols>: If the target supports
1426 tracepoints, give it a chance of looking up symbols. Report
1427 support for fast tracepoints.
1428 (handle_status): Stabilize threads.
1429 (process_serial_event): Adjust.
1430 * server.h (struct fast_tracepoint_jump): Forward declare.
1431 (struct process_info) <fast_tracepoint_jumps>: New field.
1432 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1433 (decode_X_packet, decode_M_packet): Adjust.
1434 (relocate_instruction): Declare.
1435 (in_process_agent_loaded): Declare.
1436 (tracepoint_look_up_symbols): Declare.
1437 (struct fast_tpoint_collect_status): Declare.
1438 (fast_tracepoint_collecting): Declare.
1439 (force_unlock_trace_buffer): Declare.
1440 (handle_tracepoint_bkpts): Declare.
1441 (initialize_low_tracepoint)
1442 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1443 * target.h (struct target_ops) <stabilize_threads,
1444 install_fast_tracepoint_jump_pad>: New fields.
1445 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1446 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1447 [HAVE_STDINT_H]: Include stdint.h.
1448 (trace_debug_1): Rename to ...
1449 (trace_vdebug): ... this.
1450 (trace_debug): Rename to ...
1451 (trace_debug_1): ... this. Add `level' parameter.
1453 (ATTR_USED, ATTR_NOINLINE): New.
1454 (IP_AGENT_EXPORT): New.
1455 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1456 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1457 (about_to_request_buffer_space, trace_buffer_is_full)
1458 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1459 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1460 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1461 (traceframe_write_count, traceframes_created)
1462 (trace_state_variables)
1463 New renaming defines.
1464 (struct ipa_sym_addresses): New.
1465 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1467 (ipa_sym_addrs): New.
1468 (all_tracepoint_symbols_looked_up): New.
1469 (in_process_agent_loaded): New.
1470 (write_e_ipa_not_loaded): New.
1471 (maybe_write_ipa_not_loaded): New.
1472 (tracepoint_look_up_symbols): New.
1473 (debug_threads) [IN_PROCESS_AGENT]: New.
1474 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1475 (UNKNOWN_SIDE_EFFECTS): New.
1476 (stop_tracing): New.
1477 (flush_trace_buffer): New.
1478 (stop_tracing_bkpt): New.
1479 (flush_trace_buffer_bkpt): New.
1480 (read_inferior_integer): New.
1481 (read_inferior_uinteger): New.
1482 (read_inferior_data_pointer): New.
1483 (write_inferior_data_pointer): New.
1484 (write_inferior_integer): New.
1485 (write_inferior_uinteger): New.
1486 (struct collect_static_trace_data_action): Delete.
1487 (enum tracepoint_type): New.
1488 (struct tracepoint) <type>: New field `type'.
1489 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1490 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1491 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1492 (tracepoints): Use IP_AGENT_EXPORT.
1493 (last_tracepoint): Don't include in the IPA.
1494 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1495 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1496 (alloced_trace_state_variables): New.
1497 (trace_state_variables): Use IP_AGENT_EXPORT.
1498 (traceframe_t): Delete unused variable.
1499 (circular_trace_buffer): Don't include in the IPA.
1500 (trace_buffer_start): Delete.
1501 (struct trace_buffer_control): New.
1502 (trace_buffer_free): Delete.
1503 (struct ipa_trace_buffer_control): New.
1504 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1505 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1507 (trace_buffer_ctrl): New.
1508 (TRACE_BUFFER_CTRL_CURR): New.
1509 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1510 Reimplement as macros.
1511 (trace_buffer_wrap): Delete.
1512 (traceframe_write_count, traceframe_read_count)
1513 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1514 (struct tracepoint_hit_ctx) <type>: New field.
1515 (struct fast_tracepoint_ctx): New.
1516 (memory_barrier): New.
1518 (record_tracepoint_error): Update atomically in the IPA.
1519 (clear_inferior_trace_buffer): New.
1520 (about_to_request_buffer_space): New.
1521 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1522 updating the same buffer.
1523 (add_tracepoint): Default the tracepoint's type to trap
1524 tracepoint, and orig_size to -1.
1525 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1527 (create_trace_state_variable): New parameter `gdb'. Handle it.
1528 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1529 (cmd_qtdp): Handle fast tracepoints.
1531 (max_jump_pad_size): New.
1532 (gdb_jump_pad_head): New.
1533 (get_jump_space_head): New.
1534 (claim_jump_space): New.
1535 (sort_tracepoints): New.
1536 (MAX_JUMP_SIZE): New.
1537 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1539 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1540 support. Upload fast traceframes, and delete internal IPA
1542 (stop_tracing_handler): New.
1543 (flush_trace_buffer_handler): New.
1544 (cmd_qtstop): Upload fast tracepoints.
1545 (response_tracepoint): Handle fast tracepoints.
1546 (tracepoint_finished_step): Upload fast traceframes. Set the
1547 tracepoint hit context's tracepoint type.
1548 (handle_tracepoint_bkpts): New.
1549 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1550 type. Add comment about fast tracepoints.
1551 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1552 non-existing action_str field.
1553 (get_context_regcache): Handle fast tracepoints.
1554 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1556 (fast_tracepoint_from_jump_pad_address): New.
1557 (fast_tracepoint_from_ipa_tpoint_address): New.
1558 (collecting_t): New.
1559 (force_unlock_trace_buffer): New.
1560 (fast_tracepoint_collecting): New.
1563 (write_inferior_data_ptr): New.
1564 (target_tp_heap): New.
1565 (target_malloc): New.
1566 (download_agent_expr): New.
1568 (download_tracepoints): New.
1569 (download_trace_state_variables): New.
1570 (upload_fast_traceframes): New.
1571 (IPA_FIRST_TRACEFRAME): New.
1572 (IPA_NEXT_TRACEFRAME_1): New.
1573 (IPA_NEXT_TRACEFRAME): New.
1574 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1575 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1576 (gdb_jump_pad_buffer_end): New.
1577 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1578 (initialize_tracepoint): Adjust.
1579 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1580 buffer. Initialize the low module.
1581 * utils.c (PREFIX, TOOLNAME): New.
1582 (malloc_failure): Use PREFIX.
1583 (error): In the IPA, an error causes an exit.
1584 (fatal, warning): Use PREFIX.
1585 (internal_error): Use TOOLNAME.
1586 (NUMCELLS): Increase to 10.
1587 * configure, config.in: Regenerate.
1589 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1591 * server.c (handle_query) <qSupported>: Do two passes over the
1592 qSupported string to avoid nesting strtok.
1594 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1596 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1598 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1600 * configure: Regenerate.
1601 * proc-service.list: New.
1603 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1605 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1608 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1610 * gdbreplay.c (remote_open): Check error return from socket() call by
1611 its equality to -1 not by it being negative.
1612 * remote-utils.c (remote_open): Likewise.
1614 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1616 * config.h: Regenerate.
1618 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1620 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1621 doesn't provide PTRACE_GET_THREAD_AREA.
1623 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1625 * linux-m68k-low.c: Include <asm/ptrace.h>
1626 (ps_get_thread_area): Implement.
1628 2010-05-03 Doug Evans <dje@google.com>
1630 * event-loop.c (struct callback_event): New struct.
1631 (callback_list): New global.
1632 (append_callback_event, delete_callback_event): New functions.
1633 (process_callback): New function.
1634 (start_event_loop): Call it.
1635 * remote-utils.c (NOT_SCHEDULED): Define.
1636 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1637 moved out of readchar.
1638 (readchar): Rewrite. Call reschedule before returning.
1639 (reset_readchar): New function.
1640 (remote_close): Call it.
1641 (process_remaining, reschedule): New functions.
1642 * server.h (callback_handler_func): New typedef.
1643 (append_callback_event, delete_callback_event): Declare.
1645 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1647 * proc-service.c (ps_pglobal_lookup): Use
1648 thread_db_look_up_one_symbol.
1649 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1650 parameter. Use it instead of all_symbols_looked_up.
1651 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1653 (all_symbols_looked_up): Don't declare.
1654 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1655 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1657 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1658 Set all_symbols_looked_up here.
1659 (thread_db_look_up_one_symbol): New.
1660 (thread_db_get_tls_address): Adjust.
1661 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1662 thread_db object on the heap, and tentatively set it in the
1664 (thread_db_init): Don't set all_symbols_looked_up here.
1665 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1667 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1669 * linux-low.c (linux_kill, linux_detach): Adjust.
1670 (status_pending_p_callback): Remove redundant statement. Check
1671 for !TARGET_WAITIKIND_IGNORE, instead of
1672 TARGET_WAITKIND_STOPPED.
1673 (handle_tracepoints): Make sure LWP is locked. Adjust.
1674 (linux_wait_for_event_1): Adjust.
1675 (linux_cancel_breakpoints): New.
1676 (unsuspend_one_lwp): New.
1677 (unsuspend_all_lwps): New.
1678 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1679 (send_sigstop_callback): Change return type to int, add new
1680 `except' parameter and handle it.
1681 (suspend_and_send_sigstop_callback): New.
1682 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1683 pass them down. If SUSPEND, also increment the lwp's suspend
1685 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1686 (need_step_over_p): Don't consider suspended LWPs.
1687 (start_step_over): Adjust.
1688 (proceed_one_lwp): Change return type to int, add new `except'
1689 parameter and handle it.
1690 (unsuspend_and_proceed_one_lwp): New.
1691 (proceed_all_lwps): Use find_inferior instead of
1693 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1694 also decrement the suspend count of LWPs. Pass `except' down,
1695 instead of hacking its suspend count.
1696 (linux_pause_all): Add `freeze' parameter. Adjust.
1697 (linux_unpause_all): New.
1698 (linux_target_ops): Install linux_unpause_all.
1699 * server.c (handle_status): Adjust.
1700 * target.h (struct target_ops): New fields `unpause_all' and
1701 `cancel_breakpoints'. Add new parameter to `pause_all'.
1702 (pause_all): Add new `freeze' parameter.
1704 (cancel_breakpoints): New.
1705 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1707 (cmd_qtstart): Pause threads.
1708 (stop_tracing): Pause threads, and cancel breakpoints.
1709 * win32-low.c (win32_target_ops): Adjust.
1711 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1713 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1714 the inferior right away from here...
1715 (linux_wait_1): ... to here, and adjust to check the thread's
1716 last_resume_kind instead of the lwp's step or stop_expected flags.
1718 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1720 * README: Use consistent `GDB' and `GDBserver' spellings.
1722 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1724 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1725 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1726 (linux_detach_one_lwp): Assume the lwp is stopped.
1727 (any_thread_of): Delete.
1728 (linux_detach): Stop all lwps here. Don't blindly delete all
1730 (delete_lwp_callback): New.
1731 (linux_mourn): Delete all lwps of the process that is gone.
1732 (linux_wait_1): Don't delete the last lwp of the process here.
1733 * mem-break.h (mark_breakpoints_out): Declare.
1734 * mem-break.c (mark_breakpoints_out): New.
1735 (free_all_breakpoints): Use it.
1736 * server.c (handle_target_event): If the process is gone, mark
1738 * thread-db.c (struct thread_db) <create_bp>: New field.
1739 (thread_db_enable_reporting): Fix prototype. Store a thread event
1740 breakpoint reference in the thread_db struct.
1741 (thread_db_load_search): Clear the thread_db object.
1742 (try_thread_db_load_1): Ditto.
1743 (switch_to_process): New.
1744 (disable_thread_event_reporting): Use it.
1745 (remove_thread_event_breakpoints): New.
1746 (thread_db_detach, thread_db_mourn): Use it.
1748 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1750 * linux-low.c (linux_enable_event_reporting): New.
1751 (linux_wait_for_event_1, handle_extended_wait): Use it.
1753 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1755 * linux-low.c (linux_kill_one_lwp, linux_kill)
1756 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1757 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1758 SIGSTOP even if the LWP is stopped.
1759 (send_sigstop_callback): New.
1760 (stop_all_lwps): Use send_sigstop_callback instead.
1761 (linux_resume_one_thread): Adjust.
1762 (proceed_one_lwp): Still proceed an LWP that the client has
1763 requested to stop, if we haven't reported it as stopped yet. Make
1764 sure that LWPs the client want stopped, have a pending SIGSTOP.
1766 2010-04-26 Doug Evans <dje@google.com>
1768 * server.c (handle_general_set): Make static.
1770 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1771 Print received char after testing for error/eof instead of before.
1772 (input_interrupt): Tweak comment.
1774 2010-04-23 Doug Evans <dje@google.com>
1776 * server.c (start_inferior): Print inferior argv if --debug.
1778 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1780 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1781 * nto-x86-low.c: Include server.h
1783 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1785 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1786 be consistent with other sources of this directory.
1787 (init_registers_amd64): Correct name of source file of this function
1790 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1792 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1795 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1797 * win32-i386-low.c: Add 64-bit support.
1798 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1799 (init_registers_amd64): Declare.
1800 (mappings): Add 64-bit version of array.
1801 (init_windows_x86): New function.
1802 (the_low_target): Change init_arch field to init_windows_x86.
1804 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1806 * win32-low.c: Adapt to support also 64-bit architecture.
1807 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1808 (get_image_name): Use SIZE_T type for local variable `done'.
1809 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1810 (toolhelp_get_dll_name): Idem.
1811 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1812 Use uintptr_t typecast to avoid warning.
1813 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1814 (handle_exception): Use phex_nz to avoid warning.
1815 (win32_wait): Remove unused local variable `process'.
1817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1819 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1822 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1824 * configure.ac: Use `ws2_32' library for srv_mingw.
1825 * configure: Regenerate.
1826 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1827 * remote-utils.c: Likewise.
1829 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1831 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1832 if __x86_64__ is defined.
1834 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1836 * configure: Regenerate.
1838 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1840 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1841 * target.h (target_ops): New get_tib_address field.
1842 * win32-low.h (win32_thread_info): Add thread_local_base field.
1843 * win32-low.c (child_add_thread): Add tlb argument.
1844 Set thread_local_base field to TLB.
1845 (get_child_debug_event): Adapt to child_add_thread change.
1846 (win32_get_tib_address): New function.
1847 (win32_target_ops): Set get_tib_address field to
1848 win32_get_tib_address.
1849 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1851 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1853 * linux-low.c (linux_mourn): Also remove the process.
1854 * server.c (handle_target_event): Don't remove the process here.
1855 * nto-low.c (nto_mourn): New.
1856 (nto_target_ops): Install it.
1857 * spu-low.c (spu_mourn): New.
1858 (spu_target_ops): Install it.
1859 * win32-low.c (win32_mourn): New.
1860 (win32_target_ops): Install it.
1862 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1864 * server.h (buffer_xml_printf): Remove redundant `;'.
1866 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1868 * regcache.c (set_register_cache): Invalidate regcaches before
1869 changing the register cache layout.
1870 (regcache_invalidate_one): Allow a NULL regcache.
1871 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1872 regcaches before changing the register cache layout or the target
1875 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1877 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1878 variable warning on Linux/x86-64.
1880 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1882 GDBserver disconnected tracing support.
1884 * linux-low.c (linux_remove_process): Delete.
1885 (add_lwp): Don't set last_resume_kind here.
1886 (linux_kill): Use `mourn'.
1887 (linux_detach): Use `thread_db_detach', and `mourn'.
1889 (linux_attach_lwp_1): Adjust comment.
1890 (linux_attach): last_resume_kind moved the thread_info; adjust.
1891 (status_pending_p_callback): Adjust.
1892 (linux_wait_for_event_1): Adjust.
1893 (count_events_callback, select_singlestep_lwp_callback)
1894 (select_event_lwp_callback, cancel_breakpoints_callback)
1895 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1896 (proceed_one_lwp): Adjust.
1897 (linux_async): Add debug output.
1898 (linux_thread_stopped): New.
1899 (linux_pause_all): New.
1900 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1902 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1903 (thread_db_free): Delete declaration.
1904 (thread_db_detach, thread_db_mourn): Declare.
1905 * thread-db.c (thread_db_init): Use thread_db_mourn.
1906 (thread_db_free): Delete, split in two.
1907 (disable_thread_event_reporting): New.
1908 (thread_db_detach): New.
1909 (thread_db_mourn): New.
1911 * server.h (struct thread_info) <last_resume_kind>: New field.
1912 <attached>: Add comment.
1913 <gdb_detached>: New field.
1914 (handler_func): Change return type to int.
1915 (handle_serial_event, handle_target_event): Ditto.
1916 (gdb_connected): Declare.
1918 (disconnected_tracing): Declare.
1919 (stop_tracing): Declare.
1921 * server.c (handle_query) <qSupported>: Report support for
1922 disconnected tracing.
1923 (queue_stop_reply_callback): Account for running threads.
1924 (gdb_wants_thread_stopped): New.
1925 (gdb_wants_all_threads_stopped): New.
1926 (gdb_reattached_process): New.
1927 (handle_status): Clear the `gdb_detached' flag of all processes.
1928 In all-stop, stop all threads.
1929 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1930 (process_serial_event): If the remote connection breaks, or if an
1931 exit was forced with "monitor exit", force an event loop exit.
1932 Handle disconnected tracing on detach.
1933 (handle_serial_event): Adjust.
1934 (handle_target_event): If GDB isn't connected, forward events back
1935 to the inferior, unless the last process exited, in which case,
1936 exit gdbserver. Adjust interface.
1938 * remote-utils.c (remote_open): Don't block in accept. Instead
1939 register an event loop source on the listen socket file
1940 descriptor. Refactor bits into ...
1941 (listen_desc): ... this new global.
1942 (gdb_connected): ... this new function.
1943 (enable_async_notification): ... this new function.
1944 (handle_accept_event): ... this new function.
1945 (remote_close): Clear remote_desc.
1947 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1949 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1951 (mourn_inferior): Define.
1952 (target_process_qsupported): Avoid the dangling else problem.
1953 (thread_stopped): Define.
1954 (pause_all): Define.
1955 (target_waitstatus_to_string): Declare.
1956 * target.c (target_waitstatus_to_string): New.
1958 * tracepoint.c (tracing): Make extern.
1959 (disconnected_tracing): New.
1960 (stop_tracing): Make extern. Handle tracing stops due to GDB
1962 (cmd_qtdisconnected): New.
1963 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1964 (handle_tracepoint_general_set): Handle QTDisconnected.
1966 * event-loop.c (event_handler_func): Change return type to int.
1967 (process_event): Bail out if the event handler wants the event
1969 (handle_file_event): Ditto.
1970 (start_event_loop): Bail out if the event handler wants the event
1973 * nto-low.c (nto_target_ops): Adjust.
1974 * spu-low.c (spu_wait): Don't remove the process here.
1975 (spu_target_ops): Adjust.
1976 * win32-low.c (win32_wait): Don't remove the process here.
1977 (win32_target_ops): Adjust.
1979 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1981 * regcache.c (realloc_register_cache): Invalidate inferior's
1982 regcache before recreating it.
1984 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1986 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1988 2010-04-09 Stan Shebs <stan@codesourcery.com>
1989 Pedro Alves <pedro@codesourcery.com>
1991 * server.h (LONGEST): New.
1992 (struct thread_info) <while_stepping>: New field.
1993 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1995 (initialize_tracepoint, handle_tracepoint_general_set)
1996 (handle_tracepoint_query, tracepoint_finished_step)
1997 (tracepoint_was_hit, release_while_stepping_state_list):
1998 (current_traceframe): Declare.
1999 * server.c (handle_general_set): Handle tracepoint packets.
2001 (write_memory): New.
2002 (handle_search_memory_1): Use read_memory.
2003 (handle_query): Report support for conditional tracepoints, trace
2004 state variables, and tracepoint sources. Handle tracepoint
2006 (main): Initialize the tracepoints module.
2007 (process_serial_event): Handle traceframe reads/writes.
2009 * linux-low.c (handle_tracepoints): New.
2010 (linux_wait_1): Call it.
2011 (linux_resume_one_lwp): Handle while-stepping.
2012 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2013 (linux_target_ops): Install them.
2014 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2016 * linux-x86-low.c (x86_supports_tracepoints): New.
2017 (the_low_target). Install it.
2019 * mem-break.h (delete_breakpoint): Declare.
2020 * mem-break.c (delete_breakpoint): Make external.
2022 * target.h (struct target_ops): Add `supports_tracepoints',
2023 `read_pc', and `write_pc' fields.
2024 (target_supports_tracepoints): Define.
2025 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2028 * regcache.h (struct regcache) <registers_owned>: New field.
2029 (init_register_cache, regcache_cpy): Declare.
2030 (regcache_read_pc, regcache_write_pc): Declare.
2031 (register_cache_size): Declare.
2032 (supply_regblock): Declare.
2033 * regcache.c (init_register_cache): New.
2034 (new_register_cache): Use it.
2035 (regcache_cpy): New.
2036 (register_cache_size): New.
2037 (supply_regblock): New.
2038 (regcache_read_pc, regcache_write_pc): New.
2040 * tracepoint.c: New.
2042 * Makefile.in (OBS): Add tracepoint.o.
2043 (tracepoint.o): New rule.
2045 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2047 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2049 (i386-mmx.c): Likewise.
2050 (i386-mmx-linux.o): Likewise.
2051 (i386-mmx-linux.c): Likewise.
2053 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2054 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2055 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2056 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2058 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2059 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2060 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2062 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2064 * Makefile.in (clean): Updated.
2066 (i386-avx.c): Likewise.
2067 (i386-avx-linux.o): Likewise.
2068 (i386-avx-linux.c): Likewise.
2069 (amd64-avx.o): Likewise.
2070 (amd64-avx.c): Likewise.
2071 (amd64-avx-linux.o): Likewise.
2072 (amd64-avx-linux.c): Likewise.
2074 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2075 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2076 (srv_amd64_regobj): Add amd64-avx.o.
2077 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2078 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2079 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2080 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2081 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2082 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2083 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2085 * i387-fp.c: Include "i386-xstate.h".
2087 (i387_cache_to_xsave): Likewise.
2088 (i387_xsave_to_cache): Likewise.
2089 (x86_xcr0): Likewise.
2091 * i387-fp.h (i387_cache_to_xsave): Likewise.
2092 (i387_xsave_to_cache): Likewise.
2093 (x86_xcr0): Likewise.
2095 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2096 * linux-crisv32-low.c (target_regsets): Likewise.
2097 * linux-m68k-low.c (target_regsets): Likewise.
2098 * linux-mips-low.c (target_regsets): Likewise.
2099 * linux-ppc-low.c (target_regsets): Likewise.
2100 * linux-s390-low.c (target_regsets): Likewise.
2101 * linux-sh-low.c (target_regsets): Likewise.
2102 * linux-sparc-low.c (target_regsets): Likewise.
2103 * linux-xtensa-low.c (target_regsets): Likewise.
2105 * linux-low.c: Include <sys/uio.h>.
2106 (regsets_fetch_inferior_registers): Support nt_type.
2107 (regsets_store_inferior_registers): Likewise.
2108 (linux_process_qsupported): New.
2109 (linux_target_ops): Add linux_process_qsupported.
2111 * linux-low.h (regset_info): Add nt_type.
2112 (linux_target_ops): Add process_qsupported.
2114 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2116 (init_registers_i386_avx_linux): New.
2117 (init_registers_amd64_avx_linux): Likewise.
2118 (xmltarget_i386_linux_no_xml): Likewise.
2119 (xmltarget_amd64_linux_no_xml): Likewise.
2120 (PTRACE_GETREGSET): Likewise.
2121 (PTRACE_SETREGSET): Likewise.
2122 (x86_fill_xstateregset): Likewise.
2123 (x86_store_xstateregset): Likewise.
2124 (use_xml): Likewise.
2125 (x86_linux_update_xmltarget): Likewise.
2126 (x86_linux_process_qsupported): Likewise.
2127 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2128 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2129 init_registers_i386_linux here. Call
2130 x86_linux_update_xmltarget.
2131 (the_low_target): Add x86_linux_process_qsupported.
2133 * server.c (handle_query): Call target_process_qsupported.
2135 * target.h (target_ops): Add process_qsupported.
2136 (target_process_qsupported): New.
2138 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2140 * inferiors.c (add_thread): Set last_status kind to
2141 TARGET_WAITKIND_IGNORE.
2142 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2143 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2144 (linux_wait_1): Move `thread' local definition to block that uses
2145 it. Don't NULL initialize `event_child'.
2146 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2147 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2148 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2150 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2152 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2153 an extended waitstatus, or by a watchpoint.
2154 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2155 thread was stepping or has been stopped by a watchpoint.
2157 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2159 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2160 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2161 of another, then delete the previous, and validate all
2163 (validate_inserted_breakpoint): New.
2164 (delete_disabled_breakpoints): New.
2165 (validate_breakpoints): New.
2166 (check_mem_read): Validate breakpoints before trusting their
2167 shadow. Delete disabled breakpoints.
2168 (check_mem_write): Validate breakpoints before trusting they
2169 should be inserted. Delete disabled breakpoints.
2170 * mem-break.h (validate_breakpoints):
2171 * server.c (handle_query): Validate breakpoints when we see a
2174 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2176 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2177 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2178 if we could tell there's a GDB breakpoint at stop_pc.
2179 (need_step_over_p): Don't do a step over if we find a GDB
2180 breakpoint at the resume PC.
2182 * mem-break.c (struct raw_breakpoint): New.
2183 (enum bkpt_type): New type `gdb_breakpoint'.
2184 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2185 fields. New field `raw'.
2186 (find_raw_breakpoint_at): New.
2187 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2189 (set_breakpoint_at): Adjust.
2190 (delete_raw_breakpoint): New.
2191 (release_breakpoint): New.
2192 (delete_breakpoint): Rename to...
2193 (delete_breakpoint_1): ... this. Add proc parameter. Use
2194 release_breakpoint. Return ENOENT.
2195 (delete_breakpoint): Reimplement.
2196 (find_breakpoint_at): Delete.
2197 (find_gdb_breakpoint_at): New.
2198 (delete_breakpoint_at): Delete.
2199 (set_gdb_breakpoint_at): New.
2200 (delete_gdb_breakpoint_at): New.
2201 (gdb_breakpoint_here): New.
2202 (set_reinsert_breakpoint): Use release_breakpoint.
2203 (uninsert_breakpoint): Rename to ...
2204 (uninsert_raw_breakpoint): ... this.
2205 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2206 (reinsert_raw_breakpoint): Change parameter type to
2208 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2210 (check_breakpoints): Adjust. Use release_breakpoint.
2211 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2212 (breakpoint_inserted_here): Ditto.
2213 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2214 Don't trust the breakpoint's shadow if it is not inserted.
2215 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2216 (delete_all_breakpoints): Adjust.
2217 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2218 use delete_breakpoint_1.
2220 * mem-break.h (breakpoints_supported): Delete declaration.
2221 (set_gdb_breakpoint_at): Declare.
2222 (gdb_breakpoint_here): Declare.
2223 (delete_breakpoint_at): Delete.
2224 (delete_gdb_breakpoint_at): Declare.
2226 * server.h (struct raw_breakpoint): Forward declare.
2227 (struct process_info): New field `raw_breakpoints'.
2229 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2232 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2234 * linux-low.c (status_pending_p_callback): Fix comment.
2235 (linux_wait_for_event_1): Move most of the internal breakpoint
2236 handling from here...
2237 (linux_wait_1): ... to here.
2238 (count_events_callback): New.
2239 (select_singlestep_lwp_callback): New.
2240 (select_event_lwp_callback): New.
2241 (cancel_breakpoints_callback): New.
2242 (select_event_lwp): New.
2243 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2244 priority to all LWPs that have had events that should be reported
2245 to the client. Cancel breakpoints when about to reporting the
2246 event to the client, not while stopping lwps. No longer cancel
2247 finished single-steps here.
2248 (cancel_finished_single_step): Delete.
2249 (cancel_finished_single_steps): Delete.
2251 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2253 * mem-break.c (enum bkpt_type): New.
2254 (struct breakpoint): New field `type'.
2255 (set_breakpoint_at): Change return type to struct breakpoint
2256 pointer. Set type to `other_breakpoint' by default.
2257 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2258 in the breakpoint list.
2259 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2260 (reinsert_breakpoint): Rename to ...
2261 (reinsert_raw_breakpoint): ... this.
2262 (reinsert_breakpoints_at): Adjust.
2263 * mem-break.h (struct breakpoint): Declare.
2264 (set_breakpoint_at): Change return type to struct breakpoint
2267 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2269 * server.c (handle_query): Assign, not compare.
2271 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2273 Teach linux gdbserver to step-over-breakpoints.
2275 * linux-low.c (can_hardware_single_step): New.
2276 (supports_breakpoints): New.
2277 (handle_extended_wait): If stopping threads, read the stop pc of
2280 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2281 low target doesn't support retrieving the PC.
2282 (add_lwp): Set last_resume_kind to resume_continue.
2283 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2284 (linux_attach): Don't clear stop_expected. Set the lwp's
2285 last_resume_kind to resume_stop.
2286 (linux_detach_one_lwp): Don't check for removed breakpoints.
2287 (check_removed_breakpoint): Delete.
2288 (status_pending_p): Rename to ...
2289 (status_pending_p_callback): ... this. Don't check for removed
2290 breakpoints. Don't consider threads that are stopped from GDB's
2292 (linux_wait_for_lwp): Always read the stop_pc here.
2293 (cancel_breakpoint): New.
2294 (step_over_bkpt): New global.
2295 (linux_wait_for_event_1): Implement stepping over breakpoints.
2296 (gdb_wants_lwp_stopped): New.
2297 (gdb_wants_all_stopped): New.
2298 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2299 single-step traps here. Store the thread's last reported target
2301 (send_sigstop): Don't clear stop_expected. Always set it,
2303 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2304 (cancel_finished_single_step): New.
2305 (cancel_finished_single_steps): New.
2306 (wait_for_sigstop): Don't cancel finished single-step traps here.
2307 (linux_resume_one_lwp): Don't check for removed breakpoints.
2308 Don't set `step' on non-hardware step archs.
2309 (linux_set_resume_request): Ignore resume_stop requests if already
2310 stopping or stopped. Set the lwp's last_resume_kind.
2311 (resume_status_pending_p): Don't check for removed breakpoints.
2312 (need_step_over_p): New.
2313 (start_step_over): New.
2314 (finish_step_over): New.
2315 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2316 requests. Clear the thread's last reported target waitstatus.
2317 Don't use the `suspended' flag. Don't consider pending breakpoints.
2318 (linux_resume): Start a step-over if necessary.
2319 (proceed_one_lwp): New.
2320 (proceed_all_lwps): New.
2321 (unstop_all_lwps): New.
2322 * linux-low.h (struct lwp_info): Rewrite comment for the
2323 `suspended' flag. Add the `stop_pc' field. Delete the
2324 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2325 Add `'last_resume_kind' and `need_step_over' fields.
2326 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2327 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2328 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2329 (set_raw_breakpoint_at): New.
2330 (set_breakpoint_at): Rewrite to use it.
2331 (reinsert_breakpoint_handler): Delete.
2332 (set_reinsert_breakpoint): New.
2333 (reinsert_breakpoint_by_bp): Delete.
2334 (delete_reinsert_breakpoints): New.
2335 (uninsert_breakpoint): Rewrite.
2336 (uninsert_breakpoints_at): New.
2337 (reinsert_breakpoint): Rewrite.
2338 (reinsert_breakpoints_at): New.
2339 (check_breakpoints): Rewrite.
2340 (breakpoint_here): New.
2341 (breakpoint_inserted_here): New.
2342 (check_mem_read): Adjust.
2343 * mem-break.h (breakpoints_supported, breakpoint_here)
2344 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2345 (reinsert_breakpoint_by_bp): Delete declaration.
2346 (delete_reinsert_breakpoints): Declare.
2347 (reinsert_breakpoint): Delete declaration.
2348 (reinsert_breakpoints_at): Declare.
2349 (uninsert_breakpoint): Delete declaration.
2350 (uninsert_breakpoints_at): Declare.
2351 (check_breakpoints): Adjust prototype.
2352 * server.h: Adjust include order.
2353 (struct thread_info): Declare here. Add a `last_status' field.
2355 2010-03-23 Michael Snyder <msnyder@vmware.com>
2357 * server.c (crc32): New function.
2358 (handle_query): Add handling for 'qCRC:' request.
2360 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2362 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2363 lwp had been stopped by a watchpoint.
2365 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2367 * server.h (internal_error): Declare.
2368 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2369 * utils.c (internal_error): New function.
2371 2010-03-15 Andreas Schwab <schwab@redhat.com>
2373 * configure.srv: Fix typo setting srv_regobj.
2375 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2377 * linux-low.c (fetch_register): Avoid passing a non string literal
2379 (usr_store_inferior_registers): Ditto.
2381 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2383 * linux-low.c (linux_write_memory): Bail out early if peeking
2386 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2388 * linux-low.h (struct lwp_info): New fields
2389 `stopped_by_watchpoint' and `stopped_data_address'.
2390 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2391 here, and cache them in the lwp object.
2392 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2394 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2396 (linux_stopped_by_watchpoint): Rewrite.
2397 (linux_stopped_data_address): Rewrite.
2399 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2401 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2402 switching the current inferior, not before.
2404 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2406 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2407 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2408 i386-linux.c and amd64-linux.c.
2409 (reg-i386.o): Removed.
2410 (reg-i386.c): Likewise.
2411 (reg-i386-linux.o): Likewise.
2412 (reg-i386-linux.c): Likewise.
2413 (reg-x86-64.o): Likewise.
2414 (reg-x86-64.c): Likewise.
2415 (reg-x86-64-linux.o): Likewise.
2416 (reg-x86-64-linux.c): Likewise.
2419 (i386-linux.o): Likewise.
2420 (i386-linux.c): Likewise.
2421 (amd64.o): Likewise.
2422 (amd64.c): Likewise.
2423 (amd64-linux.o): Likewise.
2424 (amd64-linux.c): Likewise.
2426 * configure.srv (srv_i386_regobj): New.
2427 (srv_i386_linux_regobj): Likewise.
2428 (srv_amd64_regobj): Likewise.
2429 (srv_amd64_linux_regobj): Likewise.
2430 (srv_i386_32bit_xmlfiles): Likewise.
2431 (srv_i386_64bit_xmlfiles): Likewise.
2432 (srv_i386_xmlfiles): Likewise.
2433 (srv_amd64_xmlfiles): Likewise.
2434 (srv_i386_linux_xmlfiles): Likewise.
2435 (srv_amd64_linux_xmlfiles): Likewise.
2436 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2437 srv_xmlfiles to $srv_i386_xmlfiles.
2438 (i[34567]86-*-mingw32ce*): Likewise.
2439 (i[34567]86-*-mingw*): Likewise.
2440 (i[34567]86-*-nto*): Likewise.
2441 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2442 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2443 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2444 (x86_64-*-linux*): Likewise.
2446 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2447 (init_registers_amd64_linux): New.
2448 (x86_arch_setup): Replace init_registers_x86_64_linux with
2449 init_registers_amd64_linux.
2451 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2453 * configure.ac: Check for libdl. If it is not available link against
2454 static libthread_db.
2455 * configure: Regenerate.
2457 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2461 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2462 handing a read watchpoint.
2463 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2465 2010-02-12 Doug Evans <dje@google.com>
2467 * linux-low.c (linux_supports_tracefork_flag): Document.
2468 (linux_look_up_symbols): Add comment.
2470 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2472 * regcache.c (supply_register): Clear regcache if buf is NULL.
2474 2010-02-02 Nicolas Roche <roche@sourceware.org>
2475 Joel Brobecker <brobecker@adacore.com>
2477 * inferiors.c (find_inferior): Add function documentation.
2478 (unloaded_dll): Handle the case where the unloaded dll has not
2479 been previously registered in the dll list.
2481 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2483 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2484 (thumb2_breakpoint): New.
2485 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2487 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2489 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2490 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2493 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2495 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2497 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2499 * linux-s390-low.c (s390_collect_ptrace_register)
2500 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2502 2010-01-21 Doug Evans <dje@google.com>
2504 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2505 (PTRACE_ARG4_TYPE): New macro.
2506 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2507 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2508 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2509 (usr_store_inferior_registers): Ditto.
2510 (linux_read_memory, linux_write_memory): Ditto.
2511 (linux_test_for_tracefork): Ditto.
2513 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2514 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2516 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2518 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2521 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2523 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2524 prototype to take a regcache. Adjust.
2526 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2528 * regcache.h (struct thread_info): Forward declare.
2529 (struct regcache): New.
2530 (new_register_cache): Adjust prototype.
2531 (get_thread_regcache): Declare.
2532 (free_register_cache): Adjust prototype.
2533 (registers_to_string, registers_from_string): Ditto.
2534 (supply_register, supply_register_by_name, collect_register)
2535 (collect_register_as_string, collect_register_by_name): Ditto.
2536 * regcache.c (struct inferior_regcache_data): Delete.
2537 (get_regcache): Rename to ...
2538 (get_thread_regcache): ... this. Adjust. Switch inferior before
2540 (regcache_invalidate_one): Adjust.
2541 (regcache_invalidate): Fix prototype.
2542 (new_register_cache): Return the new register cache.
2543 (free_register_cache): Change prototype.
2544 (realloc_register_cache): Adjust.
2545 (registers_to_string): Change prototype to take a regcache. Adjust.
2546 (registers_from_string): Ditto.
2547 (register_data): Ditto.
2548 (supply_register): Ditto.
2549 (supply_register_by_name): Ditto.
2550 (collect_register): Ditto.
2551 (collect_register_as_string): Ditto.
2552 (collect_register_by_name): Ditto.
2553 * server.c (process_serial_event): Adjust.
2554 * linux-low.h (regset_fill_func, regset_store_func): Change
2556 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2558 * linux-low.c (get_stop_pc): Adjust.
2559 (check_removed_breakpoint): Adjust.
2560 (linux_wait_for_event): Adjust.
2561 (linux_resume_one_lwp): Adjust.
2562 (fetch_register): Add regcache parameter. Adjust.
2563 (usr_store_inferior_registers): Ditto.
2564 (regsets_fetch_inferior_registers): Ditto.
2565 (regsets_store_inferior_registers): Ditto.
2566 (linux_fetch_registers, linux_store_registers): Ditto.
2567 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2569 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2570 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2571 prototype to take a regcache.
2572 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2573 * remote-utils.c (convert_ascii_to_int, outreg)
2574 (prepare_resume_reply): Change prototype to take a regcache.
2576 * target.h (struct target_ops) <fetch_registers, store_registers>:
2577 Change prototype to take a regcache.
2578 (fetch_inferior_registers, store_inferior_registers): Change
2579 prototype to take a regcache. Adjust.
2580 * proc-service.c (ps_lgetregs): Adjust.
2581 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2582 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2583 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2584 take a regcache. Adjust.
2585 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2586 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2587 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2588 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2589 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2590 (cris_cannot_fetch_register):
2591 (cris_breakpoint_at): Change prototype to take a regcache.
2593 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2594 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2595 to take a regcache. Adjust.
2596 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2598 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2599 take a regcache. Adjust.
2600 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2601 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2602 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2603 * linux-mips-low.c (mips_get_pc):
2604 (mips_set_pc): Change prototype to take a regcache. Adjust.
2605 (mips_reinsert_addr): Adjust.
2606 (mips_collect_register): Change prototype to take a regcache.
2608 (mips_supply_register):
2609 (mips_collect_register_32bit, mips_supply_register_32bit)
2610 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2611 (mips_store_fpregset): Ditto.
2612 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2614 (parse_spufs_run): Adjust.
2615 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2616 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2617 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2618 take a regcache. Adjust.
2619 * linux-s390-low.c (s390_collect_ptrace_register)
2620 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2621 (s390_set_pc): Change prototype to take a regcache. Adjust.
2622 (s390_arch_setup): Adjust.
2623 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2624 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2625 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2626 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2627 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2629 (sparc_breakpoint_at): Adjust.
2630 * linux-xtensa-low.c (xtensa_fill_gregset):
2631 (xtensa_store_gregset):
2632 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2633 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2634 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2635 prototype to take a regcache. Adjust.
2636 * win32-arm-low.c (arm_fetch_inferior_register)
2637 (arm_store_inferior_register): Change prototype to take a
2639 * win32-i386-low.c (i386_fetch_inferior_register)
2640 (i386_store_inferior_register): Change prototype to take a
2642 * win32-low.c (child_fetch_inferior_registers)
2643 (child_store_inferior_registers): Change prototype to take a
2645 (win32_wait): Adjust.
2646 (win32_fetch_inferior_registers): Change prototype to take a
2648 (win32_store_inferior_registers): Adjust.
2649 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2650 store_inferior_register>: Change prototype to take a regcache.
2652 2010-01-20 Doug Evans <dje@google.com>
2654 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2656 (linux_wait_for_event1, linux_init_signals): Ditto.
2657 (W_STOPCODE): Provide definition if missing.
2659 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2661 * linux-low.c (linux_core_of_thread): New.
2662 (compare_ints, show_process, list_threads): New.
2663 (linux_qxfer_osdata): Report threads and cores.
2664 (linux_target_op): Register linux_core_of_thread.
2665 * remote-utils.c (prepare_resume_reply): Report the core.
2666 (buffer_xml_printf): Support %d specifier.
2667 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2669 (handle_query): Handle qXfer:threads. Announce availability
2671 * target.h (struct target_ops): New field core_of_thread.
2673 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2675 * Makefile.in (clean): Remove new generated files.
2676 (reg-s390.o, reg-s390.c): Remove rules.
2677 (reg-s390x.o, reg-s390x.c): Likewise.
2678 (s390-linux32.o, s390-linux32.c): Add rules.
2679 (s390-linux64.o, s390-linux64.c): Likewise.
2680 (s390x-linux64.o, s390x-linux64.c): Likewise.
2681 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2682 * linux-s390-low.c: Include <elf.h>.
2683 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2684 (init_registers_s390): Remove prototype.
2685 (init_registers_s390x): Likewise.
2686 (init_registers_s390_linux32): Add prototype.
2687 (init_registers_s390_linux64): Likewise.
2688 (init_registers_s390x_linux64): Likewise.
2689 (s390_num_regs_3264): New define.
2690 (s390_regmap_3264): New global variable.
2691 (s390_cannot_fetch_register): Remove obsolete check.
2692 (s390_cannot_store_register): Likewise.
2693 (s390_collect_ptrace_register): Handle upper/lower register halves.
2694 (s390_supply_ptrace_register): Likewise.
2695 (s390_fill_gregset): Update to register number changes.
2696 (s390_get_hwcap): New routine.
2697 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2698 Install appropriate regmap and register set.
2700 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2702 * server.c (gdbserver_version): Update copyright year to 2010.
2703 * gdbreplay.c (gdbreplay_version): Likewise.
2705 2009-12-28 Doug Evans <dje@google.com>
2707 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2708 elf/external.h. Include <elf.h> instead but only if necessary.
2710 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2712 * linux-low.c (linux_remove_process): Remove `detaching'
2713 parameter. Don't release/detach from thread_db here.
2714 (linux_kill): Release/detach from thread_db here, ...
2715 (linux_detach): ... and here, before actually detaching.
2716 (linux_wait_1): ... and here, when a process exits.
2717 * thread-db.c (any_thread_of): New.
2718 (thread_db_free): Switch the current inferior to a thread of the
2721 2009-12-21 Doug Evans <dje@google.com>
2723 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2725 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2726 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2727 warning ifndef __NR_tkill. Move setting of errno there too.
2728 Delete unnecessary resetting of errno after syscall.
2729 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2731 * configure.ac: Check for dladdr.
2732 * config.in: Regenerate.
2733 * configure: Regenerate.
2734 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2735 (try_thread_db_load): Update.
2737 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2739 2009-12-18 Doug Evans <dje@google.com>
2741 * event-loop.c: Include unistd.h if it exists.
2743 * linux-low.c (my_waitpid): Move definition away from being in
2744 between linux_tracefork_child/linux_test_for_tracefork.
2746 * gdb_proc_service.h (psaddr_t): Fix type.
2747 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2748 signature to match glibc.
2750 2009-12-16 Doug Evans <dje@google.com>
2752 * linux-low.c (linux_read_memory): Fix argument to read.
2754 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2756 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2757 events, don't leave current_inferior pointing at null.
2759 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2761 * win32-low.c (LOG): Delete.
2762 (OUTMSG): Output to stderr.
2763 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2764 on compile time LOG macro.
2765 (win32_wait): Fix debug output.
2767 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2769 * win32-low.c (win32_add_one_solib): If the dll name is
2770 "ntdll.dll", prepend the system directory to the dll path.
2772 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2774 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2776 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2777 Vladimir Prus <vladimir@codesourcery.com>
2779 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2780 * configure.ac: Check for __mcoldfire__ and set
2781 gdb_cv_m68k_is_coldfire.
2782 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2783 reg-cf.o and reg-m68k.o.
2784 * configure: Regenerated.
2786 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2788 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2789 Pass it to thread_db_free.
2790 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2791 proper `detaching' argument to linux_remove_process.
2792 * linux-low.h (thread_db_free): Add `detaching' parameter.
2793 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2795 (thread_db_free): Add `detaching' parameter. Only
2796 call td_ta_clear_event if detaching from process.
2798 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2800 * thread-db.c (thread_db_free): Fix typo.
2802 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2805 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2807 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2809 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2810 with an i686 compiler.
2811 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2813 * configure: Rebuilt.
2815 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2819 * server.c (handle_search_memory_1): Correct read_addr initialization
2820 in loop for searching subsequent chunks.
2822 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2824 * configure.ac: New --with-libthread-db option.
2825 * thread-db.c: Allow direct dependence on libthread_db.
2826 (thread_db_free): Adjust.
2827 * config.in: Regenerate.
2828 * configure: Likewise.
2830 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2833 * thread-db.c (attach_thread): New function.
2834 (maybe_attach_thread): Return success/failure.
2835 (find_new_threads_callback): Adjust.
2836 (thread_db_find_new_threads): Loop until no new threads.
2838 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2840 * proc-service.c (ps_lgetregs): Formatting.
2842 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2844 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2845 * configure.ac: Adjust.
2846 * linux-low.h (struct process_info_private): Move members to struct
2848 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2849 * linux-low.c (linux_remove_process): Adjust.
2850 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2851 * server.c (handle_query): Move code ...
2852 (handle_monitor_command): ... here. New function.
2853 * target.h (struct target_ops): New member.
2854 * thread-db.c (struct thread_db): New.
2855 (libthread_db_search_path): New variable.
2856 (thread_db_create_event, thread_db_enable_reporting)
2857 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2858 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2859 (try_thread_db_load_1, dladdr_to_soname): New functions.
2860 (try_thread_db_load, thread_db_load_search): New functions.
2861 (thread_db_init): Search for libthread_db.
2862 (thread_db_free): New function.
2863 (thread_db_handle_monitor_command): Likewise.
2864 * config.in: Regenerate.
2865 * configure: Regenerate.
2867 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2869 * spu-low.c (spu_kill): Wait for inferior to terminate.
2870 Call clear_inferiors.
2871 (spu_detach): Call clear_inferiors.
2873 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2875 * aclocal.m4: Regenerate.
2876 * config.in: Likewise.
2877 * configure: Likewise.
2879 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2881 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2882 (parse_spufs_run): New function.
2883 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2884 (ppc_breakpoint_at): Handle SPU breakpoints.
2886 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2888 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2889 (SPUFS_MAGIC): Define.
2890 (spu_enumerate_spu_ids): New function.
2891 (linux_qxfer_spu): New function.
2892 (linux_target_ops): Install linux_qxfer_spu.
2894 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2896 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2897 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2898 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2899 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2900 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2901 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2902 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2903 (init_registers_powerpc_cell32l): Add prototype.
2904 (init_registers_powerpc_cell64l): Likewise.
2905 (ppc_arch_setup): Detect Cell/B.E. architecture.
2907 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2909 * Makefile.in (datarootdir): New variable.
2911 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2913 * linux-low.c (linux_write_memory): Update debugging output.
2914 * Makefile.in (clean): Add new descriptions.
2915 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2916 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2917 * configure.srv: Add new files for arm*-*-linux*.
2918 * linux-arm-low.c: Add new declarations.
2919 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2920 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2921 (HWCAP_VFPv3D16): New.
2922 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2923 instead of __IWMMXT__.
2924 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2925 (arm_arch_setup): New.
2926 (target_regsets): Remove #ifdef. Add VFP regset.
2927 (the_low_target): Use arm_arch_setup.
2929 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2931 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2932 the main thread again.
2934 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2936 Adding Neutrino gdbserver.
2937 * configure: Regenerated.
2938 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2939 * configure.srv (i[34567]86-*-nto*): New target.
2940 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2941 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2942 (nto_comctrl) [__QNX__]: New function.
2943 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2945 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2947 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2950 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2951 Pedro Alves <pedro@codesourcery.com>
2953 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2954 don't support CONTEXT_EXTENDED_REGISTERS.
2955 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2956 (the_low_target): Install them.
2957 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2958 failing with ERROR_PIPE_NOT_CONNECTED.
2960 2009-06-30 Doug Evans <dje@google.com>
2961 Pierre Muller <muller@ics.u-strasbg.fr>
2963 Add h/w watchpoint support to x86-linux, win32-i386.
2964 * Makefile.in (SFILES): Add i386-low.c
2965 (i386_low_h): Define.
2966 (i386-low.o): Add dependencies.
2967 (linux-x86-low.o): Add i386-low.h dependency.
2968 (win32-i386-low.o): Ditto.
2969 * i386-low.c: New file.
2970 * i386-low.h: New file.
2971 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2972 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2973 * linux-low.c (linux_add_process): Initialize arch_private.
2974 (linux_remove_process): Free arch_private.
2975 (add_lwp): Initialize arch_private.
2976 (delete_lwp): Free arch_private.
2977 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2979 * linux-low.h (process_info_private): New member arch_private.
2980 (lwp_info): New member arch_private.
2981 (linux_target_ops): New members new_process, new_thread,
2983 (ptid_of): New macro.
2984 * linux-x86-low.c: Include stddef.h, i386-low.h.
2985 (arch_process_info): New struct.
2986 (arch_lwp_info): New struct.
2987 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2988 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2989 (i386_dr_low_get_status): New function.
2990 (x86_insert_point, x86_remove_point): New functions.
2991 (x86_stopped_by_watchpoint): New function.
2992 (x86_stopped_data_address): New function.
2993 (x86_linux_new_process, x86_linux_new_thread): New functions.
2994 (x86_linux_prepare_to_resume): New function.
2995 (the_low_target): Add entries for insert_point, remove_point,
2996 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2998 * server.c (debug_hw_points): New global.
2999 (monitor_show_help): Document set debug-hw-points.
3000 (handle_query): Process "set debug-hw-points".
3001 * server.h (debug_hw_points): Declare.
3002 (paddress): Declare.
3003 * utils.c (NUMCELLS, CELLSIZE): New macros.
3004 (get_sell, xsnprintf, paddress): New functions.
3005 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3006 remove_point, stopped_by_watchpoint, stopped_data_address.
3007 * win32-i386-low.c: Include i386-low.h.
3008 (debug_reg_state): Replaces dr.
3009 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3010 (i386_dr_low_get_status): New function.
3011 (i386_insert_point, i386_remove_point): New functions.
3012 (i386_stopped_by_watchpoint): New function.
3013 (i386_stopped_data_address): New function.
3014 (i386_initial_stuff): Update.
3015 (get_thread_context,set_thread_context,i386_thread_added): Update.
3016 (the_low_target): Add entries for insert_point,
3017 remove_point, stopped_by_watchpoint, stopped_data_address.
3018 * win32-low.c (win32_insert_watchpoint): New function.
3019 (win32_remove_watchpoint): New function.
3020 (win32_stopped_by_watchpoint): New function.
3021 (win32_stopped_data_address): New function.
3022 (win32_target_ops): Add entries for insert_watchpoint,
3023 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3024 * win32-low.h (win32_target_ops): New members insert_point,
3025 remove_point, stopped_by_watchpoint, stopped_data_address.
3027 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3029 * server.c (process_serial_event): Re-return unsupported, not
3030 error, if the type isn't recognized. Re-allow supporting only
3031 insert or remove packets. Also call require_running for
3032 breakpoints. Add missing break statement to default case. Tidy.
3033 * target.h (struct target_ops): Rename insert_watchpoint to
3034 insert_point, and remove_watchpoint to remove_point.
3036 * linux-low.h (struct linux_target_ops): Likewise.
3037 * linux-low.c (linux_insert_watchpoint): Rename to ...
3038 (linux_insert_point): ... this. Adjust.
3039 (linux_remove_watchpoint): Rename to ...
3040 (linux_remove_point): ... this. Adjust.
3041 (linux_target_ops): Adjust.
3042 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3043 (cris_insert_point): ... this.
3044 (cris_remove_watchpoint): Rename to ...
3045 (cris_remove_point): ... this.
3046 (the_low_target): Adjust.
3048 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3050 * server.c (handle_v_kill): Pass signal_pid to
3051 kill_inferior if multi_process is zero.
3053 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3055 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3056 * target.h (target_ops): Comment for *_watchpoint to make it clear
3057 the functions can get types '0' and '1'.
3059 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3061 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3062 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3063 * regcache.c (get_regcache): Likewise.
3064 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3065 * win32-low.c (child_fetch_inferior_registers): Remove check for
3068 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3069 Pedro Alves <pedro@codesourcery.com>
3071 * target.h (struct target_ops) <supports_multi_process>: New
3073 (target_supports_multi_process): New.
3074 * server.c (handle_query): Even if GDB reports support, only
3075 enable multi-process if the target also supports it. Report
3076 multi-process support only if the target backend supports it.
3077 * linux-low.c (linux_supports_multi_process): New function.
3078 (linux_target_ops): Install it as target_supports_multi_process
3081 2009-05-24 Doug Evans <dje@google.com>
3083 Global renaming of find_thread_pid to find_thread_ptid.
3084 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3085 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3086 All callers updated.
3088 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3089 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3092 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3093 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3094 (linux_resume_one_lwp): Ditto.
3096 2009-05-23 Doug Evans <dje@google.com>
3098 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3099 from struct inferior_list_entry * to struct lwp_info *.
3100 All callers updated.
3102 2009-05-13 Doug Evans <dje@google.com>
3104 * linux-x86-low.c: Don't include assert.h.
3105 (x86_siginfo_fixup): Use fatal, not assert.
3106 (x86_arch_setup): Fix comment.
3108 2009-05-12 Doug Evans <dje@google.com>
3110 Biarch support for i386/amd64 gdbserver.
3111 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3112 Add linux-x86-low.c.
3113 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3114 (linux-x86-low.o): Add.
3115 * linux-x86-64-low.c: Delete.
3116 * linux-i386-low.c: Delete.
3117 * linux-x86-low.c: New file.
3118 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3120 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3122 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3123 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3124 (linux_child_pid_to_exec_file): New function.
3125 (elf_64_header_p, elf_64_file_p): New functions.
3126 (siginfo_fixup): New function.
3127 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3128 give target a chance to convert layout.
3129 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3130 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3132 2009-05-07 Doug Evans <dje@google.com>
3134 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3135 (regsets_store_inferior_registers): Ditto.
3137 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3141 * linux-low.c (must_set_ptrace_flags): Delete.
3142 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3144 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3145 `lwp->must_set_ptrace_flags' instead.
3146 (linux_wait_for_event_1): Set ptrace options here.
3147 (linux_wait_1): ... not here.
3149 2009-04-30 Doug Evans <dje@google.com>
3151 * inferiors.c (started_inferior_callback): New function.
3152 (attached_inferior_callback): New function.
3153 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3154 * server.c (print_started_pid, print_attached_pid): New functions.
3155 (detach_or_kill_for_exit): New function.
3156 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3157 * server.h (have_started_inferiors_p): Declare.
3158 (have_attached_inferiors_p): Declare.
3160 * inferiors.c (remove_process): Fix memory leak, free process.
3161 * linux-low.c (linux_remove_process): New function.
3162 (linux_kill): Call it instead of remove_process.
3163 (linux_detach, linux_wait_1): Ditto.
3165 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3167 * configure.srv: Add x86 Windows CE target.
3169 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3171 * inferiors.c (get_thread_process): Make global.
3172 * server.h (get_thread_process): Add prototype.
3173 * thread-db.c (find_one_thread): Use get_thread_process
3174 instead of current_process.
3175 (thread_db_get_tls_address): Do not crash if called when
3176 thread layer is not yet initialized.
3178 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3180 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3181 * spu-low.c (current_tid): Rename to ...
3182 (current_ptid): ... this.
3183 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3184 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3185 ptid_get_lwp (current_ptid) instead of current_tid.
3186 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3187 instead of current_tid. Use find_process_pid to verify pid
3188 argument is valid. Pass proper argument to remove_process.
3189 (spu_thread_alive): Compare current_ptid instead of current_tid.
3190 (spu_resume): Likewise.
3192 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3194 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3197 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3199 Implement the multiprocess extensions, and add linux multiprocess
3202 * server.h (ULONGEST): Declare.
3203 (struct ptid, ptid_t): New.
3204 (minus_one_ptid, null_ptid): Declare.
3205 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3206 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3207 (struct inferior_list_entry): Change `id' type from unsigned from
3209 (struct sym_cache, struct breakpoint, struct
3210 process_info_private): Forward declare.
3211 (struct process_info): Declare.
3212 (current_process): Declare.
3213 (all_processes): Declare.
3214 (initialize_inferiors): Declare.
3215 (add_thread): Adjust to use ptid_t.
3216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3217 (add_process, remove_process, find_thread_pid): Declare.
3218 (find_inferior_id): Adjust to use ptid_t.
3219 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3220 (multi_process): Declare.
3221 (push_event): Adjust to use ptid_t.
3222 (read_ptid, write_ptid): Declare.
3223 (prepare_resume_reply): Adjust to use ptid_t.
3224 (clear_symbol_cache): Declare.
3225 * inferiors.c (all_processes): New.
3226 (null_ptid, minus_one_ptid): New.
3227 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3228 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3229 (add_thread): Change unsigned long to ptid. Remove gdb_id
3231 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3232 (gdb_id_to_thread): Rename to ...
3233 (find_thread_pid): ... this. Change unsigned long to ptid.
3234 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3235 (loaded_dll, pull_pid_from_list): Adjust.
3236 (add_process, remove_process, find_process_pid)
3237 (get_thread_process, current_process, initialize_inferiors): New.
3238 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3239 (struct target_waitstatus) <related_pid>: Ditto.
3240 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3242 (struct target_ops) <join>: Add `pid' argument.
3243 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3244 (struct target_ops) <wait>: Add `ptid' field. Change return type
3246 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3247 (mywait): Add `ptid' argument. Change return type to ptid_t.
3248 (target_pid_to_str): Declare.
3249 * target.c (set_desired_inferior): Adjust to use ptids.
3250 (mywait): Add new `ptid' argument. Adjust.
3251 (target_pid_to_str): New.
3252 * mem-break.h (free_all_breakpoints): Declare.
3253 * mem-break.c (breakpoints): Delelete.
3254 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3255 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3256 to use per-process breakpoint list.
3257 (free_all_breakpoints): New.
3258 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3259 (symbol_cache, all_symbols_looked_up): Delete.
3261 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3263 (prepare_resume_reply): Change ptid argument's type from unsigned
3264 long to ptid_t. Adjust. Implement W;process and X;process.
3265 (free_sym_cache, clear_symbol_cache): New.
3266 (look_up_one_symbol): Adjust to per-process symbol cache. *
3267 * server.c (cont_thread, general_thread, step_thread): Change type
3270 (multi_process): New.
3271 (last_ptid): Change type to ptid_t.
3272 (struct vstop_notif) <ptid>: Change type to ptid_t.
3273 (queue_stop_reply, push_event): Change `ptid' argument's type to
3275 (discard_queued_stop_replies): Add `pid' argument.
3276 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3277 changes. Don't reference the `attached' global.
3278 (attach_inferior): Adjust to mywait interface changes.
3279 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3280 features. Handle and report "multiprocess+". Handle
3282 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3284 (handle_v_kill): New.
3285 (handle_v_stopped): Adjust to use target_pid_to_str.
3286 (handle_v_requests): Allow multiple attaches and runs when
3287 multiprocess extensions are in effect. Handle "vKill".
3288 (myresume): Adjust to use ptids.
3289 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3290 (handle_status): Adjust to discard_queued_stop_replies interface
3292 (first_thread_of, kill_inferior_callback)
3293 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3294 (main): Call initialize_inferiors. Adjust to use ptids, killing
3295 and detaching from all inferiors. Handle multiprocess packet
3297 * linux-low.h: Include gdb_proc_service.h.
3298 (struct process_info_private): New.
3299 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3300 <lwpid_of>: Use ptid_get_lwp.
3301 (get_lwp_thread): Adjust.
3302 (struct lwp_info): Add `dead' member.
3303 (find_lwp_pid): Declare.
3304 * linux-low.c (thread_db_active): Delete.
3305 (new_inferior): Adjust comment.
3306 (inferior_pid): Delete.
3307 (linux_add_process): New.
3308 (handle_extended_wait): Adjust.
3309 (add_lwp): Change unsigned long to ptid.
3310 (linux_create_inferior): Add process to processes table. Adjust
3311 to use ptids. Don't set new_inferior here.
3312 (linux_attach_lwp): Rename to ...
3313 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3314 it. Adjust to use ptids.
3315 (linux_attach_lwp): New.
3316 (linux_attach): Add process to processes table. Don't set
3318 (struct counter): New.
3319 (second_thread_of_pid_p, last_thread_of_process_p): New.
3320 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3322 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3323 processes. Remove process from process table.
3324 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3325 to multiple processes.
3326 (any_thread_of): New.
3327 (linux_detach): Add `pid' argument, and handle it. Remove process
3328 from processes table.
3329 (linux_join): Add `pid' argument. Handle it.
3330 (linux_thread_alive): Change unsighed long argument to ptid_t.
3331 Consider dead lwps as not being alive.
3332 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3333 threads we're not interested in.
3334 (same_lwp, find_lwp_pid): New.
3335 (linux_wait_for_lwp): Change `pid' argument's type from int to
3337 (linux_wait_for_event): Rename to ...
3338 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3339 from int to ptid_t. Adjust.
3340 (linux_wait_for_event): New.
3341 (linux_wait_1): Add `ptid' argument. Change return type to
3342 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3343 that exit from the process table.
3344 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3346 (mark_lwp_dead): New.
3347 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3348 stopping all threads, mark its main lwp as dead.
3349 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3351 (fetch_register, usr_store_inferior_registers)
3352 (regsets_fetch_inferior_registers)
3353 (regsets_store_inferior_registers, linux_read_memory)
3354 (linux_write_memory): Inline `inferior_pid'.
3355 (linux_look_up_symbols): Adjust to use per-process
3357 (linux_request_interrupt): Adjust to use ptids.
3358 (linux_read_auxv): Inline `inferior_pid'.
3359 (initialize_low): Don't reference thread_db_active.
3360 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3361 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3362 (ps_getpid): Return the pid of the current inferior.
3363 * thread-db.c (proc_handle, thread_agent): Delete.
3364 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3366 (find_one_thread): Change argument type to ptid_t. Adjust to
3368 (maybe_attach_thread): Adjust to per-process data and ptids.
3369 (thread_db_find_new_threads): Ditto.
3370 (thread_db_init): Ditto.
3371 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3372 processes table. Adjust to use ptids.
3373 (spu_kill, spu_detach): Adjust interface. Remove process from
3375 (spu_join, spu_thread_alive): Adjust interface.
3376 (spu_wait): Adjust interface. Remove process from processes
3377 table. Adjust to use ptids.
3378 * win32-low.c (current_inferior_tid): Delete.
3379 (current_inferior_ptid): New.
3380 (debug_event_ptid): New.
3381 (thread_rec): Take a ptid. Adjust.
3382 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3383 (child_delete_thread): Ditto.
3384 (do_initial_child_stuff): Add `attached' argument. Add process to
3386 (child_fetch_inferior_registers, child_store_inferior_registers):
3388 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3389 (win32_attach): Pass 1 to do_initial_child_stuff.
3390 (win32_kill): Adjust interface. Remove process from processes
3392 (win32_detach): Ditto.
3393 (win32_join): Adjust interface.
3394 (win32_thread_alive): Take a ptid.
3395 (win32_resume): Adjust to use ptids.
3396 (get_child_debug_event): Ditto.
3397 (win32_wait): Adjust interface. Remove exiting process from
3400 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3402 Non-stop mode support.
3404 * server.h (non_stop): Declare.
3405 (gdb_client_data, handler_func): Declare.
3406 (delete_file_handler, add_file_handler, start_event_loop):
3408 (handle_serial_event, handle_target_event, push_event)
3409 (putpkt_notif): Declare.
3410 * target.h (enum resume_kind): New.
3411 (struct thread_resume): Replace `step' field by `kind' field.
3412 (TARGET_WNOHANG): Define.
3413 (struct target_ops) <wait>: Add `options' argument.
3414 <supports_non_stop, async, start_non_stop>: New fields.
3415 (target_supports_non_stop, target_async): New.
3416 (start_non_stop): Declare.
3417 (mywait): Add `options' argument.
3418 * target.c (mywait): Add `options' argument. Print child exit
3420 (start_non_stop): New.
3421 * server.c (non_stop, own_buf, mem_buf): New globals.
3422 (struct vstop_notif): New.
3423 (notif_queue): New global.
3424 (queue_stop_reply, push_event, discard_queued_stop_replies)
3425 (send_next_stop_reply): New.
3426 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3428 (attach_inferior): In non-stop mode, don't wait for the target
3430 (handle_general_set): Handle QNonStop.
3431 (handle_query): When handling qC, return the current general
3432 thread, instead of the first thread of the list.
3433 (handle_query): If the backend supports non-stop mode, include
3434 QNonStop+ in the qSupported query response.
3435 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3437 (handle_v_attach, handle_v_run): Handle non-stop mode.
3438 (handle_v_stopped): New.
3439 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3440 (myresume): Adjust to use resume_kind. Handle non-stop.
3441 (queue_stop_reply_callback): New.
3442 (handle_status): Handle non-stop mode.
3443 (main): Clear non_stop flag on reconnection. Use the event-loop.
3444 Refactor serial protocol handling from here ...
3445 (process_serial_event): ... to this new function. When GDB
3446 selects any thread, select one here. In non-stop mode, wait until
3447 GDB acks all pending events before exiting.
3448 (handle_serial_event, handle_target_event): New.
3449 * remote-utils.c (remote_open): Install remote_desc in the event
3451 (remote_close): Remove remote_desc from the event loop.
3452 (putpkt_binary): Rename to...
3453 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3454 (putpkt_binary): New as wrapper around putpkt_binary_1.
3455 (putpkt_notif): New.
3456 (prepare_resume_reply): In non-stop mode, don't change the
3458 * event-loop.c: New.
3459 * Makefile.in (OBJ): Add event-loop.o.
3460 (event-loop.o): New rule.
3462 * linux-low.h (pid_of): Moved here.
3464 (get_lwp_thread): Use lwpid_of.
3465 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3466 * linux-low.c (pid_of): Delete.
3467 (inferior_pid): Use lwpid_of.
3468 (linux_event_pipe): New.
3469 (target_is_async_p): New.
3471 (handle_extended_wait): Use lwpid_of.
3472 (add_lwp): Don't set lwpid field.
3473 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3474 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3475 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3476 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3477 first. Adjust to linux_wait_for_event interface changes. Use
3479 (linux_detach): Don't delete the main lwp here.
3480 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3481 (status_pending_p): Don't consider explicitly suspended lwps.
3482 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3483 pointer. Add OPTIONS argument. Change return type to int. Use
3484 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3485 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3486 pointer. Add status pointer argument. Return a pid instead of a
3487 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3488 changes. In non-stop mode, don't switch to a random thread.
3489 (linux_wait): Rename to...
3490 (linux_wait_1): ... this. Add target_options argument, and handle
3491 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3492 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3493 clean exit and signal exit code. Don't stop all threads in
3494 non-stop mode. In all-stop mode, only stop all threads when
3495 reporting a stop to GDB. Handle explicit thread stop requests.
3496 (async_file_flush, async_file_mark): New.
3498 (send_sigstop): Use lwpid_of.
3499 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3500 interface changes. In non-stop mode, don't switch to a random
3502 (linux_resume_one_lwp): Use lwpid_of.
3503 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3504 (linux_resume_one_thread): ... this. Handle resume_stop. In
3505 non-stop mode, don't look for pending flag in all threads.
3506 (resume_status_pending_p): Don't consider explicitly suspended
3508 (my_waitpid): Reimplement. Emulate __WALL.
3509 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3511 (sigchld_handler, linux_supports_non_stop, linux_async)
3512 (linux_start_non_stop): New.
3513 (linux_target_ops): Register linux_supports_non_stop, linux_async
3514 and linux_start_non_stop.
3515 (initialize_low): Install SIGCHLD handler.
3516 * thread-db.c (thread_db_create_event, find_one_thread)
3517 (thread_db_get_tls_address): Use lwpid_of.
3518 * win32-low.c (win32_detach): Adjust to use resume_kind.
3519 (win32_wait): Add `options' argument.
3520 * spu-low.c (spu_resume): Adjust to use resume_kind.
3521 (spu_wait): Add `options' argument.
3523 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3525 Decouple target code from remote protocol.
3527 * target.h (enum target_waitkind): New.
3528 (struct target_waitstatus): New.
3529 (struct target_ops) <wait>: Return an unsigned long. Take a
3530 target_waitstatus pointer instead of a char pointer.
3532 * target.c (mywait): Change prototype to return an unsigned long.
3533 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3534 * server.h (thread_from_wait, old_thread_from_wait): Delete
3536 (prepare_resume_reply): Change prototype to take a
3538 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3539 (last_status, last_ptid): New.
3540 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3541 pid instead of a signal.
3542 (attach_inferior): Remove "status" and "signal" parameters.
3544 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3546 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3547 (handle_v_requests, myresume): Remove "status" and "signal"
3549 (handle_status): New.
3550 (main): Delete local `status'. Adjust.
3551 * remote-utils.c: Include target.h.
3552 (prepare_resume_reply): Change prototype to take a
3553 target_waitstatus. Adjust.
3555 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3557 * spu-low.c (spu_wait): Adjust.
3558 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3560 (win32_wait): Adjust.
3562 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3564 * target.h (struct thread_resume): Delete leave_stopped member.
3565 (struct target_ops): Add a `n' argument to the `resume' callback.
3566 * server.c (start_inferior): Adjust.
3567 (handle_v_cont, myresume): Adjust.
3568 * linux-low.c (check_removed_breakpoint): Adjust to resume
3569 interface change, and to removed leave_stopped field.
3570 (resume_ptr): Delete.
3571 (struct thread_resume_array): New.
3572 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3573 resume interface change.
3574 (linux_continue_one_thread, linux_queue_one_thread)
3575 (resume_status_pending_p): Check if the resume field is NULL
3576 instead of checking the leave_stopped member.
3577 (linux_resume): Adjust to the target resume interface change.
3578 * spu-low.c (spu_resume): Adjust to the target resume interface
3580 * win32-low.c (win32_detach, win32_resume): Ditto.
3582 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3584 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3586 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3588 (linux_continue_one_thread): Only preserve the stepping flag if
3589 there's a pending breakpoint.
3591 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3593 * server.c (main): After the inferior having exited, call
3594 remote_close before exiting gdbserver.
3596 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3598 Fix size of FPSCR in Power 7 processors.
3599 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3600 (PPC_FEATURE_HAS_DFP): New #define.
3601 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3604 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3606 * server.c (handle_query) Whitespace and formatting.
3608 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3610 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3611 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3612 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3613 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3614 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3615 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3616 Makefile.in, configure.ac: Fix whitespace throughout.
3617 * configure: Regenerate.
3619 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3621 * inferiors.c (find_inferior): Make it safe for the callback
3622 function to delete the currently iterated inferior.
3624 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3626 * Makefile.in (linuw_low_h): Move higher.
3627 (thread-db.o): Depend on $(linux_low_h).
3629 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3631 Rename "process" to "lwp" throughout.
3633 * linux-low.c (all_processes): Rename to...
3634 (all_lwps): ... this.
3635 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3636 (add_process): Rename to ...
3637 (add_lwp): ... this. Adjust.
3638 (linux_create_inferior): Adjust.
3639 (linux_attach_lwp): Adjust.
3640 (linux_attach): Adjust.
3641 (linux_kill_one_process): Rename to ...
3642 (linux_kill_one_lwp): ... this. Adjust.
3643 (linux_kill): Adjust.
3644 (linux_detach_one_process): Rename to ...
3645 (linux_detach_one_lwp): ... this. Adjust.
3646 (linux_detach): Adjust.
3647 (check_removed_breakpoint): Adjust.
3648 (status_pending_p): Adjust.
3649 (linux_wait_for_process): Rename to ...
3650 (linux_wait_for_lwp): ... this. Adjust.
3651 (linux_wait_for_event): Adjust.
3652 (send_sigstop): Adjust.
3653 (wait_for_sigstop): Adjust.
3654 (stop_all_processes): Rename to ...
3655 (stop_all_lwps): ... this.
3656 (linux_resume_one_process): Rename to ...
3657 (linux_resume_one_lwp): ... this. Adjust.
3658 (linux_set_resume_request, linux_continue_one_thread)
3659 (linux_queue_one_thread, resume_status_pending_p)
3660 (usr_store_inferior_registers, regsets_store_inferior_registers)
3661 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3663 * linux-low.h (get_process): Rename to ...
3664 (get_lwp): ... this. Adjust.
3665 (get_thread_process): Rename to ...
3666 (get_thread_lwp): ... this. Adjust.
3667 (get_process_thread): Rename to ...
3668 (get_lwp_thread): ... this. Adjust.
3669 (struct process_info): Rename to ...
3670 (struct lwp_info): ... this.
3671 (all_processes): Rename to ...
3672 (all_lwps): ... this.
3673 * proc-service.c (ps_lgetregs): Adjust.
3674 * thread-db.c (thread_db_create_event, find_one_thread)
3675 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3677 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3679 * server.c (handle_query): Handle "qAttached".
3681 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3683 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3684 GPLv3, update license URL.
3686 2009-03-01 Doug Evans <dje@google.com>
3688 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3689 (server_h): Add gdb_signals.h.
3690 (signals.o): Update.
3691 * server.h (target_signal_from_host,target_signal_to_host_p)
3692 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3694 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3696 * remote-utils.c (getpkt): Also generate remote-debug
3697 information if noack_mode is set.
3699 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3701 * server.c (handle_query): Report qXfer:siginfo:read and
3702 qXfer:siginfo:write as supported and handle them.
3703 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3704 * linux-low.c (linux_xfer_siginfo): New.
3705 (linux_target_ops): Set it.
3707 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3709 * server.c (gdbserver_usage): Mention --remote-debug.
3710 (main): Accept '--remote-debug' switch.
3712 2009-01-18 Doug Evans <dje@google.com>
3714 * regcache.c (new_register_cache): No need to check result of xcalloc.
3715 * server.c (handle_search_memory): Back out calls to xmalloc,
3716 result is checked and error is returned to user upon failure.
3717 (handle_query): Ditto. Add more checks for result of malloc.
3718 (handle_v_cont): Check result of malloc, report error back to
3720 (handle_v_run): Ditto. Call freeargv.
3721 * server.h (freeargv): Declare.
3722 * utils.c (freeargv): New fn.
3724 2009-01-15 Doug Evans <dje@google.com>
3726 * gdbreplay.c (perror_with_name): Make arg const char *.
3727 * server.h (target_signal_to_name): Make return type const char *.
3728 * thread-db.c (thread_db_err_str): Make return type const char *.
3729 * utils.c (perror_with_name): Make arg const char *.
3731 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3733 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3734 when handling a EXIT_PROCESS_DEBUG_EVENT.
3736 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3738 * gdbreplay.c (gdbreplay_version): Update copyright year.
3739 * server.c (gdbserver_version): Likewise.
3741 2009-01-05 Doug Evans <dje@google.com>
3743 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3744 (handle_extended_wait): Improve comment.
3746 2008-12-13 Doug Evans <dje@google.com>
3748 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3749 * server.h (ATTR_MALLOC): New macro.
3750 (xmalloc,xcalloc,xstrdup): Declare.
3751 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3752 * inferiors.c: Ditto.
3753 * linux-low.c: Ditto.
3754 * mem-break.c: Ditto.
3755 * regcache.c: Ditto.
3756 * remote-utils.c: Ditto.
3759 * win32-low.c: Ditto.
3761 2008-12-12 Doug Evans <dje@google.com>
3763 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3764 in debugging printf.
3766 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3768 2008-12-09 Doug Evans <dje@google.com>
3770 * linux-low.h (struct process_info): Delete member tid, unused.
3771 * thread-db.c (find_one_thread): Update.
3772 (maybe_attach_thread): Update.
3774 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3776 * target.h (struct target_ops): Add qxfer_osdata member.
3777 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3779 (linux_qxfer_osdata): New functions.
3780 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3782 * server.c (handle_query): Handle "qXfer:osdata:read:".
3783 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3784 (buffer_xml_printf): New functions.
3785 * server.h (struct buffer): New.
3786 (buffer_grow_str, buffer_grow_str0): New macros.
3787 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3788 (buffer_xml_printf): Declare.
3790 2008-11-24 Doug Evans <dje@google.com>
3792 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3794 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3796 * server.c (handle_v_run): Always use the supplied argument list.
3798 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3800 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3801 (xtensa_regmap_table): Add entry for scompare1.
3803 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3805 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3806 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3807 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3808 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3809 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3810 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3811 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3812 XML target descriptions.
3813 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3814 when inferior is running on an ISA 2.05 or later processor. Add
3815 special case to return offset for full 64-bit slot of FPSCR when
3818 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3820 * Makefile.in (SFILES, clean): Added sparc64 files.
3821 (reg-sparc64.o, reg-sparc64.c): New.
3822 * configure.srv (sparc*-*-linux*): New configuration.
3823 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3824 syscall arguments for SPARC.
3825 (regsets_store_inferior_registers): Likewise.
3826 * linux-sparc-low.c: New file.
3828 2008-10-21 Doug Evans <dje@google.com>
3830 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3831 (READLINE_DIR,READLINE_DEP): Delete.
3832 (INTERNAL_CFLAGS): Update.
3833 (LINTFLAGS): Update.
3835 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3837 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3838 whole argv from the last run, not just argv[0].
3840 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3842 * regcache.c (new_register_cache): Return NULL if the register
3843 cache size isn't known yet.
3844 (free_register_cache): Avoid dereferencing a NULL regcache.
3846 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3848 * configure.srv: Merge MIPS and MIPS64.
3850 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3852 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3854 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3856 * Makefile.in: Add required vsx dependencies.
3858 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3859 Declare init_registers_powerpc_vsx32l.
3860 Declare init_registers_powerpc_vsx64l.
3861 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3862 (ppc_arch_setup): Check for VSX in hwcap.
3863 (ppc_fill_vsxregset): New function.
3864 (ppc_store_vsxregset): New function.
3865 Add new VSX entry in regset_info target_regsets.
3867 * configure.srv: Add new VSX dependencies.
3869 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3871 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3872 (remote_open): Set or clear transport_is_reliable.
3873 (putpkt_binary): Don't expect acks in noack mode.
3874 (getpkt): Don't send ack/nac in noack mode.
3875 * server.c (handle_general_set): Handle QStartNoAckMode.
3876 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3878 (main): Reset noack_mode on every connection.
3879 * server.h (noack_mode): Declare.
3881 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3883 * Makefile.in (GDBREPLAY_OBS): New variable.
3884 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3886 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3887 Daniel Jacobowitz <dan@codesourcery.com>
3889 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3890 (usr_store_inferior_registers): Likewise.
3891 (regsets_store_inferior_registers): Likewise.
3893 2008-07-31 Rolf Jansen <rj@surtec.com>
3894 Pedro Alves <pedro@codesourcery.com>
3896 * configure.ac: Check for memmem declaration.
3897 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3898 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3899 (disable_packet_qfThreadInfo): Unconditionally compile.
3900 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3901 * configure, config.in: Regenerate.
3903 2008-07-28 Doug Kwan <dougkwan@google.com>
3905 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3906 (linux_write_memory): Remove declaration of errno.
3908 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3910 * linux-low.c (handle_extended_wait): Do not use "status"
3911 variable uninitialized.
3913 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3915 * server.c (handle_v_attach): Inhibit reporting dll changes.
3917 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3919 * remote-utils.c (prepare_resume_reply): If requested, don't
3920 output "thread:TID" in the T stop reply.
3922 * server.c (disable_packet_vCont, disable_packet_Tthread)
3923 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3924 (handle_query): If requested, disable support for qC, qfThreadInfo
3926 (handle_v_requests): If requested, disable support for vCont.
3927 (gdbserver_show_disableable): New.
3928 (main): Handle --disable-packet and --disable-packet=LIST.
3930 * server.h (disable_packet_vCont, disable_packet_Tthread)
3931 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3933 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3935 * server.c (gdbserver_usage): Mention --version.
3937 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3939 * Makefile.in (gdbreplay.o): New rule.
3941 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3943 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3944 message, not gdbserver.
3946 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3947 Nathan Sidwell <nathan@codesourcery.com>
3948 Joseph Myers <joseph@codesourcery.com>
3950 * acinclude.m4: Include ../../config/acx.m4.
3951 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3952 * configure, config.in: Regenerate.
3953 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3954 * server.c (gdbserver_version): Print PKGVERSION.
3955 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3956 (main): Adjust gdbserver_usage calls.
3957 * gdbreplay.c (version, host_name): Add declarations.
3958 (gdbreplay_version, gdbreplay_usage): New.
3959 (main): Accept --version and --help options.
3961 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3963 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3964 (arm_breakpoint_at): Handle Thumb.
3965 (the_low_target): Add comment.
3967 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3969 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3971 2008-05-09 Doug Evans <dje@google.com>
3973 * server.h (decode_search_memory_packet): Declare.
3974 * remote-utils.c (decode_search_memory_packet): New fn.
3975 * server.c (handle_search_memory_1): New fn.
3976 (handle_search_memory): New fn.
3977 (handle_query): Process qSearch:memory packets.
3979 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3981 * regcache.c (registers_length): Remove.
3982 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3983 full register packet.
3984 * regcache.h (registers_length): Remove prototype.
3985 * server.h (PBUFSIZ): Define to 16384.
3987 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3989 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3990 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3991 powerpc-64l.o, and powerpc-altivec64l.o.
3992 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3993 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3994 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3995 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3996 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3999 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4000 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4001 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4002 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4003 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4004 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4005 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4006 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4007 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4008 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4011 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4012 (init_registers_powerpc_32l): ... this new prototype.
4013 (init_registers_powerpc_32): Remove, replace by ...
4014 (init_registers_powerpc_altivec32l): ... this new prototype.
4015 (init_registers_powerpc_e500): Remove, replace by ...
4016 (init_registers_powerpc_e500l): ... this new prototype.
4017 (init_registers_ppc64): Remove, replace by ...
4018 (init_registers_powerpc_64l): ... this new prototype.
4019 (init_registers_powerpc_64): Remove, replace by ...
4020 (init_registers_powerpc_altivec64l): ... this new prototype.
4021 (ppc_num_regs): Set to 73.
4022 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4023 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4024 (ppc_cannot_store_register): Handle orig_r3 and trap.
4025 (ppc_arch_setup): Update init_registers_... calls.
4026 (ppc_fill_gregset): Handle orig_r3 and trap.
4028 * inferiors.c (clear_inferiors): Reset current_inferior.
4030 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4032 * acinclude.m4: Add override.m4.
4033 * configure: Regenerate.
4035 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4037 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4038 initial call to init_register_ppc64.
4040 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4042 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4043 powerpc*-*-linux* case.
4044 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4046 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4048 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4049 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4051 * linux-ppc-low.c: Include <elf.h>.
4052 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4053 (ppc_hwcap): New global variable.
4054 (ppc_regmap): Remove __SPE__ #ifdef sections.
4055 (ppc_regmap_e500): New global variable.
4056 (ppc_cannot_store_register): Update __SPE__ special case.
4057 (ppc_get_hwcap): New function.
4058 (ppc_arch_setup): Use it to determine whether inferior supports
4059 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4060 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4061 Do not access registers if target does not support AltiVec.
4062 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4063 Do not access registers if target does not support SPE.
4064 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4066 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4068 * linux-low.c (disabled_regsets, num_regsets): New.
4069 (use_regsets_p): Delete.
4070 (linux_wait_for_process): Clear disabled_regsets.
4071 (regsets_fetch_inferior_registers): Check and set it.
4072 (regsets_store_inferior_registers): Likewise.
4073 (linux_fetch_registers, linux_store_registers): Do not use
4075 (initialize_low): Allocate disabled_regsets.
4077 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4079 * Makefile.in (LIBOBJS): New.
4081 (memmem.o): New rule.
4082 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4083 * configure: Regenerated.
4085 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4087 * server.c (handle_query): Never return "unsupported" for
4088 qXfer:features:read queries.
4090 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4092 * server.c (get_features_xml): Fix inverted condition.
4093 (handle_query): Always support qXfer:feature:read.
4095 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4097 * server.c (wrapper_argv): New.
4098 (start_inferior): Handle wrapper_argv. If set, expect an extra
4100 (gdbserver_usage): Document --wrapper.
4101 (main): Parse --wrapper.
4103 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4105 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4106 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4107 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4108 (ppc_set_pc): Likewise.
4109 (ppc_arch_setup): New function.
4110 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4111 of collect_register.
4112 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4114 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4116 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4117 instead of linux-ppc64-low.o.
4118 * linux-ppc64-low.c: Remove file.
4119 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4120 (linux-ppc64-low.o): Remove rule.
4122 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4123 (init_registers_powerpc_64): Likewise.
4124 (ppc_regmap): Conditionally define depending on __powerpc64__.
4125 (ppc_cannot_store_register): Do not special-case "fpscr" when
4126 compiled on __powerpc64__.
4127 (ppc_collect_ptrace_register): New function.
4128 (ppc_supply_ptrace_register): New function.
4129 (ppc_breakpoint): Change type to "unsigned int".
4130 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4131 (the_low_target): Conditionally provide initializers for the
4132 arch_setup member depending on __powerpc64__. Install
4133 collect_ptrace_register and supply_ptrace_register members.
4135 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4137 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4138 * server.c (gdbserver_xmltarget): Define.
4139 (get_features_xml): Use it to replace "target.xml" and arch_string.
4141 * configure.srv: Remove srv_xmltarget. Add XML files that were
4142 mentioned there to srv_xmlfiles instead. Remove conditional tests
4143 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4144 srv_xmlfiles and srv_regobj to include all possible choices.
4145 * configure.ac (srv_xmltarget): Remove.
4146 (srv_xmlfiles): Do not add "target.xml".
4147 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4148 checks for supplementary target information.
4149 * configure: Regenerate.
4150 * Makefile.in (XML_TARGET): Remove.
4151 (target.xml): Remove rule.
4152 (clean): Do not clean up target.xml.
4153 (.PRECIOUS): Do not mention target.xml.
4155 * target.h (struct target_ops): Remove arch_string member.
4156 * linux-low.c (linux_arch_string): Remove.
4157 (linux_target_ops): Remove arch_string initializer.
4158 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4159 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4160 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4161 * spu-low.c (spu_arch_string): Remove.
4162 (spu_target_ops): Remove arch_string initializer.
4163 * win32-low.c (win32_arch_string): Remove.
4164 (win32_target_ops): Remove arch_string initializer.
4165 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4166 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4167 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4169 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4171 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4172 by collect_ptrace_register and supply_ptrace_register hooks.
4173 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4174 instead of checking for the_low_target.left_pad_xfer.
4175 (usr_store_inferior_registers): Use collect_ptrace_register callback
4176 instead of checking for the_low_target.left_pad_xfer.
4178 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4179 (s390_supply_ptrace_register): Likewise.
4180 (s390_fill_gregset): Call s390_collect_ptrace_register.
4181 (the_low_target): Update.
4183 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4184 (ppc_supply_ptrace_register): Likewise.
4185 (the_low_target): Update.
4187 * linux-i386-low.c (the_low_target): Update.
4188 * linux-x86-64-low.c (the_low_target): Update.
4190 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4192 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4193 reg-s390.o and reg-s390x.o.
4195 * linux-low.c (new_inferior): New global variable.
4196 (linux_create_inferior, linux_attach): Set it.
4197 (linux_wait_for_process): Call the_low_target.arch_setup after the
4198 target has stopped for the first time.
4199 (initialize_low): Do not call the_low_target.arch_setup.
4201 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4202 (s390_set_pc): Likewise.
4203 (s390_arch_setup): New function.
4204 (the_low_target): Use s390_arch_setup as arch_setup routine.
4206 * regcache.c (realloc_register_cache): New function.
4207 (set_register_cache): Call it for each existing regcache.
4209 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4211 * server.h (init_registers): Remove prototype.
4213 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4214 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4215 instead of init_registers ().
4216 * linux-arm-low.c (init_registers_arm): Add prototype.
4217 (init_registers_arm_with_iwmmxt): Likewise.
4218 (the_low_target): Add initializer for arch_setup field.
4219 * linux-cris-low.c (init_registers_cris): Add prototype.
4220 (the_low_target): Add initializer for arch_setup field.
4221 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4222 (the_low_target): Add initializer for arch_setup field.
4223 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4224 (the_low_target): Add initializer for arch_setup field.
4225 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4226 (the_low_target): Add initializer for arch_setup field.
4227 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4228 (the_low_target): Add initializer for arch_setup field.
4229 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4230 (the_low_target): Add initializer for arch_setup field.
4231 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4232 (init_registers_mips64_linux): Likewise.
4233 (the_low_target): Add initializer for arch_setup field.
4234 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4235 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4236 (the_low_target): Add initializer for arch_setup field.
4237 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4238 (init_registers_powerpc_64): Likewise.
4239 (the_low_target): Add initializer for arch_setup field.
4240 * linux-s390-low.c (init_registers_s390): Add prototype.
4241 (init_registers_s390x): Likewise.
4242 (the_low_target): Add initializer for arch_setup field.
4243 * linux-sh-low.c (init_registers_sh): Add prototype.
4244 (the_low_target): Add initializer for arch_setup field.
4245 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4246 (the_low_target): Add initializer for arch_setup field.
4247 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4248 (the_low_target): Add initializer for arch_setup field.
4250 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4251 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4252 instead of init_registers ().
4253 * win32-arm-low.c (init_registers_arm): Add prototype.
4254 (the_low_target): Add initializer for arch_setup field.
4255 * win32-i386-low.c (init_registers_i386): Add prototype.
4256 (the_low_target): Add initializer for arch_setup field.
4258 * spu-low.c (init_registers_spu): Add prototype.
4259 (initialize_low): Call initialie_registers_spu () instead of
4260 initialize_registers ().
4262 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4264 * server.c (handle_v_requests): When handling the vRun and vAttach
4265 packets, if already debugging a process, don't kill it. Return an
4268 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4270 * server.c (handle_query): Correct length check.
4272 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4274 * win32-low.c (do_initial_child_stuff): Add process handle
4275 parameter. Set current_process_handle and current_process_id from the
4276 parameters. Clear globals.
4277 (win32_create_inferior): Don't set current_process_handle and
4278 current_process_id here. Instead pass them on the call to
4279 do_initial_child_stuff.
4280 (win32_attach): Likewise.
4281 (win32_clear_inferiors): New.
4282 (win32_kill): Don't close the current process handle or the
4283 current thread handle here. Instead call win32_clear_inferiors.
4284 (win32_detach): Don't open a new handle to the process. Call
4285 win32_clear_inferiors.
4286 (win32_join): Don't rely on current_process_handle; open a new
4287 handle using the process id.
4288 (win32_wait): Call win32_clear_inferiors when the inferior process
4291 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4293 * server.c (monitor_show_help): Add "exit".
4295 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4297 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4298 (clean): Add reg-xtensa.c.
4299 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4300 * configure.srv (xtensa*-*-linux*) New target.
4301 * linux-xtensa-low.c: New.
4302 * xtensa-xtregs.c: New.
4304 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4306 * hostio.c: Don't include errno.h.
4307 (errno_to_fileio_errno): Move to hostio-errno.
4308 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4309 error number outputting to the target->hostio_last_error callback.
4310 (hostio_packet_error): Use FILEIO_EINVAL directly.
4311 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4312 calls to hostio_error.
4313 * hostio-errno.c: New.
4314 * server.h (hostio_last_error_from_errno): Declare.
4315 * target.h (target_ops): Add hostio_last_error member.
4316 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4317 as hostio_last_error handler.
4318 * spu-low.c (spu_target_ops): Likewise.
4319 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4320 (wince_hostio_last_error): New functions.
4321 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4322 as hostio_last_error handler.
4323 (win32_target_ops) [!_WIN32_WCE]: Register
4324 hostio_last_error_from_errno as hostio_last_error handler.
4325 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4326 (hostio-errno.o): New rule.
4327 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4328 * configure.srv (srv_hostio_err_objs): New variable. Default to
4330 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4331 * configure: Regenerate.
4333 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4335 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4336 (linux_kill, linux_detach): Clean up the process list.
4337 * remote-utils.c (remote_open): Improve port number parsing.
4338 (putpkt_binary, input_interrupt): Only send interrupts if the target
4340 * server.c (extended_protocol): Make static.
4341 (attached): Define earlier.
4342 (exit_requested, response_needed, program_argv): New variables.
4343 (target_running): New.
4344 (start_inferior): Clear attached here.
4345 (attach_inferior): Set attached here.
4346 (require_running): Define.
4347 (handle_query): Use require_running and target_running. Implement
4349 (handle_v_attach, handle_v_run): New.
4350 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4351 (gdbserver_usage): Update.
4352 (main): Redo argument parsing. Handle --debug and --multi. Handle
4353 --attach along with other options or after the port. Save
4354 program_argv. Support no initial program. Resynchronize
4355 communication with GDB after an error. Handle "monitor exit".
4356 Use require_running and target_running. Always allow the extended
4357 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4358 restart in extended mode.
4359 * README: Refer to the GDB manual. Update --attach usage.
4361 2007-12-20 Andreas Schwab <schwab@suse.de>
4363 * linux-low.c (STACK_SIZE): Define.
4364 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4365 (linux_test_for_tracefork): Likewise.
4367 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4369 * linux-low.c (linux_wait_for_event): Update messages. Do not
4370 reinsert auto-delete breakpoints.
4371 * mem-break.c (struct breakpoint): Change return type of handler to
4373 (set_breakpoint_at): Update handler type.
4374 (reinsert_breakpoint_handler): Return 1 instead of calling
4376 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4378 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4379 * mem-break.h (set_breakpoint_at): Update handler type.
4380 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4381 * win32-low.c (auto_delete_breakpoint): New.
4382 (get_child_debug_event): Use it.
4384 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4386 * configure.ac: Check for pread and pwrite.
4387 * hostio.c (handle_pread): Fall back to lseek and read.
4388 (handle_pwrite): Fall back to lseek and write.
4389 * config.in, configure: Regenerated.
4391 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4393 * server.c (myresume): Add own_buf argument.
4394 (main): Update calls.
4396 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4398 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4399 * remote-utils.c (remote_open): Do not call disable_async_io.
4400 (block_async_io): Delete.
4401 (unblock_async_io): Make static.
4402 (initialize_async_io): New.
4403 * server.c (handle_v_cont): Handle async I/O here.
4404 (myresume): Likewise. Move other common resume tasks here...
4405 (main): ... from here. Call initialize_async_io. Disable async
4406 I/O before the main loop.
4407 * server.h (initialize_async_io): Declare.
4408 (block_async_io, unblock_async_io): Delete prototypes.
4409 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4411 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4413 * remote-utils.c (readchar): Allow binary data in received messages.
4415 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4417 * win32-low.c (attaching): New global.
4418 (win32_create_inferior): Clear the `attaching' global.
4419 (win32_attach): Set the `attaching' global.
4420 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4421 attaching. Only set a breakpoint at the entry point if not
4424 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4426 * server.c (main): Don't report dll events on the initial
4427 connection on attaches.
4429 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4431 * server.c (main): Relax numerical bases supported for the pid of
4432 the --attach command line argument.
4434 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4436 * win32-low.c (win32_attach): Call OpenProcess before
4437 DebugActiveProcess, not after. Add last error output to error
4440 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4442 * win32-low.c (win32_get_thread_context)
4443 (win32_set_thread_context): New functions.
4444 (thread_rec): Use win32_get_thread_context.
4445 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4446 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4449 2007-12-03 Leo Zayas
4450 Pedro Alves <pedro_alves@portugalmail.pt>
4452 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4454 (child_add_thread): Minor cleanup.
4455 (child_continue): Resume artificially suspended threads before
4456 calling ContinueDebugEvent.
4457 (suspend_one_thread): New.
4458 (fake_breakpoint_event): New.
4459 (get_child_debug_event): Change return type to int. Check here if
4460 gdb sent an interrupt request. If a soft interrupt was requested,
4461 fake a breakpoint event. Return 0 if there is no event to handle,
4463 (win32_wait): Don't check here if gdb sent an interrupt request.
4464 Ensure there is a valid event to handle.
4465 (win32_request_interrupt): Add soft interruption method as last
4468 2007-12-03 Leo Zayas
4469 Pedro Alves <pedro_alves@portugalmail.pt>
4471 * win32-low.h (win32_thread_info): Add descriptions to the
4472 structure members. Replace `suspend_count' counter by a
4474 * win32-low.c (thread_rec): Update condition of when to get the
4475 context from the inferior. Rely on ContextFlags being set if it
4476 has already been retrieved. Only suspend the inferior thread if
4477 we haven't already. Warn if that fails.
4478 (continue_one_thread): s/suspend_count/suspended/. Only call
4479 ResumeThread once. Warn if that fails.
4481 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4483 * win32-low.c (win32_wait): Don't read from the inferior when it
4486 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4488 * Makefile.in (win32_low_h): New variable.
4489 (win32-low.o): Add dependency on $(win32_low_h).
4490 (win32-arm-low.o, win32-i386-low.o): New rules.
4492 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4494 * hostio.c: Correct copyright year.
4496 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4498 * Makefile.in (OBS): Add hostio.o.
4499 (hostio.o): New rule.
4500 * server.h (handle_vFile): Declare.
4501 * hostio.c: New file.
4502 * server.c (handle_v_requests): Take packet_len and new_packet_len
4503 for binary packets. Call handle_vFile.
4504 (main): Update call to handle_v_requests.
4506 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4508 * linux-low.c: Include <sched.h>.
4510 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4512 * linux-low.c (linux_tracefork_grandchild): New.
4513 (linux_tracefork_child): Use clone.
4514 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4516 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4518 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4520 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4522 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4524 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4526 * inferiors.c (change_inferior_id): Delete.
4527 (add_pid_to_list, pull_pid_from_list): New.
4528 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4529 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4530 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4531 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4532 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4533 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4534 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4535 (using_threads): Always set to 1.
4536 (handle_extended_wait): New.
4537 (add_process): Do not set TID.
4538 (linux_create_inferior): Set must_set_ptrace_flags.
4539 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4540 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4541 (linux_thread_alive): Rename TID argument to LWPID.
4542 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4543 (linux_wait_for_event): Do not use TID or check using_threads. Update
4544 call to dead_thread_notify. Call handle_extended_wait.
4545 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4546 (send_sigstop): Delete sigstop_sent.
4547 (wait_for_sigstop): Avoid TID.
4548 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4549 (linux_test_for_tracefork): New.
4550 (linux_lookup_signals): Use thread_db_active and
4551 linux_supports_tracefork_flag.
4552 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4553 * linux-low.h (get_process_thread): Avoid TID.
4554 (struct process_ifo): Move thread_known and tid to the end. Remove
4556 (linux_attach_lwp, thread_db_init): Update prototypes.
4557 * server.h (change_inferior_id): Delete prototype.
4558 (add_pid_to_list, pull_pid_from_list): New prototypes.
4559 * thread-db.c (thread_db_use_events): New.
4560 (find_first_thread): Rename to...
4561 (find_one_thread): ...this. Update callers and messages. Do not
4562 call fatal. Check thread_db_use_events. Do not call
4563 change_inferior_id or new_thread_notify.
4564 (maybe_attach_thread): Update. Do not call new_thread_notify.
4565 (thread_db_init): Set thread_db_use_events. Check use_events.
4566 * utils.c (fatal, warning): Correct message prefix.
4568 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4570 * Makefile.in (clean): Remove new files.
4571 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4572 (powerpc-64.o, powerpc-64.c): New rules.
4573 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4574 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4576 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4578 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4579 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4580 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4581 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4582 (target_regsets): Add AltiVec and SPE register sets.
4583 * configure.ac: Check for AltiVec and SPE.
4584 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4585 (ppc_fill_vrregset, ppc_store_vrregset): New.
4586 (target_regsets): Add AltiVec register set.
4587 * configure: Regenerated.
4589 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4591 * linux-low.c (O_LARGEFILE): Define.
4592 (linux_read_memory): Use /proc/PID/mem.
4593 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4594 * configure, config.in: Regenerated.
4596 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4598 * linux-low.c (linux_wait_for_event): Do not pass signals while
4601 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4603 * win32-low.c (create_process): New.
4604 (win32_create_inferior): Use create_process instead of
4605 CreateProcess. If create_process failed retry appending an ".exe"
4606 suffix. Store the GetLastError result immediatelly after
4607 create_process calls and use it on the call to error.
4609 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4611 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4613 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4615 * configure.ac: Switch license to GPLv3.
4617 2007-08-01 Michael Snyder <msnyder@access-company.com>
4619 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4621 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4623 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4625 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4626 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4627 CloseToolhelp32Snapshot.
4628 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4629 CloseToolhelp32Snapshot.
4631 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4633 * server.c (main): Check for inferior exit before main loop.
4635 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4637 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4638 instead of on tmp_desc.
4640 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4641 Daniel Jacobowitz <dan@codesourcery.com>
4643 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4644 (add_thread): Minor cleanups.
4645 (clear_inferiors): Move lower in the file. Clear the DLL
4647 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4648 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4649 (xml_escape_text): New.
4650 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4652 (handle_v_cont): Report errors.
4653 (gdbserver_version): Update.
4654 (main): Correct size of own_buf. Do not report initial DLL events.
4655 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4656 (unloaded_dll, xml_escape_text): New.
4657 * win32-low.c (enum target_waitkind): Update comments.
4658 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4659 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4660 (win32_EnumProcessModules, win32_GetModuleInformation)
4661 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4662 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4663 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4664 (win32_Module32First, win32_Module32Next, load_toolhelp)
4665 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4666 (get_child_debug_event): Handle DLL events.
4667 (win32_wait): Likewise.
4669 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4671 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4672 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4674 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4676 * win32-low.c (handle_output_debug_string): Ignore event if not
4679 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4681 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4683 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4685 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4687 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4689 * inferiors.c (change_inferior_id): Add comment.
4690 * linux-low.c (check_removed_breakpoint): Add an early
4691 prototype. Improve debug output.
4692 (linux_attach): Doc update.
4693 (linux_detach_one_process, linux_detach): Clean up before releasing
4695 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4696 * linux-low.h (struct process_info): Doc improvement.
4697 * mem-break.c (delete_all_breakpoints): New.
4698 * mem-break.h (delete_all_breakpoints): New prototype.
4699 * thread-db.c (find_first_thread): New.
4700 (thread_db_create_event): Call it instead of
4701 thread_db_find_new_threads. Clean up unused variables.
4702 (maybe_attach_thread): Remove first thread handling.
4703 (thread_db_find_new_threads): Use find_first_thread.
4704 (thread_db_get_tls_address): Likewise.
4706 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4708 * thread-db.c (thread_db_find_new_threads): Add prototype.
4709 (thread_db_create_event): Check for the main thread before adding
4711 (maybe_attach_thread): Only enable event reporting if TID == 0.
4712 (thread_db_get_tls_address): Check for new threads.
4714 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4716 * linux-low.c (linux_create_inferior): Try execv before execvp.
4717 * spu-low.c (spu_create_inferior): Likewise.
4719 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4721 * linux-low.c (linux_create_inferior): Change execv to execvp.
4722 * spu-low.c (spu_create_inferior): Likewies.
4724 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4726 * Makefile.in (clean): Clean new files instead of deleted ones.
4727 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4728 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4730 * configure.srv: Specify XML files and new regformats for MIPS and
4732 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4733 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4734 an entry for the restart register.
4735 (mips_cannot_fetch_register, mips_cannot_store_register)
4736 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4737 register names to match the XML descriptions.
4738 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4739 restart register instead of $0.
4741 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4742 Markus Deuling <deuling@de.ibm.com>
4744 * remote-utils.c (decode_xfer_write): New function.
4745 * server.h (decode_xfer_write): Add prototype.
4746 * server.c (handle_query): Add PACKET_LEN argument. Support
4747 qXfer:spu:read and qXfer:spu:write packets.
4748 (main): Pass packet_len to handle_query.
4749 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4750 * target.h (target_ops): Add qxfer_spu.
4752 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4754 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4755 accessing non-seekable spufs files.
4757 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4759 * server.c (handle_query): Add reply for qC packet.
4761 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4762 Leo Zayas <lerele@champenstudios@com>
4764 * server.h (check_remote_input_interrupt_request): New function.
4765 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4766 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4767 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4768 (check_remote_input_interrupt_request): New function.
4769 * server.h (check_remote_input_interrupt_request): Declare.
4770 * win32-low.c (winapi_DebugBreakProcess,
4771 winapi_GenerateConsoleCtrlEvent): New typedefs.
4772 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4774 (win32_wait): Check for remote interrupt request
4775 with check_remote_input_interrupt_request.
4776 (win32_request_interrupt): New function.
4777 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4779 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4781 * win32-low.c (debug_registers_changed,
4782 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4783 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4784 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4785 (thread_rec): Get context using the low target.
4786 (child_add_thread): Call thread_added on the low target,
4787 which does the same thing.
4789 (do_initial_child_stuff): Remove debug registers references.
4790 Set context using the low target. Resume threads after
4791 setting the contexts.
4792 (child_continue): Remove dead variable. Remove debug
4793 registers references.
4794 (child_fetch_inferior_registers): Go through the low target.
4795 (do_child_store_inferior_registers): Remove.
4796 (child_store_inferior_registers): Go through the low target.
4797 (win32_resume): Remove debug registers references.
4798 Set context using the low target.
4799 (handle_exception): Change return type to void. Don't record
4800 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4801 first chance exception.
4802 (get_child_debug_event): Change return type to void. Remove
4803 goto loop. Always return after waiting for debug event.
4804 (win32_wait): Convert to switch statement. Handle spurious
4807 * win32-i386-low.c (debug_registers_changed,
4808 debug_registers_used): New.
4809 (initial_stuff): Rename to ...
4810 (i386_initial_stuff): ... this. Clear debug registers
4812 (store_debug_registers): Delete.
4813 (i386_get_thread_context): New.
4814 (load_debug_registers): Delete.
4815 (i386_set_thread_context): New.
4816 (i386_thread_added): New.
4817 (single_step): Rename to ...
4818 (i386_single_step): ... this.
4819 (do_fetch_inferior_registers): Rename to ...
4820 (i386_fetch_inferior_register): ... this.
4821 (i386_store_inferior_register): New.
4822 (the_low_target): Adapt to new interface.
4824 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4825 (arm_get_thread_context): New.
4826 (arm_set_thread_context): New.
4828 (do_fetch_inferior_registers): Rename to ...
4829 (arm_fetch_inferior_register): ... this.
4830 (arm_store_inferior_register): New.
4831 (arm_wince_breakpoint): Reimplement as unsigned long.
4832 (arm_wince_breakpoint_len): Define.
4833 (the_low_target): Adapt to new interface.
4835 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4836 load_debug_registers. Add get_thread_context, set_thread_context,
4837 thread_added and store_inferior_register. Rename
4838 fetch_inferior_registers to fetch_inferior_register.
4839 (regptr): Remove declaration.
4841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4843 * linux-low.c (linux_detach): Change return type to int. Return 0.
4844 * spu-low.c (spu_detach): Likewise.
4846 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4848 * target.h (target_ops): Change return type of detach to int.
4850 (join_inferior): New.
4851 * server.c (main): Don't skip detach support on mingw32.
4852 If the inferior doesn't support detaching return error.
4853 Call join_inferior instead of using waitpid.
4854 * linux-low.c (linux_join): New.
4855 (linux_target_op): Add linux_join.
4856 * spu-low.c (spu_join): New.
4857 (spu_target_ops): Add spu_join.
4858 * win32-low.c (win32_detach): Adapt to new interface.
4859 Reopen current_process_handle before detaching. Issue a child
4860 resume before detaching.
4862 (win32_target_op): Add win32_join.
4864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4866 * win32-low.c (win32-attach): Fix return value.
4867 * target.h (target_ops): Describe ATTACH return values.
4869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4871 * win32-low.c (GETPROCADDRESS): Define.
4872 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4873 (winapi_DebugSetProcessKillOnExit): Likewise.
4874 (win32_create_inferior): Force usage of ansi CreateProcessA.
4875 (win32_attach): Use GETPROCADDRESS.
4876 (win32_detach): Likewise.
4878 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4880 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4882 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4884 * win32-low.c: Commit leftover changes from 2007-03-29.
4886 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4888 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4889 fields short instead of int. Add explicit padding.
4890 (i387_cache_to_fsave): Remove unnecessary casts.
4891 (i387_fsave_to_cache): Doc fix.
4892 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4894 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4896 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4897 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4899 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4901 * configure.srv (arm*-*-mingw32ce*): Move near the other
4904 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4906 * configure.ac: Add errno checking.
4907 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4908 sys/file.h and malloc.h.
4909 (AC_CHECK_DECLS): Add perror.
4910 (srv_mingwce): Handle.
4911 * configure.srv (i[34567]86-*-cygwin*): Add
4912 win32-i386-low.o to srv_tgtobj.
4913 (i[34567]86-*-mingw*): Likewise.
4914 (arm*-*-mingw32ce*): Add case.
4915 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4916 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4917 [__MINGW32CE__] (strerror): New function.
4918 [__MINGW32CE__] (errno): Define to GetLastError.
4919 [__MINGW32CE__] (COUNTOF): New macro.
4920 (remote_open): Remove extra close call.
4921 * mem-break.c (delete_breakpoint_at): New function.
4922 * mem-break.h (delete_breakpoint_at): Declare.
4923 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4924 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4925 [USE_WIN32API] (read, write): Add char* casts.
4926 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4927 * server.h: Include wincecompat.h on Windows CE.
4928 [HAVE_ERRNO_H]: Check.
4929 (perror): Declare if not declared.
4930 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4931 (perror_with_name): Remove errno declaration.
4932 * wincecompat.h: New.
4933 * wincecompat.c: New.
4935 * win32-arm-low.c: New.
4936 * win32-i386-low.c: New.
4937 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4938 (OUTMSG2): Make it safe.
4940 (COUNTOF): New macro.
4941 (NUM_REGS): Get it from the low target.
4942 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4943 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4944 (thread_rec): Let low target handle debug registers.
4945 (child_add_thread): Likewise.
4946 (child_init_thread_list): Likewise.
4947 (continue_one_thread): Likewise.
4949 (do_child_fetch_inferior_registers): Move to ...
4950 * win32-i386-low.c: ... here, and rename to ...
4951 (do_fetch_inferior_registers): ... this.
4952 * win32-low.c (child_fetch_inferior_registers):
4953 Go through the low target.
4954 (do_child_store_inferior_registers): Use regptr.
4955 (strwinerror): New function.
4956 (win32_create_inferior): Handle Windows CE.
4957 Use strwinerror instead of strerror on Windows error
4958 codes. Add program to the error output.
4959 Don't close the main thread handle on Windows CE.
4960 (win32_attach): Use coredll.dll on Windows CE.
4961 (win32_kill): Close current process and current
4963 (win32_detach): Use coredll.dll on Windows CE.
4964 (win32_resume): Let low target handle debug registers, and
4966 (handle_exception): Add/Remove initial breakpoint. Avoid
4967 non-existant WSTOPSIG on Windows CE.
4968 (win32_read_inferior_memory): Cast to remove warning.
4969 (win32_arch_string): Go through the low target.
4970 (initialize_low): Call set_breakpoint_data with the low
4971 target's breakpoint.
4972 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4973 FOP_REGNUM, mappings): Move to ...
4974 * win32-i386-low.c: ... here.
4975 * win32-low.c (win32_thread_info): Move to ...
4976 * win32-low.h: ... here.
4977 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4978 win32-arm-low.c and wincecompat.c.
4979 (all:): Add $EXEEXT.
4980 (install-only:): Likewise.
4981 (gdbserver:): Likewise.
4982 (gdbreplay:): Likewise.
4983 * config.in: Regenerate.
4984 * configure: Regenerate.
4986 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4988 * win32-low.c: Rename typedef thread_info to
4989 win32_thread_info throughout.
4991 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4993 * win32-i386-low.c: Rename to ...
4994 * win32-low.c: ... this.
4995 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4996 * Makefile.in: Likewise.
4998 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5000 * remote-utils.c (monitor_output): Constify msg parameter.
5001 * server.h (monitor_output): Likewise.
5002 * win32-i386-low.c (handle_output_debug_string): New.
5003 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5004 handle_output_debug_string.
5005 (get_child_debug_event): Likewise.
5007 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5009 * server.c (main): Correct strtoul check.
5011 2007-03-27 Jon Ringle <jon@ringle.org>
5013 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5015 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5017 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5019 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5021 * terminal.h: Check HAVE_SGTTY_H.
5023 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5025 * remote-utils.c (remote_open): Print out the assigned port number.
5027 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5029 * remote-utils.c (monitor_output): New function.
5030 * server.c (debug_threads): Define here.
5031 (monitor_show_help): New function.
5032 (handle_query): Handle qRcmd.
5033 (main): Do not handle 'd' packet.
5034 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5035 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5038 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5040 * Makefile.in (EXEEXT): New.
5041 (clean): Use $(EXEEXT).
5043 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5045 * target.h (target_ops): Rename send_signal to request_interrupt,
5046 and remove enum target_signal parameter.
5047 * linux-low.c (linux_request_interrupt): Rename from
5048 linux_send_signal, and always send SIGINT.
5049 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5050 and always send SIGINT.
5051 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5053 (input_interrupt): Likewise.
5055 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5057 * server.c (get_features_xml): Check if target implemented
5059 * win32-i386-low.c (win32_arch_string): New.
5060 (win32_target_ops): Add win32_arch_string as arch_string member.
5062 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5064 * spu-low.c (spu_arch_string): New.
5065 (spu_target_ops): Add spu_arch_string.
5067 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5069 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5070 * configure.ac: Do not check for terminal.h.
5071 * configure, config.in: Regenerated.
5073 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5075 * Makefile.in (OBS): Add $(XML_BUILTIN).
5076 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5078 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5079 (arm-with-iwmmxt.c): New.
5080 * config.in, configure: Regenerate.
5081 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5082 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5083 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5084 (arm*-*-linux*): Add iWMMXt and regset support.
5085 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5086 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5087 (arm_store_wmmxregset, target_regsets): New.
5088 * server.c (get_features_xml): Take annex argument. Check builtin
5090 (handle_query): Handle multiple annexes.
5092 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5094 * remote-utils.c [USE_WIN32API] (read, write): Define.
5095 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5098 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5100 * linux-i386-low.c (the_low_target): Set arch_string.
5101 * linux-x86-64-low.c (the_low_target): Likewise.
5102 * linux-low.c (linux_arch_string): New.
5103 (linux_target_ops): Add it.
5104 * linux-low.h (struct linux_target_ops): Add arch_string.
5105 * server.c (write_qxfer_response): Use const void * for DATA.
5106 (get_features_xml): New.
5107 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5108 * target.h (struct target_ops): Add arch_string method.
5110 2007-01-03 Denis Pilat <denis.pilat@st.com>
5111 Daniel Jacobowitz <dan@codesourcery.com>
5113 * linux-low.c (linux_kill): Handle being called with no threads.
5114 * win32-i386-low.c (win32_kill): Likewise.
5115 (get_child_debug_event): Clear current_process_handle.
5117 2006-12-30 Denis PILAT <denis.pilat@st.com>
5118 Daniel Jacobowitz <dan@codesourcery.com>
5120 * remote-utils.c (remote_open): Check the type of specified
5121 serial port devices before opening them.
5122 * server.c (main): Kill the inferior if an error occurs during
5123 the first remote_open.
5125 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5127 * README: Update supported targets.
5129 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5131 * Makefile.in (clean): Remove reg-mips64.c.
5132 (reg-mips64.c, reg-mips64.o): New rules.
5133 * configure.srv: Handle mips64. Include regset support for mips.
5134 * linux-mips-low.c (union mips_register): New.
5135 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5136 (mips_breakpoint, mips_breakpoint_at): Use int.
5137 (mips_collect_register, mips_supply_register)
5138 (mips_collect_register_32bit, mips_supply_register_32bit)
5139 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5140 (mips_store_fpregset, target_regsets): New.
5141 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5143 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5145 * configure.srv: Add target "spu*-*-*".
5146 * Makefile.in (clean): Remove reg-spu.c.
5147 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5148 * spu-low.c: New file.
5150 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5152 * configure.ac: Correct td_thr_tls_get_addr test.
5153 * configure: Regenerated.
5155 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5157 * linux-low.c (linux_wait_for_event): Reformat. Use the
5159 * remote-utils.c (decode_address_to_semicolon): New.
5160 * server.c (pass_signals, handle_general_set): New.
5161 (handle_query): Mention QPassSignals for qSupported.
5162 (main): Call handle_general_set.
5163 * server.h (pass_signals, decode_address_to_semicolon): New.
5165 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5167 * server.c (handle_query): Correct error handling for read_auxv.
5169 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5171 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5172 and srv_linux_thread_db to yes.
5173 * linux-s390-low.c (s390_fill_gregset): New function.
5174 (target_regsets): Define data structure.
5176 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5178 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5179 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5180 * config.in, configure: Regenerated.
5181 * inferiors.c (gdb_id_to_thread): New function.
5182 (gdb_id_to_thread_id): Use it.
5183 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5184 * linux-low.h (struct process_info): Add th member.
5185 (thread_db_get_tls_address): New prototype.
5186 * remote-utils.c (decode_address): Make non-static.
5187 * server.c (handle_query): Handle qGetTLSAddr.
5188 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5189 * target.h (struct target_ops): Add get_tls_address.
5190 * thread-db.c (maybe_attach_thread): Save the thread handle.
5191 (thread_db_get_tls_address): New.
5193 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5195 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5196 (linux_resume_one_process): Take a siginfo_t *. Update all
5197 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5198 (struct pending_signals): Add a siginfo_t.
5199 (linux_wait_for_process): Always set last_status.
5200 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5201 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5202 * linux-low.h (struct process_info): Add last_status.
5204 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5206 * remote-utils.c (try_rle): New function.
5207 (putpkt_binary): Use it.
5209 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5211 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5212 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5213 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5214 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5215 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5218 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5220 * server.c (terminal_fd): New variable.
5221 (old_foreground_pgrp): Likewise.
5222 (restore_old_foreground_pgrp): New function.
5223 (start_inferior): Record the terminal file descriptor in terminal_fd
5224 and its original foreground group in old_foreground_pgrp. Register
5225 restore_old_foreground_pgrp with atexit().
5227 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5229 * server.c (handle_query): Correct qPart to qXfer.
5231 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5233 * configure.ac: Check for more headers which are missing on
5234 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5235 * configure.srv: Add Cygwin and mingw32.
5236 * remote-utils.c: Don't include headers unconditionally which
5237 are missing on mingw32. Include <winsock.h> for mingw32.
5238 (remote_open): Adjust for mingw32 support. Flush
5239 standard error after writing to it.
5240 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5241 (unblock_async_io, enable_async_io, disable_async_io)
5242 (readchar, getpkt): Update for Winsock support.
5243 (prepare_resume_reply): Expect a protocol signal number.
5244 * server.c: Disable <sys/wait.h> on mingw32.
5245 (start_inferior): Adjust for mingw32 support. Flush
5246 standard error after writing to it.
5247 (attach_inferior): Likewise. Use protocol signal
5249 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5251 * win32-i386-low.c: New file.
5252 * Makefile.in (XM_CLIBS): Set.
5253 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5254 (win32-i386-low.o): New dependency rule.
5255 * linux-low.c (linux_wait): Use target signal numbers.
5256 * target.h (struct target_ops): Doc fix.
5257 * server.h (target_signal_to_name): New prototype.
5258 * gdbreplay.c: Don't include headers unconditionally which
5259 are missing on mingw32. Include <winsock.h> for mingw32.
5260 (remote_close, remote_open): Adjust for Winsock support.
5261 * configure, config.in: Regenerated.
5263 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5265 * server.c (decode_xfer_read, write_qxfer_response): New.
5266 (handle_query): Take a packet length argument. Handle
5267 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5268 the qSupported response.
5269 (main): Update call to handle_query.
5271 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5273 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5274 (putpkt_binary): Renamed from putpkt and adjusted for binary
5276 (putpkt): New wrapper for putpkt_binary.
5277 (readchar): Don't mask off the high bit.
5278 (decode_X_packet): New function.
5279 * server.c (main): Call putpkt_binary if a handler sets the packet
5280 length. Save the length of the incoming packet. Handle 'X'.
5281 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5283 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5285 * server.c (handle_query): Handle qSupported.
5287 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5289 * remote-utils.c (all_symbols_looked_up): New variable.
5290 (look_up_one_symbol): Check it.
5291 * server.h (look_up_one_symbol): New declaration.
5292 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5294 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5296 * Makefile.in (linux-arm-low.o): Update dependencies.
5297 * linux-arm-low.c: Include "gdb_proc_service.h".
5298 (PTRACE_GET_THREAD_AREA): Define.
5299 (ps_get_thread_area): New function.
5301 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5303 * configure.srv (m68k*-*-uclinux*): New target.
5304 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5305 (linux_resume_one_process): Remove extraneous cast.
5306 (linux_read_offsets): New.
5307 (linux_target_op): Add linux_read_offsets on mmuless systems.
5308 * server.c (handle_query): Add qOffsets logic.
5309 * target.h (struct target_ops): Add read_offsets.
5311 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5313 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5314 (PTRACE_GET_THREAD_AREA): Define.
5315 (ps_get_thread_area): New function.
5316 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5317 (linux-x86-64-low.o): Update.
5319 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5321 * configure.ac: Remove checks for prfpregset_t.
5322 * gdb_proc_service.h: New file.
5323 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5324 new "gdb_proc_service.h".
5325 * proc-service.c: Likewise.
5326 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5327 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5328 * Makefile.in (gdb_proc_service_h): Updated.
5329 * configure, config.in: Regenerated.
5331 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5333 * remote-utils.c (prepare_resume_reply): Move declaration
5334 of gdb_id_from_wait to the top of the block.
5336 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5338 * linux-low.c (regsets_store_inferior_registers): Read the regset
5339 from the target before filling it.
5341 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5343 * server.c (attach_inferior): Return SIGTRAP for a successful
5346 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5348 * Makefile.in (OBS): Add version.o.
5349 (STAGESTUFF): Delete.
5350 (version.o): Add dependencies.
5351 (version.c): Replace rule.
5352 (clean): Remove version.c.
5353 * server.c (gdbserver_version): New.
5354 (gdbserver_usage): Use printf.
5355 (main): Handle --version and --help.
5356 * server.h (version, host_name): Add declarations.
5358 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5370 * linux-x86-64-low.c:
5373 * linux-ppc64-low.c:
5382 * linux-crisv32-low.c:
5394 * gdbserver.1: Add (C) after Copyright. Update the FSF
5397 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5399 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5400 (arm_breakpoint_at): Recognize both breakpoints.
5401 (the_low_target): Use the correct breakpoint instruction.
5403 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5405 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5406 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5407 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5408 (the_low_target): Update.
5410 2005-10-25 Andreas Schwab <schwab@suse.de>
5412 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5414 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5415 (ia64_num_regs): Reduce to 462.
5417 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5419 * acinclude.m4: Correct quoting.
5420 * aclocal.m4: Regenerated.
5422 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5423 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5424 (thread_db_init): Call thread_db_err_str.
5425 * configure.ac: Check for TD_VERSION.
5426 * config.in, configure: Regenerated.
5428 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5430 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5432 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5434 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5435 is not available. Define HAVE_PTRACE_GETREGS if it is.
5436 * config.in, configure: Regenerated.
5437 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5438 * linux-i386-low.c, linux-m68k-low.c: Update to use
5439 HAVE_PTRACE_GETREGS.
5440 * linux-low.c (regsets_fetch_inferior_registers)
5441 (regsets_store_inferior_registers): Only return 0 if we processed
5443 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5444 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5446 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5448 * inferiors.c (struct thread_info): Add gdb_id.
5449 (add_thread): Add gdb_id argument.
5450 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5451 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5452 calls to add_thread.
5453 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5454 * server.c (handle_query): Use thread_to_gdb_id.
5455 (handle_v_cont, main): Use gdb_id_to_thread_id.
5456 * server.h (add_thread): Update prototype.
5457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5460 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5462 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5463 left-padded registers.
5464 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5465 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5467 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5469 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5470 * configure: Regenerate.
5471 * config.in: Regenerate.
5472 * server.h (NEED_DECLARATION_STRERROR):
5473 Replace with !HAVE_DECL_STRERROR.
5475 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5477 * linux-low.c (linux_wait, linux_send_signal): Don't test
5478 an unsigned long variable for > 0 if it could be MAX_ULONG.
5479 * server.c (myresume): Likewise.
5480 * target.c (set_desired_inferior): Likewise.
5482 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5484 * configure.ac: Simplify and improve check for socklen_t.
5485 * configure, config.in: Regenerate.
5487 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5489 * acconfig.h: Remove.
5490 * configure.ac: Add a test for socklen_t. Use three-argument
5491 AC_DEFINE throughout.
5492 * config.in: Regenerated using autoheader 2.59.
5493 * configure: Regenerated.
5495 * gdbreplay.c (socklen_t): Provide a default.
5496 (remote_open): Use socklen_t.
5497 * remote-utils.c (socklen_t): Provide a default.
5498 (remote_open): Use socklen_t.
5499 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5502 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5504 * linux-low.c (linux_read_memory, linux_write_memory)
5505 (linux_read_auxv): Likewise.
5506 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5507 (check_mem_write): Likewise.
5508 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5510 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5511 (registers_from_string, register_data): Likewise.
5512 * server.c (handle_query, main): Likewise.
5513 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5514 (decode_M_packet): Likewise.
5515 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5516 * target.h (struct target_ops): Update read_memory, write_memory,
5518 (read_inferior_memory, write_inferior_memory): Update.
5519 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5521 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5522 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5523 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5524 linux-s390-low.c, linux-sh-low.c: Update for changes in
5525 read_inferior_memory and the_low_target->breakpoint.
5527 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5529 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5530 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5531 * configure.srv: Add powerpc64-*-linux*.
5532 * linux-ppc64-low.c: New file.
5534 2005-05-23 Orjan Friberg <orjanf@axis.com>
5536 * linux-cris-low.c: New file with support for CRIS.
5537 * linux-crisv32-low.c: Ditto for CRISv32.
5538 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5539 (clean): Add reg-cris.c and reg-crisv32.c.
5540 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5541 reg-crisv32.o, and reg-crisv32.c to make rules.
5542 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5545 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5547 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5548 of sizeof (PTRACE_XFER_TYPE).
5549 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5551 2005-05-12 Orjan Friberg <orjanf@axis.com>
5553 * target.h (struct target_ops): Add insert_watchpoint,
5554 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5555 pointers for hardware watchpoint support.
5556 * linux-low.h (struct linux_target_ops): Ditto.
5557 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5558 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5559 to linux_target_ops.
5560 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5562 * server.c (main): Recognize 'Z' and 'z' packets.
5564 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5566 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5567 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5568 (the_low_target): Add new members.
5570 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5572 * proc-service.c (ps_lgetregs): Search all_processes instead of
5575 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5577 * server.c (start_inferior): Change return type to int.
5578 (attach_inferior): Change sigptr to int *.
5579 (handle_v_cont, handle_v_requests): Change signal to int *.
5580 (main): Change signal to int.
5582 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5584 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5585 * configure.srv: Add m32r*-*-linux*.
5586 * linux-m32r-low.c: New file.
5588 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5590 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5592 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5594 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5595 Take unsigned long arguments for PIDs.
5596 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5597 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5598 (wait_for_sigstop, linux_resume_one_process)
5599 (regsets_fetch_inferior_registers, linux_send_signal)
5600 (linux_read_auxv): Likewise. Update the types of variables holding
5601 PIDs. Update format string specifiers.
5602 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5603 * remote-utils.c (prepare_resume_reply): Likewise.
5604 * server.c (cont_thread, general_thread, step_thread)
5605 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5607 (handle_query): Update format specifiers.
5608 (handle_v_cont, main): Use strtoul for thread IDs.
5609 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5610 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5611 (general_thread, step_thread, thread_from_wait)
5612 (old_thread_from_wait): Update.
5613 * target.h (struct thread_resume): Use unsigned long for THREAD.
5614 (struct target_ops): Use unsigned long for arguments to attach and
5617 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5619 * acinclude.m4: Include bfd/bfd.m4 directly.
5620 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5621 <agriffis@toolchain.org>.
5622 * aclocal.m4, configure: Regenerated.
5624 2005-01-07 Andrew Cagney <cagney@gnu.org>
5626 * configure.ac: Rename configure.in, require autoconf 2.59.
5627 * configure: Re-generate.
5629 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5631 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5633 * aclocal.m4: Regenerated.
5634 * configure: Regenerated.
5636 2004-11-21 Andreas Schwab <schwab@suse.de>
5638 * linux-m68k-low.c (m68k_num_gregs): Define.
5639 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5640 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5641 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5642 (m68k_breakpoint_at): New. Add to the_low_target.
5644 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5645 srv_linux_thread_db to yes.
5647 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5649 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5650 (ARCH_SET_FS): Likewise.
5651 (ARCH_GET_FS): Likewise.
5652 (ARCH_GET_GS): Likewise.
5654 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5656 * linux-i386-low.c (ps_get_thread_area): New.
5657 * linux-x86-64-low.c (ps_get_thread_area): New.
5658 * linux-low.c: Include <sys/syscall.h>.
5659 (linux_kill_one_process): Don't kill the first thread here.
5660 (linux_kill): Kill the first thread here.
5661 (kill_lwp): New function.
5662 (send_sigstop, linux_send_signal): Use it.
5663 * proc-service.c: Clean up #ifdefs.
5664 (fpregset_info): Delete.
5665 (ps_lgetregs): Update and enable implementation.
5666 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5668 * remote-utils.c (struct sym_cache, symbol_cache): New.
5669 (input_interrupt): Print a clearer message.
5670 (async_io_enabled): New variable.
5671 (enable_async_io, disable_async_io): Use it. Update comments.
5672 (look_up_one_symbol): Use the symbol cache.
5673 * thread-db.c (thread_db_look_up_symbols): New function.
5674 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5676 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5678 * configure.in: Test for -rdynamic.
5679 * configure: Regenerated.
5680 * Makefile (INTERNAL_LDFLAGS): New.
5681 (gdbserver, gdbreplay): Use it.
5683 2004-09-02 Andrew Cagney <cagney@gnu.org>
5685 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5687 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5689 * linux-low.c (linux_wait): Clear all_processes list also.
5691 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5693 * linux-low.c: Include <errno.h>. Remove extern declaration of
5696 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5698 * gdbreplay.c, server.h, utils.c: Update copyright years.
5700 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5702 * server.c (main): Print child status or termination signal from
5703 variable 'signal', not 'sig'.
5705 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5707 * linux-low.c (linux_read_memory): Change return type to
5708 int. Check for and return error from ptrace().
5709 * target.c (read_inferior_memory): Change return type to int. Pass
5710 back return status from the_target->read_memory().
5711 * target.h (struct target_ops): Adapt *read_memory() prototype.
5713 (read_inferior_memory): Adapt prototype.
5714 * server.c (main): Return an error packet if
5715 read_inferior_memory() returns an error.
5717 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5719 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5720 Unify with other clean targets.
5722 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5724 * server.c (handle_v_cont): Call set_desired_inferior.
5726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5728 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5730 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5732 * linux-low.c (linux_wait): Unblock async I/O.
5733 (linux_resume): Block and enable async I/O.
5734 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5735 * server.h (block_async_io, unblock_async_io): Add prototypes.
5737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5739 * remote-utils.c (remote_open): Print a status notice after
5741 * server.c (attach_inferior): Print a status notice after
5744 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5746 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5748 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5750 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5752 * server.c, target.h: Update copyright years.
5754 2004-02-25 Roland McGrath <roland@redhat.com>
5756 * target.h (struct target_ops): New member `read_auxv'.
5757 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5758 * linux-low.c (linux_read_auxv): New function.
5759 (linux_target_ops): Initialize `read_auxv' member to that.
5761 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5763 Committed by Jim Blandy <jimb@redhat.com>.
5765 * linux-s390-low.c (s390_num_regs): Update.
5766 (s390_regmap): Remove control registers. Use __s390x__ predefine
5767 instead of GPR_SIZE to distiguish s390 and s390x targets.
5769 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5771 * linux-low.c: Update copyright year.
5772 (check_removed_breakpoint): Clear pending_is_breakpoint.
5773 (linux_set_resume_request, linux_queue_one_thread)
5774 (resume_status_pending_p): New functions.
5775 (linux_continue_one_thread): Use process->resume.
5776 (linux_resume): Only resume threads if there are no pending events.
5777 * linux-low.h (struct process_info): Add resume request
5780 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5782 * regcache.c (new_register_cache): Clear the allocated register
5783 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5785 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5787 * linux-low.c (linux_resume): Take a struct thread_resume *
5789 (linux_wait): Update call.
5790 (resume_ptr): New static variable.
5791 (linux_continue_one_thread): Renamed from
5792 linux_continue_one_process. Use resume_ptr.
5793 (linux_resume): Use linux_continue_one_thread.
5794 * server.c (handle_v_cont, handle_v_requests): New functions.
5795 (myresume): New function.
5796 (main): Handle 'v' case.
5797 * target.h (struct thread_resume): New type.
5798 (struct target_ops): Change argument of "resume" to struct
5800 (myresume): Delete macro.
5802 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5804 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5805 (uninstall): Support DESTDIR.
5807 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5809 * configure.srv: Add xscale*linux copy of arm*linux entry.
5811 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5813 * linux-arm-low.c (arm_reinsert_addr): New function.
5814 (the_low_target): Add arm_reinsert_addr.
5816 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5818 * mem-break.c: Remove whitespace at end of file.
5820 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5822 * configure.in: Check whether we need to prototype strerror.
5823 * server.h: Optionally prototype strerror.
5824 * gdbreplay.c (perror_with_name): Use strerror.
5825 * linux-low.c (linux_attach_lwp): Use strerror.
5826 * utils.c (perror_with_name): Use strerror.
5827 * config.in, configure: Regenerated.
5829 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5831 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5832 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5834 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5836 * Makefile.in (SFILES): Update.
5837 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5838 low-sun3.c: Remove files.
5840 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5842 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5843 (linux_detach_one_process, linux_detach): New functions.
5844 (linux_target_ops): Add linux_detach.
5845 * server.c (main): Handle 'D' packet.
5846 * target.h (struct target_ops): Add "detach" member.
5847 (detach_inferior): Define.
5849 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5851 From Kelley Cook <kelleycook@wideopenwest.com>:
5852 * configure.srv: Accept i[34567]86 variants.
5854 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5856 * linux-low.c (linux_wait_for_event): Correct comment typos.
5857 (linux_resume_one_process): Call check_removed_breakpoint.
5858 (linux_send_signal): New function.
5859 (linux_target_ops): Add linux_send_signal.
5860 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5862 * target.h (struct target_ops): Add send_signal.
5864 2003-05-29 Jim Blandy <jimb@redhat.com>
5866 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5867 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5868 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5869 away part of the register's value.
5871 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5873 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5874 (linux_wait_for_event, linux_init_signals): Likewise.
5876 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5878 * configure.in: Check for stdlib.h.
5879 * configure: Regenerated.
5880 * config.in: Regenerated.
5882 2003-01-04 Andreas Schwab <schwab@suse.de>
5884 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5886 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5888 * Makefile.in: Remove obsolete code.
5890 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5892 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5893 defined(PT_FPR0_HI).
5895 2002-11-17 Stuart Hughes <seh@zee2.com>
5897 * linux-arm-low.c (arm_num_regs): Increase.
5898 (arm_regmap): Include status register.
5900 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5902 * linux-low.c (register_addr): Remove incorrect -1 check.
5904 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5906 * linux-low.c (linux_create_inferior): Call setpgid. Return
5908 (unstopped_p, linux_signal_pid): Remove.
5909 (linux_target_ops): Remove linux_signal_pid.
5910 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5911 global instead of target method.
5912 * target.h (struct target_ops): Remove signal_pid. Update comment
5913 for create_inferior.
5914 * server.c (signal_pid): New variable.
5915 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5916 gdbserver. Set the child to be the foreground process group.
5917 (attach_inferior): Set signal_pid.
5919 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5921 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5923 2002-08-20 Jim Blandy <jimb@redhat.com>
5925 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5928 2002-08-01 Andrew Cagney <cagney@redhat.com>
5930 * Makefile.in: Make chill references obsolete.
5932 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5934 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5935 * configure: Regenerate.
5936 * config.in: Regenerate.
5938 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5940 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5941 (perror_with_name, remote_close, remote_open, expect, play): Static.
5943 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5945 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5946 byte offsets instead of an array of indexes.
5947 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5949 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5951 * regcache.c: Add comment.
5953 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5955 * thread-db.c: New file.
5956 * proc-service.c: New file.
5957 * acinclude.m4: New file.
5958 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5959 proc-service.o, and thread-db.o.
5960 (linux-low.o): Add USE_THREAD_DB.
5961 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5962 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5963 * aclocal.m4: Regenerated.
5964 * config.in: Regenerated.
5965 * configure: Regenerated.
5966 * configure.in: Check for proc_service.h, sys/procfs.h,
5967 thread_db.h, and linux/elf.h headrs.
5968 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5969 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5970 Check for -lthread_db and thread support.
5971 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5972 PowerPC, and SuperH.
5973 * i387-fp.c: Constify arguments.
5974 * i387-fp.h: Likewise.
5975 * inferiors.c: (struct thread_info): Renamed from
5976 `struct inferior_info'. Remove PID member. Use generic inferior
5977 list header. All uses updated.
5978 (inferiors, signal_pid): Removed.
5979 (all_threads): New variable.
5980 (get_thread): Define.
5981 (add_inferior_to_list): New function.
5982 (for_each_inferior): New function.
5983 (change_inferior_id): New function.
5984 (add_inferior): Removed.
5985 (remove_inferior): New function.
5986 (add_thread): New function.
5987 (free_one_thread): New function.
5988 (remove_thread): New function.
5989 (clear_inferiors): Use for_each_inferior and free_one_thread.
5990 (find_inferior): New function.
5991 (find_inferior_id): New function.
5992 (inferior_target_data): Update argument type.
5993 (set_inferior_target_data): Likewise.
5994 (inferior_regcache_data): Likewise.
5995 (set_inferior_regcache_data): Likewise.
5996 * linux-low.c (linux_bp_reinsert): Remove.
5997 (all_processes, stopping_threads, using_thrads)
5998 (struct pending_signals, debug_threads, pid_of): New.
5999 (inferior_pid): Replace with macro.
6000 (struct inferior_linux_data): Remove.
6001 (get_stop_pc, add_process): New functions.
6002 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6003 Use add_process and add_thread.
6004 (linux_attach_lwp): New function, based on old linux_attach. Use
6005 add_process and add_thread. Set stop_expected for new threads.
6006 (linux_attach): New function.
6007 (linux_kill_one_process): New function.
6008 (linux_kill): Kill all LWPs.
6009 (linux_thread_alive): Use find_inferior_id.
6010 (check_removed_breakpoints, status_pending_p): New functions.
6011 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6012 Update. Use WNOHANG. Wait for cloned processes also. Update process
6013 struct for the found process.
6014 (linux_wait_for_event): New function.
6015 (linux_wait): Use it. Support LWPs.
6016 (send_sigstop, wait_for_sigstop, stop_all_processes)
6017 (linux_resume_one_process, linux_continue_one_process): New functions.
6018 (linux_resume): Support LWPs.
6019 (REGISTER_RAW_SIZE): Remove.
6020 (fetch_register): Use register_size instead. Call supply_register.
6021 (usr_store_inferior_registers): Likewise. Call collect_register.
6023 (regsets_fetch_inferior_registers): Improve error message.
6024 (regsets_store_inferior_registers): Add debugging.
6025 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6026 (unstopped_p, linux_signal_pid): New functions.
6027 (linux_target_ops): Add linux_signal_pid.
6028 (linux_init_signals): New function.
6029 (initialize_low): Call it. Initialize using_threads.
6030 * regcache.c (inferior_regcache_data): Add valid
6032 (get_regcache): Fetch registers lazily. Add fetch argument
6033 and update all callers.
6034 (regcache_invalidate_one, regcache_invalidate): New
6036 (new_register_cache): Renamed from create_register_cache.
6037 Return the new regcache.
6038 (free_register_cache): Change argument to a void *.
6039 (registers_to_string, registers_from_string): Call get_regcache
6040 with fetch flag set.
6041 (register_data): Make static. Pass fetch flag to get_regcache.
6042 (supply_register): Call get_regcache with fetch flag clear.
6043 (collect_register): Call get_regcache with fetch flag set.
6044 (collect_register_as_string): New function.
6045 * regcache.h: Update.
6046 * remote-utils.c (putpkt): Flush after debug output and use
6048 Handle input interrupts while waiting for an ACK.
6049 (input_interrupt): Use signal_pid method.
6050 (getpkt): Flush after debug output and use stderr.
6051 (outreg): Use collect_register_as_string.
6052 (new_thread_notify, dead_thread_notify): New functions.
6053 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6055 (look_up_one_symbol): Flush after debug output.
6056 * server.c (step_thread, server_waiting): New variables.
6057 (start_inferior): Don't use signal_pid. Update call to mywait.
6058 (attach_inferior): Update call to mywait.
6059 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6060 (main): Don't fetch/store registers explicitly. Use
6061 set_desired_inferior. Support proposed ``Hs'' packet. Update
6064 (struct inferior_list, struct_inferior_list_entry): New.
6065 * target.c (set_desired_inferior): New.
6066 (write_inferior_memory): Constify.
6067 (mywait): New function.
6069 (struct target_ops): New signal_pid method.
6070 (mywait): Removed macro, added prototype.
6072 * linux-low.h (regset_func): Removed.
6073 (regset_fill_func, regset_store_func): New.
6074 (enum regset_type): New.
6075 (struct regset_info): Add type field. Use new operation types.
6076 (struct linux_target_ops): stop_pc renamed to get_pc.
6077 Add decr_pc_after_break and breakpoint_at.
6078 (get_process, get_thread_proess, get_process_thread)
6079 (strut process_info, all_processes, linux_attach_lwp)
6080 (thread_db_init): New.
6082 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6083 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6084 (the_low_target): Add new members.
6085 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6086 (i386_store_fpxregset): Constify.
6087 (target_regsets): Add new kind identifier.
6088 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6089 (i386_set_pc): Add debugging.
6090 (i386_breakpoint_at): New function.
6091 (the_low_target): Add new members.
6092 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6093 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6094 (mips_breakpoint_at): New.
6095 (the_low_target): Add new members.
6096 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6097 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6098 (the_low_target): Add new members.
6099 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6100 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6101 (the_low_target): Add new members.
6102 * linux-x86-64-low.c (target_regsets): Add new kind
6105 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6107 From Martin Pool <mbp@samba.org>:
6108 * server.c (gdbserver_usage): New function.
6111 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6113 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6116 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6118 * Makefile.in: Remove obsolete code.
6120 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6122 * linux-low.c (regsets_fetch_inferior_registers),
6123 (regsets_store_inferior_registers): Removed cast to int from
6125 * regcache.h: Added declaration of struct inferior_info.
6127 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6129 * inferiors.c (struct inferior_info): Add regcache_data.
6130 (add_inferior): Call create_register_cache.
6131 (clear_inferiors): Call free_register_cache.
6132 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6133 * regcache.c (struct inferior_regcache_data): New.
6134 (registers): Remove.
6135 (get_regcache): New function.
6136 (create_register_cache, free_register_cache): New functions.
6137 (set_register_cache): Don't initialize the register cache here.
6138 (registers_to_string, registers_from_string, register_data): Call
6140 * regcache.h: Add prototypes.
6141 * server.h: Likewise.
6143 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6145 * mem-break.c: New file.
6146 * mem-break.h: New file.
6147 * Makefile.in: Add mem-break.o rule; update server.h
6149 * inferiors.c (struct inferior_info): Add target_data
6151 (clear_inferiors): Free target_data member if set.
6152 (inferior_target_data, set_inferior_target_data): New functions.
6153 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6154 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6155 * linux-low.c (linux_bp_reinsert): New variable.
6156 (struct inferior_linux_data): New.
6157 (linux_create_inferior): Use set_inferior_target_data.
6158 (linux_attach): Likewise. Call add_inferior.
6159 (linux_wait_for_one_inferior): New function.
6160 (linux_wait): Call it.
6161 (linux_write_memory): Add const.
6162 (initialize_low): Call set_breakpoint_data.
6163 * linux-low.h (struct linux_target_ops): Add breakpoint
6165 * server.c (attach_inferior): Remove extra add_inferior
6167 * server.h: Include mem-break.h. Update inferior.c
6169 * target.c (read_inferior_memory)
6170 (write_inferior_memory): New functions.
6171 * target.h (read_inferior_memory)
6172 (write_inferior_memory): Change macros to prototypes.
6173 (struct target_ops): Update comments. Add const to write_memory
6176 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6178 * linux-low.c (usr_store_inferior_registers): Support
6179 registers which are allowed to fail to store.
6180 * linux-low.h (linux_target_ops): Likewise.
6181 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6182 (ppc_cannot_store_register): FPSCR may not be storable.
6184 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6186 * server.h: Include <string.h> if HAVE_STRING_H.
6187 * ChangeLog: Correct paths in last ChangeLog entry.
6189 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6191 * linux-low.h: Remove obsolete prototypes.
6192 (struct linux_target_ops): New.
6193 (extern the_low_target): New.
6194 * linux-low.c (num_regs, regmap): Remove declarations.
6195 (register_addr): Use the_low_target explicitly.
6196 (fetch_register): Likewise.
6197 (usr_fetch_inferior_registers): Likewise.
6198 (usr_store_inferior_registers): Likewise.
6199 * linux-arm-low.c (num_regs): Remove.
6200 (arm_num_regs): Define.
6201 (arm_regmap): Renamed from regmap, made static.
6202 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6204 (arm_cannot_store_register): Renamed from cannot_store_register,
6206 (the_low_target): New.
6207 * linux-i386-low.c (num_regs): Remove.
6208 (i386_num_regs): Define.
6209 (i386_regmap): Renamed from regmap, made static.
6210 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6212 (i386_cannot_store_register): Renamed from cannot_store_register,
6214 (the_low_target): New.
6215 * linux-ia64-low.c (num_regs): Remove.
6216 (ia64_num_regs): Define.
6217 (ia64_regmap): Renamed from regmap, made static.
6218 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6220 (ia64_cannot_store_register): Renamed from cannot_store_register,
6222 (the_low_target): New.
6223 * linux-m68k-low.c (num_regs): Remove.
6224 (m68k_num_regs): Define.
6225 (m68k_regmap): Renamed from regmap, made static.
6226 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6228 (m68k_cannot_store_register): Renamed from cannot_store_register,
6230 (the_low_target): New.
6231 * linux-mips-low.c (num_regs): Remove.
6232 (mips_num_regs): Define.
6233 (mips_regmap): Renamed from regmap, made static.
6234 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6236 (mips_cannot_store_register): Renamed from cannot_store_register,
6238 (the_low_target): New.
6239 * linux-ppc-low.c (num_regs): Remove.
6240 (ppc_num_regs): Define.
6241 (ppc_regmap): Renamed from regmap, made static.
6242 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6244 (ppc_cannot_store_register): Renamed from cannot_store_register,
6246 (the_low_target): New.
6247 * linux-s390-low.c (num_regs): Remove.
6248 (s390_num_regs): Define.
6249 (s390_regmap): Renamed from regmap, made static.
6250 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6252 (s390_cannot_store_register): Renamed from cannot_store_register,
6254 (the_low_target): New.
6255 * linux-sh-low.c (num_regs): Remove.
6256 (sh_num_regs): Define.
6257 (sh_regmap): Renamed from regmap, made static.
6258 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6260 (sh_cannot_store_register): Renamed from cannot_store_register,
6262 (the_low_target): New.
6263 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6264 (the_low_target): New.
6266 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6268 * Makefile.in: Add stamp-h target.
6269 * configure.in: Create stamp-h.
6270 * configure: Regenerated.
6272 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6274 * inferiors.c: New file.
6275 * target.c: New file.
6276 * target.h: New file.
6277 * Makefile.in: Add target.o and inferiors.o. Update
6279 * linux-low.c (inferior_pid): New static variable,
6280 moved from server.c.
6281 (linux_create_inferior): Renamed from create_inferior.
6282 Call add_inferior. Return 0 on success instead of a PID.
6283 (linux_attach): Renamed from myattach.
6284 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6285 (linux_thread_alive): Renamed from mythread_alive.
6286 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6288 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6289 (regsets_store_inferior_registers): Correct error message.
6290 Add missing ``return 0''.
6291 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6292 (linux_store_registers): Renamed from store_inferior_registers.
6293 (linux_read_memory): Renamed from read_inferior_memory.
6294 (linux_write_memory): Renamed from write_inferior_memory.
6295 (linux_target_ops): New structure.
6296 (initialize_low): Call set_target_ops ().
6297 * remote-utils.c (unhexify): New function.
6298 (hexify): New function.
6299 (input_interrupt): Send signals to ``signal_pid''.
6300 * server.c (inferior_pid): Remove.
6301 (start_inferior): Update create_inferior call.
6302 (attach_inferior): Call add_inferior.
6303 (handle_query): New function.
6304 (main): Call handle_query for `q' packets.
6305 * server.h: Include "target.h". Remove obsolete prototypes.
6306 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6308 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6310 * Makefile.in: Add WARN_CFLAGS. Update configury
6312 * configure.in: Check for <string.h>
6313 * configure: Regenerate.
6314 * config.in: Regenerate.
6315 * gdbreplay.c: Include needed system headers.
6316 (remote_open): Remove strchr prototype.
6317 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6318 * regcache.c (supply_register): Change buf argument to const void *.
6319 (supply_register_by_name): Likewise.
6320 (collect_register): Change buf argument to void *.
6321 (collect_register_by_name): Likewise.
6322 * regcache.h: Add missing prototypes.
6323 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6324 * server.c (handle_query): New function.
6325 (attached): New static variable, moved out of main.
6326 (main): Quiet longjmp clobber warnings.
6327 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6328 * utils.c (error): Remove NORETURN.