1 2011-12-16 Doug Evans <dje@google.com>
3 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6 2011-12-15 Yao Qi <yao@codesourcery.com>
8 * tracepoint.c: Include sys/syscall.h.
9 (gdb_ust_thread): Remove preprocessor conditional.
11 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13 * linux-low.c (linux_detach_one_lwp): Call
14 the_low_target.prepare_to_resume before detaching.
16 2011-12-14 Yao Qi <yao@codesourcery.com>
18 * tracepoint.c (gdb_ust_thread): Don't ignore return value
21 2011-12-14 Yao Qi <yao@codesourcery.com>
23 * i386-low.c (i386_low_stopped_data_address): Initialize local
26 2011-12-13 Pedro Alves <pedro@codesourcery.com>
30 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
31 DR_CONTROL unless necessary. Extend comments.
32 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
33 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
35 2011-12-13 Yao Qi <yao@codesourcery.com>
37 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
39 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
41 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
43 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
44 Print new debug message for such case.
46 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
48 Fix overlapping memcpy.
49 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
50 the read_inferior_memory transfer.
51 (delete_fast_tracepoint_jump): New variable buf. Use it for the
52 write_inferior_memory transfer.
53 (set_fast_tracepoint_jump): New variable buf. Use it for the
54 read_inferior_memory and write_inferior_memory transfers.
55 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
56 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
57 Use it for the write_inferior_memory transfer.
58 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
61 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
63 * linux-low.c (fetch_register, store_register): Make code
64 consistent, fix formatting.
66 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
68 * linux-low.c (usr_store_inferior_registers): Factor out code
69 to handle individual registers into...
70 (store_register): ... this new function.
72 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
74 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
75 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
76 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
77 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
78 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
79 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
80 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
81 (srv_xmlfiles): Add new XML files.
83 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
85 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
86 (init_registers_s390_linux32v1): Add prototype.
87 (init_registers_s390_linux32v2): Likewise.
88 (init_registers_s390_linux64v1): Likewise.
89 (init_registers_s390_linux64v2): Likewise.
90 (init_registers_s390x_linux64v1): Likewise.
91 (init_registers_s390x_linux64v2): Likewise.
92 (s390_num_regs): Increment to 52.
93 (s390_regmap): Add orig_r2 register.
94 (s390_num_regs_3264): Increment to 68.
95 (s390_regmap_3264): Add orig_r2 register.
96 (s390_collect_ptrace_register): Handle orig_r2 register.
97 (s390_supply_ptrace_register): Likewise.
98 (s390_fill_last_break): New function.
99 (s390_store_last_break): Likewise.
100 (s390_fill_system_call): New function.
101 (s390_store_system_call): Likewise.
102 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
104 (s390_check_regset): New function.
105 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
106 NT_S390_SYSTEM_CALL regsets and use appropriate description.
107 Update target_regsets for available register sets.
109 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
110 Jan Kratochvil <jan.kratochvil@redhat.com>
112 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
113 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
115 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
116 * linux-low.h (struct process_info_private): New member r_debug.
117 * server.c (handle_qxfer_libraries): Call
118 the_target->qxfer_libraries_svr4.
119 (handle_qxfer_libraries_svr4): New function.
120 (qxfer_packets): New entry "libraries-svr4".
121 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
122 * target.h (struct target_ops): New member qxfer_libraries_svr4.
123 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
124 PACKET_qXfer_libraries_svr4.
126 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
128 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
129 PSW address/mask between 8-byte and 16-byte formats.
130 (s390_supply_ptrace_register): Likewise.
131 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
132 basic addressing mode bit.
134 2011-11-24 Stan Shebs <stan@codesourcery.com>
136 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
138 2011-11-17 Stan Shebs <stan@codesourcery.com>
140 * tracepoint.c (struct tracepoint): New field traceframe_usage.
141 (tracing_start_time): New global.
142 (tracing_stop_time): New global.
143 (tracing_user_name): New global.
144 (tracing_notes): New global.
145 (tracing_stop_note): New global.
146 (cmd_qtstart): Set traceframe_usage, start_time.
147 (stop_tracing): Set stop_time.
148 (cmd_qtstatus): Report additional status.
149 (cmd_qtp): New function.
150 (handle_tracepoint_query): Call it.
151 (cmd_qtnotes): New function.
152 (handle_tracepoint_general_set): Call it.
153 (get_timestamp): Rename from tsv_get_timestamp.
155 2011-11-14 Stan Shebs <stan@codesourcery.com>
156 Kwok Cheung Yeung <kcy@codesourcery.com>
158 * linux-x86-low.c (small_jump_insn): New.
159 (i386_install_fast_tracepoint_jump_pad): Add arguments for
160 trampoline and error message, build a trampoline and issue a small
161 jump instruction to it.
162 (x86_install_fast_tracepoint_jump_pad): Add arguments for
163 trampoline and error message.
164 (x86_get_min_fast_tracepoint_insn_len): New.
165 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
166 * linux-low.h (struct linux_target_ops): Add arguments to
167 install_fast_tracepoint_jump_pad operation, add new operation.
168 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
170 (linux_get_min_fast_tracepoint_insn_len): New function.
171 (linux_target_op): Add new operation.
172 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
173 (gdb_trampoline_buffer_end): Ditto.
174 (gdb_trampoline_buffer_error): Ditto.
175 (struct ipa_sym_addresses): Add fields for new IPA variables.
176 (symbol_list): Add entries for new IPA variables.
177 (struct tracepoint): Add fields to hold the address range of the
178 trampoline used by the tracepoint.
179 (trampoline_buffer_head): New static variable.
180 (trampoline_buffer_tail): Ditto.
181 (claim_trampoline_space): New function.
182 (have_fast_tracepoint_trampoline_buffer): New function.
183 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
185 (install_fast_tracepoint): Ditto, also add error buffer argument.
186 (cmd_qtminftpilen): New function.
187 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
188 (fast_tracepoint_from_trampoline_address): New function.
189 (fast_tracepoint_collecting): Handle trampoline as part of jump
191 (set_trampoline_buffer_space): New function.
192 (initialize_tracepoint): Initialize new IPA variables.
193 * target.h (struct target_ops): Add arguments to
194 install_fast_tracepoint_jump_pad operation, add new
195 get_min_fast_tracepoint_insn_len operation.
196 (target_get_min_fast_tracepoint_insn_len): New.
197 (install_fast_tracepoint_jump_pad): Add arguments.
198 * server.h (IPA_BUFSIZ): Define.
199 * linux-i386-ipa.c: Include extra header files.
200 (initialize_fast_tracepoint_trampoline_buffer): New function.
201 (initialize_low_tracepoint): Call it.
202 * server.h (set_trampoline_buffer_space): Declare.
203 (claim_trampoline_space): Ditto.
204 (have_fast_tracepoint_trampoline_buffer): Ditto.
206 2011-11-14 Yao Qi <yao@codesourcery.com>
208 * server.c (handle_query): Handle InstallInTrace for qSupported.
209 * tracepoint.c (add_tracepoint): Sort list.
210 (install_tracepoint, download_tracepoint): New.
211 (cmd_qtdp): Call them to install and download tracepoints.
212 (sort_tracepoints): Removed.
213 (cmd_qtstart): Update.
215 2011-11-14 Yao Qi <yao@codesourcery.com>
217 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
218 * mem-break.h: Declare.
219 * tracepoint.c (cmd_qtstart): Move some code to ...
220 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
222 (download_tracepoints): Move some code to ...
223 (download_tracepoint_1): ... here. New.
225 2011-11-08 Yao Qi <yao@codesourcery.com>
227 * remote-utils.c (relocate_instruction): A comment fix.
229 2011-11-07 Joel Brobecker <brobecker@adacore.com>
231 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
232 (i386_dr_low_get_control, i386_dr_low_get_status): Use
233 dr_status_mirror and dr_control_mirror from debug_reg_state.
234 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
235 (i386_initial_stuff): Remove use of deleted globals.
236 (i386_get_thread_context, i386_set_thread_context,
237 i386_thread_added): Use dr_status_mirror and dr_control_mirror
238 from debug_reg_state.
240 2011-11-05 Yao Qi <yao@codesourcery.com>
242 * tracepoint.c (gdb_collect): Loop over tracepoints of same
245 2011-11-02 Stan Shebs <stan@codesourcery.com>
247 * tracepoint.c (agent_mem_read_string): New function.
248 (eval_agent_expr): Call it for tracenz.
249 * server.c (handle_query): Report support for tracenz.
251 2011-11-02 Yao Qi <yao@codesourcery.com>
253 * tracepoint.c (cmd_qtstart): Remove unused local variables.
255 2011-11-02 Yao Qi <yao@codesourcery.com>
257 * target.h: Fix a typo in comment.
259 2011-10-31 Pedro Alves <pedro@codesourcery.com>
261 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
262 clobber the breakpoints' shadows with fast tracepoint jumps.
263 * mem-break.h (check_mem_write): Add `myaddr' parameter.
264 * target.c (write_inferior_memory): Also pass MYADDR down to
267 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
269 * configure.ac: Check support for personality routine.
270 * configure: Regenerate.
271 * config.in: Likewise.
272 * linux-low.c: Include <sys/personality.h>.
273 Define ADDR_NO_RANDOMIZE if necessary.
274 (linux_create_inferior): Disable address space randomization when
275 forking inferior, if requested.
276 (linux_supports_disable_randomization): New function.
277 (linux_target_ops): Install it.
278 * server.h (disable_randomization): Declare.
279 * server.c (disable_randomization): New global variable.
280 (handle_general_set): Handle QDisableRandomization.
281 (handle_query): Likewise for qSupported.
282 (main): Support --disable-randomization and --no-disable-randomization
283 command line arguments.
284 * target.h (struct target_ops): Add supports_disable_randomization.
285 (target_supports_disable_randomization): New macro.
287 2011-09-29 Mike Frysinger <vapier@gentoo.org>
289 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
291 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
292 [!PT_GETDSBT] (target_loadmap): New definition.
293 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
294 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
295 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
296 and PT_GETDSBT to LINUX_LOADMAP.
297 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
298 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
300 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
302 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
303 (arm_linux_hwbp_cap): New static variable.
304 (arm_linux_get_hwbp_cap): Replace by ...
305 (arm_linux_init_hwbp_cap): ... this new function.
306 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
307 (arm_linux_get_hw_watchpoint_count): Likewise.
308 (arm_linux_get_hw_watchpoint_max_length): Likewise.
309 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
310 (arm_prepare_to_resume): Use perror_with_name instead of error.
312 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
314 * linux-arm-low.c: Include <signal.h>.
315 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
316 (struct arm_linux_hwbp_cap): New data type.
317 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
318 (struct arm_linux_hw_breakpoint): New data type.
319 (MAX_BPTS, MAX_WPTS): Define.
320 (struct arch_process_info, struct arch_lwp_info): New data types.
321 (arm_linux_get_hwbp_cap): New function.
322 (arm_linux_get_hw_breakpoint_count): Likewise.
323 (arm_linux_get_hw_watchpoint_count): Likewise.
324 (arm_linux_get_hw_watchpoint_max_length): Likewise.
325 (arm_hwbp_control_initialize): Likewise.
326 (arm_hwbp_control_is_enabled): Likewise.
327 (arm_hwbp_control_is_initialized): Likewise.
328 (arm_hwbp_control_disable): Likewise.
329 (arm_linux_hw_breakpoint_equal): Likewise.
330 (arm_linux_hw_point_initialize): Likewise.
331 (struct update_registers_data): New data structure.
332 (update_registers_callback: New function.
333 (arm_insert_point): Likewise.
334 (arm_remove_point): Likewise.
335 (arm_stopped_by_watchpoint): Likewise.
336 (arm_stopped_data_address): Likewise.
337 (arm_new_process): Likewise.
338 (arm_new_thread): Likewise.
339 (arm_prepare_to_resume): Likewise.
340 (the_low_target): Register arm_insert_point, arm_remove_point,
341 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
342 arm_new_thread, and arm_prepare_to_resume.
344 2011-09-15 Stan Shebs <stan@codesourcery.com>
346 * server.h (struct emit_ops): Add compare-goto fields.
347 * tracepoint.c (gdb_agent_op_sizes): New table.
348 (emit_eq_goto): New function.
349 (emit_ne_goto): New function.
350 (emit_lt_goto): New function.
351 (emit_le_goto): New function.
352 (emit_gt_goto): New function.
353 (emit_ge_goto): New function.
354 (is_goto_target): New function.
355 (compile_bytecodes): Recognize special cases of compare-goto
356 combinations and call specialized emitters for them.
357 * linux-x86-low.c (amd64_emit_eq_goto): New function.
358 (amd64_emit_ne_goto): New function.
359 (amd64_emit_lt_goto): New function.
360 (amd64_emit_le_goto): New function.
361 (amd64_emit_gt_goto): New function.
362 (amd64_emit_ge_goto): New function.
363 (amd64_emit_ops): Add the new functions.
364 (i386_emit_eq_goto): New function.
365 (i386_emit_ne_goto): New function.
366 (i386_emit_lt_goto): New function.
367 (i386_emit_le_goto): New function.
368 (i386_emit_gt_goto): New function.
369 (i386_emit_ge_goto): New function.
370 (i386_emit_ops): Add the new functions.
372 2011-09-08 Stan Shebs <stan@codesourcery.com>
374 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
375 (i386_emit_epilogue): Restore %ebx.
377 2011-08-31 Jie Zhang <jzhang918@gmail.com>
379 * server.c (step_thread): Remove definition.
380 (process_serial_event): Don't handle Hs.
381 * server.h (step_thread): Remove declaration.
382 * target.c (set_desired_inferior): Remove use of step_thread.
384 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
386 * linux-low.c: Include linux-procfs.h.
387 (linux_attach_lwp_1): Update comments.
388 (linux_attach): Scan for existing threads when attaching to a
389 process that is the tgid.
390 * Makefile.in: Update dependencies.
392 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
394 * configure.srv: Add linux-procfs.o dependencies.
396 2011-08-14 Yao Qi <yao@codesourcery.com>
398 * target.h (struct target_ops): Fix indent.
399 * win32-low.c (win32_target_ops): Fix comment.
401 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
402 Yao Qi <yao@codesourcery.com>
404 * Makefile.in (clean): Remove tic6x-*.c files.
405 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
406 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
407 (tic6x-c64xp-linux.c): Likewise.
408 * configure.srv: Add support for tic6x-*-uclinux.
409 * linux-tic6x-low.c: New.
410 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
412 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
413 Yao Qi <yao@codesourcery.com>
415 * target.h (struct target_ops): Add read_loadmap.
416 * linux-low.c (struct target_loadseg): New type.
417 (struct target_loadmap): New type.
418 (linux_read_loadmap): New function.
419 (linux_target_ops): Add linux_read_loadmap.
420 * server.c (handle_query): Support qXfer:fdpic:read packet.
421 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
423 2011-08-05 Eli Zaretskii <eliz@gnu.org>
425 * win32-low.c: Include <stdint.h>.
427 2011-07-22 Pedro Alves <pedro@codesourcery.com>
429 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
430 to the inferior here.
431 (i386_remove_aligned_watchpoint): Ditto.
432 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
433 fit part of the watchpoint in the debug registers.
434 (i386_update_inferior_debug_regs): New.
435 (i386_low_insert_watchpoint): Work on a local mirror of the debug
436 registers, and only update the inferior on success.
437 (i386_low_remove_watchpoint): Ditto.
439 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
441 * linux-low.c (compare_ints, unique, list_threads, show_process,
442 linux_core_of_thread): Delete.
443 (linux_target_ops): Change linux_core_of_thread to
444 linux_common_core_of_thread.
445 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
446 * utils.c (malloc_failure): Change type of argument.
447 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
448 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
449 common/linux-osdata.c, common/ptid.c and common/buffer.c.
450 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
451 (IPA_OBJS): Add common-utils-ipa.o.
452 (ptid_h, linux_osdata_h): New macros.
453 (server_h): Add common/common-utils.h, common/xml-utils.h,
454 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
456 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
457 ptid.o, buffer.o): New rules.
458 (linux-low.o): Add common/linux-osdata.h as a dependency.
459 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
460 * configure.ac: Add AC_HEADER_DIRENT check.
461 * config.in: Regenerate.
462 * configure: Regenerate.
463 * remote-utils.c (xml_escape_text): Delete.
464 (buffer_grow, buffer_free, buffer_init, buffer_finish,
465 buffer_xml_printf): Move to common/buffer.c.
466 * server.c (main): Remove call to initialize_inferiors.
467 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
468 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
469 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
470 internal_error, gdb_assert, gdb_assert_fail): Delete.
471 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
472 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
474 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
475 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
476 initialize_inferiors): Delete.
478 2011-07-20 Pedro Alves <pedro@codesourcery.com>
480 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
483 2011-05-31 Pedro Alves <pedro@codesourcery.com>
485 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
487 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
489 2011-05-26 Yao Qi <yao@codesourcery.com>
491 * Makefile.in (thread-db.o): Track dependence to
492 common/gdb_thread_db.h.
493 * thread-db.c: include gdb_thread_db.h from right place.
495 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
497 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
498 __FILE__ and __LINE__ to internal_error.
500 2011-05-13 Doug Evans <dje@google.com>
502 * thread-db.c (try_thread_db_load_from_sdir): New function.
503 (try_thread_db_load_from_dir): New function.
504 (thread_db_load_search): Handle $sdir, ignore $pdir.
505 Remove trying of system directories if search of
506 libthread-db-search-path fails, that is now done via $sdir.
508 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
510 * server.c (handle_query): Add EnableDisableTracepoints to the list
511 of supported features.
512 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
514 (cmd_qtenable_disable): New.
515 (cmd_qtstart): Install tracepoints even if disabled.
516 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
517 receiving a QTEnable or QTDisable packet.
518 (gdb_collect): Skip data collection if fast tracepoint is disabled.
519 (ust_marker_to_static_tracepoint): Do not ignore disabled static
521 (gdb_probe): Skip data collection if static tracepoint is disabled.
523 2011-05-10 Doug Evans <dje@google.com>
525 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
527 2011-05-04 Doug Evans <dje@google.com>
529 * linux-low.c (linux_join): Skip process lookup.
530 * spu-low.c (spu_join): Ditto.
531 * server.c (join_inferiors_callback): Delete.
532 (process_serial_event): For 'D' packet (detach) call join_inferior
535 2011-05-04 Joseph Myers <joseph@codesourcery.com>
537 * README: Don't mention xscale*-*-linux*.
538 * configure.srv (xscale*-*-linux*): Don't handle target.
540 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
542 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
544 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
545 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
546 (i386_emit_void_call_2): Likewise.
548 2011-04-26 Yao Qi <yao@codesourcery.com>
550 * linux-low.c: Move common macros to linux-ptrace.h.
551 Include linux-ptrace.h.
552 * Makefile.in (linux_ptrace_h): New.
553 (linux-low.o): Depends on linux-ptrace.h.
555 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
557 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
558 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
559 (remote_prepare): New function with most of the TCP code from ...
560 (remote_open): ... here. Detect PORT here unconditionally. Move also
561 setting transport_is_reliable.
562 * server.c (run_once): New variable.
563 (gdbserver_usage): Document it.
564 (main): Set run_once for `--once'. Call remote_prepare. Exit after
565 the first run if RUN_ONCE.
566 * server.h (run_once, remote_prepare): New declarations.
568 2011-04-19 Tom Tromey <tromey@redhat.com>
570 * win32-low.c (handle_load_dll): Remove duplicate "the".
572 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
574 Remove support for old Cygwin 1.5 versions.
575 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
576 function to avoid warning.
577 (win32_add_one_solib): Use cygwin_conv_path function to avoid
580 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
582 * gdbserver/server.h (Macro _): Define it if not available.
584 2011-03-14 Michael Snyder <msnyder@vmware.com>
586 * hostio.c (handle_close): Remove unnecessary null test.
588 2011-03-10 Joel Brobecker <brobecker@adacore.com>
590 * Makefile.in (maintainer-clean realclean distclean): Remove
591 "make ... subdir_do" command.
593 2011-03-10 Michael Snyder <msnyder@vmware.com>
595 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
597 * server.c (handle_v_run): Free alloced buffer on early return.
599 2011-03-09 Yao Qi <yao@codesourcery.com>
602 2011-03-04 Yao Qi <yao@codesourcery.com>
604 * Makefile.in: Remove GNU make feature --directory.
606 2011-03-05 Yao Qi <yao@codesourcery.com>
608 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
609 (subdir_do): New make target. Copied from gdb/Makefile.
610 (maintainer-clean, realclean, distclean, clean): Call corresponding
611 make targets in common/Makefile.
613 2011-02-11 Yao Qi <yao@codesourcery.com>
615 * configure.ac: Call AC_PROG_RANLIB.
616 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
617 * configure: Regenerate.
619 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
621 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
623 2011-03-06 Yao Qi <yao@codesourcery.com>
625 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
627 2011-03-05 Yao Qi <yao@codesourcery.com>
629 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
630 (subdir_do): New make target. Copied from gdb/Makefile.
631 (maintainer-clean, realclean, distclean, clean): Call corresponding
632 make targets in common/Makefile.
634 2011-03-04 Yao Qi <yao@codesourcery.com>
636 * Makefile.in: Remove GNU make feature --directory.
638 2011-03-04 Michael Snyder <msnyder@vmware.com>
640 * server.c (queue_stop_reply): Call xmalloc not malloc.
642 2011-03-02 Michael Snyder <msnyder@vmware.com>
644 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
646 2011-02-28 Michael Snyder <msnyder@vmware.com>
648 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
649 (cmd_qtframe): Ditto.
650 (cmd_qtbuffer): Ditto.
651 (cmd_bigqtbuffer): Ditto.
653 * utils.c (decimal2str): Initialize 'width' to nine, then
656 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
658 * hostio.c (require_data): Free *data, not data.
660 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
662 * hostio.c (require_data): Use free, not xfree.
664 2011-02-27 Michael Snyder <msnyder@vmware.com>
666 * server.c (handle_query): Discard unused value.
668 * hostio.c (require_data): Free malloc memory before returning
671 2011-02-26 Michael Snyder <msnyder@vmware.com>
673 * linux-low.c (list_threads): Call closedir for dirent.
675 2011-02-27 Michael Snyder <msnyder@vmware.com>
677 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
678 a case statement falls through.
680 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
682 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
685 2011-02-26 Michael Snyder <msnyder@vmware.com>
687 * utils.c (decimal2str): Eliminate dead code and dead param.
688 (pulongest): Drop dead param from call to decimal2str.
691 2011-02-24 Joel Brobecker <brobecker@adacore.com>
693 Revert the following patch (not approved yet):
694 2011-02-21 Hui Zhu <teawater@gmail.com>
695 * tracepoint.c (tp_printf): New function.
696 (eval_agent_expr): Handle gdb_agent_op_printf.
698 2011-02-21 Hui Zhu <teawater@gmail.com>
700 * tracepoint.c (tp_printf): New function.
701 (eval_agent_expr): Handle gdb_agent_op_printf.
703 2011-02-18 Tom Tromey <tromey@redhat.com>
705 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
706 (tracepoint.o): Likewise.
707 * tracepoint.c (enum gdb_agent_op): Use ax.def.
708 (gdb_agent_op_names): Likewise.
710 2011-02-18 Tom Tromey <tromey@redhat.com>
712 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
713 gdb_agent_op_rot>: New constants.
714 (gdb_agent_op_names): Add pick and roll.
715 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
718 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
720 * aclocal.m4: Regenerated with aclocal-1.11.1.
722 2011-02-14 Pedro Alves <pedro@codesourcery.com>
724 * server.c (handle_qxfer_traceframe_info): New.
725 (qxfer_packets): Register "traceframe-info".
726 (handle_query): Report support for qXfer:traceframe-info:read+.
727 * tracepoint.c (match_blocktype): New.
728 (traceframe_find_block_type): Rename to ...
729 (traceframe_walk_blocks): ... this. Add callback filter argument,
731 (traceframe_find_block_type): New, reimplemented on top of
732 traceframe_walk_blocks.
733 (build_traceframe_info_xml): New.
734 (traceframe_read_info): New.
735 * server.h (traceframe_read_info): Declare.
737 2011-02-11 Yao Qi <yao@codesourcery.com>
739 * configure.ac: Call AC_PROG_RANLIB.
740 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
741 * configure: Regenerate.
743 2011-02-07 Pedro Alves <pedro@codesourcery.com>
745 * server.c (gdb_read_memory): Change return semantics to allow
747 (handle_search_memory_1): Adjust.
748 (process_serial_event) <'m' packet>: Handle partial transfers.
749 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
751 2011-01-28 Pedro Alves <pedro@codesourcery.com>
753 * regcache.c (init_register_cache): Initialize
754 regcache->register_status.
755 (free_register_cache): Release regcache->register_status.
756 (regcache_cpy): Copy register_status.
757 (registers_to_string): Print 'x's for unavailable registers.
758 (supply_register): Mark the register's status valid or
759 unavailable, depending on whether a buffer was passed in or not.
760 (supply_register_zeroed): New.
761 (supply_regblock): Mark the registers' status valid or
762 unavailable, depending on whether a buffer was passed in or not.
763 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
764 (struct regcache): New `register_status' field.
765 (supply_register_zeroed): Declare.
766 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
767 supply_register_zeroed, rather than passing a NULL buffer to
769 * tracepoint.c (fetch_traceframe_registers): Update comment.
771 2011-01-28 Pedro Alves <pedro@codesourcery.com>
773 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
776 2011-01-25 Pedro Alves <pedro@codesourcery.com>
778 * server.h (decode_xfer_write): Change prototype.
779 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
780 and don't extract the annex here.
781 * server.c (decode_xfer_read): Remove `annex' parameter,
782 and don't extract the annex here.
785 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
786 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
787 (handle_qxfer_statictrace): New functions, abstracted out from
788 handle_query, and made to use the struct qxfer interface.
789 (handle_threads_qxfer_proper): Rename to ...
790 (handle_qxfer_threads_proper): ... this.
791 (handle_threads_qxfer): Rename to ...
792 (handle_qxfer_threads): ... this. Adjust.
793 (qxfer_packets): New array.
794 (handle_qxfer): New function.
795 (handle_query): Use handle_qxfer.
797 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
799 * gdbreplay.c: Shorten lines of >= 80 columns.
800 * linux-low.c: Ditto.
801 * linux-ppc-low.c: Ditto.
802 * linux-s390-low.c: Ditto.
803 * linux-sparc-low.c: Ditto.
804 * linux-x86-low.c: Ditto.
805 * linux-xtensa-low.c: Ditto.
806 * mem-break.c: Ditto.
809 * remote-utils.c: Ditto.
812 * thread-db.c: Ditto.
813 * tracepoint.c: Ditto.
815 * win32-low.h: Ditto.
817 2011-01-05 Joel Brobecker <brobecker@adacore.com>
819 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
822 2011-01-01 Joel Brobecker <brobecker@adacore.com>
824 * server.c (gdbserver_version): Update copyright year in version
826 * gdbreplay.c (gdbreplay_version): Ditto.
828 2010-12-29 Jie Zhang <jie.zhang@analog.com>
830 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
831 * linux-bfin-low.c: New file.
832 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
833 PT_DATA_ADDR for BFIN targets.
834 * Makefile.in (SFILES): Add linux-bfin-low.c.
835 (clean): Remove reg-bfin.c.
836 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
837 * README: Mention supported Blackfin targets.
839 2010-12-23 Mike Frysinger <vapier@gentoo.org>
841 * .gitignore: New file.
843 2010-11-16 Mike Frysinger <vapier@gentoo.org>
845 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
847 2010-10-22 Jie Zhang <jie@codesourcery.com>
849 * Makefile.in: Add FLAGS_TO_PASS variable.
850 (install): Remove dependency of install-only and recursively
851 invoke make for install-only.
853 2010-10-04 Doug Evans <dje@google.com>
855 * Makefile.in (uninstall): Use $(DESTDIR).
857 2010-09-24 Pedro Alves <pedro@codesourcery.com>
861 * linux-x86-low.c (compat_siginfo_from_siginfo)
862 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
863 si_code is < 0. Check for si_code == SI_TIMER before checking for
866 2010-09-13 Joel Brobecker <brobecker@adacore.com>
868 * lynx-i386-low.c: New file.
869 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
871 2010-09-13 Joel Brobecker <brobecker@adacore.com>
873 * lynx-low.c (ptrace_request_to_str): Remove handling for
874 request values that have been removed in LynxOS 5.x.
876 2010-09-13 Joel Brobecker <brobecker@adacore.com>
878 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
881 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
883 * configure.ac: Add --enable-inprocess-agent option.
884 * configure: Rebuilt.
886 2010-09-06 Yao Qi <yao@codesourcery.com>
888 * linux-low.c (linux_kill): Remove unused variable.
889 (linux_stabilize_threads): Likewise.
890 * server.c (start_inferior): Likewise.
891 (queue_stop_reply_callback): Likewise.
892 * tracepoint.c (do_action_at_tracepoint): Likewise.
894 2010-09-06 Yao Qi <yao@codesourcery.com>
896 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
899 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
901 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
903 2010-09-06 Pedro Alves <pedro@codesourcery.com>
905 * Makefile.in (install-only): Replace $IPA_DEPFILES with
908 2010-09-01 Joel Brobecker <brobecker@adacore.com>
910 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
911 gdbserver/lynx-ppc-low.c: New files.
912 * Makefile.in (lynx_low_h): New variable.
913 (lynx-low.o, lynx-ppc-low.o): New rules.
914 * configure.ac: On LynxOS, link with -lnetinet.
915 * configure.srv: Add handling of powerpc-*-lynxos* targets.
916 * configure: regenerate.
918 2010-09-01 Joel Brobecker <brobecker@adacore.com>
920 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
921 * configure.ac: Add check for vasprintf and vsnprintf.
922 * configure, config.in: Regenerate.
923 * server.h (vasprintf, vsnprintf): Add conditional declarations.
925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
927 * gdbreplay.c: Move include of alloca.h up, next to include of
929 * server.h: Add include of malloc.h.
930 * mem-break.c: Remove include of malloc.h.
931 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
933 2010-09-01 Joel Brobecker <brobecker@adacore.com>
935 * Makefile.in (memmem.o): Build with -Wno-error.
937 2010-09-01 Joel Brobecker <brobecker@adacore.com>
939 * utils.c (xsnprintf): Make non-static.
940 * server.h: Add xsnprintf declaration.
941 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
942 replace calls to snprintf by calls to xsnprintf throughout.
944 2010-09-01 Joel Brobecker <brobecker@adacore.com>
946 * configure.ac: Add configure check for alloca.
947 * configure, config.in: Regenerate.
948 * server.h: Include alloca.h if it exists.
949 * gdbreplay.c: Include alloca.h if it exists.
951 2010-08-28 Pedro Alves <pedro@codesourcery.com>
953 * linux-low.c (__SIGRTMIN): Define if not already defined.
954 (linux_create_inferior): Check for __ANDROID__ rather than
956 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
957 are already deferred.
958 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
959 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
960 stopped and already has a pending signal to report.
961 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
962 a pending signal to report or is moving out of a jump pad.
963 (linux_init_signals): Check for __ANDROID__ rather than
966 2010-08-28 Pedro Alves <pedro@codesourcery.com>
968 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
969 debug_threads check. Avoid a linear search when not doing debug
972 2010-08-27 Pedro Alves <pedro@codesourcery.com>
974 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
975 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
976 (struct file_handler) <fd>: Change type to gdb_fildes_t.
977 (process_event): Change local fd's type to gdb_fildes_t.
978 (create_file_handler): Adjust prototype.
979 (delete_file_handler): Adjust prototype.
980 (handle_file_event): Adjust prototype. Use pfildes.
981 (create_file_event): Adjsut prototype.
982 * remote-utils.c (remote_desc, listen_desc): Change type to
984 * server.h: New gdb_fildes_t typedef.
985 [USE_WIN32API]: Include winsock2.h.
986 (delete_file_handler, add_file_handler): Adjust prototypes.
988 * utils.c (pfildes): New.
990 2010-08-27 Pedro Alves <pedro@codesourcery.com>
992 * configure.ac (build_warnings): Add -Wno-char-subscripts.
993 * configure: Regenerate.
995 2010-08-27 Pedro Alves <pedro@codesourcery.com>
997 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
998 (linux_done_accessing_memory): ... this.
999 (linux_target_ops): Adjust.
1000 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1001 * nto-low.c (nto_target_ops): Adjust comment.
1002 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1003 * spu-low.c (spu_target_ops): Adjust comment.
1004 * target.h (target_ops): Rename unprepare_to_access_memory field
1005 to done_accessing_memory.
1006 (unprepare_to_access_memory): Rename to ...
1007 (done_accessing_memory): ... this.
1009 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1011 * linux-low.c (linux_prepare_to_access_memory): New.
1012 (linux_unprepare_to_access_memory): New.
1013 (linux_target_ops): Install them.
1014 * server.c (read_memory): Rename to ...
1015 (gdb_read_memory): ... this. Use
1016 prepare_to_access_memory/prepare_to_access_memory.
1017 (write_memory): Rename to ...
1018 (gdb_write_memory): ... this. Use
1019 prepare_to_access_memory/prepare_to_access_memory.
1020 (handle_search_memory_1): Adjust.
1021 (process_serial_event): Adjust.
1022 * target.h (struct target_ops): New fields
1023 prepare_to_access_memory and unprepare_to_access_memory.
1024 (prepare_to_access_memory, unprepare_to_access_memory): New.
1025 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1026 prepare_to_access_memory/prepare_to_access_memory.
1027 * nto-low.c (nto_target_ops): Adjust.
1028 * spu-low.c (spu_target_ops): Adjust.
1029 * win32-low.c (win32_target_ops): Adjust.
1031 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1033 * Makefile.in (WARN_CFLAGS): Get it from configure.
1034 (WERROR_CFLAGS): New.
1035 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1036 * configure.ac: Introduce --enable-werror, which adds -Werror to
1037 the compiler command line. Enabled by default. Disable with
1038 --disable-werror. Add -Wdeclaration-after-statement
1039 Wpointer-arith and -Wformat-nonliteral to warning flags.
1040 * configure: Regenerate.
1042 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1044 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1046 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1048 * gdbreplay.c (remote_error): New.
1050 (expect): Use gdbchar. Check for error reading from GDB.
1051 Clarify sync error output.
1052 (play): Check for errors writing to GDB.
1053 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1054 * remote-utils.c (getpkt): Check for errors writing to the remote
1057 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1059 * linux-low.c (linux_wait_1): Move non-debugging code out of
1060 `debug_threads' control.
1062 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1064 * linux-low.c (linux_wait_1): Don't set last_status here.
1065 * server.c (push_event, queue_stop_reply_callback): Assert we're
1066 not pushing a TARGET_WAITKIND_IGNORE event.
1067 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1068 (myresume, handle_target_event): Set the thread's last_resume_kind
1069 and last_status from the target returned status.
1071 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1075 * linux-x86-low.c (update_debug_registers_callback): New.
1076 (i386_dr_low_set_addr): Use it.
1077 (i386_dr_low_get_addr): New.
1078 (i386_dr_low_set_control): Use update_debug_registers_callback.
1079 (i386_dr_low_get_control): New.
1080 (i386_dr_low_get_status): Adjust.
1081 * linux-low.c (linux_stop_lwp): New.
1082 * linux-low.h (linux_stop_lwp): Declare.
1084 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1085 argument instead of a i386_debug_reg_state.
1086 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1087 a i386_debug_reg_state.
1088 (i386_insert_aligned_watchpoint): Adjust.
1089 (i386_remove_aligned_watchpoint): Adjust.
1090 (i386_low_stopped_data_address): Read the debug registers from the
1091 inferior instead of from the mirrors.
1092 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1093 (i386_dr_low_get_addr): Declare.
1094 (i386_dr_low_get_control): Declare.
1095 (i386_dr_low_get_status): Change prototype.
1097 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1098 (i386_dr_low_get_addr): New.
1099 (i386_dr_low_get_control): New.
1100 (i386_dr_low_get_status): Adjust prototype. Return
1102 (i386_initial_stuff): Clear dr_status_mirror and
1104 (i386_get_thread_context): Adjust.
1105 (i386_set_thread_context): Adjust.
1106 (i386_thread_added): Adjust.
1108 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1110 * linux-low.h (linux_thread_area): Delete declaration.
1112 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1114 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1115 after its termination.
1117 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1119 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1120 (gdb_wants_all_stopped): Delete.
1121 (linux_wait_1): Don't call them.
1122 * server.c (handle_v_cont): Tag all threads as want-stopped.
1123 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1124 stopped as "client-wants-stopped".
1126 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1128 * Makefile.in (signals_h): New.
1129 (server_h): Depend on it.
1130 (server.o): Don't depend on $(signals_def).
1131 (signals.o): Depend on $(signals_def).
1133 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1135 * Makefile.in (signals_def): New.
1136 (server_h): Append include/gdb/signals.h and signals_def.
1137 (server.o): Append signals_def.
1139 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1141 * server.c (handle_target_event): Use target_signal_to_host for
1142 resume_info.sig initialization.
1143 * target.h (struct thread_resume) <sig>: New comment.
1145 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1147 * server.c (handle_query): strcpy() the returned string from paddress()
1148 instead of sprintf().
1149 * utils.c (paddress): Return phex_nz().
1151 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1153 * server.c (handle_v_cont): Call mourn_inferior if process
1155 (myresume): Likewise.
1157 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1159 Static tracepoints, and integration with UST.
1161 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1162 * mem-break.c (uninsert_all_breakpoints)
1163 (reinsert_all_breakpoints): New.
1164 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1165 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1166 (gdb_agent_ust_loaded, helper_thread_id)
1167 (gdb_agent_helper_thread_id): New macros.
1168 (struct ipa_sym_addresses): Add addr_ust_loaded,
1169 addr_helper_thread_id, addr_cmd_buf.
1170 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1171 (in_process_agent_loaded_ust): New.
1172 (write_e_ust_not_loaded): New.
1173 (maybe_write_ipa_ust_not_loaded): New.
1174 (struct collect_static_trace_data_action): New.
1175 (enum tracepoint_type) <static_tracepoint>: New.
1176 (struct tracepoint) <handle>: Mention static tracepoints.
1177 (struct static_tracepoint_ctx): New.
1178 (CMD_BUF_SIZE): New.
1179 (add_tracepoint_action): Handle static tracepoint actions.
1180 (unprobe_marker_at): New.
1181 (clear_installed_tracepoints): Handle static tracepoints.
1182 (cmd_qtdp): Handle static tracepoints.
1183 (probe_marker_at): New.
1184 (cmd_qtstart): Handle static tracepoints.
1185 (response_tracepoint): Handle static tracepoints.
1186 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1187 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1188 (get_context_regcache): Handle static tracepoints.
1189 (do_action_at_tracepoint): Handle static tracepoint actions.
1190 (traceframe_find_block_type): Handle static trace data blocks.
1191 (traceframe_read_sdata): New.
1192 (download_tracepoints): Download static tracepoint actions.
1193 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1194 (GDB_PROBE_NAME): New.
1199 (ust_marker_to_static_tracepoint): New.
1201 (collect_ust_data_at_tracepoint): New.
1202 (gdb_ust_probe): New.
1203 (UNIX_PATH_MAX, SOCK_DIR): New.
1204 (gdb_ust_connect_sync_socket): New.
1205 (resume_thread, stop_thread): New.
1206 (run_inferior_command): New.
1207 (init_named_socket): New.
1208 (gdb_ust_socket_init): New.
1209 (cstr_to_hexstr): New.
1211 (first_marker, next_marker): New.
1212 (response_ust_marker): New.
1213 (cmd_qtfstm, cmd_qtsstm): New.
1214 (unprobe_marker_at, probe_marker_at): New.
1215 (cmd_qtstmat, gdb_ust_thread): New.
1216 (gdb_ust_init): New.
1217 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1218 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1220 (x86_64_st_collect_regmap): New.
1221 (X86_64_NUM_ST_COLLECT_GREGS): New.
1222 (AMD64_RIP_REGNUM): New.
1223 (supply_static_tracepoint_registers): New.
1224 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1226 (i386_st_collect_regmap): New.
1227 (i386_NUM_ST_COLLECT_GREGS): New.
1228 (supply_static_tracepoint_registers): New.
1229 * server.c (handle_query): Handle qXfer:statictrace:read.
1230 <qSupported>: Report support for StaticTracepoints, and
1231 qXfer:statictrace:read features.
1232 * server.h (traceframe_read_sdata)
1233 (supply_static_tracepoint_registers): Declare.
1234 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1235 (unpack_varlen_hex): Include in IPA build.
1236 * Makefile.in (ustlibs, ustinc): New.
1237 (IPA_OBJS): Add remote-utils-ipa.o.
1238 ($(IPA_LIB)): Link -ldl and -lpthread.
1240 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1241 * config.in, configure: Regenerate.
1243 2010-06-20 Ian Lance Taylor <iant@google.com>
1244 Pedro Alves <pedro@codesourcery.com>
1246 * linux-x86-low.c (always_true): Delete.
1247 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1248 trying to fool the compiler with always_true.
1250 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1252 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1253 conditions in gdbserver.
1255 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1257 * spu-low.c (spu_read_memory): Wrap around local store limit.
1258 (spu_write_memory): Likewise.
1260 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1262 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1263 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1265 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1267 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1268 uses with LONGEST uses.
1270 2010-06-14 Stan Shebs <stan@codesourcery.com>
1271 Pedro Alves <pedro@codesourcery.com>
1275 * linux-x86-low.c: Include limits.h.
1280 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1281 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1282 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1283 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1284 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1285 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1286 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1287 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1288 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1289 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1290 (amd64_emit_void_call_2): New.
1291 (amd64_emit_ops): New.
1292 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1293 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1294 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1295 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1296 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1297 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1298 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1299 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1300 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1301 (i386_emit_stack_adjust, i386_emit_int_call_1)
1302 (i386_emit_void_call_2): New.
1303 (i386_emit_ops): New.
1304 (x86_emit_ops): New.
1305 (the_low_target): Install x86_emit_ops.
1306 * server.h (struct emit_ops): New.
1307 (get_raw_reg_func_addr): Declare.
1308 (current_insn_ptr, emit_error): Declare.
1309 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1310 (set_trace_state_variable_value): New defines.
1311 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1312 addr_get_trace_state_variable_value and
1313 addr_set_trace_state_variable_value.
1314 (symbol_list): New fields for get_raw_reg,
1315 get_trace_state_variable_value and set_trace_state_variable_value.
1316 (condfn): New typedef.
1317 (struct tracepoint): New field `compiled_cond'.
1318 (do_action_at_tracepoint): Clear compiled_cond.
1319 (get_trace_state_variable_value, set_trace_state_variable_value):
1321 (condition_true_at_tracepoint): If there's a compiled condition,
1323 (current_insn_ptr, emit_error): New globals.
1324 (struct bytecode_address): New.
1325 (get_raw_reg_func_addr): New.
1326 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1327 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1328 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1329 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1330 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1331 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1332 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1333 (compile_tracepoint_condition, compile_bytecodes): New.
1334 * target.h (emit_ops): Forward declare.
1335 (struct target_ops): New field emit_ops.
1336 (target_emit_ops): New.
1337 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1338 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1339 * linux-low.c (linux_emit_ops): New.
1340 (linux_target_ops): Install it.
1341 * linux-low.h (struct linux_target_ops): New field emit_ops.
1343 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1345 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1346 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1348 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1349 Stan Shebs <stan@codesourcery.com>
1351 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1352 (all): Depend on $(extra_libraries).
1353 (install-only): Install the IPA.
1354 (IPA_OBJS, IPA_LIB): New.
1355 (clean): Remove the IPA lib.
1356 (IPAGENT_CFLAGS): New.
1357 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1358 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1359 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1360 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1361 * configure.ac: Check for atomic builtins support in the compiler.
1362 (IPA_DEPFILES, extra_libraries): Define.
1363 * configure.srv (ipa_obj): Add description.
1364 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1365 (i[34567]86-*-linux*): Set ipa_obj.
1366 (x86_64-*-linux*): Set ipa_obj.
1367 * linux-low.c (stabilizing_threads): New.
1368 (supports_fast_tracepoints): New.
1369 (linux_detach): Stabilize threads before detaching.
1370 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1371 the lwp is either not stabilizing, or is moving out of a jump pad.
1372 (linux_fast_tracepoint_collecting): New.
1373 (maybe_move_out_of_jump_pad): New.
1374 (enqueue_one_deferred_signal): New.
1375 (dequeue_one_deferred_signal): New.
1376 (linux_wait_for_event_1): If moving out of a jump pad, defer
1377 pending signals to later.
1378 (linux_stabilize_threads): New.
1379 (linux_wait_1): Check if threads need moving out of jump pads, and
1381 (stuck_in_jump_pad_callback): New.
1382 (move_out_of_jump_pad_callback): New.
1384 (linux_resume_one_lwp): Handle moving out of jump pads.
1385 (linux_set_resume_request): Dequeue deferred signals.
1386 (need_step_over_p): Also step over fast tracepoint jumps.
1387 (start_step_over): Also uninsert fast tracepoint jumps.
1388 (finish_step_over): Also reinsert fast tracepoint jumps.
1389 (linux_install_fast_tracepoint_jump): New.
1390 (linux_target_ops): Install linux_stabilize_threads and
1391 linux_install_fast_tracepoint_jump_pad.
1392 * linux-low.h (linux_target_ops) <get_thread_area,
1393 install_fast_tracepoint_jump_pad>: New fields.
1394 (struct lwp_info) <collecting_fast_tracepoint,
1395 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1396 (linux_get_thread_area): Declare.
1397 * linux-x86-low.c (jump_insn): New.
1398 (x86_get_thread_area): New.
1399 (append_insns): New.
1401 (amd64_install_fast_tracepoint_jump_pad): New.
1402 (i386_install_fast_tracepoint_jump_pad): New.
1403 (x86_install_fast_tracepoint_jump_pad): New.
1404 (the_low_target): Install x86_get_thread_area and
1405 x86_install_fast_tracepoint_jump_pad.
1406 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1407 (struct fast_tracepoint_jump): New.
1408 (fast_tracepoint_jump_insn): New.
1409 (fast_tracepoint_jump_shadow): New.
1410 (find_fast_tracepoint_jump_at): New.
1411 (fast_tracepoint_jump_here): New.
1412 (delete_fast_tracepoint_jump): New.
1413 (set_fast_tracepoint_jump): New.
1414 (uninsert_fast_tracepoint_jumps_at): New.
1415 (reinsert_fast_tracepoint_jumps_at): New.
1416 (set_breakpoint_at): Use write_inferior_memory.
1417 (uninsert_raw_breakpoint): Use write_inferior_memory.
1418 (check_mem_read): Mask out fast tracepoint jumps.
1419 (check_mem_write): Mask out fast tracepoint jumps.
1420 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1421 (set_fast_tracepoint_jump): Declare.
1422 (delete_fast_tracepoint_jump)
1423 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1424 (reinsert_fast_tracepoint_jumps_at): Declare.
1425 * regcache.c: Don't compile many functions when building the
1426 in-process agent library.
1427 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1428 the register buffer in the heap.
1429 (free_register_cache): If the register buffer isn't owned by the
1430 regcache, don't free it.
1431 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1432 pre-existing register caches.
1433 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1435 (convert_ascii_to_int): : Constify `from' parameter type.
1436 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1437 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1438 the needed buffer in-place.
1439 (relocate_instruction): New.
1440 * server.c (handle_query) <qSymbols>: If the target supports
1441 tracepoints, give it a chance of looking up symbols. Report
1442 support for fast tracepoints.
1443 (handle_status): Stabilize threads.
1444 (process_serial_event): Adjust.
1445 * server.h (struct fast_tracepoint_jump): Forward declare.
1446 (struct process_info) <fast_tracepoint_jumps>: New field.
1447 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1448 (decode_X_packet, decode_M_packet): Adjust.
1449 (relocate_instruction): Declare.
1450 (in_process_agent_loaded): Declare.
1451 (tracepoint_look_up_symbols): Declare.
1452 (struct fast_tpoint_collect_status): Declare.
1453 (fast_tracepoint_collecting): Declare.
1454 (force_unlock_trace_buffer): Declare.
1455 (handle_tracepoint_bkpts): Declare.
1456 (initialize_low_tracepoint)
1457 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1458 * target.h (struct target_ops) <stabilize_threads,
1459 install_fast_tracepoint_jump_pad>: New fields.
1460 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1461 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1462 [HAVE_STDINT_H]: Include stdint.h.
1463 (trace_debug_1): Rename to ...
1464 (trace_vdebug): ... this.
1465 (trace_debug): Rename to ...
1466 (trace_debug_1): ... this. Add `level' parameter.
1468 (ATTR_USED, ATTR_NOINLINE): New.
1469 (IP_AGENT_EXPORT): New.
1470 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1471 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1472 (about_to_request_buffer_space, trace_buffer_is_full)
1473 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1474 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1475 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1476 (traceframe_write_count, traceframes_created)
1477 (trace_state_variables)
1478 New renaming defines.
1479 (struct ipa_sym_addresses): New.
1480 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1482 (ipa_sym_addrs): New.
1483 (all_tracepoint_symbols_looked_up): New.
1484 (in_process_agent_loaded): New.
1485 (write_e_ipa_not_loaded): New.
1486 (maybe_write_ipa_not_loaded): New.
1487 (tracepoint_look_up_symbols): New.
1488 (debug_threads) [IN_PROCESS_AGENT]: New.
1489 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1490 (UNKNOWN_SIDE_EFFECTS): New.
1491 (stop_tracing): New.
1492 (flush_trace_buffer): New.
1493 (stop_tracing_bkpt): New.
1494 (flush_trace_buffer_bkpt): New.
1495 (read_inferior_integer): New.
1496 (read_inferior_uinteger): New.
1497 (read_inferior_data_pointer): New.
1498 (write_inferior_data_pointer): New.
1499 (write_inferior_integer): New.
1500 (write_inferior_uinteger): New.
1501 (struct collect_static_trace_data_action): Delete.
1502 (enum tracepoint_type): New.
1503 (struct tracepoint) <type>: New field `type'.
1504 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1505 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1506 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1507 (tracepoints): Use IP_AGENT_EXPORT.
1508 (last_tracepoint): Don't include in the IPA.
1509 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1510 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1511 (alloced_trace_state_variables): New.
1512 (trace_state_variables): Use IP_AGENT_EXPORT.
1513 (traceframe_t): Delete unused variable.
1514 (circular_trace_buffer): Don't include in the IPA.
1515 (trace_buffer_start): Delete.
1516 (struct trace_buffer_control): New.
1517 (trace_buffer_free): Delete.
1518 (struct ipa_trace_buffer_control): New.
1519 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1520 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1522 (trace_buffer_ctrl): New.
1523 (TRACE_BUFFER_CTRL_CURR): New.
1524 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1525 Reimplement as macros.
1526 (trace_buffer_wrap): Delete.
1527 (traceframe_write_count, traceframe_read_count)
1528 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1529 (struct tracepoint_hit_ctx) <type>: New field.
1530 (struct fast_tracepoint_ctx): New.
1531 (memory_barrier): New.
1533 (record_tracepoint_error): Update atomically in the IPA.
1534 (clear_inferior_trace_buffer): New.
1535 (about_to_request_buffer_space): New.
1536 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1537 updating the same buffer.
1538 (add_tracepoint): Default the tracepoint's type to trap
1539 tracepoint, and orig_size to -1.
1540 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1542 (create_trace_state_variable): New parameter `gdb'. Handle it.
1543 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1544 (cmd_qtdp): Handle fast tracepoints.
1546 (max_jump_pad_size): New.
1547 (gdb_jump_pad_head): New.
1548 (get_jump_space_head): New.
1549 (claim_jump_space): New.
1550 (sort_tracepoints): New.
1551 (MAX_JUMP_SIZE): New.
1552 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1554 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1555 support. Upload fast traceframes, and delete internal IPA
1557 (stop_tracing_handler): New.
1558 (flush_trace_buffer_handler): New.
1559 (cmd_qtstop): Upload fast tracepoints.
1560 (response_tracepoint): Handle fast tracepoints.
1561 (tracepoint_finished_step): Upload fast traceframes. Set the
1562 tracepoint hit context's tracepoint type.
1563 (handle_tracepoint_bkpts): New.
1564 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1565 type. Add comment about fast tracepoints.
1566 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1567 non-existing action_str field.
1568 (get_context_regcache): Handle fast tracepoints.
1569 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1571 (fast_tracepoint_from_jump_pad_address): New.
1572 (fast_tracepoint_from_ipa_tpoint_address): New.
1573 (collecting_t): New.
1574 (force_unlock_trace_buffer): New.
1575 (fast_tracepoint_collecting): New.
1578 (write_inferior_data_ptr): New.
1579 (target_tp_heap): New.
1580 (target_malloc): New.
1581 (download_agent_expr): New.
1583 (download_tracepoints): New.
1584 (download_trace_state_variables): New.
1585 (upload_fast_traceframes): New.
1586 (IPA_FIRST_TRACEFRAME): New.
1587 (IPA_NEXT_TRACEFRAME_1): New.
1588 (IPA_NEXT_TRACEFRAME): New.
1589 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1590 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1591 (gdb_jump_pad_buffer_end): New.
1592 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1593 (initialize_tracepoint): Adjust.
1594 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1595 buffer. Initialize the low module.
1596 * utils.c (PREFIX, TOOLNAME): New.
1597 (malloc_failure): Use PREFIX.
1598 (error): In the IPA, an error causes an exit.
1599 (fatal, warning): Use PREFIX.
1600 (internal_error): Use TOOLNAME.
1601 (NUMCELLS): Increase to 10.
1602 * configure, config.in: Regenerate.
1604 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1606 * server.c (handle_query) <qSupported>: Do two passes over the
1607 qSupported string to avoid nesting strtok.
1609 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1611 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1613 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1615 * configure: Regenerate.
1616 * proc-service.list: New.
1618 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1620 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1623 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1625 * gdbreplay.c (remote_open): Check error return from socket() call by
1626 its equality to -1 not by it being negative.
1627 * remote-utils.c (remote_open): Likewise.
1629 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1631 * config.h: Regenerate.
1633 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1635 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1636 doesn't provide PTRACE_GET_THREAD_AREA.
1638 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1640 * linux-m68k-low.c: Include <asm/ptrace.h>
1641 (ps_get_thread_area): Implement.
1643 2010-05-03 Doug Evans <dje@google.com>
1645 * event-loop.c (struct callback_event): New struct.
1646 (callback_list): New global.
1647 (append_callback_event, delete_callback_event): New functions.
1648 (process_callback): New function.
1649 (start_event_loop): Call it.
1650 * remote-utils.c (NOT_SCHEDULED): Define.
1651 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1652 moved out of readchar.
1653 (readchar): Rewrite. Call reschedule before returning.
1654 (reset_readchar): New function.
1655 (remote_close): Call it.
1656 (process_remaining, reschedule): New functions.
1657 * server.h (callback_handler_func): New typedef.
1658 (append_callback_event, delete_callback_event): Declare.
1660 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1662 * proc-service.c (ps_pglobal_lookup): Use
1663 thread_db_look_up_one_symbol.
1664 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1665 parameter. Use it instead of all_symbols_looked_up.
1666 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1668 (all_symbols_looked_up): Don't declare.
1669 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1670 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1672 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1673 Set all_symbols_looked_up here.
1674 (thread_db_look_up_one_symbol): New.
1675 (thread_db_get_tls_address): Adjust.
1676 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1677 thread_db object on the heap, and tentatively set it in the
1679 (thread_db_init): Don't set all_symbols_looked_up here.
1680 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1682 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1684 * linux-low.c (linux_kill, linux_detach): Adjust.
1685 (status_pending_p_callback): Remove redundant statement. Check
1686 for !TARGET_WAITIKIND_IGNORE, instead of
1687 TARGET_WAITKIND_STOPPED.
1688 (handle_tracepoints): Make sure LWP is locked. Adjust.
1689 (linux_wait_for_event_1): Adjust.
1690 (linux_cancel_breakpoints): New.
1691 (unsuspend_one_lwp): New.
1692 (unsuspend_all_lwps): New.
1693 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1694 (send_sigstop_callback): Change return type to int, add new
1695 `except' parameter and handle it.
1696 (suspend_and_send_sigstop_callback): New.
1697 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1698 pass them down. If SUSPEND, also increment the lwp's suspend
1700 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1701 (need_step_over_p): Don't consider suspended LWPs.
1702 (start_step_over): Adjust.
1703 (proceed_one_lwp): Change return type to int, add new `except'
1704 parameter and handle it.
1705 (unsuspend_and_proceed_one_lwp): New.
1706 (proceed_all_lwps): Use find_inferior instead of
1708 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1709 also decrement the suspend count of LWPs. Pass `except' down,
1710 instead of hacking its suspend count.
1711 (linux_pause_all): Add `freeze' parameter. Adjust.
1712 (linux_unpause_all): New.
1713 (linux_target_ops): Install linux_unpause_all.
1714 * server.c (handle_status): Adjust.
1715 * target.h (struct target_ops): New fields `unpause_all' and
1716 `cancel_breakpoints'. Add new parameter to `pause_all'.
1717 (pause_all): Add new `freeze' parameter.
1719 (cancel_breakpoints): New.
1720 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1722 (cmd_qtstart): Pause threads.
1723 (stop_tracing): Pause threads, and cancel breakpoints.
1724 * win32-low.c (win32_target_ops): Adjust.
1726 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1728 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1729 the inferior right away from here...
1730 (linux_wait_1): ... to here, and adjust to check the thread's
1731 last_resume_kind instead of the lwp's step or stop_expected flags.
1733 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1735 * README: Use consistent `GDB' and `GDBserver' spellings.
1737 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1739 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1740 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1741 (linux_detach_one_lwp): Assume the lwp is stopped.
1742 (any_thread_of): Delete.
1743 (linux_detach): Stop all lwps here. Don't blindly delete all
1745 (delete_lwp_callback): New.
1746 (linux_mourn): Delete all lwps of the process that is gone.
1747 (linux_wait_1): Don't delete the last lwp of the process here.
1748 * mem-break.h (mark_breakpoints_out): Declare.
1749 * mem-break.c (mark_breakpoints_out): New.
1750 (free_all_breakpoints): Use it.
1751 * server.c (handle_target_event): If the process is gone, mark
1753 * thread-db.c (struct thread_db) <create_bp>: New field.
1754 (thread_db_enable_reporting): Fix prototype. Store a thread event
1755 breakpoint reference in the thread_db struct.
1756 (thread_db_load_search): Clear the thread_db object.
1757 (try_thread_db_load_1): Ditto.
1758 (switch_to_process): New.
1759 (disable_thread_event_reporting): Use it.
1760 (remove_thread_event_breakpoints): New.
1761 (thread_db_detach, thread_db_mourn): Use it.
1763 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1765 * linux-low.c (linux_enable_event_reporting): New.
1766 (linux_wait_for_event_1, handle_extended_wait): Use it.
1768 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1770 * linux-low.c (linux_kill_one_lwp, linux_kill)
1771 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1772 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1773 SIGSTOP even if the LWP is stopped.
1774 (send_sigstop_callback): New.
1775 (stop_all_lwps): Use send_sigstop_callback instead.
1776 (linux_resume_one_thread): Adjust.
1777 (proceed_one_lwp): Still proceed an LWP that the client has
1778 requested to stop, if we haven't reported it as stopped yet. Make
1779 sure that LWPs the client want stopped, have a pending SIGSTOP.
1781 2010-04-26 Doug Evans <dje@google.com>
1783 * server.c (handle_general_set): Make static.
1785 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1786 Print received char after testing for error/eof instead of before.
1787 (input_interrupt): Tweak comment.
1789 2010-04-23 Doug Evans <dje@google.com>
1791 * server.c (start_inferior): Print inferior argv if --debug.
1793 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1795 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1796 * nto-x86-low.c: Include server.h
1798 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1800 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1801 be consistent with other sources of this directory.
1802 (init_registers_amd64): Correct name of source file of this function
1805 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1807 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1810 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1812 * win32-i386-low.c: Add 64-bit support.
1813 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1814 (init_registers_amd64): Declare.
1815 (mappings): Add 64-bit version of array.
1816 (init_windows_x86): New function.
1817 (the_low_target): Change init_arch field to init_windows_x86.
1819 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1821 * win32-low.c: Adapt to support also 64-bit architecture.
1822 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1823 (get_image_name): Use SIZE_T type for local variable `done'.
1824 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1825 (toolhelp_get_dll_name): Idem.
1826 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1827 Use uintptr_t typecast to avoid warning.
1828 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1829 (handle_exception): Use phex_nz to avoid warning.
1830 (win32_wait): Remove unused local variable `process'.
1832 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1834 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1837 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1839 * configure.ac: Use `ws2_32' library for srv_mingw.
1840 * configure: Regenerate.
1841 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1842 * remote-utils.c: Likewise.
1844 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1846 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1847 if __x86_64__ is defined.
1849 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1851 * configure: Regenerate.
1853 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1855 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1856 * target.h (target_ops): New get_tib_address field.
1857 * win32-low.h (win32_thread_info): Add thread_local_base field.
1858 * win32-low.c (child_add_thread): Add tlb argument.
1859 Set thread_local_base field to TLB.
1860 (get_child_debug_event): Adapt to child_add_thread change.
1861 (win32_get_tib_address): New function.
1862 (win32_target_ops): Set get_tib_address field to
1863 win32_get_tib_address.
1864 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1866 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1868 * linux-low.c (linux_mourn): Also remove the process.
1869 * server.c (handle_target_event): Don't remove the process here.
1870 * nto-low.c (nto_mourn): New.
1871 (nto_target_ops): Install it.
1872 * spu-low.c (spu_mourn): New.
1873 (spu_target_ops): Install it.
1874 * win32-low.c (win32_mourn): New.
1875 (win32_target_ops): Install it.
1877 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1879 * server.h (buffer_xml_printf): Remove redundant `;'.
1881 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1883 * regcache.c (set_register_cache): Invalidate regcaches before
1884 changing the register cache layout.
1885 (regcache_invalidate_one): Allow a NULL regcache.
1886 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1887 regcaches before changing the register cache layout or the target
1890 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1892 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1893 variable warning on Linux/x86-64.
1895 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1897 GDBserver disconnected tracing support.
1899 * linux-low.c (linux_remove_process): Delete.
1900 (add_lwp): Don't set last_resume_kind here.
1901 (linux_kill): Use `mourn'.
1902 (linux_detach): Use `thread_db_detach', and `mourn'.
1904 (linux_attach_lwp_1): Adjust comment.
1905 (linux_attach): last_resume_kind moved the thread_info; adjust.
1906 (status_pending_p_callback): Adjust.
1907 (linux_wait_for_event_1): Adjust.
1908 (count_events_callback, select_singlestep_lwp_callback)
1909 (select_event_lwp_callback, cancel_breakpoints_callback)
1910 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1911 (proceed_one_lwp): Adjust.
1912 (linux_async): Add debug output.
1913 (linux_thread_stopped): New.
1914 (linux_pause_all): New.
1915 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1917 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1918 (thread_db_free): Delete declaration.
1919 (thread_db_detach, thread_db_mourn): Declare.
1920 * thread-db.c (thread_db_init): Use thread_db_mourn.
1921 (thread_db_free): Delete, split in two.
1922 (disable_thread_event_reporting): New.
1923 (thread_db_detach): New.
1924 (thread_db_mourn): New.
1926 * server.h (struct thread_info) <last_resume_kind>: New field.
1927 <attached>: Add comment.
1928 <gdb_detached>: New field.
1929 (handler_func): Change return type to int.
1930 (handle_serial_event, handle_target_event): Ditto.
1931 (gdb_connected): Declare.
1933 (disconnected_tracing): Declare.
1934 (stop_tracing): Declare.
1936 * server.c (handle_query) <qSupported>: Report support for
1937 disconnected tracing.
1938 (queue_stop_reply_callback): Account for running threads.
1939 (gdb_wants_thread_stopped): New.
1940 (gdb_wants_all_threads_stopped): New.
1941 (gdb_reattached_process): New.
1942 (handle_status): Clear the `gdb_detached' flag of all processes.
1943 In all-stop, stop all threads.
1944 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1945 (process_serial_event): If the remote connection breaks, or if an
1946 exit was forced with "monitor exit", force an event loop exit.
1947 Handle disconnected tracing on detach.
1948 (handle_serial_event): Adjust.
1949 (handle_target_event): If GDB isn't connected, forward events back
1950 to the inferior, unless the last process exited, in which case,
1951 exit gdbserver. Adjust interface.
1953 * remote-utils.c (remote_open): Don't block in accept. Instead
1954 register an event loop source on the listen socket file
1955 descriptor. Refactor bits into ...
1956 (listen_desc): ... this new global.
1957 (gdb_connected): ... this new function.
1958 (enable_async_notification): ... this new function.
1959 (handle_accept_event): ... this new function.
1960 (remote_close): Clear remote_desc.
1962 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1964 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1966 (mourn_inferior): Define.
1967 (target_process_qsupported): Avoid the dangling else problem.
1968 (thread_stopped): Define.
1969 (pause_all): Define.
1970 (target_waitstatus_to_string): Declare.
1971 * target.c (target_waitstatus_to_string): New.
1973 * tracepoint.c (tracing): Make extern.
1974 (disconnected_tracing): New.
1975 (stop_tracing): Make extern. Handle tracing stops due to GDB
1977 (cmd_qtdisconnected): New.
1978 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1979 (handle_tracepoint_general_set): Handle QTDisconnected.
1981 * event-loop.c (event_handler_func): Change return type to int.
1982 (process_event): Bail out if the event handler wants the event
1984 (handle_file_event): Ditto.
1985 (start_event_loop): Bail out if the event handler wants the event
1988 * nto-low.c (nto_target_ops): Adjust.
1989 * spu-low.c (spu_wait): Don't remove the process here.
1990 (spu_target_ops): Adjust.
1991 * win32-low.c (win32_wait): Don't remove the process here.
1992 (win32_target_ops): Adjust.
1994 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1996 * regcache.c (realloc_register_cache): Invalidate inferior's
1997 regcache before recreating it.
1999 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2001 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2003 2010-04-09 Stan Shebs <stan@codesourcery.com>
2004 Pedro Alves <pedro@codesourcery.com>
2006 * server.h (LONGEST): New.
2007 (struct thread_info) <while_stepping>: New field.
2008 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2010 (initialize_tracepoint, handle_tracepoint_general_set)
2011 (handle_tracepoint_query, tracepoint_finished_step)
2012 (tracepoint_was_hit, release_while_stepping_state_list):
2013 (current_traceframe): Declare.
2014 * server.c (handle_general_set): Handle tracepoint packets.
2016 (write_memory): New.
2017 (handle_search_memory_1): Use read_memory.
2018 (handle_query): Report support for conditional tracepoints, trace
2019 state variables, and tracepoint sources. Handle tracepoint
2021 (main): Initialize the tracepoints module.
2022 (process_serial_event): Handle traceframe reads/writes.
2024 * linux-low.c (handle_tracepoints): New.
2025 (linux_wait_1): Call it.
2026 (linux_resume_one_lwp): Handle while-stepping.
2027 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2028 (linux_target_ops): Install them.
2029 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2031 * linux-x86-low.c (x86_supports_tracepoints): New.
2032 (the_low_target). Install it.
2034 * mem-break.h (delete_breakpoint): Declare.
2035 * mem-break.c (delete_breakpoint): Make external.
2037 * target.h (struct target_ops): Add `supports_tracepoints',
2038 `read_pc', and `write_pc' fields.
2039 (target_supports_tracepoints): Define.
2040 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2043 * regcache.h (struct regcache) <registers_owned>: New field.
2044 (init_register_cache, regcache_cpy): Declare.
2045 (regcache_read_pc, regcache_write_pc): Declare.
2046 (register_cache_size): Declare.
2047 (supply_regblock): Declare.
2048 * regcache.c (init_register_cache): New.
2049 (new_register_cache): Use it.
2050 (regcache_cpy): New.
2051 (register_cache_size): New.
2052 (supply_regblock): New.
2053 (regcache_read_pc, regcache_write_pc): New.
2055 * tracepoint.c: New.
2057 * Makefile.in (OBS): Add tracepoint.o.
2058 (tracepoint.o): New rule.
2060 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2062 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2064 (i386-mmx.c): Likewise.
2065 (i386-mmx-linux.o): Likewise.
2066 (i386-mmx-linux.c): Likewise.
2068 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2069 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2070 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2071 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2073 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2074 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2075 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2077 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2079 * Makefile.in (clean): Updated.
2081 (i386-avx.c): Likewise.
2082 (i386-avx-linux.o): Likewise.
2083 (i386-avx-linux.c): Likewise.
2084 (amd64-avx.o): Likewise.
2085 (amd64-avx.c): Likewise.
2086 (amd64-avx-linux.o): Likewise.
2087 (amd64-avx-linux.c): Likewise.
2089 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2090 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2091 (srv_amd64_regobj): Add amd64-avx.o.
2092 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2093 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2094 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2095 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2096 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2097 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2098 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2100 * i387-fp.c: Include "i386-xstate.h".
2102 (i387_cache_to_xsave): Likewise.
2103 (i387_xsave_to_cache): Likewise.
2104 (x86_xcr0): Likewise.
2106 * i387-fp.h (i387_cache_to_xsave): Likewise.
2107 (i387_xsave_to_cache): Likewise.
2108 (x86_xcr0): Likewise.
2110 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2111 * linux-crisv32-low.c (target_regsets): Likewise.
2112 * linux-m68k-low.c (target_regsets): Likewise.
2113 * linux-mips-low.c (target_regsets): Likewise.
2114 * linux-ppc-low.c (target_regsets): Likewise.
2115 * linux-s390-low.c (target_regsets): Likewise.
2116 * linux-sh-low.c (target_regsets): Likewise.
2117 * linux-sparc-low.c (target_regsets): Likewise.
2118 * linux-xtensa-low.c (target_regsets): Likewise.
2120 * linux-low.c: Include <sys/uio.h>.
2121 (regsets_fetch_inferior_registers): Support nt_type.
2122 (regsets_store_inferior_registers): Likewise.
2123 (linux_process_qsupported): New.
2124 (linux_target_ops): Add linux_process_qsupported.
2126 * linux-low.h (regset_info): Add nt_type.
2127 (linux_target_ops): Add process_qsupported.
2129 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2131 (init_registers_i386_avx_linux): New.
2132 (init_registers_amd64_avx_linux): Likewise.
2133 (xmltarget_i386_linux_no_xml): Likewise.
2134 (xmltarget_amd64_linux_no_xml): Likewise.
2135 (PTRACE_GETREGSET): Likewise.
2136 (PTRACE_SETREGSET): Likewise.
2137 (x86_fill_xstateregset): Likewise.
2138 (x86_store_xstateregset): Likewise.
2139 (use_xml): Likewise.
2140 (x86_linux_update_xmltarget): Likewise.
2141 (x86_linux_process_qsupported): Likewise.
2142 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2143 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2144 init_registers_i386_linux here. Call
2145 x86_linux_update_xmltarget.
2146 (the_low_target): Add x86_linux_process_qsupported.
2148 * server.c (handle_query): Call target_process_qsupported.
2150 * target.h (target_ops): Add process_qsupported.
2151 (target_process_qsupported): New.
2153 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2155 * inferiors.c (add_thread): Set last_status kind to
2156 TARGET_WAITKIND_IGNORE.
2157 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2158 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2159 (linux_wait_1): Move `thread' local definition to block that uses
2160 it. Don't NULL initialize `event_child'.
2161 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2162 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2163 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2165 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2167 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2168 an extended waitstatus, or by a watchpoint.
2169 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2170 thread was stepping or has been stopped by a watchpoint.
2172 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2174 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2175 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2176 of another, then delete the previous, and validate all
2178 (validate_inserted_breakpoint): New.
2179 (delete_disabled_breakpoints): New.
2180 (validate_breakpoints): New.
2181 (check_mem_read): Validate breakpoints before trusting their
2182 shadow. Delete disabled breakpoints.
2183 (check_mem_write): Validate breakpoints before trusting they
2184 should be inserted. Delete disabled breakpoints.
2185 * mem-break.h (validate_breakpoints):
2186 * server.c (handle_query): Validate breakpoints when we see a
2189 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2191 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2192 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2193 if we could tell there's a GDB breakpoint at stop_pc.
2194 (need_step_over_p): Don't do a step over if we find a GDB
2195 breakpoint at the resume PC.
2197 * mem-break.c (struct raw_breakpoint): New.
2198 (enum bkpt_type): New type `gdb_breakpoint'.
2199 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2200 fields. New field `raw'.
2201 (find_raw_breakpoint_at): New.
2202 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2204 (set_breakpoint_at): Adjust.
2205 (delete_raw_breakpoint): New.
2206 (release_breakpoint): New.
2207 (delete_breakpoint): Rename to...
2208 (delete_breakpoint_1): ... this. Add proc parameter. Use
2209 release_breakpoint. Return ENOENT.
2210 (delete_breakpoint): Reimplement.
2211 (find_breakpoint_at): Delete.
2212 (find_gdb_breakpoint_at): New.
2213 (delete_breakpoint_at): Delete.
2214 (set_gdb_breakpoint_at): New.
2215 (delete_gdb_breakpoint_at): New.
2216 (gdb_breakpoint_here): New.
2217 (set_reinsert_breakpoint): Use release_breakpoint.
2218 (uninsert_breakpoint): Rename to ...
2219 (uninsert_raw_breakpoint): ... this.
2220 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2221 (reinsert_raw_breakpoint): Change parameter type to
2223 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2225 (check_breakpoints): Adjust. Use release_breakpoint.
2226 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2227 (breakpoint_inserted_here): Ditto.
2228 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2229 Don't trust the breakpoint's shadow if it is not inserted.
2230 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2231 (delete_all_breakpoints): Adjust.
2232 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2233 use delete_breakpoint_1.
2235 * mem-break.h (breakpoints_supported): Delete declaration.
2236 (set_gdb_breakpoint_at): Declare.
2237 (gdb_breakpoint_here): Declare.
2238 (delete_breakpoint_at): Delete.
2239 (delete_gdb_breakpoint_at): Declare.
2241 * server.h (struct raw_breakpoint): Forward declare.
2242 (struct process_info): New field `raw_breakpoints'.
2244 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2247 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2249 * linux-low.c (status_pending_p_callback): Fix comment.
2250 (linux_wait_for_event_1): Move most of the internal breakpoint
2251 handling from here...
2252 (linux_wait_1): ... to here.
2253 (count_events_callback): New.
2254 (select_singlestep_lwp_callback): New.
2255 (select_event_lwp_callback): New.
2256 (cancel_breakpoints_callback): New.
2257 (select_event_lwp): New.
2258 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2259 priority to all LWPs that have had events that should be reported
2260 to the client. Cancel breakpoints when about to reporting the
2261 event to the client, not while stopping lwps. No longer cancel
2262 finished single-steps here.
2263 (cancel_finished_single_step): Delete.
2264 (cancel_finished_single_steps): Delete.
2266 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2268 * mem-break.c (enum bkpt_type): New.
2269 (struct breakpoint): New field `type'.
2270 (set_breakpoint_at): Change return type to struct breakpoint
2271 pointer. Set type to `other_breakpoint' by default.
2272 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2273 in the breakpoint list.
2274 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2275 (reinsert_breakpoint): Rename to ...
2276 (reinsert_raw_breakpoint): ... this.
2277 (reinsert_breakpoints_at): Adjust.
2278 * mem-break.h (struct breakpoint): Declare.
2279 (set_breakpoint_at): Change return type to struct breakpoint
2282 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2284 * server.c (handle_query): Assign, not compare.
2286 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2288 Teach linux gdbserver to step-over-breakpoints.
2290 * linux-low.c (can_hardware_single_step): New.
2291 (supports_breakpoints): New.
2292 (handle_extended_wait): If stopping threads, read the stop pc of
2295 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2296 low target doesn't support retrieving the PC.
2297 (add_lwp): Set last_resume_kind to resume_continue.
2298 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2299 (linux_attach): Don't clear stop_expected. Set the lwp's
2300 last_resume_kind to resume_stop.
2301 (linux_detach_one_lwp): Don't check for removed breakpoints.
2302 (check_removed_breakpoint): Delete.
2303 (status_pending_p): Rename to ...
2304 (status_pending_p_callback): ... this. Don't check for removed
2305 breakpoints. Don't consider threads that are stopped from GDB's
2307 (linux_wait_for_lwp): Always read the stop_pc here.
2308 (cancel_breakpoint): New.
2309 (step_over_bkpt): New global.
2310 (linux_wait_for_event_1): Implement stepping over breakpoints.
2311 (gdb_wants_lwp_stopped): New.
2312 (gdb_wants_all_stopped): New.
2313 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2314 single-step traps here. Store the thread's last reported target
2316 (send_sigstop): Don't clear stop_expected. Always set it,
2318 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2319 (cancel_finished_single_step): New.
2320 (cancel_finished_single_steps): New.
2321 (wait_for_sigstop): Don't cancel finished single-step traps here.
2322 (linux_resume_one_lwp): Don't check for removed breakpoints.
2323 Don't set `step' on non-hardware step archs.
2324 (linux_set_resume_request): Ignore resume_stop requests if already
2325 stopping or stopped. Set the lwp's last_resume_kind.
2326 (resume_status_pending_p): Don't check for removed breakpoints.
2327 (need_step_over_p): New.
2328 (start_step_over): New.
2329 (finish_step_over): New.
2330 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2331 requests. Clear the thread's last reported target waitstatus.
2332 Don't use the `suspended' flag. Don't consider pending breakpoints.
2333 (linux_resume): Start a step-over if necessary.
2334 (proceed_one_lwp): New.
2335 (proceed_all_lwps): New.
2336 (unstop_all_lwps): New.
2337 * linux-low.h (struct lwp_info): Rewrite comment for the
2338 `suspended' flag. Add the `stop_pc' field. Delete the
2339 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2340 Add `'last_resume_kind' and `need_step_over' fields.
2341 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2342 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2343 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2344 (set_raw_breakpoint_at): New.
2345 (set_breakpoint_at): Rewrite to use it.
2346 (reinsert_breakpoint_handler): Delete.
2347 (set_reinsert_breakpoint): New.
2348 (reinsert_breakpoint_by_bp): Delete.
2349 (delete_reinsert_breakpoints): New.
2350 (uninsert_breakpoint): Rewrite.
2351 (uninsert_breakpoints_at): New.
2352 (reinsert_breakpoint): Rewrite.
2353 (reinsert_breakpoints_at): New.
2354 (check_breakpoints): Rewrite.
2355 (breakpoint_here): New.
2356 (breakpoint_inserted_here): New.
2357 (check_mem_read): Adjust.
2358 * mem-break.h (breakpoints_supported, breakpoint_here)
2359 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2360 (reinsert_breakpoint_by_bp): Delete declaration.
2361 (delete_reinsert_breakpoints): Declare.
2362 (reinsert_breakpoint): Delete declaration.
2363 (reinsert_breakpoints_at): Declare.
2364 (uninsert_breakpoint): Delete declaration.
2365 (uninsert_breakpoints_at): Declare.
2366 (check_breakpoints): Adjust prototype.
2367 * server.h: Adjust include order.
2368 (struct thread_info): Declare here. Add a `last_status' field.
2370 2010-03-23 Michael Snyder <msnyder@vmware.com>
2372 * server.c (crc32): New function.
2373 (handle_query): Add handling for 'qCRC:' request.
2375 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2377 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2378 lwp had been stopped by a watchpoint.
2380 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2382 * server.h (internal_error): Declare.
2383 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2384 * utils.c (internal_error): New function.
2386 2010-03-15 Andreas Schwab <schwab@redhat.com>
2388 * configure.srv: Fix typo setting srv_regobj.
2390 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2392 * linux-low.c (fetch_register): Avoid passing a non string literal
2394 (usr_store_inferior_registers): Ditto.
2396 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2398 * linux-low.c (linux_write_memory): Bail out early if peeking
2401 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2403 * linux-low.h (struct lwp_info): New fields
2404 `stopped_by_watchpoint' and `stopped_data_address'.
2405 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2406 here, and cache them in the lwp object.
2407 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2409 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2411 (linux_stopped_by_watchpoint): Rewrite.
2412 (linux_stopped_data_address): Rewrite.
2414 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2416 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2417 switching the current inferior, not before.
2419 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2421 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2422 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2423 i386-linux.c and amd64-linux.c.
2424 (reg-i386.o): Removed.
2425 (reg-i386.c): Likewise.
2426 (reg-i386-linux.o): Likewise.
2427 (reg-i386-linux.c): Likewise.
2428 (reg-x86-64.o): Likewise.
2429 (reg-x86-64.c): Likewise.
2430 (reg-x86-64-linux.o): Likewise.
2431 (reg-x86-64-linux.c): Likewise.
2434 (i386-linux.o): Likewise.
2435 (i386-linux.c): Likewise.
2436 (amd64.o): Likewise.
2437 (amd64.c): Likewise.
2438 (amd64-linux.o): Likewise.
2439 (amd64-linux.c): Likewise.
2441 * configure.srv (srv_i386_regobj): New.
2442 (srv_i386_linux_regobj): Likewise.
2443 (srv_amd64_regobj): Likewise.
2444 (srv_amd64_linux_regobj): Likewise.
2445 (srv_i386_32bit_xmlfiles): Likewise.
2446 (srv_i386_64bit_xmlfiles): Likewise.
2447 (srv_i386_xmlfiles): Likewise.
2448 (srv_amd64_xmlfiles): Likewise.
2449 (srv_i386_linux_xmlfiles): Likewise.
2450 (srv_amd64_linux_xmlfiles): Likewise.
2451 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2452 srv_xmlfiles to $srv_i386_xmlfiles.
2453 (i[34567]86-*-mingw32ce*): Likewise.
2454 (i[34567]86-*-mingw*): Likewise.
2455 (i[34567]86-*-nto*): Likewise.
2456 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2457 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2458 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2459 (x86_64-*-linux*): Likewise.
2461 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2462 (init_registers_amd64_linux): New.
2463 (x86_arch_setup): Replace init_registers_x86_64_linux with
2464 init_registers_amd64_linux.
2466 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2468 * configure.ac: Check for libdl. If it is not available link against
2469 static libthread_db.
2470 * configure: Regenerate.
2472 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2476 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2477 handing a read watchpoint.
2478 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2480 2010-02-12 Doug Evans <dje@google.com>
2482 * linux-low.c (linux_supports_tracefork_flag): Document.
2483 (linux_look_up_symbols): Add comment.
2485 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2487 * regcache.c (supply_register): Clear regcache if buf is NULL.
2489 2010-02-02 Nicolas Roche <roche@sourceware.org>
2490 Joel Brobecker <brobecker@adacore.com>
2492 * inferiors.c (find_inferior): Add function documentation.
2493 (unloaded_dll): Handle the case where the unloaded dll has not
2494 been previously registered in the dll list.
2496 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2498 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2499 (thumb2_breakpoint): New.
2500 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2502 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2504 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2505 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2508 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2510 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2512 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2514 * linux-s390-low.c (s390_collect_ptrace_register)
2515 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2517 2010-01-21 Doug Evans <dje@google.com>
2519 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2520 (PTRACE_ARG4_TYPE): New macro.
2521 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2522 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2523 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2524 (usr_store_inferior_registers): Ditto.
2525 (linux_read_memory, linux_write_memory): Ditto.
2526 (linux_test_for_tracefork): Ditto.
2528 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2529 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2531 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2533 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2536 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2538 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2539 prototype to take a regcache. Adjust.
2541 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2543 * regcache.h (struct thread_info): Forward declare.
2544 (struct regcache): New.
2545 (new_register_cache): Adjust prototype.
2546 (get_thread_regcache): Declare.
2547 (free_register_cache): Adjust prototype.
2548 (registers_to_string, registers_from_string): Ditto.
2549 (supply_register, supply_register_by_name, collect_register)
2550 (collect_register_as_string, collect_register_by_name): Ditto.
2551 * regcache.c (struct inferior_regcache_data): Delete.
2552 (get_regcache): Rename to ...
2553 (get_thread_regcache): ... this. Adjust. Switch inferior before
2555 (regcache_invalidate_one): Adjust.
2556 (regcache_invalidate): Fix prototype.
2557 (new_register_cache): Return the new register cache.
2558 (free_register_cache): Change prototype.
2559 (realloc_register_cache): Adjust.
2560 (registers_to_string): Change prototype to take a regcache. Adjust.
2561 (registers_from_string): Ditto.
2562 (register_data): Ditto.
2563 (supply_register): Ditto.
2564 (supply_register_by_name): Ditto.
2565 (collect_register): Ditto.
2566 (collect_register_as_string): Ditto.
2567 (collect_register_by_name): Ditto.
2568 * server.c (process_serial_event): Adjust.
2569 * linux-low.h (regset_fill_func, regset_store_func): Change
2571 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2573 * linux-low.c (get_stop_pc): Adjust.
2574 (check_removed_breakpoint): Adjust.
2575 (linux_wait_for_event): Adjust.
2576 (linux_resume_one_lwp): Adjust.
2577 (fetch_register): Add regcache parameter. Adjust.
2578 (usr_store_inferior_registers): Ditto.
2579 (regsets_fetch_inferior_registers): Ditto.
2580 (regsets_store_inferior_registers): Ditto.
2581 (linux_fetch_registers, linux_store_registers): Ditto.
2582 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2584 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2585 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2586 prototype to take a regcache.
2587 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2588 * remote-utils.c (convert_ascii_to_int, outreg)
2589 (prepare_resume_reply): Change prototype to take a regcache.
2591 * target.h (struct target_ops) <fetch_registers, store_registers>:
2592 Change prototype to take a regcache.
2593 (fetch_inferior_registers, store_inferior_registers): Change
2594 prototype to take a regcache. Adjust.
2595 * proc-service.c (ps_lgetregs): Adjust.
2596 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2597 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2598 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2599 take a regcache. Adjust.
2600 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2601 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2602 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2603 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2604 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2605 (cris_cannot_fetch_register):
2606 (cris_breakpoint_at): Change prototype to take a regcache.
2608 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2609 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2610 to take a regcache. Adjust.
2611 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2613 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2614 take a regcache. Adjust.
2615 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2616 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2617 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2618 * linux-mips-low.c (mips_get_pc):
2619 (mips_set_pc): Change prototype to take a regcache. Adjust.
2620 (mips_reinsert_addr): Adjust.
2621 (mips_collect_register): Change prototype to take a regcache.
2623 (mips_supply_register):
2624 (mips_collect_register_32bit, mips_supply_register_32bit)
2625 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2626 (mips_store_fpregset): Ditto.
2627 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2629 (parse_spufs_run): Adjust.
2630 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2631 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2632 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2633 take a regcache. Adjust.
2634 * linux-s390-low.c (s390_collect_ptrace_register)
2635 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2636 (s390_set_pc): Change prototype to take a regcache. Adjust.
2637 (s390_arch_setup): Adjust.
2638 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2639 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2640 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2641 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2642 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2644 (sparc_breakpoint_at): Adjust.
2645 * linux-xtensa-low.c (xtensa_fill_gregset):
2646 (xtensa_store_gregset):
2647 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2648 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2649 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2650 prototype to take a regcache. Adjust.
2651 * win32-arm-low.c (arm_fetch_inferior_register)
2652 (arm_store_inferior_register): Change prototype to take a
2654 * win32-i386-low.c (i386_fetch_inferior_register)
2655 (i386_store_inferior_register): Change prototype to take a
2657 * win32-low.c (child_fetch_inferior_registers)
2658 (child_store_inferior_registers): Change prototype to take a
2660 (win32_wait): Adjust.
2661 (win32_fetch_inferior_registers): Change prototype to take a
2663 (win32_store_inferior_registers): Adjust.
2664 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2665 store_inferior_register>: Change prototype to take a regcache.
2667 2010-01-20 Doug Evans <dje@google.com>
2669 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2671 (linux_wait_for_event1, linux_init_signals): Ditto.
2672 (W_STOPCODE): Provide definition if missing.
2674 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2676 * linux-low.c (linux_core_of_thread): New.
2677 (compare_ints, show_process, list_threads): New.
2678 (linux_qxfer_osdata): Report threads and cores.
2679 (linux_target_op): Register linux_core_of_thread.
2680 * remote-utils.c (prepare_resume_reply): Report the core.
2681 (buffer_xml_printf): Support %d specifier.
2682 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2684 (handle_query): Handle qXfer:threads. Announce availability
2686 * target.h (struct target_ops): New field core_of_thread.
2688 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2690 * Makefile.in (clean): Remove new generated files.
2691 (reg-s390.o, reg-s390.c): Remove rules.
2692 (reg-s390x.o, reg-s390x.c): Likewise.
2693 (s390-linux32.o, s390-linux32.c): Add rules.
2694 (s390-linux64.o, s390-linux64.c): Likewise.
2695 (s390x-linux64.o, s390x-linux64.c): Likewise.
2696 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2697 * linux-s390-low.c: Include <elf.h>.
2698 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2699 (init_registers_s390): Remove prototype.
2700 (init_registers_s390x): Likewise.
2701 (init_registers_s390_linux32): Add prototype.
2702 (init_registers_s390_linux64): Likewise.
2703 (init_registers_s390x_linux64): Likewise.
2704 (s390_num_regs_3264): New define.
2705 (s390_regmap_3264): New global variable.
2706 (s390_cannot_fetch_register): Remove obsolete check.
2707 (s390_cannot_store_register): Likewise.
2708 (s390_collect_ptrace_register): Handle upper/lower register halves.
2709 (s390_supply_ptrace_register): Likewise.
2710 (s390_fill_gregset): Update to register number changes.
2711 (s390_get_hwcap): New routine.
2712 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2713 Install appropriate regmap and register set.
2715 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2717 * server.c (gdbserver_version): Update copyright year to 2010.
2718 * gdbreplay.c (gdbreplay_version): Likewise.
2720 2009-12-28 Doug Evans <dje@google.com>
2722 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2723 elf/external.h. Include <elf.h> instead but only if necessary.
2725 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2727 * linux-low.c (linux_remove_process): Remove `detaching'
2728 parameter. Don't release/detach from thread_db here.
2729 (linux_kill): Release/detach from thread_db here, ...
2730 (linux_detach): ... and here, before actually detaching.
2731 (linux_wait_1): ... and here, when a process exits.
2732 * thread-db.c (any_thread_of): New.
2733 (thread_db_free): Switch the current inferior to a thread of the
2736 2009-12-21 Doug Evans <dje@google.com>
2738 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2740 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2741 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2742 warning ifndef __NR_tkill. Move setting of errno there too.
2743 Delete unnecessary resetting of errno after syscall.
2744 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2746 * configure.ac: Check for dladdr.
2747 * config.in: Regenerate.
2748 * configure: Regenerate.
2749 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2750 (try_thread_db_load): Update.
2752 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2754 2009-12-18 Doug Evans <dje@google.com>
2756 * event-loop.c: Include unistd.h if it exists.
2758 * linux-low.c (my_waitpid): Move definition away from being in
2759 between linux_tracefork_child/linux_test_for_tracefork.
2761 * gdb_proc_service.h (psaddr_t): Fix type.
2762 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2763 signature to match glibc.
2765 2009-12-16 Doug Evans <dje@google.com>
2767 * linux-low.c (linux_read_memory): Fix argument to read.
2769 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2771 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2772 events, don't leave current_inferior pointing at null.
2774 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2776 * win32-low.c (LOG): Delete.
2777 (OUTMSG): Output to stderr.
2778 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2779 on compile time LOG macro.
2780 (win32_wait): Fix debug output.
2782 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2784 * win32-low.c (win32_add_one_solib): If the dll name is
2785 "ntdll.dll", prepend the system directory to the dll path.
2787 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2789 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2791 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2792 Vladimir Prus <vladimir@codesourcery.com>
2794 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2795 * configure.ac: Check for __mcoldfire__ and set
2796 gdb_cv_m68k_is_coldfire.
2797 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2798 reg-cf.o and reg-m68k.o.
2799 * configure: Regenerated.
2801 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2803 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2804 Pass it to thread_db_free.
2805 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2806 proper `detaching' argument to linux_remove_process.
2807 * linux-low.h (thread_db_free): Add `detaching' parameter.
2808 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2810 (thread_db_free): Add `detaching' parameter. Only
2811 call td_ta_clear_event if detaching from process.
2813 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2815 * thread-db.c (thread_db_free): Fix typo.
2817 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2820 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2822 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2824 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2825 with an i686 compiler.
2826 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2828 * configure: Rebuilt.
2830 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2834 * server.c (handle_search_memory_1): Correct read_addr initialization
2835 in loop for searching subsequent chunks.
2837 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2839 * configure.ac: New --with-libthread-db option.
2840 * thread-db.c: Allow direct dependence on libthread_db.
2841 (thread_db_free): Adjust.
2842 * config.in: Regenerate.
2843 * configure: Likewise.
2845 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2848 * thread-db.c (attach_thread): New function.
2849 (maybe_attach_thread): Return success/failure.
2850 (find_new_threads_callback): Adjust.
2851 (thread_db_find_new_threads): Loop until no new threads.
2853 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2855 * proc-service.c (ps_lgetregs): Formatting.
2857 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2859 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2860 * configure.ac: Adjust.
2861 * linux-low.h (struct process_info_private): Move members to struct
2863 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2864 * linux-low.c (linux_remove_process): Adjust.
2865 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2866 * server.c (handle_query): Move code ...
2867 (handle_monitor_command): ... here. New function.
2868 * target.h (struct target_ops): New member.
2869 * thread-db.c (struct thread_db): New.
2870 (libthread_db_search_path): New variable.
2871 (thread_db_create_event, thread_db_enable_reporting)
2872 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2873 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2874 (try_thread_db_load_1, dladdr_to_soname): New functions.
2875 (try_thread_db_load, thread_db_load_search): New functions.
2876 (thread_db_init): Search for libthread_db.
2877 (thread_db_free): New function.
2878 (thread_db_handle_monitor_command): Likewise.
2879 * config.in: Regenerate.
2880 * configure: Regenerate.
2882 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2884 * spu-low.c (spu_kill): Wait for inferior to terminate.
2885 Call clear_inferiors.
2886 (spu_detach): Call clear_inferiors.
2888 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2890 * aclocal.m4: Regenerate.
2891 * config.in: Likewise.
2892 * configure: Likewise.
2894 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2896 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2897 (parse_spufs_run): New function.
2898 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2899 (ppc_breakpoint_at): Handle SPU breakpoints.
2901 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2903 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2904 (SPUFS_MAGIC): Define.
2905 (spu_enumerate_spu_ids): New function.
2906 (linux_qxfer_spu): New function.
2907 (linux_target_ops): Install linux_qxfer_spu.
2909 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2911 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2912 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2913 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2914 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2915 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2916 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2917 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2918 (init_registers_powerpc_cell32l): Add prototype.
2919 (init_registers_powerpc_cell64l): Likewise.
2920 (ppc_arch_setup): Detect Cell/B.E. architecture.
2922 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2924 * Makefile.in (datarootdir): New variable.
2926 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2928 * linux-low.c (linux_write_memory): Update debugging output.
2929 * Makefile.in (clean): Add new descriptions.
2930 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2931 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2932 * configure.srv: Add new files for arm*-*-linux*.
2933 * linux-arm-low.c: Add new declarations.
2934 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2935 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2936 (HWCAP_VFPv3D16): New.
2937 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2938 instead of __IWMMXT__.
2939 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2940 (arm_arch_setup): New.
2941 (target_regsets): Remove #ifdef. Add VFP regset.
2942 (the_low_target): Use arm_arch_setup.
2944 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2946 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2947 the main thread again.
2949 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2951 Adding Neutrino gdbserver.
2952 * configure: Regenerated.
2953 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2954 * configure.srv (i[34567]86-*-nto*): New target.
2955 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2956 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2957 (nto_comctrl) [__QNX__]: New function.
2958 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2960 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2962 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2965 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2966 Pedro Alves <pedro@codesourcery.com>
2968 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2969 don't support CONTEXT_EXTENDED_REGISTERS.
2970 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2971 (the_low_target): Install them.
2972 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2973 failing with ERROR_PIPE_NOT_CONNECTED.
2975 2009-06-30 Doug Evans <dje@google.com>
2976 Pierre Muller <muller@ics.u-strasbg.fr>
2978 Add h/w watchpoint support to x86-linux, win32-i386.
2979 * Makefile.in (SFILES): Add i386-low.c
2980 (i386_low_h): Define.
2981 (i386-low.o): Add dependencies.
2982 (linux-x86-low.o): Add i386-low.h dependency.
2983 (win32-i386-low.o): Ditto.
2984 * i386-low.c: New file.
2985 * i386-low.h: New file.
2986 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2987 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2988 * linux-low.c (linux_add_process): Initialize arch_private.
2989 (linux_remove_process): Free arch_private.
2990 (add_lwp): Initialize arch_private.
2991 (delete_lwp): Free arch_private.
2992 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2994 * linux-low.h (process_info_private): New member arch_private.
2995 (lwp_info): New member arch_private.
2996 (linux_target_ops): New members new_process, new_thread,
2998 (ptid_of): New macro.
2999 * linux-x86-low.c: Include stddef.h, i386-low.h.
3000 (arch_process_info): New struct.
3001 (arch_lwp_info): New struct.
3002 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3003 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3004 (i386_dr_low_get_status): New function.
3005 (x86_insert_point, x86_remove_point): New functions.
3006 (x86_stopped_by_watchpoint): New function.
3007 (x86_stopped_data_address): New function.
3008 (x86_linux_new_process, x86_linux_new_thread): New functions.
3009 (x86_linux_prepare_to_resume): New function.
3010 (the_low_target): Add entries for insert_point, remove_point,
3011 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3013 * server.c (debug_hw_points): New global.
3014 (monitor_show_help): Document set debug-hw-points.
3015 (handle_query): Process "set debug-hw-points".
3016 * server.h (debug_hw_points): Declare.
3017 (paddress): Declare.
3018 * utils.c (NUMCELLS, CELLSIZE): New macros.
3019 (get_sell, xsnprintf, paddress): New functions.
3020 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3021 remove_point, stopped_by_watchpoint, stopped_data_address.
3022 * win32-i386-low.c: Include i386-low.h.
3023 (debug_reg_state): Replaces dr.
3024 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3025 (i386_dr_low_get_status): New function.
3026 (i386_insert_point, i386_remove_point): New functions.
3027 (i386_stopped_by_watchpoint): New function.
3028 (i386_stopped_data_address): New function.
3029 (i386_initial_stuff): Update.
3030 (get_thread_context,set_thread_context,i386_thread_added): Update.
3031 (the_low_target): Add entries for insert_point,
3032 remove_point, stopped_by_watchpoint, stopped_data_address.
3033 * win32-low.c (win32_insert_watchpoint): New function.
3034 (win32_remove_watchpoint): New function.
3035 (win32_stopped_by_watchpoint): New function.
3036 (win32_stopped_data_address): New function.
3037 (win32_target_ops): Add entries for insert_watchpoint,
3038 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3039 * win32-low.h (win32_target_ops): New members insert_point,
3040 remove_point, stopped_by_watchpoint, stopped_data_address.
3042 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3044 * server.c (process_serial_event): Re-return unsupported, not
3045 error, if the type isn't recognized. Re-allow supporting only
3046 insert or remove packets. Also call require_running for
3047 breakpoints. Add missing break statement to default case. Tidy.
3048 * target.h (struct target_ops): Rename insert_watchpoint to
3049 insert_point, and remove_watchpoint to remove_point.
3051 * linux-low.h (struct linux_target_ops): Likewise.
3052 * linux-low.c (linux_insert_watchpoint): Rename to ...
3053 (linux_insert_point): ... this. Adjust.
3054 (linux_remove_watchpoint): Rename to ...
3055 (linux_remove_point): ... this. Adjust.
3056 (linux_target_ops): Adjust.
3057 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3058 (cris_insert_point): ... this.
3059 (cris_remove_watchpoint): Rename to ...
3060 (cris_remove_point): ... this.
3061 (the_low_target): Adjust.
3063 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3065 * server.c (handle_v_kill): Pass signal_pid to
3066 kill_inferior if multi_process is zero.
3068 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3070 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3071 * target.h (target_ops): Comment for *_watchpoint to make it clear
3072 the functions can get types '0' and '1'.
3074 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3076 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3077 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3078 * regcache.c (get_regcache): Likewise.
3079 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3080 * win32-low.c (child_fetch_inferior_registers): Remove check for
3083 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3084 Pedro Alves <pedro@codesourcery.com>
3086 * target.h (struct target_ops) <supports_multi_process>: New
3088 (target_supports_multi_process): New.
3089 * server.c (handle_query): Even if GDB reports support, only
3090 enable multi-process if the target also supports it. Report
3091 multi-process support only if the target backend supports it.
3092 * linux-low.c (linux_supports_multi_process): New function.
3093 (linux_target_ops): Install it as target_supports_multi_process
3096 2009-05-24 Doug Evans <dje@google.com>
3098 Global renaming of find_thread_pid to find_thread_ptid.
3099 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3100 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3101 All callers updated.
3103 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3104 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3107 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3108 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3109 (linux_resume_one_lwp): Ditto.
3111 2009-05-23 Doug Evans <dje@google.com>
3113 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3114 from struct inferior_list_entry * to struct lwp_info *.
3115 All callers updated.
3117 2009-05-13 Doug Evans <dje@google.com>
3119 * linux-x86-low.c: Don't include assert.h.
3120 (x86_siginfo_fixup): Use fatal, not assert.
3121 (x86_arch_setup): Fix comment.
3123 2009-05-12 Doug Evans <dje@google.com>
3125 Biarch support for i386/amd64 gdbserver.
3126 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3127 Add linux-x86-low.c.
3128 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3129 (linux-x86-low.o): Add.
3130 * linux-x86-64-low.c: Delete.
3131 * linux-i386-low.c: Delete.
3132 * linux-x86-low.c: New file.
3133 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3135 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3137 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3138 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3139 (linux_child_pid_to_exec_file): New function.
3140 (elf_64_header_p, elf_64_file_p): New functions.
3141 (siginfo_fixup): New function.
3142 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3143 give target a chance to convert layout.
3144 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3145 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3147 2009-05-07 Doug Evans <dje@google.com>
3149 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3150 (regsets_store_inferior_registers): Ditto.
3152 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3156 * linux-low.c (must_set_ptrace_flags): Delete.
3157 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3159 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3160 `lwp->must_set_ptrace_flags' instead.
3161 (linux_wait_for_event_1): Set ptrace options here.
3162 (linux_wait_1): ... not here.
3164 2009-04-30 Doug Evans <dje@google.com>
3166 * inferiors.c (started_inferior_callback): New function.
3167 (attached_inferior_callback): New function.
3168 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3169 * server.c (print_started_pid, print_attached_pid): New functions.
3170 (detach_or_kill_for_exit): New function.
3171 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3172 * server.h (have_started_inferiors_p): Declare.
3173 (have_attached_inferiors_p): Declare.
3175 * inferiors.c (remove_process): Fix memory leak, free process.
3176 * linux-low.c (linux_remove_process): New function.
3177 (linux_kill): Call it instead of remove_process.
3178 (linux_detach, linux_wait_1): Ditto.
3180 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3182 * configure.srv: Add x86 Windows CE target.
3184 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3186 * inferiors.c (get_thread_process): Make global.
3187 * server.h (get_thread_process): Add prototype.
3188 * thread-db.c (find_one_thread): Use get_thread_process
3189 instead of current_process.
3190 (thread_db_get_tls_address): Do not crash if called when
3191 thread layer is not yet initialized.
3193 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3195 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3196 * spu-low.c (current_tid): Rename to ...
3197 (current_ptid): ... this.
3198 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3199 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3200 ptid_get_lwp (current_ptid) instead of current_tid.
3201 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3202 instead of current_tid. Use find_process_pid to verify pid
3203 argument is valid. Pass proper argument to remove_process.
3204 (spu_thread_alive): Compare current_ptid instead of current_tid.
3205 (spu_resume): Likewise.
3207 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3209 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3212 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3214 Implement the multiprocess extensions, and add linux multiprocess
3217 * server.h (ULONGEST): Declare.
3218 (struct ptid, ptid_t): New.
3219 (minus_one_ptid, null_ptid): Declare.
3220 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3221 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3222 (struct inferior_list_entry): Change `id' type from unsigned from
3224 (struct sym_cache, struct breakpoint, struct
3225 process_info_private): Forward declare.
3226 (struct process_info): Declare.
3227 (current_process): Declare.
3228 (all_processes): Declare.
3229 (initialize_inferiors): Declare.
3230 (add_thread): Adjust to use ptid_t.
3231 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3232 (add_process, remove_process, find_thread_pid): Declare.
3233 (find_inferior_id): Adjust to use ptid_t.
3234 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3235 (multi_process): Declare.
3236 (push_event): Adjust to use ptid_t.
3237 (read_ptid, write_ptid): Declare.
3238 (prepare_resume_reply): Adjust to use ptid_t.
3239 (clear_symbol_cache): Declare.
3240 * inferiors.c (all_processes): New.
3241 (null_ptid, minus_one_ptid): New.
3242 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3243 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3244 (add_thread): Change unsigned long to ptid. Remove gdb_id
3246 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3247 (gdb_id_to_thread): Rename to ...
3248 (find_thread_pid): ... this. Change unsigned long to ptid.
3249 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3250 (loaded_dll, pull_pid_from_list): Adjust.
3251 (add_process, remove_process, find_process_pid)
3252 (get_thread_process, current_process, initialize_inferiors): New.
3253 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3254 (struct target_waitstatus) <related_pid>: Ditto.
3255 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3257 (struct target_ops) <join>: Add `pid' argument.
3258 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3259 (struct target_ops) <wait>: Add `ptid' field. Change return type
3261 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3262 (mywait): Add `ptid' argument. Change return type to ptid_t.
3263 (target_pid_to_str): Declare.
3264 * target.c (set_desired_inferior): Adjust to use ptids.
3265 (mywait): Add new `ptid' argument. Adjust.
3266 (target_pid_to_str): New.
3267 * mem-break.h (free_all_breakpoints): Declare.
3268 * mem-break.c (breakpoints): Delelete.
3269 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3270 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3271 to use per-process breakpoint list.
3272 (free_all_breakpoints): New.
3273 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3274 (symbol_cache, all_symbols_looked_up): Delete.
3276 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3278 (prepare_resume_reply): Change ptid argument's type from unsigned
3279 long to ptid_t. Adjust. Implement W;process and X;process.
3280 (free_sym_cache, clear_symbol_cache): New.
3281 (look_up_one_symbol): Adjust to per-process symbol cache. *
3282 * server.c (cont_thread, general_thread, step_thread): Change type
3285 (multi_process): New.
3286 (last_ptid): Change type to ptid_t.
3287 (struct vstop_notif) <ptid>: Change type to ptid_t.
3288 (queue_stop_reply, push_event): Change `ptid' argument's type to
3290 (discard_queued_stop_replies): Add `pid' argument.
3291 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3292 changes. Don't reference the `attached' global.
3293 (attach_inferior): Adjust to mywait interface changes.
3294 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3295 features. Handle and report "multiprocess+". Handle
3297 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3299 (handle_v_kill): New.
3300 (handle_v_stopped): Adjust to use target_pid_to_str.
3301 (handle_v_requests): Allow multiple attaches and runs when
3302 multiprocess extensions are in effect. Handle "vKill".
3303 (myresume): Adjust to use ptids.
3304 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3305 (handle_status): Adjust to discard_queued_stop_replies interface
3307 (first_thread_of, kill_inferior_callback)
3308 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3309 (main): Call initialize_inferiors. Adjust to use ptids, killing
3310 and detaching from all inferiors. Handle multiprocess packet
3312 * linux-low.h: Include gdb_proc_service.h.
3313 (struct process_info_private): New.
3314 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3315 <lwpid_of>: Use ptid_get_lwp.
3316 (get_lwp_thread): Adjust.
3317 (struct lwp_info): Add `dead' member.
3318 (find_lwp_pid): Declare.
3319 * linux-low.c (thread_db_active): Delete.
3320 (new_inferior): Adjust comment.
3321 (inferior_pid): Delete.
3322 (linux_add_process): New.
3323 (handle_extended_wait): Adjust.
3324 (add_lwp): Change unsigned long to ptid.
3325 (linux_create_inferior): Add process to processes table. Adjust
3326 to use ptids. Don't set new_inferior here.
3327 (linux_attach_lwp): Rename to ...
3328 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3329 it. Adjust to use ptids.
3330 (linux_attach_lwp): New.
3331 (linux_attach): Add process to processes table. Don't set
3333 (struct counter): New.
3334 (second_thread_of_pid_p, last_thread_of_process_p): New.
3335 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3337 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3338 processes. Remove process from process table.
3339 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3340 to multiple processes.
3341 (any_thread_of): New.
3342 (linux_detach): Add `pid' argument, and handle it. Remove process
3343 from processes table.
3344 (linux_join): Add `pid' argument. Handle it.
3345 (linux_thread_alive): Change unsighed long argument to ptid_t.
3346 Consider dead lwps as not being alive.
3347 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3348 threads we're not interested in.
3349 (same_lwp, find_lwp_pid): New.
3350 (linux_wait_for_lwp): Change `pid' argument's type from int to
3352 (linux_wait_for_event): Rename to ...
3353 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3354 from int to ptid_t. Adjust.
3355 (linux_wait_for_event): New.
3356 (linux_wait_1): Add `ptid' argument. Change return type to
3357 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3358 that exit from the process table.
3359 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3361 (mark_lwp_dead): New.
3362 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3363 stopping all threads, mark its main lwp as dead.
3364 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3366 (fetch_register, usr_store_inferior_registers)
3367 (regsets_fetch_inferior_registers)
3368 (regsets_store_inferior_registers, linux_read_memory)
3369 (linux_write_memory): Inline `inferior_pid'.
3370 (linux_look_up_symbols): Adjust to use per-process
3372 (linux_request_interrupt): Adjust to use ptids.
3373 (linux_read_auxv): Inline `inferior_pid'.
3374 (initialize_low): Don't reference thread_db_active.
3375 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3376 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3377 (ps_getpid): Return the pid of the current inferior.
3378 * thread-db.c (proc_handle, thread_agent): Delete.
3379 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3381 (find_one_thread): Change argument type to ptid_t. Adjust to
3383 (maybe_attach_thread): Adjust to per-process data and ptids.
3384 (thread_db_find_new_threads): Ditto.
3385 (thread_db_init): Ditto.
3386 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3387 processes table. Adjust to use ptids.
3388 (spu_kill, spu_detach): Adjust interface. Remove process from
3390 (spu_join, spu_thread_alive): Adjust interface.
3391 (spu_wait): Adjust interface. Remove process from processes
3392 table. Adjust to use ptids.
3393 * win32-low.c (current_inferior_tid): Delete.
3394 (current_inferior_ptid): New.
3395 (debug_event_ptid): New.
3396 (thread_rec): Take a ptid. Adjust.
3397 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3398 (child_delete_thread): Ditto.
3399 (do_initial_child_stuff): Add `attached' argument. Add process to
3401 (child_fetch_inferior_registers, child_store_inferior_registers):
3403 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3404 (win32_attach): Pass 1 to do_initial_child_stuff.
3405 (win32_kill): Adjust interface. Remove process from processes
3407 (win32_detach): Ditto.
3408 (win32_join): Adjust interface.
3409 (win32_thread_alive): Take a ptid.
3410 (win32_resume): Adjust to use ptids.
3411 (get_child_debug_event): Ditto.
3412 (win32_wait): Adjust interface. Remove exiting process from
3415 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3417 Non-stop mode support.
3419 * server.h (non_stop): Declare.
3420 (gdb_client_data, handler_func): Declare.
3421 (delete_file_handler, add_file_handler, start_event_loop):
3423 (handle_serial_event, handle_target_event, push_event)
3424 (putpkt_notif): Declare.
3425 * target.h (enum resume_kind): New.
3426 (struct thread_resume): Replace `step' field by `kind' field.
3427 (TARGET_WNOHANG): Define.
3428 (struct target_ops) <wait>: Add `options' argument.
3429 <supports_non_stop, async, start_non_stop>: New fields.
3430 (target_supports_non_stop, target_async): New.
3431 (start_non_stop): Declare.
3432 (mywait): Add `options' argument.
3433 * target.c (mywait): Add `options' argument. Print child exit
3435 (start_non_stop): New.
3436 * server.c (non_stop, own_buf, mem_buf): New globals.
3437 (struct vstop_notif): New.
3438 (notif_queue): New global.
3439 (queue_stop_reply, push_event, discard_queued_stop_replies)
3440 (send_next_stop_reply): New.
3441 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3443 (attach_inferior): In non-stop mode, don't wait for the target
3445 (handle_general_set): Handle QNonStop.
3446 (handle_query): When handling qC, return the current general
3447 thread, instead of the first thread of the list.
3448 (handle_query): If the backend supports non-stop mode, include
3449 QNonStop+ in the qSupported query response.
3450 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3452 (handle_v_attach, handle_v_run): Handle non-stop mode.
3453 (handle_v_stopped): New.
3454 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3455 (myresume): Adjust to use resume_kind. Handle non-stop.
3456 (queue_stop_reply_callback): New.
3457 (handle_status): Handle non-stop mode.
3458 (main): Clear non_stop flag on reconnection. Use the event-loop.
3459 Refactor serial protocol handling from here ...
3460 (process_serial_event): ... to this new function. When GDB
3461 selects any thread, select one here. In non-stop mode, wait until
3462 GDB acks all pending events before exiting.
3463 (handle_serial_event, handle_target_event): New.
3464 * remote-utils.c (remote_open): Install remote_desc in the event
3466 (remote_close): Remove remote_desc from the event loop.
3467 (putpkt_binary): Rename to...
3468 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3469 (putpkt_binary): New as wrapper around putpkt_binary_1.
3470 (putpkt_notif): New.
3471 (prepare_resume_reply): In non-stop mode, don't change the
3473 * event-loop.c: New.
3474 * Makefile.in (OBJ): Add event-loop.o.
3475 (event-loop.o): New rule.
3477 * linux-low.h (pid_of): Moved here.
3479 (get_lwp_thread): Use lwpid_of.
3480 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3481 * linux-low.c (pid_of): Delete.
3482 (inferior_pid): Use lwpid_of.
3483 (linux_event_pipe): New.
3484 (target_is_async_p): New.
3486 (handle_extended_wait): Use lwpid_of.
3487 (add_lwp): Don't set lwpid field.
3488 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3489 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3490 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3491 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3492 first. Adjust to linux_wait_for_event interface changes. Use
3494 (linux_detach): Don't delete the main lwp here.
3495 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3496 (status_pending_p): Don't consider explicitly suspended lwps.
3497 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3498 pointer. Add OPTIONS argument. Change return type to int. Use
3499 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3500 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3501 pointer. Add status pointer argument. Return a pid instead of a
3502 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3503 changes. In non-stop mode, don't switch to a random thread.
3504 (linux_wait): Rename to...
3505 (linux_wait_1): ... this. Add target_options argument, and handle
3506 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3507 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3508 clean exit and signal exit code. Don't stop all threads in
3509 non-stop mode. In all-stop mode, only stop all threads when
3510 reporting a stop to GDB. Handle explicit thread stop requests.
3511 (async_file_flush, async_file_mark): New.
3513 (send_sigstop): Use lwpid_of.
3514 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3515 interface changes. In non-stop mode, don't switch to a random
3517 (linux_resume_one_lwp): Use lwpid_of.
3518 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3519 (linux_resume_one_thread): ... this. Handle resume_stop. In
3520 non-stop mode, don't look for pending flag in all threads.
3521 (resume_status_pending_p): Don't consider explicitly suspended
3523 (my_waitpid): Reimplement. Emulate __WALL.
3524 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3526 (sigchld_handler, linux_supports_non_stop, linux_async)
3527 (linux_start_non_stop): New.
3528 (linux_target_ops): Register linux_supports_non_stop, linux_async
3529 and linux_start_non_stop.
3530 (initialize_low): Install SIGCHLD handler.
3531 * thread-db.c (thread_db_create_event, find_one_thread)
3532 (thread_db_get_tls_address): Use lwpid_of.
3533 * win32-low.c (win32_detach): Adjust to use resume_kind.
3534 (win32_wait): Add `options' argument.
3535 * spu-low.c (spu_resume): Adjust to use resume_kind.
3536 (spu_wait): Add `options' argument.
3538 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3540 Decouple target code from remote protocol.
3542 * target.h (enum target_waitkind): New.
3543 (struct target_waitstatus): New.
3544 (struct target_ops) <wait>: Return an unsigned long. Take a
3545 target_waitstatus pointer instead of a char pointer.
3547 * target.c (mywait): Change prototype to return an unsigned long.
3548 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3549 * server.h (thread_from_wait, old_thread_from_wait): Delete
3551 (prepare_resume_reply): Change prototype to take a
3553 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3554 (last_status, last_ptid): New.
3555 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3556 pid instead of a signal.
3557 (attach_inferior): Remove "status" and "signal" parameters.
3559 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3561 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3562 (handle_v_requests, myresume): Remove "status" and "signal"
3564 (handle_status): New.
3565 (main): Delete local `status'. Adjust.
3566 * remote-utils.c: Include target.h.
3567 (prepare_resume_reply): Change prototype to take a
3568 target_waitstatus. Adjust.
3570 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3572 * spu-low.c (spu_wait): Adjust.
3573 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3575 (win32_wait): Adjust.
3577 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3579 * target.h (struct thread_resume): Delete leave_stopped member.
3580 (struct target_ops): Add a `n' argument to the `resume' callback.
3581 * server.c (start_inferior): Adjust.
3582 (handle_v_cont, myresume): Adjust.
3583 * linux-low.c (check_removed_breakpoint): Adjust to resume
3584 interface change, and to removed leave_stopped field.
3585 (resume_ptr): Delete.
3586 (struct thread_resume_array): New.
3587 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3588 resume interface change.
3589 (linux_continue_one_thread, linux_queue_one_thread)
3590 (resume_status_pending_p): Check if the resume field is NULL
3591 instead of checking the leave_stopped member.
3592 (linux_resume): Adjust to the target resume interface change.
3593 * spu-low.c (spu_resume): Adjust to the target resume interface
3595 * win32-low.c (win32_detach, win32_resume): Ditto.
3597 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3599 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3601 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3603 (linux_continue_one_thread): Only preserve the stepping flag if
3604 there's a pending breakpoint.
3606 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3608 * server.c (main): After the inferior having exited, call
3609 remote_close before exiting gdbserver.
3611 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3613 Fix size of FPSCR in Power 7 processors.
3614 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3615 (PPC_FEATURE_HAS_DFP): New #define.
3616 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3619 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3621 * server.c (handle_query) Whitespace and formatting.
3623 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3625 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3626 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3627 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3628 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3629 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3630 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3631 Makefile.in, configure.ac: Fix whitespace throughout.
3632 * configure: Regenerate.
3634 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3636 * inferiors.c (find_inferior): Make it safe for the callback
3637 function to delete the currently iterated inferior.
3639 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3641 * Makefile.in (linuw_low_h): Move higher.
3642 (thread-db.o): Depend on $(linux_low_h).
3644 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3646 Rename "process" to "lwp" throughout.
3648 * linux-low.c (all_processes): Rename to...
3649 (all_lwps): ... this.
3650 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3651 (add_process): Rename to ...
3652 (add_lwp): ... this. Adjust.
3653 (linux_create_inferior): Adjust.
3654 (linux_attach_lwp): Adjust.
3655 (linux_attach): Adjust.
3656 (linux_kill_one_process): Rename to ...
3657 (linux_kill_one_lwp): ... this. Adjust.
3658 (linux_kill): Adjust.
3659 (linux_detach_one_process): Rename to ...
3660 (linux_detach_one_lwp): ... this. Adjust.
3661 (linux_detach): Adjust.
3662 (check_removed_breakpoint): Adjust.
3663 (status_pending_p): Adjust.
3664 (linux_wait_for_process): Rename to ...
3665 (linux_wait_for_lwp): ... this. Adjust.
3666 (linux_wait_for_event): Adjust.
3667 (send_sigstop): Adjust.
3668 (wait_for_sigstop): Adjust.
3669 (stop_all_processes): Rename to ...
3670 (stop_all_lwps): ... this.
3671 (linux_resume_one_process): Rename to ...
3672 (linux_resume_one_lwp): ... this. Adjust.
3673 (linux_set_resume_request, linux_continue_one_thread)
3674 (linux_queue_one_thread, resume_status_pending_p)
3675 (usr_store_inferior_registers, regsets_store_inferior_registers)
3676 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3678 * linux-low.h (get_process): Rename to ...
3679 (get_lwp): ... this. Adjust.
3680 (get_thread_process): Rename to ...
3681 (get_thread_lwp): ... this. Adjust.
3682 (get_process_thread): Rename to ...
3683 (get_lwp_thread): ... this. Adjust.
3684 (struct process_info): Rename to ...
3685 (struct lwp_info): ... this.
3686 (all_processes): Rename to ...
3687 (all_lwps): ... this.
3688 * proc-service.c (ps_lgetregs): Adjust.
3689 * thread-db.c (thread_db_create_event, find_one_thread)
3690 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3692 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3694 * server.c (handle_query): Handle "qAttached".
3696 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3698 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3699 GPLv3, update license URL.
3701 2009-03-01 Doug Evans <dje@google.com>
3703 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3704 (server_h): Add gdb_signals.h.
3705 (signals.o): Update.
3706 * server.h (target_signal_from_host,target_signal_to_host_p)
3707 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3709 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3711 * remote-utils.c (getpkt): Also generate remote-debug
3712 information if noack_mode is set.
3714 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3716 * server.c (handle_query): Report qXfer:siginfo:read and
3717 qXfer:siginfo:write as supported and handle them.
3718 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3719 * linux-low.c (linux_xfer_siginfo): New.
3720 (linux_target_ops): Set it.
3722 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3724 * server.c (gdbserver_usage): Mention --remote-debug.
3725 (main): Accept '--remote-debug' switch.
3727 2009-01-18 Doug Evans <dje@google.com>
3729 * regcache.c (new_register_cache): No need to check result of xcalloc.
3730 * server.c (handle_search_memory): Back out calls to xmalloc,
3731 result is checked and error is returned to user upon failure.
3732 (handle_query): Ditto. Add more checks for result of malloc.
3733 (handle_v_cont): Check result of malloc, report error back to
3735 (handle_v_run): Ditto. Call freeargv.
3736 * server.h (freeargv): Declare.
3737 * utils.c (freeargv): New fn.
3739 2009-01-15 Doug Evans <dje@google.com>
3741 * gdbreplay.c (perror_with_name): Make arg const char *.
3742 * server.h (target_signal_to_name): Make return type const char *.
3743 * thread-db.c (thread_db_err_str): Make return type const char *.
3744 * utils.c (perror_with_name): Make arg const char *.
3746 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3748 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3749 when handling a EXIT_PROCESS_DEBUG_EVENT.
3751 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3753 * gdbreplay.c (gdbreplay_version): Update copyright year.
3754 * server.c (gdbserver_version): Likewise.
3756 2009-01-05 Doug Evans <dje@google.com>
3758 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3759 (handle_extended_wait): Improve comment.
3761 2008-12-13 Doug Evans <dje@google.com>
3763 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3764 * server.h (ATTR_MALLOC): New macro.
3765 (xmalloc,xcalloc,xstrdup): Declare.
3766 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3767 * inferiors.c: Ditto.
3768 * linux-low.c: Ditto.
3769 * mem-break.c: Ditto.
3770 * regcache.c: Ditto.
3771 * remote-utils.c: Ditto.
3774 * win32-low.c: Ditto.
3776 2008-12-12 Doug Evans <dje@google.com>
3778 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3779 in debugging printf.
3781 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3783 2008-12-09 Doug Evans <dje@google.com>
3785 * linux-low.h (struct process_info): Delete member tid, unused.
3786 * thread-db.c (find_one_thread): Update.
3787 (maybe_attach_thread): Update.
3789 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3791 * target.h (struct target_ops): Add qxfer_osdata member.
3792 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3794 (linux_qxfer_osdata): New functions.
3795 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3797 * server.c (handle_query): Handle "qXfer:osdata:read:".
3798 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3799 (buffer_xml_printf): New functions.
3800 * server.h (struct buffer): New.
3801 (buffer_grow_str, buffer_grow_str0): New macros.
3802 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3803 (buffer_xml_printf): Declare.
3805 2008-11-24 Doug Evans <dje@google.com>
3807 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3809 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3811 * server.c (handle_v_run): Always use the supplied argument list.
3813 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3815 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3816 (xtensa_regmap_table): Add entry for scompare1.
3818 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3820 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3821 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3822 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3823 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3824 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3825 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3826 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3827 XML target descriptions.
3828 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3829 when inferior is running on an ISA 2.05 or later processor. Add
3830 special case to return offset for full 64-bit slot of FPSCR when
3833 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3835 * Makefile.in (SFILES, clean): Added sparc64 files.
3836 (reg-sparc64.o, reg-sparc64.c): New.
3837 * configure.srv (sparc*-*-linux*): New configuration.
3838 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3839 syscall arguments for SPARC.
3840 (regsets_store_inferior_registers): Likewise.
3841 * linux-sparc-low.c: New file.
3843 2008-10-21 Doug Evans <dje@google.com>
3845 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3846 (READLINE_DIR,READLINE_DEP): Delete.
3847 (INTERNAL_CFLAGS): Update.
3848 (LINTFLAGS): Update.
3850 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3852 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3853 whole argv from the last run, not just argv[0].
3855 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3857 * regcache.c (new_register_cache): Return NULL if the register
3858 cache size isn't known yet.
3859 (free_register_cache): Avoid dereferencing a NULL regcache.
3861 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3863 * configure.srv: Merge MIPS and MIPS64.
3865 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3867 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3869 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3871 * Makefile.in: Add required vsx dependencies.
3873 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3874 Declare init_registers_powerpc_vsx32l.
3875 Declare init_registers_powerpc_vsx64l.
3876 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3877 (ppc_arch_setup): Check for VSX in hwcap.
3878 (ppc_fill_vsxregset): New function.
3879 (ppc_store_vsxregset): New function.
3880 Add new VSX entry in regset_info target_regsets.
3882 * configure.srv: Add new VSX dependencies.
3884 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3886 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3887 (remote_open): Set or clear transport_is_reliable.
3888 (putpkt_binary): Don't expect acks in noack mode.
3889 (getpkt): Don't send ack/nac in noack mode.
3890 * server.c (handle_general_set): Handle QStartNoAckMode.
3891 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3893 (main): Reset noack_mode on every connection.
3894 * server.h (noack_mode): Declare.
3896 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3898 * Makefile.in (GDBREPLAY_OBS): New variable.
3899 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3901 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3902 Daniel Jacobowitz <dan@codesourcery.com>
3904 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3905 (usr_store_inferior_registers): Likewise.
3906 (regsets_store_inferior_registers): Likewise.
3908 2008-07-31 Rolf Jansen <rj@surtec.com>
3909 Pedro Alves <pedro@codesourcery.com>
3911 * configure.ac: Check for memmem declaration.
3912 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3913 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3914 (disable_packet_qfThreadInfo): Unconditionally compile.
3915 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3916 * configure, config.in: Regenerate.
3918 2008-07-28 Doug Kwan <dougkwan@google.com>
3920 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3921 (linux_write_memory): Remove declaration of errno.
3923 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3925 * linux-low.c (handle_extended_wait): Do not use "status"
3926 variable uninitialized.
3928 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3930 * server.c (handle_v_attach): Inhibit reporting dll changes.
3932 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3934 * remote-utils.c (prepare_resume_reply): If requested, don't
3935 output "thread:TID" in the T stop reply.
3937 * server.c (disable_packet_vCont, disable_packet_Tthread)
3938 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3939 (handle_query): If requested, disable support for qC, qfThreadInfo
3941 (handle_v_requests): If requested, disable support for vCont.
3942 (gdbserver_show_disableable): New.
3943 (main): Handle --disable-packet and --disable-packet=LIST.
3945 * server.h (disable_packet_vCont, disable_packet_Tthread)
3946 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3948 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3950 * server.c (gdbserver_usage): Mention --version.
3952 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3954 * Makefile.in (gdbreplay.o): New rule.
3956 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3958 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3959 message, not gdbserver.
3961 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3962 Nathan Sidwell <nathan@codesourcery.com>
3963 Joseph Myers <joseph@codesourcery.com>
3965 * acinclude.m4: Include ../../config/acx.m4.
3966 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3967 * configure, config.in: Regenerate.
3968 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3969 * server.c (gdbserver_version): Print PKGVERSION.
3970 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3971 (main): Adjust gdbserver_usage calls.
3972 * gdbreplay.c (version, host_name): Add declarations.
3973 (gdbreplay_version, gdbreplay_usage): New.
3974 (main): Accept --version and --help options.
3976 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3978 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3979 (arm_breakpoint_at): Handle Thumb.
3980 (the_low_target): Add comment.
3982 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3984 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3986 2008-05-09 Doug Evans <dje@google.com>
3988 * server.h (decode_search_memory_packet): Declare.
3989 * remote-utils.c (decode_search_memory_packet): New fn.
3990 * server.c (handle_search_memory_1): New fn.
3991 (handle_search_memory): New fn.
3992 (handle_query): Process qSearch:memory packets.
3994 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3996 * regcache.c (registers_length): Remove.
3997 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3998 full register packet.
3999 * regcache.h (registers_length): Remove prototype.
4000 * server.h (PBUFSIZ): Define to 16384.
4002 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4004 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4005 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4006 powerpc-64l.o, and powerpc-altivec64l.o.
4007 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4008 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4009 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4010 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4011 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4014 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4015 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4016 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4017 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4018 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4019 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4020 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4021 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4022 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4023 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4026 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4027 (init_registers_powerpc_32l): ... this new prototype.
4028 (init_registers_powerpc_32): Remove, replace by ...
4029 (init_registers_powerpc_altivec32l): ... this new prototype.
4030 (init_registers_powerpc_e500): Remove, replace by ...
4031 (init_registers_powerpc_e500l): ... this new prototype.
4032 (init_registers_ppc64): Remove, replace by ...
4033 (init_registers_powerpc_64l): ... this new prototype.
4034 (init_registers_powerpc_64): Remove, replace by ...
4035 (init_registers_powerpc_altivec64l): ... this new prototype.
4036 (ppc_num_regs): Set to 73.
4037 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4038 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4039 (ppc_cannot_store_register): Handle orig_r3 and trap.
4040 (ppc_arch_setup): Update init_registers_... calls.
4041 (ppc_fill_gregset): Handle orig_r3 and trap.
4043 * inferiors.c (clear_inferiors): Reset current_inferior.
4045 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4047 * acinclude.m4: Add override.m4.
4048 * configure: Regenerate.
4050 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4052 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4053 initial call to init_register_ppc64.
4055 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4057 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4058 powerpc*-*-linux* case.
4059 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4061 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4063 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4064 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4066 * linux-ppc-low.c: Include <elf.h>.
4067 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4068 (ppc_hwcap): New global variable.
4069 (ppc_regmap): Remove __SPE__ #ifdef sections.
4070 (ppc_regmap_e500): New global variable.
4071 (ppc_cannot_store_register): Update __SPE__ special case.
4072 (ppc_get_hwcap): New function.
4073 (ppc_arch_setup): Use it to determine whether inferior supports
4074 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4075 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4076 Do not access registers if target does not support AltiVec.
4077 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4078 Do not access registers if target does not support SPE.
4079 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4081 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4083 * linux-low.c (disabled_regsets, num_regsets): New.
4084 (use_regsets_p): Delete.
4085 (linux_wait_for_process): Clear disabled_regsets.
4086 (regsets_fetch_inferior_registers): Check and set it.
4087 (regsets_store_inferior_registers): Likewise.
4088 (linux_fetch_registers, linux_store_registers): Do not use
4090 (initialize_low): Allocate disabled_regsets.
4092 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4094 * Makefile.in (LIBOBJS): New.
4096 (memmem.o): New rule.
4097 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4098 * configure: Regenerated.
4100 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4102 * server.c (handle_query): Never return "unsupported" for
4103 qXfer:features:read queries.
4105 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4107 * server.c (get_features_xml): Fix inverted condition.
4108 (handle_query): Always support qXfer:feature:read.
4110 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4112 * server.c (wrapper_argv): New.
4113 (start_inferior): Handle wrapper_argv. If set, expect an extra
4115 (gdbserver_usage): Document --wrapper.
4116 (main): Parse --wrapper.
4118 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4120 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4121 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4122 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4123 (ppc_set_pc): Likewise.
4124 (ppc_arch_setup): New function.
4125 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4126 of collect_register.
4127 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4129 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4131 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4132 instead of linux-ppc64-low.o.
4133 * linux-ppc64-low.c: Remove file.
4134 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4135 (linux-ppc64-low.o): Remove rule.
4137 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4138 (init_registers_powerpc_64): Likewise.
4139 (ppc_regmap): Conditionally define depending on __powerpc64__.
4140 (ppc_cannot_store_register): Do not special-case "fpscr" when
4141 compiled on __powerpc64__.
4142 (ppc_collect_ptrace_register): New function.
4143 (ppc_supply_ptrace_register): New function.
4144 (ppc_breakpoint): Change type to "unsigned int".
4145 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4146 (the_low_target): Conditionally provide initializers for the
4147 arch_setup member depending on __powerpc64__. Install
4148 collect_ptrace_register and supply_ptrace_register members.
4150 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4152 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4153 * server.c (gdbserver_xmltarget): Define.
4154 (get_features_xml): Use it to replace "target.xml" and arch_string.
4156 * configure.srv: Remove srv_xmltarget. Add XML files that were
4157 mentioned there to srv_xmlfiles instead. Remove conditional tests
4158 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4159 srv_xmlfiles and srv_regobj to include all possible choices.
4160 * configure.ac (srv_xmltarget): Remove.
4161 (srv_xmlfiles): Do not add "target.xml".
4162 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4163 checks for supplementary target information.
4164 * configure: Regenerate.
4165 * Makefile.in (XML_TARGET): Remove.
4166 (target.xml): Remove rule.
4167 (clean): Do not clean up target.xml.
4168 (.PRECIOUS): Do not mention target.xml.
4170 * target.h (struct target_ops): Remove arch_string member.
4171 * linux-low.c (linux_arch_string): Remove.
4172 (linux_target_ops): Remove arch_string initializer.
4173 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4174 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4175 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4176 * spu-low.c (spu_arch_string): Remove.
4177 (spu_target_ops): Remove arch_string initializer.
4178 * win32-low.c (win32_arch_string): Remove.
4179 (win32_target_ops): Remove arch_string initializer.
4180 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4181 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4182 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4184 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4186 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4187 by collect_ptrace_register and supply_ptrace_register hooks.
4188 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4189 instead of checking for the_low_target.left_pad_xfer.
4190 (usr_store_inferior_registers): Use collect_ptrace_register callback
4191 instead of checking for the_low_target.left_pad_xfer.
4193 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4194 (s390_supply_ptrace_register): Likewise.
4195 (s390_fill_gregset): Call s390_collect_ptrace_register.
4196 (the_low_target): Update.
4198 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4199 (ppc_supply_ptrace_register): Likewise.
4200 (the_low_target): Update.
4202 * linux-i386-low.c (the_low_target): Update.
4203 * linux-x86-64-low.c (the_low_target): Update.
4205 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4207 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4208 reg-s390.o and reg-s390x.o.
4210 * linux-low.c (new_inferior): New global variable.
4211 (linux_create_inferior, linux_attach): Set it.
4212 (linux_wait_for_process): Call the_low_target.arch_setup after the
4213 target has stopped for the first time.
4214 (initialize_low): Do not call the_low_target.arch_setup.
4216 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4217 (s390_set_pc): Likewise.
4218 (s390_arch_setup): New function.
4219 (the_low_target): Use s390_arch_setup as arch_setup routine.
4221 * regcache.c (realloc_register_cache): New function.
4222 (set_register_cache): Call it for each existing regcache.
4224 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4226 * server.h (init_registers): Remove prototype.
4228 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4229 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4230 instead of init_registers ().
4231 * linux-arm-low.c (init_registers_arm): Add prototype.
4232 (init_registers_arm_with_iwmmxt): Likewise.
4233 (the_low_target): Add initializer for arch_setup field.
4234 * linux-cris-low.c (init_registers_cris): Add prototype.
4235 (the_low_target): Add initializer for arch_setup field.
4236 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4237 (the_low_target): Add initializer for arch_setup field.
4238 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4239 (the_low_target): Add initializer for arch_setup field.
4240 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4241 (the_low_target): Add initializer for arch_setup field.
4242 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4243 (the_low_target): Add initializer for arch_setup field.
4244 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4245 (the_low_target): Add initializer for arch_setup field.
4246 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4247 (init_registers_mips64_linux): Likewise.
4248 (the_low_target): Add initializer for arch_setup field.
4249 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4250 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4251 (the_low_target): Add initializer for arch_setup field.
4252 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4253 (init_registers_powerpc_64): Likewise.
4254 (the_low_target): Add initializer for arch_setup field.
4255 * linux-s390-low.c (init_registers_s390): Add prototype.
4256 (init_registers_s390x): Likewise.
4257 (the_low_target): Add initializer for arch_setup field.
4258 * linux-sh-low.c (init_registers_sh): Add prototype.
4259 (the_low_target): Add initializer for arch_setup field.
4260 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4261 (the_low_target): Add initializer for arch_setup field.
4262 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4263 (the_low_target): Add initializer for arch_setup field.
4265 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4266 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4267 instead of init_registers ().
4268 * win32-arm-low.c (init_registers_arm): Add prototype.
4269 (the_low_target): Add initializer for arch_setup field.
4270 * win32-i386-low.c (init_registers_i386): Add prototype.
4271 (the_low_target): Add initializer for arch_setup field.
4273 * spu-low.c (init_registers_spu): Add prototype.
4274 (initialize_low): Call initialie_registers_spu () instead of
4275 initialize_registers ().
4277 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4279 * server.c (handle_v_requests): When handling the vRun and vAttach
4280 packets, if already debugging a process, don't kill it. Return an
4283 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4285 * server.c (handle_query): Correct length check.
4287 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4289 * win32-low.c (do_initial_child_stuff): Add process handle
4290 parameter. Set current_process_handle and current_process_id from the
4291 parameters. Clear globals.
4292 (win32_create_inferior): Don't set current_process_handle and
4293 current_process_id here. Instead pass them on the call to
4294 do_initial_child_stuff.
4295 (win32_attach): Likewise.
4296 (win32_clear_inferiors): New.
4297 (win32_kill): Don't close the current process handle or the
4298 current thread handle here. Instead call win32_clear_inferiors.
4299 (win32_detach): Don't open a new handle to the process. Call
4300 win32_clear_inferiors.
4301 (win32_join): Don't rely on current_process_handle; open a new
4302 handle using the process id.
4303 (win32_wait): Call win32_clear_inferiors when the inferior process
4306 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4308 * server.c (monitor_show_help): Add "exit".
4310 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4312 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4313 (clean): Add reg-xtensa.c.
4314 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4315 * configure.srv (xtensa*-*-linux*) New target.
4316 * linux-xtensa-low.c: New.
4317 * xtensa-xtregs.c: New.
4319 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4321 * hostio.c: Don't include errno.h.
4322 (errno_to_fileio_errno): Move to hostio-errno.
4323 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4324 error number outputting to the target->hostio_last_error callback.
4325 (hostio_packet_error): Use FILEIO_EINVAL directly.
4326 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4327 calls to hostio_error.
4328 * hostio-errno.c: New.
4329 * server.h (hostio_last_error_from_errno): Declare.
4330 * target.h (target_ops): Add hostio_last_error member.
4331 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4332 as hostio_last_error handler.
4333 * spu-low.c (spu_target_ops): Likewise.
4334 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4335 (wince_hostio_last_error): New functions.
4336 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4337 as hostio_last_error handler.
4338 (win32_target_ops) [!_WIN32_WCE]: Register
4339 hostio_last_error_from_errno as hostio_last_error handler.
4340 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4341 (hostio-errno.o): New rule.
4342 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4343 * configure.srv (srv_hostio_err_objs): New variable. Default to
4345 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4346 * configure: Regenerate.
4348 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4350 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4351 (linux_kill, linux_detach): Clean up the process list.
4352 * remote-utils.c (remote_open): Improve port number parsing.
4353 (putpkt_binary, input_interrupt): Only send interrupts if the target
4355 * server.c (extended_protocol): Make static.
4356 (attached): Define earlier.
4357 (exit_requested, response_needed, program_argv): New variables.
4358 (target_running): New.
4359 (start_inferior): Clear attached here.
4360 (attach_inferior): Set attached here.
4361 (require_running): Define.
4362 (handle_query): Use require_running and target_running. Implement
4364 (handle_v_attach, handle_v_run): New.
4365 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4366 (gdbserver_usage): Update.
4367 (main): Redo argument parsing. Handle --debug and --multi. Handle
4368 --attach along with other options or after the port. Save
4369 program_argv. Support no initial program. Resynchronize
4370 communication with GDB after an error. Handle "monitor exit".
4371 Use require_running and target_running. Always allow the extended
4372 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4373 restart in extended mode.
4374 * README: Refer to the GDB manual. Update --attach usage.
4376 2007-12-20 Andreas Schwab <schwab@suse.de>
4378 * linux-low.c (STACK_SIZE): Define.
4379 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4380 (linux_test_for_tracefork): Likewise.
4382 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4384 * linux-low.c (linux_wait_for_event): Update messages. Do not
4385 reinsert auto-delete breakpoints.
4386 * mem-break.c (struct breakpoint): Change return type of handler to
4388 (set_breakpoint_at): Update handler type.
4389 (reinsert_breakpoint_handler): Return 1 instead of calling
4391 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4393 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4394 * mem-break.h (set_breakpoint_at): Update handler type.
4395 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4396 * win32-low.c (auto_delete_breakpoint): New.
4397 (get_child_debug_event): Use it.
4399 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4401 * configure.ac: Check for pread and pwrite.
4402 * hostio.c (handle_pread): Fall back to lseek and read.
4403 (handle_pwrite): Fall back to lseek and write.
4404 * config.in, configure: Regenerated.
4406 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4408 * server.c (myresume): Add own_buf argument.
4409 (main): Update calls.
4411 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4413 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4414 * remote-utils.c (remote_open): Do not call disable_async_io.
4415 (block_async_io): Delete.
4416 (unblock_async_io): Make static.
4417 (initialize_async_io): New.
4418 * server.c (handle_v_cont): Handle async I/O here.
4419 (myresume): Likewise. Move other common resume tasks here...
4420 (main): ... from here. Call initialize_async_io. Disable async
4421 I/O before the main loop.
4422 * server.h (initialize_async_io): Declare.
4423 (block_async_io, unblock_async_io): Delete prototypes.
4424 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4426 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4428 * remote-utils.c (readchar): Allow binary data in received messages.
4430 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4432 * win32-low.c (attaching): New global.
4433 (win32_create_inferior): Clear the `attaching' global.
4434 (win32_attach): Set the `attaching' global.
4435 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4436 attaching. Only set a breakpoint at the entry point if not
4439 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4441 * server.c (main): Don't report dll events on the initial
4442 connection on attaches.
4444 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4446 * server.c (main): Relax numerical bases supported for the pid of
4447 the --attach command line argument.
4449 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4451 * win32-low.c (win32_attach): Call OpenProcess before
4452 DebugActiveProcess, not after. Add last error output to error
4455 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4457 * win32-low.c (win32_get_thread_context)
4458 (win32_set_thread_context): New functions.
4459 (thread_rec): Use win32_get_thread_context.
4460 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4461 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4464 2007-12-03 Leo Zayas
4465 Pedro Alves <pedro_alves@portugalmail.pt>
4467 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4469 (child_add_thread): Minor cleanup.
4470 (child_continue): Resume artificially suspended threads before
4471 calling ContinueDebugEvent.
4472 (suspend_one_thread): New.
4473 (fake_breakpoint_event): New.
4474 (get_child_debug_event): Change return type to int. Check here if
4475 gdb sent an interrupt request. If a soft interrupt was requested,
4476 fake a breakpoint event. Return 0 if there is no event to handle,
4478 (win32_wait): Don't check here if gdb sent an interrupt request.
4479 Ensure there is a valid event to handle.
4480 (win32_request_interrupt): Add soft interruption method as last
4483 2007-12-03 Leo Zayas
4484 Pedro Alves <pedro_alves@portugalmail.pt>
4486 * win32-low.h (win32_thread_info): Add descriptions to the
4487 structure members. Replace `suspend_count' counter by a
4489 * win32-low.c (thread_rec): Update condition of when to get the
4490 context from the inferior. Rely on ContextFlags being set if it
4491 has already been retrieved. Only suspend the inferior thread if
4492 we haven't already. Warn if that fails.
4493 (continue_one_thread): s/suspend_count/suspended/. Only call
4494 ResumeThread once. Warn if that fails.
4496 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4498 * win32-low.c (win32_wait): Don't read from the inferior when it
4501 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4503 * Makefile.in (win32_low_h): New variable.
4504 (win32-low.o): Add dependency on $(win32_low_h).
4505 (win32-arm-low.o, win32-i386-low.o): New rules.
4507 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4509 * hostio.c: Correct copyright year.
4511 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4513 * Makefile.in (OBS): Add hostio.o.
4514 (hostio.o): New rule.
4515 * server.h (handle_vFile): Declare.
4516 * hostio.c: New file.
4517 * server.c (handle_v_requests): Take packet_len and new_packet_len
4518 for binary packets. Call handle_vFile.
4519 (main): Update call to handle_v_requests.
4521 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4523 * linux-low.c: Include <sched.h>.
4525 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4527 * linux-low.c (linux_tracefork_grandchild): New.
4528 (linux_tracefork_child): Use clone.
4529 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4531 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4533 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4535 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4537 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4539 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4541 * inferiors.c (change_inferior_id): Delete.
4542 (add_pid_to_list, pull_pid_from_list): New.
4543 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4544 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4545 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4546 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4547 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4548 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4549 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4550 (using_threads): Always set to 1.
4551 (handle_extended_wait): New.
4552 (add_process): Do not set TID.
4553 (linux_create_inferior): Set must_set_ptrace_flags.
4554 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4555 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4556 (linux_thread_alive): Rename TID argument to LWPID.
4557 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4558 (linux_wait_for_event): Do not use TID or check using_threads. Update
4559 call to dead_thread_notify. Call handle_extended_wait.
4560 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4561 (send_sigstop): Delete sigstop_sent.
4562 (wait_for_sigstop): Avoid TID.
4563 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4564 (linux_test_for_tracefork): New.
4565 (linux_lookup_signals): Use thread_db_active and
4566 linux_supports_tracefork_flag.
4567 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4568 * linux-low.h (get_process_thread): Avoid TID.
4569 (struct process_ifo): Move thread_known and tid to the end. Remove
4571 (linux_attach_lwp, thread_db_init): Update prototypes.
4572 * server.h (change_inferior_id): Delete prototype.
4573 (add_pid_to_list, pull_pid_from_list): New prototypes.
4574 * thread-db.c (thread_db_use_events): New.
4575 (find_first_thread): Rename to...
4576 (find_one_thread): ...this. Update callers and messages. Do not
4577 call fatal. Check thread_db_use_events. Do not call
4578 change_inferior_id or new_thread_notify.
4579 (maybe_attach_thread): Update. Do not call new_thread_notify.
4580 (thread_db_init): Set thread_db_use_events. Check use_events.
4581 * utils.c (fatal, warning): Correct message prefix.
4583 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4585 * Makefile.in (clean): Remove new files.
4586 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4587 (powerpc-64.o, powerpc-64.c): New rules.
4588 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4589 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4591 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4593 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4594 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4595 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4596 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4597 (target_regsets): Add AltiVec and SPE register sets.
4598 * configure.ac: Check for AltiVec and SPE.
4599 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4600 (ppc_fill_vrregset, ppc_store_vrregset): New.
4601 (target_regsets): Add AltiVec register set.
4602 * configure: Regenerated.
4604 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4606 * linux-low.c (O_LARGEFILE): Define.
4607 (linux_read_memory): Use /proc/PID/mem.
4608 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4609 * configure, config.in: Regenerated.
4611 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4613 * linux-low.c (linux_wait_for_event): Do not pass signals while
4616 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4618 * win32-low.c (create_process): New.
4619 (win32_create_inferior): Use create_process instead of
4620 CreateProcess. If create_process failed retry appending an ".exe"
4621 suffix. Store the GetLastError result immediatelly after
4622 create_process calls and use it on the call to error.
4624 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4626 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4628 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4630 * configure.ac: Switch license to GPLv3.
4632 2007-08-01 Michael Snyder <msnyder@access-company.com>
4634 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4636 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4638 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4640 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4641 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4642 CloseToolhelp32Snapshot.
4643 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4644 CloseToolhelp32Snapshot.
4646 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4648 * server.c (main): Check for inferior exit before main loop.
4650 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4652 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4653 instead of on tmp_desc.
4655 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4656 Daniel Jacobowitz <dan@codesourcery.com>
4658 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4659 (add_thread): Minor cleanups.
4660 (clear_inferiors): Move lower in the file. Clear the DLL
4662 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4663 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4664 (xml_escape_text): New.
4665 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4667 (handle_v_cont): Report errors.
4668 (gdbserver_version): Update.
4669 (main): Correct size of own_buf. Do not report initial DLL events.
4670 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4671 (unloaded_dll, xml_escape_text): New.
4672 * win32-low.c (enum target_waitkind): Update comments.
4673 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4674 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4675 (win32_EnumProcessModules, win32_GetModuleInformation)
4676 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4677 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4678 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4679 (win32_Module32First, win32_Module32Next, load_toolhelp)
4680 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4681 (get_child_debug_event): Handle DLL events.
4682 (win32_wait): Likewise.
4684 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4686 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4687 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4689 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4691 * win32-low.c (handle_output_debug_string): Ignore event if not
4694 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4696 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4698 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4700 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4702 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4704 * inferiors.c (change_inferior_id): Add comment.
4705 * linux-low.c (check_removed_breakpoint): Add an early
4706 prototype. Improve debug output.
4707 (linux_attach): Doc update.
4708 (linux_detach_one_process, linux_detach): Clean up before releasing
4710 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4711 * linux-low.h (struct process_info): Doc improvement.
4712 * mem-break.c (delete_all_breakpoints): New.
4713 * mem-break.h (delete_all_breakpoints): New prototype.
4714 * thread-db.c (find_first_thread): New.
4715 (thread_db_create_event): Call it instead of
4716 thread_db_find_new_threads. Clean up unused variables.
4717 (maybe_attach_thread): Remove first thread handling.
4718 (thread_db_find_new_threads): Use find_first_thread.
4719 (thread_db_get_tls_address): Likewise.
4721 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4723 * thread-db.c (thread_db_find_new_threads): Add prototype.
4724 (thread_db_create_event): Check for the main thread before adding
4726 (maybe_attach_thread): Only enable event reporting if TID == 0.
4727 (thread_db_get_tls_address): Check for new threads.
4729 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4731 * linux-low.c (linux_create_inferior): Try execv before execvp.
4732 * spu-low.c (spu_create_inferior): Likewise.
4734 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4736 * linux-low.c (linux_create_inferior): Change execv to execvp.
4737 * spu-low.c (spu_create_inferior): Likewies.
4739 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4741 * Makefile.in (clean): Clean new files instead of deleted ones.
4742 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4743 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4745 * configure.srv: Specify XML files and new regformats for MIPS and
4747 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4748 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4749 an entry for the restart register.
4750 (mips_cannot_fetch_register, mips_cannot_store_register)
4751 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4752 register names to match the XML descriptions.
4753 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4754 restart register instead of $0.
4756 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4757 Markus Deuling <deuling@de.ibm.com>
4759 * remote-utils.c (decode_xfer_write): New function.
4760 * server.h (decode_xfer_write): Add prototype.
4761 * server.c (handle_query): Add PACKET_LEN argument. Support
4762 qXfer:spu:read and qXfer:spu:write packets.
4763 (main): Pass packet_len to handle_query.
4764 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4765 * target.h (target_ops): Add qxfer_spu.
4767 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4769 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4770 accessing non-seekable spufs files.
4772 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4774 * server.c (handle_query): Add reply for qC packet.
4776 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4777 Leo Zayas <lerele@champenstudios@com>
4779 * server.h (check_remote_input_interrupt_request): New function.
4780 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4781 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4782 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4783 (check_remote_input_interrupt_request): New function.
4784 * server.h (check_remote_input_interrupt_request): Declare.
4785 * win32-low.c (winapi_DebugBreakProcess,
4786 winapi_GenerateConsoleCtrlEvent): New typedefs.
4787 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4789 (win32_wait): Check for remote interrupt request
4790 with check_remote_input_interrupt_request.
4791 (win32_request_interrupt): New function.
4792 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4794 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4796 * win32-low.c (debug_registers_changed,
4797 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4798 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4799 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4800 (thread_rec): Get context using the low target.
4801 (child_add_thread): Call thread_added on the low target,
4802 which does the same thing.
4804 (do_initial_child_stuff): Remove debug registers references.
4805 Set context using the low target. Resume threads after
4806 setting the contexts.
4807 (child_continue): Remove dead variable. Remove debug
4808 registers references.
4809 (child_fetch_inferior_registers): Go through the low target.
4810 (do_child_store_inferior_registers): Remove.
4811 (child_store_inferior_registers): Go through the low target.
4812 (win32_resume): Remove debug registers references.
4813 Set context using the low target.
4814 (handle_exception): Change return type to void. Don't record
4815 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4816 first chance exception.
4817 (get_child_debug_event): Change return type to void. Remove
4818 goto loop. Always return after waiting for debug event.
4819 (win32_wait): Convert to switch statement. Handle spurious
4822 * win32-i386-low.c (debug_registers_changed,
4823 debug_registers_used): New.
4824 (initial_stuff): Rename to ...
4825 (i386_initial_stuff): ... this. Clear debug registers
4827 (store_debug_registers): Delete.
4828 (i386_get_thread_context): New.
4829 (load_debug_registers): Delete.
4830 (i386_set_thread_context): New.
4831 (i386_thread_added): New.
4832 (single_step): Rename to ...
4833 (i386_single_step): ... this.
4834 (do_fetch_inferior_registers): Rename to ...
4835 (i386_fetch_inferior_register): ... this.
4836 (i386_store_inferior_register): New.
4837 (the_low_target): Adapt to new interface.
4839 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4840 (arm_get_thread_context): New.
4841 (arm_set_thread_context): New.
4843 (do_fetch_inferior_registers): Rename to ...
4844 (arm_fetch_inferior_register): ... this.
4845 (arm_store_inferior_register): New.
4846 (arm_wince_breakpoint): Reimplement as unsigned long.
4847 (arm_wince_breakpoint_len): Define.
4848 (the_low_target): Adapt to new interface.
4850 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4851 load_debug_registers. Add get_thread_context, set_thread_context,
4852 thread_added and store_inferior_register. Rename
4853 fetch_inferior_registers to fetch_inferior_register.
4854 (regptr): Remove declaration.
4856 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4858 * linux-low.c (linux_detach): Change return type to int. Return 0.
4859 * spu-low.c (spu_detach): Likewise.
4861 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4863 * target.h (target_ops): Change return type of detach to int.
4865 (join_inferior): New.
4866 * server.c (main): Don't skip detach support on mingw32.
4867 If the inferior doesn't support detaching return error.
4868 Call join_inferior instead of using waitpid.
4869 * linux-low.c (linux_join): New.
4870 (linux_target_op): Add linux_join.
4871 * spu-low.c (spu_join): New.
4872 (spu_target_ops): Add spu_join.
4873 * win32-low.c (win32_detach): Adapt to new interface.
4874 Reopen current_process_handle before detaching. Issue a child
4875 resume before detaching.
4877 (win32_target_op): Add win32_join.
4879 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4881 * win32-low.c (win32-attach): Fix return value.
4882 * target.h (target_ops): Describe ATTACH return values.
4884 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4886 * win32-low.c (GETPROCADDRESS): Define.
4887 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4888 (winapi_DebugSetProcessKillOnExit): Likewise.
4889 (win32_create_inferior): Force usage of ansi CreateProcessA.
4890 (win32_attach): Use GETPROCADDRESS.
4891 (win32_detach): Likewise.
4893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4895 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4897 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4899 * win32-low.c: Commit leftover changes from 2007-03-29.
4901 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4903 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4904 fields short instead of int. Add explicit padding.
4905 (i387_cache_to_fsave): Remove unnecessary casts.
4906 (i387_fsave_to_cache): Doc fix.
4907 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4909 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4911 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4912 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4914 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4916 * configure.srv (arm*-*-mingw32ce*): Move near the other
4919 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4921 * configure.ac: Add errno checking.
4922 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4923 sys/file.h and malloc.h.
4924 (AC_CHECK_DECLS): Add perror.
4925 (srv_mingwce): Handle.
4926 * configure.srv (i[34567]86-*-cygwin*): Add
4927 win32-i386-low.o to srv_tgtobj.
4928 (i[34567]86-*-mingw*): Likewise.
4929 (arm*-*-mingw32ce*): Add case.
4930 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4931 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4932 [__MINGW32CE__] (strerror): New function.
4933 [__MINGW32CE__] (errno): Define to GetLastError.
4934 [__MINGW32CE__] (COUNTOF): New macro.
4935 (remote_open): Remove extra close call.
4936 * mem-break.c (delete_breakpoint_at): New function.
4937 * mem-break.h (delete_breakpoint_at): Declare.
4938 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4939 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4940 [USE_WIN32API] (read, write): Add char* casts.
4941 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4942 * server.h: Include wincecompat.h on Windows CE.
4943 [HAVE_ERRNO_H]: Check.
4944 (perror): Declare if not declared.
4945 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4946 (perror_with_name): Remove errno declaration.
4947 * wincecompat.h: New.
4948 * wincecompat.c: New.
4950 * win32-arm-low.c: New.
4951 * win32-i386-low.c: New.
4952 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4953 (OUTMSG2): Make it safe.
4955 (COUNTOF): New macro.
4956 (NUM_REGS): Get it from the low target.
4957 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4958 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4959 (thread_rec): Let low target handle debug registers.
4960 (child_add_thread): Likewise.
4961 (child_init_thread_list): Likewise.
4962 (continue_one_thread): Likewise.
4964 (do_child_fetch_inferior_registers): Move to ...
4965 * win32-i386-low.c: ... here, and rename to ...
4966 (do_fetch_inferior_registers): ... this.
4967 * win32-low.c (child_fetch_inferior_registers):
4968 Go through the low target.
4969 (do_child_store_inferior_registers): Use regptr.
4970 (strwinerror): New function.
4971 (win32_create_inferior): Handle Windows CE.
4972 Use strwinerror instead of strerror on Windows error
4973 codes. Add program to the error output.
4974 Don't close the main thread handle on Windows CE.
4975 (win32_attach): Use coredll.dll on Windows CE.
4976 (win32_kill): Close current process and current
4978 (win32_detach): Use coredll.dll on Windows CE.
4979 (win32_resume): Let low target handle debug registers, and
4981 (handle_exception): Add/Remove initial breakpoint. Avoid
4982 non-existant WSTOPSIG on Windows CE.
4983 (win32_read_inferior_memory): Cast to remove warning.
4984 (win32_arch_string): Go through the low target.
4985 (initialize_low): Call set_breakpoint_data with the low
4986 target's breakpoint.
4987 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4988 FOP_REGNUM, mappings): Move to ...
4989 * win32-i386-low.c: ... here.
4990 * win32-low.c (win32_thread_info): Move to ...
4991 * win32-low.h: ... here.
4992 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4993 win32-arm-low.c and wincecompat.c.
4994 (all:): Add $EXEEXT.
4995 (install-only:): Likewise.
4996 (gdbserver:): Likewise.
4997 (gdbreplay:): Likewise.
4998 * config.in: Regenerate.
4999 * configure: Regenerate.
5001 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5003 * win32-low.c: Rename typedef thread_info to
5004 win32_thread_info throughout.
5006 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5008 * win32-i386-low.c: Rename to ...
5009 * win32-low.c: ... this.
5010 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5011 * Makefile.in: Likewise.
5013 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5015 * remote-utils.c (monitor_output): Constify msg parameter.
5016 * server.h (monitor_output): Likewise.
5017 * win32-i386-low.c (handle_output_debug_string): New.
5018 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5019 handle_output_debug_string.
5020 (get_child_debug_event): Likewise.
5022 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5024 * server.c (main): Correct strtoul check.
5026 2007-03-27 Jon Ringle <jon@ringle.org>
5028 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5030 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5032 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5034 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5036 * terminal.h: Check HAVE_SGTTY_H.
5038 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5040 * remote-utils.c (remote_open): Print out the assigned port number.
5042 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5044 * remote-utils.c (monitor_output): New function.
5045 * server.c (debug_threads): Define here.
5046 (monitor_show_help): New function.
5047 (handle_query): Handle qRcmd.
5048 (main): Do not handle 'd' packet.
5049 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5050 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5053 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5055 * Makefile.in (EXEEXT): New.
5056 (clean): Use $(EXEEXT).
5058 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5060 * target.h (target_ops): Rename send_signal to request_interrupt,
5061 and remove enum target_signal parameter.
5062 * linux-low.c (linux_request_interrupt): Rename from
5063 linux_send_signal, and always send SIGINT.
5064 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5065 and always send SIGINT.
5066 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5068 (input_interrupt): Likewise.
5070 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5072 * server.c (get_features_xml): Check if target implemented
5074 * win32-i386-low.c (win32_arch_string): New.
5075 (win32_target_ops): Add win32_arch_string as arch_string member.
5077 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5079 * spu-low.c (spu_arch_string): New.
5080 (spu_target_ops): Add spu_arch_string.
5082 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5084 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5085 * configure.ac: Do not check for terminal.h.
5086 * configure, config.in: Regenerated.
5088 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5090 * Makefile.in (OBS): Add $(XML_BUILTIN).
5091 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5093 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5094 (arm-with-iwmmxt.c): New.
5095 * config.in, configure: Regenerate.
5096 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5097 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5098 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5099 (arm*-*-linux*): Add iWMMXt and regset support.
5100 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5101 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5102 (arm_store_wmmxregset, target_regsets): New.
5103 * server.c (get_features_xml): Take annex argument. Check builtin
5105 (handle_query): Handle multiple annexes.
5107 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5109 * remote-utils.c [USE_WIN32API] (read, write): Define.
5110 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5113 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5115 * linux-i386-low.c (the_low_target): Set arch_string.
5116 * linux-x86-64-low.c (the_low_target): Likewise.
5117 * linux-low.c (linux_arch_string): New.
5118 (linux_target_ops): Add it.
5119 * linux-low.h (struct linux_target_ops): Add arch_string.
5120 * server.c (write_qxfer_response): Use const void * for DATA.
5121 (get_features_xml): New.
5122 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5123 * target.h (struct target_ops): Add arch_string method.
5125 2007-01-03 Denis Pilat <denis.pilat@st.com>
5126 Daniel Jacobowitz <dan@codesourcery.com>
5128 * linux-low.c (linux_kill): Handle being called with no threads.
5129 * win32-i386-low.c (win32_kill): Likewise.
5130 (get_child_debug_event): Clear current_process_handle.
5132 2006-12-30 Denis PILAT <denis.pilat@st.com>
5133 Daniel Jacobowitz <dan@codesourcery.com>
5135 * remote-utils.c (remote_open): Check the type of specified
5136 serial port devices before opening them.
5137 * server.c (main): Kill the inferior if an error occurs during
5138 the first remote_open.
5140 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5142 * README: Update supported targets.
5144 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5146 * Makefile.in (clean): Remove reg-mips64.c.
5147 (reg-mips64.c, reg-mips64.o): New rules.
5148 * configure.srv: Handle mips64. Include regset support for mips.
5149 * linux-mips-low.c (union mips_register): New.
5150 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5151 (mips_breakpoint, mips_breakpoint_at): Use int.
5152 (mips_collect_register, mips_supply_register)
5153 (mips_collect_register_32bit, mips_supply_register_32bit)
5154 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5155 (mips_store_fpregset, target_regsets): New.
5156 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5158 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5160 * configure.srv: Add target "spu*-*-*".
5161 * Makefile.in (clean): Remove reg-spu.c.
5162 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5163 * spu-low.c: New file.
5165 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5167 * configure.ac: Correct td_thr_tls_get_addr test.
5168 * configure: Regenerated.
5170 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5172 * linux-low.c (linux_wait_for_event): Reformat. Use the
5174 * remote-utils.c (decode_address_to_semicolon): New.
5175 * server.c (pass_signals, handle_general_set): New.
5176 (handle_query): Mention QPassSignals for qSupported.
5177 (main): Call handle_general_set.
5178 * server.h (pass_signals, decode_address_to_semicolon): New.
5180 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5182 * server.c (handle_query): Correct error handling for read_auxv.
5184 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5186 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5187 and srv_linux_thread_db to yes.
5188 * linux-s390-low.c (s390_fill_gregset): New function.
5189 (target_regsets): Define data structure.
5191 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5193 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5194 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5195 * config.in, configure: Regenerated.
5196 * inferiors.c (gdb_id_to_thread): New function.
5197 (gdb_id_to_thread_id): Use it.
5198 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5199 * linux-low.h (struct process_info): Add th member.
5200 (thread_db_get_tls_address): New prototype.
5201 * remote-utils.c (decode_address): Make non-static.
5202 * server.c (handle_query): Handle qGetTLSAddr.
5203 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5204 * target.h (struct target_ops): Add get_tls_address.
5205 * thread-db.c (maybe_attach_thread): Save the thread handle.
5206 (thread_db_get_tls_address): New.
5208 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5210 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5211 (linux_resume_one_process): Take a siginfo_t *. Update all
5212 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5213 (struct pending_signals): Add a siginfo_t.
5214 (linux_wait_for_process): Always set last_status.
5215 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5216 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5217 * linux-low.h (struct process_info): Add last_status.
5219 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5221 * remote-utils.c (try_rle): New function.
5222 (putpkt_binary): Use it.
5224 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5226 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5227 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5228 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5229 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5230 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5233 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5235 * server.c (terminal_fd): New variable.
5236 (old_foreground_pgrp): Likewise.
5237 (restore_old_foreground_pgrp): New function.
5238 (start_inferior): Record the terminal file descriptor in terminal_fd
5239 and its original foreground group in old_foreground_pgrp. Register
5240 restore_old_foreground_pgrp with atexit().
5242 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5244 * server.c (handle_query): Correct qPart to qXfer.
5246 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5248 * configure.ac: Check for more headers which are missing on
5249 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5250 * configure.srv: Add Cygwin and mingw32.
5251 * remote-utils.c: Don't include headers unconditionally which
5252 are missing on mingw32. Include <winsock.h> for mingw32.
5253 (remote_open): Adjust for mingw32 support. Flush
5254 standard error after writing to it.
5255 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5256 (unblock_async_io, enable_async_io, disable_async_io)
5257 (readchar, getpkt): Update for Winsock support.
5258 (prepare_resume_reply): Expect a protocol signal number.
5259 * server.c: Disable <sys/wait.h> on mingw32.
5260 (start_inferior): Adjust for mingw32 support. Flush
5261 standard error after writing to it.
5262 (attach_inferior): Likewise. Use protocol signal
5264 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5266 * win32-i386-low.c: New file.
5267 * Makefile.in (XM_CLIBS): Set.
5268 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5269 (win32-i386-low.o): New dependency rule.
5270 * linux-low.c (linux_wait): Use target signal numbers.
5271 * target.h (struct target_ops): Doc fix.
5272 * server.h (target_signal_to_name): New prototype.
5273 * gdbreplay.c: Don't include headers unconditionally which
5274 are missing on mingw32. Include <winsock.h> for mingw32.
5275 (remote_close, remote_open): Adjust for Winsock support.
5276 * configure, config.in: Regenerated.
5278 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5280 * server.c (decode_xfer_read, write_qxfer_response): New.
5281 (handle_query): Take a packet length argument. Handle
5282 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5283 the qSupported response.
5284 (main): Update call to handle_query.
5286 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5288 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5289 (putpkt_binary): Renamed from putpkt and adjusted for binary
5291 (putpkt): New wrapper for putpkt_binary.
5292 (readchar): Don't mask off the high bit.
5293 (decode_X_packet): New function.
5294 * server.c (main): Call putpkt_binary if a handler sets the packet
5295 length. Save the length of the incoming packet. Handle 'X'.
5296 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5298 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5300 * server.c (handle_query): Handle qSupported.
5302 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5304 * remote-utils.c (all_symbols_looked_up): New variable.
5305 (look_up_one_symbol): Check it.
5306 * server.h (look_up_one_symbol): New declaration.
5307 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5309 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5311 * Makefile.in (linux-arm-low.o): Update dependencies.
5312 * linux-arm-low.c: Include "gdb_proc_service.h".
5313 (PTRACE_GET_THREAD_AREA): Define.
5314 (ps_get_thread_area): New function.
5316 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5318 * configure.srv (m68k*-*-uclinux*): New target.
5319 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5320 (linux_resume_one_process): Remove extraneous cast.
5321 (linux_read_offsets): New.
5322 (linux_target_op): Add linux_read_offsets on mmuless systems.
5323 * server.c (handle_query): Add qOffsets logic.
5324 * target.h (struct target_ops): Add read_offsets.
5326 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5328 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5329 (PTRACE_GET_THREAD_AREA): Define.
5330 (ps_get_thread_area): New function.
5331 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5332 (linux-x86-64-low.o): Update.
5334 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5336 * configure.ac: Remove checks for prfpregset_t.
5337 * gdb_proc_service.h: New file.
5338 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5339 new "gdb_proc_service.h".
5340 * proc-service.c: Likewise.
5341 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5342 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5343 * Makefile.in (gdb_proc_service_h): Updated.
5344 * configure, config.in: Regenerated.
5346 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5348 * remote-utils.c (prepare_resume_reply): Move declaration
5349 of gdb_id_from_wait to the top of the block.
5351 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5353 * linux-low.c (regsets_store_inferior_registers): Read the regset
5354 from the target before filling it.
5356 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5358 * server.c (attach_inferior): Return SIGTRAP for a successful
5361 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5363 * Makefile.in (OBS): Add version.o.
5364 (STAGESTUFF): Delete.
5365 (version.o): Add dependencies.
5366 (version.c): Replace rule.
5367 (clean): Remove version.c.
5368 * server.c (gdbserver_version): New.
5369 (gdbserver_usage): Use printf.
5370 (main): Handle --version and --help.
5371 * server.h (version, host_name): Add declarations.
5373 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5385 * linux-x86-64-low.c:
5388 * linux-ppc64-low.c:
5397 * linux-crisv32-low.c:
5409 * gdbserver.1: Add (C) after Copyright. Update the FSF
5412 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5414 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5415 (arm_breakpoint_at): Recognize both breakpoints.
5416 (the_low_target): Use the correct breakpoint instruction.
5418 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5420 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5421 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5422 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5423 (the_low_target): Update.
5425 2005-10-25 Andreas Schwab <schwab@suse.de>
5427 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5429 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5430 (ia64_num_regs): Reduce to 462.
5432 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5434 * acinclude.m4: Correct quoting.
5435 * aclocal.m4: Regenerated.
5437 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5438 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5439 (thread_db_init): Call thread_db_err_str.
5440 * configure.ac: Check for TD_VERSION.
5441 * config.in, configure: Regenerated.
5443 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5445 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5447 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5449 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5450 is not available. Define HAVE_PTRACE_GETREGS if it is.
5451 * config.in, configure: Regenerated.
5452 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5453 * linux-i386-low.c, linux-m68k-low.c: Update to use
5454 HAVE_PTRACE_GETREGS.
5455 * linux-low.c (regsets_fetch_inferior_registers)
5456 (regsets_store_inferior_registers): Only return 0 if we processed
5458 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5459 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5461 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5463 * inferiors.c (struct thread_info): Add gdb_id.
5464 (add_thread): Add gdb_id argument.
5465 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5466 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5467 calls to add_thread.
5468 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5469 * server.c (handle_query): Use thread_to_gdb_id.
5470 (handle_v_cont, main): Use gdb_id_to_thread_id.
5471 * server.h (add_thread): Update prototype.
5472 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5475 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5477 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5478 left-padded registers.
5479 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5480 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5482 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5484 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5485 * configure: Regenerate.
5486 * config.in: Regenerate.
5487 * server.h (NEED_DECLARATION_STRERROR):
5488 Replace with !HAVE_DECL_STRERROR.
5490 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5492 * linux-low.c (linux_wait, linux_send_signal): Don't test
5493 an unsigned long variable for > 0 if it could be MAX_ULONG.
5494 * server.c (myresume): Likewise.
5495 * target.c (set_desired_inferior): Likewise.
5497 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5499 * configure.ac: Simplify and improve check for socklen_t.
5500 * configure, config.in: Regenerate.
5502 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5504 * acconfig.h: Remove.
5505 * configure.ac: Add a test for socklen_t. Use three-argument
5506 AC_DEFINE throughout.
5507 * config.in: Regenerated using autoheader 2.59.
5508 * configure: Regenerated.
5510 * gdbreplay.c (socklen_t): Provide a default.
5511 (remote_open): Use socklen_t.
5512 * remote-utils.c (socklen_t): Provide a default.
5513 (remote_open): Use socklen_t.
5514 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5517 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5519 * linux-low.c (linux_read_memory, linux_write_memory)
5520 (linux_read_auxv): Likewise.
5521 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5522 (check_mem_write): Likewise.
5523 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5525 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5526 (registers_from_string, register_data): Likewise.
5527 * server.c (handle_query, main): Likewise.
5528 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5529 (decode_M_packet): Likewise.
5530 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5531 * target.h (struct target_ops): Update read_memory, write_memory,
5533 (read_inferior_memory, write_inferior_memory): Update.
5534 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5536 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5537 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5538 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5539 linux-s390-low.c, linux-sh-low.c: Update for changes in
5540 read_inferior_memory and the_low_target->breakpoint.
5542 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5544 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5545 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5546 * configure.srv: Add powerpc64-*-linux*.
5547 * linux-ppc64-low.c: New file.
5549 2005-05-23 Orjan Friberg <orjanf@axis.com>
5551 * linux-cris-low.c: New file with support for CRIS.
5552 * linux-crisv32-low.c: Ditto for CRISv32.
5553 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5554 (clean): Add reg-cris.c and reg-crisv32.c.
5555 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5556 reg-crisv32.o, and reg-crisv32.c to make rules.
5557 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5560 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5562 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5563 of sizeof (PTRACE_XFER_TYPE).
5564 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5566 2005-05-12 Orjan Friberg <orjanf@axis.com>
5568 * target.h (struct target_ops): Add insert_watchpoint,
5569 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5570 pointers for hardware watchpoint support.
5571 * linux-low.h (struct linux_target_ops): Ditto.
5572 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5573 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5574 to linux_target_ops.
5575 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5577 * server.c (main): Recognize 'Z' and 'z' packets.
5579 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5581 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5582 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5583 (the_low_target): Add new members.
5585 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5587 * proc-service.c (ps_lgetregs): Search all_processes instead of
5590 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5592 * server.c (start_inferior): Change return type to int.
5593 (attach_inferior): Change sigptr to int *.
5594 (handle_v_cont, handle_v_requests): Change signal to int *.
5595 (main): Change signal to int.
5597 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5599 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5600 * configure.srv: Add m32r*-*-linux*.
5601 * linux-m32r-low.c: New file.
5603 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5605 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5607 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5609 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5610 Take unsigned long arguments for PIDs.
5611 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5612 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5613 (wait_for_sigstop, linux_resume_one_process)
5614 (regsets_fetch_inferior_registers, linux_send_signal)
5615 (linux_read_auxv): Likewise. Update the types of variables holding
5616 PIDs. Update format string specifiers.
5617 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5618 * remote-utils.c (prepare_resume_reply): Likewise.
5619 * server.c (cont_thread, general_thread, step_thread)
5620 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5622 (handle_query): Update format specifiers.
5623 (handle_v_cont, main): Use strtoul for thread IDs.
5624 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5625 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5626 (general_thread, step_thread, thread_from_wait)
5627 (old_thread_from_wait): Update.
5628 * target.h (struct thread_resume): Use unsigned long for THREAD.
5629 (struct target_ops): Use unsigned long for arguments to attach and
5632 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5634 * acinclude.m4: Include bfd/bfd.m4 directly.
5635 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5636 <agriffis@toolchain.org>.
5637 * aclocal.m4, configure: Regenerated.
5639 2005-01-07 Andrew Cagney <cagney@gnu.org>
5641 * configure.ac: Rename configure.in, require autoconf 2.59.
5642 * configure: Re-generate.
5644 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5646 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5648 * aclocal.m4: Regenerated.
5649 * configure: Regenerated.
5651 2004-11-21 Andreas Schwab <schwab@suse.de>
5653 * linux-m68k-low.c (m68k_num_gregs): Define.
5654 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5655 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5656 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5657 (m68k_breakpoint_at): New. Add to the_low_target.
5659 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5660 srv_linux_thread_db to yes.
5662 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5664 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5665 (ARCH_SET_FS): Likewise.
5666 (ARCH_GET_FS): Likewise.
5667 (ARCH_GET_GS): Likewise.
5669 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5671 * linux-i386-low.c (ps_get_thread_area): New.
5672 * linux-x86-64-low.c (ps_get_thread_area): New.
5673 * linux-low.c: Include <sys/syscall.h>.
5674 (linux_kill_one_process): Don't kill the first thread here.
5675 (linux_kill): Kill the first thread here.
5676 (kill_lwp): New function.
5677 (send_sigstop, linux_send_signal): Use it.
5678 * proc-service.c: Clean up #ifdefs.
5679 (fpregset_info): Delete.
5680 (ps_lgetregs): Update and enable implementation.
5681 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5683 * remote-utils.c (struct sym_cache, symbol_cache): New.
5684 (input_interrupt): Print a clearer message.
5685 (async_io_enabled): New variable.
5686 (enable_async_io, disable_async_io): Use it. Update comments.
5687 (look_up_one_symbol): Use the symbol cache.
5688 * thread-db.c (thread_db_look_up_symbols): New function.
5689 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5691 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5693 * configure.in: Test for -rdynamic.
5694 * configure: Regenerated.
5695 * Makefile (INTERNAL_LDFLAGS): New.
5696 (gdbserver, gdbreplay): Use it.
5698 2004-09-02 Andrew Cagney <cagney@gnu.org>
5700 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5702 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5704 * linux-low.c (linux_wait): Clear all_processes list also.
5706 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5708 * linux-low.c: Include <errno.h>. Remove extern declaration of
5711 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5713 * gdbreplay.c, server.h, utils.c: Update copyright years.
5715 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5717 * server.c (main): Print child status or termination signal from
5718 variable 'signal', not 'sig'.
5720 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5722 * linux-low.c (linux_read_memory): Change return type to
5723 int. Check for and return error from ptrace().
5724 * target.c (read_inferior_memory): Change return type to int. Pass
5725 back return status from the_target->read_memory().
5726 * target.h (struct target_ops): Adapt *read_memory() prototype.
5728 (read_inferior_memory): Adapt prototype.
5729 * server.c (main): Return an error packet if
5730 read_inferior_memory() returns an error.
5732 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5734 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5735 Unify with other clean targets.
5737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5739 * server.c (handle_v_cont): Call set_desired_inferior.
5741 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5743 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5745 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5747 * linux-low.c (linux_wait): Unblock async I/O.
5748 (linux_resume): Block and enable async I/O.
5749 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5750 * server.h (block_async_io, unblock_async_io): Add prototypes.
5752 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5754 * remote-utils.c (remote_open): Print a status notice after
5756 * server.c (attach_inferior): Print a status notice after
5759 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5761 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5763 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5765 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5767 * server.c, target.h: Update copyright years.
5769 2004-02-25 Roland McGrath <roland@redhat.com>
5771 * target.h (struct target_ops): New member `read_auxv'.
5772 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5773 * linux-low.c (linux_read_auxv): New function.
5774 (linux_target_ops): Initialize `read_auxv' member to that.
5776 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5778 Committed by Jim Blandy <jimb@redhat.com>.
5780 * linux-s390-low.c (s390_num_regs): Update.
5781 (s390_regmap): Remove control registers. Use __s390x__ predefine
5782 instead of GPR_SIZE to distiguish s390 and s390x targets.
5784 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5786 * linux-low.c: Update copyright year.
5787 (check_removed_breakpoint): Clear pending_is_breakpoint.
5788 (linux_set_resume_request, linux_queue_one_thread)
5789 (resume_status_pending_p): New functions.
5790 (linux_continue_one_thread): Use process->resume.
5791 (linux_resume): Only resume threads if there are no pending events.
5792 * linux-low.h (struct process_info): Add resume request
5795 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5797 * regcache.c (new_register_cache): Clear the allocated register
5798 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5800 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5802 * linux-low.c (linux_resume): Take a struct thread_resume *
5804 (linux_wait): Update call.
5805 (resume_ptr): New static variable.
5806 (linux_continue_one_thread): Renamed from
5807 linux_continue_one_process. Use resume_ptr.
5808 (linux_resume): Use linux_continue_one_thread.
5809 * server.c (handle_v_cont, handle_v_requests): New functions.
5810 (myresume): New function.
5811 (main): Handle 'v' case.
5812 * target.h (struct thread_resume): New type.
5813 (struct target_ops): Change argument of "resume" to struct
5815 (myresume): Delete macro.
5817 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5819 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5820 (uninstall): Support DESTDIR.
5822 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5824 * configure.srv: Add xscale*linux copy of arm*linux entry.
5826 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5828 * linux-arm-low.c (arm_reinsert_addr): New function.
5829 (the_low_target): Add arm_reinsert_addr.
5831 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5833 * mem-break.c: Remove whitespace at end of file.
5835 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5837 * configure.in: Check whether we need to prototype strerror.
5838 * server.h: Optionally prototype strerror.
5839 * gdbreplay.c (perror_with_name): Use strerror.
5840 * linux-low.c (linux_attach_lwp): Use strerror.
5841 * utils.c (perror_with_name): Use strerror.
5842 * config.in, configure: Regenerated.
5844 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5846 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5847 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5849 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5851 * Makefile.in (SFILES): Update.
5852 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5853 low-sun3.c: Remove files.
5855 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5857 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5858 (linux_detach_one_process, linux_detach): New functions.
5859 (linux_target_ops): Add linux_detach.
5860 * server.c (main): Handle 'D' packet.
5861 * target.h (struct target_ops): Add "detach" member.
5862 (detach_inferior): Define.
5864 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5866 From Kelley Cook <kelleycook@wideopenwest.com>:
5867 * configure.srv: Accept i[34567]86 variants.
5869 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5871 * linux-low.c (linux_wait_for_event): Correct comment typos.
5872 (linux_resume_one_process): Call check_removed_breakpoint.
5873 (linux_send_signal): New function.
5874 (linux_target_ops): Add linux_send_signal.
5875 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5877 * target.h (struct target_ops): Add send_signal.
5879 2003-05-29 Jim Blandy <jimb@redhat.com>
5881 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5882 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5883 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5884 away part of the register's value.
5886 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5888 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5889 (linux_wait_for_event, linux_init_signals): Likewise.
5891 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5893 * configure.in: Check for stdlib.h.
5894 * configure: Regenerated.
5895 * config.in: Regenerated.
5897 2003-01-04 Andreas Schwab <schwab@suse.de>
5899 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5901 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5903 * Makefile.in: Remove obsolete code.
5905 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5907 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5908 defined(PT_FPR0_HI).
5910 2002-11-17 Stuart Hughes <seh@zee2.com>
5912 * linux-arm-low.c (arm_num_regs): Increase.
5913 (arm_regmap): Include status register.
5915 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5917 * linux-low.c (register_addr): Remove incorrect -1 check.
5919 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5921 * linux-low.c (linux_create_inferior): Call setpgid. Return
5923 (unstopped_p, linux_signal_pid): Remove.
5924 (linux_target_ops): Remove linux_signal_pid.
5925 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5926 global instead of target method.
5927 * target.h (struct target_ops): Remove signal_pid. Update comment
5928 for create_inferior.
5929 * server.c (signal_pid): New variable.
5930 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5931 gdbserver. Set the child to be the foreground process group.
5932 (attach_inferior): Set signal_pid.
5934 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5936 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5938 2002-08-20 Jim Blandy <jimb@redhat.com>
5940 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5943 2002-08-01 Andrew Cagney <cagney@redhat.com>
5945 * Makefile.in: Make chill references obsolete.
5947 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5949 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5950 * configure: Regenerate.
5951 * config.in: Regenerate.
5953 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5955 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5956 (perror_with_name, remote_close, remote_open, expect, play): Static.
5958 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5960 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5961 byte offsets instead of an array of indexes.
5962 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5964 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5966 * regcache.c: Add comment.
5968 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5970 * thread-db.c: New file.
5971 * proc-service.c: New file.
5972 * acinclude.m4: New file.
5973 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5974 proc-service.o, and thread-db.o.
5975 (linux-low.o): Add USE_THREAD_DB.
5976 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5977 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5978 * aclocal.m4: Regenerated.
5979 * config.in: Regenerated.
5980 * configure: Regenerated.
5981 * configure.in: Check for proc_service.h, sys/procfs.h,
5982 thread_db.h, and linux/elf.h headrs.
5983 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5984 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5985 Check for -lthread_db and thread support.
5986 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5987 PowerPC, and SuperH.
5988 * i387-fp.c: Constify arguments.
5989 * i387-fp.h: Likewise.
5990 * inferiors.c: (struct thread_info): Renamed from
5991 `struct inferior_info'. Remove PID member. Use generic inferior
5992 list header. All uses updated.
5993 (inferiors, signal_pid): Removed.
5994 (all_threads): New variable.
5995 (get_thread): Define.
5996 (add_inferior_to_list): New function.
5997 (for_each_inferior): New function.
5998 (change_inferior_id): New function.
5999 (add_inferior): Removed.
6000 (remove_inferior): New function.
6001 (add_thread): New function.
6002 (free_one_thread): New function.
6003 (remove_thread): New function.
6004 (clear_inferiors): Use for_each_inferior and free_one_thread.
6005 (find_inferior): New function.
6006 (find_inferior_id): New function.
6007 (inferior_target_data): Update argument type.
6008 (set_inferior_target_data): Likewise.
6009 (inferior_regcache_data): Likewise.
6010 (set_inferior_regcache_data): Likewise.
6011 * linux-low.c (linux_bp_reinsert): Remove.
6012 (all_processes, stopping_threads, using_thrads)
6013 (struct pending_signals, debug_threads, pid_of): New.
6014 (inferior_pid): Replace with macro.
6015 (struct inferior_linux_data): Remove.
6016 (get_stop_pc, add_process): New functions.
6017 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6018 Use add_process and add_thread.
6019 (linux_attach_lwp): New function, based on old linux_attach. Use
6020 add_process and add_thread. Set stop_expected for new threads.
6021 (linux_attach): New function.
6022 (linux_kill_one_process): New function.
6023 (linux_kill): Kill all LWPs.
6024 (linux_thread_alive): Use find_inferior_id.
6025 (check_removed_breakpoints, status_pending_p): New functions.
6026 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6027 Update. Use WNOHANG. Wait for cloned processes also. Update process
6028 struct for the found process.
6029 (linux_wait_for_event): New function.
6030 (linux_wait): Use it. Support LWPs.
6031 (send_sigstop, wait_for_sigstop, stop_all_processes)
6032 (linux_resume_one_process, linux_continue_one_process): New functions.
6033 (linux_resume): Support LWPs.
6034 (REGISTER_RAW_SIZE): Remove.
6035 (fetch_register): Use register_size instead. Call supply_register.
6036 (usr_store_inferior_registers): Likewise. Call collect_register.
6038 (regsets_fetch_inferior_registers): Improve error message.
6039 (regsets_store_inferior_registers): Add debugging.
6040 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6041 (unstopped_p, linux_signal_pid): New functions.
6042 (linux_target_ops): Add linux_signal_pid.
6043 (linux_init_signals): New function.
6044 (initialize_low): Call it. Initialize using_threads.
6045 * regcache.c (inferior_regcache_data): Add valid
6047 (get_regcache): Fetch registers lazily. Add fetch argument
6048 and update all callers.
6049 (regcache_invalidate_one, regcache_invalidate): New
6051 (new_register_cache): Renamed from create_register_cache.
6052 Return the new regcache.
6053 (free_register_cache): Change argument to a void *.
6054 (registers_to_string, registers_from_string): Call get_regcache
6055 with fetch flag set.
6056 (register_data): Make static. Pass fetch flag to get_regcache.
6057 (supply_register): Call get_regcache with fetch flag clear.
6058 (collect_register): Call get_regcache with fetch flag set.
6059 (collect_register_as_string): New function.
6060 * regcache.h: Update.
6061 * remote-utils.c (putpkt): Flush after debug output and use
6063 Handle input interrupts while waiting for an ACK.
6064 (input_interrupt): Use signal_pid method.
6065 (getpkt): Flush after debug output and use stderr.
6066 (outreg): Use collect_register_as_string.
6067 (new_thread_notify, dead_thread_notify): New functions.
6068 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6070 (look_up_one_symbol): Flush after debug output.
6071 * server.c (step_thread, server_waiting): New variables.
6072 (start_inferior): Don't use signal_pid. Update call to mywait.
6073 (attach_inferior): Update call to mywait.
6074 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6075 (main): Don't fetch/store registers explicitly. Use
6076 set_desired_inferior. Support proposed ``Hs'' packet. Update
6079 (struct inferior_list, struct_inferior_list_entry): New.
6080 * target.c (set_desired_inferior): New.
6081 (write_inferior_memory): Constify.
6082 (mywait): New function.
6084 (struct target_ops): New signal_pid method.
6085 (mywait): Removed macro, added prototype.
6087 * linux-low.h (regset_func): Removed.
6088 (regset_fill_func, regset_store_func): New.
6089 (enum regset_type): New.
6090 (struct regset_info): Add type field. Use new operation types.
6091 (struct linux_target_ops): stop_pc renamed to get_pc.
6092 Add decr_pc_after_break and breakpoint_at.
6093 (get_process, get_thread_proess, get_process_thread)
6094 (strut process_info, all_processes, linux_attach_lwp)
6095 (thread_db_init): New.
6097 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6098 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6099 (the_low_target): Add new members.
6100 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6101 (i386_store_fpxregset): Constify.
6102 (target_regsets): Add new kind identifier.
6103 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6104 (i386_set_pc): Add debugging.
6105 (i386_breakpoint_at): New function.
6106 (the_low_target): Add new members.
6107 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6108 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6109 (mips_breakpoint_at): New.
6110 (the_low_target): Add new members.
6111 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6112 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6113 (the_low_target): Add new members.
6114 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6115 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6116 (the_low_target): Add new members.
6117 * linux-x86-64-low.c (target_regsets): Add new kind
6120 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6122 From Martin Pool <mbp@samba.org>:
6123 * server.c (gdbserver_usage): New function.
6126 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6128 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6131 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6133 * Makefile.in: Remove obsolete code.
6135 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6137 * linux-low.c (regsets_fetch_inferior_registers),
6138 (regsets_store_inferior_registers): Removed cast to int from
6140 * regcache.h: Added declaration of struct inferior_info.
6142 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6144 * inferiors.c (struct inferior_info): Add regcache_data.
6145 (add_inferior): Call create_register_cache.
6146 (clear_inferiors): Call free_register_cache.
6147 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6148 * regcache.c (struct inferior_regcache_data): New.
6149 (registers): Remove.
6150 (get_regcache): New function.
6151 (create_register_cache, free_register_cache): New functions.
6152 (set_register_cache): Don't initialize the register cache here.
6153 (registers_to_string, registers_from_string, register_data): Call
6155 * regcache.h: Add prototypes.
6156 * server.h: Likewise.
6158 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6160 * mem-break.c: New file.
6161 * mem-break.h: New file.
6162 * Makefile.in: Add mem-break.o rule; update server.h
6164 * inferiors.c (struct inferior_info): Add target_data
6166 (clear_inferiors): Free target_data member if set.
6167 (inferior_target_data, set_inferior_target_data): New functions.
6168 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6169 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6170 * linux-low.c (linux_bp_reinsert): New variable.
6171 (struct inferior_linux_data): New.
6172 (linux_create_inferior): Use set_inferior_target_data.
6173 (linux_attach): Likewise. Call add_inferior.
6174 (linux_wait_for_one_inferior): New function.
6175 (linux_wait): Call it.
6176 (linux_write_memory): Add const.
6177 (initialize_low): Call set_breakpoint_data.
6178 * linux-low.h (struct linux_target_ops): Add breakpoint
6180 * server.c (attach_inferior): Remove extra add_inferior
6182 * server.h: Include mem-break.h. Update inferior.c
6184 * target.c (read_inferior_memory)
6185 (write_inferior_memory): New functions.
6186 * target.h (read_inferior_memory)
6187 (write_inferior_memory): Change macros to prototypes.
6188 (struct target_ops): Update comments. Add const to write_memory
6191 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6193 * linux-low.c (usr_store_inferior_registers): Support
6194 registers which are allowed to fail to store.
6195 * linux-low.h (linux_target_ops): Likewise.
6196 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6197 (ppc_cannot_store_register): FPSCR may not be storable.
6199 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6201 * server.h: Include <string.h> if HAVE_STRING_H.
6202 * ChangeLog: Correct paths in last ChangeLog entry.
6204 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6206 * linux-low.h: Remove obsolete prototypes.
6207 (struct linux_target_ops): New.
6208 (extern the_low_target): New.
6209 * linux-low.c (num_regs, regmap): Remove declarations.
6210 (register_addr): Use the_low_target explicitly.
6211 (fetch_register): Likewise.
6212 (usr_fetch_inferior_registers): Likewise.
6213 (usr_store_inferior_registers): Likewise.
6214 * linux-arm-low.c (num_regs): Remove.
6215 (arm_num_regs): Define.
6216 (arm_regmap): Renamed from regmap, made static.
6217 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6219 (arm_cannot_store_register): Renamed from cannot_store_register,
6221 (the_low_target): New.
6222 * linux-i386-low.c (num_regs): Remove.
6223 (i386_num_regs): Define.
6224 (i386_regmap): Renamed from regmap, made static.
6225 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6227 (i386_cannot_store_register): Renamed from cannot_store_register,
6229 (the_low_target): New.
6230 * linux-ia64-low.c (num_regs): Remove.
6231 (ia64_num_regs): Define.
6232 (ia64_regmap): Renamed from regmap, made static.
6233 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6235 (ia64_cannot_store_register): Renamed from cannot_store_register,
6237 (the_low_target): New.
6238 * linux-m68k-low.c (num_regs): Remove.
6239 (m68k_num_regs): Define.
6240 (m68k_regmap): Renamed from regmap, made static.
6241 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6243 (m68k_cannot_store_register): Renamed from cannot_store_register,
6245 (the_low_target): New.
6246 * linux-mips-low.c (num_regs): Remove.
6247 (mips_num_regs): Define.
6248 (mips_regmap): Renamed from regmap, made static.
6249 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6251 (mips_cannot_store_register): Renamed from cannot_store_register,
6253 (the_low_target): New.
6254 * linux-ppc-low.c (num_regs): Remove.
6255 (ppc_num_regs): Define.
6256 (ppc_regmap): Renamed from regmap, made static.
6257 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6259 (ppc_cannot_store_register): Renamed from cannot_store_register,
6261 (the_low_target): New.
6262 * linux-s390-low.c (num_regs): Remove.
6263 (s390_num_regs): Define.
6264 (s390_regmap): Renamed from regmap, made static.
6265 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6267 (s390_cannot_store_register): Renamed from cannot_store_register,
6269 (the_low_target): New.
6270 * linux-sh-low.c (num_regs): Remove.
6271 (sh_num_regs): Define.
6272 (sh_regmap): Renamed from regmap, made static.
6273 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6275 (sh_cannot_store_register): Renamed from cannot_store_register,
6277 (the_low_target): New.
6278 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6279 (the_low_target): New.
6281 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6283 * Makefile.in: Add stamp-h target.
6284 * configure.in: Create stamp-h.
6285 * configure: Regenerated.
6287 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6289 * inferiors.c: New file.
6290 * target.c: New file.
6291 * target.h: New file.
6292 * Makefile.in: Add target.o and inferiors.o. Update
6294 * linux-low.c (inferior_pid): New static variable,
6295 moved from server.c.
6296 (linux_create_inferior): Renamed from create_inferior.
6297 Call add_inferior. Return 0 on success instead of a PID.
6298 (linux_attach): Renamed from myattach.
6299 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6300 (linux_thread_alive): Renamed from mythread_alive.
6301 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6303 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6304 (regsets_store_inferior_registers): Correct error message.
6305 Add missing ``return 0''.
6306 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6307 (linux_store_registers): Renamed from store_inferior_registers.
6308 (linux_read_memory): Renamed from read_inferior_memory.
6309 (linux_write_memory): Renamed from write_inferior_memory.
6310 (linux_target_ops): New structure.
6311 (initialize_low): Call set_target_ops ().
6312 * remote-utils.c (unhexify): New function.
6313 (hexify): New function.
6314 (input_interrupt): Send signals to ``signal_pid''.
6315 * server.c (inferior_pid): Remove.
6316 (start_inferior): Update create_inferior call.
6317 (attach_inferior): Call add_inferior.
6318 (handle_query): New function.
6319 (main): Call handle_query for `q' packets.
6320 * server.h: Include "target.h". Remove obsolete prototypes.
6321 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6323 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6325 * Makefile.in: Add WARN_CFLAGS. Update configury
6327 * configure.in: Check for <string.h>
6328 * configure: Regenerate.
6329 * config.in: Regenerate.
6330 * gdbreplay.c: Include needed system headers.
6331 (remote_open): Remove strchr prototype.
6332 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6333 * regcache.c (supply_register): Change buf argument to const void *.
6334 (supply_register_by_name): Likewise.
6335 (collect_register): Change buf argument to void *.
6336 (collect_register_by_name): Likewise.
6337 * regcache.h: Add missing prototypes.
6338 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6339 * server.c (handle_query): New function.
6340 (attached): New static variable, moved out of main.
6341 (main): Quiet longjmp clobber warnings.
6342 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6343 * utils.c (error): Remove NORETURN.