1 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6 DR_CONTROL unless necessary. Extend comments.
7 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10 2011-12-13 Yao Qi <yao@codesourcery.com>
12 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
18 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
19 Print new debug message for such case.
21 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
23 Fix overlapping memcpy.
24 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
25 the read_inferior_memory transfer.
26 (delete_fast_tracepoint_jump): New variable buf. Use it for the
27 write_inferior_memory transfer.
28 (set_fast_tracepoint_jump): New variable buf. Use it for the
29 read_inferior_memory and write_inferior_memory transfers.
30 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
31 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
32 Use it for the write_inferior_memory transfer.
33 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
36 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
38 * linux-low.c (fetch_register, store_register): Make code
39 consistent, fix formatting.
41 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
43 * linux-low.c (usr_store_inferior_registers): Factor out code
44 to handle individual registers into...
45 (store_register): ... this new function.
47 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
49 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
50 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
51 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
52 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
53 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
54 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
55 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
56 (srv_xmlfiles): Add new XML files.
58 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
60 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
61 (init_registers_s390_linux32v1): Add prototype.
62 (init_registers_s390_linux32v2): Likewise.
63 (init_registers_s390_linux64v1): Likewise.
64 (init_registers_s390_linux64v2): Likewise.
65 (init_registers_s390x_linux64v1): Likewise.
66 (init_registers_s390x_linux64v2): Likewise.
67 (s390_num_regs): Increment to 52.
68 (s390_regmap): Add orig_r2 register.
69 (s390_num_regs_3264): Increment to 68.
70 (s390_regmap_3264): Add orig_r2 register.
71 (s390_collect_ptrace_register): Handle orig_r2 register.
72 (s390_supply_ptrace_register): Likewise.
73 (s390_fill_last_break): New function.
74 (s390_store_last_break): Likewise.
75 (s390_fill_system_call): New function.
76 (s390_store_system_call): Likewise.
77 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
79 (s390_check_regset): New function.
80 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
81 NT_S390_SYSTEM_CALL regsets and use appropriate description.
82 Update target_regsets for available register sets.
84 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
85 Jan Kratochvil <jan.kratochvil@redhat.com>
87 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
88 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
90 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
91 * linux-low.h (struct process_info_private): New member r_debug.
92 * server.c (handle_qxfer_libraries): Call
93 the_target->qxfer_libraries_svr4.
94 (handle_qxfer_libraries_svr4): New function.
95 (qxfer_packets): New entry "libraries-svr4".
96 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
97 * target.h (struct target_ops): New member qxfer_libraries_svr4.
98 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
99 PACKET_qXfer_libraries_svr4.
101 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
103 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
104 PSW address/mask between 8-byte and 16-byte formats.
105 (s390_supply_ptrace_register): Likewise.
106 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
107 basic addressing mode bit.
109 2011-11-24 Stan Shebs <stan@codesourcery.com>
111 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
113 2011-11-17 Stan Shebs <stan@codesourcery.com>
115 * tracepoint.c (struct tracepoint): New field traceframe_usage.
116 (tracing_start_time): New global.
117 (tracing_stop_time): New global.
118 (tracing_user_name): New global.
119 (tracing_notes): New global.
120 (tracing_stop_note): New global.
121 (cmd_qtstart): Set traceframe_usage, start_time.
122 (stop_tracing): Set stop_time.
123 (cmd_qtstatus): Report additional status.
124 (cmd_qtp): New function.
125 (handle_tracepoint_query): Call it.
126 (cmd_qtnotes): New function.
127 (handle_tracepoint_general_set): Call it.
128 (get_timestamp): Rename from tsv_get_timestamp.
130 2011-11-14 Stan Shebs <stan@codesourcery.com>
131 Kwok Cheung Yeung <kcy@codesourcery.com>
133 * linux-x86-low.c (small_jump_insn): New.
134 (i386_install_fast_tracepoint_jump_pad): Add arguments for
135 trampoline and error message, build a trampoline and issue a small
136 jump instruction to it.
137 (x86_install_fast_tracepoint_jump_pad): Add arguments for
138 trampoline and error message.
139 (x86_get_min_fast_tracepoint_insn_len): New.
140 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
141 * linux-low.h (struct linux_target_ops): Add arguments to
142 install_fast_tracepoint_jump_pad operation, add new operation.
143 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
145 (linux_get_min_fast_tracepoint_insn_len): New function.
146 (linux_target_op): Add new operation.
147 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
148 (gdb_trampoline_buffer_end): Ditto.
149 (gdb_trampoline_buffer_error): Ditto.
150 (struct ipa_sym_addresses): Add fields for new IPA variables.
151 (symbol_list): Add entries for new IPA variables.
152 (struct tracepoint): Add fields to hold the address range of the
153 trampoline used by the tracepoint.
154 (trampoline_buffer_head): New static variable.
155 (trampoline_buffer_tail): Ditto.
156 (claim_trampoline_space): New function.
157 (have_fast_tracepoint_trampoline_buffer): New function.
158 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
160 (install_fast_tracepoint): Ditto, also add error buffer argument.
161 (cmd_qtminftpilen): New function.
162 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
163 (fast_tracepoint_from_trampoline_address): New function.
164 (fast_tracepoint_collecting): Handle trampoline as part of jump
166 (set_trampoline_buffer_space): New function.
167 (initialize_tracepoint): Initialize new IPA variables.
168 * target.h (struct target_ops): Add arguments to
169 install_fast_tracepoint_jump_pad operation, add new
170 get_min_fast_tracepoint_insn_len operation.
171 (target_get_min_fast_tracepoint_insn_len): New.
172 (install_fast_tracepoint_jump_pad): Add arguments.
173 * server.h (IPA_BUFSIZ): Define.
174 * linux-i386-ipa.c: Include extra header files.
175 (initialize_fast_tracepoint_trampoline_buffer): New function.
176 (initialize_low_tracepoint): Call it.
177 * server.h (set_trampoline_buffer_space): Declare.
178 (claim_trampoline_space): Ditto.
179 (have_fast_tracepoint_trampoline_buffer): Ditto.
181 2011-11-14 Yao Qi <yao@codesourcery.com>
183 * server.c (handle_query): Handle InstallInTrace for qSupported.
184 * tracepoint.c (add_tracepoint): Sort list.
185 (install_tracepoint, download_tracepoint): New.
186 (cmd_qtdp): Call them to install and download tracepoints.
187 (sort_tracepoints): Removed.
188 (cmd_qtstart): Update.
190 2011-11-14 Yao Qi <yao@codesourcery.com>
192 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
193 * mem-break.h: Declare.
194 * tracepoint.c (cmd_qtstart): Move some code to ...
195 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
197 (download_tracepoints): Move some code to ...
198 (download_tracepoint_1): ... here. New.
200 2011-11-08 Yao Qi <yao@codesourcery.com>
202 * remote-utils.c (relocate_instruction): A comment fix.
204 2011-11-07 Joel Brobecker <brobecker@adacore.com>
206 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
207 (i386_dr_low_get_control, i386_dr_low_get_status): Use
208 dr_status_mirror and dr_control_mirror from debug_reg_state.
209 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
210 (i386_initial_stuff): Remove use of deleted globals.
211 (i386_get_thread_context, i386_set_thread_context,
212 i386_thread_added): Use dr_status_mirror and dr_control_mirror
213 from debug_reg_state.
215 2011-11-05 Yao Qi <yao@codesourcery.com>
217 * tracepoint.c (gdb_collect): Loop over tracepoints of same
220 2011-11-02 Stan Shebs <stan@codesourcery.com>
222 * tracepoint.c (agent_mem_read_string): New function.
223 (eval_agent_expr): Call it for tracenz.
224 * server.c (handle_query): Report support for tracenz.
226 2011-11-02 Yao Qi <yao@codesourcery.com>
228 * tracepoint.c (cmd_qtstart): Remove unused local variables.
230 2011-11-02 Yao Qi <yao@codesourcery.com>
232 * target.h: Fix a typo in comment.
234 2011-10-31 Pedro Alves <pedro@codesourcery.com>
236 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
237 clobber the breakpoints' shadows with fast tracepoint jumps.
238 * mem-break.h (check_mem_write): Add `myaddr' parameter.
239 * target.c (write_inferior_memory): Also pass MYADDR down to
242 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
244 * configure.ac: Check support for personality routine.
245 * configure: Regenerate.
246 * config.in: Likewise.
247 * linux-low.c: Include <sys/personality.h>.
248 Define ADDR_NO_RANDOMIZE if necessary.
249 (linux_create_inferior): Disable address space randomization when
250 forking inferior, if requested.
251 (linux_supports_disable_randomization): New function.
252 (linux_target_ops): Install it.
253 * server.h (disable_randomization): Declare.
254 * server.c (disable_randomization): New global variable.
255 (handle_general_set): Handle QDisableRandomization.
256 (handle_query): Likewise for qSupported.
257 (main): Support --disable-randomization and --no-disable-randomization
258 command line arguments.
259 * target.h (struct target_ops): Add supports_disable_randomization.
260 (target_supports_disable_randomization): New macro.
262 2011-09-29 Mike Frysinger <vapier@gentoo.org>
264 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
266 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
267 [!PT_GETDSBT] (target_loadmap): New definition.
268 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
269 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
270 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
271 and PT_GETDSBT to LINUX_LOADMAP.
272 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
273 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
275 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
277 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
278 (arm_linux_hwbp_cap): New static variable.
279 (arm_linux_get_hwbp_cap): Replace by ...
280 (arm_linux_init_hwbp_cap): ... this new function.
281 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
282 (arm_linux_get_hw_watchpoint_count): Likewise.
283 (arm_linux_get_hw_watchpoint_max_length): Likewise.
284 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
285 (arm_prepare_to_resume): Use perror_with_name instead of error.
287 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
289 * linux-arm-low.c: Include <signal.h>.
290 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
291 (struct arm_linux_hwbp_cap): New data type.
292 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
293 (struct arm_linux_hw_breakpoint): New data type.
294 (MAX_BPTS, MAX_WPTS): Define.
295 (struct arch_process_info, struct arch_lwp_info): New data types.
296 (arm_linux_get_hwbp_cap): New function.
297 (arm_linux_get_hw_breakpoint_count): Likewise.
298 (arm_linux_get_hw_watchpoint_count): Likewise.
299 (arm_linux_get_hw_watchpoint_max_length): Likewise.
300 (arm_hwbp_control_initialize): Likewise.
301 (arm_hwbp_control_is_enabled): Likewise.
302 (arm_hwbp_control_is_initialized): Likewise.
303 (arm_hwbp_control_disable): Likewise.
304 (arm_linux_hw_breakpoint_equal): Likewise.
305 (arm_linux_hw_point_initialize): Likewise.
306 (struct update_registers_data): New data structure.
307 (update_registers_callback: New function.
308 (arm_insert_point): Likewise.
309 (arm_remove_point): Likewise.
310 (arm_stopped_by_watchpoint): Likewise.
311 (arm_stopped_data_address): Likewise.
312 (arm_new_process): Likewise.
313 (arm_new_thread): Likewise.
314 (arm_prepare_to_resume): Likewise.
315 (the_low_target): Register arm_insert_point, arm_remove_point,
316 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
317 arm_new_thread, and arm_prepare_to_resume.
319 2011-09-15 Stan Shebs <stan@codesourcery.com>
321 * server.h (struct emit_ops): Add compare-goto fields.
322 * tracepoint.c (gdb_agent_op_sizes): New table.
323 (emit_eq_goto): New function.
324 (emit_ne_goto): New function.
325 (emit_lt_goto): New function.
326 (emit_le_goto): New function.
327 (emit_gt_goto): New function.
328 (emit_ge_goto): New function.
329 (is_goto_target): New function.
330 (compile_bytecodes): Recognize special cases of compare-goto
331 combinations and call specialized emitters for them.
332 * linux-x86-low.c (amd64_emit_eq_goto): New function.
333 (amd64_emit_ne_goto): New function.
334 (amd64_emit_lt_goto): New function.
335 (amd64_emit_le_goto): New function.
336 (amd64_emit_gt_goto): New function.
337 (amd64_emit_ge_goto): New function.
338 (amd64_emit_ops): Add the new functions.
339 (i386_emit_eq_goto): New function.
340 (i386_emit_ne_goto): New function.
341 (i386_emit_lt_goto): New function.
342 (i386_emit_le_goto): New function.
343 (i386_emit_gt_goto): New function.
344 (i386_emit_ge_goto): New function.
345 (i386_emit_ops): Add the new functions.
347 2011-09-08 Stan Shebs <stan@codesourcery.com>
349 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
350 (i386_emit_epilogue): Restore %ebx.
352 2011-08-31 Jie Zhang <jzhang918@gmail.com>
354 * server.c (step_thread): Remove definition.
355 (process_serial_event): Don't handle Hs.
356 * server.h (step_thread): Remove declaration.
357 * target.c (set_desired_inferior): Remove use of step_thread.
359 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
361 * linux-low.c: Include linux-procfs.h.
362 (linux_attach_lwp_1): Update comments.
363 (linux_attach): Scan for existing threads when attaching to a
364 process that is the tgid.
365 * Makefile.in: Update dependencies.
367 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
369 * configure.srv: Add linux-procfs.o dependencies.
371 2011-08-14 Yao Qi <yao@codesourcery.com>
373 * target.h (struct target_ops): Fix indent.
374 * win32-low.c (win32_target_ops): Fix comment.
376 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
377 Yao Qi <yao@codesourcery.com>
379 * Makefile.in (clean): Remove tic6x-*.c files.
380 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
381 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
382 (tic6x-c64xp-linux.c): Likewise.
383 * configure.srv: Add support for tic6x-*-uclinux.
384 * linux-tic6x-low.c: New.
385 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
387 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
388 Yao Qi <yao@codesourcery.com>
390 * target.h (struct target_ops): Add read_loadmap.
391 * linux-low.c (struct target_loadseg): New type.
392 (struct target_loadmap): New type.
393 (linux_read_loadmap): New function.
394 (linux_target_ops): Add linux_read_loadmap.
395 * server.c (handle_query): Support qXfer:fdpic:read packet.
396 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
398 2011-08-05 Eli Zaretskii <eliz@gnu.org>
400 * win32-low.c: Include <stdint.h>.
402 2011-07-22 Pedro Alves <pedro@codesourcery.com>
404 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
405 to the inferior here.
406 (i386_remove_aligned_watchpoint): Ditto.
407 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
408 fit part of the watchpoint in the debug registers.
409 (i386_update_inferior_debug_regs): New.
410 (i386_low_insert_watchpoint): Work on a local mirror of the debug
411 registers, and only update the inferior on success.
412 (i386_low_remove_watchpoint): Ditto.
414 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
416 * linux-low.c (compare_ints, unique, list_threads, show_process,
417 linux_core_of_thread): Delete.
418 (linux_target_ops): Change linux_core_of_thread to
419 linux_common_core_of_thread.
420 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
421 * utils.c (malloc_failure): Change type of argument.
422 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
423 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
424 common/linux-osdata.c, common/ptid.c and common/buffer.c.
425 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
426 (IPA_OBJS): Add common-utils-ipa.o.
427 (ptid_h, linux_osdata_h): New macros.
428 (server_h): Add common/common-utils.h, common/xml-utils.h,
429 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
431 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
432 ptid.o, buffer.o): New rules.
433 (linux-low.o): Add common/linux-osdata.h as a dependency.
434 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
435 * configure.ac: Add AC_HEADER_DIRENT check.
436 * config.in: Regenerate.
437 * configure: Regenerate.
438 * remote-utils.c (xml_escape_text): Delete.
439 (buffer_grow, buffer_free, buffer_init, buffer_finish,
440 buffer_xml_printf): Move to common/buffer.c.
441 * server.c (main): Remove call to initialize_inferiors.
442 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
443 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
444 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
445 internal_error, gdb_assert, gdb_assert_fail): Delete.
446 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
447 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
449 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
450 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
451 initialize_inferiors): Delete.
453 2011-07-20 Pedro Alves <pedro@codesourcery.com>
455 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
458 2011-05-31 Pedro Alves <pedro@codesourcery.com>
460 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
462 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
464 2011-05-26 Yao Qi <yao@codesourcery.com>
466 * Makefile.in (thread-db.o): Track dependence to
467 common/gdb_thread_db.h.
468 * thread-db.c: include gdb_thread_db.h from right place.
470 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
472 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
473 __FILE__ and __LINE__ to internal_error.
475 2011-05-13 Doug Evans <dje@google.com>
477 * thread-db.c (try_thread_db_load_from_sdir): New function.
478 (try_thread_db_load_from_dir): New function.
479 (thread_db_load_search): Handle $sdir, ignore $pdir.
480 Remove trying of system directories if search of
481 libthread-db-search-path fails, that is now done via $sdir.
483 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
485 * server.c (handle_query): Add EnableDisableTracepoints to the list
486 of supported features.
487 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
489 (cmd_qtenable_disable): New.
490 (cmd_qtstart): Install tracepoints even if disabled.
491 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
492 receiving a QTEnable or QTDisable packet.
493 (gdb_collect): Skip data collection if fast tracepoint is disabled.
494 (ust_marker_to_static_tracepoint): Do not ignore disabled static
496 (gdb_probe): Skip data collection if static tracepoint is disabled.
498 2011-05-10 Doug Evans <dje@google.com>
500 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
502 2011-05-04 Doug Evans <dje@google.com>
504 * linux-low.c (linux_join): Skip process lookup.
505 * spu-low.c (spu_join): Ditto.
506 * server.c (join_inferiors_callback): Delete.
507 (process_serial_event): For 'D' packet (detach) call join_inferior
510 2011-05-04 Joseph Myers <joseph@codesourcery.com>
512 * README: Don't mention xscale*-*-linux*.
513 * configure.srv (xscale*-*-linux*): Don't handle target.
515 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
517 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
519 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
520 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
521 (i386_emit_void_call_2): Likewise.
523 2011-04-26 Yao Qi <yao@codesourcery.com>
525 * linux-low.c: Move common macros to linux-ptrace.h.
526 Include linux-ptrace.h.
527 * Makefile.in (linux_ptrace_h): New.
528 (linux-low.o): Depends on linux-ptrace.h.
530 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
532 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
533 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
534 (remote_prepare): New function with most of the TCP code from ...
535 (remote_open): ... here. Detect PORT here unconditionally. Move also
536 setting transport_is_reliable.
537 * server.c (run_once): New variable.
538 (gdbserver_usage): Document it.
539 (main): Set run_once for `--once'. Call remote_prepare. Exit after
540 the first run if RUN_ONCE.
541 * server.h (run_once, remote_prepare): New declarations.
543 2011-04-19 Tom Tromey <tromey@redhat.com>
545 * win32-low.c (handle_load_dll): Remove duplicate "the".
547 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
549 Remove support for old Cygwin 1.5 versions.
550 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
551 function to avoid warning.
552 (win32_add_one_solib): Use cygwin_conv_path function to avoid
555 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
557 * gdbserver/server.h (Macro _): Define it if not available.
559 2011-03-14 Michael Snyder <msnyder@vmware.com>
561 * hostio.c (handle_close): Remove unnecessary null test.
563 2011-03-10 Joel Brobecker <brobecker@adacore.com>
565 * Makefile.in (maintainer-clean realclean distclean): Remove
566 "make ... subdir_do" command.
568 2011-03-10 Michael Snyder <msnyder@vmware.com>
570 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
572 * server.c (handle_v_run): Free alloced buffer on early return.
574 2011-03-09 Yao Qi <yao@codesourcery.com>
577 2011-03-04 Yao Qi <yao@codesourcery.com>
579 * Makefile.in: Remove GNU make feature --directory.
581 2011-03-05 Yao Qi <yao@codesourcery.com>
583 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
584 (subdir_do): New make target. Copied from gdb/Makefile.
585 (maintainer-clean, realclean, distclean, clean): Call corresponding
586 make targets in common/Makefile.
588 2011-02-11 Yao Qi <yao@codesourcery.com>
590 * configure.ac: Call AC_PROG_RANLIB.
591 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
592 * configure: Regenerate.
594 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
596 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
598 2011-03-06 Yao Qi <yao@codesourcery.com>
600 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
602 2011-03-05 Yao Qi <yao@codesourcery.com>
604 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
605 (subdir_do): New make target. Copied from gdb/Makefile.
606 (maintainer-clean, realclean, distclean, clean): Call corresponding
607 make targets in common/Makefile.
609 2011-03-04 Yao Qi <yao@codesourcery.com>
611 * Makefile.in: Remove GNU make feature --directory.
613 2011-03-04 Michael Snyder <msnyder@vmware.com>
615 * server.c (queue_stop_reply): Call xmalloc not malloc.
617 2011-03-02 Michael Snyder <msnyder@vmware.com>
619 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
621 2011-02-28 Michael Snyder <msnyder@vmware.com>
623 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
624 (cmd_qtframe): Ditto.
625 (cmd_qtbuffer): Ditto.
626 (cmd_bigqtbuffer): Ditto.
628 * utils.c (decimal2str): Initialize 'width' to nine, then
631 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
633 * hostio.c (require_data): Free *data, not data.
635 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
637 * hostio.c (require_data): Use free, not xfree.
639 2011-02-27 Michael Snyder <msnyder@vmware.com>
641 * server.c (handle_query): Discard unused value.
643 * hostio.c (require_data): Free malloc memory before returning
646 2011-02-26 Michael Snyder <msnyder@vmware.com>
648 * linux-low.c (list_threads): Call closedir for dirent.
650 2011-02-27 Michael Snyder <msnyder@vmware.com>
652 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
653 a case statement falls through.
655 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
657 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
660 2011-02-26 Michael Snyder <msnyder@vmware.com>
662 * utils.c (decimal2str): Eliminate dead code and dead param.
663 (pulongest): Drop dead param from call to decimal2str.
666 2011-02-24 Joel Brobecker <brobecker@adacore.com>
668 Revert the following patch (not approved yet):
669 2011-02-21 Hui Zhu <teawater@gmail.com>
670 * tracepoint.c (tp_printf): New function.
671 (eval_agent_expr): Handle gdb_agent_op_printf.
673 2011-02-21 Hui Zhu <teawater@gmail.com>
675 * tracepoint.c (tp_printf): New function.
676 (eval_agent_expr): Handle gdb_agent_op_printf.
678 2011-02-18 Tom Tromey <tromey@redhat.com>
680 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
681 (tracepoint.o): Likewise.
682 * tracepoint.c (enum gdb_agent_op): Use ax.def.
683 (gdb_agent_op_names): Likewise.
685 2011-02-18 Tom Tromey <tromey@redhat.com>
687 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
688 gdb_agent_op_rot>: New constants.
689 (gdb_agent_op_names): Add pick and roll.
690 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
693 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
695 * aclocal.m4: Regenerated with aclocal-1.11.1.
697 2011-02-14 Pedro Alves <pedro@codesourcery.com>
699 * server.c (handle_qxfer_traceframe_info): New.
700 (qxfer_packets): Register "traceframe-info".
701 (handle_query): Report support for qXfer:traceframe-info:read+.
702 * tracepoint.c (match_blocktype): New.
703 (traceframe_find_block_type): Rename to ...
704 (traceframe_walk_blocks): ... this. Add callback filter argument,
706 (traceframe_find_block_type): New, reimplemented on top of
707 traceframe_walk_blocks.
708 (build_traceframe_info_xml): New.
709 (traceframe_read_info): New.
710 * server.h (traceframe_read_info): Declare.
712 2011-02-11 Yao Qi <yao@codesourcery.com>
714 * configure.ac: Call AC_PROG_RANLIB.
715 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
716 * configure: Regenerate.
718 2011-02-07 Pedro Alves <pedro@codesourcery.com>
720 * server.c (gdb_read_memory): Change return semantics to allow
722 (handle_search_memory_1): Adjust.
723 (process_serial_event) <'m' packet>: Handle partial transfers.
724 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
726 2011-01-28 Pedro Alves <pedro@codesourcery.com>
728 * regcache.c (init_register_cache): Initialize
729 regcache->register_status.
730 (free_register_cache): Release regcache->register_status.
731 (regcache_cpy): Copy register_status.
732 (registers_to_string): Print 'x's for unavailable registers.
733 (supply_register): Mark the register's status valid or
734 unavailable, depending on whether a buffer was passed in or not.
735 (supply_register_zeroed): New.
736 (supply_regblock): Mark the registers' status valid or
737 unavailable, depending on whether a buffer was passed in or not.
738 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
739 (struct regcache): New `register_status' field.
740 (supply_register_zeroed): Declare.
741 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
742 supply_register_zeroed, rather than passing a NULL buffer to
744 * tracepoint.c (fetch_traceframe_registers): Update comment.
746 2011-01-28 Pedro Alves <pedro@codesourcery.com>
748 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
751 2011-01-25 Pedro Alves <pedro@codesourcery.com>
753 * server.h (decode_xfer_write): Change prototype.
754 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
755 and don't extract the annex here.
756 * server.c (decode_xfer_read): Remove `annex' parameter,
757 and don't extract the annex here.
760 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
761 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
762 (handle_qxfer_statictrace): New functions, abstracted out from
763 handle_query, and made to use the struct qxfer interface.
764 (handle_threads_qxfer_proper): Rename to ...
765 (handle_qxfer_threads_proper): ... this.
766 (handle_threads_qxfer): Rename to ...
767 (handle_qxfer_threads): ... this. Adjust.
768 (qxfer_packets): New array.
769 (handle_qxfer): New function.
770 (handle_query): Use handle_qxfer.
772 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
774 * gdbreplay.c: Shorten lines of >= 80 columns.
775 * linux-low.c: Ditto.
776 * linux-ppc-low.c: Ditto.
777 * linux-s390-low.c: Ditto.
778 * linux-sparc-low.c: Ditto.
779 * linux-x86-low.c: Ditto.
780 * linux-xtensa-low.c: Ditto.
781 * mem-break.c: Ditto.
784 * remote-utils.c: Ditto.
787 * thread-db.c: Ditto.
788 * tracepoint.c: Ditto.
790 * win32-low.h: Ditto.
792 2011-01-05 Joel Brobecker <brobecker@adacore.com>
794 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
797 2011-01-01 Joel Brobecker <brobecker@adacore.com>
799 * server.c (gdbserver_version): Update copyright year in version
801 * gdbreplay.c (gdbreplay_version): Ditto.
803 2010-12-29 Jie Zhang <jie.zhang@analog.com>
805 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
806 * linux-bfin-low.c: New file.
807 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
808 PT_DATA_ADDR for BFIN targets.
809 * Makefile.in (SFILES): Add linux-bfin-low.c.
810 (clean): Remove reg-bfin.c.
811 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
812 * README: Mention supported Blackfin targets.
814 2010-12-23 Mike Frysinger <vapier@gentoo.org>
816 * .gitignore: New file.
818 2010-11-16 Mike Frysinger <vapier@gentoo.org>
820 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
822 2010-10-22 Jie Zhang <jie@codesourcery.com>
824 * Makefile.in: Add FLAGS_TO_PASS variable.
825 (install): Remove dependency of install-only and recursively
826 invoke make for install-only.
828 2010-10-04 Doug Evans <dje@google.com>
830 * Makefile.in (uninstall): Use $(DESTDIR).
832 2010-09-24 Pedro Alves <pedro@codesourcery.com>
836 * linux-x86-low.c (compat_siginfo_from_siginfo)
837 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
838 si_code is < 0. Check for si_code == SI_TIMER before checking for
841 2010-09-13 Joel Brobecker <brobecker@adacore.com>
843 * lynx-i386-low.c: New file.
844 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
846 2010-09-13 Joel Brobecker <brobecker@adacore.com>
848 * lynx-low.c (ptrace_request_to_str): Remove handling for
849 request values that have been removed in LynxOS 5.x.
851 2010-09-13 Joel Brobecker <brobecker@adacore.com>
853 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
856 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
858 * configure.ac: Add --enable-inprocess-agent option.
859 * configure: Rebuilt.
861 2010-09-06 Yao Qi <yao@codesourcery.com>
863 * linux-low.c (linux_kill): Remove unused variable.
864 (linux_stabilize_threads): Likewise.
865 * server.c (start_inferior): Likewise.
866 (queue_stop_reply_callback): Likewise.
867 * tracepoint.c (do_action_at_tracepoint): Likewise.
869 2010-09-06 Yao Qi <yao@codesourcery.com>
871 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
874 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
876 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
878 2010-09-06 Pedro Alves <pedro@codesourcery.com>
880 * Makefile.in (install-only): Replace $IPA_DEPFILES with
883 2010-09-01 Joel Brobecker <brobecker@adacore.com>
885 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
886 gdbserver/lynx-ppc-low.c: New files.
887 * Makefile.in (lynx_low_h): New variable.
888 (lynx-low.o, lynx-ppc-low.o): New rules.
889 * configure.ac: On LynxOS, link with -lnetinet.
890 * configure.srv: Add handling of powerpc-*-lynxos* targets.
891 * configure: regenerate.
893 2010-09-01 Joel Brobecker <brobecker@adacore.com>
895 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
896 * configure.ac: Add check for vasprintf and vsnprintf.
897 * configure, config.in: Regenerate.
898 * server.h (vasprintf, vsnprintf): Add conditional declarations.
900 2010-09-01 Joel Brobecker <brobecker@adacore.com>
902 * gdbreplay.c: Move include of alloca.h up, next to include of
904 * server.h: Add include of malloc.h.
905 * mem-break.c: Remove include of malloc.h.
906 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
908 2010-09-01 Joel Brobecker <brobecker@adacore.com>
910 * Makefile.in (memmem.o): Build with -Wno-error.
912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
914 * utils.c (xsnprintf): Make non-static.
915 * server.h: Add xsnprintf declaration.
916 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
917 replace calls to snprintf by calls to xsnprintf throughout.
919 2010-09-01 Joel Brobecker <brobecker@adacore.com>
921 * configure.ac: Add configure check for alloca.
922 * configure, config.in: Regenerate.
923 * server.h: Include alloca.h if it exists.
924 * gdbreplay.c: Include alloca.h if it exists.
926 2010-08-28 Pedro Alves <pedro@codesourcery.com>
928 * linux-low.c (__SIGRTMIN): Define if not already defined.
929 (linux_create_inferior): Check for __ANDROID__ rather than
931 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
932 are already deferred.
933 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
934 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
935 stopped and already has a pending signal to report.
936 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
937 a pending signal to report or is moving out of a jump pad.
938 (linux_init_signals): Check for __ANDROID__ rather than
941 2010-08-28 Pedro Alves <pedro@codesourcery.com>
943 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
944 debug_threads check. Avoid a linear search when not doing debug
947 2010-08-27 Pedro Alves <pedro@codesourcery.com>
949 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
950 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
951 (struct file_handler) <fd>: Change type to gdb_fildes_t.
952 (process_event): Change local fd's type to gdb_fildes_t.
953 (create_file_handler): Adjust prototype.
954 (delete_file_handler): Adjust prototype.
955 (handle_file_event): Adjust prototype. Use pfildes.
956 (create_file_event): Adjsut prototype.
957 * remote-utils.c (remote_desc, listen_desc): Change type to
959 * server.h: New gdb_fildes_t typedef.
960 [USE_WIN32API]: Include winsock2.h.
961 (delete_file_handler, add_file_handler): Adjust prototypes.
963 * utils.c (pfildes): New.
965 2010-08-27 Pedro Alves <pedro@codesourcery.com>
967 * configure.ac (build_warnings): Add -Wno-char-subscripts.
968 * configure: Regenerate.
970 2010-08-27 Pedro Alves <pedro@codesourcery.com>
972 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
973 (linux_done_accessing_memory): ... this.
974 (linux_target_ops): Adjust.
975 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
976 * nto-low.c (nto_target_ops): Adjust comment.
977 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
978 * spu-low.c (spu_target_ops): Adjust comment.
979 * target.h (target_ops): Rename unprepare_to_access_memory field
980 to done_accessing_memory.
981 (unprepare_to_access_memory): Rename to ...
982 (done_accessing_memory): ... this.
984 2010-08-26 Pedro Alves <pedro@codesourcery.com>
986 * linux-low.c (linux_prepare_to_access_memory): New.
987 (linux_unprepare_to_access_memory): New.
988 (linux_target_ops): Install them.
989 * server.c (read_memory): Rename to ...
990 (gdb_read_memory): ... this. Use
991 prepare_to_access_memory/prepare_to_access_memory.
992 (write_memory): Rename to ...
993 (gdb_write_memory): ... this. Use
994 prepare_to_access_memory/prepare_to_access_memory.
995 (handle_search_memory_1): Adjust.
996 (process_serial_event): Adjust.
997 * target.h (struct target_ops): New fields
998 prepare_to_access_memory and unprepare_to_access_memory.
999 (prepare_to_access_memory, unprepare_to_access_memory): New.
1000 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1001 prepare_to_access_memory/prepare_to_access_memory.
1002 * nto-low.c (nto_target_ops): Adjust.
1003 * spu-low.c (spu_target_ops): Adjust.
1004 * win32-low.c (win32_target_ops): Adjust.
1006 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1008 * Makefile.in (WARN_CFLAGS): Get it from configure.
1009 (WERROR_CFLAGS): New.
1010 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1011 * configure.ac: Introduce --enable-werror, which adds -Werror to
1012 the compiler command line. Enabled by default. Disable with
1013 --disable-werror. Add -Wdeclaration-after-statement
1014 Wpointer-arith and -Wformat-nonliteral to warning flags.
1015 * configure: Regenerate.
1017 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1019 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1021 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1023 * gdbreplay.c (remote_error): New.
1025 (expect): Use gdbchar. Check for error reading from GDB.
1026 Clarify sync error output.
1027 (play): Check for errors writing to GDB.
1028 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1029 * remote-utils.c (getpkt): Check for errors writing to the remote
1032 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1034 * linux-low.c (linux_wait_1): Move non-debugging code out of
1035 `debug_threads' control.
1037 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1039 * linux-low.c (linux_wait_1): Don't set last_status here.
1040 * server.c (push_event, queue_stop_reply_callback): Assert we're
1041 not pushing a TARGET_WAITKIND_IGNORE event.
1042 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1043 (myresume, handle_target_event): Set the thread's last_resume_kind
1044 and last_status from the target returned status.
1046 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1050 * linux-x86-low.c (update_debug_registers_callback): New.
1051 (i386_dr_low_set_addr): Use it.
1052 (i386_dr_low_get_addr): New.
1053 (i386_dr_low_set_control): Use update_debug_registers_callback.
1054 (i386_dr_low_get_control): New.
1055 (i386_dr_low_get_status): Adjust.
1056 * linux-low.c (linux_stop_lwp): New.
1057 * linux-low.h (linux_stop_lwp): Declare.
1059 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1060 argument instead of a i386_debug_reg_state.
1061 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1062 a i386_debug_reg_state.
1063 (i386_insert_aligned_watchpoint): Adjust.
1064 (i386_remove_aligned_watchpoint): Adjust.
1065 (i386_low_stopped_data_address): Read the debug registers from the
1066 inferior instead of from the mirrors.
1067 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1068 (i386_dr_low_get_addr): Declare.
1069 (i386_dr_low_get_control): Declare.
1070 (i386_dr_low_get_status): Change prototype.
1072 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1073 (i386_dr_low_get_addr): New.
1074 (i386_dr_low_get_control): New.
1075 (i386_dr_low_get_status): Adjust prototype. Return
1077 (i386_initial_stuff): Clear dr_status_mirror and
1079 (i386_get_thread_context): Adjust.
1080 (i386_set_thread_context): Adjust.
1081 (i386_thread_added): Adjust.
1083 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1085 * linux-low.h (linux_thread_area): Delete declaration.
1087 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1089 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1090 after its termination.
1092 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1094 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1095 (gdb_wants_all_stopped): Delete.
1096 (linux_wait_1): Don't call them.
1097 * server.c (handle_v_cont): Tag all threads as want-stopped.
1098 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1099 stopped as "client-wants-stopped".
1101 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1103 * Makefile.in (signals_h): New.
1104 (server_h): Depend on it.
1105 (server.o): Don't depend on $(signals_def).
1106 (signals.o): Depend on $(signals_def).
1108 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1110 * Makefile.in (signals_def): New.
1111 (server_h): Append include/gdb/signals.h and signals_def.
1112 (server.o): Append signals_def.
1114 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1116 * server.c (handle_target_event): Use target_signal_to_host for
1117 resume_info.sig initialization.
1118 * target.h (struct thread_resume) <sig>: New comment.
1120 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1122 * server.c (handle_query): strcpy() the returned string from paddress()
1123 instead of sprintf().
1124 * utils.c (paddress): Return phex_nz().
1126 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1128 * server.c (handle_v_cont): Call mourn_inferior if process
1130 (myresume): Likewise.
1132 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1134 Static tracepoints, and integration with UST.
1136 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1137 * mem-break.c (uninsert_all_breakpoints)
1138 (reinsert_all_breakpoints): New.
1139 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1140 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1141 (gdb_agent_ust_loaded, helper_thread_id)
1142 (gdb_agent_helper_thread_id): New macros.
1143 (struct ipa_sym_addresses): Add addr_ust_loaded,
1144 addr_helper_thread_id, addr_cmd_buf.
1145 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1146 (in_process_agent_loaded_ust): New.
1147 (write_e_ust_not_loaded): New.
1148 (maybe_write_ipa_ust_not_loaded): New.
1149 (struct collect_static_trace_data_action): New.
1150 (enum tracepoint_type) <static_tracepoint>: New.
1151 (struct tracepoint) <handle>: Mention static tracepoints.
1152 (struct static_tracepoint_ctx): New.
1153 (CMD_BUF_SIZE): New.
1154 (add_tracepoint_action): Handle static tracepoint actions.
1155 (unprobe_marker_at): New.
1156 (clear_installed_tracepoints): Handle static tracepoints.
1157 (cmd_qtdp): Handle static tracepoints.
1158 (probe_marker_at): New.
1159 (cmd_qtstart): Handle static tracepoints.
1160 (response_tracepoint): Handle static tracepoints.
1161 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1162 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1163 (get_context_regcache): Handle static tracepoints.
1164 (do_action_at_tracepoint): Handle static tracepoint actions.
1165 (traceframe_find_block_type): Handle static trace data blocks.
1166 (traceframe_read_sdata): New.
1167 (download_tracepoints): Download static tracepoint actions.
1168 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1169 (GDB_PROBE_NAME): New.
1174 (ust_marker_to_static_tracepoint): New.
1176 (collect_ust_data_at_tracepoint): New.
1177 (gdb_ust_probe): New.
1178 (UNIX_PATH_MAX, SOCK_DIR): New.
1179 (gdb_ust_connect_sync_socket): New.
1180 (resume_thread, stop_thread): New.
1181 (run_inferior_command): New.
1182 (init_named_socket): New.
1183 (gdb_ust_socket_init): New.
1184 (cstr_to_hexstr): New.
1186 (first_marker, next_marker): New.
1187 (response_ust_marker): New.
1188 (cmd_qtfstm, cmd_qtsstm): New.
1189 (unprobe_marker_at, probe_marker_at): New.
1190 (cmd_qtstmat, gdb_ust_thread): New.
1191 (gdb_ust_init): New.
1192 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1193 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1195 (x86_64_st_collect_regmap): New.
1196 (X86_64_NUM_ST_COLLECT_GREGS): New.
1197 (AMD64_RIP_REGNUM): New.
1198 (supply_static_tracepoint_registers): New.
1199 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1201 (i386_st_collect_regmap): New.
1202 (i386_NUM_ST_COLLECT_GREGS): New.
1203 (supply_static_tracepoint_registers): New.
1204 * server.c (handle_query): Handle qXfer:statictrace:read.
1205 <qSupported>: Report support for StaticTracepoints, and
1206 qXfer:statictrace:read features.
1207 * server.h (traceframe_read_sdata)
1208 (supply_static_tracepoint_registers): Declare.
1209 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1210 (unpack_varlen_hex): Include in IPA build.
1211 * Makefile.in (ustlibs, ustinc): New.
1212 (IPA_OBJS): Add remote-utils-ipa.o.
1213 ($(IPA_LIB)): Link -ldl and -lpthread.
1215 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1216 * config.in, configure: Regenerate.
1218 2010-06-20 Ian Lance Taylor <iant@google.com>
1219 Pedro Alves <pedro@codesourcery.com>
1221 * linux-x86-low.c (always_true): Delete.
1222 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1223 trying to fool the compiler with always_true.
1225 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1227 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1228 conditions in gdbserver.
1230 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1232 * spu-low.c (spu_read_memory): Wrap around local store limit.
1233 (spu_write_memory): Likewise.
1235 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1237 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1238 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1240 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1242 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1243 uses with LONGEST uses.
1245 2010-06-14 Stan Shebs <stan@codesourcery.com>
1246 Pedro Alves <pedro@codesourcery.com>
1250 * linux-x86-low.c: Include limits.h.
1255 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1256 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1257 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1258 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1259 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1260 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1261 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1262 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1263 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1264 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1265 (amd64_emit_void_call_2): New.
1266 (amd64_emit_ops): New.
1267 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1268 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1269 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1270 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1271 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1272 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1273 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1274 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1275 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1276 (i386_emit_stack_adjust, i386_emit_int_call_1)
1277 (i386_emit_void_call_2): New.
1278 (i386_emit_ops): New.
1279 (x86_emit_ops): New.
1280 (the_low_target): Install x86_emit_ops.
1281 * server.h (struct emit_ops): New.
1282 (get_raw_reg_func_addr): Declare.
1283 (current_insn_ptr, emit_error): Declare.
1284 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1285 (set_trace_state_variable_value): New defines.
1286 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1287 addr_get_trace_state_variable_value and
1288 addr_set_trace_state_variable_value.
1289 (symbol_list): New fields for get_raw_reg,
1290 get_trace_state_variable_value and set_trace_state_variable_value.
1291 (condfn): New typedef.
1292 (struct tracepoint): New field `compiled_cond'.
1293 (do_action_at_tracepoint): Clear compiled_cond.
1294 (get_trace_state_variable_value, set_trace_state_variable_value):
1296 (condition_true_at_tracepoint): If there's a compiled condition,
1298 (current_insn_ptr, emit_error): New globals.
1299 (struct bytecode_address): New.
1300 (get_raw_reg_func_addr): New.
1301 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1302 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1303 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1304 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1305 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1306 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1307 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1308 (compile_tracepoint_condition, compile_bytecodes): New.
1309 * target.h (emit_ops): Forward declare.
1310 (struct target_ops): New field emit_ops.
1311 (target_emit_ops): New.
1312 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1313 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1314 * linux-low.c (linux_emit_ops): New.
1315 (linux_target_ops): Install it.
1316 * linux-low.h (struct linux_target_ops): New field emit_ops.
1318 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1320 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1321 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1323 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1324 Stan Shebs <stan@codesourcery.com>
1326 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1327 (all): Depend on $(extra_libraries).
1328 (install-only): Install the IPA.
1329 (IPA_OBJS, IPA_LIB): New.
1330 (clean): Remove the IPA lib.
1331 (IPAGENT_CFLAGS): New.
1332 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1333 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1334 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1335 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1336 * configure.ac: Check for atomic builtins support in the compiler.
1337 (IPA_DEPFILES, extra_libraries): Define.
1338 * configure.srv (ipa_obj): Add description.
1339 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1340 (i[34567]86-*-linux*): Set ipa_obj.
1341 (x86_64-*-linux*): Set ipa_obj.
1342 * linux-low.c (stabilizing_threads): New.
1343 (supports_fast_tracepoints): New.
1344 (linux_detach): Stabilize threads before detaching.
1345 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1346 the lwp is either not stabilizing, or is moving out of a jump pad.
1347 (linux_fast_tracepoint_collecting): New.
1348 (maybe_move_out_of_jump_pad): New.
1349 (enqueue_one_deferred_signal): New.
1350 (dequeue_one_deferred_signal): New.
1351 (linux_wait_for_event_1): If moving out of a jump pad, defer
1352 pending signals to later.
1353 (linux_stabilize_threads): New.
1354 (linux_wait_1): Check if threads need moving out of jump pads, and
1356 (stuck_in_jump_pad_callback): New.
1357 (move_out_of_jump_pad_callback): New.
1359 (linux_resume_one_lwp): Handle moving out of jump pads.
1360 (linux_set_resume_request): Dequeue deferred signals.
1361 (need_step_over_p): Also step over fast tracepoint jumps.
1362 (start_step_over): Also uninsert fast tracepoint jumps.
1363 (finish_step_over): Also reinsert fast tracepoint jumps.
1364 (linux_install_fast_tracepoint_jump): New.
1365 (linux_target_ops): Install linux_stabilize_threads and
1366 linux_install_fast_tracepoint_jump_pad.
1367 * linux-low.h (linux_target_ops) <get_thread_area,
1368 install_fast_tracepoint_jump_pad>: New fields.
1369 (struct lwp_info) <collecting_fast_tracepoint,
1370 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1371 (linux_get_thread_area): Declare.
1372 * linux-x86-low.c (jump_insn): New.
1373 (x86_get_thread_area): New.
1374 (append_insns): New.
1376 (amd64_install_fast_tracepoint_jump_pad): New.
1377 (i386_install_fast_tracepoint_jump_pad): New.
1378 (x86_install_fast_tracepoint_jump_pad): New.
1379 (the_low_target): Install x86_get_thread_area and
1380 x86_install_fast_tracepoint_jump_pad.
1381 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1382 (struct fast_tracepoint_jump): New.
1383 (fast_tracepoint_jump_insn): New.
1384 (fast_tracepoint_jump_shadow): New.
1385 (find_fast_tracepoint_jump_at): New.
1386 (fast_tracepoint_jump_here): New.
1387 (delete_fast_tracepoint_jump): New.
1388 (set_fast_tracepoint_jump): New.
1389 (uninsert_fast_tracepoint_jumps_at): New.
1390 (reinsert_fast_tracepoint_jumps_at): New.
1391 (set_breakpoint_at): Use write_inferior_memory.
1392 (uninsert_raw_breakpoint): Use write_inferior_memory.
1393 (check_mem_read): Mask out fast tracepoint jumps.
1394 (check_mem_write): Mask out fast tracepoint jumps.
1395 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1396 (set_fast_tracepoint_jump): Declare.
1397 (delete_fast_tracepoint_jump)
1398 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1399 (reinsert_fast_tracepoint_jumps_at): Declare.
1400 * regcache.c: Don't compile many functions when building the
1401 in-process agent library.
1402 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1403 the register buffer in the heap.
1404 (free_register_cache): If the register buffer isn't owned by the
1405 regcache, don't free it.
1406 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1407 pre-existing register caches.
1408 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1410 (convert_ascii_to_int): : Constify `from' parameter type.
1411 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1412 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1413 the needed buffer in-place.
1414 (relocate_instruction): New.
1415 * server.c (handle_query) <qSymbols>: If the target supports
1416 tracepoints, give it a chance of looking up symbols. Report
1417 support for fast tracepoints.
1418 (handle_status): Stabilize threads.
1419 (process_serial_event): Adjust.
1420 * server.h (struct fast_tracepoint_jump): Forward declare.
1421 (struct process_info) <fast_tracepoint_jumps>: New field.
1422 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1423 (decode_X_packet, decode_M_packet): Adjust.
1424 (relocate_instruction): Declare.
1425 (in_process_agent_loaded): Declare.
1426 (tracepoint_look_up_symbols): Declare.
1427 (struct fast_tpoint_collect_status): Declare.
1428 (fast_tracepoint_collecting): Declare.
1429 (force_unlock_trace_buffer): Declare.
1430 (handle_tracepoint_bkpts): Declare.
1431 (initialize_low_tracepoint)
1432 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1433 * target.h (struct target_ops) <stabilize_threads,
1434 install_fast_tracepoint_jump_pad>: New fields.
1435 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1436 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1437 [HAVE_STDINT_H]: Include stdint.h.
1438 (trace_debug_1): Rename to ...
1439 (trace_vdebug): ... this.
1440 (trace_debug): Rename to ...
1441 (trace_debug_1): ... this. Add `level' parameter.
1443 (ATTR_USED, ATTR_NOINLINE): New.
1444 (IP_AGENT_EXPORT): New.
1445 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1446 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1447 (about_to_request_buffer_space, trace_buffer_is_full)
1448 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1449 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1450 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1451 (traceframe_write_count, traceframes_created)
1452 (trace_state_variables)
1453 New renaming defines.
1454 (struct ipa_sym_addresses): New.
1455 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1457 (ipa_sym_addrs): New.
1458 (all_tracepoint_symbols_looked_up): New.
1459 (in_process_agent_loaded): New.
1460 (write_e_ipa_not_loaded): New.
1461 (maybe_write_ipa_not_loaded): New.
1462 (tracepoint_look_up_symbols): New.
1463 (debug_threads) [IN_PROCESS_AGENT]: New.
1464 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1465 (UNKNOWN_SIDE_EFFECTS): New.
1466 (stop_tracing): New.
1467 (flush_trace_buffer): New.
1468 (stop_tracing_bkpt): New.
1469 (flush_trace_buffer_bkpt): New.
1470 (read_inferior_integer): New.
1471 (read_inferior_uinteger): New.
1472 (read_inferior_data_pointer): New.
1473 (write_inferior_data_pointer): New.
1474 (write_inferior_integer): New.
1475 (write_inferior_uinteger): New.
1476 (struct collect_static_trace_data_action): Delete.
1477 (enum tracepoint_type): New.
1478 (struct tracepoint) <type>: New field `type'.
1479 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1480 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1481 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1482 (tracepoints): Use IP_AGENT_EXPORT.
1483 (last_tracepoint): Don't include in the IPA.
1484 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1485 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1486 (alloced_trace_state_variables): New.
1487 (trace_state_variables): Use IP_AGENT_EXPORT.
1488 (traceframe_t): Delete unused variable.
1489 (circular_trace_buffer): Don't include in the IPA.
1490 (trace_buffer_start): Delete.
1491 (struct trace_buffer_control): New.
1492 (trace_buffer_free): Delete.
1493 (struct ipa_trace_buffer_control): New.
1494 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1495 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1497 (trace_buffer_ctrl): New.
1498 (TRACE_BUFFER_CTRL_CURR): New.
1499 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1500 Reimplement as macros.
1501 (trace_buffer_wrap): Delete.
1502 (traceframe_write_count, traceframe_read_count)
1503 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1504 (struct tracepoint_hit_ctx) <type>: New field.
1505 (struct fast_tracepoint_ctx): New.
1506 (memory_barrier): New.
1508 (record_tracepoint_error): Update atomically in the IPA.
1509 (clear_inferior_trace_buffer): New.
1510 (about_to_request_buffer_space): New.
1511 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1512 updating the same buffer.
1513 (add_tracepoint): Default the tracepoint's type to trap
1514 tracepoint, and orig_size to -1.
1515 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1517 (create_trace_state_variable): New parameter `gdb'. Handle it.
1518 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1519 (cmd_qtdp): Handle fast tracepoints.
1521 (max_jump_pad_size): New.
1522 (gdb_jump_pad_head): New.
1523 (get_jump_space_head): New.
1524 (claim_jump_space): New.
1525 (sort_tracepoints): New.
1526 (MAX_JUMP_SIZE): New.
1527 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1529 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1530 support. Upload fast traceframes, and delete internal IPA
1532 (stop_tracing_handler): New.
1533 (flush_trace_buffer_handler): New.
1534 (cmd_qtstop): Upload fast tracepoints.
1535 (response_tracepoint): Handle fast tracepoints.
1536 (tracepoint_finished_step): Upload fast traceframes. Set the
1537 tracepoint hit context's tracepoint type.
1538 (handle_tracepoint_bkpts): New.
1539 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1540 type. Add comment about fast tracepoints.
1541 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1542 non-existing action_str field.
1543 (get_context_regcache): Handle fast tracepoints.
1544 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1546 (fast_tracepoint_from_jump_pad_address): New.
1547 (fast_tracepoint_from_ipa_tpoint_address): New.
1548 (collecting_t): New.
1549 (force_unlock_trace_buffer): New.
1550 (fast_tracepoint_collecting): New.
1553 (write_inferior_data_ptr): New.
1554 (target_tp_heap): New.
1555 (target_malloc): New.
1556 (download_agent_expr): New.
1558 (download_tracepoints): New.
1559 (download_trace_state_variables): New.
1560 (upload_fast_traceframes): New.
1561 (IPA_FIRST_TRACEFRAME): New.
1562 (IPA_NEXT_TRACEFRAME_1): New.
1563 (IPA_NEXT_TRACEFRAME): New.
1564 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1565 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1566 (gdb_jump_pad_buffer_end): New.
1567 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1568 (initialize_tracepoint): Adjust.
1569 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1570 buffer. Initialize the low module.
1571 * utils.c (PREFIX, TOOLNAME): New.
1572 (malloc_failure): Use PREFIX.
1573 (error): In the IPA, an error causes an exit.
1574 (fatal, warning): Use PREFIX.
1575 (internal_error): Use TOOLNAME.
1576 (NUMCELLS): Increase to 10.
1577 * configure, config.in: Regenerate.
1579 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1581 * server.c (handle_query) <qSupported>: Do two passes over the
1582 qSupported string to avoid nesting strtok.
1584 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1586 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1588 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1590 * configure: Regenerate.
1591 * proc-service.list: New.
1593 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1595 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1598 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1600 * gdbreplay.c (remote_open): Check error return from socket() call by
1601 its equality to -1 not by it being negative.
1602 * remote-utils.c (remote_open): Likewise.
1604 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1606 * config.h: Regenerate.
1608 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1610 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1611 doesn't provide PTRACE_GET_THREAD_AREA.
1613 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1615 * linux-m68k-low.c: Include <asm/ptrace.h>
1616 (ps_get_thread_area): Implement.
1618 2010-05-03 Doug Evans <dje@google.com>
1620 * event-loop.c (struct callback_event): New struct.
1621 (callback_list): New global.
1622 (append_callback_event, delete_callback_event): New functions.
1623 (process_callback): New function.
1624 (start_event_loop): Call it.
1625 * remote-utils.c (NOT_SCHEDULED): Define.
1626 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1627 moved out of readchar.
1628 (readchar): Rewrite. Call reschedule before returning.
1629 (reset_readchar): New function.
1630 (remote_close): Call it.
1631 (process_remaining, reschedule): New functions.
1632 * server.h (callback_handler_func): New typedef.
1633 (append_callback_event, delete_callback_event): Declare.
1635 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1637 * proc-service.c (ps_pglobal_lookup): Use
1638 thread_db_look_up_one_symbol.
1639 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1640 parameter. Use it instead of all_symbols_looked_up.
1641 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1643 (all_symbols_looked_up): Don't declare.
1644 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1645 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1647 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1648 Set all_symbols_looked_up here.
1649 (thread_db_look_up_one_symbol): New.
1650 (thread_db_get_tls_address): Adjust.
1651 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1652 thread_db object on the heap, and tentatively set it in the
1654 (thread_db_init): Don't set all_symbols_looked_up here.
1655 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1657 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1659 * linux-low.c (linux_kill, linux_detach): Adjust.
1660 (status_pending_p_callback): Remove redundant statement. Check
1661 for !TARGET_WAITIKIND_IGNORE, instead of
1662 TARGET_WAITKIND_STOPPED.
1663 (handle_tracepoints): Make sure LWP is locked. Adjust.
1664 (linux_wait_for_event_1): Adjust.
1665 (linux_cancel_breakpoints): New.
1666 (unsuspend_one_lwp): New.
1667 (unsuspend_all_lwps): New.
1668 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1669 (send_sigstop_callback): Change return type to int, add new
1670 `except' parameter and handle it.
1671 (suspend_and_send_sigstop_callback): New.
1672 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1673 pass them down. If SUSPEND, also increment the lwp's suspend
1675 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1676 (need_step_over_p): Don't consider suspended LWPs.
1677 (start_step_over): Adjust.
1678 (proceed_one_lwp): Change return type to int, add new `except'
1679 parameter and handle it.
1680 (unsuspend_and_proceed_one_lwp): New.
1681 (proceed_all_lwps): Use find_inferior instead of
1683 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1684 also decrement the suspend count of LWPs. Pass `except' down,
1685 instead of hacking its suspend count.
1686 (linux_pause_all): Add `freeze' parameter. Adjust.
1687 (linux_unpause_all): New.
1688 (linux_target_ops): Install linux_unpause_all.
1689 * server.c (handle_status): Adjust.
1690 * target.h (struct target_ops): New fields `unpause_all' and
1691 `cancel_breakpoints'. Add new parameter to `pause_all'.
1692 (pause_all): Add new `freeze' parameter.
1694 (cancel_breakpoints): New.
1695 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1697 (cmd_qtstart): Pause threads.
1698 (stop_tracing): Pause threads, and cancel breakpoints.
1699 * win32-low.c (win32_target_ops): Adjust.
1701 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1703 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1704 the inferior right away from here...
1705 (linux_wait_1): ... to here, and adjust to check the thread's
1706 last_resume_kind instead of the lwp's step or stop_expected flags.
1708 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1710 * README: Use consistent `GDB' and `GDBserver' spellings.
1712 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1714 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1715 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1716 (linux_detach_one_lwp): Assume the lwp is stopped.
1717 (any_thread_of): Delete.
1718 (linux_detach): Stop all lwps here. Don't blindly delete all
1720 (delete_lwp_callback): New.
1721 (linux_mourn): Delete all lwps of the process that is gone.
1722 (linux_wait_1): Don't delete the last lwp of the process here.
1723 * mem-break.h (mark_breakpoints_out): Declare.
1724 * mem-break.c (mark_breakpoints_out): New.
1725 (free_all_breakpoints): Use it.
1726 * server.c (handle_target_event): If the process is gone, mark
1728 * thread-db.c (struct thread_db) <create_bp>: New field.
1729 (thread_db_enable_reporting): Fix prototype. Store a thread event
1730 breakpoint reference in the thread_db struct.
1731 (thread_db_load_search): Clear the thread_db object.
1732 (try_thread_db_load_1): Ditto.
1733 (switch_to_process): New.
1734 (disable_thread_event_reporting): Use it.
1735 (remove_thread_event_breakpoints): New.
1736 (thread_db_detach, thread_db_mourn): Use it.
1738 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1740 * linux-low.c (linux_enable_event_reporting): New.
1741 (linux_wait_for_event_1, handle_extended_wait): Use it.
1743 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1745 * linux-low.c (linux_kill_one_lwp, linux_kill)
1746 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1747 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1748 SIGSTOP even if the LWP is stopped.
1749 (send_sigstop_callback): New.
1750 (stop_all_lwps): Use send_sigstop_callback instead.
1751 (linux_resume_one_thread): Adjust.
1752 (proceed_one_lwp): Still proceed an LWP that the client has
1753 requested to stop, if we haven't reported it as stopped yet. Make
1754 sure that LWPs the client want stopped, have a pending SIGSTOP.
1756 2010-04-26 Doug Evans <dje@google.com>
1758 * server.c (handle_general_set): Make static.
1760 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1761 Print received char after testing for error/eof instead of before.
1762 (input_interrupt): Tweak comment.
1764 2010-04-23 Doug Evans <dje@google.com>
1766 * server.c (start_inferior): Print inferior argv if --debug.
1768 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1770 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1771 * nto-x86-low.c: Include server.h
1773 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1775 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1776 be consistent with other sources of this directory.
1777 (init_registers_amd64): Correct name of source file of this function
1780 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1782 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1785 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1787 * win32-i386-low.c: Add 64-bit support.
1788 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1789 (init_registers_amd64): Declare.
1790 (mappings): Add 64-bit version of array.
1791 (init_windows_x86): New function.
1792 (the_low_target): Change init_arch field to init_windows_x86.
1794 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1796 * win32-low.c: Adapt to support also 64-bit architecture.
1797 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1798 (get_image_name): Use SIZE_T type for local variable `done'.
1799 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1800 (toolhelp_get_dll_name): Idem.
1801 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1802 Use uintptr_t typecast to avoid warning.
1803 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1804 (handle_exception): Use phex_nz to avoid warning.
1805 (win32_wait): Remove unused local variable `process'.
1807 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1809 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1812 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1814 * configure.ac: Use `ws2_32' library for srv_mingw.
1815 * configure: Regenerate.
1816 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1817 * remote-utils.c: Likewise.
1819 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1821 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1822 if __x86_64__ is defined.
1824 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1826 * configure: Regenerate.
1828 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1830 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1831 * target.h (target_ops): New get_tib_address field.
1832 * win32-low.h (win32_thread_info): Add thread_local_base field.
1833 * win32-low.c (child_add_thread): Add tlb argument.
1834 Set thread_local_base field to TLB.
1835 (get_child_debug_event): Adapt to child_add_thread change.
1836 (win32_get_tib_address): New function.
1837 (win32_target_ops): Set get_tib_address field to
1838 win32_get_tib_address.
1839 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1841 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1843 * linux-low.c (linux_mourn): Also remove the process.
1844 * server.c (handle_target_event): Don't remove the process here.
1845 * nto-low.c (nto_mourn): New.
1846 (nto_target_ops): Install it.
1847 * spu-low.c (spu_mourn): New.
1848 (spu_target_ops): Install it.
1849 * win32-low.c (win32_mourn): New.
1850 (win32_target_ops): Install it.
1852 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1854 * server.h (buffer_xml_printf): Remove redundant `;'.
1856 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1858 * regcache.c (set_register_cache): Invalidate regcaches before
1859 changing the register cache layout.
1860 (regcache_invalidate_one): Allow a NULL regcache.
1861 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1862 regcaches before changing the register cache layout or the target
1865 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1867 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1868 variable warning on Linux/x86-64.
1870 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1872 GDBserver disconnected tracing support.
1874 * linux-low.c (linux_remove_process): Delete.
1875 (add_lwp): Don't set last_resume_kind here.
1876 (linux_kill): Use `mourn'.
1877 (linux_detach): Use `thread_db_detach', and `mourn'.
1879 (linux_attach_lwp_1): Adjust comment.
1880 (linux_attach): last_resume_kind moved the thread_info; adjust.
1881 (status_pending_p_callback): Adjust.
1882 (linux_wait_for_event_1): Adjust.
1883 (count_events_callback, select_singlestep_lwp_callback)
1884 (select_event_lwp_callback, cancel_breakpoints_callback)
1885 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1886 (proceed_one_lwp): Adjust.
1887 (linux_async): Add debug output.
1888 (linux_thread_stopped): New.
1889 (linux_pause_all): New.
1890 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1892 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1893 (thread_db_free): Delete declaration.
1894 (thread_db_detach, thread_db_mourn): Declare.
1895 * thread-db.c (thread_db_init): Use thread_db_mourn.
1896 (thread_db_free): Delete, split in two.
1897 (disable_thread_event_reporting): New.
1898 (thread_db_detach): New.
1899 (thread_db_mourn): New.
1901 * server.h (struct thread_info) <last_resume_kind>: New field.
1902 <attached>: Add comment.
1903 <gdb_detached>: New field.
1904 (handler_func): Change return type to int.
1905 (handle_serial_event, handle_target_event): Ditto.
1906 (gdb_connected): Declare.
1908 (disconnected_tracing): Declare.
1909 (stop_tracing): Declare.
1911 * server.c (handle_query) <qSupported>: Report support for
1912 disconnected tracing.
1913 (queue_stop_reply_callback): Account for running threads.
1914 (gdb_wants_thread_stopped): New.
1915 (gdb_wants_all_threads_stopped): New.
1916 (gdb_reattached_process): New.
1917 (handle_status): Clear the `gdb_detached' flag of all processes.
1918 In all-stop, stop all threads.
1919 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1920 (process_serial_event): If the remote connection breaks, or if an
1921 exit was forced with "monitor exit", force an event loop exit.
1922 Handle disconnected tracing on detach.
1923 (handle_serial_event): Adjust.
1924 (handle_target_event): If GDB isn't connected, forward events back
1925 to the inferior, unless the last process exited, in which case,
1926 exit gdbserver. Adjust interface.
1928 * remote-utils.c (remote_open): Don't block in accept. Instead
1929 register an event loop source on the listen socket file
1930 descriptor. Refactor bits into ...
1931 (listen_desc): ... this new global.
1932 (gdb_connected): ... this new function.
1933 (enable_async_notification): ... this new function.
1934 (handle_accept_event): ... this new function.
1935 (remote_close): Clear remote_desc.
1937 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1939 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1941 (mourn_inferior): Define.
1942 (target_process_qsupported): Avoid the dangling else problem.
1943 (thread_stopped): Define.
1944 (pause_all): Define.
1945 (target_waitstatus_to_string): Declare.
1946 * target.c (target_waitstatus_to_string): New.
1948 * tracepoint.c (tracing): Make extern.
1949 (disconnected_tracing): New.
1950 (stop_tracing): Make extern. Handle tracing stops due to GDB
1952 (cmd_qtdisconnected): New.
1953 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1954 (handle_tracepoint_general_set): Handle QTDisconnected.
1956 * event-loop.c (event_handler_func): Change return type to int.
1957 (process_event): Bail out if the event handler wants the event
1959 (handle_file_event): Ditto.
1960 (start_event_loop): Bail out if the event handler wants the event
1963 * nto-low.c (nto_target_ops): Adjust.
1964 * spu-low.c (spu_wait): Don't remove the process here.
1965 (spu_target_ops): Adjust.
1966 * win32-low.c (win32_wait): Don't remove the process here.
1967 (win32_target_ops): Adjust.
1969 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1971 * regcache.c (realloc_register_cache): Invalidate inferior's
1972 regcache before recreating it.
1974 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1976 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1978 2010-04-09 Stan Shebs <stan@codesourcery.com>
1979 Pedro Alves <pedro@codesourcery.com>
1981 * server.h (LONGEST): New.
1982 (struct thread_info) <while_stepping>: New field.
1983 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1985 (initialize_tracepoint, handle_tracepoint_general_set)
1986 (handle_tracepoint_query, tracepoint_finished_step)
1987 (tracepoint_was_hit, release_while_stepping_state_list):
1988 (current_traceframe): Declare.
1989 * server.c (handle_general_set): Handle tracepoint packets.
1991 (write_memory): New.
1992 (handle_search_memory_1): Use read_memory.
1993 (handle_query): Report support for conditional tracepoints, trace
1994 state variables, and tracepoint sources. Handle tracepoint
1996 (main): Initialize the tracepoints module.
1997 (process_serial_event): Handle traceframe reads/writes.
1999 * linux-low.c (handle_tracepoints): New.
2000 (linux_wait_1): Call it.
2001 (linux_resume_one_lwp): Handle while-stepping.
2002 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2003 (linux_target_ops): Install them.
2004 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2006 * linux-x86-low.c (x86_supports_tracepoints): New.
2007 (the_low_target). Install it.
2009 * mem-break.h (delete_breakpoint): Declare.
2010 * mem-break.c (delete_breakpoint): Make external.
2012 * target.h (struct target_ops): Add `supports_tracepoints',
2013 `read_pc', and `write_pc' fields.
2014 (target_supports_tracepoints): Define.
2015 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2018 * regcache.h (struct regcache) <registers_owned>: New field.
2019 (init_register_cache, regcache_cpy): Declare.
2020 (regcache_read_pc, regcache_write_pc): Declare.
2021 (register_cache_size): Declare.
2022 (supply_regblock): Declare.
2023 * regcache.c (init_register_cache): New.
2024 (new_register_cache): Use it.
2025 (regcache_cpy): New.
2026 (register_cache_size): New.
2027 (supply_regblock): New.
2028 (regcache_read_pc, regcache_write_pc): New.
2030 * tracepoint.c: New.
2032 * Makefile.in (OBS): Add tracepoint.o.
2033 (tracepoint.o): New rule.
2035 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2037 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2039 (i386-mmx.c): Likewise.
2040 (i386-mmx-linux.o): Likewise.
2041 (i386-mmx-linux.c): Likewise.
2043 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2044 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2045 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2046 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2048 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2049 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2050 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2052 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2054 * Makefile.in (clean): Updated.
2056 (i386-avx.c): Likewise.
2057 (i386-avx-linux.o): Likewise.
2058 (i386-avx-linux.c): Likewise.
2059 (amd64-avx.o): Likewise.
2060 (amd64-avx.c): Likewise.
2061 (amd64-avx-linux.o): Likewise.
2062 (amd64-avx-linux.c): Likewise.
2064 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2065 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2066 (srv_amd64_regobj): Add amd64-avx.o.
2067 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2068 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2069 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2070 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2071 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2072 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2073 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2075 * i387-fp.c: Include "i386-xstate.h".
2077 (i387_cache_to_xsave): Likewise.
2078 (i387_xsave_to_cache): Likewise.
2079 (x86_xcr0): Likewise.
2081 * i387-fp.h (i387_cache_to_xsave): Likewise.
2082 (i387_xsave_to_cache): Likewise.
2083 (x86_xcr0): Likewise.
2085 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2086 * linux-crisv32-low.c (target_regsets): Likewise.
2087 * linux-m68k-low.c (target_regsets): Likewise.
2088 * linux-mips-low.c (target_regsets): Likewise.
2089 * linux-ppc-low.c (target_regsets): Likewise.
2090 * linux-s390-low.c (target_regsets): Likewise.
2091 * linux-sh-low.c (target_regsets): Likewise.
2092 * linux-sparc-low.c (target_regsets): Likewise.
2093 * linux-xtensa-low.c (target_regsets): Likewise.
2095 * linux-low.c: Include <sys/uio.h>.
2096 (regsets_fetch_inferior_registers): Support nt_type.
2097 (regsets_store_inferior_registers): Likewise.
2098 (linux_process_qsupported): New.
2099 (linux_target_ops): Add linux_process_qsupported.
2101 * linux-low.h (regset_info): Add nt_type.
2102 (linux_target_ops): Add process_qsupported.
2104 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2106 (init_registers_i386_avx_linux): New.
2107 (init_registers_amd64_avx_linux): Likewise.
2108 (xmltarget_i386_linux_no_xml): Likewise.
2109 (xmltarget_amd64_linux_no_xml): Likewise.
2110 (PTRACE_GETREGSET): Likewise.
2111 (PTRACE_SETREGSET): Likewise.
2112 (x86_fill_xstateregset): Likewise.
2113 (x86_store_xstateregset): Likewise.
2114 (use_xml): Likewise.
2115 (x86_linux_update_xmltarget): Likewise.
2116 (x86_linux_process_qsupported): Likewise.
2117 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2118 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2119 init_registers_i386_linux here. Call
2120 x86_linux_update_xmltarget.
2121 (the_low_target): Add x86_linux_process_qsupported.
2123 * server.c (handle_query): Call target_process_qsupported.
2125 * target.h (target_ops): Add process_qsupported.
2126 (target_process_qsupported): New.
2128 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2130 * inferiors.c (add_thread): Set last_status kind to
2131 TARGET_WAITKIND_IGNORE.
2132 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2133 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2134 (linux_wait_1): Move `thread' local definition to block that uses
2135 it. Don't NULL initialize `event_child'.
2136 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2137 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2138 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2140 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2142 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2143 an extended waitstatus, or by a watchpoint.
2144 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2145 thread was stepping or has been stopped by a watchpoint.
2147 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2149 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2150 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2151 of another, then delete the previous, and validate all
2153 (validate_inserted_breakpoint): New.
2154 (delete_disabled_breakpoints): New.
2155 (validate_breakpoints): New.
2156 (check_mem_read): Validate breakpoints before trusting their
2157 shadow. Delete disabled breakpoints.
2158 (check_mem_write): Validate breakpoints before trusting they
2159 should be inserted. Delete disabled breakpoints.
2160 * mem-break.h (validate_breakpoints):
2161 * server.c (handle_query): Validate breakpoints when we see a
2164 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2166 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2167 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2168 if we could tell there's a GDB breakpoint at stop_pc.
2169 (need_step_over_p): Don't do a step over if we find a GDB
2170 breakpoint at the resume PC.
2172 * mem-break.c (struct raw_breakpoint): New.
2173 (enum bkpt_type): New type `gdb_breakpoint'.
2174 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2175 fields. New field `raw'.
2176 (find_raw_breakpoint_at): New.
2177 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2179 (set_breakpoint_at): Adjust.
2180 (delete_raw_breakpoint): New.
2181 (release_breakpoint): New.
2182 (delete_breakpoint): Rename to...
2183 (delete_breakpoint_1): ... this. Add proc parameter. Use
2184 release_breakpoint. Return ENOENT.
2185 (delete_breakpoint): Reimplement.
2186 (find_breakpoint_at): Delete.
2187 (find_gdb_breakpoint_at): New.
2188 (delete_breakpoint_at): Delete.
2189 (set_gdb_breakpoint_at): New.
2190 (delete_gdb_breakpoint_at): New.
2191 (gdb_breakpoint_here): New.
2192 (set_reinsert_breakpoint): Use release_breakpoint.
2193 (uninsert_breakpoint): Rename to ...
2194 (uninsert_raw_breakpoint): ... this.
2195 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2196 (reinsert_raw_breakpoint): Change parameter type to
2198 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2200 (check_breakpoints): Adjust. Use release_breakpoint.
2201 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2202 (breakpoint_inserted_here): Ditto.
2203 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2204 Don't trust the breakpoint's shadow if it is not inserted.
2205 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2206 (delete_all_breakpoints): Adjust.
2207 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2208 use delete_breakpoint_1.
2210 * mem-break.h (breakpoints_supported): Delete declaration.
2211 (set_gdb_breakpoint_at): Declare.
2212 (gdb_breakpoint_here): Declare.
2213 (delete_breakpoint_at): Delete.
2214 (delete_gdb_breakpoint_at): Declare.
2216 * server.h (struct raw_breakpoint): Forward declare.
2217 (struct process_info): New field `raw_breakpoints'.
2219 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2222 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2224 * linux-low.c (status_pending_p_callback): Fix comment.
2225 (linux_wait_for_event_1): Move most of the internal breakpoint
2226 handling from here...
2227 (linux_wait_1): ... to here.
2228 (count_events_callback): New.
2229 (select_singlestep_lwp_callback): New.
2230 (select_event_lwp_callback): New.
2231 (cancel_breakpoints_callback): New.
2232 (select_event_lwp): New.
2233 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2234 priority to all LWPs that have had events that should be reported
2235 to the client. Cancel breakpoints when about to reporting the
2236 event to the client, not while stopping lwps. No longer cancel
2237 finished single-steps here.
2238 (cancel_finished_single_step): Delete.
2239 (cancel_finished_single_steps): Delete.
2241 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2243 * mem-break.c (enum bkpt_type): New.
2244 (struct breakpoint): New field `type'.
2245 (set_breakpoint_at): Change return type to struct breakpoint
2246 pointer. Set type to `other_breakpoint' by default.
2247 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2248 in the breakpoint list.
2249 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2250 (reinsert_breakpoint): Rename to ...
2251 (reinsert_raw_breakpoint): ... this.
2252 (reinsert_breakpoints_at): Adjust.
2253 * mem-break.h (struct breakpoint): Declare.
2254 (set_breakpoint_at): Change return type to struct breakpoint
2257 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2259 * server.c (handle_query): Assign, not compare.
2261 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2263 Teach linux gdbserver to step-over-breakpoints.
2265 * linux-low.c (can_hardware_single_step): New.
2266 (supports_breakpoints): New.
2267 (handle_extended_wait): If stopping threads, read the stop pc of
2270 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2271 low target doesn't support retrieving the PC.
2272 (add_lwp): Set last_resume_kind to resume_continue.
2273 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2274 (linux_attach): Don't clear stop_expected. Set the lwp's
2275 last_resume_kind to resume_stop.
2276 (linux_detach_one_lwp): Don't check for removed breakpoints.
2277 (check_removed_breakpoint): Delete.
2278 (status_pending_p): Rename to ...
2279 (status_pending_p_callback): ... this. Don't check for removed
2280 breakpoints. Don't consider threads that are stopped from GDB's
2282 (linux_wait_for_lwp): Always read the stop_pc here.
2283 (cancel_breakpoint): New.
2284 (step_over_bkpt): New global.
2285 (linux_wait_for_event_1): Implement stepping over breakpoints.
2286 (gdb_wants_lwp_stopped): New.
2287 (gdb_wants_all_stopped): New.
2288 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2289 single-step traps here. Store the thread's last reported target
2291 (send_sigstop): Don't clear stop_expected. Always set it,
2293 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2294 (cancel_finished_single_step): New.
2295 (cancel_finished_single_steps): New.
2296 (wait_for_sigstop): Don't cancel finished single-step traps here.
2297 (linux_resume_one_lwp): Don't check for removed breakpoints.
2298 Don't set `step' on non-hardware step archs.
2299 (linux_set_resume_request): Ignore resume_stop requests if already
2300 stopping or stopped. Set the lwp's last_resume_kind.
2301 (resume_status_pending_p): Don't check for removed breakpoints.
2302 (need_step_over_p): New.
2303 (start_step_over): New.
2304 (finish_step_over): New.
2305 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2306 requests. Clear the thread's last reported target waitstatus.
2307 Don't use the `suspended' flag. Don't consider pending breakpoints.
2308 (linux_resume): Start a step-over if necessary.
2309 (proceed_one_lwp): New.
2310 (proceed_all_lwps): New.
2311 (unstop_all_lwps): New.
2312 * linux-low.h (struct lwp_info): Rewrite comment for the
2313 `suspended' flag. Add the `stop_pc' field. Delete the
2314 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2315 Add `'last_resume_kind' and `need_step_over' fields.
2316 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2317 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2318 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2319 (set_raw_breakpoint_at): New.
2320 (set_breakpoint_at): Rewrite to use it.
2321 (reinsert_breakpoint_handler): Delete.
2322 (set_reinsert_breakpoint): New.
2323 (reinsert_breakpoint_by_bp): Delete.
2324 (delete_reinsert_breakpoints): New.
2325 (uninsert_breakpoint): Rewrite.
2326 (uninsert_breakpoints_at): New.
2327 (reinsert_breakpoint): Rewrite.
2328 (reinsert_breakpoints_at): New.
2329 (check_breakpoints): Rewrite.
2330 (breakpoint_here): New.
2331 (breakpoint_inserted_here): New.
2332 (check_mem_read): Adjust.
2333 * mem-break.h (breakpoints_supported, breakpoint_here)
2334 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2335 (reinsert_breakpoint_by_bp): Delete declaration.
2336 (delete_reinsert_breakpoints): Declare.
2337 (reinsert_breakpoint): Delete declaration.
2338 (reinsert_breakpoints_at): Declare.
2339 (uninsert_breakpoint): Delete declaration.
2340 (uninsert_breakpoints_at): Declare.
2341 (check_breakpoints): Adjust prototype.
2342 * server.h: Adjust include order.
2343 (struct thread_info): Declare here. Add a `last_status' field.
2345 2010-03-23 Michael Snyder <msnyder@vmware.com>
2347 * server.c (crc32): New function.
2348 (handle_query): Add handling for 'qCRC:' request.
2350 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2352 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2353 lwp had been stopped by a watchpoint.
2355 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2357 * server.h (internal_error): Declare.
2358 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2359 * utils.c (internal_error): New function.
2361 2010-03-15 Andreas Schwab <schwab@redhat.com>
2363 * configure.srv: Fix typo setting srv_regobj.
2365 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2367 * linux-low.c (fetch_register): Avoid passing a non string literal
2369 (usr_store_inferior_registers): Ditto.
2371 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2373 * linux-low.c (linux_write_memory): Bail out early if peeking
2376 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2378 * linux-low.h (struct lwp_info): New fields
2379 `stopped_by_watchpoint' and `stopped_data_address'.
2380 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2381 here, and cache them in the lwp object.
2382 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2384 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2386 (linux_stopped_by_watchpoint): Rewrite.
2387 (linux_stopped_data_address): Rewrite.
2389 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2391 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2392 switching the current inferior, not before.
2394 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2396 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2397 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2398 i386-linux.c and amd64-linux.c.
2399 (reg-i386.o): Removed.
2400 (reg-i386.c): Likewise.
2401 (reg-i386-linux.o): Likewise.
2402 (reg-i386-linux.c): Likewise.
2403 (reg-x86-64.o): Likewise.
2404 (reg-x86-64.c): Likewise.
2405 (reg-x86-64-linux.o): Likewise.
2406 (reg-x86-64-linux.c): Likewise.
2409 (i386-linux.o): Likewise.
2410 (i386-linux.c): Likewise.
2411 (amd64.o): Likewise.
2412 (amd64.c): Likewise.
2413 (amd64-linux.o): Likewise.
2414 (amd64-linux.c): Likewise.
2416 * configure.srv (srv_i386_regobj): New.
2417 (srv_i386_linux_regobj): Likewise.
2418 (srv_amd64_regobj): Likewise.
2419 (srv_amd64_linux_regobj): Likewise.
2420 (srv_i386_32bit_xmlfiles): Likewise.
2421 (srv_i386_64bit_xmlfiles): Likewise.
2422 (srv_i386_xmlfiles): Likewise.
2423 (srv_amd64_xmlfiles): Likewise.
2424 (srv_i386_linux_xmlfiles): Likewise.
2425 (srv_amd64_linux_xmlfiles): Likewise.
2426 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2427 srv_xmlfiles to $srv_i386_xmlfiles.
2428 (i[34567]86-*-mingw32ce*): Likewise.
2429 (i[34567]86-*-mingw*): Likewise.
2430 (i[34567]86-*-nto*): Likewise.
2431 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2432 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2433 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2434 (x86_64-*-linux*): Likewise.
2436 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2437 (init_registers_amd64_linux): New.
2438 (x86_arch_setup): Replace init_registers_x86_64_linux with
2439 init_registers_amd64_linux.
2441 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2443 * configure.ac: Check for libdl. If it is not available link against
2444 static libthread_db.
2445 * configure: Regenerate.
2447 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2451 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2452 handing a read watchpoint.
2453 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2455 2010-02-12 Doug Evans <dje@google.com>
2457 * linux-low.c (linux_supports_tracefork_flag): Document.
2458 (linux_look_up_symbols): Add comment.
2460 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2462 * regcache.c (supply_register): Clear regcache if buf is NULL.
2464 2010-02-02 Nicolas Roche <roche@sourceware.org>
2465 Joel Brobecker <brobecker@adacore.com>
2467 * inferiors.c (find_inferior): Add function documentation.
2468 (unloaded_dll): Handle the case where the unloaded dll has not
2469 been previously registered in the dll list.
2471 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2473 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2474 (thumb2_breakpoint): New.
2475 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2477 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2479 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2480 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2483 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2485 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2487 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2489 * linux-s390-low.c (s390_collect_ptrace_register)
2490 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2492 2010-01-21 Doug Evans <dje@google.com>
2494 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2495 (PTRACE_ARG4_TYPE): New macro.
2496 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2497 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2498 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2499 (usr_store_inferior_registers): Ditto.
2500 (linux_read_memory, linux_write_memory): Ditto.
2501 (linux_test_for_tracefork): Ditto.
2503 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2504 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2506 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2508 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2511 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2513 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2514 prototype to take a regcache. Adjust.
2516 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2518 * regcache.h (struct thread_info): Forward declare.
2519 (struct regcache): New.
2520 (new_register_cache): Adjust prototype.
2521 (get_thread_regcache): Declare.
2522 (free_register_cache): Adjust prototype.
2523 (registers_to_string, registers_from_string): Ditto.
2524 (supply_register, supply_register_by_name, collect_register)
2525 (collect_register_as_string, collect_register_by_name): Ditto.
2526 * regcache.c (struct inferior_regcache_data): Delete.
2527 (get_regcache): Rename to ...
2528 (get_thread_regcache): ... this. Adjust. Switch inferior before
2530 (regcache_invalidate_one): Adjust.
2531 (regcache_invalidate): Fix prototype.
2532 (new_register_cache): Return the new register cache.
2533 (free_register_cache): Change prototype.
2534 (realloc_register_cache): Adjust.
2535 (registers_to_string): Change prototype to take a regcache. Adjust.
2536 (registers_from_string): Ditto.
2537 (register_data): Ditto.
2538 (supply_register): Ditto.
2539 (supply_register_by_name): Ditto.
2540 (collect_register): Ditto.
2541 (collect_register_as_string): Ditto.
2542 (collect_register_by_name): Ditto.
2543 * server.c (process_serial_event): Adjust.
2544 * linux-low.h (regset_fill_func, regset_store_func): Change
2546 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2548 * linux-low.c (get_stop_pc): Adjust.
2549 (check_removed_breakpoint): Adjust.
2550 (linux_wait_for_event): Adjust.
2551 (linux_resume_one_lwp): Adjust.
2552 (fetch_register): Add regcache parameter. Adjust.
2553 (usr_store_inferior_registers): Ditto.
2554 (regsets_fetch_inferior_registers): Ditto.
2555 (regsets_store_inferior_registers): Ditto.
2556 (linux_fetch_registers, linux_store_registers): Ditto.
2557 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2559 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2560 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2561 prototype to take a regcache.
2562 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2563 * remote-utils.c (convert_ascii_to_int, outreg)
2564 (prepare_resume_reply): Change prototype to take a regcache.
2566 * target.h (struct target_ops) <fetch_registers, store_registers>:
2567 Change prototype to take a regcache.
2568 (fetch_inferior_registers, store_inferior_registers): Change
2569 prototype to take a regcache. Adjust.
2570 * proc-service.c (ps_lgetregs): Adjust.
2571 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2572 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2573 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2574 take a regcache. Adjust.
2575 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2576 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2577 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2578 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2579 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2580 (cris_cannot_fetch_register):
2581 (cris_breakpoint_at): Change prototype to take a regcache.
2583 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2584 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2585 to take a regcache. Adjust.
2586 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2588 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2589 take a regcache. Adjust.
2590 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2591 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2592 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2593 * linux-mips-low.c (mips_get_pc):
2594 (mips_set_pc): Change prototype to take a regcache. Adjust.
2595 (mips_reinsert_addr): Adjust.
2596 (mips_collect_register): Change prototype to take a regcache.
2598 (mips_supply_register):
2599 (mips_collect_register_32bit, mips_supply_register_32bit)
2600 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2601 (mips_store_fpregset): Ditto.
2602 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2604 (parse_spufs_run): Adjust.
2605 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2606 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2607 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2608 take a regcache. Adjust.
2609 * linux-s390-low.c (s390_collect_ptrace_register)
2610 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2611 (s390_set_pc): Change prototype to take a regcache. Adjust.
2612 (s390_arch_setup): Adjust.
2613 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2614 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2615 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2616 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2617 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2619 (sparc_breakpoint_at): Adjust.
2620 * linux-xtensa-low.c (xtensa_fill_gregset):
2621 (xtensa_store_gregset):
2622 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2623 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2624 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2625 prototype to take a regcache. Adjust.
2626 * win32-arm-low.c (arm_fetch_inferior_register)
2627 (arm_store_inferior_register): Change prototype to take a
2629 * win32-i386-low.c (i386_fetch_inferior_register)
2630 (i386_store_inferior_register): Change prototype to take a
2632 * win32-low.c (child_fetch_inferior_registers)
2633 (child_store_inferior_registers): Change prototype to take a
2635 (win32_wait): Adjust.
2636 (win32_fetch_inferior_registers): Change prototype to take a
2638 (win32_store_inferior_registers): Adjust.
2639 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2640 store_inferior_register>: Change prototype to take a regcache.
2642 2010-01-20 Doug Evans <dje@google.com>
2644 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2646 (linux_wait_for_event1, linux_init_signals): Ditto.
2647 (W_STOPCODE): Provide definition if missing.
2649 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2651 * linux-low.c (linux_core_of_thread): New.
2652 (compare_ints, show_process, list_threads): New.
2653 (linux_qxfer_osdata): Report threads and cores.
2654 (linux_target_op): Register linux_core_of_thread.
2655 * remote-utils.c (prepare_resume_reply): Report the core.
2656 (buffer_xml_printf): Support %d specifier.
2657 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2659 (handle_query): Handle qXfer:threads. Announce availability
2661 * target.h (struct target_ops): New field core_of_thread.
2663 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2665 * Makefile.in (clean): Remove new generated files.
2666 (reg-s390.o, reg-s390.c): Remove rules.
2667 (reg-s390x.o, reg-s390x.c): Likewise.
2668 (s390-linux32.o, s390-linux32.c): Add rules.
2669 (s390-linux64.o, s390-linux64.c): Likewise.
2670 (s390x-linux64.o, s390x-linux64.c): Likewise.
2671 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2672 * linux-s390-low.c: Include <elf.h>.
2673 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2674 (init_registers_s390): Remove prototype.
2675 (init_registers_s390x): Likewise.
2676 (init_registers_s390_linux32): Add prototype.
2677 (init_registers_s390_linux64): Likewise.
2678 (init_registers_s390x_linux64): Likewise.
2679 (s390_num_regs_3264): New define.
2680 (s390_regmap_3264): New global variable.
2681 (s390_cannot_fetch_register): Remove obsolete check.
2682 (s390_cannot_store_register): Likewise.
2683 (s390_collect_ptrace_register): Handle upper/lower register halves.
2684 (s390_supply_ptrace_register): Likewise.
2685 (s390_fill_gregset): Update to register number changes.
2686 (s390_get_hwcap): New routine.
2687 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2688 Install appropriate regmap and register set.
2690 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2692 * server.c (gdbserver_version): Update copyright year to 2010.
2693 * gdbreplay.c (gdbreplay_version): Likewise.
2695 2009-12-28 Doug Evans <dje@google.com>
2697 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2698 elf/external.h. Include <elf.h> instead but only if necessary.
2700 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2702 * linux-low.c (linux_remove_process): Remove `detaching'
2703 parameter. Don't release/detach from thread_db here.
2704 (linux_kill): Release/detach from thread_db here, ...
2705 (linux_detach): ... and here, before actually detaching.
2706 (linux_wait_1): ... and here, when a process exits.
2707 * thread-db.c (any_thread_of): New.
2708 (thread_db_free): Switch the current inferior to a thread of the
2711 2009-12-21 Doug Evans <dje@google.com>
2713 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2715 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2716 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2717 warning ifndef __NR_tkill. Move setting of errno there too.
2718 Delete unnecessary resetting of errno after syscall.
2719 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2721 * configure.ac: Check for dladdr.
2722 * config.in: Regenerate.
2723 * configure: Regenerate.
2724 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2725 (try_thread_db_load): Update.
2727 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2729 2009-12-18 Doug Evans <dje@google.com>
2731 * event-loop.c: Include unistd.h if it exists.
2733 * linux-low.c (my_waitpid): Move definition away from being in
2734 between linux_tracefork_child/linux_test_for_tracefork.
2736 * gdb_proc_service.h (psaddr_t): Fix type.
2737 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2738 signature to match glibc.
2740 2009-12-16 Doug Evans <dje@google.com>
2742 * linux-low.c (linux_read_memory): Fix argument to read.
2744 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2746 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2747 events, don't leave current_inferior pointing at null.
2749 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2751 * win32-low.c (LOG): Delete.
2752 (OUTMSG): Output to stderr.
2753 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2754 on compile time LOG macro.
2755 (win32_wait): Fix debug output.
2757 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2759 * win32-low.c (win32_add_one_solib): If the dll name is
2760 "ntdll.dll", prepend the system directory to the dll path.
2762 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2764 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2766 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2767 Vladimir Prus <vladimir@codesourcery.com>
2769 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2770 * configure.ac: Check for __mcoldfire__ and set
2771 gdb_cv_m68k_is_coldfire.
2772 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2773 reg-cf.o and reg-m68k.o.
2774 * configure: Regenerated.
2776 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2778 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2779 Pass it to thread_db_free.
2780 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2781 proper `detaching' argument to linux_remove_process.
2782 * linux-low.h (thread_db_free): Add `detaching' parameter.
2783 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2785 (thread_db_free): Add `detaching' parameter. Only
2786 call td_ta_clear_event if detaching from process.
2788 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2790 * thread-db.c (thread_db_free): Fix typo.
2792 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2795 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2797 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2799 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2800 with an i686 compiler.
2801 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2803 * configure: Rebuilt.
2805 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2809 * server.c (handle_search_memory_1): Correct read_addr initialization
2810 in loop for searching subsequent chunks.
2812 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2814 * configure.ac: New --with-libthread-db option.
2815 * thread-db.c: Allow direct dependence on libthread_db.
2816 (thread_db_free): Adjust.
2817 * config.in: Regenerate.
2818 * configure: Likewise.
2820 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2823 * thread-db.c (attach_thread): New function.
2824 (maybe_attach_thread): Return success/failure.
2825 (find_new_threads_callback): Adjust.
2826 (thread_db_find_new_threads): Loop until no new threads.
2828 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2830 * proc-service.c (ps_lgetregs): Formatting.
2832 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2834 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2835 * configure.ac: Adjust.
2836 * linux-low.h (struct process_info_private): Move members to struct
2838 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2839 * linux-low.c (linux_remove_process): Adjust.
2840 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2841 * server.c (handle_query): Move code ...
2842 (handle_monitor_command): ... here. New function.
2843 * target.h (struct target_ops): New member.
2844 * thread-db.c (struct thread_db): New.
2845 (libthread_db_search_path): New variable.
2846 (thread_db_create_event, thread_db_enable_reporting)
2847 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2848 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2849 (try_thread_db_load_1, dladdr_to_soname): New functions.
2850 (try_thread_db_load, thread_db_load_search): New functions.
2851 (thread_db_init): Search for libthread_db.
2852 (thread_db_free): New function.
2853 (thread_db_handle_monitor_command): Likewise.
2854 * config.in: Regenerate.
2855 * configure: Regenerate.
2857 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2859 * spu-low.c (spu_kill): Wait for inferior to terminate.
2860 Call clear_inferiors.
2861 (spu_detach): Call clear_inferiors.
2863 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2865 * aclocal.m4: Regenerate.
2866 * config.in: Likewise.
2867 * configure: Likewise.
2869 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2871 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2872 (parse_spufs_run): New function.
2873 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2874 (ppc_breakpoint_at): Handle SPU breakpoints.
2876 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2878 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2879 (SPUFS_MAGIC): Define.
2880 (spu_enumerate_spu_ids): New function.
2881 (linux_qxfer_spu): New function.
2882 (linux_target_ops): Install linux_qxfer_spu.
2884 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2886 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2887 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2888 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2889 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2890 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2891 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2892 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2893 (init_registers_powerpc_cell32l): Add prototype.
2894 (init_registers_powerpc_cell64l): Likewise.
2895 (ppc_arch_setup): Detect Cell/B.E. architecture.
2897 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2899 * Makefile.in (datarootdir): New variable.
2901 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2903 * linux-low.c (linux_write_memory): Update debugging output.
2904 * Makefile.in (clean): Add new descriptions.
2905 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2906 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2907 * configure.srv: Add new files for arm*-*-linux*.
2908 * linux-arm-low.c: Add new declarations.
2909 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2910 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2911 (HWCAP_VFPv3D16): New.
2912 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2913 instead of __IWMMXT__.
2914 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2915 (arm_arch_setup): New.
2916 (target_regsets): Remove #ifdef. Add VFP regset.
2917 (the_low_target): Use arm_arch_setup.
2919 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2921 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2922 the main thread again.
2924 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2926 Adding Neutrino gdbserver.
2927 * configure: Regenerated.
2928 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2929 * configure.srv (i[34567]86-*-nto*): New target.
2930 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2931 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2932 (nto_comctrl) [__QNX__]: New function.
2933 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2935 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2937 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2940 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2941 Pedro Alves <pedro@codesourcery.com>
2943 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2944 don't support CONTEXT_EXTENDED_REGISTERS.
2945 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2946 (the_low_target): Install them.
2947 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2948 failing with ERROR_PIPE_NOT_CONNECTED.
2950 2009-06-30 Doug Evans <dje@google.com>
2951 Pierre Muller <muller@ics.u-strasbg.fr>
2953 Add h/w watchpoint support to x86-linux, win32-i386.
2954 * Makefile.in (SFILES): Add i386-low.c
2955 (i386_low_h): Define.
2956 (i386-low.o): Add dependencies.
2957 (linux-x86-low.o): Add i386-low.h dependency.
2958 (win32-i386-low.o): Ditto.
2959 * i386-low.c: New file.
2960 * i386-low.h: New file.
2961 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2962 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2963 * linux-low.c (linux_add_process): Initialize arch_private.
2964 (linux_remove_process): Free arch_private.
2965 (add_lwp): Initialize arch_private.
2966 (delete_lwp): Free arch_private.
2967 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2969 * linux-low.h (process_info_private): New member arch_private.
2970 (lwp_info): New member arch_private.
2971 (linux_target_ops): New members new_process, new_thread,
2973 (ptid_of): New macro.
2974 * linux-x86-low.c: Include stddef.h, i386-low.h.
2975 (arch_process_info): New struct.
2976 (arch_lwp_info): New struct.
2977 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2978 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2979 (i386_dr_low_get_status): New function.
2980 (x86_insert_point, x86_remove_point): New functions.
2981 (x86_stopped_by_watchpoint): New function.
2982 (x86_stopped_data_address): New function.
2983 (x86_linux_new_process, x86_linux_new_thread): New functions.
2984 (x86_linux_prepare_to_resume): New function.
2985 (the_low_target): Add entries for insert_point, remove_point,
2986 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2988 * server.c (debug_hw_points): New global.
2989 (monitor_show_help): Document set debug-hw-points.
2990 (handle_query): Process "set debug-hw-points".
2991 * server.h (debug_hw_points): Declare.
2992 (paddress): Declare.
2993 * utils.c (NUMCELLS, CELLSIZE): New macros.
2994 (get_sell, xsnprintf, paddress): New functions.
2995 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2996 remove_point, stopped_by_watchpoint, stopped_data_address.
2997 * win32-i386-low.c: Include i386-low.h.
2998 (debug_reg_state): Replaces dr.
2999 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3000 (i386_dr_low_get_status): New function.
3001 (i386_insert_point, i386_remove_point): New functions.
3002 (i386_stopped_by_watchpoint): New function.
3003 (i386_stopped_data_address): New function.
3004 (i386_initial_stuff): Update.
3005 (get_thread_context,set_thread_context,i386_thread_added): Update.
3006 (the_low_target): Add entries for insert_point,
3007 remove_point, stopped_by_watchpoint, stopped_data_address.
3008 * win32-low.c (win32_insert_watchpoint): New function.
3009 (win32_remove_watchpoint): New function.
3010 (win32_stopped_by_watchpoint): New function.
3011 (win32_stopped_data_address): New function.
3012 (win32_target_ops): Add entries for insert_watchpoint,
3013 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3014 * win32-low.h (win32_target_ops): New members insert_point,
3015 remove_point, stopped_by_watchpoint, stopped_data_address.
3017 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3019 * server.c (process_serial_event): Re-return unsupported, not
3020 error, if the type isn't recognized. Re-allow supporting only
3021 insert or remove packets. Also call require_running for
3022 breakpoints. Add missing break statement to default case. Tidy.
3023 * target.h (struct target_ops): Rename insert_watchpoint to
3024 insert_point, and remove_watchpoint to remove_point.
3026 * linux-low.h (struct linux_target_ops): Likewise.
3027 * linux-low.c (linux_insert_watchpoint): Rename to ...
3028 (linux_insert_point): ... this. Adjust.
3029 (linux_remove_watchpoint): Rename to ...
3030 (linux_remove_point): ... this. Adjust.
3031 (linux_target_ops): Adjust.
3032 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3033 (cris_insert_point): ... this.
3034 (cris_remove_watchpoint): Rename to ...
3035 (cris_remove_point): ... this.
3036 (the_low_target): Adjust.
3038 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3040 * server.c (handle_v_kill): Pass signal_pid to
3041 kill_inferior if multi_process is zero.
3043 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3045 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3046 * target.h (target_ops): Comment for *_watchpoint to make it clear
3047 the functions can get types '0' and '1'.
3049 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3051 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3052 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3053 * regcache.c (get_regcache): Likewise.
3054 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3055 * win32-low.c (child_fetch_inferior_registers): Remove check for
3058 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3059 Pedro Alves <pedro@codesourcery.com>
3061 * target.h (struct target_ops) <supports_multi_process>: New
3063 (target_supports_multi_process): New.
3064 * server.c (handle_query): Even if GDB reports support, only
3065 enable multi-process if the target also supports it. Report
3066 multi-process support only if the target backend supports it.
3067 * linux-low.c (linux_supports_multi_process): New function.
3068 (linux_target_ops): Install it as target_supports_multi_process
3071 2009-05-24 Doug Evans <dje@google.com>
3073 Global renaming of find_thread_pid to find_thread_ptid.
3074 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3075 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3076 All callers updated.
3078 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3079 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3082 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3083 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3084 (linux_resume_one_lwp): Ditto.
3086 2009-05-23 Doug Evans <dje@google.com>
3088 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3089 from struct inferior_list_entry * to struct lwp_info *.
3090 All callers updated.
3092 2009-05-13 Doug Evans <dje@google.com>
3094 * linux-x86-low.c: Don't include assert.h.
3095 (x86_siginfo_fixup): Use fatal, not assert.
3096 (x86_arch_setup): Fix comment.
3098 2009-05-12 Doug Evans <dje@google.com>
3100 Biarch support for i386/amd64 gdbserver.
3101 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3102 Add linux-x86-low.c.
3103 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3104 (linux-x86-low.o): Add.
3105 * linux-x86-64-low.c: Delete.
3106 * linux-i386-low.c: Delete.
3107 * linux-x86-low.c: New file.
3108 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3110 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3112 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3113 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3114 (linux_child_pid_to_exec_file): New function.
3115 (elf_64_header_p, elf_64_file_p): New functions.
3116 (siginfo_fixup): New function.
3117 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3118 give target a chance to convert layout.
3119 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3120 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3122 2009-05-07 Doug Evans <dje@google.com>
3124 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3125 (regsets_store_inferior_registers): Ditto.
3127 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3131 * linux-low.c (must_set_ptrace_flags): Delete.
3132 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3134 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3135 `lwp->must_set_ptrace_flags' instead.
3136 (linux_wait_for_event_1): Set ptrace options here.
3137 (linux_wait_1): ... not here.
3139 2009-04-30 Doug Evans <dje@google.com>
3141 * inferiors.c (started_inferior_callback): New function.
3142 (attached_inferior_callback): New function.
3143 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3144 * server.c (print_started_pid, print_attached_pid): New functions.
3145 (detach_or_kill_for_exit): New function.
3146 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3147 * server.h (have_started_inferiors_p): Declare.
3148 (have_attached_inferiors_p): Declare.
3150 * inferiors.c (remove_process): Fix memory leak, free process.
3151 * linux-low.c (linux_remove_process): New function.
3152 (linux_kill): Call it instead of remove_process.
3153 (linux_detach, linux_wait_1): Ditto.
3155 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3157 * configure.srv: Add x86 Windows CE target.
3159 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3161 * inferiors.c (get_thread_process): Make global.
3162 * server.h (get_thread_process): Add prototype.
3163 * thread-db.c (find_one_thread): Use get_thread_process
3164 instead of current_process.
3165 (thread_db_get_tls_address): Do not crash if called when
3166 thread layer is not yet initialized.
3168 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3170 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3171 * spu-low.c (current_tid): Rename to ...
3172 (current_ptid): ... this.
3173 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3174 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3175 ptid_get_lwp (current_ptid) instead of current_tid.
3176 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3177 instead of current_tid. Use find_process_pid to verify pid
3178 argument is valid. Pass proper argument to remove_process.
3179 (spu_thread_alive): Compare current_ptid instead of current_tid.
3180 (spu_resume): Likewise.
3182 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3184 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3187 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3189 Implement the multiprocess extensions, and add linux multiprocess
3192 * server.h (ULONGEST): Declare.
3193 (struct ptid, ptid_t): New.
3194 (minus_one_ptid, null_ptid): Declare.
3195 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3196 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3197 (struct inferior_list_entry): Change `id' type from unsigned from
3199 (struct sym_cache, struct breakpoint, struct
3200 process_info_private): Forward declare.
3201 (struct process_info): Declare.
3202 (current_process): Declare.
3203 (all_processes): Declare.
3204 (initialize_inferiors): Declare.
3205 (add_thread): Adjust to use ptid_t.
3206 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3207 (add_process, remove_process, find_thread_pid): Declare.
3208 (find_inferior_id): Adjust to use ptid_t.
3209 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3210 (multi_process): Declare.
3211 (push_event): Adjust to use ptid_t.
3212 (read_ptid, write_ptid): Declare.
3213 (prepare_resume_reply): Adjust to use ptid_t.
3214 (clear_symbol_cache): Declare.
3215 * inferiors.c (all_processes): New.
3216 (null_ptid, minus_one_ptid): New.
3217 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3218 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3219 (add_thread): Change unsigned long to ptid. Remove gdb_id
3221 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3222 (gdb_id_to_thread): Rename to ...
3223 (find_thread_pid): ... this. Change unsigned long to ptid.
3224 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3225 (loaded_dll, pull_pid_from_list): Adjust.
3226 (add_process, remove_process, find_process_pid)
3227 (get_thread_process, current_process, initialize_inferiors): New.
3228 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3229 (struct target_waitstatus) <related_pid>: Ditto.
3230 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3232 (struct target_ops) <join>: Add `pid' argument.
3233 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3234 (struct target_ops) <wait>: Add `ptid' field. Change return type
3236 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3237 (mywait): Add `ptid' argument. Change return type to ptid_t.
3238 (target_pid_to_str): Declare.
3239 * target.c (set_desired_inferior): Adjust to use ptids.
3240 (mywait): Add new `ptid' argument. Adjust.
3241 (target_pid_to_str): New.
3242 * mem-break.h (free_all_breakpoints): Declare.
3243 * mem-break.c (breakpoints): Delelete.
3244 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3245 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3246 to use per-process breakpoint list.
3247 (free_all_breakpoints): New.
3248 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3249 (symbol_cache, all_symbols_looked_up): Delete.
3251 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3253 (prepare_resume_reply): Change ptid argument's type from unsigned
3254 long to ptid_t. Adjust. Implement W;process and X;process.
3255 (free_sym_cache, clear_symbol_cache): New.
3256 (look_up_one_symbol): Adjust to per-process symbol cache. *
3257 * server.c (cont_thread, general_thread, step_thread): Change type
3260 (multi_process): New.
3261 (last_ptid): Change type to ptid_t.
3262 (struct vstop_notif) <ptid>: Change type to ptid_t.
3263 (queue_stop_reply, push_event): Change `ptid' argument's type to
3265 (discard_queued_stop_replies): Add `pid' argument.
3266 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3267 changes. Don't reference the `attached' global.
3268 (attach_inferior): Adjust to mywait interface changes.
3269 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3270 features. Handle and report "multiprocess+". Handle
3272 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3274 (handle_v_kill): New.
3275 (handle_v_stopped): Adjust to use target_pid_to_str.
3276 (handle_v_requests): Allow multiple attaches and runs when
3277 multiprocess extensions are in effect. Handle "vKill".
3278 (myresume): Adjust to use ptids.
3279 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3280 (handle_status): Adjust to discard_queued_stop_replies interface
3282 (first_thread_of, kill_inferior_callback)
3283 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3284 (main): Call initialize_inferiors. Adjust to use ptids, killing
3285 and detaching from all inferiors. Handle multiprocess packet
3287 * linux-low.h: Include gdb_proc_service.h.
3288 (struct process_info_private): New.
3289 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3290 <lwpid_of>: Use ptid_get_lwp.
3291 (get_lwp_thread): Adjust.
3292 (struct lwp_info): Add `dead' member.
3293 (find_lwp_pid): Declare.
3294 * linux-low.c (thread_db_active): Delete.
3295 (new_inferior): Adjust comment.
3296 (inferior_pid): Delete.
3297 (linux_add_process): New.
3298 (handle_extended_wait): Adjust.
3299 (add_lwp): Change unsigned long to ptid.
3300 (linux_create_inferior): Add process to processes table. Adjust
3301 to use ptids. Don't set new_inferior here.
3302 (linux_attach_lwp): Rename to ...
3303 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3304 it. Adjust to use ptids.
3305 (linux_attach_lwp): New.
3306 (linux_attach): Add process to processes table. Don't set
3308 (struct counter): New.
3309 (second_thread_of_pid_p, last_thread_of_process_p): New.
3310 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3312 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3313 processes. Remove process from process table.
3314 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3315 to multiple processes.
3316 (any_thread_of): New.
3317 (linux_detach): Add `pid' argument, and handle it. Remove process
3318 from processes table.
3319 (linux_join): Add `pid' argument. Handle it.
3320 (linux_thread_alive): Change unsighed long argument to ptid_t.
3321 Consider dead lwps as not being alive.
3322 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3323 threads we're not interested in.
3324 (same_lwp, find_lwp_pid): New.
3325 (linux_wait_for_lwp): Change `pid' argument's type from int to
3327 (linux_wait_for_event): Rename to ...
3328 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3329 from int to ptid_t. Adjust.
3330 (linux_wait_for_event): New.
3331 (linux_wait_1): Add `ptid' argument. Change return type to
3332 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3333 that exit from the process table.
3334 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3336 (mark_lwp_dead): New.
3337 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3338 stopping all threads, mark its main lwp as dead.
3339 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3341 (fetch_register, usr_store_inferior_registers)
3342 (regsets_fetch_inferior_registers)
3343 (regsets_store_inferior_registers, linux_read_memory)
3344 (linux_write_memory): Inline `inferior_pid'.
3345 (linux_look_up_symbols): Adjust to use per-process
3347 (linux_request_interrupt): Adjust to use ptids.
3348 (linux_read_auxv): Inline `inferior_pid'.
3349 (initialize_low): Don't reference thread_db_active.
3350 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3351 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3352 (ps_getpid): Return the pid of the current inferior.
3353 * thread-db.c (proc_handle, thread_agent): Delete.
3354 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3356 (find_one_thread): Change argument type to ptid_t. Adjust to
3358 (maybe_attach_thread): Adjust to per-process data and ptids.
3359 (thread_db_find_new_threads): Ditto.
3360 (thread_db_init): Ditto.
3361 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3362 processes table. Adjust to use ptids.
3363 (spu_kill, spu_detach): Adjust interface. Remove process from
3365 (spu_join, spu_thread_alive): Adjust interface.
3366 (spu_wait): Adjust interface. Remove process from processes
3367 table. Adjust to use ptids.
3368 * win32-low.c (current_inferior_tid): Delete.
3369 (current_inferior_ptid): New.
3370 (debug_event_ptid): New.
3371 (thread_rec): Take a ptid. Adjust.
3372 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3373 (child_delete_thread): Ditto.
3374 (do_initial_child_stuff): Add `attached' argument. Add process to
3376 (child_fetch_inferior_registers, child_store_inferior_registers):
3378 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3379 (win32_attach): Pass 1 to do_initial_child_stuff.
3380 (win32_kill): Adjust interface. Remove process from processes
3382 (win32_detach): Ditto.
3383 (win32_join): Adjust interface.
3384 (win32_thread_alive): Take a ptid.
3385 (win32_resume): Adjust to use ptids.
3386 (get_child_debug_event): Ditto.
3387 (win32_wait): Adjust interface. Remove exiting process from
3390 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3392 Non-stop mode support.
3394 * server.h (non_stop): Declare.
3395 (gdb_client_data, handler_func): Declare.
3396 (delete_file_handler, add_file_handler, start_event_loop):
3398 (handle_serial_event, handle_target_event, push_event)
3399 (putpkt_notif): Declare.
3400 * target.h (enum resume_kind): New.
3401 (struct thread_resume): Replace `step' field by `kind' field.
3402 (TARGET_WNOHANG): Define.
3403 (struct target_ops) <wait>: Add `options' argument.
3404 <supports_non_stop, async, start_non_stop>: New fields.
3405 (target_supports_non_stop, target_async): New.
3406 (start_non_stop): Declare.
3407 (mywait): Add `options' argument.
3408 * target.c (mywait): Add `options' argument. Print child exit
3410 (start_non_stop): New.
3411 * server.c (non_stop, own_buf, mem_buf): New globals.
3412 (struct vstop_notif): New.
3413 (notif_queue): New global.
3414 (queue_stop_reply, push_event, discard_queued_stop_replies)
3415 (send_next_stop_reply): New.
3416 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3418 (attach_inferior): In non-stop mode, don't wait for the target
3420 (handle_general_set): Handle QNonStop.
3421 (handle_query): When handling qC, return the current general
3422 thread, instead of the first thread of the list.
3423 (handle_query): If the backend supports non-stop mode, include
3424 QNonStop+ in the qSupported query response.
3425 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3427 (handle_v_attach, handle_v_run): Handle non-stop mode.
3428 (handle_v_stopped): New.
3429 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3430 (myresume): Adjust to use resume_kind. Handle non-stop.
3431 (queue_stop_reply_callback): New.
3432 (handle_status): Handle non-stop mode.
3433 (main): Clear non_stop flag on reconnection. Use the event-loop.
3434 Refactor serial protocol handling from here ...
3435 (process_serial_event): ... to this new function. When GDB
3436 selects any thread, select one here. In non-stop mode, wait until
3437 GDB acks all pending events before exiting.
3438 (handle_serial_event, handle_target_event): New.
3439 * remote-utils.c (remote_open): Install remote_desc in the event
3441 (remote_close): Remove remote_desc from the event loop.
3442 (putpkt_binary): Rename to...
3443 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3444 (putpkt_binary): New as wrapper around putpkt_binary_1.
3445 (putpkt_notif): New.
3446 (prepare_resume_reply): In non-stop mode, don't change the
3448 * event-loop.c: New.
3449 * Makefile.in (OBJ): Add event-loop.o.
3450 (event-loop.o): New rule.
3452 * linux-low.h (pid_of): Moved here.
3454 (get_lwp_thread): Use lwpid_of.
3455 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3456 * linux-low.c (pid_of): Delete.
3457 (inferior_pid): Use lwpid_of.
3458 (linux_event_pipe): New.
3459 (target_is_async_p): New.
3461 (handle_extended_wait): Use lwpid_of.
3462 (add_lwp): Don't set lwpid field.
3463 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3464 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3465 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3466 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3467 first. Adjust to linux_wait_for_event interface changes. Use
3469 (linux_detach): Don't delete the main lwp here.
3470 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3471 (status_pending_p): Don't consider explicitly suspended lwps.
3472 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3473 pointer. Add OPTIONS argument. Change return type to int. Use
3474 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3475 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3476 pointer. Add status pointer argument. Return a pid instead of a
3477 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3478 changes. In non-stop mode, don't switch to a random thread.
3479 (linux_wait): Rename to...
3480 (linux_wait_1): ... this. Add target_options argument, and handle
3481 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3482 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3483 clean exit and signal exit code. Don't stop all threads in
3484 non-stop mode. In all-stop mode, only stop all threads when
3485 reporting a stop to GDB. Handle explicit thread stop requests.
3486 (async_file_flush, async_file_mark): New.
3488 (send_sigstop): Use lwpid_of.
3489 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3490 interface changes. In non-stop mode, don't switch to a random
3492 (linux_resume_one_lwp): Use lwpid_of.
3493 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3494 (linux_resume_one_thread): ... this. Handle resume_stop. In
3495 non-stop mode, don't look for pending flag in all threads.
3496 (resume_status_pending_p): Don't consider explicitly suspended
3498 (my_waitpid): Reimplement. Emulate __WALL.
3499 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3501 (sigchld_handler, linux_supports_non_stop, linux_async)
3502 (linux_start_non_stop): New.
3503 (linux_target_ops): Register linux_supports_non_stop, linux_async
3504 and linux_start_non_stop.
3505 (initialize_low): Install SIGCHLD handler.
3506 * thread-db.c (thread_db_create_event, find_one_thread)
3507 (thread_db_get_tls_address): Use lwpid_of.
3508 * win32-low.c (win32_detach): Adjust to use resume_kind.
3509 (win32_wait): Add `options' argument.
3510 * spu-low.c (spu_resume): Adjust to use resume_kind.
3511 (spu_wait): Add `options' argument.
3513 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3515 Decouple target code from remote protocol.
3517 * target.h (enum target_waitkind): New.
3518 (struct target_waitstatus): New.
3519 (struct target_ops) <wait>: Return an unsigned long. Take a
3520 target_waitstatus pointer instead of a char pointer.
3522 * target.c (mywait): Change prototype to return an unsigned long.
3523 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3524 * server.h (thread_from_wait, old_thread_from_wait): Delete
3526 (prepare_resume_reply): Change prototype to take a
3528 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3529 (last_status, last_ptid): New.
3530 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3531 pid instead of a signal.
3532 (attach_inferior): Remove "status" and "signal" parameters.
3534 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3536 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3537 (handle_v_requests, myresume): Remove "status" and "signal"
3539 (handle_status): New.
3540 (main): Delete local `status'. Adjust.
3541 * remote-utils.c: Include target.h.
3542 (prepare_resume_reply): Change prototype to take a
3543 target_waitstatus. Adjust.
3545 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3547 * spu-low.c (spu_wait): Adjust.
3548 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3550 (win32_wait): Adjust.
3552 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3554 * target.h (struct thread_resume): Delete leave_stopped member.
3555 (struct target_ops): Add a `n' argument to the `resume' callback.
3556 * server.c (start_inferior): Adjust.
3557 (handle_v_cont, myresume): Adjust.
3558 * linux-low.c (check_removed_breakpoint): Adjust to resume
3559 interface change, and to removed leave_stopped field.
3560 (resume_ptr): Delete.
3561 (struct thread_resume_array): New.
3562 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3563 resume interface change.
3564 (linux_continue_one_thread, linux_queue_one_thread)
3565 (resume_status_pending_p): Check if the resume field is NULL
3566 instead of checking the leave_stopped member.
3567 (linux_resume): Adjust to the target resume interface change.
3568 * spu-low.c (spu_resume): Adjust to the target resume interface
3570 * win32-low.c (win32_detach, win32_resume): Ditto.
3572 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3574 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3576 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3578 (linux_continue_one_thread): Only preserve the stepping flag if
3579 there's a pending breakpoint.
3581 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3583 * server.c (main): After the inferior having exited, call
3584 remote_close before exiting gdbserver.
3586 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3588 Fix size of FPSCR in Power 7 processors.
3589 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3590 (PPC_FEATURE_HAS_DFP): New #define.
3591 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3594 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3596 * server.c (handle_query) Whitespace and formatting.
3598 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3600 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3601 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3602 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3603 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3604 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3605 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3606 Makefile.in, configure.ac: Fix whitespace throughout.
3607 * configure: Regenerate.
3609 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3611 * inferiors.c (find_inferior): Make it safe for the callback
3612 function to delete the currently iterated inferior.
3614 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3616 * Makefile.in (linuw_low_h): Move higher.
3617 (thread-db.o): Depend on $(linux_low_h).
3619 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3621 Rename "process" to "lwp" throughout.
3623 * linux-low.c (all_processes): Rename to...
3624 (all_lwps): ... this.
3625 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3626 (add_process): Rename to ...
3627 (add_lwp): ... this. Adjust.
3628 (linux_create_inferior): Adjust.
3629 (linux_attach_lwp): Adjust.
3630 (linux_attach): Adjust.
3631 (linux_kill_one_process): Rename to ...
3632 (linux_kill_one_lwp): ... this. Adjust.
3633 (linux_kill): Adjust.
3634 (linux_detach_one_process): Rename to ...
3635 (linux_detach_one_lwp): ... this. Adjust.
3636 (linux_detach): Adjust.
3637 (check_removed_breakpoint): Adjust.
3638 (status_pending_p): Adjust.
3639 (linux_wait_for_process): Rename to ...
3640 (linux_wait_for_lwp): ... this. Adjust.
3641 (linux_wait_for_event): Adjust.
3642 (send_sigstop): Adjust.
3643 (wait_for_sigstop): Adjust.
3644 (stop_all_processes): Rename to ...
3645 (stop_all_lwps): ... this.
3646 (linux_resume_one_process): Rename to ...
3647 (linux_resume_one_lwp): ... this. Adjust.
3648 (linux_set_resume_request, linux_continue_one_thread)
3649 (linux_queue_one_thread, resume_status_pending_p)
3650 (usr_store_inferior_registers, regsets_store_inferior_registers)
3651 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3653 * linux-low.h (get_process): Rename to ...
3654 (get_lwp): ... this. Adjust.
3655 (get_thread_process): Rename to ...
3656 (get_thread_lwp): ... this. Adjust.
3657 (get_process_thread): Rename to ...
3658 (get_lwp_thread): ... this. Adjust.
3659 (struct process_info): Rename to ...
3660 (struct lwp_info): ... this.
3661 (all_processes): Rename to ...
3662 (all_lwps): ... this.
3663 * proc-service.c (ps_lgetregs): Adjust.
3664 * thread-db.c (thread_db_create_event, find_one_thread)
3665 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3667 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3669 * server.c (handle_query): Handle "qAttached".
3671 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3673 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3674 GPLv3, update license URL.
3676 2009-03-01 Doug Evans <dje@google.com>
3678 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3679 (server_h): Add gdb_signals.h.
3680 (signals.o): Update.
3681 * server.h (target_signal_from_host,target_signal_to_host_p)
3682 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3684 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3686 * remote-utils.c (getpkt): Also generate remote-debug
3687 information if noack_mode is set.
3689 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3691 * server.c (handle_query): Report qXfer:siginfo:read and
3692 qXfer:siginfo:write as supported and handle them.
3693 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3694 * linux-low.c (linux_xfer_siginfo): New.
3695 (linux_target_ops): Set it.
3697 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3699 * server.c (gdbserver_usage): Mention --remote-debug.
3700 (main): Accept '--remote-debug' switch.
3702 2009-01-18 Doug Evans <dje@google.com>
3704 * regcache.c (new_register_cache): No need to check result of xcalloc.
3705 * server.c (handle_search_memory): Back out calls to xmalloc,
3706 result is checked and error is returned to user upon failure.
3707 (handle_query): Ditto. Add more checks for result of malloc.
3708 (handle_v_cont): Check result of malloc, report error back to
3710 (handle_v_run): Ditto. Call freeargv.
3711 * server.h (freeargv): Declare.
3712 * utils.c (freeargv): New fn.
3714 2009-01-15 Doug Evans <dje@google.com>
3716 * gdbreplay.c (perror_with_name): Make arg const char *.
3717 * server.h (target_signal_to_name): Make return type const char *.
3718 * thread-db.c (thread_db_err_str): Make return type const char *.
3719 * utils.c (perror_with_name): Make arg const char *.
3721 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3723 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3724 when handling a EXIT_PROCESS_DEBUG_EVENT.
3726 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3728 * gdbreplay.c (gdbreplay_version): Update copyright year.
3729 * server.c (gdbserver_version): Likewise.
3731 2009-01-05 Doug Evans <dje@google.com>
3733 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3734 (handle_extended_wait): Improve comment.
3736 2008-12-13 Doug Evans <dje@google.com>
3738 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3739 * server.h (ATTR_MALLOC): New macro.
3740 (xmalloc,xcalloc,xstrdup): Declare.
3741 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3742 * inferiors.c: Ditto.
3743 * linux-low.c: Ditto.
3744 * mem-break.c: Ditto.
3745 * regcache.c: Ditto.
3746 * remote-utils.c: Ditto.
3749 * win32-low.c: Ditto.
3751 2008-12-12 Doug Evans <dje@google.com>
3753 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3754 in debugging printf.
3756 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3758 2008-12-09 Doug Evans <dje@google.com>
3760 * linux-low.h (struct process_info): Delete member tid, unused.
3761 * thread-db.c (find_one_thread): Update.
3762 (maybe_attach_thread): Update.
3764 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3766 * target.h (struct target_ops): Add qxfer_osdata member.
3767 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3769 (linux_qxfer_osdata): New functions.
3770 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3772 * server.c (handle_query): Handle "qXfer:osdata:read:".
3773 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3774 (buffer_xml_printf): New functions.
3775 * server.h (struct buffer): New.
3776 (buffer_grow_str, buffer_grow_str0): New macros.
3777 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3778 (buffer_xml_printf): Declare.
3780 2008-11-24 Doug Evans <dje@google.com>
3782 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3784 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3786 * server.c (handle_v_run): Always use the supplied argument list.
3788 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3790 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3791 (xtensa_regmap_table): Add entry for scompare1.
3793 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3795 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3796 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3797 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3798 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3799 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3800 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3801 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3802 XML target descriptions.
3803 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3804 when inferior is running on an ISA 2.05 or later processor. Add
3805 special case to return offset for full 64-bit slot of FPSCR when
3808 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3810 * Makefile.in (SFILES, clean): Added sparc64 files.
3811 (reg-sparc64.o, reg-sparc64.c): New.
3812 * configure.srv (sparc*-*-linux*): New configuration.
3813 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3814 syscall arguments for SPARC.
3815 (regsets_store_inferior_registers): Likewise.
3816 * linux-sparc-low.c: New file.
3818 2008-10-21 Doug Evans <dje@google.com>
3820 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3821 (READLINE_DIR,READLINE_DEP): Delete.
3822 (INTERNAL_CFLAGS): Update.
3823 (LINTFLAGS): Update.
3825 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3827 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3828 whole argv from the last run, not just argv[0].
3830 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3832 * regcache.c (new_register_cache): Return NULL if the register
3833 cache size isn't known yet.
3834 (free_register_cache): Avoid dereferencing a NULL regcache.
3836 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3838 * configure.srv: Merge MIPS and MIPS64.
3840 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3842 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3844 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3846 * Makefile.in: Add required vsx dependencies.
3848 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3849 Declare init_registers_powerpc_vsx32l.
3850 Declare init_registers_powerpc_vsx64l.
3851 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3852 (ppc_arch_setup): Check for VSX in hwcap.
3853 (ppc_fill_vsxregset): New function.
3854 (ppc_store_vsxregset): New function.
3855 Add new VSX entry in regset_info target_regsets.
3857 * configure.srv: Add new VSX dependencies.
3859 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3861 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3862 (remote_open): Set or clear transport_is_reliable.
3863 (putpkt_binary): Don't expect acks in noack mode.
3864 (getpkt): Don't send ack/nac in noack mode.
3865 * server.c (handle_general_set): Handle QStartNoAckMode.
3866 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3868 (main): Reset noack_mode on every connection.
3869 * server.h (noack_mode): Declare.
3871 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3873 * Makefile.in (GDBREPLAY_OBS): New variable.
3874 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3876 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3877 Daniel Jacobowitz <dan@codesourcery.com>
3879 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3880 (usr_store_inferior_registers): Likewise.
3881 (regsets_store_inferior_registers): Likewise.
3883 2008-07-31 Rolf Jansen <rj@surtec.com>
3884 Pedro Alves <pedro@codesourcery.com>
3886 * configure.ac: Check for memmem declaration.
3887 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3888 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3889 (disable_packet_qfThreadInfo): Unconditionally compile.
3890 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3891 * configure, config.in: Regenerate.
3893 2008-07-28 Doug Kwan <dougkwan@google.com>
3895 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3896 (linux_write_memory): Remove declaration of errno.
3898 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3900 * linux-low.c (handle_extended_wait): Do not use "status"
3901 variable uninitialized.
3903 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3905 * server.c (handle_v_attach): Inhibit reporting dll changes.
3907 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3909 * remote-utils.c (prepare_resume_reply): If requested, don't
3910 output "thread:TID" in the T stop reply.
3912 * server.c (disable_packet_vCont, disable_packet_Tthread)
3913 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3914 (handle_query): If requested, disable support for qC, qfThreadInfo
3916 (handle_v_requests): If requested, disable support for vCont.
3917 (gdbserver_show_disableable): New.
3918 (main): Handle --disable-packet and --disable-packet=LIST.
3920 * server.h (disable_packet_vCont, disable_packet_Tthread)
3921 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3923 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3925 * server.c (gdbserver_usage): Mention --version.
3927 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3929 * Makefile.in (gdbreplay.o): New rule.
3931 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3933 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3934 message, not gdbserver.
3936 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3937 Nathan Sidwell <nathan@codesourcery.com>
3938 Joseph Myers <joseph@codesourcery.com>
3940 * acinclude.m4: Include ../../config/acx.m4.
3941 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3942 * configure, config.in: Regenerate.
3943 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3944 * server.c (gdbserver_version): Print PKGVERSION.
3945 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3946 (main): Adjust gdbserver_usage calls.
3947 * gdbreplay.c (version, host_name): Add declarations.
3948 (gdbreplay_version, gdbreplay_usage): New.
3949 (main): Accept --version and --help options.
3951 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3953 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3954 (arm_breakpoint_at): Handle Thumb.
3955 (the_low_target): Add comment.
3957 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3959 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3961 2008-05-09 Doug Evans <dje@google.com>
3963 * server.h (decode_search_memory_packet): Declare.
3964 * remote-utils.c (decode_search_memory_packet): New fn.
3965 * server.c (handle_search_memory_1): New fn.
3966 (handle_search_memory): New fn.
3967 (handle_query): Process qSearch:memory packets.
3969 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3971 * regcache.c (registers_length): Remove.
3972 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3973 full register packet.
3974 * regcache.h (registers_length): Remove prototype.
3975 * server.h (PBUFSIZ): Define to 16384.
3977 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3979 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3980 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3981 powerpc-64l.o, and powerpc-altivec64l.o.
3982 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3983 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3984 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3985 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3986 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3989 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3990 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3991 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3992 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3993 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3994 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3995 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3996 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3997 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3998 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4001 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4002 (init_registers_powerpc_32l): ... this new prototype.
4003 (init_registers_powerpc_32): Remove, replace by ...
4004 (init_registers_powerpc_altivec32l): ... this new prototype.
4005 (init_registers_powerpc_e500): Remove, replace by ...
4006 (init_registers_powerpc_e500l): ... this new prototype.
4007 (init_registers_ppc64): Remove, replace by ...
4008 (init_registers_powerpc_64l): ... this new prototype.
4009 (init_registers_powerpc_64): Remove, replace by ...
4010 (init_registers_powerpc_altivec64l): ... this new prototype.
4011 (ppc_num_regs): Set to 73.
4012 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4013 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4014 (ppc_cannot_store_register): Handle orig_r3 and trap.
4015 (ppc_arch_setup): Update init_registers_... calls.
4016 (ppc_fill_gregset): Handle orig_r3 and trap.
4018 * inferiors.c (clear_inferiors): Reset current_inferior.
4020 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4022 * acinclude.m4: Add override.m4.
4023 * configure: Regenerate.
4025 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4027 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4028 initial call to init_register_ppc64.
4030 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4032 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4033 powerpc*-*-linux* case.
4034 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4036 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4038 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4039 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4041 * linux-ppc-low.c: Include <elf.h>.
4042 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4043 (ppc_hwcap): New global variable.
4044 (ppc_regmap): Remove __SPE__ #ifdef sections.
4045 (ppc_regmap_e500): New global variable.
4046 (ppc_cannot_store_register): Update __SPE__ special case.
4047 (ppc_get_hwcap): New function.
4048 (ppc_arch_setup): Use it to determine whether inferior supports
4049 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4050 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4051 Do not access registers if target does not support AltiVec.
4052 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4053 Do not access registers if target does not support SPE.
4054 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4056 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4058 * linux-low.c (disabled_regsets, num_regsets): New.
4059 (use_regsets_p): Delete.
4060 (linux_wait_for_process): Clear disabled_regsets.
4061 (regsets_fetch_inferior_registers): Check and set it.
4062 (regsets_store_inferior_registers): Likewise.
4063 (linux_fetch_registers, linux_store_registers): Do not use
4065 (initialize_low): Allocate disabled_regsets.
4067 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4069 * Makefile.in (LIBOBJS): New.
4071 (memmem.o): New rule.
4072 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4073 * configure: Regenerated.
4075 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4077 * server.c (handle_query): Never return "unsupported" for
4078 qXfer:features:read queries.
4080 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4082 * server.c (get_features_xml): Fix inverted condition.
4083 (handle_query): Always support qXfer:feature:read.
4085 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4087 * server.c (wrapper_argv): New.
4088 (start_inferior): Handle wrapper_argv. If set, expect an extra
4090 (gdbserver_usage): Document --wrapper.
4091 (main): Parse --wrapper.
4093 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4095 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4096 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4097 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4098 (ppc_set_pc): Likewise.
4099 (ppc_arch_setup): New function.
4100 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4101 of collect_register.
4102 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4104 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4106 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4107 instead of linux-ppc64-low.o.
4108 * linux-ppc64-low.c: Remove file.
4109 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4110 (linux-ppc64-low.o): Remove rule.
4112 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4113 (init_registers_powerpc_64): Likewise.
4114 (ppc_regmap): Conditionally define depending on __powerpc64__.
4115 (ppc_cannot_store_register): Do not special-case "fpscr" when
4116 compiled on __powerpc64__.
4117 (ppc_collect_ptrace_register): New function.
4118 (ppc_supply_ptrace_register): New function.
4119 (ppc_breakpoint): Change type to "unsigned int".
4120 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4121 (the_low_target): Conditionally provide initializers for the
4122 arch_setup member depending on __powerpc64__. Install
4123 collect_ptrace_register and supply_ptrace_register members.
4125 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4127 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4128 * server.c (gdbserver_xmltarget): Define.
4129 (get_features_xml): Use it to replace "target.xml" and arch_string.
4131 * configure.srv: Remove srv_xmltarget. Add XML files that were
4132 mentioned there to srv_xmlfiles instead. Remove conditional tests
4133 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4134 srv_xmlfiles and srv_regobj to include all possible choices.
4135 * configure.ac (srv_xmltarget): Remove.
4136 (srv_xmlfiles): Do not add "target.xml".
4137 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4138 checks for supplementary target information.
4139 * configure: Regenerate.
4140 * Makefile.in (XML_TARGET): Remove.
4141 (target.xml): Remove rule.
4142 (clean): Do not clean up target.xml.
4143 (.PRECIOUS): Do not mention target.xml.
4145 * target.h (struct target_ops): Remove arch_string member.
4146 * linux-low.c (linux_arch_string): Remove.
4147 (linux_target_ops): Remove arch_string initializer.
4148 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4149 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4150 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4151 * spu-low.c (spu_arch_string): Remove.
4152 (spu_target_ops): Remove arch_string initializer.
4153 * win32-low.c (win32_arch_string): Remove.
4154 (win32_target_ops): Remove arch_string initializer.
4155 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4156 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4157 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4159 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4161 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4162 by collect_ptrace_register and supply_ptrace_register hooks.
4163 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4164 instead of checking for the_low_target.left_pad_xfer.
4165 (usr_store_inferior_registers): Use collect_ptrace_register callback
4166 instead of checking for the_low_target.left_pad_xfer.
4168 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4169 (s390_supply_ptrace_register): Likewise.
4170 (s390_fill_gregset): Call s390_collect_ptrace_register.
4171 (the_low_target): Update.
4173 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4174 (ppc_supply_ptrace_register): Likewise.
4175 (the_low_target): Update.
4177 * linux-i386-low.c (the_low_target): Update.
4178 * linux-x86-64-low.c (the_low_target): Update.
4180 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4182 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4183 reg-s390.o and reg-s390x.o.
4185 * linux-low.c (new_inferior): New global variable.
4186 (linux_create_inferior, linux_attach): Set it.
4187 (linux_wait_for_process): Call the_low_target.arch_setup after the
4188 target has stopped for the first time.
4189 (initialize_low): Do not call the_low_target.arch_setup.
4191 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4192 (s390_set_pc): Likewise.
4193 (s390_arch_setup): New function.
4194 (the_low_target): Use s390_arch_setup as arch_setup routine.
4196 * regcache.c (realloc_register_cache): New function.
4197 (set_register_cache): Call it for each existing regcache.
4199 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4201 * server.h (init_registers): Remove prototype.
4203 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4204 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4205 instead of init_registers ().
4206 * linux-arm-low.c (init_registers_arm): Add prototype.
4207 (init_registers_arm_with_iwmmxt): Likewise.
4208 (the_low_target): Add initializer for arch_setup field.
4209 * linux-cris-low.c (init_registers_cris): Add prototype.
4210 (the_low_target): Add initializer for arch_setup field.
4211 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4212 (the_low_target): Add initializer for arch_setup field.
4213 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4214 (the_low_target): Add initializer for arch_setup field.
4215 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4216 (the_low_target): Add initializer for arch_setup field.
4217 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4218 (the_low_target): Add initializer for arch_setup field.
4219 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4220 (the_low_target): Add initializer for arch_setup field.
4221 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4222 (init_registers_mips64_linux): Likewise.
4223 (the_low_target): Add initializer for arch_setup field.
4224 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4225 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4226 (the_low_target): Add initializer for arch_setup field.
4227 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4228 (init_registers_powerpc_64): Likewise.
4229 (the_low_target): Add initializer for arch_setup field.
4230 * linux-s390-low.c (init_registers_s390): Add prototype.
4231 (init_registers_s390x): Likewise.
4232 (the_low_target): Add initializer for arch_setup field.
4233 * linux-sh-low.c (init_registers_sh): Add prototype.
4234 (the_low_target): Add initializer for arch_setup field.
4235 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4236 (the_low_target): Add initializer for arch_setup field.
4237 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4238 (the_low_target): Add initializer for arch_setup field.
4240 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4241 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4242 instead of init_registers ().
4243 * win32-arm-low.c (init_registers_arm): Add prototype.
4244 (the_low_target): Add initializer for arch_setup field.
4245 * win32-i386-low.c (init_registers_i386): Add prototype.
4246 (the_low_target): Add initializer for arch_setup field.
4248 * spu-low.c (init_registers_spu): Add prototype.
4249 (initialize_low): Call initialie_registers_spu () instead of
4250 initialize_registers ().
4252 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4254 * server.c (handle_v_requests): When handling the vRun and vAttach
4255 packets, if already debugging a process, don't kill it. Return an
4258 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4260 * server.c (handle_query): Correct length check.
4262 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4264 * win32-low.c (do_initial_child_stuff): Add process handle
4265 parameter. Set current_process_handle and current_process_id from the
4266 parameters. Clear globals.
4267 (win32_create_inferior): Don't set current_process_handle and
4268 current_process_id here. Instead pass them on the call to
4269 do_initial_child_stuff.
4270 (win32_attach): Likewise.
4271 (win32_clear_inferiors): New.
4272 (win32_kill): Don't close the current process handle or the
4273 current thread handle here. Instead call win32_clear_inferiors.
4274 (win32_detach): Don't open a new handle to the process. Call
4275 win32_clear_inferiors.
4276 (win32_join): Don't rely on current_process_handle; open a new
4277 handle using the process id.
4278 (win32_wait): Call win32_clear_inferiors when the inferior process
4281 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4283 * server.c (monitor_show_help): Add "exit".
4285 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4287 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4288 (clean): Add reg-xtensa.c.
4289 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4290 * configure.srv (xtensa*-*-linux*) New target.
4291 * linux-xtensa-low.c: New.
4292 * xtensa-xtregs.c: New.
4294 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4296 * hostio.c: Don't include errno.h.
4297 (errno_to_fileio_errno): Move to hostio-errno.
4298 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4299 error number outputting to the target->hostio_last_error callback.
4300 (hostio_packet_error): Use FILEIO_EINVAL directly.
4301 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4302 calls to hostio_error.
4303 * hostio-errno.c: New.
4304 * server.h (hostio_last_error_from_errno): Declare.
4305 * target.h (target_ops): Add hostio_last_error member.
4306 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4307 as hostio_last_error handler.
4308 * spu-low.c (spu_target_ops): Likewise.
4309 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4310 (wince_hostio_last_error): New functions.
4311 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4312 as hostio_last_error handler.
4313 (win32_target_ops) [!_WIN32_WCE]: Register
4314 hostio_last_error_from_errno as hostio_last_error handler.
4315 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4316 (hostio-errno.o): New rule.
4317 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4318 * configure.srv (srv_hostio_err_objs): New variable. Default to
4320 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4321 * configure: Regenerate.
4323 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4325 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4326 (linux_kill, linux_detach): Clean up the process list.
4327 * remote-utils.c (remote_open): Improve port number parsing.
4328 (putpkt_binary, input_interrupt): Only send interrupts if the target
4330 * server.c (extended_protocol): Make static.
4331 (attached): Define earlier.
4332 (exit_requested, response_needed, program_argv): New variables.
4333 (target_running): New.
4334 (start_inferior): Clear attached here.
4335 (attach_inferior): Set attached here.
4336 (require_running): Define.
4337 (handle_query): Use require_running and target_running. Implement
4339 (handle_v_attach, handle_v_run): New.
4340 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4341 (gdbserver_usage): Update.
4342 (main): Redo argument parsing. Handle --debug and --multi. Handle
4343 --attach along with other options or after the port. Save
4344 program_argv. Support no initial program. Resynchronize
4345 communication with GDB after an error. Handle "monitor exit".
4346 Use require_running and target_running. Always allow the extended
4347 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4348 restart in extended mode.
4349 * README: Refer to the GDB manual. Update --attach usage.
4351 2007-12-20 Andreas Schwab <schwab@suse.de>
4353 * linux-low.c (STACK_SIZE): Define.
4354 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4355 (linux_test_for_tracefork): Likewise.
4357 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4359 * linux-low.c (linux_wait_for_event): Update messages. Do not
4360 reinsert auto-delete breakpoints.
4361 * mem-break.c (struct breakpoint): Change return type of handler to
4363 (set_breakpoint_at): Update handler type.
4364 (reinsert_breakpoint_handler): Return 1 instead of calling
4366 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4368 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4369 * mem-break.h (set_breakpoint_at): Update handler type.
4370 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4371 * win32-low.c (auto_delete_breakpoint): New.
4372 (get_child_debug_event): Use it.
4374 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4376 * configure.ac: Check for pread and pwrite.
4377 * hostio.c (handle_pread): Fall back to lseek and read.
4378 (handle_pwrite): Fall back to lseek and write.
4379 * config.in, configure: Regenerated.
4381 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4383 * server.c (myresume): Add own_buf argument.
4384 (main): Update calls.
4386 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4388 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4389 * remote-utils.c (remote_open): Do not call disable_async_io.
4390 (block_async_io): Delete.
4391 (unblock_async_io): Make static.
4392 (initialize_async_io): New.
4393 * server.c (handle_v_cont): Handle async I/O here.
4394 (myresume): Likewise. Move other common resume tasks here...
4395 (main): ... from here. Call initialize_async_io. Disable async
4396 I/O before the main loop.
4397 * server.h (initialize_async_io): Declare.
4398 (block_async_io, unblock_async_io): Delete prototypes.
4399 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4401 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4403 * remote-utils.c (readchar): Allow binary data in received messages.
4405 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4407 * win32-low.c (attaching): New global.
4408 (win32_create_inferior): Clear the `attaching' global.
4409 (win32_attach): Set the `attaching' global.
4410 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4411 attaching. Only set a breakpoint at the entry point if not
4414 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4416 * server.c (main): Don't report dll events on the initial
4417 connection on attaches.
4419 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4421 * server.c (main): Relax numerical bases supported for the pid of
4422 the --attach command line argument.
4424 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4426 * win32-low.c (win32_attach): Call OpenProcess before
4427 DebugActiveProcess, not after. Add last error output to error
4430 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4432 * win32-low.c (win32_get_thread_context)
4433 (win32_set_thread_context): New functions.
4434 (thread_rec): Use win32_get_thread_context.
4435 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4436 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4439 2007-12-03 Leo Zayas
4440 Pedro Alves <pedro_alves@portugalmail.pt>
4442 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4444 (child_add_thread): Minor cleanup.
4445 (child_continue): Resume artificially suspended threads before
4446 calling ContinueDebugEvent.
4447 (suspend_one_thread): New.
4448 (fake_breakpoint_event): New.
4449 (get_child_debug_event): Change return type to int. Check here if
4450 gdb sent an interrupt request. If a soft interrupt was requested,
4451 fake a breakpoint event. Return 0 if there is no event to handle,
4453 (win32_wait): Don't check here if gdb sent an interrupt request.
4454 Ensure there is a valid event to handle.
4455 (win32_request_interrupt): Add soft interruption method as last
4458 2007-12-03 Leo Zayas
4459 Pedro Alves <pedro_alves@portugalmail.pt>
4461 * win32-low.h (win32_thread_info): Add descriptions to the
4462 structure members. Replace `suspend_count' counter by a
4464 * win32-low.c (thread_rec): Update condition of when to get the
4465 context from the inferior. Rely on ContextFlags being set if it
4466 has already been retrieved. Only suspend the inferior thread if
4467 we haven't already. Warn if that fails.
4468 (continue_one_thread): s/suspend_count/suspended/. Only call
4469 ResumeThread once. Warn if that fails.
4471 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4473 * win32-low.c (win32_wait): Don't read from the inferior when it
4476 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4478 * Makefile.in (win32_low_h): New variable.
4479 (win32-low.o): Add dependency on $(win32_low_h).
4480 (win32-arm-low.o, win32-i386-low.o): New rules.
4482 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4484 * hostio.c: Correct copyright year.
4486 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4488 * Makefile.in (OBS): Add hostio.o.
4489 (hostio.o): New rule.
4490 * server.h (handle_vFile): Declare.
4491 * hostio.c: New file.
4492 * server.c (handle_v_requests): Take packet_len and new_packet_len
4493 for binary packets. Call handle_vFile.
4494 (main): Update call to handle_v_requests.
4496 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4498 * linux-low.c: Include <sched.h>.
4500 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4502 * linux-low.c (linux_tracefork_grandchild): New.
4503 (linux_tracefork_child): Use clone.
4504 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4506 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4508 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4510 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4512 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4514 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4516 * inferiors.c (change_inferior_id): Delete.
4517 (add_pid_to_list, pull_pid_from_list): New.
4518 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4519 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4520 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4521 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4522 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4523 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4524 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4525 (using_threads): Always set to 1.
4526 (handle_extended_wait): New.
4527 (add_process): Do not set TID.
4528 (linux_create_inferior): Set must_set_ptrace_flags.
4529 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4530 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4531 (linux_thread_alive): Rename TID argument to LWPID.
4532 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4533 (linux_wait_for_event): Do not use TID or check using_threads. Update
4534 call to dead_thread_notify. Call handle_extended_wait.
4535 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4536 (send_sigstop): Delete sigstop_sent.
4537 (wait_for_sigstop): Avoid TID.
4538 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4539 (linux_test_for_tracefork): New.
4540 (linux_lookup_signals): Use thread_db_active and
4541 linux_supports_tracefork_flag.
4542 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4543 * linux-low.h (get_process_thread): Avoid TID.
4544 (struct process_ifo): Move thread_known and tid to the end. Remove
4546 (linux_attach_lwp, thread_db_init): Update prototypes.
4547 * server.h (change_inferior_id): Delete prototype.
4548 (add_pid_to_list, pull_pid_from_list): New prototypes.
4549 * thread-db.c (thread_db_use_events): New.
4550 (find_first_thread): Rename to...
4551 (find_one_thread): ...this. Update callers and messages. Do not
4552 call fatal. Check thread_db_use_events. Do not call
4553 change_inferior_id or new_thread_notify.
4554 (maybe_attach_thread): Update. Do not call new_thread_notify.
4555 (thread_db_init): Set thread_db_use_events. Check use_events.
4556 * utils.c (fatal, warning): Correct message prefix.
4558 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4560 * Makefile.in (clean): Remove new files.
4561 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4562 (powerpc-64.o, powerpc-64.c): New rules.
4563 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4564 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4566 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4568 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4569 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4570 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4571 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4572 (target_regsets): Add AltiVec and SPE register sets.
4573 * configure.ac: Check for AltiVec and SPE.
4574 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4575 (ppc_fill_vrregset, ppc_store_vrregset): New.
4576 (target_regsets): Add AltiVec register set.
4577 * configure: Regenerated.
4579 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4581 * linux-low.c (O_LARGEFILE): Define.
4582 (linux_read_memory): Use /proc/PID/mem.
4583 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4584 * configure, config.in: Regenerated.
4586 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4588 * linux-low.c (linux_wait_for_event): Do not pass signals while
4591 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4593 * win32-low.c (create_process): New.
4594 (win32_create_inferior): Use create_process instead of
4595 CreateProcess. If create_process failed retry appending an ".exe"
4596 suffix. Store the GetLastError result immediatelly after
4597 create_process calls and use it on the call to error.
4599 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4601 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4603 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4605 * configure.ac: Switch license to GPLv3.
4607 2007-08-01 Michael Snyder <msnyder@access-company.com>
4609 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4611 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4613 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4615 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4616 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4617 CloseToolhelp32Snapshot.
4618 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4619 CloseToolhelp32Snapshot.
4621 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4623 * server.c (main): Check for inferior exit before main loop.
4625 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4627 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4628 instead of on tmp_desc.
4630 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4631 Daniel Jacobowitz <dan@codesourcery.com>
4633 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4634 (add_thread): Minor cleanups.
4635 (clear_inferiors): Move lower in the file. Clear the DLL
4637 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4638 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4639 (xml_escape_text): New.
4640 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4642 (handle_v_cont): Report errors.
4643 (gdbserver_version): Update.
4644 (main): Correct size of own_buf. Do not report initial DLL events.
4645 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4646 (unloaded_dll, xml_escape_text): New.
4647 * win32-low.c (enum target_waitkind): Update comments.
4648 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4649 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4650 (win32_EnumProcessModules, win32_GetModuleInformation)
4651 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4652 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4653 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4654 (win32_Module32First, win32_Module32Next, load_toolhelp)
4655 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4656 (get_child_debug_event): Handle DLL events.
4657 (win32_wait): Likewise.
4659 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4661 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4662 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4664 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4666 * win32-low.c (handle_output_debug_string): Ignore event if not
4669 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4671 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4673 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4675 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4677 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4679 * inferiors.c (change_inferior_id): Add comment.
4680 * linux-low.c (check_removed_breakpoint): Add an early
4681 prototype. Improve debug output.
4682 (linux_attach): Doc update.
4683 (linux_detach_one_process, linux_detach): Clean up before releasing
4685 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4686 * linux-low.h (struct process_info): Doc improvement.
4687 * mem-break.c (delete_all_breakpoints): New.
4688 * mem-break.h (delete_all_breakpoints): New prototype.
4689 * thread-db.c (find_first_thread): New.
4690 (thread_db_create_event): Call it instead of
4691 thread_db_find_new_threads. Clean up unused variables.
4692 (maybe_attach_thread): Remove first thread handling.
4693 (thread_db_find_new_threads): Use find_first_thread.
4694 (thread_db_get_tls_address): Likewise.
4696 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4698 * thread-db.c (thread_db_find_new_threads): Add prototype.
4699 (thread_db_create_event): Check for the main thread before adding
4701 (maybe_attach_thread): Only enable event reporting if TID == 0.
4702 (thread_db_get_tls_address): Check for new threads.
4704 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4706 * linux-low.c (linux_create_inferior): Try execv before execvp.
4707 * spu-low.c (spu_create_inferior): Likewise.
4709 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4711 * linux-low.c (linux_create_inferior): Change execv to execvp.
4712 * spu-low.c (spu_create_inferior): Likewies.
4714 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4716 * Makefile.in (clean): Clean new files instead of deleted ones.
4717 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4718 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4720 * configure.srv: Specify XML files and new regformats for MIPS and
4722 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4723 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4724 an entry for the restart register.
4725 (mips_cannot_fetch_register, mips_cannot_store_register)
4726 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4727 register names to match the XML descriptions.
4728 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4729 restart register instead of $0.
4731 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4732 Markus Deuling <deuling@de.ibm.com>
4734 * remote-utils.c (decode_xfer_write): New function.
4735 * server.h (decode_xfer_write): Add prototype.
4736 * server.c (handle_query): Add PACKET_LEN argument. Support
4737 qXfer:spu:read and qXfer:spu:write packets.
4738 (main): Pass packet_len to handle_query.
4739 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4740 * target.h (target_ops): Add qxfer_spu.
4742 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4744 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4745 accessing non-seekable spufs files.
4747 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4749 * server.c (handle_query): Add reply for qC packet.
4751 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4752 Leo Zayas <lerele@champenstudios@com>
4754 * server.h (check_remote_input_interrupt_request): New function.
4755 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4756 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4757 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4758 (check_remote_input_interrupt_request): New function.
4759 * server.h (check_remote_input_interrupt_request): Declare.
4760 * win32-low.c (winapi_DebugBreakProcess,
4761 winapi_GenerateConsoleCtrlEvent): New typedefs.
4762 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4764 (win32_wait): Check for remote interrupt request
4765 with check_remote_input_interrupt_request.
4766 (win32_request_interrupt): New function.
4767 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4769 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4771 * win32-low.c (debug_registers_changed,
4772 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4773 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4774 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4775 (thread_rec): Get context using the low target.
4776 (child_add_thread): Call thread_added on the low target,
4777 which does the same thing.
4779 (do_initial_child_stuff): Remove debug registers references.
4780 Set context using the low target. Resume threads after
4781 setting the contexts.
4782 (child_continue): Remove dead variable. Remove debug
4783 registers references.
4784 (child_fetch_inferior_registers): Go through the low target.
4785 (do_child_store_inferior_registers): Remove.
4786 (child_store_inferior_registers): Go through the low target.
4787 (win32_resume): Remove debug registers references.
4788 Set context using the low target.
4789 (handle_exception): Change return type to void. Don't record
4790 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4791 first chance exception.
4792 (get_child_debug_event): Change return type to void. Remove
4793 goto loop. Always return after waiting for debug event.
4794 (win32_wait): Convert to switch statement. Handle spurious
4797 * win32-i386-low.c (debug_registers_changed,
4798 debug_registers_used): New.
4799 (initial_stuff): Rename to ...
4800 (i386_initial_stuff): ... this. Clear debug registers
4802 (store_debug_registers): Delete.
4803 (i386_get_thread_context): New.
4804 (load_debug_registers): Delete.
4805 (i386_set_thread_context): New.
4806 (i386_thread_added): New.
4807 (single_step): Rename to ...
4808 (i386_single_step): ... this.
4809 (do_fetch_inferior_registers): Rename to ...
4810 (i386_fetch_inferior_register): ... this.
4811 (i386_store_inferior_register): New.
4812 (the_low_target): Adapt to new interface.
4814 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4815 (arm_get_thread_context): New.
4816 (arm_set_thread_context): New.
4818 (do_fetch_inferior_registers): Rename to ...
4819 (arm_fetch_inferior_register): ... this.
4820 (arm_store_inferior_register): New.
4821 (arm_wince_breakpoint): Reimplement as unsigned long.
4822 (arm_wince_breakpoint_len): Define.
4823 (the_low_target): Adapt to new interface.
4825 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4826 load_debug_registers. Add get_thread_context, set_thread_context,
4827 thread_added and store_inferior_register. Rename
4828 fetch_inferior_registers to fetch_inferior_register.
4829 (regptr): Remove declaration.
4831 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4833 * linux-low.c (linux_detach): Change return type to int. Return 0.
4834 * spu-low.c (spu_detach): Likewise.
4836 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4838 * target.h (target_ops): Change return type of detach to int.
4840 (join_inferior): New.
4841 * server.c (main): Don't skip detach support on mingw32.
4842 If the inferior doesn't support detaching return error.
4843 Call join_inferior instead of using waitpid.
4844 * linux-low.c (linux_join): New.
4845 (linux_target_op): Add linux_join.
4846 * spu-low.c (spu_join): New.
4847 (spu_target_ops): Add spu_join.
4848 * win32-low.c (win32_detach): Adapt to new interface.
4849 Reopen current_process_handle before detaching. Issue a child
4850 resume before detaching.
4852 (win32_target_op): Add win32_join.
4854 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4856 * win32-low.c (win32-attach): Fix return value.
4857 * target.h (target_ops): Describe ATTACH return values.
4859 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4861 * win32-low.c (GETPROCADDRESS): Define.
4862 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4863 (winapi_DebugSetProcessKillOnExit): Likewise.
4864 (win32_create_inferior): Force usage of ansi CreateProcessA.
4865 (win32_attach): Use GETPROCADDRESS.
4866 (win32_detach): Likewise.
4868 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4870 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4872 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4874 * win32-low.c: Commit leftover changes from 2007-03-29.
4876 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4878 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4879 fields short instead of int. Add explicit padding.
4880 (i387_cache_to_fsave): Remove unnecessary casts.
4881 (i387_fsave_to_cache): Doc fix.
4882 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4884 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4886 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4887 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4889 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4891 * configure.srv (arm*-*-mingw32ce*): Move near the other
4894 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4896 * configure.ac: Add errno checking.
4897 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4898 sys/file.h and malloc.h.
4899 (AC_CHECK_DECLS): Add perror.
4900 (srv_mingwce): Handle.
4901 * configure.srv (i[34567]86-*-cygwin*): Add
4902 win32-i386-low.o to srv_tgtobj.
4903 (i[34567]86-*-mingw*): Likewise.
4904 (arm*-*-mingw32ce*): Add case.
4905 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4906 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4907 [__MINGW32CE__] (strerror): New function.
4908 [__MINGW32CE__] (errno): Define to GetLastError.
4909 [__MINGW32CE__] (COUNTOF): New macro.
4910 (remote_open): Remove extra close call.
4911 * mem-break.c (delete_breakpoint_at): New function.
4912 * mem-break.h (delete_breakpoint_at): Declare.
4913 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4914 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4915 [USE_WIN32API] (read, write): Add char* casts.
4916 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4917 * server.h: Include wincecompat.h on Windows CE.
4918 [HAVE_ERRNO_H]: Check.
4919 (perror): Declare if not declared.
4920 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4921 (perror_with_name): Remove errno declaration.
4922 * wincecompat.h: New.
4923 * wincecompat.c: New.
4925 * win32-arm-low.c: New.
4926 * win32-i386-low.c: New.
4927 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4928 (OUTMSG2): Make it safe.
4930 (COUNTOF): New macro.
4931 (NUM_REGS): Get it from the low target.
4932 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4933 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4934 (thread_rec): Let low target handle debug registers.
4935 (child_add_thread): Likewise.
4936 (child_init_thread_list): Likewise.
4937 (continue_one_thread): Likewise.
4939 (do_child_fetch_inferior_registers): Move to ...
4940 * win32-i386-low.c: ... here, and rename to ...
4941 (do_fetch_inferior_registers): ... this.
4942 * win32-low.c (child_fetch_inferior_registers):
4943 Go through the low target.
4944 (do_child_store_inferior_registers): Use regptr.
4945 (strwinerror): New function.
4946 (win32_create_inferior): Handle Windows CE.
4947 Use strwinerror instead of strerror on Windows error
4948 codes. Add program to the error output.
4949 Don't close the main thread handle on Windows CE.
4950 (win32_attach): Use coredll.dll on Windows CE.
4951 (win32_kill): Close current process and current
4953 (win32_detach): Use coredll.dll on Windows CE.
4954 (win32_resume): Let low target handle debug registers, and
4956 (handle_exception): Add/Remove initial breakpoint. Avoid
4957 non-existant WSTOPSIG on Windows CE.
4958 (win32_read_inferior_memory): Cast to remove warning.
4959 (win32_arch_string): Go through the low target.
4960 (initialize_low): Call set_breakpoint_data with the low
4961 target's breakpoint.
4962 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4963 FOP_REGNUM, mappings): Move to ...
4964 * win32-i386-low.c: ... here.
4965 * win32-low.c (win32_thread_info): Move to ...
4966 * win32-low.h: ... here.
4967 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4968 win32-arm-low.c and wincecompat.c.
4969 (all:): Add $EXEEXT.
4970 (install-only:): Likewise.
4971 (gdbserver:): Likewise.
4972 (gdbreplay:): Likewise.
4973 * config.in: Regenerate.
4974 * configure: Regenerate.
4976 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4978 * win32-low.c: Rename typedef thread_info to
4979 win32_thread_info throughout.
4981 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4983 * win32-i386-low.c: Rename to ...
4984 * win32-low.c: ... this.
4985 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4986 * Makefile.in: Likewise.
4988 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4990 * remote-utils.c (monitor_output): Constify msg parameter.
4991 * server.h (monitor_output): Likewise.
4992 * win32-i386-low.c (handle_output_debug_string): New.
4993 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4994 handle_output_debug_string.
4995 (get_child_debug_event): Likewise.
4997 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4999 * server.c (main): Correct strtoul check.
5001 2007-03-27 Jon Ringle <jon@ringle.org>
5003 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5005 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5007 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5009 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5011 * terminal.h: Check HAVE_SGTTY_H.
5013 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5015 * remote-utils.c (remote_open): Print out the assigned port number.
5017 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5019 * remote-utils.c (monitor_output): New function.
5020 * server.c (debug_threads): Define here.
5021 (monitor_show_help): New function.
5022 (handle_query): Handle qRcmd.
5023 (main): Do not handle 'd' packet.
5024 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5025 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5028 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5030 * Makefile.in (EXEEXT): New.
5031 (clean): Use $(EXEEXT).
5033 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5035 * target.h (target_ops): Rename send_signal to request_interrupt,
5036 and remove enum target_signal parameter.
5037 * linux-low.c (linux_request_interrupt): Rename from
5038 linux_send_signal, and always send SIGINT.
5039 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5040 and always send SIGINT.
5041 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5043 (input_interrupt): Likewise.
5045 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5047 * server.c (get_features_xml): Check if target implemented
5049 * win32-i386-low.c (win32_arch_string): New.
5050 (win32_target_ops): Add win32_arch_string as arch_string member.
5052 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5054 * spu-low.c (spu_arch_string): New.
5055 (spu_target_ops): Add spu_arch_string.
5057 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5059 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5060 * configure.ac: Do not check for terminal.h.
5061 * configure, config.in: Regenerated.
5063 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5065 * Makefile.in (OBS): Add $(XML_BUILTIN).
5066 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5068 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5069 (arm-with-iwmmxt.c): New.
5070 * config.in, configure: Regenerate.
5071 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5072 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5073 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5074 (arm*-*-linux*): Add iWMMXt and regset support.
5075 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5076 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5077 (arm_store_wmmxregset, target_regsets): New.
5078 * server.c (get_features_xml): Take annex argument. Check builtin
5080 (handle_query): Handle multiple annexes.
5082 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5084 * remote-utils.c [USE_WIN32API] (read, write): Define.
5085 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5088 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5090 * linux-i386-low.c (the_low_target): Set arch_string.
5091 * linux-x86-64-low.c (the_low_target): Likewise.
5092 * linux-low.c (linux_arch_string): New.
5093 (linux_target_ops): Add it.
5094 * linux-low.h (struct linux_target_ops): Add arch_string.
5095 * server.c (write_qxfer_response): Use const void * for DATA.
5096 (get_features_xml): New.
5097 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5098 * target.h (struct target_ops): Add arch_string method.
5100 2007-01-03 Denis Pilat <denis.pilat@st.com>
5101 Daniel Jacobowitz <dan@codesourcery.com>
5103 * linux-low.c (linux_kill): Handle being called with no threads.
5104 * win32-i386-low.c (win32_kill): Likewise.
5105 (get_child_debug_event): Clear current_process_handle.
5107 2006-12-30 Denis PILAT <denis.pilat@st.com>
5108 Daniel Jacobowitz <dan@codesourcery.com>
5110 * remote-utils.c (remote_open): Check the type of specified
5111 serial port devices before opening them.
5112 * server.c (main): Kill the inferior if an error occurs during
5113 the first remote_open.
5115 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5117 * README: Update supported targets.
5119 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5121 * Makefile.in (clean): Remove reg-mips64.c.
5122 (reg-mips64.c, reg-mips64.o): New rules.
5123 * configure.srv: Handle mips64. Include regset support for mips.
5124 * linux-mips-low.c (union mips_register): New.
5125 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5126 (mips_breakpoint, mips_breakpoint_at): Use int.
5127 (mips_collect_register, mips_supply_register)
5128 (mips_collect_register_32bit, mips_supply_register_32bit)
5129 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5130 (mips_store_fpregset, target_regsets): New.
5131 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5133 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5135 * configure.srv: Add target "spu*-*-*".
5136 * Makefile.in (clean): Remove reg-spu.c.
5137 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5138 * spu-low.c: New file.
5140 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5142 * configure.ac: Correct td_thr_tls_get_addr test.
5143 * configure: Regenerated.
5145 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5147 * linux-low.c (linux_wait_for_event): Reformat. Use the
5149 * remote-utils.c (decode_address_to_semicolon): New.
5150 * server.c (pass_signals, handle_general_set): New.
5151 (handle_query): Mention QPassSignals for qSupported.
5152 (main): Call handle_general_set.
5153 * server.h (pass_signals, decode_address_to_semicolon): New.
5155 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5157 * server.c (handle_query): Correct error handling for read_auxv.
5159 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5161 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5162 and srv_linux_thread_db to yes.
5163 * linux-s390-low.c (s390_fill_gregset): New function.
5164 (target_regsets): Define data structure.
5166 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5168 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5169 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5170 * config.in, configure: Regenerated.
5171 * inferiors.c (gdb_id_to_thread): New function.
5172 (gdb_id_to_thread_id): Use it.
5173 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5174 * linux-low.h (struct process_info): Add th member.
5175 (thread_db_get_tls_address): New prototype.
5176 * remote-utils.c (decode_address): Make non-static.
5177 * server.c (handle_query): Handle qGetTLSAddr.
5178 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5179 * target.h (struct target_ops): Add get_tls_address.
5180 * thread-db.c (maybe_attach_thread): Save the thread handle.
5181 (thread_db_get_tls_address): New.
5183 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5185 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5186 (linux_resume_one_process): Take a siginfo_t *. Update all
5187 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5188 (struct pending_signals): Add a siginfo_t.
5189 (linux_wait_for_process): Always set last_status.
5190 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5191 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5192 * linux-low.h (struct process_info): Add last_status.
5194 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5196 * remote-utils.c (try_rle): New function.
5197 (putpkt_binary): Use it.
5199 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5201 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5202 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5203 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5204 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5205 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5208 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5210 * server.c (terminal_fd): New variable.
5211 (old_foreground_pgrp): Likewise.
5212 (restore_old_foreground_pgrp): New function.
5213 (start_inferior): Record the terminal file descriptor in terminal_fd
5214 and its original foreground group in old_foreground_pgrp. Register
5215 restore_old_foreground_pgrp with atexit().
5217 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5219 * server.c (handle_query): Correct qPart to qXfer.
5221 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5223 * configure.ac: Check for more headers which are missing on
5224 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5225 * configure.srv: Add Cygwin and mingw32.
5226 * remote-utils.c: Don't include headers unconditionally which
5227 are missing on mingw32. Include <winsock.h> for mingw32.
5228 (remote_open): Adjust for mingw32 support. Flush
5229 standard error after writing to it.
5230 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5231 (unblock_async_io, enable_async_io, disable_async_io)
5232 (readchar, getpkt): Update for Winsock support.
5233 (prepare_resume_reply): Expect a protocol signal number.
5234 * server.c: Disable <sys/wait.h> on mingw32.
5235 (start_inferior): Adjust for mingw32 support. Flush
5236 standard error after writing to it.
5237 (attach_inferior): Likewise. Use protocol signal
5239 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5241 * win32-i386-low.c: New file.
5242 * Makefile.in (XM_CLIBS): Set.
5243 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5244 (win32-i386-low.o): New dependency rule.
5245 * linux-low.c (linux_wait): Use target signal numbers.
5246 * target.h (struct target_ops): Doc fix.
5247 * server.h (target_signal_to_name): New prototype.
5248 * gdbreplay.c: Don't include headers unconditionally which
5249 are missing on mingw32. Include <winsock.h> for mingw32.
5250 (remote_close, remote_open): Adjust for Winsock support.
5251 * configure, config.in: Regenerated.
5253 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5255 * server.c (decode_xfer_read, write_qxfer_response): New.
5256 (handle_query): Take a packet length argument. Handle
5257 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5258 the qSupported response.
5259 (main): Update call to handle_query.
5261 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5263 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5264 (putpkt_binary): Renamed from putpkt and adjusted for binary
5266 (putpkt): New wrapper for putpkt_binary.
5267 (readchar): Don't mask off the high bit.
5268 (decode_X_packet): New function.
5269 * server.c (main): Call putpkt_binary if a handler sets the packet
5270 length. Save the length of the incoming packet. Handle 'X'.
5271 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5273 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5275 * server.c (handle_query): Handle qSupported.
5277 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5279 * remote-utils.c (all_symbols_looked_up): New variable.
5280 (look_up_one_symbol): Check it.
5281 * server.h (look_up_one_symbol): New declaration.
5282 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5284 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5286 * Makefile.in (linux-arm-low.o): Update dependencies.
5287 * linux-arm-low.c: Include "gdb_proc_service.h".
5288 (PTRACE_GET_THREAD_AREA): Define.
5289 (ps_get_thread_area): New function.
5291 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5293 * configure.srv (m68k*-*-uclinux*): New target.
5294 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5295 (linux_resume_one_process): Remove extraneous cast.
5296 (linux_read_offsets): New.
5297 (linux_target_op): Add linux_read_offsets on mmuless systems.
5298 * server.c (handle_query): Add qOffsets logic.
5299 * target.h (struct target_ops): Add read_offsets.
5301 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5303 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5304 (PTRACE_GET_THREAD_AREA): Define.
5305 (ps_get_thread_area): New function.
5306 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5307 (linux-x86-64-low.o): Update.
5309 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5311 * configure.ac: Remove checks for prfpregset_t.
5312 * gdb_proc_service.h: New file.
5313 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5314 new "gdb_proc_service.h".
5315 * proc-service.c: Likewise.
5316 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5317 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5318 * Makefile.in (gdb_proc_service_h): Updated.
5319 * configure, config.in: Regenerated.
5321 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5323 * remote-utils.c (prepare_resume_reply): Move declaration
5324 of gdb_id_from_wait to the top of the block.
5326 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5328 * linux-low.c (regsets_store_inferior_registers): Read the regset
5329 from the target before filling it.
5331 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5333 * server.c (attach_inferior): Return SIGTRAP for a successful
5336 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5338 * Makefile.in (OBS): Add version.o.
5339 (STAGESTUFF): Delete.
5340 (version.o): Add dependencies.
5341 (version.c): Replace rule.
5342 (clean): Remove version.c.
5343 * server.c (gdbserver_version): New.
5344 (gdbserver_usage): Use printf.
5345 (main): Handle --version and --help.
5346 * server.h (version, host_name): Add declarations.
5348 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5360 * linux-x86-64-low.c:
5363 * linux-ppc64-low.c:
5372 * linux-crisv32-low.c:
5384 * gdbserver.1: Add (C) after Copyright. Update the FSF
5387 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5389 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5390 (arm_breakpoint_at): Recognize both breakpoints.
5391 (the_low_target): Use the correct breakpoint instruction.
5393 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5395 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5396 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5397 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5398 (the_low_target): Update.
5400 2005-10-25 Andreas Schwab <schwab@suse.de>
5402 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5404 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5405 (ia64_num_regs): Reduce to 462.
5407 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5409 * acinclude.m4: Correct quoting.
5410 * aclocal.m4: Regenerated.
5412 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5413 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5414 (thread_db_init): Call thread_db_err_str.
5415 * configure.ac: Check for TD_VERSION.
5416 * config.in, configure: Regenerated.
5418 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5420 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5422 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5424 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5425 is not available. Define HAVE_PTRACE_GETREGS if it is.
5426 * config.in, configure: Regenerated.
5427 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5428 * linux-i386-low.c, linux-m68k-low.c: Update to use
5429 HAVE_PTRACE_GETREGS.
5430 * linux-low.c (regsets_fetch_inferior_registers)
5431 (regsets_store_inferior_registers): Only return 0 if we processed
5433 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5434 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5436 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5438 * inferiors.c (struct thread_info): Add gdb_id.
5439 (add_thread): Add gdb_id argument.
5440 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5441 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5442 calls to add_thread.
5443 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5444 * server.c (handle_query): Use thread_to_gdb_id.
5445 (handle_v_cont, main): Use gdb_id_to_thread_id.
5446 * server.h (add_thread): Update prototype.
5447 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5450 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5452 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5453 left-padded registers.
5454 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5455 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5457 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5459 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5460 * configure: Regenerate.
5461 * config.in: Regenerate.
5462 * server.h (NEED_DECLARATION_STRERROR):
5463 Replace with !HAVE_DECL_STRERROR.
5465 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5467 * linux-low.c (linux_wait, linux_send_signal): Don't test
5468 an unsigned long variable for > 0 if it could be MAX_ULONG.
5469 * server.c (myresume): Likewise.
5470 * target.c (set_desired_inferior): Likewise.
5472 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5474 * configure.ac: Simplify and improve check for socklen_t.
5475 * configure, config.in: Regenerate.
5477 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5479 * acconfig.h: Remove.
5480 * configure.ac: Add a test for socklen_t. Use three-argument
5481 AC_DEFINE throughout.
5482 * config.in: Regenerated using autoheader 2.59.
5483 * configure: Regenerated.
5485 * gdbreplay.c (socklen_t): Provide a default.
5486 (remote_open): Use socklen_t.
5487 * remote-utils.c (socklen_t): Provide a default.
5488 (remote_open): Use socklen_t.
5489 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5492 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5494 * linux-low.c (linux_read_memory, linux_write_memory)
5495 (linux_read_auxv): Likewise.
5496 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5497 (check_mem_write): Likewise.
5498 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5500 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5501 (registers_from_string, register_data): Likewise.
5502 * server.c (handle_query, main): Likewise.
5503 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5504 (decode_M_packet): Likewise.
5505 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5506 * target.h (struct target_ops): Update read_memory, write_memory,
5508 (read_inferior_memory, write_inferior_memory): Update.
5509 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5511 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5512 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5513 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5514 linux-s390-low.c, linux-sh-low.c: Update for changes in
5515 read_inferior_memory and the_low_target->breakpoint.
5517 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5519 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5520 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5521 * configure.srv: Add powerpc64-*-linux*.
5522 * linux-ppc64-low.c: New file.
5524 2005-05-23 Orjan Friberg <orjanf@axis.com>
5526 * linux-cris-low.c: New file with support for CRIS.
5527 * linux-crisv32-low.c: Ditto for CRISv32.
5528 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5529 (clean): Add reg-cris.c and reg-crisv32.c.
5530 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5531 reg-crisv32.o, and reg-crisv32.c to make rules.
5532 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5535 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5537 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5538 of sizeof (PTRACE_XFER_TYPE).
5539 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5541 2005-05-12 Orjan Friberg <orjanf@axis.com>
5543 * target.h (struct target_ops): Add insert_watchpoint,
5544 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5545 pointers for hardware watchpoint support.
5546 * linux-low.h (struct linux_target_ops): Ditto.
5547 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5548 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5549 to linux_target_ops.
5550 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5552 * server.c (main): Recognize 'Z' and 'z' packets.
5554 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5556 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5557 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5558 (the_low_target): Add new members.
5560 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5562 * proc-service.c (ps_lgetregs): Search all_processes instead of
5565 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5567 * server.c (start_inferior): Change return type to int.
5568 (attach_inferior): Change sigptr to int *.
5569 (handle_v_cont, handle_v_requests): Change signal to int *.
5570 (main): Change signal to int.
5572 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5574 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5575 * configure.srv: Add m32r*-*-linux*.
5576 * linux-m32r-low.c: New file.
5578 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5580 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5582 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5584 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5585 Take unsigned long arguments for PIDs.
5586 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5587 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5588 (wait_for_sigstop, linux_resume_one_process)
5589 (regsets_fetch_inferior_registers, linux_send_signal)
5590 (linux_read_auxv): Likewise. Update the types of variables holding
5591 PIDs. Update format string specifiers.
5592 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5593 * remote-utils.c (prepare_resume_reply): Likewise.
5594 * server.c (cont_thread, general_thread, step_thread)
5595 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5597 (handle_query): Update format specifiers.
5598 (handle_v_cont, main): Use strtoul for thread IDs.
5599 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5600 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5601 (general_thread, step_thread, thread_from_wait)
5602 (old_thread_from_wait): Update.
5603 * target.h (struct thread_resume): Use unsigned long for THREAD.
5604 (struct target_ops): Use unsigned long for arguments to attach and
5607 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5609 * acinclude.m4: Include bfd/bfd.m4 directly.
5610 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5611 <agriffis@toolchain.org>.
5612 * aclocal.m4, configure: Regenerated.
5614 2005-01-07 Andrew Cagney <cagney@gnu.org>
5616 * configure.ac: Rename configure.in, require autoconf 2.59.
5617 * configure: Re-generate.
5619 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5621 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5623 * aclocal.m4: Regenerated.
5624 * configure: Regenerated.
5626 2004-11-21 Andreas Schwab <schwab@suse.de>
5628 * linux-m68k-low.c (m68k_num_gregs): Define.
5629 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5630 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5631 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5632 (m68k_breakpoint_at): New. Add to the_low_target.
5634 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5635 srv_linux_thread_db to yes.
5637 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5639 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5640 (ARCH_SET_FS): Likewise.
5641 (ARCH_GET_FS): Likewise.
5642 (ARCH_GET_GS): Likewise.
5644 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5646 * linux-i386-low.c (ps_get_thread_area): New.
5647 * linux-x86-64-low.c (ps_get_thread_area): New.
5648 * linux-low.c: Include <sys/syscall.h>.
5649 (linux_kill_one_process): Don't kill the first thread here.
5650 (linux_kill): Kill the first thread here.
5651 (kill_lwp): New function.
5652 (send_sigstop, linux_send_signal): Use it.
5653 * proc-service.c: Clean up #ifdefs.
5654 (fpregset_info): Delete.
5655 (ps_lgetregs): Update and enable implementation.
5656 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5658 * remote-utils.c (struct sym_cache, symbol_cache): New.
5659 (input_interrupt): Print a clearer message.
5660 (async_io_enabled): New variable.
5661 (enable_async_io, disable_async_io): Use it. Update comments.
5662 (look_up_one_symbol): Use the symbol cache.
5663 * thread-db.c (thread_db_look_up_symbols): New function.
5664 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5666 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5668 * configure.in: Test for -rdynamic.
5669 * configure: Regenerated.
5670 * Makefile (INTERNAL_LDFLAGS): New.
5671 (gdbserver, gdbreplay): Use it.
5673 2004-09-02 Andrew Cagney <cagney@gnu.org>
5675 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5677 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5679 * linux-low.c (linux_wait): Clear all_processes list also.
5681 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5683 * linux-low.c: Include <errno.h>. Remove extern declaration of
5686 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5688 * gdbreplay.c, server.h, utils.c: Update copyright years.
5690 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5692 * server.c (main): Print child status or termination signal from
5693 variable 'signal', not 'sig'.
5695 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5697 * linux-low.c (linux_read_memory): Change return type to
5698 int. Check for and return error from ptrace().
5699 * target.c (read_inferior_memory): Change return type to int. Pass
5700 back return status from the_target->read_memory().
5701 * target.h (struct target_ops): Adapt *read_memory() prototype.
5703 (read_inferior_memory): Adapt prototype.
5704 * server.c (main): Return an error packet if
5705 read_inferior_memory() returns an error.
5707 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5709 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5710 Unify with other clean targets.
5712 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5714 * server.c (handle_v_cont): Call set_desired_inferior.
5716 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5718 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5720 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5722 * linux-low.c (linux_wait): Unblock async I/O.
5723 (linux_resume): Block and enable async I/O.
5724 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5725 * server.h (block_async_io, unblock_async_io): Add prototypes.
5727 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5729 * remote-utils.c (remote_open): Print a status notice after
5731 * server.c (attach_inferior): Print a status notice after
5734 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5736 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5738 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5740 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5742 * server.c, target.h: Update copyright years.
5744 2004-02-25 Roland McGrath <roland@redhat.com>
5746 * target.h (struct target_ops): New member `read_auxv'.
5747 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5748 * linux-low.c (linux_read_auxv): New function.
5749 (linux_target_ops): Initialize `read_auxv' member to that.
5751 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5753 Committed by Jim Blandy <jimb@redhat.com>.
5755 * linux-s390-low.c (s390_num_regs): Update.
5756 (s390_regmap): Remove control registers. Use __s390x__ predefine
5757 instead of GPR_SIZE to distiguish s390 and s390x targets.
5759 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5761 * linux-low.c: Update copyright year.
5762 (check_removed_breakpoint): Clear pending_is_breakpoint.
5763 (linux_set_resume_request, linux_queue_one_thread)
5764 (resume_status_pending_p): New functions.
5765 (linux_continue_one_thread): Use process->resume.
5766 (linux_resume): Only resume threads if there are no pending events.
5767 * linux-low.h (struct process_info): Add resume request
5770 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5772 * regcache.c (new_register_cache): Clear the allocated register
5773 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5775 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5777 * linux-low.c (linux_resume): Take a struct thread_resume *
5779 (linux_wait): Update call.
5780 (resume_ptr): New static variable.
5781 (linux_continue_one_thread): Renamed from
5782 linux_continue_one_process. Use resume_ptr.
5783 (linux_resume): Use linux_continue_one_thread.
5784 * server.c (handle_v_cont, handle_v_requests): New functions.
5785 (myresume): New function.
5786 (main): Handle 'v' case.
5787 * target.h (struct thread_resume): New type.
5788 (struct target_ops): Change argument of "resume" to struct
5790 (myresume): Delete macro.
5792 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5794 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5795 (uninstall): Support DESTDIR.
5797 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5799 * configure.srv: Add xscale*linux copy of arm*linux entry.
5801 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5803 * linux-arm-low.c (arm_reinsert_addr): New function.
5804 (the_low_target): Add arm_reinsert_addr.
5806 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5808 * mem-break.c: Remove whitespace at end of file.
5810 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5812 * configure.in: Check whether we need to prototype strerror.
5813 * server.h: Optionally prototype strerror.
5814 * gdbreplay.c (perror_with_name): Use strerror.
5815 * linux-low.c (linux_attach_lwp): Use strerror.
5816 * utils.c (perror_with_name): Use strerror.
5817 * config.in, configure: Regenerated.
5819 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5821 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5822 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5824 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5826 * Makefile.in (SFILES): Update.
5827 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5828 low-sun3.c: Remove files.
5830 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5832 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5833 (linux_detach_one_process, linux_detach): New functions.
5834 (linux_target_ops): Add linux_detach.
5835 * server.c (main): Handle 'D' packet.
5836 * target.h (struct target_ops): Add "detach" member.
5837 (detach_inferior): Define.
5839 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5841 From Kelley Cook <kelleycook@wideopenwest.com>:
5842 * configure.srv: Accept i[34567]86 variants.
5844 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5846 * linux-low.c (linux_wait_for_event): Correct comment typos.
5847 (linux_resume_one_process): Call check_removed_breakpoint.
5848 (linux_send_signal): New function.
5849 (linux_target_ops): Add linux_send_signal.
5850 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5852 * target.h (struct target_ops): Add send_signal.
5854 2003-05-29 Jim Blandy <jimb@redhat.com>
5856 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5857 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5858 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5859 away part of the register's value.
5861 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5863 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5864 (linux_wait_for_event, linux_init_signals): Likewise.
5866 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5868 * configure.in: Check for stdlib.h.
5869 * configure: Regenerated.
5870 * config.in: Regenerated.
5872 2003-01-04 Andreas Schwab <schwab@suse.de>
5874 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5876 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5878 * Makefile.in: Remove obsolete code.
5880 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5882 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5883 defined(PT_FPR0_HI).
5885 2002-11-17 Stuart Hughes <seh@zee2.com>
5887 * linux-arm-low.c (arm_num_regs): Increase.
5888 (arm_regmap): Include status register.
5890 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5892 * linux-low.c (register_addr): Remove incorrect -1 check.
5894 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5896 * linux-low.c (linux_create_inferior): Call setpgid. Return
5898 (unstopped_p, linux_signal_pid): Remove.
5899 (linux_target_ops): Remove linux_signal_pid.
5900 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5901 global instead of target method.
5902 * target.h (struct target_ops): Remove signal_pid. Update comment
5903 for create_inferior.
5904 * server.c (signal_pid): New variable.
5905 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5906 gdbserver. Set the child to be the foreground process group.
5907 (attach_inferior): Set signal_pid.
5909 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5911 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5913 2002-08-20 Jim Blandy <jimb@redhat.com>
5915 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5918 2002-08-01 Andrew Cagney <cagney@redhat.com>
5920 * Makefile.in: Make chill references obsolete.
5922 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5924 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5925 * configure: Regenerate.
5926 * config.in: Regenerate.
5928 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5930 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5931 (perror_with_name, remote_close, remote_open, expect, play): Static.
5933 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5935 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5936 byte offsets instead of an array of indexes.
5937 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5939 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5941 * regcache.c: Add comment.
5943 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5945 * thread-db.c: New file.
5946 * proc-service.c: New file.
5947 * acinclude.m4: New file.
5948 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5949 proc-service.o, and thread-db.o.
5950 (linux-low.o): Add USE_THREAD_DB.
5951 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5952 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5953 * aclocal.m4: Regenerated.
5954 * config.in: Regenerated.
5955 * configure: Regenerated.
5956 * configure.in: Check for proc_service.h, sys/procfs.h,
5957 thread_db.h, and linux/elf.h headrs.
5958 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5959 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5960 Check for -lthread_db and thread support.
5961 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5962 PowerPC, and SuperH.
5963 * i387-fp.c: Constify arguments.
5964 * i387-fp.h: Likewise.
5965 * inferiors.c: (struct thread_info): Renamed from
5966 `struct inferior_info'. Remove PID member. Use generic inferior
5967 list header. All uses updated.
5968 (inferiors, signal_pid): Removed.
5969 (all_threads): New variable.
5970 (get_thread): Define.
5971 (add_inferior_to_list): New function.
5972 (for_each_inferior): New function.
5973 (change_inferior_id): New function.
5974 (add_inferior): Removed.
5975 (remove_inferior): New function.
5976 (add_thread): New function.
5977 (free_one_thread): New function.
5978 (remove_thread): New function.
5979 (clear_inferiors): Use for_each_inferior and free_one_thread.
5980 (find_inferior): New function.
5981 (find_inferior_id): New function.
5982 (inferior_target_data): Update argument type.
5983 (set_inferior_target_data): Likewise.
5984 (inferior_regcache_data): Likewise.
5985 (set_inferior_regcache_data): Likewise.
5986 * linux-low.c (linux_bp_reinsert): Remove.
5987 (all_processes, stopping_threads, using_thrads)
5988 (struct pending_signals, debug_threads, pid_of): New.
5989 (inferior_pid): Replace with macro.
5990 (struct inferior_linux_data): Remove.
5991 (get_stop_pc, add_process): New functions.
5992 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5993 Use add_process and add_thread.
5994 (linux_attach_lwp): New function, based on old linux_attach. Use
5995 add_process and add_thread. Set stop_expected for new threads.
5996 (linux_attach): New function.
5997 (linux_kill_one_process): New function.
5998 (linux_kill): Kill all LWPs.
5999 (linux_thread_alive): Use find_inferior_id.
6000 (check_removed_breakpoints, status_pending_p): New functions.
6001 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6002 Update. Use WNOHANG. Wait for cloned processes also. Update process
6003 struct for the found process.
6004 (linux_wait_for_event): New function.
6005 (linux_wait): Use it. Support LWPs.
6006 (send_sigstop, wait_for_sigstop, stop_all_processes)
6007 (linux_resume_one_process, linux_continue_one_process): New functions.
6008 (linux_resume): Support LWPs.
6009 (REGISTER_RAW_SIZE): Remove.
6010 (fetch_register): Use register_size instead. Call supply_register.
6011 (usr_store_inferior_registers): Likewise. Call collect_register.
6013 (regsets_fetch_inferior_registers): Improve error message.
6014 (regsets_store_inferior_registers): Add debugging.
6015 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6016 (unstopped_p, linux_signal_pid): New functions.
6017 (linux_target_ops): Add linux_signal_pid.
6018 (linux_init_signals): New function.
6019 (initialize_low): Call it. Initialize using_threads.
6020 * regcache.c (inferior_regcache_data): Add valid
6022 (get_regcache): Fetch registers lazily. Add fetch argument
6023 and update all callers.
6024 (regcache_invalidate_one, regcache_invalidate): New
6026 (new_register_cache): Renamed from create_register_cache.
6027 Return the new regcache.
6028 (free_register_cache): Change argument to a void *.
6029 (registers_to_string, registers_from_string): Call get_regcache
6030 with fetch flag set.
6031 (register_data): Make static. Pass fetch flag to get_regcache.
6032 (supply_register): Call get_regcache with fetch flag clear.
6033 (collect_register): Call get_regcache with fetch flag set.
6034 (collect_register_as_string): New function.
6035 * regcache.h: Update.
6036 * remote-utils.c (putpkt): Flush after debug output and use
6038 Handle input interrupts while waiting for an ACK.
6039 (input_interrupt): Use signal_pid method.
6040 (getpkt): Flush after debug output and use stderr.
6041 (outreg): Use collect_register_as_string.
6042 (new_thread_notify, dead_thread_notify): New functions.
6043 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6045 (look_up_one_symbol): Flush after debug output.
6046 * server.c (step_thread, server_waiting): New variables.
6047 (start_inferior): Don't use signal_pid. Update call to mywait.
6048 (attach_inferior): Update call to mywait.
6049 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6050 (main): Don't fetch/store registers explicitly. Use
6051 set_desired_inferior. Support proposed ``Hs'' packet. Update
6054 (struct inferior_list, struct_inferior_list_entry): New.
6055 * target.c (set_desired_inferior): New.
6056 (write_inferior_memory): Constify.
6057 (mywait): New function.
6059 (struct target_ops): New signal_pid method.
6060 (mywait): Removed macro, added prototype.
6062 * linux-low.h (regset_func): Removed.
6063 (regset_fill_func, regset_store_func): New.
6064 (enum regset_type): New.
6065 (struct regset_info): Add type field. Use new operation types.
6066 (struct linux_target_ops): stop_pc renamed to get_pc.
6067 Add decr_pc_after_break and breakpoint_at.
6068 (get_process, get_thread_proess, get_process_thread)
6069 (strut process_info, all_processes, linux_attach_lwp)
6070 (thread_db_init): New.
6072 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6073 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6074 (the_low_target): Add new members.
6075 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6076 (i386_store_fpxregset): Constify.
6077 (target_regsets): Add new kind identifier.
6078 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6079 (i386_set_pc): Add debugging.
6080 (i386_breakpoint_at): New function.
6081 (the_low_target): Add new members.
6082 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6083 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6084 (mips_breakpoint_at): New.
6085 (the_low_target): Add new members.
6086 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6087 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6088 (the_low_target): Add new members.
6089 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6090 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6091 (the_low_target): Add new members.
6092 * linux-x86-64-low.c (target_regsets): Add new kind
6095 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6097 From Martin Pool <mbp@samba.org>:
6098 * server.c (gdbserver_usage): New function.
6101 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6103 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6106 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6108 * Makefile.in: Remove obsolete code.
6110 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6112 * linux-low.c (regsets_fetch_inferior_registers),
6113 (regsets_store_inferior_registers): Removed cast to int from
6115 * regcache.h: Added declaration of struct inferior_info.
6117 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6119 * inferiors.c (struct inferior_info): Add regcache_data.
6120 (add_inferior): Call create_register_cache.
6121 (clear_inferiors): Call free_register_cache.
6122 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6123 * regcache.c (struct inferior_regcache_data): New.
6124 (registers): Remove.
6125 (get_regcache): New function.
6126 (create_register_cache, free_register_cache): New functions.
6127 (set_register_cache): Don't initialize the register cache here.
6128 (registers_to_string, registers_from_string, register_data): Call
6130 * regcache.h: Add prototypes.
6131 * server.h: Likewise.
6133 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6135 * mem-break.c: New file.
6136 * mem-break.h: New file.
6137 * Makefile.in: Add mem-break.o rule; update server.h
6139 * inferiors.c (struct inferior_info): Add target_data
6141 (clear_inferiors): Free target_data member if set.
6142 (inferior_target_data, set_inferior_target_data): New functions.
6143 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6144 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6145 * linux-low.c (linux_bp_reinsert): New variable.
6146 (struct inferior_linux_data): New.
6147 (linux_create_inferior): Use set_inferior_target_data.
6148 (linux_attach): Likewise. Call add_inferior.
6149 (linux_wait_for_one_inferior): New function.
6150 (linux_wait): Call it.
6151 (linux_write_memory): Add const.
6152 (initialize_low): Call set_breakpoint_data.
6153 * linux-low.h (struct linux_target_ops): Add breakpoint
6155 * server.c (attach_inferior): Remove extra add_inferior
6157 * server.h: Include mem-break.h. Update inferior.c
6159 * target.c (read_inferior_memory)
6160 (write_inferior_memory): New functions.
6161 * target.h (read_inferior_memory)
6162 (write_inferior_memory): Change macros to prototypes.
6163 (struct target_ops): Update comments. Add const to write_memory
6166 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6168 * linux-low.c (usr_store_inferior_registers): Support
6169 registers which are allowed to fail to store.
6170 * linux-low.h (linux_target_ops): Likewise.
6171 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6172 (ppc_cannot_store_register): FPSCR may not be storable.
6174 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6176 * server.h: Include <string.h> if HAVE_STRING_H.
6177 * ChangeLog: Correct paths in last ChangeLog entry.
6179 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6181 * linux-low.h: Remove obsolete prototypes.
6182 (struct linux_target_ops): New.
6183 (extern the_low_target): New.
6184 * linux-low.c (num_regs, regmap): Remove declarations.
6185 (register_addr): Use the_low_target explicitly.
6186 (fetch_register): Likewise.
6187 (usr_fetch_inferior_registers): Likewise.
6188 (usr_store_inferior_registers): Likewise.
6189 * linux-arm-low.c (num_regs): Remove.
6190 (arm_num_regs): Define.
6191 (arm_regmap): Renamed from regmap, made static.
6192 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6194 (arm_cannot_store_register): Renamed from cannot_store_register,
6196 (the_low_target): New.
6197 * linux-i386-low.c (num_regs): Remove.
6198 (i386_num_regs): Define.
6199 (i386_regmap): Renamed from regmap, made static.
6200 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6202 (i386_cannot_store_register): Renamed from cannot_store_register,
6204 (the_low_target): New.
6205 * linux-ia64-low.c (num_regs): Remove.
6206 (ia64_num_regs): Define.
6207 (ia64_regmap): Renamed from regmap, made static.
6208 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6210 (ia64_cannot_store_register): Renamed from cannot_store_register,
6212 (the_low_target): New.
6213 * linux-m68k-low.c (num_regs): Remove.
6214 (m68k_num_regs): Define.
6215 (m68k_regmap): Renamed from regmap, made static.
6216 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6218 (m68k_cannot_store_register): Renamed from cannot_store_register,
6220 (the_low_target): New.
6221 * linux-mips-low.c (num_regs): Remove.
6222 (mips_num_regs): Define.
6223 (mips_regmap): Renamed from regmap, made static.
6224 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6226 (mips_cannot_store_register): Renamed from cannot_store_register,
6228 (the_low_target): New.
6229 * linux-ppc-low.c (num_regs): Remove.
6230 (ppc_num_regs): Define.
6231 (ppc_regmap): Renamed from regmap, made static.
6232 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6234 (ppc_cannot_store_register): Renamed from cannot_store_register,
6236 (the_low_target): New.
6237 * linux-s390-low.c (num_regs): Remove.
6238 (s390_num_regs): Define.
6239 (s390_regmap): Renamed from regmap, made static.
6240 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6242 (s390_cannot_store_register): Renamed from cannot_store_register,
6244 (the_low_target): New.
6245 * linux-sh-low.c (num_regs): Remove.
6246 (sh_num_regs): Define.
6247 (sh_regmap): Renamed from regmap, made static.
6248 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6250 (sh_cannot_store_register): Renamed from cannot_store_register,
6252 (the_low_target): New.
6253 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6254 (the_low_target): New.
6256 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6258 * Makefile.in: Add stamp-h target.
6259 * configure.in: Create stamp-h.
6260 * configure: Regenerated.
6262 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6264 * inferiors.c: New file.
6265 * target.c: New file.
6266 * target.h: New file.
6267 * Makefile.in: Add target.o and inferiors.o. Update
6269 * linux-low.c (inferior_pid): New static variable,
6270 moved from server.c.
6271 (linux_create_inferior): Renamed from create_inferior.
6272 Call add_inferior. Return 0 on success instead of a PID.
6273 (linux_attach): Renamed from myattach.
6274 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6275 (linux_thread_alive): Renamed from mythread_alive.
6276 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6278 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6279 (regsets_store_inferior_registers): Correct error message.
6280 Add missing ``return 0''.
6281 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6282 (linux_store_registers): Renamed from store_inferior_registers.
6283 (linux_read_memory): Renamed from read_inferior_memory.
6284 (linux_write_memory): Renamed from write_inferior_memory.
6285 (linux_target_ops): New structure.
6286 (initialize_low): Call set_target_ops ().
6287 * remote-utils.c (unhexify): New function.
6288 (hexify): New function.
6289 (input_interrupt): Send signals to ``signal_pid''.
6290 * server.c (inferior_pid): Remove.
6291 (start_inferior): Update create_inferior call.
6292 (attach_inferior): Call add_inferior.
6293 (handle_query): New function.
6294 (main): Call handle_query for `q' packets.
6295 * server.h: Include "target.h". Remove obsolete prototypes.
6296 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6298 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6300 * Makefile.in: Add WARN_CFLAGS. Update configury
6302 * configure.in: Check for <string.h>
6303 * configure: Regenerate.
6304 * config.in: Regenerate.
6305 * gdbreplay.c: Include needed system headers.
6306 (remote_open): Remove strchr prototype.
6307 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6308 * regcache.c (supply_register): Change buf argument to const void *.
6309 (supply_register_by_name): Likewise.
6310 (collect_register): Change buf argument to void *.
6311 (collect_register_by_name): Likewise.
6312 * regcache.h: Add missing prototypes.
6313 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6314 * server.c (handle_query): New function.
6315 (attached): New static variable, moved out of main.
6316 (main): Quiet longjmp clobber warnings.
6317 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6318 * utils.c (error): Remove NORETURN.