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