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