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