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