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