1 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4 (arm_store_gregset): Likewise.
5 * linux-arm-low.c (arm_get_hwcap): Likewise.
6 (arm_read_description): Likewise.
8 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
12 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
14 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
15 (ppc_fill_vsxregset): Likewise.
16 (ppc_store_vsxregset): Likewise.
17 (ppc_fill_vrregset): Likewise.
18 (ppc_store_vrregset): Likewise.
19 (ppc_fill_evrregset): Likewise.
20 (ppc_store_evrregset): Likewise.
22 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
24 * linux-ppc-low.c (ppc_usrregs_info): Remove
26 (ppc_arch_setup): Move lower in file.
28 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
30 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
31 (ps_pdwrite): Likewise.
33 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
35 * linux-arm-low.c (arm_new_thread): Move pointer dereference
36 to after assert checks.
38 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
40 * proc-service.c (ps_pdread): Add/adjust casts.
41 (ps_pdwrite): Add/adjust casts.
43 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
45 * server.c (handle_search_memory_1): Cast return value of
48 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
50 * server.c (write_qxfer_response): Change type of data to
53 2015-10-29 Pedro Alves <palves@redhat.com>
55 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
57 2015-10-29 Pedro Alves <palves@redhat.com>
59 * tracepoint.c (clear_installed_tracepoints): Add casts.
61 2015-10-29 Pedro Alves <palves@redhat.com>
63 * server.c (handle_v_cont, process_serial_event): Add enum
64 gdb_signal casts to signal parsing code.
66 2015-10-29 Pedro Alves <palves@redhat.com>
68 * linux-low.h (NULL_REGSET): Define.
69 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
70 * linux-arm-low.c (arm_regsets): Likewise.
71 * linux-crisv32-low.c (cris_regsets): Likewise.
72 * linux-m68k-low.c (m68k_regsets): Likewise.
73 * linux-mips-low.c (mips_regsets): Likewise.
74 * linux-nios2-low.c (nios2_regsets): Likewise.
75 * linux-ppc-low.c (ppc_regsets): Likewise.
76 * linux-s390-low.c (s390_regsets): Likewise.
77 * linux-sh-low.c (sh_regsets): Likewise.
78 * linux-sparc-low.c (sparc_regsets): Likewise.
79 * linux-tic6x-low.c (tic6x_regsets): Likewise.
80 * linux-tile-low.c (tile_regsets): Likewise.
81 * linux-x86-low.c (x86_regsets): Likewise.
82 * linux-xtensa-low.c (xtensa_regsets): Likewise.
84 2015-10-29 Pedro Alves <palves@redhat.com>
86 * linux-low.h (NULL_REGSET): Define.
87 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
88 * linux-arm-low.c (arm_regsets): Likewise.
89 * linux-crisv32-low.c (cris_regsets): Likewise.
90 * linux-m68k-low.c (m68k_regsets): Likewise.
91 * linux-mips-low.c (mips_regsets): Likewise.
92 * linux-nios2-low.c (nios2_regsets): Likewise.
93 * linux-ppc-low.c (ppc_regsets): Likewise.
94 * linux-s390-low.c (s390_regsets): Likewise.
95 * linux-sh-low.c (sh_regsets): Likewise.
96 * linux-sparc-low.c (sparc_regsets): Likewise.
97 * linux-tic6x-low.c (tic6x_regsets): Likewise.
98 * linux-tile-low.c (tile_regsets): Likewise.
99 * linux-x86-low.c (x86_regsets): Likewise.
100 * linux-xtensa-low.c (xtensa_regsets): Likewise.
102 2015-10-26 Doug Evans <dje@google.com>
104 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
106 2015-10-26 Doug Evans <dje@google.com>
108 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
110 2015-10-26 Doug Evans <dje@google.com>
112 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
114 (attach_thread, find_new_threads_callback): Ditto.
116 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
118 * mem-break.h (set_breakpoint_data): Remove.
120 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
122 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
123 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
124 (initialize_low): Remove set_breakpoint_data call.
125 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
126 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
127 (initialize_low): Remove set_breakpoint_data call.
128 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
129 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
130 (initialize_low): Remove set_breakpoint_data call.
132 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
134 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
135 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
136 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
137 * target.h (target_breakpoint_kind_from_pc): New macro.
139 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
141 * linux-low.c (default_breakpoint_kind_from_pc): New function.
142 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
143 the default breakpoint kind.
145 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
147 * linux-arm-low.c (arm_supports_z_point_type): Add software
150 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
152 * linux-arm-low.c: Refactor breakpoint definitions.
153 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
154 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
156 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
158 * Makefile.in: Add arm.c/o.
159 * configure.srv: Likewise.
160 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
161 (arm_breakpoint_kind_from_pc): New function.
162 (arm_sw_breakpoint_from_kind): Return proper kind.
163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
165 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
167 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
169 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
170 (struct raw_breakpoint) <size>: Remove.
171 (struct raw_breakpoint) <kind>: Add.
172 (bp_size): New function.
173 (bp_opcode): Likewise.
174 (find_raw_breakpoint_at): Adjust for kind.
175 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
176 (remove_memory_breakpoint): Adjust for kind call bp_size.
177 (set_raw_breakpoint_at): Adjust for kind.
178 (set_breakpoint): Likewise.
179 (set_breakpoint_at): Call breakpoint_kind_from_pc.
180 (delete_raw_breakpoint): Adjust for kind.
181 (delete_breakpoint): Likewise.
182 (find_gdb_breakpoint): Likewise.
183 (set_gdb_breakpoint_1): Likewise.
184 (set_gdb_breakpoint): Likewise.
185 (delete_gdb_breakpoint_1): Likewise.
186 (delete_gdb_breakpoint): Likewise.
187 (uninsert_raw_breakpoint): Likewise.
188 (reinsert_raw_breakpoint): Likewise.
189 (set_breakpoint_data): Remove.
190 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
191 (check_mem_read): Adjust for kind call bp_size.
192 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
193 (clone_one_breakpoint): Adjust for kind.
194 * mem-break.h (set_gdb_breakpoint): Likewise.
195 (delete_gdb_breakpoint): Likewise.
196 * server.c (process_serial_event): Likewise.
198 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
200 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
206 (arm_sw_breakpoint_from_kind): New function.
207 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
208 (struct linux_target_ops) <breakpoint>: Remove.
209 (struct linux_target_ops) <breakpoint_len>: Remove.
210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
212 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
213 (struct linux_target_ops) <breakpoint>: Remove.
214 (struct linux_target_ops) <breakpoint_len>: Remove.
215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
217 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
218 (struct linux_target_ops) <breakpoint>: Remove.
219 (struct linux_target_ops) <breakpoint_len>: Remove.
220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
222 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
223 and sw_breakpoint_from_kind to increment the pc.
224 (linux_breakpoint_kind_from_pc): New function.
225 (linux_sw_breakpoint_from_kind): New function.
226 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
227 (initialize_low): Call breakpoint_kind_from_pc and
228 sw_breakpoint_from_kind to replace breakpoint_data/len.
229 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
232 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
233 (struct linux_target_ops) <breakpoint>: Remove.
234 (struct linux_target_ops) <breakpoint_len>: Remove.
235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
237 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
238 (struct linux_target_ops) <breakpoint>: Remove.
239 (struct linux_target_ops) <breakpoint_len>: Remove.
240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
242 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
243 (struct linux_target_ops) <breakpoint>: Remove.
244 (struct linux_target_ops) <breakpoint_len>: Remove.
245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
247 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
248 (struct linux_target_ops) <breakpoint>: Remove.
249 (struct linux_target_ops) <breakpoint_len>: Remove.
250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
252 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
253 (struct linux_target_ops) <breakpoint>: Remove.
254 (struct linux_target_ops) <breakpoint_len>: Remove.
255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
257 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
258 (struct linux_target_ops) <breakpoint>: Remove.
259 (struct linux_target_ops) <breakpoint_len>: Remove.
260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
262 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
263 (struct linux_target_ops) <breakpoint>: Remove.
264 (struct linux_target_ops) <breakpoint_len>: Remove.
265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
267 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
268 (struct linux_target_ops) <breakpoint>: Remove.
269 (struct linux_target_ops) <breakpoint_len>: Remove.
270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
272 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
273 (struct linux_target_ops) <breakpoint>: Remove.
274 (struct linux_target_ops) <breakpoint_len>: Remove.
275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
277 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
278 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
279 (struct linux_target_ops) <breakpoint>: Remove.
280 (struct linux_target_ops) <breakpoint_len>: Remove.
281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
283 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
284 (struct linux_target_ops) <breakpoint>: Remove.
285 (struct linux_target_ops) <breakpoint_len>: Remove.
286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
289 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
291 * linux-cris-low.c (cris_get_pc): Remove void arg.
293 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
295 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
298 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
300 * inferiors.c (thread_pid_matches_callback): New function.
301 (find_thread_process): New function.
302 (remove_thread): Reset current_thread.
303 (remove_process): Assert threads have been removed first.
305 2015-10-15 Yao Qi <yao.qi@linaro.org>
307 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
309 (aarch64_remove_point): Likewise.
310 * regcache.c (regcache_register_size): New function.
312 2015-10-12 Yao Qi <yao.qi@linaro.org>
314 * linux-aarch64-low.c: Update all callers as emit_load_store
315 is renamed to aarch64_emit_load_store.
317 2015-10-12 Yao Qi <yao.qi@linaro.org>
319 * linux-aarch64-low.c: Update all callers of function renaming
320 from emit_insn to aarch64_emit_insn.
322 2015-10-12 Yao Qi <yao.qi@linaro.org>
324 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
326 (struct aarch64_memory_operand): Likewise.
328 (emit_insn): Move to arch/aarch64-insn.c.
329 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
330 (emit_load_store): Move to arch/aarch64-insn.c.
331 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
332 (can_encode_int32): Remove.
334 2015-10-12 Yao Qi <yao.qi@linaro.org>
336 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
337 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
338 (aarch64_relocate_instruction): Likewise.
339 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
340 (struct aarch64_insn_visitor): Likewise.
342 2015-10-12 Yao Qi <yao.qi@linaro.org>
344 * linux-aarch64-low.c (struct aarch64_insn_data): New.
345 (struct aarch64_insn_visitor): New.
346 (struct aarch64_insn_relocation_data): New.
347 (aarch64_ftrace_insn_reloc_b): New function.
348 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
349 (aarch64_ftrace_insn_reloc_cb): Likewise.
350 (aarch64_ftrace_insn_reloc_tb): Likewise.
351 (aarch64_ftrace_insn_reloc_adr): Likewise.
352 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
353 (aarch64_ftrace_insn_reloc_others): Likewise.
355 (aarch64_relocate_instruction): Use visitor.
357 2015-10-12 Yao Qi <yao.qi@linaro.org>
359 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
360 int. Add argument buf.
361 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
362 aarch64_relocate_instruction.
364 2015-10-12 Yao Qi <yao.qi@linaro.org>
366 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
367 argument insn. Remove local variable insn. Don't call
369 (aarch64_install_fast_tracepoint_jump_pad): Call
372 2015-09-30 Yao Qi <yao.qi@linaro.org>
374 * linux-aarch64-low.c (emit_movk): Shorten a long line.
375 (emit_load_store_pair): Likewise.
377 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
379 * dll.c (match_dll): Add cast(s).
380 (unloaded_dll): Likewise.
381 * linux-low.c (second_thread_of_pid_p): Likewise.
382 (delete_lwp_callback): Likewise.
383 (count_events_callback): Likewise.
384 (select_event_lwp_callback): Likewise.
385 (linux_set_resume_request): Likewise.
386 * server.c (accumulate_file_name_length): Likewise.
387 (emit_dll_description): Likewise.
388 (handle_qxfer_threads_worker): Likewise.
389 (visit_actioned_threads): Likewise.
390 * thread-db.c (any_thread_of): Likewise.
391 * tracepoint.c (same_process_p): Likewise.
392 (match_blocktype): Likewise.
393 (build_traceframe_info_xml): Likewise.
395 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
397 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
399 (gdb_unparse_agent_expr): Likewise.
400 * hostio.c (require_data): Likewise.
401 (handle_pread): Likewise.
402 * linux-low.c (disable_regset): Likewise.
403 (fetch_register): Likewise.
404 (store_register): Likewise.
405 (get_dynamic): Likewise.
406 (linux_qxfer_libraries_svr4): Likewise.
407 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
408 (set_fast_tracepoint_jump): Likewise.
409 (uninsert_fast_tracepoint_jumps_at): Likewise.
410 (reinsert_fast_tracepoint_jumps_at): Likewise.
411 (validate_inserted_breakpoint): Likewise.
412 (clone_agent_expr): Likewise.
413 * regcache.c (init_register_cache): Likewise.
414 * remote-utils.c (putpkt_binary_1): Likewise.
415 (decode_M_packet): Likewise.
416 (decode_X_packet): Likewise.
417 (look_up_one_symbol): Likewise.
418 (relocate_instruction): Likewise.
419 (monitor_output): Likewise.
420 * server.c (handle_search_memory): Likewise.
421 (handle_qxfer_exec_file): Likewise.
422 (handle_qxfer_libraries): Likewise.
423 (handle_qxfer): Likewise.
424 (handle_query): Likewise.
425 (handle_v_cont): Likewise.
426 (handle_v_run): Likewise.
427 (captured_main): Likewise.
428 * target.c (write_inferior_memory): Likewise.
429 * thread-db.c (try_thread_db_load_from_dir): Likewise.
430 * tracepoint.c (init_trace_buffer): Likewise.
431 (add_tracepoint_action): Likewise.
432 (add_traceframe): Likewise.
433 (add_traceframe_block): Likewise.
434 (cmd_qtdpsrc): Likewise.
435 (cmd_qtdv): Likewise.
436 (cmd_qtstatus): Likewise.
437 (response_source): Likewise.
438 (response_tsv): Likewise.
439 (cmd_qtnotes): Likewise.
440 (gdb_collect): Likewise.
441 (initialize_tracepoint): Likewise.
443 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
445 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
446 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
447 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
449 (enum aarch64_condition_codes): New enum.
450 (w0): New static global.
453 (struct aarch64_memory_operand) <type>: New
454 MEMORY_OPERAND_POSTINDEX type.
455 (postindex_memory_operand): New helper function.
456 (emit_ret): New function.
457 (emit_load_store_pair): New function, factored out of emit_stp
458 with support for MEMORY_OPERAND_POSTINDEX.
459 (emit_stp): Rewrite using emit_load_store_pair.
460 (emit_ldp): New function.
461 (emit_load_store): Likewise.
462 (emit_ldr): Mention post-index instruction in comment.
463 (emit_ldrh): New function.
464 (emit_ldrb): New function.
465 (emit_ldrsw): Mention post-index instruction in comment.
466 (emit_str): Likewise.
467 (emit_subs): New function.
468 (emit_cmp): Likewise.
469 (emit_and): Likewise.
470 (emit_orr): Likewise.
471 (emit_orn): Likewise.
472 (emit_eor): Likewise.
473 (emit_mvn): Likewise.
474 (emit_lslv): Likewise.
475 (emit_lsrv): Likewise.
476 (emit_asrv): Likewise.
477 (emit_mul): Likewise.
478 (emit_sbfm): Likewise.
479 (emit_sbfx): Likewise.
480 (emit_ubfm): Likewise.
481 (emit_ubfx): Likewise.
482 (emit_csinc): Likewise.
483 (emit_cset): Likewise.
484 (emit_nop): Likewise.
485 (emit_ops_insns): New helper function.
486 (emit_pop): Likewise.
487 (emit_push): Likewise.
488 (aarch64_emit_prologue): New function.
489 (aarch64_emit_epilogue): Likewise.
490 (aarch64_emit_add): Likewise.
491 (aarch64_emit_sub): Likewise.
492 (aarch64_emit_mul): Likewise.
493 (aarch64_emit_lsh): Likewise.
494 (aarch64_emit_rsh_signed): Likewise.
495 (aarch64_emit_rsh_unsigned): Likewise.
496 (aarch64_emit_ext): Likewise.
497 (aarch64_emit_log_not): Likewise.
498 (aarch64_emit_bit_and): Likewise.
499 (aarch64_emit_bit_or): Likewise.
500 (aarch64_emit_bit_xor): Likewise.
501 (aarch64_emit_bit_not): Likewise.
502 (aarch64_emit_equal): Likewise.
503 (aarch64_emit_less_signed): Likewise.
504 (aarch64_emit_less_unsigned): Likewise.
505 (aarch64_emit_ref): Likewise.
506 (aarch64_emit_if_goto): Likewise.
507 (aarch64_emit_goto): Likewise.
508 (aarch64_write_goto_address): Likewise.
509 (aarch64_emit_const): Likewise.
510 (aarch64_emit_call): Likewise.
511 (aarch64_emit_reg): Likewise.
512 (aarch64_emit_pop): Likewise.
513 (aarch64_emit_stack_flush): Likewise.
514 (aarch64_emit_zero_ext): Likewise.
515 (aarch64_emit_swap): Likewise.
516 (aarch64_emit_stack_adjust): Likewise.
517 (aarch64_emit_int_call_1): Likewise.
518 (aarch64_emit_void_call_2): Likewise.
519 (aarch64_emit_eq_goto): Likewise.
520 (aarch64_emit_ne_goto): Likewise.
521 (aarch64_emit_lt_goto): Likewise.
522 (aarch64_emit_le_goto): Likewise.
523 (aarch64_emit_gt_goto): Likewise.
524 (aarch64_emit_ge_got): Likewise.
525 (aarch64_emit_ops_impl): New static global variable.
526 (aarch64_emit_ops): New target function, return
527 &aarch64_emit_ops_impl.
528 (struct linux_target_ops): Install it.
530 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
532 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
533 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
535 * linux-aarch64-ipa.c: New file.
536 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
538 (aarch64_get_thread_area): New target method.
539 (extract_signed_bitfield): New helper function.
540 (aarch64_decode_ldr_literal): New function.
541 (enum aarch64_opcodes): New enum.
542 (struct aarch64_register): New struct.
543 (struct aarch64_operand): New struct.
544 (x0): New static global.
553 (aarch64_register): New helper function.
554 (register_operand): Likewise.
555 (immediate_operand): Likewise.
556 (struct aarch64_memory_operand): New struct.
557 (offset_memory_operand): New helper function.
558 (preindex_memory_operand): Likewise.
559 (enum aarch64_system_control_registers): New enum.
561 (emit_insn): New helper function.
562 (emit_b): New function.
563 (emit_bcond): Likewise.
566 (emit_blr): Likewise.
567 (emit_stp): Likewise.
568 (emit_ldp_q_offset): Likewise.
569 (emit_stp_q_offset): Likewise.
570 (emit_load_store): Likewise.
571 (emit_ldr): Likewise.
572 (emit_ldrsw): Likewise.
573 (emit_str): Likewise.
574 (emit_ldaxr): Likewise.
575 (emit_stxr): Likewise.
576 (emit_stlr): Likewise.
577 (emit_data_processing_reg): Likewise.
578 (emit_data_processing): Likewise.
579 (emit_add): Likewise.
580 (emit_sub): Likewise.
581 (emit_mov): Likewise.
582 (emit_movk): Likewise.
583 (emit_mov_addr): Likewise.
584 (emit_mrs): Likewise.
585 (emit_msr): Likewise.
586 (emit_sevl): Likewise.
587 (emit_wfe): Likewise.
588 (append_insns): Likewise.
589 (can_encode_int32_in): New helper function.
590 (aarch64_relocate_instruction): New function.
591 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
592 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
593 (struct linux_target_ops): Install aarch64_get_thread_area,
594 aarch64_install_fast_tracepoint_jump_pad and
595 aarch64_get_min_fast_tracepoint_insn_len.
597 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
599 * Makefile.in (aarch64-insn.o): New rule.
600 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
602 2015-09-21 Yao Qi <yao.qi@linaro.org>
604 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
606 2015-09-21 Yao Qi <yao.qi@linaro.org>
608 * tracepoint.c (max_jump_pad_size): Remove.
610 2015-09-18 Yao Qi <yao.qi@linaro.org>
612 * linux-aarch64-low.c: Don't include sys/uio.h.
613 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
615 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
617 * tracepoint.c (eval_result_type): Change prototype.
618 (condition_true_at_tracepoint): Fix argument to compiled_cond.
620 2015-09-15 Pedro Alves <palves@redhat.com>
622 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
623 Check whether to report exec events instead of checking whether
624 multiprocess is enabled.
626 2015-09-15 Pedro Alves <palves@redhat.com>
629 * remote-utils.c (prepare_resume_reply): Merge
630 TARGET_WAITKIND_VFORK_DONE switch case with the
631 TARGET_WAITKIND_FORKED case.
633 2015-09-15 Yao Qi <yao.qi@linaro.org>
635 * server.c (handle_query): Check string comparison using
636 "else if" instead of "if".
638 2015-09-15 Yao Qi <yao.qi@linaro.org>
640 * server.c (vCont_supported): New global variable.
641 (handle_query): Set vCont_supported to 1 if "vContSupported+"
642 matches. Append ";vContSupported+" to own_buf.
643 (handle_v_requests): Append ";s;S" to own_buf if target supports
644 hardware single step or vCont_supported is false.
645 (capture_main): Set vCont_supported to zero.
647 2015-09-15 Yao Qi <yao.qi@linaro.org>
649 * linux-low.c (linux_supports_conditional_breakpoints): Rename
651 (linux_supports_hardware_single_step): ... New function.
652 (linux_target_ops): Update.
653 * lynx-low.c (lynx_target_ops): Set field
654 supports_hardware_single_step to target_can_do_hardware_single_step.
655 * nto-low.c (nto_target_ops): Likewise.
656 * spu-low.c (spu_target_ops): Likewise.
657 * win32-low.c (win32_target_ops): Likewise.
658 * target.c (target_can_do_hardware_single_step): New function.
659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
660 Remove. <supports_hardware_single_step>: New field.
661 (target_supports_conditional_breakpoints): Remove.
662 (target_supports_hardware_single_step): New macro.
663 (target_can_do_hardware_single_step): Declare.
664 * server.c (handle_query): Use target_supports_hardware_single_step
665 instead of target_supports_conditional_breakpoints.
667 2015-09-15 Yao Qi <yao.qi@linaro.org>
669 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
671 (struct linux_target_ops the_low_target): Install
672 aarch64_linux_siginfo_fixup.
674 2015-09-11 Don Breazeal <donb@codesourcery.com>
675 Luis Machado <lgustavo@codesourcery.com>
677 * linux-low.c (linux_mourn): Static declaration.
678 (linux_arch_setup): Move in front of
679 handle_extended_wait.
680 (linux_arch_setup_thread): New function.
681 (handle_extended_wait): Handle exec events. Call
682 linux_arch_setup_thread. Make event_lwp argument a
683 pointer-to-a-pointer.
684 (check_zombie_leaders): Do not check stopped threads.
685 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
686 (linux_low_filter_event): Add lwp and thread for exec'ing
687 non-leader thread if leader thread has been deleted.
688 Refactor code into linux_arch_setup_thread and call it.
689 Pass child lwp pointer by reference to handle_extended_wait.
690 (linux_wait_for_event_filtered): Update comment.
691 (linux_wait_1): Prevent clobbering exec event status.
692 (linux_supports_exec_events): New function.
693 (linux_target_ops) <supports_exec_events>: Initialize new member.
694 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
696 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
697 * server.c (report_exec_events): New global variable.
698 (handle_query): Handle qSupported query for exec-events feature.
699 (captured_main): Initialize report_exec_events.
700 * server.h (report_exec_events): Declare new global variable.
701 * target.h (struct target_ops) <supports_exec_events>: New
703 (target_supports_exec_events): New macro.
704 * win32-low.c (win32_target_ops) <supports_exec_events>:
705 Initialize new member.
707 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
709 * linux-low.c (linux_low_enable_btrace): Remove.
710 (linux_target_ops): Replace linux_low_enable_btrace with
713 2015-09-03 Yao Qi <yao.qi@linaro.org>
715 * linux-aarch64-low.c (aarch64_insert_point): Call
716 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
719 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
721 * linux-low.c (check_stopped_by_breakpoint): Use
722 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
724 2015-08-27 Pedro Alves <palves@redhat.com>
726 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
728 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
730 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
731 the XNEW-family equivalent.
732 (compile_bytecodes): Likewise.
733 * dll.c (loaded_dll): Likewise.
734 * event-loop.c (append_callback_event): Likewise.
735 (create_file_handler): Likewise.
736 (create_file_event): Likewise.
737 * hostio.c (handle_open): Likewise.
738 * inferiors.c (add_thread): Likewise.
739 (add_process): Likewise.
740 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
741 * linux-arm-low.c (arm_new_process): Likewise.
742 (arm_new_thread): Likewise.
743 * linux-low.c (add_to_pid_list): Likewise.
744 (linux_add_process): Likewise.
745 (handle_extended_wait): Likewise.
747 (enqueue_one_deferred_signal): Likewise.
748 (enqueue_pending_signal): Likewise.
749 (linux_resume_one_lwp_throw): Likewise.
750 (linux_resume_one_thread): Likewise.
751 (linux_read_memory): Likewise.
752 (linux_write_memory): Likewise.
753 * linux-mips-low.c (mips_linux_new_process): Likewise.
754 (mips_linux_new_thread): Likewise.
755 (mips_add_watchpoint): Likewise.
756 * linux-x86-low.c (initialize_low_arch): Likewise.
757 * lynx-low.c (lynx_add_process): Likewise.
758 * mem-break.c (set_raw_breakpoint_at): Likewise.
759 (set_breakpoint): Likewise.
760 (add_condition_to_breakpoint): Likewise.
761 (add_commands_to_breakpoint): Likewise.
762 (clone_agent_expr): Likewise.
763 (clone_one_breakpoint): Likewise.
764 * regcache.c (new_register_cache): Likewise.
765 * remote-utils.c (look_up_one_symbol): Likewise.
766 * server.c (queue_stop_reply): Likewise.
767 (start_inferior): Likewise.
768 (queue_stop_reply_callback): Likewise.
769 (handle_target_event): Likewise.
770 * spu-low.c (fetch_ppc_memory): Likewise.
771 (store_ppc_memory): Likewise.
772 * target.c (set_target_ops): Likewise.
773 * thread-db.c (thread_db_load_search): Likewise.
774 (try_thread_db_load_1): Likewise.
775 * tracepoint.c (add_tracepoint): Likewise.
776 (add_tracepoint_action): Likewise.
777 (create_trace_state_variable): Likewise.
778 (cmd_qtdpsrc): Likewise.
779 (cmd_qtro): Likewise.
780 (add_while_stepping_state): Likewise.
781 * win32-low.c (child_add_thread): Likewise.
782 (get_image_name): Likewise.
784 2015-08-25 Yao Qi <yao.qi@linaro.org>
786 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
788 2015-08-25 Yao Qi <yao.qi@linaro.org>
790 * Makefile.in (aarch64-linux.o): New rule.
791 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
793 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
794 (aarch64_init_debug_reg_state): Make it extern.
795 (aarch64_linux_prepare_to_resume): Remove.
797 2015-08-25 Yao Qi <yao.qi@linaro.org>
799 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
800 lwp_arch_private_info and ptid_of_lwp.
802 2015-08-25 Yao Qi <yao.qi@linaro.org>
804 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
805 Find proc_info by find_process_pid. All callers updated.
807 2015-08-25 Yao Qi <yao.qi@linaro.org>
809 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
811 (debug_reg_change_callback): Remove.
812 (aarch64_notify_debug_reg_change): Remove.
814 2015-08-25 Yao Qi <yao.qi@linaro.org>
816 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
817 Call current_lwp_ptid.
819 2015-08-25 Yao Qi <yao.qi@linaro.org>
821 * linux-aarch64-low.c (debug_reg_change_callback): Use
824 2015-08-25 Yao Qi <yao.qi@linaro.org>
826 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
828 2015-08-25 Yao Qi <yao.qi@linaro.org>
830 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
832 2015-08-25 Yao Qi <yao.qi@linaro.org>
834 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
837 2015-08-25 Yao Qi <yao.qi@linaro.org>
839 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
841 (debug_reg_change_callback): Remove argument entry and add argument
842 lwp. Remove local variable thread. Don't print thread id in the
843 debugging output. Don't check whether pid of thread equals to pid.
844 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
845 iterate_over_lwps instead find_inferior.
847 2015-08-24 Pedro Alves <palves@redhat.com>
849 * inferiors.c (get_first_process): New function.
850 * inferiors.h (get_first_process): New declaration.
851 * remote-utils.c (read_ptid): Default to the first process in the
852 list, instead of to the current thread's process.
854 2015-08-24 Pedro Alves <palves@redhat.com>
856 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
857 * event-loop.c: Likewise.
858 * remote-utils.c: Likewise.
859 * tracepoint.c: Likewise.
861 2015-08-24 Pedro Alves <palves@redhat.com>
863 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
866 2015-08-21 Pedro Alves <palves@redhat.com>
868 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
869 instead of literal 1.
871 2015-08-21 Pedro Alves <palves@redhat.com>
873 * tdesc.c (default_description): Explicitly zero-initialize.
875 2015-08-21 Pedro Alves <palves@redhat.com>
878 * inferiors.c (remove_thread): Discard any pending stop reply for
880 * server.c (remove_all_on_match_pid): Rename to ...
881 (remove_all_on_match_ptid): ... this. Work with a filter ptid
883 (discard_queued_stop_replies): Change parameter to a ptid. Now
885 (handle_v_kill, kill_inferior_callback, captured_main)
886 (process_serial_event): Adjust.
887 * server.h (discard_queued_stop_replies): Declare.
889 2015-08-21 Pedro Alves <palves@redhat.com>
891 * linux-low.c (wait_for_sigstop): Always switch to no thread
892 selected if the previously current thread dies.
893 * lynx-low.c (lynx_request_interrupt): Use the first thread's
894 process instead of the current thread's.
895 * remote-utils.c (input_interrupt): Don't check if there's no
897 * server.c (gdb_read_memory, gdb_write_memory): If setting the
898 current thread to the general thread fails, error out.
899 (handle_qxfer_auxv, handle_qxfer_libraries)
900 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
901 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
902 (handle_query): Check if there's a thread selected instead of
903 checking whether there's any thread in the thread list.
904 (handle_qxfer_threads, handle_qxfer_btrace)
905 (handle_qxfer_btrace_conf): Don't error out early if there's no
906 thread in the thread list.
907 (handle_v_cont, myresume): Don't set the current thread to the
909 (process_serial_event) <Hg handling>: Also set thread_id if the
910 previous general thread is still alive.
911 (process_serial_event) <g/G handling>: If setting the current
912 thread to the general thread fails, error out.
913 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
914 thread's lwp instead of the current thread's.
915 * target.c (set_desired_thread): If the desired thread was not
916 found, leave the current thread pointing to NULL. Return an int
917 (boolean) indicating success.
918 * target.h (set_desired_thread): Change return type to int.
920 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
922 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
923 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
925 (ps_get_thread_area): New function.
927 2015-08-19 Gary Benson <gbenson@redhat.com>
929 * hostio.c (handle_pread): Do not attempt to read more data
930 than hostio_reply_with_data can fit in a packet.
932 2015-08-18 Joel Brobecker <brobecker@adacore.com>
934 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
936 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
938 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
940 2015-08-06 Pedro Alves <palves@redhat.com>
942 * tracepoint.c (expr_eval_result): Now an int.
944 2015-08-06 Pedro Alves <palves@redhat.com>
946 * gdbthread.h (struct regcache): Forward declare.
947 (struct thread_info) <regcache_data>: Now a struct regcache
949 * inferiors.c (inferior_regcache_data)
950 (set_inferior_regcache_data): Now work with struct regcache
952 * inferiors.h (struct regcache): Forward declare.
953 (inferior_regcache_data, set_inferior_regcache_data): Now work
954 with struct regcache pointers.
955 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
956 (free_register_cache_thread): Remove struct regcache pointer
959 2015-08-06 Pedro Alves <palves@redhat.com>
961 * server.c (captured_main): On error, print the exception message
962 to stderr, and if run_once is set, throw a quit.
964 2015-08-06 Pedro Alves <palves@redhat.com>
966 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
969 2015-08-06 Pedro Alves <palves@redhat.com>
971 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
972 reading beyond the passed in buffer length.
974 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
976 * tracepoint.c (symbol_list) <required>: Remove.
978 2015-08-06 Pedro Alves <palves@redhat.com>
980 * linux-low.c (handle_extended_wait): Set the fork child's suspend
981 count if stopping and suspending threads.
982 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
983 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
984 (linux_detach): Complete an ongoing step-over.
985 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
987 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
988 (linux_wait_1): If passing a signal to the inferior after
989 finishing a step-over, unsuspend and re-resume all lwps. If we
990 see a single-step event but the thread should be continuing, don't
991 pass the trap to gdb.
992 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
993 internal_error instead of gdb_assert.
994 (enqueue_pending_signal): New function.
995 (check_ptrace_stopped_lwp_gone): Add debug output.
996 (start_step_over): Use internal_error instead of gdb_assert.
997 (complete_ongoing_step_over): New function.
998 (linux_resume_one_thread): Don't resume a suspended thread.
999 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1002 2015-08-06 Pedro Alves <palves@redhat.com>
1004 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1005 (linux_thread_alive): Use lwp_is_marked_dead.
1006 (extended_event_reported): Delete.
1007 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1008 instead of extended_event_reported.
1009 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1011 (lwp_is_marked_dead): New function.
1012 (lwp_running): Use lwp_is_marked_dead.
1013 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1016 2015-08-06 Pedro Alves <palves@redhat.com>
1018 * linux-low.c (linux_wait_1): Move fork event output out of the
1019 !report_to_gdb check. Pass event_child->waitstatus to
1020 target_waitstatus_to_string instead of ourstatus.
1022 2015-08-04 Yao Qi <yao.qi@linaro.org>
1024 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1025 if current_thread is 32 bit.
1027 2015-08-04 Yao Qi <yao.qi@linaro.org>
1029 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1030 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1031 * server.c (extended_protocol): Remove "static".
1032 * server.h (extended_protocol): Declare it.
1034 2015-08-04 Yao Qi <yao.qi@linaro.org>
1036 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1037 both aarch64 and aarch32.
1038 (aarch64_set_pc): Likewise.
1040 2015-08-04 Yao Qi <yao.qi@linaro.org>
1042 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1043 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1044 arm-with-neon.xml to srv_xmlfiles.
1045 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1046 (is_64bit_tdesc): New function.
1047 (aarch64_linux_read_description): New function.
1048 (aarch64_arch_setup): Call aarch64_linux_read_description.
1049 (regs_info): Rename to regs_info_aarch64.
1050 (aarch64_regs_info): Return right regs_info.
1051 (initialize_low_arch): Call initialize_low_arch_aarch32.
1053 2015-08-04 Yao Qi <yao.qi@linaro.org>
1055 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1056 * linux-aarch32-low.c: New file.
1057 * linux-aarch32-low.h: New file.
1058 * linux-arm-low.c (arm_fill_gregset): Move it to
1059 linux-aarch32-low.c.
1060 (arm_store_gregset): Likewise.
1061 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1062 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1063 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1064 (regs_info): Rename to regs_info_arm.
1065 (arm_regs_info): Return regs_info_aarch32 if
1066 have_ptrace_getregset is 1 and target description is
1067 arm_with_neon or arm_with_vfpv3.
1068 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1069 Call initialize_low_arch_aarch32 instead.
1071 2015-08-04 Yao Qi <yao.qi@linaro.org>
1073 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1074 * linux-low.c: ... here.
1075 * linux-low.h (have_ptrace_getregset): Declare it.
1077 2015-08-04 Pedro Alves <palves@redhat.com>
1079 * thread-db.c (struct thread_db): Use new typedefs.
1080 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1082 (disable_thread_event_reporting): Cast result of dlsym to
1083 destination function pointer type.
1084 (thread_db_mourn): Use td_ta_delete_ftype.
1086 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1088 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1090 (CDX_BREAKPOINT): Define for R2.
1091 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1092 (the_low_target): Add comments.
1094 2015-07-30 Yao Qi <yao.qi@linaro.org>
1096 * linux-arm-low.c (arm_hwcap): Remove it.
1097 (arm_read_description): New local variable arm_hwcap. Don't
1098 set arm_hwcap to zero.
1100 2015-07-30 Yao Qi <yao.qi@linaro.org>
1102 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1103 Use regcache->tdesc instead.
1104 (arm_store_wmmxregset): Likewise.
1105 (arm_fill_vfpregset): Likewise.
1106 (arm_store_vfpregset): Likewise.
1108 2015-07-30 Yao Qi <yao.qi@linaro.org>
1110 * linux-arm-low.c: Include arch/arm.h.
1111 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1112 (arm_store_gregset): Likewise.
1114 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1116 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1117 ptrace's 4th parameter.
1119 2015-07-27 Yao Qi <yao.qi@linaro.org>
1121 * configure.srv (case aarch64*-*-linux*): Don't set
1124 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1126 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1128 * linux-arm-low.c: Likewise.
1129 * linux-cris-low.c: Likewise.
1130 * linux-crisv32-low.c: Likewise.
1131 * linux-low.c: Likewise.
1132 * linux-m68k-low.c: Likewise.
1133 * linux-mips-low.c: Likewise.
1134 * linux-nios2-low.c: Likewise.
1135 * linux-s390-low.c: Likewise.
1136 * linux-sparc-low.c: Likewise.
1137 * linux-tic6x-low.c: Likewise.
1138 * linux-tile-low.c: Likewise.
1139 * linux-x86-low.c: Likewise.
1141 2015-07-24 Pedro Alves <palves@redhat.com>
1143 * config.in: Regenerate.
1144 * configure: Regenerate.
1146 2015-07-24 Pedro Alves <palves@redhat.com>
1148 * acinclude.m4: Include ../ptrace.m4.
1149 * configure.ac: Call GDB_AC_PTRACE.
1150 * config.in, configure: Regenerate.
1152 2015-07-24 Yao Qi <yao.qi@linaro.org>
1154 * linux-low.c (linux_create_inferior): Remove setting to
1155 proc->priv->new_inferior.
1156 (linux_attach): Likewise.
1157 (linux_low_filter_event): Likewise.
1158 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1160 2015-07-24 Yao Qi <yao.qi@linaro.org>
1162 * linux-low.c (linux_arch_setup): New function.
1163 (linux_low_filter_event): If proc->tdesc is NULL and
1164 proc->attached is true, call the_low_target.arch_setup.
1165 Otherwise, keep status pending, and return.
1166 (linux_resume_one_lwp_throw): Don't call get_pc if
1167 thread->while_stepping isn't NULL. Don't call
1168 get_thread_regcache if proc->tdesc is NULL.
1169 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1170 (linux_target_ops): Install arch_setup.
1171 * server.c (start_inferior): Call the_target->arch_setup.
1172 * target.h (struct target_ops) <arch_setup>: New field.
1173 (target_arch_setup): New marco.
1174 * lynx-low.c (lynx_target_ops): Update.
1175 * nto-low.c (nto_target_ops): Update.
1176 * spu-low.c (spu_target_ops): Update.
1177 * win32-low.c (win32_target_ops): Update.
1179 2015-07-24 Yao Qi <yao.qi@linaro.org>
1181 * linux-low.c (linux_add_process): Don't set
1182 proc->priv->new_inferior.
1183 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1184 (linux_attach): Likewise.
1186 2015-07-24 Yao Qi <yao.qi@linaro.org>
1188 * server.c (start_inferior): Code refactor.
1190 2015-07-24 Yao Qi <yao.qi@linaro.org>
1192 * server.c (process_serial_event): Set general_thread.
1194 2015-07-21 Yao Qi <yao.qi@linaro.org>
1196 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1197 aarch64_linux_get_debug_reg_capacity.
1199 2015-07-17 Yao Qi <yao.qi@linaro.org>
1201 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1202 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1203 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1204 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1205 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1206 (AARCH64_HWP_ALIGNMENT): Likewise.
1207 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1208 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1209 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1210 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1211 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1212 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1213 (struct aarch64_debug_reg_state): Likewise.
1214 (struct arch_lwp_info): Likewise.
1215 (aarch64_align_watchpoint): Likewise.
1216 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1217 (aarch64_watchpoint_length): Likewise.
1218 (aarch64_point_encode_ctrl_reg): Likewise
1219 (aarch64_point_is_aligned): Likewise.
1220 (aarch64_align_watchpoint): Likewise.
1221 (aarch64_linux_set_debug_regs):
1222 (aarch64_dr_state_insert_one_point): Likewise.
1223 (aarch64_dr_state_remove_one_point): Likewise.
1224 (aarch64_handle_breakpoint): Likewise.
1225 (aarch64_handle_aligned_watchpoint): Likewise.
1226 (aarch64_handle_unaligned_watchpoint): Likewise.
1227 (aarch64_handle_watchpoint): Likewise.
1229 2015-07-17 Yao Qi <yao.qi@linaro.org>
1231 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1232 and don't aarch64_get_debug_reg_state. All callers update.
1233 (aarch64_handle_aligned_watchpoint): Likewise.
1234 (aarch64_handle_unaligned_watchpoint): Likewise.
1235 (aarch64_handle_watchpoint): Likewise.
1236 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1237 (aarch64_remove_point): Likewise.
1239 2015-07-17 Yao Qi <yao.qi@linaro.org>
1241 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1243 (aarch64_handle_unaligned_watchpoint): Likewise.
1245 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1247 Revert the previous 3 commits:
1248 Move gdb_regex* to common/
1249 Move linux_find_memory_regions_full & co.
1250 gdbserver build-id attribute generator
1252 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1253 Jan Kratochvil <jan.kratochvil@redhat.com>
1255 gdbserver build-id attribute generator.
1256 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1257 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1258 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1260 (get_dynamic): Use find_pdhr to traverse program headers.
1261 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1262 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1263 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1264 (get_hex_build_id): New.
1265 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1266 to reply XML document.
1268 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1269 Jan Kratochvil <jan.kratochvil@redhat.com>
1271 * target.c: Include target/target-utils.h and fcntl.h.
1272 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1273 (target_fileio_read_stralloc): New functions.
1275 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1277 * Makefile.in (OBS): Add gdb_regex.o.
1279 * config.in: Rebuilt.
1280 * configure: Rebuilt.
1282 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1283 Jan Kratochvil <jan.kratochvil@redhat.com>
1285 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1286 * Makefile.in (OBS): Add target-utils.o.
1287 (linux-maps.o, target-utils.o): New.
1288 * configure.srv (srv_linux_obj): Add linux-maps.o.
1290 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1292 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1294 (the_low_target): Install it.
1296 2015-07-14 Pedro Alves <palves@redhat.com>
1298 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1299 Instead, ignore ECHILD, and throw an error for other errnos.
1301 2015-07-10 Pedro Alves <palves@redhat.com>
1303 * event-loop.c (struct callback_event) <data>: Change type to
1304 gdb_client_data instance instead of gdb_client_data pointer.
1305 (append_callback_event): Adjust.
1307 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1309 * linux-aarch64-low.c: Add comments for each linux_target_ops
1310 method. Remove comments already covered in target_ops and
1311 linux_target_ops definitions.
1312 (the_low_target): Add comments for each unimplemented method.
1314 2015-07-09 Yao Qi <yao.qi@linaro.org>
1316 * linux-aarch64-low.c (aarch64_regmap): Remove.
1317 (aarch64_usrregs_info): Remove.
1318 (regs_info): Set field usrregs to NULL.
1320 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1322 * linux-low.c: Include "rsp-low.h"
1323 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1324 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1325 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1326 (handle_btrace_enable_pt): New.
1327 (handle_btrace_general_set): Support "pt".
1328 (handle_btrace_conf_general_set): Support "pt:size".
1330 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1332 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1335 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1337 * linux-aarch64-low.c: Remove comment about endianness.
1338 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1339 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1342 2015-06-24 Gary Benson <gbenson@redhat.com>
1344 * linux-i386-ipa.c (stdint.h): Do not include.
1345 * lynx-i386-low.c (stdint.h): Likewise.
1346 * lynx-ppc-low.c (stdint.h): Likewise.
1347 * mem-break.c (stdint.h): Likewise.
1348 * thread-db.c (stdint.h): Likewise.
1349 * tracepoint.c (stdint.h): Likewise.
1350 * win32-low.c (stdint.h): Likewise.
1352 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1354 * server.c (write_qxfer_response): Update call to
1355 remote_escape_output.
1357 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1358 Jan Kratochvil <jan.kratochvil@redhat.com>
1360 Merge multiple hex conversions.
1361 * gdbreplay.c (tohex): Rename to 'fromhex'.
1362 (logchar): Use fromhex.
1364 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1366 * server.c (handle_qxfer_libraries): Set `version' attribute for
1369 2015-06-10 Gary Benson <gbenson@redhat.com>
1371 * target.h (struct target_ops) <multifs_open>: New field.
1372 <multifs_unlink>: Likewise.
1373 <multifs_readlink>: Likewise.
1374 * linux-low.c (nat/linux-namespaces.h): New include.
1375 (linux_target_ops): Initialize the_target->multifs_open,
1376 the_target->multifs_unlink and the_target->multifs_readlink.
1377 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1378 * hostio.c (hostio_fs_pid): New static variable.
1379 (hostio_handle_new_gdb_connection): New function.
1380 (handle_setfs): Likewise.
1381 (handle_open): Use the_target->multifs_open as appropriate.
1382 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1383 (handle_readlink): Use the_target->multifs_readlink as
1385 (handle_vFile): Handle vFile:setfs packets.
1386 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1387 after target_handle_new_gdb_connection.
1389 2015-06-10 Gary Benson <gbenson@redhat.com>
1391 * configure.ac (AC_CHECK_FUNCS): Add setns.
1392 * config.in: Regenerate.
1393 * configure: Likewise.
1394 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1395 (linux-namespaces.o): New rule.
1396 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1398 2015-06-09 Gary Benson <gbenson@redhat.com>
1400 * hostio.c (handle_open): Process mode argument with
1401 fileio_to_host_mode.
1403 2015-06-01 Yao Qi <yao.qi@linaro.org>
1405 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1406 * linux-x86-low.c: Likewise.
1408 2015-05-28 Don Breazeal <donb@codesourcery.com>
1410 * linux-low.c (handle_extended_wait): Initialize
1411 thread_info.last_resume_kind for new fork children.
1413 2015-05-15 Pedro Alves <palves@redhat.com>
1415 * target.h (target_handle_new_gdb_connection): Rewrite using if
1416 wrapped in do/while.
1418 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1420 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1421 * configure, config.in: Regenerate.
1422 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1425 2015-05-12 Don Breazeal <donb@codesourcery.com>
1427 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1428 PTRACE_EVENT_VFORK_DONE.
1429 (linux_low_ptrace_options, extended_event_reported): Add vfork
1431 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1432 and "vforkdone" for RSP 'T' Stop Reply Packet.
1433 * server.h (report_vfork_events): Declare
1436 2015-05-12 Don Breazeal <donb@codesourcery.com>
1438 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1439 (the_low_target) <new_fork>: Initialize new member.
1440 * linux-arm-low.c (arm_new_fork): New function.
1441 (the_low_target) <new_fork>: Initialize new member.
1442 * linux-low.c (handle_extended_wait): Call new target function
1444 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1445 * linux-mips-low.c (mips_add_watchpoint): New function
1446 extracted from mips_insert_point.
1447 (the_low_target) <new_fork>: Initialize new member.
1448 (mips_linux_new_fork): New function.
1449 (mips_insert_point): Call mips_add_watchpoint.
1450 * linux-x86-low.c (x86_linux_new_fork): New function.
1451 (the_low_target) <new_fork>: Initialize new member.
1453 2015-05-12 Don Breazeal <donb@codesourcery.com>
1455 * linux-low.c (handle_extended_wait): Implement return value,
1456 rename argument 'event_child' to 'event_lwp', handle
1457 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1458 (linux_low_ptrace_options): New function.
1459 (linux_low_filter_event): Call linux_low_ptrace_options,
1460 use different argument fo linux_enable_event_reporting,
1461 use return value from handle_extended_wait.
1462 (extended_event_reported): New function.
1463 (linux_wait_1): Call extended_event_reported and set
1464 status to report fork events.
1465 (linux_write_memory): Add pid to debug message.
1466 (reset_lwp_ptrace_options_callback): New function.
1467 (linux_handle_new_gdb_connection): New function.
1468 (linux_target_ops): Initialize new structure member.
1469 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1470 * lynx-low.c: Initialize new structure member.
1471 * remote-utils.c (prepare_resume_reply): Implement stop reason
1472 "fork" for "T" stop message.
1473 * server.c (handle_query): Call handle_new_gdb_connection.
1474 * server.h (report_fork_events): Declare global flag.
1475 * target.h (struct target_ops) <handle_new_gdb_connection>:
1477 (target_handle_new_gdb_connection): New macro.
1478 * win32-low.c: Initialize new structure member.
1480 2015-05-12 Don Breazeal <donb@codesourcery.com>
1482 * mem-break.c (APPEND_TO_LIST): Define macro.
1483 (clone_agent_expr): New function.
1484 (clone_one_breakpoint): New function.
1485 (clone_all_breakpoints): New function.
1486 * mem-break.h: Declare new functions.
1488 2015-05-12 Don Breazeal <donb@codesourcery.com>
1490 * linux-low.c (linux_supports_fork_events): New function.
1491 (linux_supports_vfork_events): New function.
1492 (linux_target_ops): Initialize new structure members.
1493 (initialize_low): Call linux_check_ptrace_features.
1494 * lynx-low.c (lynx_target_ops): Initialize new structure
1496 * server.c (report_fork_events, report_vfork_events):
1498 (handle_query): Add new features to qSupported packet and
1500 (captured_main): Initialize new global variables.
1501 * target.h (struct target_ops) <supports_fork_events>:
1503 <supports_vfork_events>: New member.
1504 (target_supports_fork_events): New macro.
1505 (target_supports_vfork_events): New macro.
1506 * win32-low.c (win32_target_ops): Initialize new structure
1509 2015-05-12 Gary Benson <gbenson@redhat.com>
1511 * server.c (handle_qxfer_exec_file): Use current process
1514 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1516 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1517 Remove HAVE_PTRACE_GETREGS conditionals.
1518 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1519 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1521 2015-05-08 Yao Qi <yao.qi@linaro.org>
1523 * linux-low.c (linux_supports_conditional_breakpoints): New
1525 (linux_target_ops): Install new target method.
1526 * lynx-low.c (lynx_target_ops): Install NULL hook for
1527 supports_conditional_breakpoints.
1528 * nto-low.c (nto_target_ops): Likewise.
1529 * spu-low.c (spu_target_ops): Likewise.
1530 * win32-low.c (win32_target_ops): Likewise.
1531 * server.c (handle_query): Check
1532 target_supports_conditional_breakpoints.
1533 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1535 (target_supports_conditional_breakpoints): New macro.
1537 2015-05-06 Pedro Alves <palves@redhat.com>
1540 * server.c (start_inferior): If the process exits, mourn it.
1542 2015-04-21 Gary Benson <gbenson@redhat.com>
1544 * hostio.c (fileio_open_flags_to_host): Factored out to
1545 fileio_to_host_openflags in common/fileio.c. Single use
1548 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1550 * linux-xtensa-low.c (xtensa_fill_gregset)
1551 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1554 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1556 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1557 (regs_info): Replace usrregs pointer with NULL.
1559 2015-04-17 Gary Benson <gbenson@redhat.com>
1561 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1562 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1563 * server.c (handle_qxfer_exec_file): New function.
1564 (qxfer_packets): Add exec-file entry.
1565 (handle_query): Report qXfer:exec-file:read as supported packet.
1567 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1569 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1571 2015-04-09 Gary Benson <gbenson@redhat.com>
1573 * hostio-errno.c (errno_to_fileio_error): Remove function.
1574 Update caller to use remote_fileio_to_fio_error.
1576 2015-04-09 Yao Qi <yao.qi@linaro.org>
1578 * linux-low.c (linux_insert_point): Call
1579 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1580 (linux_remove_point): Call remove_memory_breakpoint if type is
1582 * linux-x86-low.c (x86_insert_point): Don't call
1583 insert_memory_breakpoint.
1584 (x86_remove_point): Don't call remove_memory_breakpoint.
1586 2015-04-01 Pedro Alves <palves@redhat.com>
1587 Cleber Rosa <crosa@redhat.com>
1589 * server.c (gdbserver_usage): Reorganize and extend the usage
1592 2015-03-24 Pedro Alves <palves@redhat.com>
1594 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1595 output. Also dump TRAP_TRACE.
1596 (linux_low_filter_event): In debug output, distinguish a
1597 resume_stop SIGSTOP from a delayed SIGSTOP.
1599 2015-03-24 Gary Benson <gbenson@redhat.com>
1601 * linux-x86-low.c (x86_linux_new_thread): Moved to
1603 (x86_linux_prepare_to_resume): Likewise.
1605 2015-03-24 Gary Benson <gbenson@redhat.com>
1607 * Makefile.in (x86-linux-dregs.o): New rule.
1608 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1609 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1610 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1611 (x86_linux_dr_get): Likewise.
1612 (x86_linux_dr_set): Likewise.
1613 (update_debug_registers_callback): Likewise.
1614 (x86_linux_dr_set_addr): Likewise.
1615 (x86_linux_dr_get_addr): Likewise.
1616 (x86_linux_dr_set_control): Likewise.
1617 (x86_linux_dr_get_control): Likewise.
1618 (x86_linux_dr_get_status): Likewise.
1619 (x86_linux_update_debug_registers): Likewise.
1621 2015-03-24 Gary Benson <gbenson@redhat.com>
1623 * linux-x86-low.c (x86_linux_update_debug_registers):
1624 New function, factored out from...
1625 (x86_linux_prepare_to_resume): ...this.
1627 2015-03-24 Gary Benson <gbenson@redhat.com>
1629 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1630 (x86_linux_dr_set): Likewise.
1631 (update_debug_registers_callback): Likewise.
1632 (x86_linux_dr_set_addr): Likewise.
1633 (x86_linux_dr_get_addr): Likewise.
1634 (x86_linux_dr_set_control): Likewise.
1635 (x86_linux_dr_get_control): Likewise.
1636 (x86_linux_dr_get_status): Likewise.
1637 (x86_linux_prepare_to_resume): Likewise.
1639 2015-03-24 Gary Benson <gbenson@redhat.com>
1641 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1642 Use perror_with_name. Pass string through gettext.
1643 (x86_linux_dr_set): Likewise.
1645 2015-03-24 Gary Benson <gbenson@redhat.com>
1647 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1648 (x86_linux_dr_set_addr): ...this.
1649 (x86_dr_low_get_addr): Rename to...
1650 (x86_linux_dr_get_addr): ...this.
1651 (x86_dr_low_set_control): Rename to...
1652 (x86_linux_dr_set_control): ...this.
1653 (x86_dr_low_get_control): Rename to...
1654 (x86_linux_dr_get_control): ...this.
1655 (x86_dr_low_get_status): Rename to...
1656 (x86_linux_dr_get_status): ...this.
1657 (x86_dr_low): Update with new function names.
1659 2015-03-24 Gary Benson <gbenson@redhat.com>
1661 * Makefile.in (x86-linux.o): New rule.
1662 * configure.srv: Add x86-linux.o to relevant targets.
1663 * linux-low.c (lwp_set_arch_private_info): New function.
1664 (lwp_arch_private_info): Likewise.
1665 * linux-x86-low.c: Include nat/x86-linux.h.
1666 (arch_lwp_info): Removed structure.
1667 (update_debug_registers_callback):
1668 Use lwp_set_debug_registers_changed.
1669 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1670 and lwp_set_debug_registers_changed.
1671 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1673 2015-03-24 Gary Benson <gbenson@redhat.com>
1675 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1676 * linux-arm-low.c (arm_new_thread): Likewise.
1677 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1678 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1679 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1680 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1682 2015-03-24 Gary Benson <gbenson@redhat.com>
1684 * linux-low.c (ptid_of_lwp): New function.
1685 (lwp_is_stopped): Likewise.
1686 (lwp_stop_reason): Likewise.
1687 * linux-x86-low.c (update_debug_registers_callback):
1689 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1692 2015-03-24 Gary Benson <gbenson@redhat.com>
1694 * linux-low.h (linux_stop_lwp): Remove declaration.
1696 2015-03-24 Gary Benson <gbenson@redhat.com>
1698 * linux-low.h: Include nat/linux-nat.h.
1699 * linux-low.c (iterate_over_lwps_args): New structure.
1700 (iterate_over_lwps_filter): New function.
1701 (iterate_over_lwps): Likewise.
1702 * linux-x86-low.c (update_debug_registers_callback):
1703 Update signature to what iterate_over_lwps expects.
1704 Remove PID check that iterate_over_lwps now performs.
1705 (x86_dr_low_set_addr): Use iterate_over_lwps.
1706 (x86_dr_low_set_control): Likewise.
1708 2015-03-24 Gary Benson <gbenson@redhat.com>
1710 * linux-x86-low.c (x86_debug_reg_state): New function.
1711 (x86_linux_prepare_to_resume): Use the above.
1713 2015-03-24 Gary Benson <gbenson@redhat.com>
1715 * linux-low.c (current_lwp_ptid): New function.
1716 * linux-x86-low.c: Include nat/linux-nat.h.
1717 (x86_dr_low_get_addr): Use current_lwp_ptid.
1718 (x86_dr_low_get_control): Likewise.
1719 (x86_dr_low_get_status): Likewise.
1721 2015-03-20 Pedro Alves <palves@redhat.com>
1723 * tracepoint.c (cmd_qtstatus): Make "str" const.
1725 2015-03-20 Pedro Alves <palves@redhat.com>
1727 * server.c (handle_general_set): Make "req_str" const.
1729 2015-03-19 Pedro Alves <palves@redhat.com>
1731 * linux-low.c (linux_resume_one_lwp): Rename to ...
1732 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1733 instead call perror_with_name.
1734 (check_ptrace_stopped_lwp_gone): New function.
1735 (linux_resume_one_lwp): Reimplement as wrapper around
1736 linux_resume_one_lwp_throw that swallows errors if the LWP is
1739 2015-03-19 Pedro Alves <palves@redhat.com>
1741 * linux-low.c (count_events_callback, select_event_lwp_callback):
1742 No longer check whether the thread has resume_stop as last resume
1745 2015-03-19 Pedro Alves <palves@redhat.com>
1747 * linux-low.c (count_events_callback, select_event_lwp_callback):
1748 Use the lwp's status_pending_p field, not the thread's.
1750 2015-03-19 Pedro Alves <palves@redhat.com>
1752 * linux-low.c (select_event_lwp_callback): Update comments to
1753 no longer mention SIGTRAP.
1755 2015-03-18 Gary Benson <gbenson@redhat.com>
1757 * server.c (handle_query): Do not report vFile:fstat as supported.
1759 2015-03-11 Gary Benson <gbenson@redhat.com>
1761 * hostio.c (sys/types.h): New include.
1762 (sys/stat.h): Likewise.
1763 (common-remote-fileio.h): Likewise.
1764 (handle_fstat): New function.
1765 (handle_vFile): Handle vFile:fstat packets.
1767 2015-03-11 Gary Benson <gbenson@redhat.com>
1769 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1770 struct stat.st_blocks and struct stat.st_blksize.
1771 * configure: Regenerate.
1772 * config.in: Likewise.
1773 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1774 (OBS): Add common-remote-fileio.o.
1775 (common-remote-fileio.o): New rule.
1777 2015-03-09 Pedro Alves <palves@redhat.com>
1779 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1780 'struct sockaddr' pointer in 'accept' call.
1782 2015-03-09 Pedro Alves <palves@redhat.com>
1785 2015-03-07 Pedro Alves <palves@redhat.com>
1786 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1787 or <winsock2.h> here. Instead include "gdb_socket.h".
1788 (remote_open): Use union gdb_sockaddr_u.
1789 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1790 or <winsock2.h> here. Instead include "gdb_socket.h".
1791 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1792 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1794 (init_named_socket, gdb_agent_helper_thread): Use union
1797 2015-03-07 Pedro Alves <palves@redhat.com>
1799 * configure.ac (build_warnings): Move
1800 -Wdeclaration-after-statement to the C-specific set.
1801 * configure: Regenerate.
1803 2015-03-07 Pedro Alves <palves@redhat.com>
1805 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1806 or <winsock2.h> here. Instead include "gdb_socket.h".
1807 (remote_open): Use union gdb_sockaddr_u.
1808 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1809 or <winsock2.h> here. Instead include "gdb_socket.h".
1810 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1811 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1813 (init_named_socket, gdb_agent_helper_thread): Use union
1816 2015-03-07 Pedro Alves <palves@redhat.com>
1818 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1821 2015-03-06 Yao Qi <yao.qi@linaro.org>
1823 * linux-aarch64-low.c (aarch64_insert_point): Use
1824 show_debug_regs as a boolean.
1825 (aarch64_remove_point): Likewise.
1827 2015-03-05 Pedro Alves <palves@redhat.com>
1829 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1830 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1831 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1832 * nto-low.c (nto_target_ops): Likewise.
1833 * spu-low.c (spu_target_ops): Likewise.
1834 * win32-low.c (win32_target_ops): Likewise.
1836 2015-03-04 Pedro Alves <palves@redhat.com>
1838 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1839 Decide whether a breakpoint triggered based on the SIGTRAP's
1841 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1842 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1843 (linux_low_filter_event): Check for breakpoints before checking
1845 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1847 (linux_stopped_by_sw_breakpoint)
1848 (linux_supports_stopped_by_sw_breakpoint)
1849 (linux_stopped_by_hw_breakpoint)
1850 (linux_supports_stopped_by_hw_breakpoint): New functions.
1851 (linux_target_ops): Install new target methods.
1853 2015-03-04 Pedro Alves <palves@redhat.com>
1855 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1856 * server.c (swbreak_feature, hwbreak_feature): New globals.
1857 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1858 (captured_main): Clear swbreak_feature and hwbreak_feature.
1859 * server.h (swbreak_feature, hwbreak_feature): Declare.
1860 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1861 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1862 supports_stopped_by_hw_breakpoint>: New fields.
1863 (target_supports_stopped_by_sw_breakpoint)
1864 (target_stopped_by_sw_breakpoint)
1865 (target_supports_stopped_by_hw_breakpoint)
1866 (target_stopped_by_hw_breakpoint): Declare.
1868 2015-03-04 Pedro Alves <palves@redhat.com>
1870 enum lwp_stop_reason -> enum target_stop_reason
1871 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1872 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1873 (linux_wait_1, stuck_in_jump_pad_callback)
1874 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1875 (linux_stopped_by_watchpoint):
1876 * linux-low.h (enum lwp_stop_reason): Delete.
1877 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1878 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1880 2015-03-04 Yao Qi <yao.qi@linaro.org>
1882 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1884 2015-03-03 Gary Benson <gbenson@redhat.com>
1886 * hostio.c (handle_vFile): Fix prefix lengths.
1888 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1890 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1893 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1895 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1896 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1897 (clean): Add "rm -f" for above C files.
1898 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1899 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1900 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1901 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1902 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1903 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1904 (init_registers_s390x_vx_linux64)
1905 (init_registers_s390x_tevx_linux64)
1906 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1907 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1909 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1910 (s390_store_vxrs_high): New functions.
1911 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1913 (s390_arch_setup): Add logic for selecting one of the new target
1914 descriptions. Activate the new vector regsets if applicable.
1915 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1916 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1917 and init_registers_s390x_tevx_linux64.
1919 2015-03-01 Pedro Alves <palves@redhat.com>
1921 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1924 2015-02-27 Pedro Alves <palves@redhat.com>
1926 * linux-x86-low.c (u_debugreg_offset): New function.
1927 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1929 2015-02-27 Pedro Alves <palves@redhat.com>
1931 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1932 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1933 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1934 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1935 (ps_lsetfpregs, ps_getpid)
1936 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1937 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1938 (ps_lsetxregs, ps_plog): Declare.
1940 2015-02-27 Pedro Alves <palves@redhat.com>
1942 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1943 IP_AGENT_EXPORT_FUNC.
1944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1945 IP_AGENT_EXPORT_FUNC.
1946 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1947 (IP_AGENT_EXPORT): Delete.
1948 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1949 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1950 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1951 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1952 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1953 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1954 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1955 (traceframe_read_count, traceframe_write_count)
1956 (traceframes_created, trace_state_variables, get_raw_reg)
1957 (get_trace_state_variable_value, set_trace_state_variable_value)
1958 (ust_loaded, helper_thread_id, cmd_buf): Use
1959 IPA_SYM_EXPORTED_NAME.
1960 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1961 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1962 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1963 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1964 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1965 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1966 EXTERN_C_PUSH/EXTERN_C_POP.
1967 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1968 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1969 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1970 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1971 (traceframe_write_count, traceframe_read_count)
1972 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1973 (about_to_request_buffer_space, get_trace_state_variable_value)
1974 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1975 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1976 EXTERN_C_PUSH/EXTERN_C_POP.
1977 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1978 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1979 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1980 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1981 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1982 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1983 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1984 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1986 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1987 (IP_AGENT_EXPORT_VAR_DECL): Define.
1989 (gdb_agent_get_raw_reg): Declare.
1991 2015-02-27 Tom Tromey <tromey@redhat.com>
1992 Pedro Alves <palves@redhat.com>
1994 Rename symbols whose names are reserved C++ keywords throughout.
1996 2015-02-27 Pedro Alves <palves@redhat.com>
1998 * Makefile.in (COMPILER): New, get it from autoconf.
1999 (CXX): Get from autoconf instead.
2000 (COMPILE.pre): Use COMPILER.
2001 (CC-LD): Rename to ...
2002 (CC_LD): ... this. Use COMPILER.
2003 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2004 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2005 * acinclude.m4: Include build-with-cxx.m4.
2006 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2007 Disable -Werror by default if building in C++ mode.
2008 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2009 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2010 the C++ compiler. Save/restore CXXFLAGS too.
2011 * configure: Regenerate.
2013 2015-02-27 Pedro Alves <palves@redhat.com>
2015 * acinclude.m4: Include libiberty.m4.
2016 * configure.ac: Call libiberty_INIT.
2017 * config.in, configure: Regenerate.
2019 2015-02-26 Pedro Alves <palves@redhat.com>
2021 * linux-low.c (linux_wait_1): When incrementing the PC past a
2022 program breakpoint always use the_low_target.breakpoint_len as
2023 increment, rather than the maximum between that and
2024 the_low_target.decr_pc_after_break.
2026 2015-02-23 Pedro Alves <palves@redhat.com>
2028 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2029 thread was doing a step-over; always adjust the PC if
2030 we stepped over a permanent breakpoint.
2031 (linux_wait_1): If we stepped over breakpoint that was on top of a
2032 permanent breakpoint, manually advance the PC past it.
2034 2015-02-23 Pedro Alves <palves@redhat.com>
2036 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2038 (x86_fill_gregset, x86_store_gregset): Use it when handling
2041 2015-02-20 Pedro Alves <palves@redhat.com>
2043 * thread-db.c: Include "nat/linux-procfs.h".
2044 (thread_db_init): Skip listing new threads if the kernel supports
2045 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2047 2015-02-20 Pedro Alves <palves@redhat.com>
2049 * linux-low.c (status_pending_p_callback): Use ptid_match.
2051 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2053 PR breakpoints/16812
2054 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2055 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2056 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2058 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060 PR breakpoints/15956
2061 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2063 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2065 * linux-low.c (linux_low_btrace_conf): Print size.
2066 * server.c (handle_btrace_conf_general_set): New.
2067 (hanle_general_set): Call handle_btrace_conf_general_set.
2068 (handle_query): Report Qbtrace-conf:bts:size as supported.
2070 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2072 * linux-low.c (linux_low_enable_btrace): Update parameters.
2073 (linux_low_btrace_conf): New.
2074 (linux_target_ops)<to_btrace_conf>: Initialize.
2075 * server.c (current_btrace_conf): New.
2076 (handle_btrace_enable): Rename to ...
2077 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2078 to target_enable_btrace. Update comment. Update users.
2079 (handle_qxfer_btrace_conf): New.
2080 (qxfer_packets): Add btrace-conf entry.
2081 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2082 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2083 (target_ops)<read_btrace_conf>: New.
2084 (target_enable_btrace): Update parameters.
2085 (target_read_btrace_conf): New.
2087 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2089 * server.c (handle_btrace_general_set): Remove call to
2090 target_supports_btrace.
2091 (supported_btrace_packets): New.
2092 (handle_query): Call supported_btrace_packets.
2093 * target.h: include btrace-common.h.
2094 (btrace_target_info): Removed.
2095 (supports_btrace, target_supports_btrace): Update parameters.
2097 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2099 * Makefile.in (SFILES): Add common/btrace-common.c.
2100 (OBS): Add common/btrace-common.o.
2101 (btrace-common.o): Add build rules.
2102 * linux-low: Include btrace-common.h.
2103 (linux_low_read_btrace): Use struct btrace_data. Call
2104 btrace_data_init and btrace_data_fini.
2106 2015-02-06 Pedro Alves <palves@redhat.com>
2108 * thread-db.c (find_new_threads_callback): Add debug output.
2110 2015-02-04 Pedro Alves <palves@redhat.com>
2112 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2113 (resume_stopped_resumed_lwps): New function.
2114 (linux_wait_for_event_filtered): Use it.
2116 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2118 * Makefile.in (SFILES): Add linux-personality.c.
2119 (linux-personality.o): New rule.
2120 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2121 list of objects to be built.
2122 * linux-low.c: Include nat/linux-personality.h.
2123 (linux_create_inferior): Remove code to disable address space
2124 randomization (moved to ../nat/linux-personality.c). Create
2125 cleanup to disable address space randomization.
2127 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2129 * Makefile.in (posix-strerror.o): New rule.
2130 (mingw-strerror.o): Likewise.
2131 * configure: Regenerated.
2132 * configure.ac: Source file ../common/common.host. Initialize new
2133 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2135 2015-01-14 Yao Qi <yao@codesourcery.com>
2137 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2138 (ppc-linux.o): New rule.
2139 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2140 * configure.ac: AC_CHECK_FUNCS(getauxval).
2141 * config.in: Re-generated.
2142 * configure: Re-generated.
2143 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2144 ppc64_64bit_inferior_p
2146 2015-01-14 Yao Qi <yao@codesourcery.com>
2148 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2149 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2150 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2151 (PT_ORIG_R3, PT_TRAP): Likewise.
2152 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2153 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2154 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2156 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2158 * i387-fp.c (i387_cache_to_xsave): In look over
2159 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2160 zmmh_low_space field by use of zmmh_high_space.
2162 2015-01-09 Pedro Alves <palves@redhat.com>
2164 * linux-low.c (step_over_bkpt): Move higher up in the file.
2165 (handle_extended_wait): Don't store the stop_pc here.
2166 (get_stop_pc): Adjust comments and rename to ...
2167 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2168 stopped for a software breakpoint or hardware breakpoint.
2169 (thread_still_has_status_pending_p): New function.
2170 (status_pending_p_callback): Use
2171 thread_still_has_status_pending_p. If the event is no longer
2172 interesting, resume the LWP.
2173 (handle_tracepoints): Add assert.
2174 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2175 (wstatus_maybe_breakpoint): New function.
2176 (cancel_breakpoint): Delete function.
2177 (check_stopped_by_watchpoint): New function, factored out from
2178 linux_low_filter_event.
2179 (lp_status_maybe_breakpoint): Delete function.
2180 (linux_low_filter_event): Remove filter_ptid argument.
2181 Leave thread group exits pending here. Store the LWP's stop PC.
2182 Always leave events pending.
2183 (linux_wait_for_event_filtered): Pull all events out of the
2184 kernel, and leave them all pending.
2185 (count_events_callback, select_event_lwp_callback): Consider all
2187 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2188 (select_event_lwp): Only give preference to the stepping LWP in
2189 all-stop mode. Adjust comments.
2190 (ignore_event): New function.
2191 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2192 references to cancel_breakpoints. Adjust to renames. Also give
2193 equal priority to all LWPs that have had events in non-stop mode.
2194 If reporting a software breakpoint event, unadjust the LWP's PC.
2195 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2196 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2198 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2199 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2200 (linux_stopped_by_watchpoint): Adjust.
2201 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2202 * linux-low.h (enum lwp_stop_reason): New.
2203 (struct lwp_info) <stop_pc>: Adjust comment.
2204 <stopped_by_watchpoint>: Delete field.
2205 <stop_reason>: New field.
2206 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2207 * mem-break.c (software_breakpoint_inserted_here)
2208 (hardware_breakpoint_inserted_here): New function.
2209 * mem-break.h (software_breakpoint_inserted_here)
2210 (hardware_breakpoint_inserted_here): Declare.
2211 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2212 (cancel_breakpoints): Delete.
2213 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2214 (upload_fast_traceframes): Remove references to
2217 2015-01-09 Pedro Alves <palves@redhat.com>
2219 * thread-db.c (find_new_threads_callback): Ignore thread if the
2220 kernel thread ID is -1.
2222 2015-01-09 Pedro Alves <palves@redhat.com>
2224 * linux-low.c (linux_attach_fail_reason_string): Move to
2225 nat/linux-ptrace.c, and rename.
2226 (linux_attach_lwp): Update comment.
2227 (attach_proc_task_lwp_callback): New function.
2228 (linux_attach): Adjust to rename and use
2229 linux_proc_attach_tgid_threads.
2230 (linux_attach_fail_reason_string): Delete declaration.
2232 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2234 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2235 * server.c (gdbserver_version): Likewise.
2237 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2239 * remote-utils.c: Include ctype.h.
2240 (input_interrupt): Explicitly handle the case when the char
2241 received is the NUL byte. Improve the printing of non-ASCII
2244 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2246 * linux-low.c (linux_low_filter_event): Update call to
2247 linux_enable_event_reporting following the addition of
2248 a new parameter to that function.
2250 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2253 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2254 (AARCH64_FPCR_REGNO): Likewise.
2255 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2256 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2257 (aarch64_store_fpregset): Likewise.
2259 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2261 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2262 Remove FIXME comment about assumption about N.
2264 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2266 * configure.ac: If large-file support is disabled in GDBserver,
2267 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2268 * configure: Regenerate.
2270 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2272 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2273 warning upon ENODATA from ptrace.
2274 * linux-s390-low.c (s390_store_tdb): New.
2275 (s390_regsets): Add regset for NT_S390_TDB.
2277 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2279 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2280 without a fill_function.
2281 * linux-s390-low.c (s390_fill_last_break): Remove.
2282 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2283 (s390_arch_setup): Use regset's size instead of fill_function for
2286 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2288 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2289 the regset's store function when ptrace returned an error.
2290 * regcache.c (get_thread_regcache): Invalidate register cache
2291 before fetching inferior's registers.
2293 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2295 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2296 while-loop as for-loop.
2297 (regsets_store_inferior_registers): Likewise.
2299 2014-11-28 Yao Qi <yao@codesourcery.com>
2301 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2302 * config.in, configure: Re-generate.
2303 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2306 2014-11-21 Yao Qi <yao@codesourcery.com>
2308 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2309 (AC_CHECK_HEADERS): Remove malloc.h.
2310 * configure: Re-generated.
2311 * config.in: Re-generated.
2312 * server.h: Don't include alloca.h and malloc.h.
2313 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2314 Don't include malloc.h.
2316 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2318 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2319 corresponding ERRNO check in same block.
2321 2014-11-12 Pedro Alves <palves@redhat.com>
2323 * server.c (cont_thread): Update comment.
2324 (start_inferior, attach_inferior): No longer clear cont_thread.
2325 (handle_v_cont): No longer set cont_thread.
2326 (captured_main): Clear cont_thread each time a GDB connects.
2328 2014-11-12 Pedro Alves <palves@redhat.com>
2330 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2331 thread, and don't resume all threads if the Hc thread has exited.
2333 2014-11-12 Pedro Alves <palves@redhat.com>
2335 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2336 the process group instead of to a specific LWP.
2338 2014-10-15 Pedro Alves <palves@redhat.com>
2341 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2343 (arm_set_thread_context): Delete.
2344 (the_low_target): Adjust.
2345 * win32-i386-low.c (debug_registers_changed)
2346 (debug_registers_used): Delete.
2347 (update_debug_registers_callback): New function.
2348 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2349 needing to update their debug registers.
2350 (win32_get_current_dr): New function.
2351 (x86_dr_low_get_addr, x86_dr_low_get_control)
2352 (x86_dr_low_get_status): Fetch the debug register from the thread
2354 (i386_initial_stuff): Adjust.
2355 (i386_get_thread_context): Remove current_event parameter. Don't
2356 clear debug_registers_changed nor copy DR values to
2358 (i386_set_thread_context): Delete.
2359 (i386_prepare_to_resume): New function.
2360 (i386_thread_added): Mark the thread as needing to update irs
2362 (the_low_target): Remove i386_set_thread_context and install
2363 i386_prepare_to_resume.
2364 * win32-low.c (win32_get_thread_context): Adjust.
2365 (win32_set_thread_context): Use SetThreadContext
2367 (win32_prepare_to_resume): New function.
2368 (win32_require_context): New function, factored out from ...
2369 (thread_rec): ... this.
2370 (continue_one_thread): Call win32_prepare_to_resume on each thread
2371 we're about to continue.
2372 (win32_resume): Call win32_prepare_to_resume on the event thread.
2373 * win32-low.h (struct win32_thread_info)
2374 <debug_registers_changed>: New field.
2375 (struct win32_target_ops): Change prototype of set_thread_context,
2376 delete set_thread_context and add prepare_to_resume.
2377 (win32_require_context): New declaration.
2379 2014-10-08 Gary Benson <gbenson@redhat.com>
2381 * server.h: Do not include common-exceptions.h.
2383 2014-10-08 Gary Benson <gbenson@redhat.com>
2385 * server.h: Do not include cleanups.h.
2387 2014-09-30 James Hogan <james.hogan@imgtec.com>
2389 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2392 2014-09-23 Yao Qi <yao@codesourcery.com>
2394 * linux-low.c (lp_status_maybe_breakpoint): New function.
2395 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2396 (count_events_callback): Likewise.
2397 (select_event_lwp_callback): Likewise.
2398 (cancel_breakpoints_callback): Likewise.
2400 2014-09-19 Don Breazeal <donb@codesourcery.com>
2402 * linux-low.c (handle_extended_wait): Call
2403 linux_ptrace_get_extended_event.
2404 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2405 linux_is_extended_waitstatus.
2407 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2409 * Makefile.in (CPPFLAGS): Define.
2410 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2411 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2413 2014-09-16 Gary Benson <gbenson@redhat.com>
2415 * inferiors.h (current_inferior): Renamed as...
2416 (current_thread): New variable. All uses updated.
2417 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2418 (maybe_move_out_of_jump_pad): Likewise.
2419 (cancel_breakpoint): Likewise.
2420 (linux_low_filter_event): Likewise.
2421 (wait_for_sigstop): Likewise.
2422 (linux_resume_one_lwp): Likewise.
2423 (need_step_over_p): Likewise.
2424 (start_step_over): Likewise.
2425 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2426 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2427 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2428 and save_inferior as saved_thread.
2429 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2431 (regcache_invalidate_thread): Likewise.
2432 * remote-utils.c (prepare_resume_reply): Likewise.
2433 * thread-db.c (thread_db_get_tls_address): Likewise.
2434 (disable_thread_event_reporting): Likewise.
2435 (remove_thread_event_breakpoints): Likewise.
2436 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2438 * target.h (set_desired_inferior): Renamed as...
2439 (set_desired_thread): New declaration. All uses updated.
2440 * server.c (myresume): Updated comment to reference thread instead
2442 (handle_serial_event): Likewise.
2443 (handle_target_event): Likewise.
2445 2014-09-12 Tom Tromey <tromey@redhat.com>
2446 Gary Benson <gbenson@redhat.com>
2448 * regcache.h: Include common-regcache.h.
2449 (regcache_read_pc): Don't declare.
2450 * regcache.c (get_thread_regcache_for_ptid): New function.
2452 2014-09-11 Tom Tromey <tromey@redhat.com>
2453 Gary Benson <gbenson@redhat.com>
2455 * symbol.c: New file.
2456 * Makefile.in (SFILES): Add symbol.c.
2457 (OBS): Add symbol.o.
2459 2014-09-11 Gary Benson <gbenson@redhat.com>
2461 * target.c (target_stop_ptid, target_continue_ptid): New
2464 2014-09-11 Tom Tromey <tromey@redhat.com>
2465 Gary Benson <gbenson@redhat.com>
2467 * target.h: Include target/target.h.
2468 * target.c (target_read_memory, target_read_uint32)
2469 (target_write_memory): New functions.
2471 2014-09-11 Gary Benson <gbenson@redhat.com>
2473 * server.h (debug_hw_points): Don't declare.
2474 * server.c (debug_hw_points): Don't define. Replace all uses
2475 with show_debug_regs.
2476 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2477 all uses with show_debug_regs.
2479 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2481 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2482 endianness into account.
2483 (ppc_supply_ptrace_register): Likewise.
2485 2014-09-03 James Hogan <james.hogan@imgtec.com>
2487 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2488 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2490 2014-09-03 Gary Benson <gbenson@redhat.com>
2492 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2493 ALL_DEBUG_ADDRESS_REGISTERS.
2495 2014-09-02 Gary Benson <gbenson@redhat.com>
2497 * i386-low.h: Renamed as...
2498 * x86-low.h: New file. All type, function and variable name
2499 prefixes changed from "i386_" to "x86_". All references updated.
2500 * i386-low.c: Renamed as...
2501 * x86-low.c: New file. All type, function and variable name
2502 prefixes changed from "i386_" to "x86_". All references updated.
2504 2014-09-02 Gary Benson <gbenson@redhat.com>
2506 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2507 (x86_linux_new_thread): Likewise.
2509 2014-08-29 Gary Benson <gbenson@redhat.com>
2511 * server.h (setjmp.h): Do not include.
2512 (toplevel): Do not declare.
2513 (common-exceptions.h): Include.
2514 (cleanups.h): Likewise.
2515 * server.c (toplevel): Do not define.
2516 (exit_code): New static global.
2517 (detach_or_kill_for_exit_cleanup): New function.
2518 (main): New function. Original main renamed to...
2519 (captured_main): New function.
2520 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2522 2014-08-29 Gary Benson <gbenson@redhat.com>
2524 * Makefile.in (SFILES): Add common/common-exceptions.c.
2525 (OBS): Add common-exceptions.o.
2526 (common-exceptions.o): New rule.
2527 * utils.c (prepare_to_throw_exception): New function.
2529 2014-08-29 Gary Benson <gbenson@redhat.com>
2531 * config.in: Regenerate.
2532 * configure: Likewise.
2534 2014-08-29 Gary Benson <gbenson@redhat.com>
2536 * Makefile.in (SFILES): Add common/cleanups.c.
2538 (cleanups.o): New rule.
2540 2014-08-29 Gary Benson <gbenson@redhat.com>
2542 * utils.c (internal_vwarning): New function.
2544 2014-08-28 Gary Benson <gbenson@redhat.com>
2546 * utils.h (fatal): Remove declaration.
2547 * utils.c (fatal): Remove function.
2549 2014-08-28 Gary Benson <gbenson@redhat.com>
2551 * tracepoint.c (gdb_agent_init): Replace fatal with
2553 (initialize_tracepoint): Likewise.
2555 2014-08-28 Gary Benson <gbenson@redhat.com>
2557 * remote-utils.c (remote_prepare): Replace fatal with error.
2559 2014-08-28 Gary Benson <gbenson@redhat.com>
2561 * linux-low.c (linux_async): Replace fatal with warning.
2563 (linux_start_non_stop): Return -1 if linux_async failed.
2565 2014-08-28 Gary Benson <gbenson@redhat.com>
2567 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2569 (i386_dr_low_get_addr): Remove vague comment.
2570 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2573 2014-08-28 Gary Benson <gbenson@redhat.com>
2575 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2576 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2578 (linux_resume_one_lwp): Likewise.
2579 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2581 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2582 with internal_error.
2583 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2584 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2585 (find_register_by_name): Replace fatal with internal_error.
2586 (find_regno): Likewise.
2587 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2588 * thread-db.c (thread_db_create_event): Likewise.
2589 (thread_db_load_search): Likewise.
2590 (try_thread_db_load_1): Likewise.
2591 * tracepoint.c (get_jump_space_head): Replace fatal with
2593 (claim_trampoline_space): Likewise.
2594 (have_fast_tracepoint_trampoline_buffer): Likewise.
2595 (cmd_qtstart): Likewise.
2596 (stop_tracing): Likewise.
2597 (fast_tracepoint_collecting): Likewise.
2598 (target_malloc): Likewise.
2599 (download_tracepoint): Likewise.
2600 (download_trace_state_variables): Replace check with gdb_assert.
2601 (upload_fast_traceframes): Replace fatal with internal_error.
2603 2014-08-19 Tom Tromey <tromey@redhat.com>
2604 Gary Benson <gbenson@redhat.com>
2606 * Makefile.in (SFILES): Add common/common-debug.c.
2607 (OBS): Add common-debug.o.
2608 (common-debug.o): New rule.
2609 * debug.h (debug_printf): Don't declare.
2610 * debug.c (debug_printf): Renamed and rewritten as...
2611 (debug_vprintf): New function.
2613 2014-08-19 Gary Benson <gbenson@redhat.com>
2615 * utils.h: Do not include print-utils.h.
2617 2014-08-19 Tom Tromey <tromey@redhat.com>
2618 Gary Benson <gbenson@redhat.com>
2620 * server.h: Add static assertion.
2621 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2623 2014-08-19 Tom Tromey <tromey@redhat.com>
2624 Gary Benson <gbenson@redhat.com>
2626 * Makefile.in (SFILES): Add common/errors.c.
2627 (OBS): Add errors.o.
2628 (IPA_OBS): Add errors-ipa.o.
2629 (errors.o): New rule.
2630 (errors-ipa.o): Likewise.
2631 * utils.h (perror_with_name, error, warning): Don't declare.
2632 * utils.c (warning): Renamed and rewritten as...
2633 (vwarning): New function.
2634 (error): Renamed and rewritten as...
2635 (verror): New function.
2636 (internal_error): Renamed and rewritten as...
2637 (internal_verror): New function.
2639 2014-08-07 Gary Benson <gbenson@redhat.com>
2641 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2642 * configure: Regenerate.
2643 * config.in: Likewise.
2644 * server.h: Do not include errno.h.
2645 * event-loop.c: Likewise.
2646 * hostio-errno.c: Likewise.
2647 * linux-low.c: Likewise.
2648 * remote-utils.c: Likewise.
2649 * spu-low.c: Likewise.
2650 * utils.c: Likewise.
2651 * gdbreplay.c: Unconditionally include errno.h.
2653 2014-08-07 Gary Benson <gbenson@redhat.com>
2655 * server.h: Do not include string.h.
2656 * event-loop.c: Likewise.
2657 * linux-low.c: Likewise.
2658 * regcache.c: Likewise.
2659 * remote-utils.c: Likewise.
2660 * spu-low.c: Likewise.
2661 * utils.c: Likewise.
2663 2014-08-07 Gary Benson <gbenson@redhat.com>
2665 * server.h: Do not include gdb_assert.h.
2667 2014-08-07 Gary Benson <gbenson@redhat.com>
2669 * server.h: Do not include common-utils.h.
2671 2014-08-07 Gary Benson <gbenson@redhat.com>
2673 * server.h: Do not include ptid.h.
2674 * notif.h: Likewise.
2676 2014-08-07 Gary Benson <gbenson@redhat.com>
2678 * server.h: Do not include gdb_locale.h.
2680 2014-08-07 Gary Benson <gbenson@redhat.com>
2682 * server.h: Do not include gdb/signals.h.
2683 * win32-low.c: Likewise.
2685 2014-08-07 Gary Benson <gbenson@redhat.com>
2687 * server.h: Do not include pathmax.h.
2689 2014-08-07 Gary Benson <gbenson@redhat.com>
2691 * server.h: Do not include libiberty.h.
2692 * linux-bfin-low.c: Likewise.
2694 2014-08-07 Gary Benson <gbenson@redhat.com>
2696 * server.h: Do not include ansidecl.h.
2698 2014-08-07 Gary Benson <gbenson@redhat.com>
2700 * linux-x86-low.c: Do not include stddef.h.
2701 * lynx-ppc-low.c: Likewise.
2702 * tracepoint.c: Likewise.
2704 2014-08-07 Gary Benson <gbenson@redhat.com>
2706 * server.h: Do not include stdarg.h.
2707 * nto-low.c: Likewise.
2709 2014-08-07 Gary Benson <gbenson@redhat.com>
2711 * server.h: Do not include stdlib.h.
2712 * inferiors.c: Likewise.
2713 * linux-low.c: Likewise.
2714 * regcache.c: Likewise.
2715 * spu-low.c: Likewise.
2716 * tracepoint.c: Likewise.
2717 * utils.c: Likewise.
2719 2014-08-07 Gary Benson <gbenson@redhat.com>
2721 * server.h: Do not include stdio.h.
2722 * linux-low.c: Likewise.
2723 * remote-utils.c: Likewise.
2724 * spu-low.c: Likewise.
2725 * utils.c: Likewise.
2726 * wincecompat.c: Likewise.
2728 2014-08-06 Gary Benson <gbenson@redhat.com>
2730 * regcache.c (init_register_cache): Move conditionals inside if.
2732 2014-08-06 Gary Benson <gbenson@redhat.com>
2734 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2736 2014-07-31 Gary Benson <gbenson@redhat.com>
2738 * ax.h: Do not include server.h.
2739 * gdbthread.h: Likewise.
2740 * lynx-low.h: Likewise.
2741 * notif.h: Likewise.
2743 2014-07-30 Gary Benson <gbenson@redhat.com>
2745 * server.h: Include common-defs.h.
2746 Do not include config.h or build-gnulib-gdbserver/config.h.
2748 2014-07-30 Gary Benson <gbenson@redhat.com>
2750 * hostio-errno.c: Move server.h to top of includes list.
2751 * inferiors.c: Likewise.
2752 * linux-x86-low.c: Likewise.
2753 * notif.c: Include server.h.
2755 2014-07-24 Tom Tromey <tromey@redhat.com>
2756 Gary Benson <gbenson@redhat.com>
2758 * server.h (CORE_ADDR): Now unsigned.
2760 2014-07-16 Pedro Alves <palves@redhat.com>
2762 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2764 2014-07-15 Pedro Alves <palves@redhat.com>
2766 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2769 2014-07-11 Pedro Alves <palves@redhat.com>
2771 * linux-low.c (kill_wait_lwp): New function, based on
2772 kill_one_lwp_callback, but use my_waitpid directly.
2773 (kill_one_lwp_callback, linux_kill): Use it.
2775 2014-06-23 Pedro Alves <palves@redhat.com>
2777 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2778 before setting DR0..DR3.
2780 2014-06-20 Gary Benson <gbenson@redhat.com>
2782 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2783 * configure: Regenerated.
2784 * config.in: Likewise.
2786 2014-06-20 Gary Benson <gbenson@redhat.com>
2788 * Makefile.in (SFILES): Update locations for files moved
2790 (object file files): Reordered.
2792 2014-06-20 Gary Benson <gbenson@redhat.com>
2794 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2795 (i386_dr_low_set_addr): Likewise.
2796 (i386_dr_low_get_addr): Likewise.
2797 (i386_dr_low_can_set_control): Likewise.
2798 (i386_dr_low_set_control): Likewise.
2799 (i386_dr_low_get_control): Likewise.
2800 (i386_dr_low_get_status): Likewise.
2801 (i386_get_debug_register_length): Likewise.
2802 * linux-x86-low.c (i386_dr_low_set_addr):
2803 Changed signature. Made static.
2804 (i386_dr_low_get_addr): Likewise.
2805 (i386_dr_low_set_control): Likewise.
2806 (i386_dr_low_get_control): Likewise.
2807 (i386_dr_low_get_status): Likewise.
2808 (i386_dr_low): New global variable.
2809 * win32-i386-low.c (i386_dr_low_set_addr):
2810 Changed signature. Made static.
2811 (i386_dr_low_get_addr): Likewise.
2812 (i386_dr_low_set_control): Likewise.
2813 (i386_dr_low_get_control): Likewise.
2814 (i386_dr_low_get_status): Likewise.
2815 (i386_dr_low): New global variable.
2817 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2819 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2820 * Makefile.in (AR, AR_FLAGS): Define.
2821 * configure: Regenerate.
2823 2014-06-19 Gary Benson <gbenson@redhat.com>
2825 * Makefile.in (i386-dregs.o): New rule.
2826 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2827 * i386-low.c (target.h): Remove include.
2828 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2829 (DR_CONTROL_SHIFT): Likewise.
2830 (DR_CONTROL_SIZE): Likewise.
2831 (DR_RW_EXECUTE): Likewise.
2832 (DR_RW_WRITE): Likewise.
2833 (DR_RW_READ): Likewise.
2834 (DR_RW_IORW): Likewise.
2835 (DR_LEN_1): Likewise.
2836 (DR_LEN_2): Likewise.
2837 (DR_LEN_4): Likewise.
2838 (DR_LEN_8): Likewise.
2839 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2840 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2841 (DR_ENABLE_SIZE): Likewise.
2842 (DR_LOCAL_SLOWDOWN): Likewise.
2843 (DR_GLOBAL_SLOWDOWN): Likewise.
2844 (DR_CONTROL_RESERVED): Likewise.
2845 (I386_DR_CONTROL_MASK): Likewise.
2846 (I386_DR_VACANT): Likewise.
2847 (I386_DR_LOCAL_ENABLE): Likewise.
2848 (I386_DR_GLOBAL_ENABLE): Likewise.
2849 (I386_DR_DISABLE): Likewise.
2850 (I386_DR_SET_RW_LEN): Likewise.
2851 (I386_DR_GET_RW_LEN): Likewise.
2852 (I386_DR_WATCH_HIT): Likewise.
2853 (i386_wp_op_t): Likewise.
2854 (i386_show_dr): Likewise.
2855 (i386_length_and_rw_bits): Likewise.
2856 (i386_insert_aligned_watchpoint): Likewise.
2857 (i386_remove_aligned_watchpoint): Likewise.
2858 (i386_handle_nonaligned_watchpoint): Likewise.
2859 i386_update_inferior_debug_regs(): Likewise.
2860 (i386_dr_insert_watchpoint): Likewise.
2861 (i386_dr_remove_watchpoint): Likewise.
2862 (i386_dr_region_ok_for_watchpoint): Likewise.
2863 (i386_dr_stopped_data_address): Likewise.
2864 (i386_dr_stopped_by_watchpoint): Likewise.
2866 2014-06-19 Gary Benson <gbenson@redhat.com>
2868 * i386-low.c (i386_dr_show): Renamed to
2869 i386_show_dr and made static. All uses updated.
2870 (i386_dr_length_and_rw_bits): Renamed to
2871 i386_length_and_rw_bits and made static.
2873 (i386_dr_insert_aligned_watchpoint): Renamed to
2874 i386_insert_aligned_watchpoint and made static.
2876 (i386_dr_remove_aligned_watchpoint): Renamed to
2877 i386_remove_aligned_watchpoint and made static.
2879 (i386_dr_update_inferior_debug_regs): Renamed to
2880 i386_update_inferior_debug_regs and made static.
2883 2014-06-18 Gary Benson <gbenson@redhat.com>
2885 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2886 (i386_dr_low_can_set_control): Likewise.
2887 (i386_get_debug_register_length): Likewise.
2888 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2889 (i386_dr_low_can_set_control): Likewise.
2890 (i386_get_debug_register_length): Likewise.
2892 2014-06-17 Gary Benson <gbenson@redhat.com>
2894 * i386-low.h (i386-dregs.h): New include.
2895 (DR_FIRSTADDR): Now in i386-dregs.h.
2896 (DR_LASTADDR): Likewise.
2897 (DR_NADDR): Likewise.
2898 (DR_STATUS): Likewise.
2899 (DR_CONTROL): Likewise.
2900 (i386_debug_reg_state): Likewise.
2901 (i386_dr_insert_watchpoint): Likewise.
2902 (i386_dr_remove_watchpoint): Likewise.
2903 (i386_dr_region_ok_for_watchpoint): Likewise.
2904 (i386_dr_stopped_data_address): Likewise.
2905 (i386_dr_stopped_by_watchpoint): Likewise.
2906 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2908 2014-06-18 Gary Benson <gbenson@redhat.com>
2910 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2911 i386_dr_insert_watchpoint.
2912 (i386_low_remove_watchpoint): Renamed to
2913 i386_dr_remove_watchpoint.
2914 (i386_low_region_ok_for_watchpoint): Renamed to
2915 i386_dr_region_ok_for_watchpoint.
2916 (i386_low_stopped_data_address): Renamed to
2917 i386_dr_stopped_data_address.
2918 (i386_low_stopped_by_watchpoint): Renamed to
2919 i386_dr_stopped_by_watchpoint.
2920 * i386-low.c (i386_show_dr): Renamed to
2921 i386_dr_show and made nonstatic. All uses updated.
2922 (i386_length_and_rw_bits): Renamed to
2923 i386_dr_length_and_rw_bits and made nonstatic.
2925 (i386_insert_aligned_watchpoint): Renamed to
2926 i386_dr_insert_aligned_watchpoint and made nonstatic.
2928 (i386_remove_aligned_watchpoint): Renamed to
2929 i386_dr_remove_aligned_watchpoint and made nonstatic.
2931 (i386_update_inferior_debug_regs): Renamed to
2932 i386_dr_update_inferior_debug_regs and made nonstatic.
2934 (i386_low_insert_watchpoint): Renamed to
2935 i386_dr_insert_watchpoint. All uses updated.
2936 (i386_low_remove_watchpoint): Renamed to
2937 i386_dr_remove_watchpoint. All uses updated.
2938 (i386_low_region_ok_for_watchpoint): Renamed to
2939 i386_dr_region_ok_for_watchpoint. All uses updated.
2940 (i386_low_stopped_data_address): Renamed to
2941 i386_dr_stopped_data_address. All uses updated.
2942 (i386_low_stopped_by_watchpoint): Renamed to
2943 i386_dr_stopped_by_watchpoint. All uses updated.
2945 2014-06-18 Gary Benson <gbenson@redhat.com>
2947 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2948 (i386_dr_low_can_set_control): Likewise.
2949 (i386_insert_aligned_watchpoint): New check.
2951 2014-06-18 Gary Benson <gbenson@redhat.com>
2953 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2956 2014-06-18 Gary Benson <gbenson@redhat.com>
2958 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2959 instead of fatal and error.
2960 (i386_handle_nonaligned_watchpoint): Likewise.
2962 2014-06-18 Gary Benson <gbenson@redhat.com>
2964 * i386-low.c (i386_get_debug_register_length): New macro.
2965 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2966 (i386_show_dr): Use debug_printf instead of fprintf. Use
2967 phex to format values.
2969 2014-06-18 Gary Benson <gbenson@redhat.com>
2971 * i386-low.h: Comment changes.
2972 * i386-low.c: Likewise.
2974 2014-06-18 Gary Benson <gbenson@redhat.com>
2976 * i386-low.c: Whitespace changes.
2978 2014-06-12 Tom Tromey <tromey@redhat.com>
2980 * utils.c (freeargv): Remove.
2982 2014-06-12 Tom Tromey <tromey@redhat.com>
2984 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2985 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2986 (parse_debug_format_options): Likewise.
2987 (gdbserver_usage): Likewise.
2988 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2989 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2990 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2992 ($(LIBGNU)): Depend on libiberty.
2993 (all-lib): Recurse into all subdirs.
2994 (install-only): Invoke "install" target in subdirs.
2995 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2997 * configure: Rebuild.
2998 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2999 for vasprintf, vsnprintf, or gettimeofday.
3000 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3003 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3005 * development.sh: Delete.
3006 * Makefile.in (config.status): Adjust dependency on development.sh.
3007 * configure.ac: Adjust development.sh source call.
3008 * configure: Regenerate.
3010 2014-06-02 Pedro Alves <palves@redhat.com>
3012 * ax.c (gdb_free_agent_expr): New function.
3013 * ax.h (gdb_free_agent_expr): New declaration.
3014 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3016 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3018 (clear_breakpoint_conditions_and_commands): New function.
3019 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3020 (clear_breakpoint_conditions_and_commands): New declaration.
3022 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3024 * linux-aarch64-low.c (asm/ptrace.h): Include.
3026 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3028 Fix TLS access for -static -pthread.
3029 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3030 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3031 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3033 2014-05-20 Pedro Alves <palves@redhat.com>
3035 * linux-aarch64-low.c (aarch64_insert_point)
3036 (aarch64_remove_point): No longer check whether the type is
3037 supported here. Adjust to new interface.
3038 (the_low_target): Install aarch64_supports_z_point_type as
3039 supports_z_point_type method.
3040 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3041 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3042 instead of a Z packet char. Adjust.
3043 (arm_supports_z_point_type): New function.
3044 (arm_insert_point, arm_remove_point): Adjust to new interface.
3045 (the_low_target): Install arm_supports_z_point_type.
3046 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3047 (cris_insert_point, cris_remove_point): Adjust to new interface.
3048 Don't check whether the type is supported here.
3049 (the_low_target): Install cris_supports_z_point_type.
3050 * linux-low.c (linux_supports_z_point_type): New function.
3051 (linux_insert_point, linux_remove_point): Adjust to new interface.
3052 * linux-low.h (struct linux_target_ops) <insert_point,
3053 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3054 raw_breakpoint pointer parameter.
3055 <supports_z_point_type>: New method.
3056 * linux-mips-low.c (mips_supports_z_point_type): New function.
3057 (mips_insert_point, mips_remove_point): Adjust to new interface.
3058 Use mips_supports_z_point_type.
3059 (the_low_target): Install mips_supports_z_point_type.
3060 * linux-ppc-low.c (the_low_target): Install NULL as
3061 supports_z_point_type method.
3062 * linux-s390-low.c (the_low_target): Install NULL as
3063 supports_z_point_type method.
3064 * linux-sparc-low.c (the_low_target): Install NULL as
3065 supports_z_point_type method.
3066 * linux-x86-low.c (x86_supports_z_point_type): New function.
3067 (x86_insert_point): Adjust to new insert_point interface. Use
3068 insert_memory_breakpoint. Adjust to new
3069 i386_low_insert_watchpoint interface.
3070 (x86_remove_point): Adjust to remove_point interface. Use
3071 remove_memory_breakpoint. Adjust to new
3072 i386_low_remove_watchpoint interface.
3073 (the_low_target): Install x86_supports_z_point_type.
3074 * lynx-low.c (lynx_target_ops): Install NULL as
3075 supports_z_point_type callback.
3076 * nto-low.c (nto_supports_z_point_type): New.
3077 (nto_insert_point, nto_remove_point): Adjust to new interface.
3078 (nto_target_ops): Install nto_supports_z_point_type.
3079 * mem-break.c: Adjust intro comment.
3080 (struct raw_breakpoint) <raw_type, size>: New fields.
3081 <inserted>: Update comment.
3082 <shlib_disabled>: Delete field.
3083 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3084 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3085 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3086 (raw_bkpt_type_to_target_hw_bp_type): New function.
3087 (find_enabled_raw_code_breakpoint_at): New function.
3088 (find_raw_breakpoint_at): New type and size parameters. Use them.
3089 (insert_memory_breakpoint): New function, based off
3090 set_raw_breakpoint_at.
3091 (remove_memory_breakpoint): New function.
3092 (set_raw_breakpoint_at): Reimplement.
3093 (set_breakpoint): New, based on set_breakpoint_at.
3094 (set_breakpoint_at): Reimplement.
3095 (delete_raw_breakpoint): Go through the_target->remove_point
3096 instead of assuming memory breakpoints.
3097 (find_gdb_breakpoint_at): Delete.
3098 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3099 (find_gdb_breakpoint): New function.
3100 (set_gdb_breakpoint_at): Delete.
3101 (z_type_supported): New function.
3102 (set_gdb_breakpoint_1): New function, loosely based off
3103 set_gdb_breakpoint_at.
3104 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3105 (delete_gdb_breakpoint_at): Delete.
3106 (delete_gdb_breakpoint_1): New function, loosely based off
3107 delete_gdb_breakpoint_at.
3108 (delete_gdb_breakpoint): New function.
3109 (clear_gdb_breakpoint_conditions): Rename to ...
3110 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3112 (add_condition_to_breakpoint): Make static.
3113 (add_breakpoint_condition): Take a struct breakpoint pointer
3114 instead of an address. Adjust.
3115 (gdb_condition_true_at_breakpoint): Rename to ...
3116 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3118 (gdb_condition_true_at_breakpoint): Reimplement.
3119 (add_breakpoint_commands): Take a struct breakpoint pointer
3120 instead of an address. Adjust.
3121 (gdb_no_commands_at_breakpoint): Rename to ...
3122 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3123 parameter. Return true if no breakpoint was found. Change debug
3125 (gdb_no_commands_at_breakpoint): Reimplement.
3126 (run_breakpoint_commands): Rename to ...
3127 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3128 and change return type to boolean.
3129 (run_breakpoint_commands): New function.
3130 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3131 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3132 breakpoint. Go through the_target->remove_point instead of
3133 assuming memory breakpoint.
3134 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3135 software and hardware breakpoints.
3136 (reinsert_raw_breakpoint): Go through the_target->insert_point
3137 instead of assuming memory breakpoint.
3138 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3139 software and hardware breakpoints.
3140 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3141 Check both software and hardware breakpoints.
3142 (validate_inserted_breakpoint): Assert the breakpoint is a
3143 software breakpoint. Set the inserted flag to -1 instead of
3144 setting shlib_disabled.
3145 (delete_disabled_breakpoints): Adjust.
3146 (validate_breakpoints): Only validate software breakpoints.
3147 Adjust to inserted flag change.
3148 (check_mem_read, check_mem_write): Skip breakpoint types other
3149 than software breakpoints. Adjust to inserted flag change.
3150 * mem-break.h (enum raw_bkpt_type): New enum.
3151 (raw_breakpoint, struct process_info): Forward declare.
3152 (Z_packet_to_target_hw_bp_type): Delete declaration.
3153 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3154 (set_gdb_breakpoint, delete_gdb_breakpoint)
3155 (clear_breakpoint_conditions): New declarations.
3156 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3157 (breakpoint_inserted_here): Update comment.
3158 (add_breakpoint_condition, add_breakpoint_commands): Replace
3159 address parameter with a breakpoint pointer parameter.
3160 (gdb_breakpoint_here): Update comment.
3161 (delete_gdb_breakpoint_at): Delete.
3162 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3163 * server.c (process_point_options): Take a struct breakpoint
3164 pointer instead of an address. Adjust.
3165 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3166 delete_gdb_breakpoint.
3167 * spu-low.c (spu_target_ops): Install NULL as
3168 supports_z_point_type method.
3169 * target.h: Include mem-break.h.
3170 (struct target_ops) <prepare_to_access_memory>: Update comment.
3171 <supports_z_point_type>: New field.
3172 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3173 instead of a char. Also take a raw breakpoint pointer.
3174 * win32-arm-low.c (the_low_target): Install NULL as
3175 supports_z_point_type.
3176 * win32-i386-low.c (i386_supports_z_point_type): New function.
3177 (i386_insert_point, i386_remove_point): Adjust to new interface.
3178 (the_low_target): Install i386_supports_z_point_type.
3179 * win32-low.c (win32_supports_z_point_type): New function.
3180 (win32_insert_point, win32_remove_point): Adjust to new interface.
3181 (win32_target_ops): Install win32_supports_z_point_type.
3182 * win32-low.h (struct win32_target_ops):
3183 <supports_z_point_type>: New method.
3184 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3185 instead of a char. Also take a raw breakpoint pointer.
3187 2014-05-20 Pedro Alves <palves@redhat.com>
3189 * mem-break.h: Include break-common.h.
3190 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3191 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3192 (Z_packet_to_target_hw_bp_type): New declaration.
3193 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3194 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3195 (Z_PACKET_ACCESS_WP): Delete macros.
3196 (Z_packet_to_hw_type): Delete function.
3197 * i386-low.h: Don't include break-common.h here.
3198 (Z_packet_to_hw_type): Delete declaration.
3199 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3200 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3201 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3202 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3203 * linux-aarch64-low.c: Don't include break-common.h here.
3204 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3205 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3206 (Z_packet_to_target_hw_bp_type): Delete function.
3207 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3209 (mips_insert_point, mips_remove_point): Use
3210 Z_packet_to_target_hw_bp_type.
3212 2014-05-20 Pedro Alves <palves@redhat.com>
3214 * linux-aarch64-low.c: Include break-common.h.
3215 (enum target_point_type): Delete.
3216 (Z_packet_to_point_type): Rename to ...
3217 (Z_packet_to_target_hw_bp_type): ... this, and return a
3218 target_hw_bp_type instead.
3219 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3220 instead of an enum target_point_type.
3221 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3223 (aarch64_dr_state_insert_one_point)
3224 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3225 (aarch64_handle_aligned_watchpoint)
3226 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3227 Take an enum target_hw_bp_type instead of an enum
3229 (aarch64_supports_z_point_type): New function.
3230 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3231 use Z_packet_to_target_hw_bp_type.
3233 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3235 * configure.ac: Only use -Werror by default when DEVELOPMENT
3237 * configure: Regenerate.
3239 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3241 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3242 * linux-x86-low.c (X86_64_USER_REGS): New.
3243 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3245 2014-04-28 Yao Qi <yao@codesourcery.com>
3247 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3250 2014-04-25 Pedro Alves <palves@redhat.com>
3253 * linux-low.c (linux_attach_fail_reason_string): New function.
3254 (linux_attach_lwp): Delete.
3255 (linux_attach_lwp_1): Rename to ...
3256 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3257 argument. Remove "initial" parameter. Return int instead of
3258 void. Don't error or warn here.
3259 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3260 failure to attach to the tgid. Call warning when failing to
3262 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3263 argument. Remove "initial" parameter. Return int instead of
3264 void. Don't error or warn here.
3265 (linux_attach_fail_reason_string): New declaration.
3266 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3267 interface change. Use linux_attach_fail_reason_string.
3269 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3270 Walfred Tedeschi <walfred.tedeschi@intel.com>
3272 * Makefile.in: Added rules to handle new files
3273 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3274 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3275 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3276 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3277 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3278 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3280 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3281 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3282 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3283 i386/x32-avx512.xml.
3284 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3285 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3286 i386/x32-avx512-linux.xml.
3287 * i387-fp.c (num_avx512_k_registers): New constant for number
3289 (num_avx512_zmmh_low_registers): New constant for number of
3290 lower ZMM registers (0-15).
3291 (num_avx512_zmmh_high_registers): New constant for number of
3292 higher ZMM registers (16-31).
3293 (num_avx512_ymmh_registers): New contant for number of higher
3294 YMM registers (ymm16-31 added by avx521 on x86_64).
3295 (num_avx512_xmm_registers): New constant for number of higher
3296 XMM registers (xmm16-31 added by AVX512 on x86_64).
3297 (struct i387_xsave): Add space for AVX512 registers.
3298 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3299 Add code to handle AVX512 registers.
3300 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3301 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3302 prototypei from generated file.
3303 (tdesc_amd64_avx512_linux): Likewise.
3304 (init_registers_x32_avx512_linux): Likewise.
3305 (tdesc_x32_avx512_linux): Likewise.
3306 (init_registers_i386_avx512_linux): Likewise.
3307 (tdesc_i386_avx512_linux): Likewise.
3308 (x86_64_regmap): Add AVX512 registers.
3309 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3311 (initialize_low_arch): Add code to initialize AVX512 registers.
3313 2014-04-23 Pedro Alves <palves@redhat.com>
3315 * mem-break.c (find_gdb_breakpoint_at): Make static.
3316 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3318 2014-04-23 Pedro Alves <palves@redhat.com>
3320 * i386-low.c: Don't include break-common.h here.
3321 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3322 prototype to take target_hw_bp_type as argument instead of a Z
3324 * i386-low.h: Include break-common.h here.
3325 (Z_packet_to_hw_type): Declare.
3326 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3328 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3329 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3330 (x86_remove_point): Convert the packet number to a
3331 target_hw_bp_type before calling i386_low_remove_watchpoint.
3332 * win32-i386-low.c (i386_insert_point): Convert the packet number
3333 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3334 (i386_remove_point): Convert the packet number to a
3335 target_hw_bp_type before calling i386_low_remove_watchpoint.
3337 2014-04-23 Pedro Alves <palves@redhat.com>
3339 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3341 2014-04-10 Pedro Alves <palves@redhat.com>
3343 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3344 Check if the condition or command is NULL before checking if the
3345 breakpoint is known. On success, return true.
3346 * mem-break.h (add_breakpoint_condition): Document return.
3347 (add_breakpoint_commands): Add describing comment.
3348 * server.c (skip_to_semicolon): New function.
3349 (process_point_options): Use it.
3351 2014-04-09 Pedro Alves <palves@redhat.com>
3353 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3356 2014-02-27 Pedro Alves <palves@redhat.com>
3359 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3361 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3363 (last_thread_of_process_p): Take a PID argument instead of a
3365 (linux_wait_for_lwp): Delete.
3366 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3368 (linux_low_filter_event): New function, party factored out from
3369 linux_wait_for_event.
3370 (linux_wait_for_event): Rename to ...
3371 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3372 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3373 sigsuspend. Check for zombie leaders.
3374 (linux_wait_for_event): Reimplement as wrapper around
3375 linux_wait_for_event_filtered.
3376 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3377 a normal or signal exit is seen, it's the whole process exiting.
3378 (wait_for_sigstop): No longer a for_each_inferior callback.
3379 Rewrite on top of linux_wait_for_event_filtered.
3380 (stop_all_lwps): Call wait_for_sigstop directly.
3381 * server.c (resume, handle_target_event): Handle
3382 TARGET_WAITKIND_NO_RESUMED.
3384 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3386 * win32-low.c (psapi_get_dll_name,
3387 * win32_CreateToolhelp32Snapshot): Delete.
3388 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3389 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3391 (handle_load_dll): Add function description.
3392 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3394 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3396 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3398 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3399 base address when calling win32_add_one_solib.
3400 (handle_load_dll): Delete local variable load_addr.
3401 Remove 0x1000 offset applied to DLL base address when calling
3402 win32_add_one_solib.
3403 (handle_unload_dll): Add comment.
3405 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3407 * win32-low.c (win32_add_all_dlls): Renames
3408 win32_ensure_ntdll_loaded. Rewrite function documentation.
3409 Adjust implementation to always load all DLLs.
3410 Add 0x1000 offset to DLL base address when calling
3411 win32_add_one_solib.
3412 (child_initialization_done): New static global.
3413 (do_initial_child_stuff): Set child_initialization_done to
3414 zero during child initialization, and 1 after. Replace call
3415 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3417 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3418 (handle_unload_dll): Add function documentation.
3419 (get_child_debug_event): Ignore load and unload DLL events
3420 during child initialization.
3422 2014-02-20 Doug Evans <dje@google.com>
3424 Remove global all_lwps.
3425 * inferiors.h (ptid_of): Move here from linux-low.h.
3426 (pid_of, lwpid_of): Ditto.
3427 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3428 parameter is a struct thread_info * now.
3429 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3430 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3431 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3433 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3434 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3435 * linux-arm-low.c (update_registers_callback): Update, "entry"
3436 parameter is a struct thread_info * now.
3437 Fetch lwpid from current_inferior directly.
3438 (arm_insert_point): Pass &all_threads to find_inferior instead of
3440 (arm_remove_point): Ditto.
3441 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3442 (arm_prepare_to_resume): Fetch pid from thread.
3443 (arm_read_description): Fetch lwpid from current_inferior directly.
3444 * linux-low.c (all_lwps): Delete.
3445 (delete_lwp): Delete call to remove_inferior.
3446 (handle_extended_wait): Fetch lwpid from thread.
3447 (add_lwp): Don't set lwp->entry.id. Remove call to
3448 add_inferior_to_list.
3449 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3450 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3451 (kill_one_lwp_callback): Ditto.
3452 (linux_kill): Don't dereference NULL pointer.
3453 Fetch ptid,lwpid from thread.
3454 (get_detach_signal): Fetch ptid from thread.
3455 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3456 Simplify call to regcache_invalidate_thread.
3457 (delete_lwp_callback): Update, "entry" parameter is a
3458 struct thread_info * now. Fetch pid from thread.
3459 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3460 (status_pending_p_callback): Update, "entry" parameter is a
3461 struct thread_info * now. Fetch ptid from thread.
3462 (find_lwp_pid): Update, "entry" parameter is a
3463 struct thread_info * now.
3464 (linux_wait_for_lwp): Fetch pid from thread.
3465 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3466 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3467 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3468 (dequeue_one_deferred_signal): Ditto.
3469 (cancel_breakpoint): Fetch ptid from current_inferior.
3470 (linux_wait_for_event): Pass &all_threads to find_inferior,
3471 not &all_lwps. Fetch ptid, lwpid from thread.
3472 (count_events_callback): Update, "entry" parameter is a
3473 struct thread_info * now.
3474 (select_singlestep_lwp_callback): Ditto.
3475 (select_event_lwp_callback): Ditto.
3476 (cancel_breakpoints_callback): Ditto.
3477 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3479 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3480 (unsuspend_one_lwp): Update, "entry" parameter is a
3481 struct thread_info * now.
3482 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3484 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3485 Fetch lwpid from thread, not lwp.
3486 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3487 Pass &all_threads to find_inferior, not &all_lwps.
3488 (send_sigstop): Fetch lwpid from thread, not lwp.
3489 (send_sigstop_callback): Update, "entry" parameter is a
3490 struct thread_info * now.
3491 (suspend_and_send_sigstop_callback): Ditto.
3492 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3493 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3494 struct thread_info * now.
3495 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3497 (lwp_running): Update, "entry" parameter is a
3498 struct thread_info * now.
3499 (stop_all_lwps): Fetch ptid from thread.
3500 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3501 (linux_resume_one_lwp): Fetch lwpid from thread.
3502 (linux_set_resume_request): Update, "entry" parameter is a
3503 struct thread_info * now. Fetch pid, lwpid from thread.
3504 (resume_status_pending_p): Update, "entry" parameter is a
3505 struct thread_info * now.
3506 (need_step_over_p): Ditto. Fetch lwpid from thread.
3507 (start_step_over): Fetch lwpid from thread.
3508 (linux_resume_one_thread): Update, "entry" parameter is a
3509 struct thread_info * now. Fetch lwpid from thread.
3510 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3511 (proceed_one_lwp): Update, "entry" parameter is a
3512 struct thread_info * now. Fetch lwpid from thread.
3513 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3514 struct thread_info * now.
3515 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3516 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3517 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3519 (regsets_store_inferior_registers): Ditto.
3520 (fetch_register, store_register): Ditto.
3521 (linux_read_memory, linux_write_memory): Ditto.
3522 (linux_request_interrupt): Ditto.
3523 (linux_read_auxv): Ditto.
3524 (linux_xfer_siginfo): Ditto.
3525 (linux_qxfer_spu): Ditto.
3526 (linux_qxfer_libraries_svr4): Ditto.
3527 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3528 moved to inferiors.h.
3530 (get_thread_lwp): Update.
3531 (struct lwp_info): Delete member "entry". Simplify comment for
3534 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3535 current_inferior directly.
3536 (update_watch_registers_callback): Update, "entry" parameter is a
3537 struct thread_info * now. Fetch pid from thread.
3538 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3539 (mips_insert_point): Fetch lwpid from current_inferior.
3540 Pass &all_threads to find_inferior, not &all_lwps.
3541 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3542 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3544 (mips_stopped_data_address): Ditto.
3545 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3547 * linux-tile-low.c (tile_arch_setup): Ditto.
3548 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3549 (update_debug_registers_callback): Update, "entry" parameter is a
3550 struct thread_info * now. Fetch pid from thread.
3551 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3552 Pass &all_threads to find_inferior, not &all_lwps.
3553 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3554 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3555 Pass &all_threads to find_inferior, not &all_lwps.
3556 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3557 (i386_dr_low_get_status): Ditto.
3558 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3559 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3560 (x86_linux_read_description): Ditto.
3561 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3563 2014-02-20 Doug Evans <dje@google.com>
3565 * inferiors.c (get_first_inferior): Fix buglet.
3567 2014-02-19 Doug Evans <dje@google.com>
3569 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3570 * inferiors.c (add_thread): Change result type to struct thread_info *.
3571 All callers updated.
3572 (add_lwp): Call add_thread here instead of in callers.
3573 All callers updated.
3574 * linux-low.h (get_lwp_thread): Rewrite.
3575 (struct lwp_info): New member "thread".
3577 2014-02-19 Doug Evans <dje@google.com>
3579 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3580 All callers updated.
3582 2014-02-19 Doug Evans <dje@google.com>
3584 * inferiors.c (add_thread): Fix whitespace.
3586 2014-02-19 Doug Evans <dje@google.com>
3588 * dll.c (clear_dlls): Replace accessing list implemention details
3590 * gdbthread.h (get_first_thread): Declare.
3591 * inferiors.c (for_each_inferior_with_data): New function.
3592 (get_first_thread): New function.
3593 (find_thread_ptid): Simplify.
3594 (get_first_inferior): New function.
3595 (clear_list): Delete.
3596 (one_inferior_p): New function.
3597 (clear_inferior_list): New function.
3598 (clear_inferiors): Update.
3599 * inferiors.h (for_each_inferior_with_data): Declare.
3600 (clear_inferior_list): Declare.
3601 (one_inferior_p): Declare.
3602 (get_first_inferior): Declare.
3603 * linux-low.c (linux_wait_for_event): Replace accessing list
3604 implemention details with API function.
3605 * server.c (target_running): Ditto.
3606 (accumulate_file_name_length): New function.
3607 (emit_dll_description): New function.
3608 (handle_qxfer_libraries): Replace accessing list implemention
3609 details with API function.
3610 (handle_qxfer_threads_worker): New function.
3611 (handle_qxfer_threads_proper): Replace accessing list implemention
3612 details with API function.
3613 (handle_query): Ditto.
3614 (visit_actioned_threads_callback_ftype): New typedef.
3615 (visit_actioned_threads_data): New struct.
3616 (visit_actioned_threads): Rewrite to be find_inferior callback.
3617 (resume): Call find_inferior.
3618 (handle_status): Replace accessing list implemention
3619 details with API function.
3620 (process_serial_event): Replace accessing list implemention details
3622 * target.c (set_desired_inferior): Replace accessing list implemention
3623 details with API function.
3624 * tracepoint.c (same_process_p): New function.
3625 (gdb_agent_about_to_close): Replace accessing list implemention
3626 details with API function.
3627 * win32-low.c (child_delete_thread): Replace accessing list
3628 implemention details with API function.
3629 (match_dll_by_basename): New function.
3630 (dll_is_loaded_by_basename): New function.
3631 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3632 details call to dll_is_loaded_by_basename.
3634 2014-02-19 Doug Evans <dje@google.com>
3636 * dll.h (struct dll_info): Add comment.
3637 * gdbthread.h (struct thread_info): Add comment.
3638 (current_ptid): Simplify.
3639 * inferiors.c (add_process): Update.
3640 (remove_process): Update.
3641 * inferiors.h (struct process_info): Rename member "head" to "entry".
3642 * linux-low.c (delete_lwp): Update.
3644 (last_thread_of_process_p): Update.
3645 (kill_one_lwp_callback, linux_kill): Update.
3646 (status_pending_p_callback): Update.
3647 (wait_for_sigstop): Update. Simplify read of ptid.
3648 (start_step_over): Update.
3649 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3650 (get_lwp_thread): Update.
3651 (struct lwp_info): Rename member "head" to "entry".
3652 * regcache.h (inferior_list_entry): Delete.
3653 * server.c (kill_inferior_callback): Update.
3654 (detach_or_kill_inferior_callback): Update.
3655 (print_started_pid): Update.
3656 (print_attached_pid): Update.
3657 (process_serial_event): Simplify read of ptid.
3658 * thread-db.c (thread_db_create_event): Update.
3659 (thread_db_get_tls_address): Update.
3660 * win32-low.c (current_inferior_ptid): Simplify.
3662 2014-02-19 Tom Tromey <tromey@redhat.com>
3664 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3666 (target_supports_btrace): Update.
3668 2014-02-14 Yao Qi <yao@codesourcery.com>
3670 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3671 (rsp-low-ipa.o): New target.
3673 2014-02-12 Tom Tromey <tromey@redhat.com>
3675 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3676 convert_ascii_to_int.
3677 * regcache.c (registers_to_string): Likewise.
3678 * remote-utils.c (decode_M_packet): Likewise.
3679 * server.c (process_serial_event): Likewise.
3681 2014-02-12 Tom Tromey <tromey@redhat.com>
3683 * server.c (handle_query, handle_v_run): Use hex2bin, not
3685 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3687 2014-02-12 Tom Tromey <tromey@redhat.com>
3689 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3690 convert_int_to_ascii.
3691 * regcache.c (registers_to_string, collect_register_as_string):
3693 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3695 * server.c (process_serial_event): Likewise.
3696 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3697 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3699 2014-02-12 Tom Tromey <tromey@redhat.com>
3701 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3702 bin2hex, not hexify.
3703 * tracepoint.c (cmd_qtstatus): Likewise.
3705 2014-02-12 Tom Tromey <tromey@redhat.com>
3707 * remote-utils.c (monitor_output): Pass explicit length to
3710 2014-02-12 Tom Tromey <tromey@redhat.com>
3712 * tracepoint.c: Include rsp-low.h.
3713 * server.c: Include rsp-low.h.
3714 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3715 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3717 * remote-utils.c: Include rsp-low.h.
3718 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3719 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3720 (convert_int_to_ascii, convert_ascii_to_int): Move to
3722 * regcache.c: Include rsp-low.h.
3723 * ax.c: Include rsp-low.h.
3724 * Makefile.in (SFILES): Add common/rsp-low.c.
3725 (OBS): Add rsp-low.o.
3726 (rsp-low.o): New target.
3728 2014-02-12 Tom Tromey <tromey@redhat.com>
3730 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3731 Include print-utils.h.
3732 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3733 (plongest, thirty_two, phex_nz): Remove.
3734 * Makefile.in (SFILES): Add common/print-utils.c.
3735 (OBS): Add print-utils.o.
3736 (print-utils-ipa.o): New target.
3737 (print-utils.o): New target.
3738 (IPA_OBJS): Add print-utils-ipa.o.
3740 2014-02-06 Tom Tromey <tromey@redhat.com>
3742 * Makefile.in (SFILES): Fix indentation.
3744 2014-02-05 Doug Evans <dje@google.com>
3746 * linux-low.c (linux_wait_for_event): Improve comment.
3747 (linux_wait_1): Keep current_inferior in sync with event_child.
3749 2014-01-22 Doug Evans <dje@google.com>
3751 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3753 2014-01-22 Doug Evans <dje@google.com>
3755 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3756 * configure: Regenerate.
3757 * config.in: Regenerate.
3758 * Makefile.in (SFILES): Add debug.c.
3760 * debug.c: New file.
3761 * debug.h: New file.
3762 * linux-aarch64-low.c (*): Update all debugging printfs to use
3763 debug_printf instead of fprintf.
3764 * linux-arm-low.c (*): Ditto.
3765 * linux-cris-low.c (*): Ditto.
3766 * linux-crisv32-low.c (*): Ditto.
3767 * linux-m32r-low.c (*): Ditto.
3768 * linux-sparc-low.c (*): Ditto.
3769 * linux-x86.c (*): Ditto.
3770 * linux-low.c (*): Ditto.
3771 (linux_wait_1): Add calls to debug_enter, debug_exit.
3772 (linux_wait): Remove redundant debugging printf.
3773 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3774 (linux_resume, unstop_all_lwps): Ditto.
3775 * mem-break.c (*): Update all debugging printfs to use
3776 debug_printf instead of fprintf.
3777 * remote-utils.c (*): Ditto.
3778 * thread-db.c (*): Ditto.
3779 * server.c #include <ctype.h>, "gdb_vecs.h".
3780 (debug_threads): Moved to debug.c.
3781 (*): Update all debugging printfs to use debug_printf instead of
3783 (start_inferior): Replace call to fflush with call to debug_flush.
3784 (monitor_show_help): Mention set debug-format.
3785 (parse_debug_format_options): New function.
3786 (handle_monitor_command): Handle "monitor set debug-format".
3787 (gdbserver_usage): Mention --debug-format.
3788 (main): Parse --debug-format.
3789 * server.h (debug_threads): Declaration moved to debug.h.
3791 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3792 trace_debug_1 that uses debug_printf.
3793 (tracepoint_look_up_symbols): Update all debugging printfs to use
3794 debug_printf instead of fprintf.
3796 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3798 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3801 2014-01-17 Pedro Alves <palves@redhat.com>
3804 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3805 defined after including gdb_proc_service.h.
3807 2014-01-16 Doug Evans <dje@google.com>
3809 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3810 (match_dll): Use it.
3812 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3814 * target.h (target_ops) <read_btrace>: Change parameters and
3815 return type to allow error reporting.
3816 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3817 trace reading errors on.
3818 * linux-low.c (linux_low_read_btrace): Pass trace reading
3820 (linux_low_disable_btrace): New.
3822 2014-01-15 Doug Evans <dje@google.com>
3824 * inferiors.c (thread_id_to_gdb_id): Delete.
3825 * inferiors.h (thread_id_to_gdb_id): Delete.
3827 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3829 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3830 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3833 2014-01-08 Pedro Alves <palves@redhat.com>
3835 * server.c (handle_status): Don't discard previous queued stop
3836 replies or thread's pending status here.
3837 (main) <disconnection>: Do it here instead.
3839 2014-01-08 Pedro Alves <palves@redhat.com>
3841 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3842 * server.c (visit_actioned_threads, handle_pending_status): New
3844 (handle_v_cont): Factor out parts to ...
3845 (resume): ... this new function. If in all-stop, and a thread
3846 being resumed has a pending status, report it without actually
3848 (myresume): Adjust to use the new 'resume' function.
3849 (clear_pending_status_callback, set_pending_status_callback)
3850 (find_status_pending_thread_callback): New functions.
3851 (handle_status): Handle the case of multiple threads having
3852 interesting statuses to report. Report threads' real last signal
3853 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3854 with an interesting thread to report the status for, instead of
3855 always reporting the status of the first thread.
3857 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3859 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3860 * gdbreplay.c (gdbreplay_version): Likewise.
3862 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3864 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3865 iov.iov_len with the real length in use.
3867 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3869 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3870 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3871 for all targets that use win32-low.c.
3872 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3873 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3875 2013-12-13 Pedro Alves <palves@redhat.com>
3877 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3878 if equal to TARGET_WAITKIND_LOADED.
3879 * win32-low.c (cached_status): New static global.
3880 (win32_wait): Add declaration.
3881 (do_initial_child_stuff): Flush all initial pending debug events
3882 up to the initial breakpoint.
3883 (win32_wait): If CACHED_STATUS was set, return that instead
3884 of doing a real wait. Remove the code resuming the execution
3885 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3886 during the initial phase. Also remove the code changing
3887 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3888 TARGET_WAITKIND_STOPPED.
3890 2013-12-11 Yao Qi <yao@codesourcery.com>
3892 * notif.c (handle_notif_ack): Return 0 if no notification
3895 2013-11-20 Doug Evans <dje@google.com>
3897 * linux-low.c (linux_set_resume_request): Fix comment.
3899 2013-11-20 Doug Evans <dje@google.com>
3901 * linux-low.c (resume_status_pending_p): Tweak comment.
3903 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3905 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3906 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3907 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3908 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3909 (srv_amd64_regobj): Add amd64-mpx.o.
3910 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3911 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3912 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3913 * i387-fp.c (num_pl_bnd_register) Added constant.
3914 (num_pl_bnd_cfg_registers) Added constant.
3915 (struct i387_xsave) Added reserved area and MPX fields.
3916 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3917 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3919 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3920 (init_registers_amd64_mpx_linux): Declare new function.
3921 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3922 (x86_64_regmap): Add MPX registers.
3923 (x86_linux_read_description): Add MPX case.
3924 (initialize_low_arch): Initialize MPX targets.
3926 2013-11-18 Tom Tromey <tromey@redhat.com>
3928 * configure: Rebuild.
3929 * configure.ac: Don't check for stdlib.h.
3930 * gdbreplay.c: Unconditionally include stdlib.h.
3932 2013-11-18 Tom Tromey <tromey@redhat.com>
3934 * config.in: Rebuild.
3935 * configure: Rebuild.
3936 * configure.ac: Don't use AC_HEADER_DIRENT.
3938 2013-11-18 Tom Tromey <tromey@redhat.com>
3940 * server.h: Don't check HAVE_STRING_H.
3941 * gdbreplay.c: Don't check HAVE_STRING_H.
3942 * configure: Rebuild.
3944 2013-11-18 Tom Tromey <tromey@redhat.com>
3946 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3949 2013-11-08 Tom Tromey <tromey@redhat.com>
3951 * configure, config.in: Rebuild.
3952 * configure.ac: Remove unused configury.
3954 2013-11-08 Tom Tromey <tromey@redhat.com>
3956 * acinclude.m4: Include common.m4, codeset.m4.
3957 * configure, config.in: Rebuild.
3958 * configure.ac: Use GDB_AC_COMMON.
3960 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3962 * linux-s390-low.c (HWCAP_S390_TE): New define.
3963 (s390_arch_setup): Consider the TE field in the HWCAP for
3964 determining 'have_regset_tdb'.
3966 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3969 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3972 2013-10-02 Pedro Alves <palves@redhat.com>
3974 * server.c (process_serial_event): Don't output "GDBserver
3975 exiting" if GDB is connected through stdio.
3976 * target.c (mywait): Likewise, be silent if GDB is connected
3979 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3981 * lynx-low.c (lynx_add_threads_after_attach): New function.
3982 (lynx_attach): Remove call to add_thread. Add call to
3983 lynx_add_threads_after_attach instead.
3985 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3987 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3988 * config.in, configure: Regenerated.
3990 2013-09-18 Yao Qi <yao@codesourcery.com>
3993 * server.c (start_inferior): Clear 'resume_info'.
3995 2013-09-16 Jiong Wang <jiwang@tilera.com>
3997 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4000 2013-09-16 Jiong Wang <jiwang@tilera.com>
4002 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4003 linux-tile-low.o to srv_tgtobj.
4005 2013-09-16 Will Newton <will.newton@linaro.org>
4007 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4010 2013-09-06 Pedro Alves <palves@redhat.com>
4012 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4013 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4014 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4015 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4016 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4017 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4019 2013-09-06 Pedro Alves <palves@redhat.com>
4021 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4022 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4024 2013-09-06 Pedro Alves <palves@redhat.com>
4026 * linux-amd64-ipa.c: Include tracepoint.h.
4027 * linux-i386-ipa.c: Include tracepoint.h.
4029 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4031 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4032 (ps_get_thread_area): New function.
4034 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4036 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4037 (initialize_low_arch): Call init_registers_crisv32 rather than
4038 init_register_crisv32.
4040 2013-09-05 Pedro Alves <palves@redhat.com>
4042 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4044 * hostio.h: ... this new file.
4045 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4046 win32-low.c: Include hostio.h.
4048 2013-09-05 Pedro Alves <palves@redhat.com>
4050 * server.h (gdb_client_data, handler_func, callback_handler_func)
4051 (delete_file_handler, add_file_handler, append_callback_event)
4052 (delete_callback_event, start_event_loop, initialize_event_loop):
4053 Move to event-loop.h and include it.
4054 * event-loop.h: New file.
4056 2013-09-05 Pedro Alves <palves@redhat.com>
4058 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4059 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4060 (loaded_dll, unloaded_dll): Move to ...
4061 * dll.h: ... this new file.
4062 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4064 2013-09-05 Pedro Alves <palves@redhat.com>
4066 * server.h (current_process, get_thread_process, all_processes)
4067 (add_inferior_to_list, for_each_inferior, current_inferior)
4068 (remove_inferior, add_process, remove_process, find_process_pid)
4069 (have_started_inferiors_p, have_attached_inferiors_p)
4070 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4071 (clear_inferiors, find_inferior, find_inferior_id)
4072 (inferior_target_data, set_inferior_target_data)
4073 (inferior_regcache_data, set_inferior_regcache_data): Move to
4074 inferiors.h, and include it.
4075 * inferiors.h: New file.
4077 2013-09-05 Pedro Alves <palves@redhat.com>
4079 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4083 2013-09-05 Pedro Alves <palves@redhat.com>
4085 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4087 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4088 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4089 (handle_tracepoint_general_set, handle_tracepoint_query)
4090 (tracepoint_finished_step, tracepoint_was_hit)
4091 (release_while_stepping_state_list, current_traceframe)
4092 (in_readonly_region, traceframe_read_mem)
4093 (fetch_traceframe_registers, traceframe_read_sdata)
4094 (traceframe_read_info, struct fast_tpoint_collect_status)
4095 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4096 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4097 (supply_fast_tracepoint_registers)
4098 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4099 (ipa_tdesc, claim_trampoline_space)
4100 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4101 (agent_mem_read, agent_get_trace_state_variable_value)
4102 (agent_set_trace_state_variable_value, agent_tsv_read)
4103 (agent_mem_read_string, get_raw_reg_func_addr)
4104 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4105 * tracepoint.h: ... this new file.
4107 2013-09-05 Pedro Alves <palves@redhat.com>
4109 * server.h (perror_with_name, error, fatal, warning, paddress)
4110 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4112 * utils.h: New file.
4114 2013-09-05 Pedro Alves <palves@redhat.com>
4116 * server.h (remote_debug, noack_mode, transport_is_reliable)
4117 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4118 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4119 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4120 (write_enn, initialize_async_io, enable_async_io)
4121 (disable_async_io, check_remote_input_interrupt_request)
4122 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4123 (dead_thread_notify, prepare_resume_reply)
4124 (decode_address_to_semicolon, decode_address, decode_m_packet)
4125 (decode_M_packet, decode_X_packet, decode_xfer_write)
4126 (decode_search_memory_packet, unhexify, hexify)
4127 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4128 (look_up_one_symbol, relocate_instruction)
4129 (monitor_output): Move to remote-utils.h, and include it.
4130 * remote-utils.h: New file.
4132 2013-09-05 Pedro Alves <palves@redhat.com>
4134 * server.h (_): Delete.
4136 2013-09-02 Pedro Alves <palves@redhat.com>
4138 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4139 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4141 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4143 2013-09-02 Pierre Muller <muller@sourceware.org>
4145 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4146 or WriteProcessMemory complete successfully and handle
4147 ERROR_PARTIAL_COPY error.
4149 2013-09-02 Pedro Alves <palves@redhat.com>
4151 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4152 error instead of EIO.
4154 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4157 * linux-low.c: Include filestuff.h.
4158 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4159 * lynx-low.c: Include filestuff.h.
4160 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4161 * server.c: Include filestuff.h.
4162 (main): Call notice_open_fds.
4163 * spu-low.c: Include filestuff.h.
4164 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4166 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4168 * Makefile.in: Explain why ../target and ../nat are not
4169 listed as include file search paths.
4170 (linux-waitpid.o): New object file rule.
4171 * configure.srv (srv_native_linux_obj): New variable.
4172 Replace all occurrences of linux native object files with
4173 $srv_native_linux_obj.
4174 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4175 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4176 (linux_enable_event_reporting): Remove declaration.
4177 (my_waitpid): Moved to common/linux-waitpid.c.
4178 (linux_wait_for_event): Pass ptid when calling
4179 linux_enable_event_reporting.
4180 (linux_supports_tracefork_flag): Remove.
4181 (linux_enable_event_reporting): Likewise.
4182 (linux_tracefork_grandchild): Remove.
4183 (STACK_SIZE): Moved to common/linux-ptrace.c.
4184 (linux_tracefork_child): Remove.
4185 (linux_test_for_tracefork): Remove.
4186 (linux_look_up_symbols): Call linux_supports_traceclone.
4187 (initialize_low): Remove call to linux_test_for_tracefork.
4188 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4189 common/linux-ptrace.h.
4190 (PTRACE_TYPE_ARG4): Likewise.
4191 Include linux-ptrace.h.
4193 2013-08-21 Pedro Alves <palves@redhat.com>
4195 * config.in: Renegerate.
4197 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4199 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4200 (SFILES): Remove $(srcdir)/common/target-common.c and
4201 add $(srcdir)/target/waitstatus.c.
4202 (OBS): Remove target-common.o and add waitstatus.o.
4203 (server_h): Remove $(srcdir)/../common/target-common.h and
4204 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4205 and $(srcdir)/../target/waitstatus.h.
4206 (target-common.o): Remove.
4207 (waitstatus.o): New target object file.
4208 * target.h: Do not include target-common.h and
4209 include target/resume.h, target/wait.h and
4210 target/waitstatus.h.
4212 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4214 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4215 to PTRACE_TYPE_ARG3.
4216 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4217 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4219 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4220 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4222 2013-07-27 Jie Zhang <jie@codesourcery.com>
4223 Daniel Jacobowitz <dan@codesourcery.com>
4224 Yao Qi <yao@codesourcery.com>
4226 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4227 (mips-linux-watch.o): New rule.
4228 (mips_linux_watch_h): New variable.
4229 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4231 * linux-mips-low.c: Include mips-linux-watch.h.
4232 (struct arch_process_info, struct arch_lwp_info): New.
4233 (update_watch_registers_callback): New function.
4234 (mips_linux_new_process, mips_linux_new_thread) New functions.
4235 (mips_linux_prepare_to_resume, mips_insert_point): New
4237 (mips_remove_point, mips_stopped_by_watchpoint): New
4239 (rsp_bp_type_to_target_hw_bp_type): New function.
4240 (mips_stopped_data_address): New function.
4241 (the_low_target): Add watchpoint support functions.
4243 2013-07-27 Yao Qi <yao@codesourcery.com>
4245 * i386-low.c: Include break-common.h.
4246 (enum target_hw_bp_type): Remove.
4248 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4250 * Makefile.in (SFILES): /common/target-common.c.
4251 (OBS): Add target-common.o.
4252 (server_h): Add $(srcdir)/../common/target-common.h.
4253 (target-common.o): New target.
4254 * server.c (queue_stop_reply_callback): Free
4255 status string after use.
4256 * target.c (target_waitstatus_to_string): Remove.
4257 * target.h: Include target-common.h.
4258 (resume_kind): Likewise.
4259 (target_waitkind): Likewise.
4260 (target_waitstatus): Likewise.
4261 (TARGET_WNOHANG): Likewise.
4263 2013-07-04 Yao Qi <yao@codesourcery.com>
4265 * Makefile.in (host_alias): Use @host_noncanonical@.
4266 (target_alias): Use @target_noncanonical@.
4267 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4268 ACX_NONCANONICAL_HOST.
4269 * configure: Regenerated.
4272 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4274 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4275 * configure: Rebuild.
4276 * Makefile.in (version_host, version_target): Get from configure.
4277 (version.c): Use $(version_host) and $(version_target).
4279 2013-07-03 Pedro Alves <palves@redhat.com>
4281 * Makefile.in (config.status): Depend on development.sh.
4282 * acinclude.m4: Include libmcheck.m4.
4283 * configure: Regenerate.
4285 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4287 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4288 attribute inside the parentheses.
4289 (winapi_DebugSetProcessKillOnExit): Ditto.
4290 (winapi_DebugBreakProcess): Ditto.
4291 (winapi_GenerateConsoleCtrlEvent): Ditto.
4293 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4295 * notif.h (notif_event): Add a dummy member to avoid compiler
4298 2013-07-01 Pedro Alves <palves@redhat.com>
4300 * hostio.c (HOSTIO_PATH_MAX): Define.
4301 (require_filename, handle_open, handle_unlink, handle_readlink):
4304 2013-07-01 Pedro Alves <palves@redhat.com>
4306 * server.h: Include "pathmax.h".
4307 * linux-low.c: Don't include sys/param.h.
4308 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4310 * win32-low.c: Don't include sys/param.h.
4311 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4313 2013-07-01 Pedro Alves <palves@redhat.com>
4315 * event-loop.c: Don't check HAVE_UNISTD_H before including
4317 * gdbreplay.c: Likewise.
4318 * remote-utils.c: Likewise.
4319 * server.c: Likewise.
4320 * configure.ac: Don't check for unistd.h.
4321 * configure: Regenerate.
4323 2013-06-28 Tom Tromey <tromey@redhat.com>
4325 * Makefile.in (version.c): Use version.in, not
4328 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4330 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4331 * configure: Rebuild.
4332 * Makefile.in (version_host, version_target): Get from configure.
4333 (version.c): Use $(version_host) and $(version_target).
4335 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4337 Fix trace-status to output user name without trailing colon.
4338 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4340 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4342 Fix trace-status to output proper start-time and stop-time.
4343 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4344 output start time and stop time in hex as gdb expects.
4346 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4348 * tracepoint.c (build_traceframe_info_xml): Output trace state
4349 variables present in the trace buffer.
4351 2013-06-24 Tom Tromey <tromey@redhat.com>
4353 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4355 (version.o): Remove.
4356 * gdbreplay.c: Include version.h.
4357 (version, host_name): Don't declare.
4358 * server.h: Include version.h.
4359 (version, host_name): Don't declare.
4361 2013-06-12 Pedro Alves <palves@redhat.com>
4363 * linux-x86-low.c (linux_is_elf64): Delete global.
4364 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4365 with local linux_pid_exe_is_elf_64_file use.
4367 2013-06-11 Pedro Alves <palves@redhat.com>
4369 * linux-low.c (regset_disabled, disable_regset): New functions.
4370 (regsets_fetch_inferior_registers)
4371 (regsets_store_inferior_registers): Use them.
4372 (initialize_regsets_info); Don't allocate the disabled_regsets
4374 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4377 2013-06-11 Pedro Alves <palves@redhat.com>
4379 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4382 2013-06-11 Pedro Alves <palves@redhat.com>
4384 * linux-x86-low.c (initialize_low_arch): Call
4385 init_registers_x32_avx_linux.
4387 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4389 Fix compatibility with Android Bionic.
4390 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4393 2013-06-07 Pedro Alves <palves@redhat.com>
4396 * Makefile.in (OBS): Add tdesc.o.
4397 (IPA_OBJS): Add tdesc-ipa.o.
4398 (tdesc-ipa.o): New rule.
4399 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4401 * linux-low.c (new_inferior): Delete.
4402 (disabled_regsets, num_regsets): Delete.
4403 (linux_add_process): Adjust to set the new per-process
4405 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4406 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4407 was a stop. When calling arch_setup, switch the current inferior
4408 to the thread that got an event.
4409 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4410 (regsets_fetch_inferior_registers)
4411 (regsets_store_inferior_registers): New regsets_info parameter.
4413 (linux_register_in_regsets): New regs_info parameter. Adjust to
4415 (register_addr, fetch_register, store_register): New usrregs_info
4416 parameter. Adjust to use it.
4417 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4418 parameter regs_info. Adjust to use it.
4419 (linux_fetch_registers): Get the current inferior's regs_info, and
4421 (linux_store_registers): Ditto.
4422 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4423 (initialize_low): Don't initialize the target_regsets here. Call
4424 initialize_low_arch.
4425 * linux-low.h (target_regsets): Delete declaration.
4426 (struct regsets_info): New.
4427 (struct usrregs_info): New.
4428 (struct regs_info): New.
4429 (struct process_info_private) <new_inferior>: New field.
4430 (struct linux_target_ops): Delete the num_regs, regmap, and
4431 regset_bitmap fields. New field regs_info.
4432 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4433 * i387-fp.c (num_xmm_registers): Delete.
4434 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4435 calls to new interface.
4436 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4437 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4438 Infer the number of xmm registers from the regcache's target
4440 * i387-fp.h (num_xmm_registers): Delete.
4441 * inferiors.c (add_thread): Don't install the thread's regcache
4443 * proc-service.c (gregset_info): Fetch the current inferior's
4444 regs_info. Adjust to use it.
4445 * regcache.c: Include tdesc.h.
4446 (register_bytes, reg_defs, num_registers)
4447 (gdbserver_expedite_regs): Delete.
4448 (get_thread_regcache): If the thread doesn't have a regcache yet,
4449 create one, instead of aborting gdbserver.
4450 (regcache_invalidate_one): Rename to ...
4451 (regcache_invalidate_thread): ... this.
4452 (regcache_invalidate_one): New.
4453 (regcache_invalidate): Only invalidate registers of the current
4455 (init_register_cache): Add target_desc parameter, and use it.
4456 (new_register_cache): Ditto. Assert the target description has a
4457 non zero registers_size.
4458 (regcache_cpy): Add assertions. Adjust.
4459 (realloc_register_cache, set_register_cache): Delete.
4460 (registers_to_string, registers_from_string): Adjust.
4461 (find_register_by_name, find_regno, find_register_by_number)
4462 (register_cache_size): Add target_desc parameter, and use it.
4463 (free_register_cache_thread, free_register_cache_thread_one)
4464 (regcache_release, register_cache_size): New.
4465 (register_size): Add target_desc parameter, and use it.
4466 (register_data, supply_register, supply_register_zeroed)
4467 (supply_regblock, supply_register_by_name, collect_register)
4468 (collect_register_as_string, collect_register_by_name): Adjust.
4469 * regcache.h (struct target_desc): Forward declare.
4470 (struct regcache) <tdesc>: New field.
4471 (init_register_cache, new_register_cache): Add target_desc
4473 (regcache_invalidate_thread): Declare.
4474 (regcache_invalidate_one): Delete declaration.
4475 (regcache_release): Declare.
4476 (find_register_by_number, register_cache_size, register_size)
4477 (find_regno): Add target_desc parameter.
4478 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4480 * remote-utils.c: Include tdesc.h.
4481 (outreg, prepare_resume_reply): Adjust.
4482 * server.c: Include tdesc.h.
4483 (gdbserver_xmltarget): Delete declaration.
4484 (get_features_xml, process_serial_event): Adjust.
4485 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4487 (struct process_info) <tdesc>: New field.
4488 (ipa_tdesc): Declare.
4489 * tdesc.c: New file.
4490 * tdesc.h: New file.
4491 * tracepoint.c: Include tdesc.h.
4492 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4493 (get_context_regcache): Adjust to pass ipa_tdesc down.
4494 (do_action_at_tracepoint): Adjust to get the register cache size
4495 from the context regcache's description.
4496 (traceframe_walk_blocks): Adjust to get the register cache size
4497 from the current trace frame's description.
4498 (traceframe_get_pc): Adjust to get current trace frame's
4499 description and pass it down.
4500 (gdb_collect): Adjust to get the register cache size from the
4502 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4503 (gdbserver_xmltarget): Delete.
4504 (initialize_low_tracepoint): Set the ipa's target description.
4505 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4506 (initialize_low_tracepoint): Set the ipa's target description.
4507 * linux-x86-low.c: Include tdesc.h.
4508 [__x86_64__] (is_64bit_tdesc): New.
4509 (ps_get_thread_area, x86_get_thread_area): Use it.
4510 (i386_cannot_store_register): Rename to ...
4511 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4512 (i386_cannot_fetch_register): Rename to ...
4513 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4514 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4516 (target_regsets): Rename to ...
4517 (x86_regsets): ... this.
4518 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4520 (x86_siginfo_fixup): Use is_64bit_tdesc.
4521 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4522 (tdesc_x32_avx_linux, tdesc_x32_linux)
4523 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4525 (x86_linux_update_xmltarget): Delete.
4526 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4527 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4528 (AMD64_LINUX_USER64_CS): New.
4529 (x86_linux_read_description): New, based on
4530 x86_linux_update_xmltarget.
4531 (same_process_callback): New.
4532 (x86_arch_setup_process_callback): New.
4533 (x86_linux_update_xmltarget): New.
4534 (x86_regsets_info): New.
4535 (amd64_linux_regs_info): New.
4536 (i386_linux_usrregs_info): New.
4537 (i386_linux_regs_info): New.
4538 (x86_linux_regs_info): New.
4539 (x86_arch_setup): Reimplement.
4540 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4541 (x86_emit_ops): Ditto.
4542 (the_low_target): Adjust. Install x86_linux_regs_info,
4543 x86_cannot_fetch_register, and x86_cannot_store_register.
4544 (initialize_low_arch): New.
4545 * linux-ia64-low.c (tdesc_ia64): Declare.
4546 (ia64_fetch_register): Adjust.
4547 (ia64_usrregs_info, regs_info): New globals.
4548 (ia64_regs_info): New function.
4549 (the_low_target): Adjust.
4550 (initialize_low_arch): New function.
4551 * linux-sparc-low.c (tdesc_sparc64): Declare.
4552 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4554 (sparc_arch_setup): New function.
4555 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4556 (the_low_target): Adjust.
4557 (initialize_low_arch): New function.
4558 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4559 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4560 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4561 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4562 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4563 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4564 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4565 (tdesc_powerpc_isa205_vsx64l): Declare.
4566 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4567 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4568 (ppc_set_pc, ppc_get_hwcap): Adjust.
4569 (ppc_usrregs_info): Forward declare.
4570 (!__powerpc64__) ppc_regmap_adjusted: New global.
4571 (ppc_arch_setup): Adjust to the current process'es target
4573 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4574 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4575 (ppc_store_evrregset): Adjust.
4576 (target_regsets): Rename to ...
4577 (ppc_regsets): ... this, and make static.
4578 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4579 (ppc_regs_info): New function.
4580 (the_low_target): Adjust.
4581 (initialize_low_arch): New function.
4582 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4583 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4584 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4585 (tdesc_s390x_linux64v2): Declare.
4586 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4587 (s390_fill_gregset, s390_store_last_break): Adjust.
4588 (target_regsets): Rename to ...
4589 (s390_regsets): ... this, and make static.
4590 (s390_get_pc, s390_set_pc): Adjust.
4591 (s390_get_hwcap): New target_desc parameter, and use it.
4592 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4593 (s390_arch_setup): Adjust to set the current process'es target
4594 description. Don't adjust the regmap.
4595 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4596 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4597 (regs_info_3264): New globals.
4598 (s390_regs_info): New function.
4599 (the_low_target): Adjust.
4600 (initialize_low_arch): New function.
4601 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4602 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4603 [__mips64] (init_registers_mips_linux)
4604 (init_registers_mips_dsp_linux): Delete defines.
4605 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4606 (have_dsp): New global.
4607 (mips_read_description): New, based on mips_arch_setup.
4608 (mips_arch_setup): Reimplement.
4609 (get_usrregs_info): New function.
4610 (mips_cannot_fetch_register, mips_cannot_store_register)
4611 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4612 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4613 (target_regsets): Rename to ...
4614 (mips_regsets): ... this, and make static.
4615 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4616 (dsp_regs_info, regs_info): New globals.
4617 (mips_regs_info): New function.
4618 (the_low_target): Adjust.
4619 (initialize_low_arch): New function.
4620 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4621 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4623 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4624 (arm_read_description): New, with bits factored from
4626 (arm_arch_setup): Reimplement.
4627 (target_regsets): Rename to ...
4628 (arm_regsets): ... this, and make static.
4629 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4630 (arm_regs_info): New function.
4631 (the_low_target): Adjust.
4632 (initialize_low_arch): New function.
4633 * linux-m68k-low.c (tdesc_m68k): Declare.
4634 (target_regsets): Rename to ...
4635 (m68k_regsets): ... this, and make static.
4636 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4637 (m68k_regs_info): New function.
4638 (m68k_arch_setup): New function.
4639 (the_low_target): Adjust.
4640 (initialize_low_arch): New function.
4641 * linux-sh-low.c (tdesc_sharch): Declare.
4642 (target_regsets): Rename to ...
4643 (sh_regsets): ... this, and make static.
4644 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4645 (sh_regs_info, sh_arch_setup): New functions.
4646 (the_low_target): Adjust.
4647 (initialize_low_arch): New function.
4648 * linux-bfin-low.c (tdesc_bfin): Declare.
4649 (bfin_arch_setup): New function.
4650 (bfin_usrregs_info, regs_info): New globals.
4651 (bfin_regs_info): New function.
4652 (the_low_target): Adjust.
4653 (initialize_low_arch): New function.
4654 * linux-cris-low.c (tdesc_cris): Declare.
4655 (cris_arch_setup): New function.
4656 (cris_usrregs_info, regs_info): New globals.
4657 (cris_regs_info): New function.
4658 (the_low_target): Adjust.
4659 (initialize_low_arch): New function.
4660 * linux-cris-low.c (tdesc_crisv32): Declare.
4661 (cris_arch_setup): New function.
4662 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4663 (cris_regs_info): New function.
4664 (the_low_target): Adjust.
4665 (initialize_low_arch): New function.
4666 * linux-m32r-low.c (tdesc_m32r): Declare.
4667 (m32r_arch_setup): New function.
4668 (m32r_usrregs_info, regs_info): New globals.
4669 (m32r_regs_info): Adjust.
4670 (initialize_low_arch): New function.
4671 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4672 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4673 (tic6x_usrregs_info): Forward declare.
4674 (tic6x_read_description): New function, based on ...
4675 (tic6x_arch_setup): ... this. Reimplement.
4676 (target_regsets): Rename to ...
4677 (tic6x_regsets): ... this, and make static.
4678 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4679 (tic6x_regs_info): New function.
4680 (the_low_target): Adjust.
4681 (initialize_low_arch): New function.
4682 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4683 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4684 (target_regsets): Rename to ...
4685 (xtensa_regsets): ... this, and make static.
4686 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4688 (xtensa_arch_setup, xtensa_regs_info): New functions.
4689 (the_low_target): Adjust.
4690 (initialize_low_arch): New function.
4691 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4692 (nios2_arch_setup): Set the current process'es tdesc.
4693 (target_regsets): Rename to ...
4694 (nios2_regsets): ... this.
4695 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4696 (nios2_regs_info): New function.
4697 (the_low_target): Adjust.
4698 (initialize_low_arch): New function.
4699 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4700 (aarch64_arch_setup): Set the current process'es tdesc.
4701 (target_regsets): Rename to ...
4702 (aarch64_regsets): ... this.
4703 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4704 (aarch64_regs_info): New function.
4705 (the_low_target): Adjust.
4706 (initialize_low_arch): New function.
4707 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4709 (target_regsets): Rename to ...
4710 (tile_regsets): ... this.
4711 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4712 (tile_regs_info): New function.
4713 (tile_arch_setup): Set the current process'es tdesc.
4714 (the_low_target): Adjust.
4715 (initialize_low_arch): New function.
4716 * spu-low.c (tdesc_spu): Declare.
4717 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4718 * win32-arm-low.c (tdesc_arm): Declare.
4719 (arm_arch_setup): New function.
4720 (the_low_target): Install arm_arch_setup instead of
4722 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4723 (init_windows_x86): Rename to ...
4724 (i386_arch_setup): ... this. Set `win32_tdesc'.
4725 (the_low_target): Adjust.
4726 * win32-low.c (win32_tdesc): New global.
4727 (child_add_thread): Don't create the thread cache here.
4728 (do_initial_child_stuff): Set the new process'es tdesc.
4729 * win32-low.h (struct target_desc): Forward declare.
4730 (win32_tdesc): Declare.
4731 * lynx-i386-low.c (tdesc_i386): Declare global.
4732 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4733 * lynx-low.c (lynx_tdesc): New global.
4734 (lynx_add_process): Set the new process'es tdesc.
4735 * lynx-low.h (struct target_desc): Forward declare.
4736 (lynx_tdesc): Declare global.
4737 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4738 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4739 * nto-low.c (nto_tdesc): New global.
4740 (do_attach): Set the new process'es tdesc.
4741 * nto-low.h (struct target_desc): Forward declare.
4742 (nto_tdesc): Declare.
4743 * nto-x86-low.c (tdesc_i386): Declare.
4744 (nto_x86_arch_setup): Set `nto_tdesc'.
4746 2013-06-04 Gary Benson <gbenson@redhat.com>
4748 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4749 to qSupported response when appropriate.
4750 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4751 with nonzero-length annex.
4752 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4753 arguments supplied in annex.
4755 2013-05-31 Doug Evans <dje@google.com>
4758 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4759 64 bits in 64-cross-32 environment.
4761 2013-05-28 Pedro Alves <palves@redhat.com>
4763 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4764 (aarch64-without-fpu.c): Delete rule.
4765 * configure.srv (aarch64*-*-linux*): Remove references to
4766 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4767 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4770 2013-05-24 Pedro Alves <palves@redhat.com>
4772 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4773 instead of strchr/decode_address. Error if the range isn't split
4774 with a ','. Don't assume there's be a ':' in the action.
4776 2013-05-23 Yao Qi <yao@codesourcery.com>
4777 Pedro Alves <palves@redhat.com>
4779 * linux-low.c (lwp_in_step_range): New function.
4780 (linux_wait_1): If the thread was range stepping and stopped
4781 outside the stepping range, report the stop to GDB. Otherwise,
4782 continue stepping. Add range stepping debug output.
4783 (linux_set_resume_request): Copy the step range from the resume
4785 (linux_supports_range_stepping): New.
4786 (linux_target_ops) <supports_range_stepping>: Set to
4787 linux_supports_range_stepping.
4788 * linux-low.h (struct linux_target_ops)
4789 <supports_range_stepping>: New field.
4790 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4791 * linux-x86-low.c (x86_supports_range_stepping): New.
4792 (the_low_target) <supports_range_stepping>: Set to
4793 x86_supports_range_stepping.
4794 * server.c (handle_v_cont): Handle 'r' action.
4795 (handle_v_requests): Append ";r" if the target supports range
4797 * target.h (struct thread_resume) <step_range_start,
4798 step_range_end>: New fields.
4799 (struct target_ops) <supports_range_stepping>:
4801 (target_supports_range_stepping): New macro.
4803 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4805 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4806 confusion in comment.
4808 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4810 * lynx-low.c (struct process_info_private): New type.
4811 (lynx_add_process): New function.
4812 (lynx_create_inferior, lynx_attach): Replace calls to
4813 add_process by calls to lynx_add_process.
4814 (lynx_resume): If PTID is null, then try using
4815 current_process()->private->last_wait_event_ptid.
4817 (lynx_clear_inferiors): Delete. The contents of that function
4818 has been inlined in lynx_mourn;
4819 (lynx_wait_1): Save the ptid in the process's private data.
4820 (lynx_mourn): Free the process' private data. Replace call
4821 to lynx_clear_inferiors by call to clear_inferiors.
4823 2013-05-17 Yao Qi <yao@codesourcery.com>
4825 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4828 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4830 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4831 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4832 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4833 PT_TEXT_END_ADDR guards. Update comments.
4834 (linux_target_op) <read_offsets>: Conditionally define to
4835 linux_read_offsets if the target is UCLIBC and if it defines
4836 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4838 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4839 Andrew Jenner <andrew@codesourcery.com>
4841 * Makefile.in (SFILES): Add linux-nios2-low.c.
4842 (clean): Add action to delete nios2-linux.c.
4843 (nios2-linux.c): New rule.
4844 * configure.srv: Add nios2*-*-linux*.
4845 * linux-nios2-low.c: New.
4847 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4849 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4851 2013-04-25 Hui Zhu <hui@codesourcery.com>
4854 * ax.c (ax_printf): Add fflush.
4856 2013-04-22 Tom Tromey <tromey@redhat.com>
4858 * Makefile.in (SFILES): Add filestuff.c.
4859 (OBS): Add filestuff.o.
4860 (filestuff.o): New target.
4861 * config.in, configure: Rebuild.
4862 * configure.ac: Check for fdwalk, pipe2.
4864 2013-04-17 Pedro Alves <palves@redhat.com>
4866 * configure.ac (USE_THREAD_DB): Delete variable.
4867 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4868 Don't AC_SUBST USE_THREAD_DB.
4869 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4870 * config.in, configure: Regenerate.
4872 2013-04-16 Pedro Alves <palves@redhat.com>
4874 * linux-low.h (struct lwp_info) <thread_known>: Move under
4875 the USE_THREAD_DB #ifdef.
4877 2013-04-16 Pedro Alves <palves@redhat.com>
4879 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4880 (linux-low.o): Delete rule.
4881 * linux-low.h: Always include "gdb_thread_db.h" instead of
4882 conditionally including thread_db.h.
4883 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4886 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4888 * Makefile.in (install-only): Fix make install regression.
4890 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4892 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4893 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4895 * gdbserver.1: Remove.
4897 2013-03-22 Pedro Alves <palves@redhat.com>
4899 * linux-low.c (handle_extended_wait): Don't call
4900 linux_enable_event_reporting.
4902 2013-03-15 Tony Theodore <tonyt@logyst.com>
4905 * Makefile.in (SHELL): Use @SHELL@.
4907 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4909 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4912 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4914 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4915 Remove extraneous NULL element.
4917 2013-03-13 Yao Qi <yao@codesourcery.com>
4919 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4920 'V' block in trace frame.
4922 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4924 * target.h (struct target_ops): Add btrace ops.
4925 (target_supports_btrace): New macro.
4926 (target_enable_btrace): New macro.
4927 (target_disable_btrace): New macro.
4928 (target_read_btrace): New macro.
4929 * gdbthread.h (struct thread_info): Add btrace field.
4930 * server.c: Include btrace-common.h.
4931 (handle_btrace_general_set): New function.
4932 (handle_btrace_enable): New function.
4933 (handle_btrace_disable): New function.
4934 (handle_general_set): Call handle_btrace_general_set.
4935 (handle_qxfer_btrace): New function.
4936 (struct qxfer qxfer_packets[]): Add btrace entry.
4937 * inferiors.c (remove_thread): Disable btrace.
4938 * linux-low: Include linux-btrace.h.
4939 (linux_low_enable_btrace): New function.
4940 (linux_low_read_btrace): New function.
4941 (linux_target_ops): Add btrace ops.
4942 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4943 Add srv_linux_btrace=yes.
4944 (x86_64-*-linux*): Add linux-btrace.o.
4945 Add srv_linux_btrace=yes.
4946 * configure.ac: Define HAVE_LINUX_BTRACE.
4947 * config.in: Regenerated.
4948 * configure: Regenerated.
4950 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4952 * server.c (handle_qxfer): Preserve error message if -3 is
4954 (qxfer): Document the -3 return value.
4956 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4958 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4959 (linux_btrace_h): New variable.
4960 (linux-btrace.o): New rule.
4962 2013-03-08 Stan Shebs <stan@codesourcery.com>
4963 Hafiz Abid Qadeer <abidh@codesourcery.com>
4965 * tracepoint.c (trace_buffer_size): New global.
4966 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4967 (init_trace_buffer): Change to one-argument function. Allocate
4968 trace buffer memory.
4969 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4970 handle QTBuffer:size packet.
4971 (cmd_bigqtbuffer_size): New function.
4972 (initialize_tracepoint): Call init_trace_buffer with
4973 DEFAULT_TRACE_BUFFER_SIZE.
4974 * server.c (handle_query): Add QTBuffer:size in the
4977 2013-03-07 Yao Qi <yao@codesourcery.com>
4979 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4980 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4982 (cmd_qtsp): Adjust condition. Do post increment.
4983 Set cur_action and cur_step_action back to 0.
4985 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4988 * linux-low.c (linux_write_memory): Return early success if LEN is
4991 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4993 * configure.srv: Add x86_64-*-cygwin* as target.
4995 2013-02-28 Tom Tromey <tromey@redhat.com>
4997 * configure.ac: Invoke AC_SYS_LARGEFILE.
4998 * configure, config.in: Rebuild.
5000 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5002 * win32-low.c: Throughout, fix format strings and casts of
5003 printf-like functions to avoid type related warnings on all
5005 (get_child_debug_event): Print dwDebugEventCode as hex since
5006 that's how it's usually documented.
5008 2013-02-28 Yao Qi <yao@codesourcery.com>
5010 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5013 2013-02-27 Jiong Wang <jiwang@tilera.com>
5015 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5016 (reg-tilegx32.c): New rule.
5017 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5018 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5019 different register info initializer according to elf class.
5020 (init_registers_tilgx32): New function. The tilegx32 register info
5022 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5023 (tile_store_gregset): Likewise.
5025 2013-02-27 Yao Qi <yao@codesourcery.com>
5027 * server.c (process_point_options): Print debug message when
5028 debug_threads is true.
5030 2013-02-26 Yao Qi <yao@codesourcery.com>
5032 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5034 2013-02-19 Pedro Alves <palves@redhat.com>
5035 Kai Tietz <ktietz@redhat.com>
5039 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5040 instead of strtoul to extract address from packet.
5041 (process_serial_event) <'z'>: Likewise.
5043 2013-02-18 Yao Qi <yao@codesourcery.com>
5045 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5047 2013-02-14 Pedro Alves <palves@redhat.com>
5051 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5052 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5054 2013-02-14 Pedro Alves <palves@redhat.com>
5056 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5058 2013-02-14 Pedro Alves <palves@redhat.com>
5060 * tracepoint.c (save_string): Delete.
5061 (add_tracepoint_action): Use savestring instead of save_string.
5063 2013-02-12 Pedro Alves <palves@redhat.com>
5065 * linux-xtensa-low.c: Ditto.
5066 * xtensa-xtregs.c: Ditto.
5068 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5070 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5073 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5075 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5076 aarch64_num_wp_regs and aarch64_num_bp_regs to
5077 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5079 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5081 * linux-aarch64-low.c (ps_get_thread_area): Replace
5082 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5084 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5085 Marcus Shawcroft <marcus.shawcroft@arm.com>
5086 Nigel Stephens <nigel.stephens@arm.com>
5087 Yufeng Zhang <yufeng.zhang@arm.com>
5089 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5090 (aarch64.c, aarch64-without-fpu.c): New targets.
5091 * configure.srv (aarch64*-*-linux*): New.
5092 * linux-aarch64-low.c: New file.
5094 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5096 * linux-low.c (handle_extended_wait, linux_create_inferior)
5097 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5098 (dequeue_one_deferred_signal, linux_resume_one_thread)
5099 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5100 (linux_tracefork_grandchild, linux_test_for_tracefork)
5101 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5102 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5103 where the argument is 0.
5105 2013-01-25 Yao Qi <yao@codesourcery.com>
5107 * event-loop.c: Include "queue.h".
5108 (gdb_event_p): New typedef.
5109 (struct gdb_event) <next_event>: Remove.
5110 (event_queue): Change to QUEUE(gdb_event_p).
5111 (async_queue_event): Remove.
5112 (gdb_event_xfree): New.
5113 (initialize_event_loop): New.
5114 (process_event): Use API from QUEUE.
5115 (wait_for_event): Likewise.
5116 * server.c (main): Call initialize_event_loop.
5117 * server.h (initialize_event_loop): Declare.
5119 2013-01-18 Yao Qi <yao@codesourcery.com>
5121 * ax.h (struct eval_agent_expr_context): New.
5122 (gdb_eval_agent_expr): Update declaration.
5123 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5124 TFRAME. Add new argument CTX.
5125 * server.h (struct eval_agent_expr_context): Declare.
5126 (agent_mem_read, agent_tsv_read): Update declaration.
5127 (agent_mem_read_string): Likewise.
5128 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5129 (add_traceframe_block): Add new argument TPOINT.
5130 Increase TPOINT->traceframe_usage.
5131 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5132 eval_tracepoint_agent_expr.
5133 (condition_true_at_tracepoint): Likewise.
5134 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5135 (agent_mem_read_string, agent_tsv_read): Likewise.
5137 2013-01-16 Yao Qi <yao@codesourcery.com>
5139 * linux-low.c (linux_resume_one_lwp): Don't check
5140 'lwp->bp_reinsert != 0'.
5142 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5143 Pedro Alves <palves@redhat.com>
5145 * lynx-low.c (ptrace_request_to_str): Define a temporary
5146 macro and use it to simplify this function's implementation.
5148 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5150 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5153 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5155 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5157 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5159 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5161 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5163 * lynx-low.c (lynx_resume): Use the resume_info parameter
5164 to determine the ptid for the lynx_ptrace call, unless
5165 it is equal to minus_one_ptid, in which case we use the
5166 ptid of the current_inferior.
5167 (lynx_wait_1): After having received a thread create/exit
5168 event, resume the inferior's execution using the signaling
5169 thread's ptid, rather than the old ptid.
5171 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5173 * lynx-low.c (lynx_resume): Delete variable ret.
5175 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5177 * gdbreplay.c (gdbreplay_version): Update copyright year.
5178 * server.c (gdbserver_version): Likewise.
5180 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5182 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5185 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5187 * lynx-low.c (ptrace_request_to_str): Add handling for
5190 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5192 * lynx-low.c (lynx_attach): Delete variable new_process.
5194 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5196 * lynx-low.c (lynx_create_inferior): Delete variable
5199 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5201 * lynx-low.c (ptrace_request_to_str): Do not handle
5202 PTRACE_GETTHREADLIST if this macro does not exist.
5204 2012-12-15 Yao Qi <yao@codesourcery.com>
5206 * Makefile.in (OBS): Add notif.o.
5207 * notif.c, notif.h: New.
5208 * server.c: Include "notif.h".
5209 (struct vstop_notif) <next>: Remove.
5211 (queue_stop_reply): Update.
5212 (push_event, send_next_stop_reply): Remove.
5213 (discard_queued_stop_replies): Update.
5214 (notif_stop): New variable.
5215 (handle_v_stopped): Remove.
5216 (handle_v_requests): Don't call handle_v_stopped. Call
5217 handle_ack_notif instead.
5218 (queue_stop_reply_callback): Call notif_event_enque instead
5219 of queue_stop_reply.
5220 (handle_status): Don't call send_next_stop_reply, call
5221 notif_write_event instead.
5222 (kill_inferior_callback): Likewise.
5223 (detach_or_kill_inferior_callback): Likewise.
5224 (main): Call initialize_notif.
5225 (process_serial_event): Call QUEUE_is_empty.
5226 (handle_target_event): Call notif_push instead of push event.
5227 * server.h (push_event): Remove declaration.
5229 2012-12-10 Tom Tromey <tromey@redhat.com>
5231 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5232 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5235 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5236 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5237 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5238 (amd64-linux-ipa.o, ax.o): Rewrite.
5239 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5240 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5241 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5242 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5243 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5244 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5245 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5246 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5247 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5248 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5249 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5250 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5251 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5252 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5253 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5254 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5255 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5256 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5257 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5258 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5259 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5260 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5261 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5262 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5263 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5264 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5265 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5266 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5267 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5268 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5269 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5270 (reg-tilegx.o): Remove.
5271 (all_object_files): New macro.
5272 Include .deps files.
5273 * aclocal.m4, configure: Rebuild.
5274 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5275 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5276 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5278 2012-12-05 Tom Tromey <tromey@redhat.com>
5281 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5283 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5285 * configure.ac: Check for linux/perf_event.h.
5286 * config.in: Regenerated.
5287 * configure: Regenerated.
5289 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5291 * hostio.c (handle_readlink): Decrease buffer size
5292 parameter passed to readlink by one byte.
5294 2012-11-26 Yao Qi <yao@codesourcery.com>
5296 * configure.ac (build_warnings): Append '-Wempty-body'.
5297 * configure: Regenerated.
5298 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5301 2012-11-15 Pierre Muller <muller@sourceware.org>
5303 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5304 * config.in: Regenerate.
5305 * configure: Regenerate.
5306 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5307 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5308 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5309 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5311 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5312 instead of <sys/wait.h> header.
5313 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5315 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5317 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5318 (various make rules): Remove -DGDBSERVER
5320 2012-11-09 Yao Qi <yao@codesourcery.com>
5322 * spu-low.c (current_ptid): Move it to ..
5323 * gdbthread.h: ... here. New.
5324 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5325 * server.c (myresume, process_serial_event): Likewise.
5326 * thread-db.c (thread_db_find_new_threads): Likewise.
5327 * tracepoint.c (run_inferior_command): Likewise.
5329 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5331 * server.c (handle_search_memory_1): Include access length in
5334 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5336 * linux-crisv32-low.c: Fix compile errors.
5338 2012-09-04 Yao Qi <yao@codesourcery.com>
5340 * tracepoint.c (cmd_qtsv): Adjust debug message.
5341 Don't check CUR_TPOINT.
5343 2012-08-28 Yao Qi <yao@codesourcery.com>
5345 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5346 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5347 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5348 Remove declarations of xmalloc, xreallloc, xstrdup and
5350 * Makefile.in (libiberty_h): New.
5351 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5352 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5354 2012-08-23 Yao Qi <yao@codesourcery.com>
5356 * server.h: Remove declaration of 'xsnprintf'.
5358 2012-08-22 Keith Seitz <keiths@redhat.com>
5360 * server.h: Include build-gnulib-gbserver/config.h.
5361 * gdbreplay.c: Likewise.
5363 2012-08-08 Doug Evans <dje@google.com>
5365 * Makefile.in (SFILES): Add gdb_vecs.c.
5366 (OBS): Add gdb_vecs.o.
5367 (gdb_vecs_h, host_defs_h): New variables.
5368 (thread-db.o): Add $(gdb_vecs_h) dependency.
5369 (gdb_vecs.o): New rule.
5370 * thread-db.c: #include "gdb_vecs.h".
5371 (thread_db_load_search): Use a vector to iterate over path elements.
5372 Handle text appearing after "$pdir".
5374 * configure.ac: Add check for strstr.
5375 * config.in: Regenerate.
5376 * configure: Regenerate.
5378 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5380 * hostio.c (handle_pread): If pread fails, fall back to attempting
5382 (handle_pwrite): Likewise for pwrite.
5384 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5386 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5387 between unsupported TYPE and unimplementable ADDR/LEN combination.
5388 (arm_insert_point): Act on new return value.
5390 2012-07-31 Pedro Alves <palves@redhat.com>
5392 * server.c (process_point_options): Only skip tokens if we find
5393 one that is unrecognized. Don't treat 'X' specially while
5394 skipping unrecognized tokens.
5396 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5398 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5399 to 4-byte-align HW breakpoint addresses for Thumb.
5401 2012-07-27 Yao Qi <yao@codesourcery.com>
5405 * server.h: Declare gdb_agent_about_to_close.
5406 * target.c (kill_inferior): Include "agent.h".
5407 New. Send command 'kill'.
5408 * target.h (kill_inferior): Removed macro.
5409 * tracepoint.c (gdb_agent_about_to_close): New.
5410 (gdb_agent_helper_thread): Handle command 'close'.
5411 Wait endlessly until the inferior stops.
5412 Install gdb_agent_remove_socket to atexit hook.
5413 (agent_socket_name): New static variable.
5414 (gdb_agent_socket_init): Replace local variable 'name' with
5415 'agent_socket_name'.
5416 (gdb_agent_remove_socket): New.
5418 2012-07-27 Yao Qi <yao@codesourcery.com>
5420 * server.c (process_point_options): Stop at 'X' when parsing.
5422 2012-07-19 Michael Eager <eager@eagercon.com>
5424 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5426 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5427 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5428 hardware breakpoint.
5430 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5432 * gdbserver/linux-low.c (initialize_low): Call
5433 linux_ptrace_init_warnings.
5435 2012-07-02 Doug Evans <dje@google.com>
5437 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5440 2012-07-02 Stan Shebs <stan@codesourcery.com>
5442 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5443 (ax.o): Add it to build rule.
5445 (OBS): Add format.o.
5446 (IPA_OBS): Add format.o.
5447 * server.c (handle_query): Claim support for breakpoint commands.
5448 (process_point_options): Add command case.
5449 (process_serial_event): Leave running if there are printfs in
5451 * mem-break.h (any_persistent_commands): Declare.
5452 (add_breakpoint_commands): Declare.
5453 (gdb_no_commands_at_breakpoint): Declare.
5454 (run_breakpoint_commands): Declare.
5455 * mem-break.c (struct point_command_list): New struct.
5456 (struct breakpoint): New field command_list.
5457 (any_persistent_commands): New function.
5458 (add_commands_to_breakpoint): New function.
5459 (add_breakpoint_commands): New function.
5460 (gdb_no_commands_at_breakpoint): New function.
5461 (run_breakpoint_commands): New function.
5462 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5464 * ax.c: Include format.h.
5465 (ax_printf): New function.
5466 (gdb_eval_agent_expr): Add printf opcode.
5468 2012-06-13 Yao Qi <yao@codesourcery.com>
5470 * server.c (start_inferior): Remove duplicated writes to fields
5471 'last_resume_kind' and 'last_status' of 'current_inferior'.
5473 2012-06-12 Yao Qi <yao@codesourcery.com>
5474 Pedro Alves <palves@redhat.com>
5476 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5478 * server.c (handle_v_cont): Extend comment.
5480 2012-06-11 Yao Qi <yao@codesourcery.com>
5482 * linux-low.c (linux_attach): Add 'static'.
5484 2012-06-06 Yao Qi <yao@codesourcery.com>
5486 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5488 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5490 Fix gcc -flto compilation warning.
5491 * server.c (main): Make variable multi_mode and attach volatile.
5493 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5495 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5496 if the platform doesn't know about it.
5498 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5500 * Makefile.in (SFILES): Add linux-tile-low.c.
5501 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5502 * configure.srv: Handle tilegx-*-linux*.
5503 * linux-tile-low.c: New file.
5505 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5507 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5509 2012-05-24 Pedro Alves <palves@redhat.com>
5513 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5515 2012-05-24 Pedro Alves <palves@redhat.com>
5519 Replace target_signal with gdb_signal throughout.
5521 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5523 * linux-low.c (linux_store_registers): Avoid the copying sequence
5524 when no data has been retrieved by ptrace.
5526 2012-05-22 Will Deacon <will.deacon@arm.com>
5528 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5529 Include asm/ptrace.h.
5530 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5533 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5535 * linux-low.c (linux_store_registers): Don't re-retrieve data
5536 with ptrace that has already been obtained from /proc. Always
5537 copy any data retrieved with ptrace to the buffer supplied.
5539 2012-05-11 Yao Qi <yao@codesourcery.com>
5540 Pedro Alves <palves@redhat.com>
5542 * linux-low.c (enum stopping_threads_kind): New.
5543 (stopping_threads): Change type to `enum stopping_threads_kind'.
5544 (handle_extended_wait): If stopping and suspending threads, leave
5545 the new_lwp suspended too.
5546 (linux_wait_for_event): Adjust.
5547 (stop_all_lwps): Set `stopping_threads' to
5548 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5549 whether we're suspending threads or just stopping them. Assert no
5552 2012-04-29 Yao Qi <yao@codesourcery.com>
5554 * server.h: Move some code to ...
5555 * gdbthread.h: ... here. New.
5556 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5557 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5558 (nto-low.o, win32-low.o): Likewise.
5559 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5560 * regcache.c, remote-utils.c, server.c: Likewise.
5561 * target.c, tracepoint.c, win32-low.c: Likewise.
5563 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5565 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5566 (PTRACE_ARG4_TYPE): Likewise.
5567 (PTRACE_XFER_TYPE): Likewise.
5568 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5569 ptrace to PTRACE_ARG3_TYPE.
5570 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5571 (PTRACE_ARG4_TYPE): Likewise.
5572 (PTRACE_XFER_TYPE): Likewise.
5573 (linux_detach_one_lwp): Cast fourth argument of
5574 ptrace to long then PTRACE_ARG4_TYPE.
5575 (regsets_fetch_inferior_registers): Cast third argument of
5576 ptrace to long then PTRACE_ARG3_TYPE.
5577 (regsets_store_inferior_registers): Likewise.
5579 2012-04-20 Pedro Alves <palves@redhat.com>
5581 * configure: Regenerate.
5583 2012-04-19 Pedro Alves <palves@redhat.com>
5585 * Makefile.in (GNULIB_BUILDDIR): New.
5586 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5587 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5588 (all, install-only, uninstall, clean-info, all-lib, clean): No
5589 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5590 (maintainer-clean realclean distclean): Use subdir_do.
5592 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5593 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5594 * acinclude.m4: Include acx_configure_dir.m4.
5595 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5596 calls. Call AC_PROG_RANLIB. Configure gnulib using
5599 (GNULIB_STDINT_H): Adjust.
5600 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5601 * gdbreplay.c: Include build-gnulib/config.h.
5602 * server.h: Likewise.
5603 * aclocal.m4: Regenerate.
5604 * config.in: Regenerate.
5605 * configure: Regenerate.
5607 2012-04-19 Pedro Alves <palves@redhat.com>
5609 * Makefile.in (LIBGNU, INCGNU): Adjust.
5610 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5611 (all, install-only, uninstall, clean-info, all-lib, clean)
5612 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5613 * configure.ac: Adjust AC_OUTPUT output.
5614 * aclocal.m4: Regenerate.
5615 * configure: Regenerate.
5617 2012-04-19 Pedro Alves <palves@redhat.com>
5619 * Makefile.in (generated_files): New.
5620 (server_h): Remove the explicit dependency on config.h, and depend
5621 on $generated_files.
5623 2012-04-19 Pedro Alves <palves@redhat.com>
5625 * Makefile.in (INCGNU): Add -Ignulib.
5627 2012-04-19 Pedro Alves <palves@redhat.com>
5629 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5630 (INCGNU): ... this, and spell out -I here.
5631 (GNULIB_LIB): Rename to ...
5633 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5635 2012-04-19 Pedro Alves <palves@redhat.com>
5637 * config.in: Regenerate.
5639 2012-04-19 Pedro Alves <palves@redhat.com>
5641 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5642 * server.h (memmem): Remove declaration.
5643 * config.in: Regenerate.
5644 * configure: Regenerate.
5646 2012-04-19 Yao Qi <yao@codesourcery.com>
5648 * Makefile.in (SFILES): Add common/vec.c.
5652 2012-04-19 Yao Qi <yao@codesourcery.com>
5654 * remote-utils.c (prepare_resume_reply): Replace with macro
5655 target_core_of_thread.
5656 * server.c (handle_qxfer_threads_proper): Likewise.
5657 * target.h (traget_core_of_thread): New macro.
5659 2012-04-18 Pedro Alves <palves@redhat.com>
5661 * aclocal.m4: Regenerate.
5662 * configure: Regenerate.
5664 2012-04-16 Yao Qi <yao@codesourcery.com>
5666 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5667 duplicated on address.
5669 2012-04-16 Yao Qi <yao@codesourcery.com>
5671 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5672 (struct tracepoint_action_ops) <send>: New field.
5673 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5674 (agent_expr_send, x_tracepoint_action_send): New.
5675 (l_tracepoint_action_send): New.
5676 (cmd_qtdp): Download and install tracepoint
5677 according to `use_agent'.
5678 (run_inferior_command): Add one more parameter `len'.
5680 (tracepoint_send_agent): New.
5681 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5683 2012-04-16 Yao Qi <yao@codesourcery.com>
5685 * tracepoint.c (download_tracepoints): Moved to ...
5686 (cmd_qtstart): ... here.
5688 2012-04-14 Yao Qi <yao@codesourcery.com>
5690 * tracepoint.c: Include inttypes.h.
5691 (struct collect_memory_action): Use sized types.
5692 (struct tracepoint): Likewise.
5693 (cmd_qtdp, stop_tracing): Update print specifiers.
5694 (cmd_qtp, response_tracepoint): Likewise.
5695 (collect_data_at_tracepoint): Likewise.
5696 (collect_data_at_step): Likewise.
5698 2012-04-14 Yao Qi <yao@codesourcery.com>
5700 Import gnulib module inttypes.
5701 * aclocal.m4, config.in, configure: Regenerated.
5703 2012-04-14 Yao Qi <yao@codesourcery.com>
5705 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5706 Makefile and config.status at last.
5708 2012-04-13 Yao Qi <yao@codesourcery.com>
5710 * tracepoint.c: Include stdint.h unconditionally.
5712 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5714 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5715 on BFD_HAVE_SYS_PROCFS_TYPE.
5716 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5717 * configure: Regenerate.
5718 * config.in: Likewise.
5720 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5722 * Makefile.in (clean): Also remove x32.c x32-linux.c
5723 x32-avx.c x32-avx-linux.c.
5724 (x32.o): New target.
5726 (x32-linux.o): Likewise.
5727 (x32-linux.c): Likewise.
5728 (x32-avx.o): Likewise.
5729 (x32-avx.c): Likewise.
5730 (x32-avx-linux.o): Likewise.
5731 (x32-avx-linux.c): Likewise.
5733 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5734 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5735 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5736 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5737 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5738 i386/x32-avx-linux.xml.
5740 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5741 (init_registers_x32_avx_linux): Likwise.
5742 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5743 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5745 2012-04-13 Pedro Alves <palves@redhat.com>
5747 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5748 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5749 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5750 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5753 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5755 * linux-x86-low.c (compat_x32_clock_t): New.
5756 (compat_x32_siginfo_t): Likewise.
5757 (compat_x32_siginfo_from_siginfo): Likewise.
5758 (siginfo_from_compat_x32_siginfo): Likewise.
5759 (linux_is_elf64): Likewise.
5760 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5761 and siginfo_from_compat_x32_siginfo for x32.
5762 (x86_arch_setup): Set linux_is_elf64.
5764 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5767 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5769 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5770 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5771 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5772 compatible with process.
5774 2012-04-12 Yao Qi <yao@codesourcery.com>
5776 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5777 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5778 (install-only, install-info, clean): Handle sub dir gnulib.
5779 (all-lib, am--refresh): New targets.
5780 (memmem.o): Remove target.
5781 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5782 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5783 (AC_REPLACE_FUNCS): Remove memmem.
5784 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5785 (AC_OUTPUT): Generate Makefile in gnulib/.
5786 * aclocal.m4, config.in, configure: Regenerated.
5788 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5790 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5792 2012-04-05 Pedro Alves <palves@redhat.com>
5794 -Werror=strict-aliasing
5796 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5799 2012-04-04 Pedro Alves <palves@redhat.com>
5801 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5802 (sparc_store_gregset_from_stack, sparc_store_gregset)
5803 (sparc_breakpoint_at): Fix formatting.
5805 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5807 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5809 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5810 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5811 * config.in: Regenerate.
5812 * configure: Likewise.
5814 2012-03-29 Pedro Alves <palves@redhat.com>
5816 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5817 Correct ptrace arguments.
5819 2012-03-28 Pedro Alves <palves@redhat.com>
5821 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5822 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5823 (IA64_FR1_REGNUM): New defines.
5824 (ia64_fetch_register): New.
5825 (the_low_target): Install it.
5826 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5828 * linux-low.c (linux_fetch_registers): Try the
5829 the_low_target.fetch_register hook first.
5831 * linux-arm-low.c (the_low_target): Adjust.
5832 * linux-bfin-low.c (the_low_target): Adjust.
5833 * linux-cris-low.c (the_low_target): Adjust.
5834 * linux-crisv32-low.c (the_low_target): Adjust.
5835 * linux-m32r-low.c (the_low_target): Adjust.
5836 * linux-m68k-low.c (the_low_target): Adjust.
5837 * linux-mips-low.c (the_low_target): Adjust.
5838 * linux-ppc-low.c (the_low_target): Adjust.
5839 * linux-s390-low.c (the_low_target): Adjust.
5840 * linux-sh-low.c (the_low_target): Adjust.
5841 * linux-sparc-low.c (the_low_target): Adjust.
5842 * linux-tic6x-low.c (the_low_target): Adjust.
5843 * linux-x86-low.c (the_low_target): Adjust.
5844 * linux-xtensa-low.c (the_low_target): Adjust.
5846 2012-03-26 Pedro Alves <palves@redhat.com>
5848 * server.c (handle_qxfer_libraries): Don't bail early if
5849 the_target->qxfer_libraries_svr4 is not NULL.
5851 2012-03-26 Pedro Alves <palves@redhat.com>
5853 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5855 2012-03-23 Pedro Alves <palves@redhat.com>
5857 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5858 "library-list-svr4" element's start tag when the the DSO list is
5861 2012-03-23 Pedro Alves <palves@redhat.com>
5863 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5864 a variable whose type size is the same as the inferior's pointer
5867 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5869 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5871 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5872 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5873 * linux-low.h: Include <signal.h>.
5874 (struct siginfo): Remove forward declaration.
5875 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5878 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5880 * .gitignore: Ignore more files.
5882 2012-03-19 Pedro Alves <palves@redhat.com>
5883 Jan Kratochvil <jan.kratochvil@redhat.com>
5885 * server.c (cont_thread, general_thread): Add describing comments.
5886 (start_inferior): Clear `cont_thread'.
5887 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5890 2012-03-15 Yao Qi <yao@codesourcery.com>
5892 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5894 (cmd_qtdp): ... here.
5896 2012-03-15 Yao Qi <yao@codesourcery.com>
5898 * tracepoint.c (struct tracepoint_action_ops): New.
5899 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5900 (m_tracepoint_action_download): New.
5901 (r_tracepoint_action_download): New.
5902 (x_tracepoint_action_download): New.
5903 (l_tracepoint_action_download): New.
5904 (add_tracepoint_action): Install `action->ops' according type.
5905 (download_tracepoint_1): Move code `download' function pointer
5906 of various tracepoint_action_ops.
5908 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5910 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5911 linux_ptrace_attach_warnings.
5913 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5915 * Makefile.in (linux-ptrace.o): New.
5916 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5917 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5918 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5919 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5920 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5922 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5924 2012-03-08 Yao Qi <yao@codesourcery.com>
5925 Pedro Alves <palves@redhat.com>
5927 Fix PR server/13392.
5928 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5930 * tracepoint.c (remove_tracepoint): New.
5931 (cmd_qtdp): Call remove_tracepoint when failed to install.
5933 2012-03-07 Pedro Alves <palves@redhat.com>
5935 * linux-low.c (get_detach_signal): New.
5936 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5937 Pass on pending signals to PTRACE_DETACH. Check the result of the
5939 * server.c (program_signals, program_signals_p): New.
5940 (handle_general_set): Handle QProgramSignals.
5941 * server.h (program_signals, program_signals_p): Declare.
5943 2012-03-05 Pedro Alves <palves@redhat.com>
5944 Jan Kratochvil <jan.kratochvil@redhat.com>
5946 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5949 2012-03-03 Yao Qi <yao@codesourcery.com>
5951 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5952 agent_look_up_symbols.
5954 2012-03-03 Yao Qi <yao@codesourcery.com>
5956 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5957 (linux-x86-low.o): Likewise.
5958 * server.h: Remove in_process_agent_loaded.
5959 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5963 2012-03-03 Yao Qi <yao@codesourcery.com>
5965 * tracepoint.c (gdb_agent_capability): New global.
5966 (in_process_agent_loaded_ust): Renamed to
5967 `in_process_agent_supports_ust'.
5969 (in_process_agent_supports_ust): Call agent_capability_check.
5970 (clear_installed_tracepoints): Assert that agent supports
5973 2012-03-03 Yao Qi <yao@codesourcery.com>
5975 * linux-low.c (linux_supports_agent): New.
5976 (linux_target_ops): Initialize field `supports_agent' with
5977 linux_supports_agent.
5978 * target.h (struct target_ops) <supports_agent>: New.
5979 (target_supports_agent): New macro.
5980 * server.c (handle_general_set): Handle packet 'QAgent'.
5981 (handle_query): Send `QAgent+'.
5982 * Makefile.in (server.o): Depends on agent.h.
5984 2012-03-03 Yao Qi <yao@codesourcery.com>
5986 * Makefile.in (OBS): Add agent.o.
5987 Add new rule for agent.o.
5988 Track dependence of tracepoint.c on agent.h.
5989 * tracepoint.c (run_inferior_command_1):
5990 (run_inferior_command): Call agent_run_command.
5991 (gdb_ust_connect_sync_socket): Deleted. Move it to
5993 (resume_thread, stop_thread): Likewise.
5994 (gdb_ust_socket_init): Renamed to ...
5995 (gdb_agent_socket_init): ... New.
5996 (gdb_ust_thread): Renamed to ...
5997 (gdb_agent_helper_thread): ... New.
5998 (gdb_ust_init): Move some code to ...
5999 (gdb_agent_init): ... here. New.
6000 [HAVE_UST]: Call gdb_ust_init.
6001 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6002 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6003 * config.in, configure: Regenerated.
6005 2012-03-02 Pedro Alves <palves@redhat.com>
6007 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6008 * linux-low.c (struct simple_pid_list): New.
6009 (stopped_pids): New a struct simple_pid_list pointer.
6010 (add_to_pid_list, pull_pid_from_list): New.
6011 (handle_extended_wait): Don't assume the first signal new children
6012 report is SIGSTOP. Adjust call to pull_pid_from_list.
6013 (linux_wait_for_lwp): Adjust.
6015 2012-03-02 Yao Qi <yao@codesourcery.com>
6017 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6020 2012-03-02 Yao Qi <yao@codesourcery.com>
6022 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6023 `stop_pc' and `tpoint'. Update caller.
6025 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6027 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6028 * linux-low.c (use_linux_regsets): New macro.
6029 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6030 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6031 (linux_register_in_regsets): New function.
6032 (usr_fetch_inferior_registers): Skip registers covered by
6034 (usr_store_inferior_registers): Likewise.
6035 (usr_fetch_inferior_registers): New macro.
6036 (usr_store_inferior_registers): Likewise.
6037 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6038 (linux_store_registers): Likewise.
6039 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6041 (init_registers_mips64_dsp_linux): Likewise.
6042 (init_registers_mips_linux): New macro.
6043 (init_registers_mips_dsp_linux): Likewise.
6044 (mips_dsp_num_regs): Likewise.
6045 (DSP_BASE, DSP_CONTROL): New fallback macros.
6046 (mips_base_regs): New macro.
6047 (mips_regmap): Use it. Fix the size.
6048 (mips_dsp_regmap): New variable.
6049 (mips_dsp_regset_bitmap): Likewise.
6050 (mips_arch_setup): New function.
6051 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6053 (mips_cannot_store_register): Likewise.
6054 (the_low_target): Update .arch_setup, .num_regs and .regmap
6055 initializers. Add .regset_bitmap initializer.
6056 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6058 * linux-bfin-low.c (the_low_target): Likewise.
6059 * linux-cris-low.c (the_low_target): Likewise.
6060 * linux-crisv32-low.c (the_low_target): Likewise.
6061 * linux-ia64-low.c (the_low_target): Likewise.
6062 * linux-m32r-low.c (the_low_target): Likewise.
6063 * linux-m68k-low.c (the_low_target): Likewise.
6064 * linux-ppc-low.c (the_low_target): Likewise.
6065 * linux-s390-low.c (the_low_target): Likewise.
6066 * linux-sh-low.c (the_low_target): Likewise.
6067 * linux-sparc-low.c (the_low_target): Likewise.
6068 * linux-tic6x-low.c (the_low_target): Likewise.
6069 * linux-x86-low.c (the_low_target): Likewise.
6070 * linux-xtensa-low.c (the_low_target): Likewise.
6071 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6072 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6073 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6075 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6076 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6078 2012-02-29 Yao Qi <yao@codesourcery.com>
6079 Pedro Alves <palves@redhat.com>
6081 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6082 `step_over_finished' is true.
6084 2012-02-27 Pedro Alves <palves@redhat.com>
6086 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6087 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6089 2012-02-27 Pedro Alves <palves@redhat.com>
6092 * linux-low.c (pid_is_stopped): New.
6093 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6095 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6097 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6100 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6102 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6104 2012-02-24 Luis Machado <lgustavo@codesourcery>
6106 * server.c (handle_query): Advertise support for target-side
6107 breakpoint condition evaluation.
6108 (process_point_options): New function.
6109 (process_serial_event): When inserting a breakpoint, check for
6110 a target-side condition that should be evaluated.
6112 * mem-break.c: Include regcache.h and ax.h.
6113 (point_cond_list_t): New data structure.
6114 (breakpoint) <cond_list>: New field.
6115 (find_gdb_breakpoint_at): Make non-static.
6116 (delete_gdb_breakpoint_at): Clear any target-side
6118 (clear_gdb_breakpoint_conditions): New function.
6119 (add_condition_to_breakpoint): Likewise.
6120 (add_breakpoint_condition): Likewise.
6121 (gdb_condition_true_at_breakpoint): Likewise.
6122 (gdb_breakpoint_here): Return result directly instead
6123 of going through a local variable.
6125 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6126 (clear_gdb_breakpoint_conditions): Likewise.
6127 (add_breakpoint_condition): Likewise.
6128 (gdb_condition_true_at_breakpoint): Likewise.
6130 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6131 (need_step_over_p): Take target-side breakpoint condition into
6134 2012-02-24 Luis Machado <lgustavo@codesourcery>
6136 * server.h: Include tracepoint.h.
6137 (agent_mem_read, agent_get_trace_state_variable_value,
6138 agent_set_trace_state_variable_value,
6139 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6140 get_set_tsv_func_addr): New prototypes.
6142 * ax.h: New include file.
6143 * ax.c: New source file.
6145 * tracepoint.c: Include ax.h.
6146 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6147 agent_expr, eval_result_type): Move to ax.h.
6148 (parse_agent_expr): Rename to ...
6149 (gdb_parse_agent_expr): ... this, make it non-static and move
6151 (unparse_agent_expr) Rename to ...
6152 (gdb_unparse_agent_expr): ... this, make it non-static and move
6154 (eval_agent_expr): Rename to ...
6155 (eval_tracepoint_agent_expr): ... this.
6156 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6157 forward declarations.
6158 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6159 (agent_get_trace_state_variable_value): New function.
6160 (agent_set_trace_state_variable_value): New function.
6161 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6162 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6163 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6164 (condition_true_at_tracepoint): Likewise.
6165 (parse_agent_expr): Rename to ...
6166 (gdb_parse_agent_expr): ... this and move to ax.c.
6167 (unparse_agent_expr): Rename to ...
6168 (gdb_unparse_agent_expr): ... this and move to ax.c.
6169 (gdb_agent_op_name): Move to ax.c.
6170 (eval_agent_expr): Rename to ...
6171 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6173 (eval_tracepoint_agent_expr): New function.
6174 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6176 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6178 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6179 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6180 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6181 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6182 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6183 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6184 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6185 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6186 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6187 (compile_bytecodes): Remove forward declaration.
6188 (is_goto_target): Move to ax.c.
6189 (compile_bytecodes): Move to ax.c and call
6190 agent_get_trace_state_variable_value (...) and
6191 agent_set_trace_state_variable_value (...).
6193 * Makefile.in: Update ax.c and IPA dependencies.
6195 2012-02-24 Pedro Alves <palves@redhat.com>
6197 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6198 (cmd_bigqtbuffer_circular): ... this. Only handle
6199 'QTBuffer:circular:'.
6200 (handle_tracepoint_general_set): Adjust.
6202 2012-02-16 Yao Qi <yao@codesourcery.com>
6204 * inferiors.c: Move code to ...
6205 * dll.c: .... here. New.
6206 * server.h: Declare clear_dlls.
6207 * Makefile.in (SFILES): Add dll.c.
6211 2012-02-11 Yao Qi <yao@codesourcery.com>
6213 * server.c: (handle_monitor_command): Add a new parameter
6215 (handle_query): Update caller.
6217 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6219 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6220 * configure, config.in: Regenerate.
6221 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6224 2012-02-02 Pedro Alves <palves@redhat.com>
6226 Try SIGKILL first, then PTRACE_KILL.
6227 * linux-low.c (linux_kill_one_lwp): New.
6228 (linux_kill_one_lwp): Rename to ...
6229 (kill_one_lwp_callback): ... this. Use the new
6232 2012-02-02 Pedro Alves <palves@redhat.com>
6234 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6237 2012-01-27 Pedro Alves <palves@redhat.com>
6239 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6240 (elf_64_file_p): Make static.
6241 (linux_pid_exe_is_elf_64_file): New.
6242 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6243 Delete declarations.
6244 (linux_pid_exe_is_elf_64_file): Declare.
6245 * linux-x86-low.c (x86_arch_setup): Use
6246 linux_pid_exe_is_elf_64_file.
6248 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6250 * linux-low.c (linux_wait_for_event_1): Rename to ...
6251 (linux_wait_for_event): ... here and merge it with former
6252 linux_wait_for_event - new variable wait_ptid, use it.
6253 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6255 2012-01-23 Pedro Alves <palves@redhat.com>
6257 * server.c (main): Avoid yet another case of infinite loop while
6258 detaching/killing after a longjmp.
6260 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6263 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6265 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6267 * hostio.c (handle_readlink): New function.
6268 (handle_vFile): Call it to handle "vFile:readlink" packets.
6270 2012-01-20 Pedro Alves <palves@redhat.com>
6271 Ulrich Weigand <ulrich.weigand@linaro.org>
6273 * server.c (handle_v_requests): Only support vAttach and vRun to
6274 start multiple processes when in extended protocol mode.
6276 2012-01-17 Pedro Alves <palves@redhat.com>
6278 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6279 memalign plus mprotect to allocate the scratch buffer.
6281 2012-01-13 Pedro Alves <palves@redhat.com>
6283 * server.c (attach_inferior): Clear `cont_thread'.
6285 2012-01-13 Pedro Alves <palves@redhat.com>
6287 * server.c (main): Avoid infinite loop while detaching/killing
6290 2012-01-09 Doug Evans <dje@google.com>
6292 * server.c (start_inferior): Set last_ptid in --wrapper case.
6294 2012-01-06 Yao Qi <yao@codesourcery.com>
6296 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6298 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6300 2012-01-04 Yao Qi <yao@codesourcery.com>
6302 * tracepoint.c (cmd_qtdp): Print debug message
6303 for static tracepoint.
6305 2012-01-04 Yao Qi <yao@codesourcery.com>
6307 * tracepoint.c (trace_vdebug): Differentiate debug message
6308 between gdbserver and IPA.
6310 2012-01-03 Yao Qi <yao@codesourcery.com>
6312 * tracepoint.c (tracepoint_was_hit): Don't collect for
6315 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6317 * terminal.h: Reformat copyright header.
6319 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6321 * server.c (gdbserver_version): Update copyright year.
6322 * gdbreplay.c (gdbreplay_version): Likewise.
6324 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6326 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6329 2011-12-18 Hui Zhu <teawater@gmail.com>
6330 * linux-low.c (linux_create_inferior): Save return value to ret.
6332 2011-12-18 Hui Zhu <teawater@gmail.com>
6334 * linux-low.c (linux_create_inferior): Save return value to ret.
6336 2011-12-16 Doug Evans <dje@google.com>
6338 * linux-low.c (linux_create_inferior): If stdio connection,
6339 redirect stdin from /dev/null, stdout to stderr.
6340 * remote-utils.c (remote_is_stdio): New static global.
6341 (remote_connection_is_stdio): New function.
6342 (remote_prepare): Handle stdio connection.
6343 (remote_open): Ditto.
6344 (remote_close): Don't close stdin for stdio connections.
6345 (read_prim,write_prim): New functions. Replace all calls to
6346 read/write to these.
6347 * server.c (main): Watch for "-" argument. Move call to
6348 remote_prepare before start_inferior.
6349 * server.h (STDIO_CONNECTION_NAME): New macro.
6350 (remote_connection_is_stdio): Declare.
6352 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6353 in debugging output.
6355 2011-12-15 Yao Qi <yao@codesourcery.com>
6357 * tracepoint.c: Include sys/syscall.h.
6358 (gdb_ust_thread): Remove preprocessor conditional.
6360 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6362 * linux-low.c (linux_detach_one_lwp): Call
6363 the_low_target.prepare_to_resume before detaching.
6365 2011-12-14 Yao Qi <yao@codesourcery.com>
6367 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6370 2011-12-14 Yao Qi <yao@codesourcery.com>
6372 * i386-low.c (i386_low_stopped_data_address): Initialize local
6375 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6379 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6380 DR_CONTROL unless necessary. Extend comments.
6381 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6382 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6384 2011-12-13 Yao Qi <yao@codesourcery.com>
6386 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6388 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6390 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6392 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6393 Print new debug message for such case.
6395 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6397 Fix overlapping memcpy.
6398 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6399 the read_inferior_memory transfer.
6400 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6401 write_inferior_memory transfer.
6402 (set_fast_tracepoint_jump): New variable buf. Use it for the
6403 read_inferior_memory and write_inferior_memory transfers.
6404 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6405 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6406 Use it for the write_inferior_memory transfer.
6407 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6410 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6412 * linux-low.c (fetch_register, store_register): Make code
6413 consistent, fix formatting.
6415 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6417 * linux-low.c (usr_store_inferior_registers): Factor out code
6418 to handle individual registers into...
6419 (store_register): ... this new function.
6421 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6423 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6424 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6425 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6426 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6427 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6428 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6429 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6430 (srv_xmlfiles): Add new XML files.
6432 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6434 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6435 (init_registers_s390_linux32v1): Add prototype.
6436 (init_registers_s390_linux32v2): Likewise.
6437 (init_registers_s390_linux64v1): Likewise.
6438 (init_registers_s390_linux64v2): Likewise.
6439 (init_registers_s390x_linux64v1): Likewise.
6440 (init_registers_s390x_linux64v2): Likewise.
6441 (s390_num_regs): Increment to 52.
6442 (s390_regmap): Add orig_r2 register.
6443 (s390_num_regs_3264): Increment to 68.
6444 (s390_regmap_3264): Add orig_r2 register.
6445 (s390_collect_ptrace_register): Handle orig_r2 register.
6446 (s390_supply_ptrace_register): Likewise.
6447 (s390_fill_last_break): New function.
6448 (s390_store_last_break): Likewise.
6449 (s390_fill_system_call): New function.
6450 (s390_store_system_call): Likewise.
6451 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6453 (s390_check_regset): New function.
6454 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6455 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6456 Update target_regsets for available register sets.
6458 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6459 Jan Kratochvil <jan.kratochvil@redhat.com>
6461 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6462 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6464 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6465 * linux-low.h (struct process_info_private): New member r_debug.
6466 * server.c (handle_qxfer_libraries): Call
6467 the_target->qxfer_libraries_svr4.
6468 (handle_qxfer_libraries_svr4): New function.
6469 (qxfer_packets): New entry "libraries-svr4".
6470 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6471 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6472 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6473 PACKET_qXfer_libraries_svr4.
6475 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6477 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6478 PSW address/mask between 8-byte and 16-byte formats.
6479 (s390_supply_ptrace_register): Likewise.
6480 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6481 basic addressing mode bit.
6483 2011-11-24 Stan Shebs <stan@codesourcery.com>
6485 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6487 2011-11-17 Stan Shebs <stan@codesourcery.com>
6489 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6490 (tracing_start_time): New global.
6491 (tracing_stop_time): New global.
6492 (tracing_user_name): New global.
6493 (tracing_notes): New global.
6494 (tracing_stop_note): New global.
6495 (cmd_qtstart): Set traceframe_usage, start_time.
6496 (stop_tracing): Set stop_time.
6497 (cmd_qtstatus): Report additional status.
6498 (cmd_qtp): New function.
6499 (handle_tracepoint_query): Call it.
6500 (cmd_qtnotes): New function.
6501 (handle_tracepoint_general_set): Call it.
6502 (get_timestamp): Rename from tsv_get_timestamp.
6504 2011-11-14 Stan Shebs <stan@codesourcery.com>
6505 Kwok Cheung Yeung <kcy@codesourcery.com>
6507 * linux-x86-low.c (small_jump_insn): New.
6508 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6509 trampoline and error message, build a trampoline and issue a small
6510 jump instruction to it.
6511 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6512 trampoline and error message.
6513 (x86_get_min_fast_tracepoint_insn_len): New.
6514 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6515 * linux-low.h (struct linux_target_ops): Add arguments to
6516 install_fast_tracepoint_jump_pad operation, add new operation.
6517 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6519 (linux_get_min_fast_tracepoint_insn_len): New function.
6520 (linux_target_op): Add new operation.
6521 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6522 (gdb_trampoline_buffer_end): Ditto.
6523 (gdb_trampoline_buffer_error): Ditto.
6524 (struct ipa_sym_addresses): Add fields for new IPA variables.
6525 (symbol_list): Add entries for new IPA variables.
6526 (struct tracepoint): Add fields to hold the address range of the
6527 trampoline used by the tracepoint.
6528 (trampoline_buffer_head): New static variable.
6529 (trampoline_buffer_tail): Ditto.
6530 (claim_trampoline_space): New function.
6531 (have_fast_tracepoint_trampoline_buffer): New function.
6532 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6534 (install_fast_tracepoint): Ditto, also add error buffer argument.
6535 (cmd_qtminftpilen): New function.
6536 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6537 (fast_tracepoint_from_trampoline_address): New function.
6538 (fast_tracepoint_collecting): Handle trampoline as part of jump
6540 (set_trampoline_buffer_space): New function.
6541 (initialize_tracepoint): Initialize new IPA variables.
6542 * target.h (struct target_ops): Add arguments to
6543 install_fast_tracepoint_jump_pad operation, add new
6544 get_min_fast_tracepoint_insn_len operation.
6545 (target_get_min_fast_tracepoint_insn_len): New.
6546 (install_fast_tracepoint_jump_pad): Add arguments.
6547 * server.h (IPA_BUFSIZ): Define.
6548 * linux-i386-ipa.c: Include extra header files.
6549 (initialize_fast_tracepoint_trampoline_buffer): New function.
6550 (initialize_low_tracepoint): Call it.
6551 * server.h (set_trampoline_buffer_space): Declare.
6552 (claim_trampoline_space): Ditto.
6553 (have_fast_tracepoint_trampoline_buffer): Ditto.
6555 2011-11-14 Yao Qi <yao@codesourcery.com>
6557 * server.c (handle_query): Handle InstallInTrace for qSupported.
6558 * tracepoint.c (add_tracepoint): Sort list.
6559 (install_tracepoint, download_tracepoint): New.
6560 (cmd_qtdp): Call them to install and download tracepoints.
6561 (sort_tracepoints): Removed.
6562 (cmd_qtstart): Update.
6564 2011-11-14 Yao Qi <yao@codesourcery.com>
6566 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6567 * mem-break.h: Declare.
6568 * tracepoint.c (cmd_qtstart): Move some code to ...
6569 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6571 (download_tracepoints): Move some code to ...
6572 (download_tracepoint_1): ... here. New.
6574 2011-11-08 Yao Qi <yao@codesourcery.com>
6576 * remote-utils.c (relocate_instruction): A comment fix.
6578 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6580 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6581 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6582 dr_status_mirror and dr_control_mirror from debug_reg_state.
6583 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6584 (i386_initial_stuff): Remove use of deleted globals.
6585 (i386_get_thread_context, i386_set_thread_context,
6586 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6587 from debug_reg_state.
6589 2011-11-05 Yao Qi <yao@codesourcery.com>
6591 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6592 address as TPOINT's.
6594 2011-11-02 Stan Shebs <stan@codesourcery.com>
6596 * tracepoint.c (agent_mem_read_string): New function.
6597 (eval_agent_expr): Call it for tracenz.
6598 * server.c (handle_query): Report support for tracenz.
6600 2011-11-02 Yao Qi <yao@codesourcery.com>
6602 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6604 2011-11-02 Yao Qi <yao@codesourcery.com>
6606 * target.h: Fix a typo in comment.
6608 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6610 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6611 clobber the breakpoints' shadows with fast tracepoint jumps.
6612 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6613 * target.c (write_inferior_memory): Also pass MYADDR down to
6616 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6618 * configure.ac: Check support for personality routine.
6619 * configure: Regenerate.
6620 * config.in: Likewise.
6621 * linux-low.c: Include <sys/personality.h>.
6622 Define ADDR_NO_RANDOMIZE if necessary.
6623 (linux_create_inferior): Disable address space randomization when
6624 forking inferior, if requested.
6625 (linux_supports_disable_randomization): New function.
6626 (linux_target_ops): Install it.
6627 * server.h (disable_randomization): Declare.
6628 * server.c (disable_randomization): New global variable.
6629 (handle_general_set): Handle QDisableRandomization.
6630 (handle_query): Likewise for qSupported.
6631 (main): Support --disable-randomization and --no-disable-randomization
6632 command line arguments.
6633 * target.h (struct target_ops): Add supports_disable_randomization.
6634 (target_supports_disable_randomization): New macro.
6636 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6638 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6640 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6641 [!PT_GETDSBT] (target_loadmap): New definition.
6642 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6643 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6644 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6645 and PT_GETDSBT to LINUX_LOADMAP.
6646 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6647 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6649 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6651 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6652 (arm_linux_hwbp_cap): New static variable.
6653 (arm_linux_get_hwbp_cap): Replace by ...
6654 (arm_linux_init_hwbp_cap): ... this new function.
6655 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6656 (arm_linux_get_hw_watchpoint_count): Likewise.
6657 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6658 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6659 (arm_prepare_to_resume): Use perror_with_name instead of error.
6661 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6663 * linux-arm-low.c: Include <signal.h>.
6664 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6665 (struct arm_linux_hwbp_cap): New data type.
6666 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6667 (struct arm_linux_hw_breakpoint): New data type.
6668 (MAX_BPTS, MAX_WPTS): Define.
6669 (struct arch_process_info, struct arch_lwp_info): New data types.
6670 (arm_linux_get_hwbp_cap): New function.
6671 (arm_linux_get_hw_breakpoint_count): Likewise.
6672 (arm_linux_get_hw_watchpoint_count): Likewise.
6673 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6674 (arm_hwbp_control_initialize): Likewise.
6675 (arm_hwbp_control_is_enabled): Likewise.
6676 (arm_hwbp_control_is_initialized): Likewise.
6677 (arm_hwbp_control_disable): Likewise.
6678 (arm_linux_hw_breakpoint_equal): Likewise.
6679 (arm_linux_hw_point_initialize): Likewise.
6680 (struct update_registers_data): New data structure.
6681 (update_registers_callback: New function.
6682 (arm_insert_point): Likewise.
6683 (arm_remove_point): Likewise.
6684 (arm_stopped_by_watchpoint): Likewise.
6685 (arm_stopped_data_address): Likewise.
6686 (arm_new_process): Likewise.
6687 (arm_new_thread): Likewise.
6688 (arm_prepare_to_resume): Likewise.
6689 (the_low_target): Register arm_insert_point, arm_remove_point,
6690 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6691 arm_new_thread, and arm_prepare_to_resume.
6693 2011-09-15 Stan Shebs <stan@codesourcery.com>
6695 * server.h (struct emit_ops): Add compare-goto fields.
6696 * tracepoint.c (gdb_agent_op_sizes): New table.
6697 (emit_eq_goto): New function.
6698 (emit_ne_goto): New function.
6699 (emit_lt_goto): New function.
6700 (emit_le_goto): New function.
6701 (emit_gt_goto): New function.
6702 (emit_ge_goto): New function.
6703 (is_goto_target): New function.
6704 (compile_bytecodes): Recognize special cases of compare-goto
6705 combinations and call specialized emitters for them.
6706 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6707 (amd64_emit_ne_goto): New function.
6708 (amd64_emit_lt_goto): New function.
6709 (amd64_emit_le_goto): New function.
6710 (amd64_emit_gt_goto): New function.
6711 (amd64_emit_ge_goto): New function.
6712 (amd64_emit_ops): Add the new functions.
6713 (i386_emit_eq_goto): New function.
6714 (i386_emit_ne_goto): New function.
6715 (i386_emit_lt_goto): New function.
6716 (i386_emit_le_goto): New function.
6717 (i386_emit_gt_goto): New function.
6718 (i386_emit_ge_goto): New function.
6719 (i386_emit_ops): Add the new functions.
6721 2011-09-08 Stan Shebs <stan@codesourcery.com>
6723 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6724 (i386_emit_epilogue): Restore %ebx.
6726 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6728 * server.c (step_thread): Remove definition.
6729 (process_serial_event): Don't handle Hs.
6730 * server.h (step_thread): Remove declaration.
6731 * target.c (set_desired_inferior): Remove use of step_thread.
6733 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6735 * linux-low.c: Include linux-procfs.h.
6736 (linux_attach_lwp_1): Update comments.
6737 (linux_attach): Scan for existing threads when attaching to a
6738 process that is the tgid.
6739 * Makefile.in: Update dependencies.
6741 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6743 * configure.srv: Add linux-procfs.o dependencies.
6745 2011-08-14 Yao Qi <yao@codesourcery.com>
6747 * target.h (struct target_ops): Fix indent.
6748 * win32-low.c (win32_target_ops): Fix comment.
6750 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6751 Yao Qi <yao@codesourcery.com>
6753 * Makefile.in (clean): Remove tic6x-*.c files.
6754 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6755 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6756 (tic6x-c64xp-linux.c): Likewise.
6757 * configure.srv: Add support for tic6x-*-uclinux.
6758 * linux-tic6x-low.c: New.
6759 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6761 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6762 Yao Qi <yao@codesourcery.com>
6764 * target.h (struct target_ops): Add read_loadmap.
6765 * linux-low.c (struct target_loadseg): New type.
6766 (struct target_loadmap): New type.
6767 (linux_read_loadmap): New function.
6768 (linux_target_ops): Add linux_read_loadmap.
6769 * server.c (handle_query): Support qXfer:fdpic:read packet.
6770 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6773 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6775 * win32-low.c: Include <stdint.h>.
6777 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6779 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6780 to the inferior here.
6781 (i386_remove_aligned_watchpoint): Ditto.
6782 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6783 fit part of the watchpoint in the debug registers.
6784 (i386_update_inferior_debug_regs): New.
6785 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6786 registers, and only update the inferior on success.
6787 (i386_low_remove_watchpoint): Ditto.
6789 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6791 * linux-low.c (compare_ints, unique, list_threads, show_process,
6792 linux_core_of_thread): Delete.
6793 (linux_target_ops): Change linux_core_of_thread to
6794 linux_common_core_of_thread.
6795 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6796 * utils.c (malloc_failure): Change type of argument.
6797 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6798 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6799 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6800 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6801 (IPA_OBJS): Add common-utils-ipa.o.
6802 (ptid_h, linux_osdata_h): New macros.
6803 (server_h): Add common/common-utils.h, common/xml-utils.h,
6804 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6806 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6807 ptid.o, buffer.o): New rules.
6808 (linux-low.o): Add common/linux-osdata.h as a dependency.
6809 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6810 * configure.ac: Add AC_HEADER_DIRENT check.
6811 * config.in: Regenerate.
6812 * configure: Regenerate.
6813 * remote-utils.c (xml_escape_text): Delete.
6814 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6815 buffer_xml_printf): Move to common/buffer.c.
6816 * server.c (main): Remove call to initialize_inferiors.
6817 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6818 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6819 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6820 internal_error, gdb_assert, gdb_assert_fail): Delete.
6821 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6822 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6824 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6825 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6826 initialize_inferiors): Delete.
6828 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6830 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6833 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6835 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6837 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6839 2011-05-26 Yao Qi <yao@codesourcery.com>
6841 * Makefile.in (thread-db.o): Track dependence to
6842 common/gdb_thread_db.h.
6843 * thread-db.c: include gdb_thread_db.h from right place.
6845 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6847 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6848 __FILE__ and __LINE__ to internal_error.
6850 2011-05-13 Doug Evans <dje@google.com>
6852 * thread-db.c (try_thread_db_load_from_sdir): New function.
6853 (try_thread_db_load_from_dir): New function.
6854 (thread_db_load_search): Handle $sdir, ignore $pdir.
6855 Remove trying of system directories if search of
6856 libthread-db-search-path fails, that is now done via $sdir.
6858 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6860 * server.c (handle_query): Add EnableDisableTracepoints to the list
6861 of supported features.
6862 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6864 (cmd_qtenable_disable): New.
6865 (cmd_qtstart): Install tracepoints even if disabled.
6866 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6867 receiving a QTEnable or QTDisable packet.
6868 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6869 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6871 (gdb_probe): Skip data collection if static tracepoint is disabled.
6873 2011-05-10 Doug Evans <dje@google.com>
6875 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6877 2011-05-04 Doug Evans <dje@google.com>
6879 * linux-low.c (linux_join): Skip process lookup.
6880 * spu-low.c (spu_join): Ditto.
6881 * server.c (join_inferiors_callback): Delete.
6882 (process_serial_event): For 'D' packet (detach) call join_inferior
6885 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6887 * README: Don't mention xscale*-*-linux*.
6888 * configure.srv (xscale*-*-linux*): Don't handle target.
6890 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6892 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6894 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6895 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6896 (i386_emit_void_call_2): Likewise.
6898 2011-04-26 Yao Qi <yao@codesourcery.com>
6900 * linux-low.c: Move common macros to linux-ptrace.h.
6901 Include linux-ptrace.h.
6902 * Makefile.in (linux_ptrace_h): New.
6903 (linux-low.o): Depends on linux-ptrace.h.
6905 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6907 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6908 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6909 (remote_prepare): New function with most of the TCP code from ...
6910 (remote_open): ... here. Detect PORT here unconditionally. Move also
6911 setting transport_is_reliable.
6912 * server.c (run_once): New variable.
6913 (gdbserver_usage): Document it.
6914 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6915 the first run if RUN_ONCE.
6916 * server.h (run_once, remote_prepare): New declarations.
6918 2011-04-19 Tom Tromey <tromey@redhat.com>
6920 * win32-low.c (handle_load_dll): Remove duplicate "the".
6922 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6924 Remove support for old Cygwin 1.5 versions.
6925 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6926 function to avoid warning.
6927 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6930 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6932 * gdbserver/server.h (Macro _): Define it if not available.
6934 2011-03-14 Michael Snyder <msnyder@vmware.com>
6936 * hostio.c (handle_close): Remove unnecessary null test.
6938 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6940 * Makefile.in (maintainer-clean realclean distclean): Remove
6941 "make ... subdir_do" command.
6943 2011-03-10 Michael Snyder <msnyder@vmware.com>
6945 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6947 * server.c (handle_v_run): Free alloced buffer on early return.
6949 2011-03-09 Yao Qi <yao@codesourcery.com>
6952 2011-03-04 Yao Qi <yao@codesourcery.com>
6954 * Makefile.in: Remove GNU make feature --directory.
6956 2011-03-05 Yao Qi <yao@codesourcery.com>
6958 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6959 (subdir_do): New make target. Copied from gdb/Makefile.
6960 (maintainer-clean, realclean, distclean, clean): Call corresponding
6961 make targets in common/Makefile.
6963 2011-02-11 Yao Qi <yao@codesourcery.com>
6965 * configure.ac: Call AC_PROG_RANLIB.
6966 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6967 * configure: Regenerate.
6969 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6971 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6973 2011-03-06 Yao Qi <yao@codesourcery.com>
6975 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6977 2011-03-05 Yao Qi <yao@codesourcery.com>
6979 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6980 (subdir_do): New make target. Copied from gdb/Makefile.
6981 (maintainer-clean, realclean, distclean, clean): Call corresponding
6982 make targets in common/Makefile.
6984 2011-03-04 Yao Qi <yao@codesourcery.com>
6986 * Makefile.in: Remove GNU make feature --directory.
6988 2011-03-04 Michael Snyder <msnyder@vmware.com>
6990 * server.c (queue_stop_reply): Call xmalloc not malloc.
6992 2011-03-02 Michael Snyder <msnyder@vmware.com>
6994 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6996 2011-02-28 Michael Snyder <msnyder@vmware.com>
6998 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6999 (cmd_qtframe): Ditto.
7000 (cmd_qtbuffer): Ditto.
7001 (cmd_bigqtbuffer): Ditto.
7003 * utils.c (decimal2str): Initialize 'width' to nine, then
7006 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7008 * hostio.c (require_data): Free *data, not data.
7010 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7012 * hostio.c (require_data): Use free, not xfree.
7014 2011-02-27 Michael Snyder <msnyder@vmware.com>
7016 * server.c (handle_query): Discard unused value.
7018 * hostio.c (require_data): Free malloc memory before returning
7021 2011-02-26 Michael Snyder <msnyder@vmware.com>
7023 * linux-low.c (list_threads): Call closedir for dirent.
7025 2011-02-27 Michael Snyder <msnyder@vmware.com>
7027 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7028 a case statement falls through.
7030 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7032 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7035 2011-02-26 Michael Snyder <msnyder@vmware.com>
7037 * utils.c (decimal2str): Eliminate dead code and dead param.
7038 (pulongest): Drop dead param from call to decimal2str.
7041 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7043 Revert the following patch (not approved yet):
7044 2011-02-21 Hui Zhu <teawater@gmail.com>
7045 * tracepoint.c (tp_printf): New function.
7046 (eval_agent_expr): Handle gdb_agent_op_printf.
7048 2011-02-21 Hui Zhu <teawater@gmail.com>
7050 * tracepoint.c (tp_printf): New function.
7051 (eval_agent_expr): Handle gdb_agent_op_printf.
7053 2011-02-18 Tom Tromey <tromey@redhat.com>
7055 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7056 (tracepoint.o): Likewise.
7057 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7058 (gdb_agent_op_names): Likewise.
7060 2011-02-18 Tom Tromey <tromey@redhat.com>
7062 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7063 gdb_agent_op_rot>: New constants.
7064 (gdb_agent_op_names): Add pick and roll.
7065 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7068 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7070 * aclocal.m4: Regenerated with aclocal-1.11.1.
7072 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7074 * server.c (handle_qxfer_traceframe_info): New.
7075 (qxfer_packets): Register "traceframe-info".
7076 (handle_query): Report support for qXfer:traceframe-info:read+.
7077 * tracepoint.c (match_blocktype): New.
7078 (traceframe_find_block_type): Rename to ...
7079 (traceframe_walk_blocks): ... this. Add callback filter argument,
7081 (traceframe_find_block_type): New, reimplemented on top of
7082 traceframe_walk_blocks.
7083 (build_traceframe_info_xml): New.
7084 (traceframe_read_info): New.
7085 * server.h (traceframe_read_info): Declare.
7087 2011-02-11 Yao Qi <yao@codesourcery.com>
7089 * configure.ac: Call AC_PROG_RANLIB.
7090 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7091 * configure: Regenerate.
7093 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7095 * server.c (gdb_read_memory): Change return semantics to allow
7097 (handle_search_memory_1): Adjust.
7098 (process_serial_event) <'m' packet>: Handle partial transfers.
7099 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7101 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7103 * regcache.c (init_register_cache): Initialize
7104 regcache->register_status.
7105 (free_register_cache): Release regcache->register_status.
7106 (regcache_cpy): Copy register_status.
7107 (registers_to_string): Print 'x's for unavailable registers.
7108 (supply_register): Mark the register's status valid or
7109 unavailable, depending on whether a buffer was passed in or not.
7110 (supply_register_zeroed): New.
7111 (supply_regblock): Mark the registers' status valid or
7112 unavailable, depending on whether a buffer was passed in or not.
7113 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7114 (struct regcache): New `register_status' field.
7115 (supply_register_zeroed): Declare.
7116 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7117 supply_register_zeroed, rather than passing a NULL buffer to
7119 * tracepoint.c (fetch_traceframe_registers): Update comment.
7121 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7123 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7126 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7128 * server.h (decode_xfer_write): Change prototype.
7129 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7130 and don't extract the annex here.
7131 * server.c (decode_xfer_read): Remove `annex' parameter,
7132 and don't extract the annex here.
7134 (struct qxfer): New.
7135 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7136 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7137 (handle_qxfer_statictrace): New functions, abstracted out from
7138 handle_query, and made to use the struct qxfer interface.
7139 (handle_threads_qxfer_proper): Rename to ...
7140 (handle_qxfer_threads_proper): ... this.
7141 (handle_threads_qxfer): Rename to ...
7142 (handle_qxfer_threads): ... this. Adjust.
7143 (qxfer_packets): New array.
7144 (handle_qxfer): New function.
7145 (handle_query): Use handle_qxfer.
7147 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7149 * gdbreplay.c: Shorten lines of >= 80 columns.
7150 * linux-low.c: Ditto.
7151 * linux-ppc-low.c: Ditto.
7152 * linux-s390-low.c: Ditto.
7153 * linux-sparc-low.c: Ditto.
7154 * linux-x86-low.c: Ditto.
7155 * linux-xtensa-low.c: Ditto.
7156 * mem-break.c: Ditto.
7158 * regcache.h: Ditto.
7159 * remote-utils.c: Ditto.
7162 * thread-db.c: Ditto.
7163 * tracepoint.c: Ditto.
7165 * win32-low.h: Ditto.
7167 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7169 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7172 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7174 * server.c (gdbserver_version): Update copyright year in version
7176 * gdbreplay.c (gdbreplay_version): Ditto.
7178 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7180 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7181 * linux-bfin-low.c: New file.
7182 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7183 PT_DATA_ADDR for BFIN targets.
7184 * Makefile.in (SFILES): Add linux-bfin-low.c.
7185 (clean): Remove reg-bfin.c.
7186 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7187 * README: Mention supported Blackfin targets.
7189 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7191 * .gitignore: New file.
7193 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7195 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7197 2010-10-22 Jie Zhang <jie@codesourcery.com>
7199 * Makefile.in: Add FLAGS_TO_PASS variable.
7200 (install): Remove dependency of install-only and recursively
7201 invoke make for install-only.
7203 2010-10-04 Doug Evans <dje@google.com>
7205 * Makefile.in (uninstall): Use $(DESTDIR).
7207 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7211 * linux-x86-low.c (compat_siginfo_from_siginfo)
7212 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7213 si_code is < 0. Check for si_code == SI_TIMER before checking for
7216 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7218 * lynx-i386-low.c: New file.
7219 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7221 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7223 * lynx-low.c (ptrace_request_to_str): Remove handling for
7224 request values that have been removed in LynxOS 5.x.
7226 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7228 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7231 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7233 * configure.ac: Add --enable-inprocess-agent option.
7234 * configure: Rebuilt.
7236 2010-09-06 Yao Qi <yao@codesourcery.com>
7238 * linux-low.c (linux_kill): Remove unused variable.
7239 (linux_stabilize_threads): Likewise.
7240 * server.c (start_inferior): Likewise.
7241 (queue_stop_reply_callback): Likewise.
7242 * tracepoint.c (do_action_at_tracepoint): Likewise.
7244 2010-09-06 Yao Qi <yao@codesourcery.com>
7246 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7249 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7251 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7253 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7255 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7258 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7260 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7261 gdbserver/lynx-ppc-low.c: New files.
7262 * Makefile.in (lynx_low_h): New variable.
7263 (lynx-low.o, lynx-ppc-low.o): New rules.
7264 * configure.ac: On LynxOS, link with -lnetinet.
7265 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7266 * configure: regenerate.
7268 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7270 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7271 * configure.ac: Add check for vasprintf and vsnprintf.
7272 * configure, config.in: Regenerate.
7273 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7275 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7277 * gdbreplay.c: Move include of alloca.h up, next to include of
7279 * server.h: Add include of malloc.h.
7280 * mem-break.c: Remove include of malloc.h.
7281 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7283 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7285 * Makefile.in (memmem.o): Build with -Wno-error.
7287 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7289 * utils.c (xsnprintf): Make non-static.
7290 * server.h: Add xsnprintf declaration.
7291 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7292 replace calls to snprintf by calls to xsnprintf throughout.
7294 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7296 * configure.ac: Add configure check for alloca.
7297 * configure, config.in: Regenerate.
7298 * server.h: Include alloca.h if it exists.
7299 * gdbreplay.c: Include alloca.h if it exists.
7301 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7303 * linux-low.c (__SIGRTMIN): Define if not already defined.
7304 (linux_create_inferior): Check for __ANDROID__ rather than
7306 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7307 are already deferred.
7308 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7309 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7310 stopped and already has a pending signal to report.
7311 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7312 a pending signal to report or is moving out of a jump pad.
7313 (linux_init_signals): Check for __ANDROID__ rather than
7316 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7318 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7319 debug_threads check. Avoid a linear search when not doing debug
7322 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7324 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7325 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7326 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7327 (process_event): Change local fd's type to gdb_fildes_t.
7328 (create_file_handler): Adjust prototype.
7329 (delete_file_handler): Adjust prototype.
7330 (handle_file_event): Adjust prototype. Use pfildes.
7331 (create_file_event): Adjsut prototype.
7332 * remote-utils.c (remote_desc, listen_desc): Change type to
7334 * server.h: New gdb_fildes_t typedef.
7335 [USE_WIN32API]: Include winsock2.h.
7336 (delete_file_handler, add_file_handler): Adjust prototypes.
7338 * utils.c (pfildes): New.
7340 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7342 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7343 * configure: Regenerate.
7345 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7347 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7348 (linux_done_accessing_memory): ... this.
7349 (linux_target_ops): Adjust.
7350 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7351 * nto-low.c (nto_target_ops): Adjust comment.
7352 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7353 * spu-low.c (spu_target_ops): Adjust comment.
7354 * target.h (target_ops): Rename unprepare_to_access_memory field
7355 to done_accessing_memory.
7356 (unprepare_to_access_memory): Rename to ...
7357 (done_accessing_memory): ... this.
7359 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7361 * linux-low.c (linux_prepare_to_access_memory): New.
7362 (linux_unprepare_to_access_memory): New.
7363 (linux_target_ops): Install them.
7364 * server.c (read_memory): Rename to ...
7365 (gdb_read_memory): ... this. Use
7366 prepare_to_access_memory/prepare_to_access_memory.
7367 (write_memory): Rename to ...
7368 (gdb_write_memory): ... this. Use
7369 prepare_to_access_memory/prepare_to_access_memory.
7370 (handle_search_memory_1): Adjust.
7371 (process_serial_event): Adjust.
7372 * target.h (struct target_ops): New fields
7373 prepare_to_access_memory and unprepare_to_access_memory.
7374 (prepare_to_access_memory, unprepare_to_access_memory): New.
7375 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7376 prepare_to_access_memory/prepare_to_access_memory.
7377 * nto-low.c (nto_target_ops): Adjust.
7378 * spu-low.c (spu_target_ops): Adjust.
7379 * win32-low.c (win32_target_ops): Adjust.
7381 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7383 * Makefile.in (WARN_CFLAGS): Get it from configure.
7384 (WERROR_CFLAGS): New.
7385 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7386 * configure.ac: Introduce --enable-werror, which adds -Werror to
7387 the compiler command line. Enabled by default. Disable with
7388 --disable-werror. Add -Wdeclaration-after-statement
7389 Wpointer-arith and -Wformat-nonliteral to warning flags.
7390 * configure: Regenerate.
7392 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7394 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7396 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7398 * gdbreplay.c (remote_error): New.
7400 (expect): Use gdbchar. Check for error reading from GDB.
7401 Clarify sync error output.
7402 (play): Check for errors writing to GDB.
7403 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7404 * remote-utils.c (getpkt): Check for errors writing to the remote
7407 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7409 * linux-low.c (linux_wait_1): Move non-debugging code out of
7410 `debug_threads' control.
7412 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7414 * linux-low.c (linux_wait_1): Don't set last_status here.
7415 * server.c (push_event, queue_stop_reply_callback): Assert we're
7416 not pushing a TARGET_WAITKIND_IGNORE event.
7417 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7418 (myresume, handle_target_event): Set the thread's last_resume_kind
7419 and last_status from the target returned status.
7421 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7425 * linux-x86-low.c (update_debug_registers_callback): New.
7426 (i386_dr_low_set_addr): Use it.
7427 (i386_dr_low_get_addr): New.
7428 (i386_dr_low_set_control): Use update_debug_registers_callback.
7429 (i386_dr_low_get_control): New.
7430 (i386_dr_low_get_status): Adjust.
7431 * linux-low.c (linux_stop_lwp): New.
7432 * linux-low.h (linux_stop_lwp): Declare.
7434 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7435 argument instead of a i386_debug_reg_state.
7436 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7437 a i386_debug_reg_state.
7438 (i386_insert_aligned_watchpoint): Adjust.
7439 (i386_remove_aligned_watchpoint): Adjust.
7440 (i386_low_stopped_data_address): Read the debug registers from the
7441 inferior instead of from the mirrors.
7442 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7443 (i386_dr_low_get_addr): Declare.
7444 (i386_dr_low_get_control): Declare.
7445 (i386_dr_low_get_status): Change prototype.
7447 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7448 (i386_dr_low_get_addr): New.
7449 (i386_dr_low_get_control): New.
7450 (i386_dr_low_get_status): Adjust prototype. Return
7452 (i386_initial_stuff): Clear dr_status_mirror and
7454 (i386_get_thread_context): Adjust.
7455 (i386_set_thread_context): Adjust.
7456 (i386_thread_added): Adjust.
7458 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7460 * linux-low.h (linux_thread_area): Delete declaration.
7462 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7464 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7465 after its termination.
7467 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7469 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7470 (gdb_wants_all_stopped): Delete.
7471 (linux_wait_1): Don't call them.
7472 * server.c (handle_v_cont): Tag all threads as want-stopped.
7473 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7474 stopped as "client-wants-stopped".
7476 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7478 * Makefile.in (signals_h): New.
7479 (server_h): Depend on it.
7480 (server.o): Don't depend on $(signals_def).
7481 (signals.o): Depend on $(signals_def).
7483 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7485 * Makefile.in (signals_def): New.
7486 (server_h): Append include/gdb/signals.h and signals_def.
7487 (server.o): Append signals_def.
7489 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7491 * server.c (handle_target_event): Use target_signal_to_host for
7492 resume_info.sig initialization.
7493 * target.h (struct thread_resume) <sig>: New comment.
7495 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7497 * server.c (handle_query): strcpy() the returned string from paddress()
7498 instead of sprintf().
7499 * utils.c (paddress): Return phex_nz().
7501 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7503 * server.c (handle_v_cont): Call mourn_inferior if process
7505 (myresume): Likewise.
7507 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7509 Static tracepoints, and integration with UST.
7511 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7512 * mem-break.c (uninsert_all_breakpoints)
7513 (reinsert_all_breakpoints): New.
7514 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7515 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7516 (gdb_agent_ust_loaded, helper_thread_id)
7517 (gdb_agent_helper_thread_id): New macros.
7518 (struct ipa_sym_addresses): Add addr_ust_loaded,
7519 addr_helper_thread_id, addr_cmd_buf.
7520 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7521 (in_process_agent_loaded_ust): New.
7522 (write_e_ust_not_loaded): New.
7523 (maybe_write_ipa_ust_not_loaded): New.
7524 (struct collect_static_trace_data_action): New.
7525 (enum tracepoint_type) <static_tracepoint>: New.
7526 (struct tracepoint) <handle>: Mention static tracepoints.
7527 (struct static_tracepoint_ctx): New.
7528 (CMD_BUF_SIZE): New.
7529 (add_tracepoint_action): Handle static tracepoint actions.
7530 (unprobe_marker_at): New.
7531 (clear_installed_tracepoints): Handle static tracepoints.
7532 (cmd_qtdp): Handle static tracepoints.
7533 (probe_marker_at): New.
7534 (cmd_qtstart): Handle static tracepoints.
7535 (response_tracepoint): Handle static tracepoints.
7536 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7537 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7538 (get_context_regcache): Handle static tracepoints.
7539 (do_action_at_tracepoint): Handle static tracepoint actions.
7540 (traceframe_find_block_type): Handle static trace data blocks.
7541 (traceframe_read_sdata): New.
7542 (download_tracepoints): Download static tracepoint actions.
7543 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7544 (GDB_PROBE_NAME): New.
7549 (ust_marker_to_static_tracepoint): New.
7551 (collect_ust_data_at_tracepoint): New.
7552 (gdb_ust_probe): New.
7553 (UNIX_PATH_MAX, SOCK_DIR): New.
7554 (gdb_ust_connect_sync_socket): New.
7555 (resume_thread, stop_thread): New.
7556 (run_inferior_command): New.
7557 (init_named_socket): New.
7558 (gdb_ust_socket_init): New.
7559 (cstr_to_hexstr): New.
7561 (first_marker, next_marker): New.
7562 (response_ust_marker): New.
7563 (cmd_qtfstm, cmd_qtsstm): New.
7564 (unprobe_marker_at, probe_marker_at): New.
7565 (cmd_qtstmat, gdb_ust_thread): New.
7566 (gdb_ust_init): New.
7567 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7568 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7570 (x86_64_st_collect_regmap): New.
7571 (X86_64_NUM_ST_COLLECT_GREGS): New.
7572 (AMD64_RIP_REGNUM): New.
7573 (supply_static_tracepoint_registers): New.
7574 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7576 (i386_st_collect_regmap): New.
7577 (i386_NUM_ST_COLLECT_GREGS): New.
7578 (supply_static_tracepoint_registers): New.
7579 * server.c (handle_query): Handle qXfer:statictrace:read.
7580 <qSupported>: Report support for StaticTracepoints, and
7581 qXfer:statictrace:read features.
7582 * server.h (traceframe_read_sdata)
7583 (supply_static_tracepoint_registers): Declare.
7584 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7585 (unpack_varlen_hex): Include in IPA build.
7586 * Makefile.in (ustlibs, ustinc): New.
7587 (IPA_OBJS): Add remote-utils-ipa.o.
7588 ($(IPA_LIB)): Link -ldl and -lpthread.
7590 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7591 * config.in, configure: Regenerate.
7593 2010-06-20 Ian Lance Taylor <iant@google.com>
7594 Pedro Alves <pedro@codesourcery.com>
7596 * linux-x86-low.c (always_true): Delete.
7597 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7598 trying to fool the compiler with always_true.
7600 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7602 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7603 conditions in gdbserver.
7605 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7607 * spu-low.c (spu_read_memory): Wrap around local store limit.
7608 (spu_write_memory): Likewise.
7610 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7612 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7613 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7615 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7617 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7618 uses with LONGEST uses.
7620 2010-06-14 Stan Shebs <stan@codesourcery.com>
7621 Pedro Alves <pedro@codesourcery.com>
7625 * linux-x86-low.c: Include limits.h.
7630 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7631 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7632 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7633 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7634 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7635 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7636 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7637 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7638 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7639 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7640 (amd64_emit_void_call_2): New.
7641 (amd64_emit_ops): New.
7642 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7643 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7644 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7645 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7646 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7647 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7648 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7649 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7650 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7651 (i386_emit_stack_adjust, i386_emit_int_call_1)
7652 (i386_emit_void_call_2): New.
7653 (i386_emit_ops): New.
7654 (x86_emit_ops): New.
7655 (the_low_target): Install x86_emit_ops.
7656 * server.h (struct emit_ops): New.
7657 (get_raw_reg_func_addr): Declare.
7658 (current_insn_ptr, emit_error): Declare.
7659 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7660 (set_trace_state_variable_value): New defines.
7661 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7662 addr_get_trace_state_variable_value and
7663 addr_set_trace_state_variable_value.
7664 (symbol_list): New fields for get_raw_reg,
7665 get_trace_state_variable_value and set_trace_state_variable_value.
7666 (condfn): New typedef.
7667 (struct tracepoint): New field `compiled_cond'.
7668 (do_action_at_tracepoint): Clear compiled_cond.
7669 (get_trace_state_variable_value, set_trace_state_variable_value):
7671 (condition_true_at_tracepoint): If there's a compiled condition,
7673 (current_insn_ptr, emit_error): New globals.
7674 (struct bytecode_address): New.
7675 (get_raw_reg_func_addr): New.
7676 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7677 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7678 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7679 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7680 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7681 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7682 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7683 (compile_tracepoint_condition, compile_bytecodes): New.
7684 * target.h (emit_ops): Forward declare.
7685 (struct target_ops): New field emit_ops.
7686 (target_emit_ops): New.
7687 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7688 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7689 * linux-low.c (linux_emit_ops): New.
7690 (linux_target_ops): Install it.
7691 * linux-low.h (struct linux_target_ops): New field emit_ops.
7693 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7695 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7696 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7698 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7699 Stan Shebs <stan@codesourcery.com>
7701 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7702 (all): Depend on $(extra_libraries).
7703 (install-only): Install the IPA.
7704 (IPA_OBJS, IPA_LIB): New.
7705 (clean): Remove the IPA lib.
7706 (IPAGENT_CFLAGS): New.
7707 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7708 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7709 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7710 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7711 * configure.ac: Check for atomic builtins support in the compiler.
7712 (IPA_DEPFILES, extra_libraries): Define.
7713 * configure.srv (ipa_obj): Add description.
7714 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7715 (i[34567]86-*-linux*): Set ipa_obj.
7716 (x86_64-*-linux*): Set ipa_obj.
7717 * linux-low.c (stabilizing_threads): New.
7718 (supports_fast_tracepoints): New.
7719 (linux_detach): Stabilize threads before detaching.
7720 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7721 the lwp is either not stabilizing, or is moving out of a jump pad.
7722 (linux_fast_tracepoint_collecting): New.
7723 (maybe_move_out_of_jump_pad): New.
7724 (enqueue_one_deferred_signal): New.
7725 (dequeue_one_deferred_signal): New.
7726 (linux_wait_for_event_1): If moving out of a jump pad, defer
7727 pending signals to later.
7728 (linux_stabilize_threads): New.
7729 (linux_wait_1): Check if threads need moving out of jump pads, and
7731 (stuck_in_jump_pad_callback): New.
7732 (move_out_of_jump_pad_callback): New.
7734 (linux_resume_one_lwp): Handle moving out of jump pads.
7735 (linux_set_resume_request): Dequeue deferred signals.
7736 (need_step_over_p): Also step over fast tracepoint jumps.
7737 (start_step_over): Also uninsert fast tracepoint jumps.
7738 (finish_step_over): Also reinsert fast tracepoint jumps.
7739 (linux_install_fast_tracepoint_jump): New.
7740 (linux_target_ops): Install linux_stabilize_threads and
7741 linux_install_fast_tracepoint_jump_pad.
7742 * linux-low.h (linux_target_ops) <get_thread_area,
7743 install_fast_tracepoint_jump_pad>: New fields.
7744 (struct lwp_info) <collecting_fast_tracepoint,
7745 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7746 (linux_get_thread_area): Declare.
7747 * linux-x86-low.c (jump_insn): New.
7748 (x86_get_thread_area): New.
7749 (append_insns): New.
7751 (amd64_install_fast_tracepoint_jump_pad): New.
7752 (i386_install_fast_tracepoint_jump_pad): New.
7753 (x86_install_fast_tracepoint_jump_pad): New.
7754 (the_low_target): Install x86_get_thread_area and
7755 x86_install_fast_tracepoint_jump_pad.
7756 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7757 (struct fast_tracepoint_jump): New.
7758 (fast_tracepoint_jump_insn): New.
7759 (fast_tracepoint_jump_shadow): New.
7760 (find_fast_tracepoint_jump_at): New.
7761 (fast_tracepoint_jump_here): New.
7762 (delete_fast_tracepoint_jump): New.
7763 (set_fast_tracepoint_jump): New.
7764 (uninsert_fast_tracepoint_jumps_at): New.
7765 (reinsert_fast_tracepoint_jumps_at): New.
7766 (set_breakpoint_at): Use write_inferior_memory.
7767 (uninsert_raw_breakpoint): Use write_inferior_memory.
7768 (check_mem_read): Mask out fast tracepoint jumps.
7769 (check_mem_write): Mask out fast tracepoint jumps.
7770 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7771 (set_fast_tracepoint_jump): Declare.
7772 (delete_fast_tracepoint_jump)
7773 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7774 (reinsert_fast_tracepoint_jumps_at): Declare.
7775 * regcache.c: Don't compile many functions when building the
7776 in-process agent library.
7777 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7778 the register buffer in the heap.
7779 (free_register_cache): If the register buffer isn't owned by the
7780 regcache, don't free it.
7781 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7782 pre-existing register caches.
7783 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7785 (convert_ascii_to_int): : Constify `from' parameter type.
7786 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7787 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7788 the needed buffer in-place.
7789 (relocate_instruction): New.
7790 * server.c (handle_query) <qSymbols>: If the target supports
7791 tracepoints, give it a chance of looking up symbols. Report
7792 support for fast tracepoints.
7793 (handle_status): Stabilize threads.
7794 (process_serial_event): Adjust.
7795 * server.h (struct fast_tracepoint_jump): Forward declare.
7796 (struct process_info) <fast_tracepoint_jumps>: New field.
7797 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7798 (decode_X_packet, decode_M_packet): Adjust.
7799 (relocate_instruction): Declare.
7800 (in_process_agent_loaded): Declare.
7801 (tracepoint_look_up_symbols): Declare.
7802 (struct fast_tpoint_collect_status): Declare.
7803 (fast_tracepoint_collecting): Declare.
7804 (force_unlock_trace_buffer): Declare.
7805 (handle_tracepoint_bkpts): Declare.
7806 (initialize_low_tracepoint)
7807 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7808 * target.h (struct target_ops) <stabilize_threads,
7809 install_fast_tracepoint_jump_pad>: New fields.
7810 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7811 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7812 [HAVE_STDINT_H]: Include stdint.h.
7813 (trace_debug_1): Rename to ...
7814 (trace_vdebug): ... this.
7815 (trace_debug): Rename to ...
7816 (trace_debug_1): ... this. Add `level' parameter.
7818 (ATTR_USED, ATTR_NOINLINE): New.
7819 (IP_AGENT_EXPORT): New.
7820 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7821 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7822 (about_to_request_buffer_space, trace_buffer_is_full)
7823 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7824 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7825 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7826 (traceframe_write_count, traceframes_created)
7827 (trace_state_variables)
7828 New renaming defines.
7829 (struct ipa_sym_addresses): New.
7830 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7832 (ipa_sym_addrs): New.
7833 (all_tracepoint_symbols_looked_up): New.
7834 (in_process_agent_loaded): New.
7835 (write_e_ipa_not_loaded): New.
7836 (maybe_write_ipa_not_loaded): New.
7837 (tracepoint_look_up_symbols): New.
7838 (debug_threads) [IN_PROCESS_AGENT]: New.
7839 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7840 (UNKNOWN_SIDE_EFFECTS): New.
7841 (stop_tracing): New.
7842 (flush_trace_buffer): New.
7843 (stop_tracing_bkpt): New.
7844 (flush_trace_buffer_bkpt): New.
7845 (read_inferior_integer): New.
7846 (read_inferior_uinteger): New.
7847 (read_inferior_data_pointer): New.
7848 (write_inferior_data_pointer): New.
7849 (write_inferior_integer): New.
7850 (write_inferior_uinteger): New.
7851 (struct collect_static_trace_data_action): Delete.
7852 (enum tracepoint_type): New.
7853 (struct tracepoint) <type>: New field `type'.
7854 <actions_str, step_actions, step_actions_str>: Only include in
7856 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7857 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7858 (tracepoints): Use IP_AGENT_EXPORT.
7859 (last_tracepoint): Don't include in the IPA.
7860 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7861 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7862 (alloced_trace_state_variables): New.
7863 (trace_state_variables): Use IP_AGENT_EXPORT.
7864 (traceframe_t): Delete unused variable.
7865 (circular_trace_buffer): Don't include in the IPA.
7866 (trace_buffer_start): Delete.
7867 (struct trace_buffer_control): New.
7868 (trace_buffer_free): Delete.
7869 (struct ipa_trace_buffer_control): New.
7870 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7871 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7873 (trace_buffer_ctrl): New.
7874 (TRACE_BUFFER_CTRL_CURR): New.
7875 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7876 Reimplement as macros.
7877 (trace_buffer_wrap): Delete.
7878 (traceframe_write_count, traceframe_read_count)
7879 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7880 (struct tracepoint_hit_ctx) <type>: New field.
7881 (struct fast_tracepoint_ctx): New.
7882 (memory_barrier): New.
7884 (record_tracepoint_error): Update atomically in the IPA.
7885 (clear_inferior_trace_buffer): New.
7886 (about_to_request_buffer_space): New.
7887 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7888 updating the same buffer.
7889 (add_tracepoint): Default the tracepoint's type to trap
7890 tracepoint, and orig_size to -1.
7891 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7893 (create_trace_state_variable): New parameter `gdb'. Handle it.
7894 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7895 (cmd_qtdp): Handle fast tracepoints.
7897 (max_jump_pad_size): New.
7898 (gdb_jump_pad_head): New.
7899 (get_jump_space_head): New.
7900 (claim_jump_space): New.
7901 (sort_tracepoints): New.
7902 (MAX_JUMP_SIZE): New.
7903 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7905 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7906 support. Upload fast traceframes, and delete internal IPA
7908 (stop_tracing_handler): New.
7909 (flush_trace_buffer_handler): New.
7910 (cmd_qtstop): Upload fast tracepoints.
7911 (response_tracepoint): Handle fast tracepoints.
7912 (tracepoint_finished_step): Upload fast traceframes. Set the
7913 tracepoint hit context's tracepoint type.
7914 (handle_tracepoint_bkpts): New.
7915 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7916 type. Add comment about fast tracepoints.
7917 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7918 non-existing action_str field.
7919 (get_context_regcache): Handle fast tracepoints.
7920 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7922 (fast_tracepoint_from_jump_pad_address): New.
7923 (fast_tracepoint_from_ipa_tpoint_address): New.
7924 (collecting_t): New.
7925 (force_unlock_trace_buffer): New.
7926 (fast_tracepoint_collecting): New.
7929 (write_inferior_data_ptr): New.
7930 (target_tp_heap): New.
7931 (target_malloc): New.
7932 (download_agent_expr): New.
7934 (download_tracepoints): New.
7935 (download_trace_state_variables): New.
7936 (upload_fast_traceframes): New.
7937 (IPA_FIRST_TRACEFRAME): New.
7938 (IPA_NEXT_TRACEFRAME_1): New.
7939 (IPA_NEXT_TRACEFRAME): New.
7940 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7941 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7942 (gdb_jump_pad_buffer_end): New.
7943 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7944 (initialize_tracepoint): Adjust.
7945 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7946 buffer. Initialize the low module.
7947 * utils.c (PREFIX, TOOLNAME): New.
7948 (malloc_failure): Use PREFIX.
7949 (error): In the IPA, an error causes an exit.
7950 (fatal, warning): Use PREFIX.
7951 (internal_error): Use TOOLNAME.
7952 (NUMCELLS): Increase to 10.
7953 * configure, config.in: Regenerate.
7955 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7957 * server.c (handle_query) <qSupported>: Do two passes over the
7958 qSupported string to avoid nesting strtok.
7960 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7962 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7964 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7966 * configure: Regenerate.
7967 * proc-service.list: New.
7969 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7971 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7974 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7976 * gdbreplay.c (remote_open): Check error return from socket() call by
7977 its equality to -1 not by it being negative.
7978 * remote-utils.c (remote_open): Likewise.
7980 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7982 * config.h: Regenerate.
7984 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7986 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7987 doesn't provide PTRACE_GET_THREAD_AREA.
7989 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7991 * linux-m68k-low.c: Include <asm/ptrace.h>
7992 (ps_get_thread_area): Implement.
7994 2010-05-03 Doug Evans <dje@google.com>
7996 * event-loop.c (struct callback_event): New struct.
7997 (callback_list): New global.
7998 (append_callback_event, delete_callback_event): New functions.
7999 (process_callback): New function.
8000 (start_event_loop): Call it.
8001 * remote-utils.c (NOT_SCHEDULED): Define.
8002 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8003 moved out of readchar.
8004 (readchar): Rewrite. Call reschedule before returning.
8005 (reset_readchar): New function.
8006 (remote_close): Call it.
8007 (process_remaining, reschedule): New functions.
8008 * server.h (callback_handler_func): New typedef.
8009 (append_callback_event, delete_callback_event): Declare.
8011 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8013 * proc-service.c (ps_pglobal_lookup): Use
8014 thread_db_look_up_one_symbol.
8015 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8016 parameter. Use it instead of all_symbols_looked_up.
8017 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8019 (all_symbols_looked_up): Don't declare.
8020 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8021 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8023 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8024 Set all_symbols_looked_up here.
8025 (thread_db_look_up_one_symbol): New.
8026 (thread_db_get_tls_address): Adjust.
8027 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8028 thread_db object on the heap, and tentatively set it in the
8030 (thread_db_init): Don't set all_symbols_looked_up here.
8031 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8033 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8035 * linux-low.c (linux_kill, linux_detach): Adjust.
8036 (status_pending_p_callback): Remove redundant statement. Check
8037 for !TARGET_WAITIKIND_IGNORE, instead of
8038 TARGET_WAITKIND_STOPPED.
8039 (handle_tracepoints): Make sure LWP is locked. Adjust.
8040 (linux_wait_for_event_1): Adjust.
8041 (linux_cancel_breakpoints): New.
8042 (unsuspend_one_lwp): New.
8043 (unsuspend_all_lwps): New.
8044 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8045 (send_sigstop_callback): Change return type to int, add new
8046 `except' parameter and handle it.
8047 (suspend_and_send_sigstop_callback): New.
8048 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8049 pass them down. If SUSPEND, also increment the lwp's suspend
8051 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8052 (need_step_over_p): Don't consider suspended LWPs.
8053 (start_step_over): Adjust.
8054 (proceed_one_lwp): Change return type to int, add new `except'
8055 parameter and handle it.
8056 (unsuspend_and_proceed_one_lwp): New.
8057 (proceed_all_lwps): Use find_inferior instead of
8059 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8060 also decrement the suspend count of LWPs. Pass `except' down,
8061 instead of hacking its suspend count.
8062 (linux_pause_all): Add `freeze' parameter. Adjust.
8063 (linux_unpause_all): New.
8064 (linux_target_ops): Install linux_unpause_all.
8065 * server.c (handle_status): Adjust.
8066 * target.h (struct target_ops): New fields `unpause_all' and
8067 `cancel_breakpoints'. Add new parameter to `pause_all'.
8068 (pause_all): Add new `freeze' parameter.
8070 (cancel_breakpoints): New.
8071 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8073 (cmd_qtstart): Pause threads.
8074 (stop_tracing): Pause threads, and cancel breakpoints.
8075 * win32-low.c (win32_target_ops): Adjust.
8077 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8079 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8080 the inferior right away from here...
8081 (linux_wait_1): ... to here, and adjust to check the thread's
8082 last_resume_kind instead of the lwp's step or stop_expected flags.
8084 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8086 * README: Use consistent `GDB' and `GDBserver' spellings.
8088 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8090 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8091 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8092 (linux_detach_one_lwp): Assume the lwp is stopped.
8093 (any_thread_of): Delete.
8094 (linux_detach): Stop all lwps here. Don't blindly delete all
8096 (delete_lwp_callback): New.
8097 (linux_mourn): Delete all lwps of the process that is gone.
8098 (linux_wait_1): Don't delete the last lwp of the process here.
8099 * mem-break.h (mark_breakpoints_out): Declare.
8100 * mem-break.c (mark_breakpoints_out): New.
8101 (free_all_breakpoints): Use it.
8102 * server.c (handle_target_event): If the process is gone, mark
8104 * thread-db.c (struct thread_db) <create_bp>: New field.
8105 (thread_db_enable_reporting): Fix prototype. Store a thread event
8106 breakpoint reference in the thread_db struct.
8107 (thread_db_load_search): Clear the thread_db object.
8108 (try_thread_db_load_1): Ditto.
8109 (switch_to_process): New.
8110 (disable_thread_event_reporting): Use it.
8111 (remove_thread_event_breakpoints): New.
8112 (thread_db_detach, thread_db_mourn): Use it.
8114 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8116 * linux-low.c (linux_enable_event_reporting): New.
8117 (linux_wait_for_event_1, handle_extended_wait): Use it.
8119 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8121 * linux-low.c (linux_kill_one_lwp, linux_kill)
8122 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8123 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8124 SIGSTOP even if the LWP is stopped.
8125 (send_sigstop_callback): New.
8126 (stop_all_lwps): Use send_sigstop_callback instead.
8127 (linux_resume_one_thread): Adjust.
8128 (proceed_one_lwp): Still proceed an LWP that the client has
8129 requested to stop, if we haven't reported it as stopped yet. Make
8130 sure that LWPs the client want stopped, have a pending SIGSTOP.
8132 2010-04-26 Doug Evans <dje@google.com>
8134 * server.c (handle_general_set): Make static.
8136 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8137 Print received char after testing for error/eof instead of before.
8138 (input_interrupt): Tweak comment.
8140 2010-04-23 Doug Evans <dje@google.com>
8142 * server.c (start_inferior): Print inferior argv if --debug.
8144 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8146 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8147 * nto-x86-low.c: Include server.h
8149 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8151 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8152 be consistent with other sources of this directory.
8153 (init_registers_amd64): Correct name of source file of this function
8156 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8158 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8161 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8163 * win32-i386-low.c: Add 64-bit support.
8164 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8165 (init_registers_amd64): Declare.
8166 (mappings): Add 64-bit version of array.
8167 (init_windows_x86): New function.
8168 (the_low_target): Change init_arch field to init_windows_x86.
8170 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8172 * win32-low.c: Adapt to support also 64-bit architecture.
8173 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8174 (get_image_name): Use SIZE_T type for local variable `done'.
8175 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8176 (toolhelp_get_dll_name): Idem.
8177 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8178 Use uintptr_t typecast to avoid warning.
8179 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8180 (handle_exception): Use phex_nz to avoid warning.
8181 (win32_wait): Remove unused local variable `process'.
8183 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8185 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8188 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8190 * configure.ac: Use `ws2_32' library for srv_mingw.
8191 * configure: Regenerate.
8192 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8193 * remote-utils.c: Likewise.
8195 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8197 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8198 if __x86_64__ is defined.
8200 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8202 * configure: Regenerate.
8204 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8206 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8207 * target.h (target_ops): New get_tib_address field.
8208 * win32-low.h (win32_thread_info): Add thread_local_base field.
8209 * win32-low.c (child_add_thread): Add tlb argument.
8210 Set thread_local_base field to TLB.
8211 (get_child_debug_event): Adapt to child_add_thread change.
8212 (win32_get_tib_address): New function.
8213 (win32_target_ops): Set get_tib_address field to
8214 win32_get_tib_address.
8215 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8217 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8219 * linux-low.c (linux_mourn): Also remove the process.
8220 * server.c (handle_target_event): Don't remove the process here.
8221 * nto-low.c (nto_mourn): New.
8222 (nto_target_ops): Install it.
8223 * spu-low.c (spu_mourn): New.
8224 (spu_target_ops): Install it.
8225 * win32-low.c (win32_mourn): New.
8226 (win32_target_ops): Install it.
8228 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8230 * server.h (buffer_xml_printf): Remove redundant `;'.
8232 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8234 * regcache.c (set_register_cache): Invalidate regcaches before
8235 changing the register cache layout.
8236 (regcache_invalidate_one): Allow a NULL regcache.
8237 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8238 regcaches before changing the register cache layout or the target
8241 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8243 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8244 variable warning on Linux/x86-64.
8246 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8248 GDBserver disconnected tracing support.
8250 * linux-low.c (linux_remove_process): Delete.
8251 (add_lwp): Don't set last_resume_kind here.
8252 (linux_kill): Use `mourn'.
8253 (linux_detach): Use `thread_db_detach', and `mourn'.
8255 (linux_attach_lwp_1): Adjust comment.
8256 (linux_attach): last_resume_kind moved the thread_info; adjust.
8257 (status_pending_p_callback): Adjust.
8258 (linux_wait_for_event_1): Adjust.
8259 (count_events_callback, select_singlestep_lwp_callback)
8260 (select_event_lwp_callback, cancel_breakpoints_callback)
8261 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8262 (proceed_one_lwp): Adjust.
8263 (linux_async): Add debug output.
8264 (linux_thread_stopped): New.
8265 (linux_pause_all): New.
8266 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8268 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8269 (thread_db_free): Delete declaration.
8270 (thread_db_detach, thread_db_mourn): Declare.
8271 * thread-db.c (thread_db_init): Use thread_db_mourn.
8272 (thread_db_free): Delete, split in two.
8273 (disable_thread_event_reporting): New.
8274 (thread_db_detach): New.
8275 (thread_db_mourn): New.
8277 * server.h (struct thread_info) <last_resume_kind>: New field.
8278 <attached>: Add comment.
8279 <gdb_detached>: New field.
8280 (handler_func): Change return type to int.
8281 (handle_serial_event, handle_target_event): Ditto.
8282 (gdb_connected): Declare.
8284 (disconnected_tracing): Declare.
8285 (stop_tracing): Declare.
8287 * server.c (handle_query) <qSupported>: Report support for
8288 disconnected tracing.
8289 (queue_stop_reply_callback): Account for running threads.
8290 (gdb_wants_thread_stopped): New.
8291 (gdb_wants_all_threads_stopped): New.
8292 (gdb_reattached_process): New.
8293 (handle_status): Clear the `gdb_detached' flag of all processes.
8294 In all-stop, stop all threads.
8295 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8296 (process_serial_event): If the remote connection breaks, or if an
8297 exit was forced with "monitor exit", force an event loop exit.
8298 Handle disconnected tracing on detach.
8299 (handle_serial_event): Adjust.
8300 (handle_target_event): If GDB isn't connected, forward events back
8301 to the inferior, unless the last process exited, in which case,
8302 exit gdbserver. Adjust interface.
8304 * remote-utils.c (remote_open): Don't block in accept. Instead
8305 register an event loop source on the listen socket file
8306 descriptor. Refactor bits into ...
8307 (listen_desc): ... this new global.
8308 (gdb_connected): ... this new function.
8309 (enable_async_notification): ... this new function.
8310 (handle_accept_event): ... this new function.
8311 (remote_close): Clear remote_desc.
8313 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8315 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8317 (mourn_inferior): Define.
8318 (target_process_qsupported): Avoid the dangling else problem.
8319 (thread_stopped): Define.
8320 (pause_all): Define.
8321 (target_waitstatus_to_string): Declare.
8322 * target.c (target_waitstatus_to_string): New.
8324 * tracepoint.c (tracing): Make extern.
8325 (disconnected_tracing): New.
8326 (stop_tracing): Make extern. Handle tracing stops due to GDB
8328 (cmd_qtdisconnected): New.
8329 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8330 (handle_tracepoint_general_set): Handle QTDisconnected.
8332 * event-loop.c (event_handler_func): Change return type to int.
8333 (process_event): Bail out if the event handler wants the event
8335 (handle_file_event): Ditto.
8336 (start_event_loop): Bail out if the event handler wants the event
8339 * nto-low.c (nto_target_ops): Adjust.
8340 * spu-low.c (spu_wait): Don't remove the process here.
8341 (spu_target_ops): Adjust.
8342 * win32-low.c (win32_wait): Don't remove the process here.
8343 (win32_target_ops): Adjust.
8345 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8347 * regcache.c (realloc_register_cache): Invalidate inferior's
8348 regcache before recreating it.
8350 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8352 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8354 2010-04-09 Stan Shebs <stan@codesourcery.com>
8355 Pedro Alves <pedro@codesourcery.com>
8357 * server.h (LONGEST): New.
8358 (struct thread_info) <while_stepping>: New field.
8359 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8361 (initialize_tracepoint, handle_tracepoint_general_set)
8362 (handle_tracepoint_query, tracepoint_finished_step)
8363 (tracepoint_was_hit, release_while_stepping_state_list):
8364 (current_traceframe): Declare.
8365 * server.c (handle_general_set): Handle tracepoint packets.
8367 (write_memory): New.
8368 (handle_search_memory_1): Use read_memory.
8369 (handle_query): Report support for conditional tracepoints, trace
8370 state variables, and tracepoint sources. Handle tracepoint
8372 (main): Initialize the tracepoints module.
8373 (process_serial_event): Handle traceframe reads/writes.
8375 * linux-low.c (handle_tracepoints): New.
8376 (linux_wait_1): Call it.
8377 (linux_resume_one_lwp): Handle while-stepping.
8378 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8379 (linux_target_ops): Install them.
8380 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8382 * linux-x86-low.c (x86_supports_tracepoints): New.
8383 (the_low_target). Install it.
8385 * mem-break.h (delete_breakpoint): Declare.
8386 * mem-break.c (delete_breakpoint): Make external.
8388 * target.h (struct target_ops): Add `supports_tracepoints',
8389 `read_pc', and `write_pc' fields.
8390 (target_supports_tracepoints): Define.
8391 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8394 * regcache.h (struct regcache) <registers_owned>: New field.
8395 (init_register_cache, regcache_cpy): Declare.
8396 (regcache_read_pc, regcache_write_pc): Declare.
8397 (register_cache_size): Declare.
8398 (supply_regblock): Declare.
8399 * regcache.c (init_register_cache): New.
8400 (new_register_cache): Use it.
8401 (regcache_cpy): New.
8402 (register_cache_size): New.
8403 (supply_regblock): New.
8404 (regcache_read_pc, regcache_write_pc): New.
8406 * tracepoint.c: New.
8408 * Makefile.in (OBS): Add tracepoint.o.
8409 (tracepoint.o): New rule.
8411 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8413 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8415 (i386-mmx.c): Likewise.
8416 (i386-mmx-linux.o): Likewise.
8417 (i386-mmx-linux.c): Likewise.
8419 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8420 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8421 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8422 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8424 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8425 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8426 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8428 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8430 * Makefile.in (clean): Updated.
8432 (i386-avx.c): Likewise.
8433 (i386-avx-linux.o): Likewise.
8434 (i386-avx-linux.c): Likewise.
8435 (amd64-avx.o): Likewise.
8436 (amd64-avx.c): Likewise.
8437 (amd64-avx-linux.o): Likewise.
8438 (amd64-avx-linux.c): Likewise.
8440 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8441 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8442 (srv_amd64_regobj): Add amd64-avx.o.
8443 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8444 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8445 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8446 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8447 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8448 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8449 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8451 * i387-fp.c: Include "i386-xstate.h".
8453 (i387_cache_to_xsave): Likewise.
8454 (i387_xsave_to_cache): Likewise.
8455 (x86_xcr0): Likewise.
8457 * i387-fp.h (i387_cache_to_xsave): Likewise.
8458 (i387_xsave_to_cache): Likewise.
8459 (x86_xcr0): Likewise.
8461 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8462 * linux-crisv32-low.c (target_regsets): Likewise.
8463 * linux-m68k-low.c (target_regsets): Likewise.
8464 * linux-mips-low.c (target_regsets): Likewise.
8465 * linux-ppc-low.c (target_regsets): Likewise.
8466 * linux-s390-low.c (target_regsets): Likewise.
8467 * linux-sh-low.c (target_regsets): Likewise.
8468 * linux-sparc-low.c (target_regsets): Likewise.
8469 * linux-xtensa-low.c (target_regsets): Likewise.
8471 * linux-low.c: Include <sys/uio.h>.
8472 (regsets_fetch_inferior_registers): Support nt_type.
8473 (regsets_store_inferior_registers): Likewise.
8474 (linux_process_qsupported): New.
8475 (linux_target_ops): Add linux_process_qsupported.
8477 * linux-low.h (regset_info): Add nt_type.
8478 (linux_target_ops): Add process_qsupported.
8480 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8482 (init_registers_i386_avx_linux): New.
8483 (init_registers_amd64_avx_linux): Likewise.
8484 (xmltarget_i386_linux_no_xml): Likewise.
8485 (xmltarget_amd64_linux_no_xml): Likewise.
8486 (PTRACE_GETREGSET): Likewise.
8487 (PTRACE_SETREGSET): Likewise.
8488 (x86_fill_xstateregset): Likewise.
8489 (x86_store_xstateregset): Likewise.
8490 (use_xml): Likewise.
8491 (x86_linux_update_xmltarget): Likewise.
8492 (x86_linux_process_qsupported): Likewise.
8493 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8494 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8495 init_registers_i386_linux here. Call
8496 x86_linux_update_xmltarget.
8497 (the_low_target): Add x86_linux_process_qsupported.
8499 * server.c (handle_query): Call target_process_qsupported.
8501 * target.h (target_ops): Add process_qsupported.
8502 (target_process_qsupported): New.
8504 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8506 * inferiors.c (add_thread): Set last_status kind to
8507 TARGET_WAITKIND_IGNORE.
8508 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8509 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8510 (linux_wait_1): Move `thread' local definition to block that uses
8511 it. Don't NULL initialize `event_child'.
8512 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8513 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8514 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8516 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8518 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8519 an extended waitstatus, or by a watchpoint.
8520 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8521 thread was stepping or has been stopped by a watchpoint.
8523 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8525 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8526 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8527 of another, then delete the previous, and validate all
8529 (validate_inserted_breakpoint): New.
8530 (delete_disabled_breakpoints): New.
8531 (validate_breakpoints): New.
8532 (check_mem_read): Validate breakpoints before trusting their
8533 shadow. Delete disabled breakpoints.
8534 (check_mem_write): Validate breakpoints before trusting they
8535 should be inserted. Delete disabled breakpoints.
8536 * mem-break.h (validate_breakpoints):
8537 * server.c (handle_query): Validate breakpoints when we see a
8540 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8542 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8543 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8544 if we could tell there's a GDB breakpoint at stop_pc.
8545 (need_step_over_p): Don't do a step over if we find a GDB
8546 breakpoint at the resume PC.
8548 * mem-break.c (struct raw_breakpoint): New.
8549 (enum bkpt_type): New type `gdb_breakpoint'.
8550 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8551 fields. New field `raw'.
8552 (find_raw_breakpoint_at): New.
8553 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8555 (set_breakpoint_at): Adjust.
8556 (delete_raw_breakpoint): New.
8557 (release_breakpoint): New.
8558 (delete_breakpoint): Rename to...
8559 (delete_breakpoint_1): ... this. Add proc parameter. Use
8560 release_breakpoint. Return ENOENT.
8561 (delete_breakpoint): Reimplement.
8562 (find_breakpoint_at): Delete.
8563 (find_gdb_breakpoint_at): New.
8564 (delete_breakpoint_at): Delete.
8565 (set_gdb_breakpoint_at): New.
8566 (delete_gdb_breakpoint_at): New.
8567 (gdb_breakpoint_here): New.
8568 (set_reinsert_breakpoint): Use release_breakpoint.
8569 (uninsert_breakpoint): Rename to ...
8570 (uninsert_raw_breakpoint): ... this.
8571 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8572 (reinsert_raw_breakpoint): Change parameter type to
8574 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8576 (check_breakpoints): Adjust. Use release_breakpoint.
8577 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8578 (breakpoint_inserted_here): Ditto.
8579 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8580 Don't trust the breakpoint's shadow if it is not inserted.
8581 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8582 (delete_all_breakpoints): Adjust.
8583 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8584 use delete_breakpoint_1.
8586 * mem-break.h (breakpoints_supported): Delete declaration.
8587 (set_gdb_breakpoint_at): Declare.
8588 (gdb_breakpoint_here): Declare.
8589 (delete_breakpoint_at): Delete.
8590 (delete_gdb_breakpoint_at): Declare.
8592 * server.h (struct raw_breakpoint): Forward declare.
8593 (struct process_info): New field `raw_breakpoints'.
8595 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8598 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8600 * linux-low.c (status_pending_p_callback): Fix comment.
8601 (linux_wait_for_event_1): Move most of the internal breakpoint
8602 handling from here...
8603 (linux_wait_1): ... to here.
8604 (count_events_callback): New.
8605 (select_singlestep_lwp_callback): New.
8606 (select_event_lwp_callback): New.
8607 (cancel_breakpoints_callback): New.
8608 (select_event_lwp): New.
8609 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8610 priority to all LWPs that have had events that should be reported
8611 to the client. Cancel breakpoints when about to reporting the
8612 event to the client, not while stopping lwps. No longer cancel
8613 finished single-steps here.
8614 (cancel_finished_single_step): Delete.
8615 (cancel_finished_single_steps): Delete.
8617 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8619 * mem-break.c (enum bkpt_type): New.
8620 (struct breakpoint): New field `type'.
8621 (set_breakpoint_at): Change return type to struct breakpoint
8622 pointer. Set type to `other_breakpoint' by default.
8623 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8624 in the breakpoint list.
8625 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8626 (reinsert_breakpoint): Rename to ...
8627 (reinsert_raw_breakpoint): ... this.
8628 (reinsert_breakpoints_at): Adjust.
8629 * mem-break.h (struct breakpoint): Declare.
8630 (set_breakpoint_at): Change return type to struct breakpoint
8633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8635 * server.c (handle_query): Assign, not compare.
8637 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8639 Teach linux gdbserver to step-over-breakpoints.
8641 * linux-low.c (can_hardware_single_step): New.
8642 (supports_breakpoints): New.
8643 (handle_extended_wait): If stopping threads, read the stop pc of
8646 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8647 low target doesn't support retrieving the PC.
8648 (add_lwp): Set last_resume_kind to resume_continue.
8649 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8650 (linux_attach): Don't clear stop_expected. Set the lwp's
8651 last_resume_kind to resume_stop.
8652 (linux_detach_one_lwp): Don't check for removed breakpoints.
8653 (check_removed_breakpoint): Delete.
8654 (status_pending_p): Rename to ...
8655 (status_pending_p_callback): ... this. Don't check for removed
8656 breakpoints. Don't consider threads that are stopped from GDB's
8658 (linux_wait_for_lwp): Always read the stop_pc here.
8659 (cancel_breakpoint): New.
8660 (step_over_bkpt): New global.
8661 (linux_wait_for_event_1): Implement stepping over breakpoints.
8662 (gdb_wants_lwp_stopped): New.
8663 (gdb_wants_all_stopped): New.
8664 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8665 single-step traps here. Store the thread's last reported target
8667 (send_sigstop): Don't clear stop_expected. Always set it,
8669 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8670 (cancel_finished_single_step): New.
8671 (cancel_finished_single_steps): New.
8672 (wait_for_sigstop): Don't cancel finished single-step traps here.
8673 (linux_resume_one_lwp): Don't check for removed breakpoints.
8674 Don't set `step' on non-hardware step archs.
8675 (linux_set_resume_request): Ignore resume_stop requests if already
8676 stopping or stopped. Set the lwp's last_resume_kind.
8677 (resume_status_pending_p): Don't check for removed breakpoints.
8678 (need_step_over_p): New.
8679 (start_step_over): New.
8680 (finish_step_over): New.
8681 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8682 requests. Clear the thread's last reported target waitstatus.
8683 Don't use the `suspended' flag. Don't consider pending breakpoints.
8684 (linux_resume): Start a step-over if necessary.
8685 (proceed_one_lwp): New.
8686 (proceed_all_lwps): New.
8687 (unstop_all_lwps): New.
8688 * linux-low.h (struct lwp_info): Rewrite comment for the
8689 `suspended' flag. Add the `stop_pc' field. Delete the
8690 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8691 Add `'last_resume_kind' and `need_step_over' fields.
8692 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8693 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8694 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8695 (set_raw_breakpoint_at): New.
8696 (set_breakpoint_at): Rewrite to use it.
8697 (reinsert_breakpoint_handler): Delete.
8698 (set_reinsert_breakpoint): New.
8699 (reinsert_breakpoint_by_bp): Delete.
8700 (delete_reinsert_breakpoints): New.
8701 (uninsert_breakpoint): Rewrite.
8702 (uninsert_breakpoints_at): New.
8703 (reinsert_breakpoint): Rewrite.
8704 (reinsert_breakpoints_at): New.
8705 (check_breakpoints): Rewrite.
8706 (breakpoint_here): New.
8707 (breakpoint_inserted_here): New.
8708 (check_mem_read): Adjust.
8709 * mem-break.h (breakpoints_supported, breakpoint_here)
8710 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8711 (reinsert_breakpoint_by_bp): Delete declaration.
8712 (delete_reinsert_breakpoints): Declare.
8713 (reinsert_breakpoint): Delete declaration.
8714 (reinsert_breakpoints_at): Declare.
8715 (uninsert_breakpoint): Delete declaration.
8716 (uninsert_breakpoints_at): Declare.
8717 (check_breakpoints): Adjust prototype.
8718 * server.h: Adjust include order.
8719 (struct thread_info): Declare here. Add a `last_status' field.
8721 2010-03-23 Michael Snyder <msnyder@vmware.com>
8723 * server.c (crc32): New function.
8724 (handle_query): Add handling for 'qCRC:' request.
8726 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8728 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8729 lwp had been stopped by a watchpoint.
8731 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8733 * server.h (internal_error): Declare.
8734 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8735 * utils.c (internal_error): New function.
8737 2010-03-15 Andreas Schwab <schwab@redhat.com>
8739 * configure.srv: Fix typo setting srv_regobj.
8741 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8743 * linux-low.c (fetch_register): Avoid passing a non string literal
8745 (usr_store_inferior_registers): Ditto.
8747 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8749 * linux-low.c (linux_write_memory): Bail out early if peeking
8752 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8754 * linux-low.h (struct lwp_info): New fields
8755 `stopped_by_watchpoint' and `stopped_data_address'.
8756 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8757 here, and cache them in the lwp object.
8758 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8760 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8762 (linux_stopped_by_watchpoint): Rewrite.
8763 (linux_stopped_data_address): Rewrite.
8765 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8767 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8768 switching the current inferior, not before.
8770 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8772 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8773 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8774 i386-linux.c and amd64-linux.c.
8775 (reg-i386.o): Removed.
8776 (reg-i386.c): Likewise.
8777 (reg-i386-linux.o): Likewise.
8778 (reg-i386-linux.c): Likewise.
8779 (reg-x86-64.o): Likewise.
8780 (reg-x86-64.c): Likewise.
8781 (reg-x86-64-linux.o): Likewise.
8782 (reg-x86-64-linux.c): Likewise.
8785 (i386-linux.o): Likewise.
8786 (i386-linux.c): Likewise.
8787 (amd64.o): Likewise.
8788 (amd64.c): Likewise.
8789 (amd64-linux.o): Likewise.
8790 (amd64-linux.c): Likewise.
8792 * configure.srv (srv_i386_regobj): New.
8793 (srv_i386_linux_regobj): Likewise.
8794 (srv_amd64_regobj): Likewise.
8795 (srv_amd64_linux_regobj): Likewise.
8796 (srv_i386_32bit_xmlfiles): Likewise.
8797 (srv_i386_64bit_xmlfiles): Likewise.
8798 (srv_i386_xmlfiles): Likewise.
8799 (srv_amd64_xmlfiles): Likewise.
8800 (srv_i386_linux_xmlfiles): Likewise.
8801 (srv_amd64_linux_xmlfiles): Likewise.
8802 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8803 srv_xmlfiles to $srv_i386_xmlfiles.
8804 (i[34567]86-*-mingw32ce*): Likewise.
8805 (i[34567]86-*-mingw*): Likewise.
8806 (i[34567]86-*-nto*): Likewise.
8807 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8808 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8809 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8810 (x86_64-*-linux*): Likewise.
8812 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8813 (init_registers_amd64_linux): New.
8814 (x86_arch_setup): Replace init_registers_x86_64_linux with
8815 init_registers_amd64_linux.
8817 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8819 * configure.ac: Check for libdl. If it is not available link against
8820 static libthread_db.
8821 * configure: Regenerate.
8823 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8827 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8828 handing a read watchpoint.
8829 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8831 2010-02-12 Doug Evans <dje@google.com>
8833 * linux-low.c (linux_supports_tracefork_flag): Document.
8834 (linux_look_up_symbols): Add comment.
8836 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8838 * regcache.c (supply_register): Clear regcache if buf is NULL.
8840 2010-02-02 Nicolas Roche <roche@sourceware.org>
8841 Joel Brobecker <brobecker@adacore.com>
8843 * inferiors.c (find_inferior): Add function documentation.
8844 (unloaded_dll): Handle the case where the unloaded dll has not
8845 been previously registered in the dll list.
8847 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8849 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8850 (thumb2_breakpoint): New.
8851 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8853 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8855 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8856 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8859 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8861 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8863 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8865 * linux-s390-low.c (s390_collect_ptrace_register)
8866 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8868 2010-01-21 Doug Evans <dje@google.com>
8870 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8871 (PTRACE_ARG4_TYPE): New macro.
8872 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8873 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8874 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8875 (usr_store_inferior_registers): Ditto.
8876 (linux_read_memory, linux_write_memory): Ditto.
8877 (linux_test_for_tracefork): Ditto.
8879 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8880 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8882 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8884 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8887 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8889 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8890 prototype to take a regcache. Adjust.
8892 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8894 * regcache.h (struct thread_info): Forward declare.
8895 (struct regcache): New.
8896 (new_register_cache): Adjust prototype.
8897 (get_thread_regcache): Declare.
8898 (free_register_cache): Adjust prototype.
8899 (registers_to_string, registers_from_string): Ditto.
8900 (supply_register, supply_register_by_name, collect_register)
8901 (collect_register_as_string, collect_register_by_name): Ditto.
8902 * regcache.c (struct inferior_regcache_data): Delete.
8903 (get_regcache): Rename to ...
8904 (get_thread_regcache): ... this. Adjust. Switch inferior before
8906 (regcache_invalidate_one): Adjust.
8907 (regcache_invalidate): Fix prototype.
8908 (new_register_cache): Return the new register cache.
8909 (free_register_cache): Change prototype.
8910 (realloc_register_cache): Adjust.
8911 (registers_to_string): Change prototype to take a regcache. Adjust.
8912 (registers_from_string): Ditto.
8913 (register_data): Ditto.
8914 (supply_register): Ditto.
8915 (supply_register_by_name): Ditto.
8916 (collect_register): Ditto.
8917 (collect_register_as_string): Ditto.
8918 (collect_register_by_name): Ditto.
8919 * server.c (process_serial_event): Adjust.
8920 * linux-low.h (regset_fill_func, regset_store_func): Change
8922 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8924 * linux-low.c (get_stop_pc): Adjust.
8925 (check_removed_breakpoint): Adjust.
8926 (linux_wait_for_event): Adjust.
8927 (linux_resume_one_lwp): Adjust.
8928 (fetch_register): Add regcache parameter. Adjust.
8929 (usr_store_inferior_registers): Ditto.
8930 (regsets_fetch_inferior_registers): Ditto.
8931 (regsets_store_inferior_registers): Ditto.
8932 (linux_fetch_registers, linux_store_registers): Ditto.
8933 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8935 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8937 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8938 prototype to take a regcache.
8939 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8940 * remote-utils.c (convert_ascii_to_int, outreg)
8941 (prepare_resume_reply): Change prototype to take a regcache.
8943 * target.h (struct target_ops) <fetch_registers, store_registers>:
8944 Change prototype to take a regcache.
8945 (fetch_inferior_registers, store_inferior_registers): Change
8946 prototype to take a regcache. Adjust.
8947 * proc-service.c (ps_lgetregs): Adjust.
8948 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8949 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8950 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8951 take a regcache. Adjust.
8952 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8953 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8954 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8955 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8956 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8957 (cris_cannot_fetch_register):
8958 (cris_breakpoint_at): Change prototype to take a regcache.
8960 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8961 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8962 to take a regcache. Adjust.
8963 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8965 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8966 take a regcache. Adjust.
8967 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8968 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8969 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8970 * linux-mips-low.c (mips_get_pc):
8971 (mips_set_pc): Change prototype to take a regcache. Adjust.
8972 (mips_reinsert_addr): Adjust.
8973 (mips_collect_register): Change prototype to take a regcache.
8975 (mips_supply_register):
8976 (mips_collect_register_32bit, mips_supply_register_32bit)
8977 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8978 (mips_store_fpregset): Ditto.
8979 * linux-ppc-low.c (ppc_supply_ptrace_register)
8980 (ppc_supply_ptrace_register): Ditto.
8981 (parse_spufs_run): Adjust.
8982 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8983 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8984 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8985 take a regcache. Adjust.
8986 * linux-s390-low.c (s390_collect_ptrace_register)
8987 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8988 (s390_set_pc): Change prototype to take a regcache. Adjust.
8989 (s390_arch_setup): Adjust.
8990 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8991 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8992 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8993 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8994 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8996 (sparc_breakpoint_at): Adjust.
8997 * linux-xtensa-low.c (xtensa_fill_gregset):
8998 (xtensa_store_gregset):
8999 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9000 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9001 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9002 prototype to take a regcache. Adjust.
9003 * win32-arm-low.c (arm_fetch_inferior_register)
9004 (arm_store_inferior_register): Change prototype to take a
9006 * win32-i386-low.c (i386_fetch_inferior_register)
9007 (i386_store_inferior_register): Change prototype to take a
9009 * win32-low.c (child_fetch_inferior_registers)
9010 (child_store_inferior_registers): Change prototype to take a
9012 (win32_wait): Adjust.
9013 (win32_fetch_inferior_registers): Change prototype to take a
9015 (win32_store_inferior_registers): Adjust.
9016 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9017 store_inferior_register>: Change prototype to take a regcache.
9019 2010-01-20 Doug Evans <dje@google.com>
9021 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9023 (linux_wait_for_event1, linux_init_signals): Ditto.
9024 (W_STOPCODE): Provide definition if missing.
9026 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9028 * linux-low.c (linux_core_of_thread): New.
9029 (compare_ints, show_process, list_threads): New.
9030 (linux_qxfer_osdata): Report threads and cores.
9031 (linux_target_op): Register linux_core_of_thread.
9032 * remote-utils.c (prepare_resume_reply): Report the core.
9033 (buffer_xml_printf): Support %d specifier.
9034 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9036 (handle_query): Handle qXfer:threads. Announce availability
9038 * target.h (struct target_ops): New field core_of_thread.
9040 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9042 * Makefile.in (clean): Remove new generated files.
9043 (reg-s390.o, reg-s390.c): Remove rules.
9044 (reg-s390x.o, reg-s390x.c): Likewise.
9045 (s390-linux32.o, s390-linux32.c): Add rules.
9046 (s390-linux64.o, s390-linux64.c): Likewise.
9047 (s390x-linux64.o, s390x-linux64.c): Likewise.
9048 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9049 * linux-s390-low.c: Include <elf.h>.
9050 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9051 (init_registers_s390): Remove prototype.
9052 (init_registers_s390x): Likewise.
9053 (init_registers_s390_linux32): Add prototype.
9054 (init_registers_s390_linux64): Likewise.
9055 (init_registers_s390x_linux64): Likewise.
9056 (s390_num_regs_3264): New define.
9057 (s390_regmap_3264): New global variable.
9058 (s390_cannot_fetch_register): Remove obsolete check.
9059 (s390_cannot_store_register): Likewise.
9060 (s390_collect_ptrace_register): Handle upper/lower register halves.
9061 (s390_supply_ptrace_register): Likewise.
9062 (s390_fill_gregset): Update to register number changes.
9063 (s390_get_hwcap): New routine.
9064 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9065 Install appropriate regmap and register set.
9067 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9069 * server.c (gdbserver_version): Update copyright year to 2010.
9070 * gdbreplay.c (gdbreplay_version): Likewise.
9072 2009-12-28 Doug Evans <dje@google.com>
9074 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9075 elf/external.h. Include <elf.h> instead but only if necessary.
9077 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9079 * linux-low.c (linux_remove_process): Remove `detaching'
9080 parameter. Don't release/detach from thread_db here.
9081 (linux_kill): Release/detach from thread_db here, ...
9082 (linux_detach): ... and here, before actually detaching.
9083 (linux_wait_1): ... and here, when a process exits.
9084 * thread-db.c (any_thread_of): New.
9085 (thread_db_free): Switch the current inferior to a thread of the
9088 2009-12-21 Doug Evans <dje@google.com>
9090 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9092 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9093 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9094 warning ifndef __NR_tkill. Move setting of errno there too.
9095 Delete unnecessary resetting of errno after syscall.
9096 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9098 * configure.ac: Check for dladdr.
9099 * config.in: Regenerate.
9100 * configure: Regenerate.
9101 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9102 (try_thread_db_load): Update.
9104 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9106 2009-12-18 Doug Evans <dje@google.com>
9108 * event-loop.c: Include unistd.h if it exists.
9110 * linux-low.c (my_waitpid): Move definition away from being in
9111 between linux_tracefork_child/linux_test_for_tracefork.
9113 * gdb_proc_service.h (psaddr_t): Fix type.
9114 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9115 signature to match glibc.
9117 2009-12-16 Doug Evans <dje@google.com>
9119 * linux-low.c (linux_read_memory): Fix argument to read.
9121 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9123 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9124 events, don't leave current_inferior pointing at null.
9126 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9128 * win32-low.c (LOG): Delete.
9129 (OUTMSG): Output to stderr.
9130 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9131 on compile time LOG macro.
9132 (win32_wait): Fix debug output.
9134 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9136 * win32-low.c (win32_add_one_solib): If the dll name is
9137 "ntdll.dll", prepend the system directory to the dll path.
9139 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9141 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9143 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9144 Vladimir Prus <vladimir@codesourcery.com>
9146 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9147 * configure.ac: Check for __mcoldfire__ and set
9148 gdb_cv_m68k_is_coldfire.
9149 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9150 reg-cf.o and reg-m68k.o.
9151 * configure: Regenerated.
9153 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9155 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9156 Pass it to thread_db_free.
9157 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9158 proper `detaching' argument to linux_remove_process.
9159 * linux-low.h (thread_db_free): Add `detaching' parameter.
9160 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9162 (thread_db_free): Add `detaching' parameter. Only
9163 call td_ta_clear_event if detaching from process.
9165 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9167 * thread-db.c (thread_db_free): Fix typo.
9169 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9172 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9174 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9176 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9177 with an i686 compiler.
9178 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9180 * configure: Rebuilt.
9182 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9186 * server.c (handle_search_memory_1): Correct read_addr initialization
9187 in loop for searching subsequent chunks.
9189 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9191 * configure.ac: New --with-libthread-db option.
9192 * thread-db.c: Allow direct dependence on libthread_db.
9193 (thread_db_free): Adjust.
9194 * config.in: Regenerate.
9195 * configure: Likewise.
9197 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9200 * thread-db.c (attach_thread): New function.
9201 (maybe_attach_thread): Return success/failure.
9202 (find_new_threads_callback): Adjust.
9203 (thread_db_find_new_threads): Loop until no new threads.
9205 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9207 * proc-service.c (ps_lgetregs): Formatting.
9209 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9211 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9212 * configure.ac: Adjust.
9213 * linux-low.h (struct process_info_private): Move members to struct
9215 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9216 * linux-low.c (linux_remove_process): Adjust.
9217 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9218 * server.c (handle_query): Move code ...
9219 (handle_monitor_command): ... here. New function.
9220 * target.h (struct target_ops): New member.
9221 * thread-db.c (struct thread_db): New.
9222 (libthread_db_search_path): New variable.
9223 (thread_db_create_event, thread_db_enable_reporting)
9224 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9225 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9226 (try_thread_db_load_1, dladdr_to_soname): New functions.
9227 (try_thread_db_load, thread_db_load_search): New functions.
9228 (thread_db_init): Search for libthread_db.
9229 (thread_db_free): New function.
9230 (thread_db_handle_monitor_command): Likewise.
9231 * config.in: Regenerate.
9232 * configure: Regenerate.
9234 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9236 * spu-low.c (spu_kill): Wait for inferior to terminate.
9237 Call clear_inferiors.
9238 (spu_detach): Call clear_inferiors.
9240 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9242 * aclocal.m4: Regenerate.
9243 * config.in: Likewise.
9244 * configure: Likewise.
9246 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9248 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9249 (parse_spufs_run): New function.
9250 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9251 (ppc_breakpoint_at): Handle SPU breakpoints.
9253 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9255 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9256 (SPUFS_MAGIC): Define.
9257 (spu_enumerate_spu_ids): New function.
9258 (linux_qxfer_spu): New function.
9259 (linux_target_ops): Install linux_qxfer_spu.
9261 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9263 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9264 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9265 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9266 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9267 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9268 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9269 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9270 (init_registers_powerpc_cell32l): Add prototype.
9271 (init_registers_powerpc_cell64l): Likewise.
9272 (ppc_arch_setup): Detect Cell/B.E. architecture.
9274 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9276 * Makefile.in (datarootdir): New variable.
9278 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9280 * linux-low.c (linux_write_memory): Update debugging output.
9281 * Makefile.in (clean): Add new descriptions.
9282 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9283 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9284 * configure.srv: Add new files for arm*-*-linux*.
9285 * linux-arm-low.c: Add new declarations.
9286 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9287 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9288 (HWCAP_VFPv3D16): New.
9289 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9290 instead of __IWMMXT__.
9291 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9292 (arm_arch_setup): New.
9293 (target_regsets): Remove #ifdef. Add VFP regset.
9294 (the_low_target): Use arm_arch_setup.
9296 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9298 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9299 the main thread again.
9301 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9303 Adding Neutrino gdbserver.
9304 * configure: Regenerated.
9305 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9306 * configure.srv (i[34567]86-*-nto*): New target.
9307 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9308 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9309 (nto_comctrl) [__QNX__]: New function.
9310 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9312 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9314 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9317 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9318 Pedro Alves <pedro@codesourcery.com>
9320 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9321 don't support CONTEXT_EXTENDED_REGISTERS.
9322 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9323 (the_low_target): Install them.
9324 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9325 failing with ERROR_PIPE_NOT_CONNECTED.
9327 2009-06-30 Doug Evans <dje@google.com>
9328 Pierre Muller <muller@ics.u-strasbg.fr>
9330 Add h/w watchpoint support to x86-linux, win32-i386.
9331 * Makefile.in (SFILES): Add i386-low.c
9332 (i386_low_h): Define.
9333 (i386-low.o): Add dependencies.
9334 (linux-x86-low.o): Add i386-low.h dependency.
9335 (win32-i386-low.o): Ditto.
9336 * i386-low.c: New file.
9337 * i386-low.h: New file.
9338 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9339 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9340 * linux-low.c (linux_add_process): Initialize arch_private.
9341 (linux_remove_process): Free arch_private.
9342 (add_lwp): Initialize arch_private.
9343 (delete_lwp): Free arch_private.
9344 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9346 * linux-low.h (process_info_private): New member arch_private.
9347 (lwp_info): New member arch_private.
9348 (linux_target_ops): New members new_process, new_thread,
9350 (ptid_of): New macro.
9351 * linux-x86-low.c: Include stddef.h, i386-low.h.
9352 (arch_process_info): New struct.
9353 (arch_lwp_info): New struct.
9354 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9355 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9356 (i386_dr_low_get_status): New function.
9357 (x86_insert_point, x86_remove_point): New functions.
9358 (x86_stopped_by_watchpoint): New function.
9359 (x86_stopped_data_address): New function.
9360 (x86_linux_new_process, x86_linux_new_thread): New functions.
9361 (x86_linux_prepare_to_resume): New function.
9362 (the_low_target): Add entries for insert_point, remove_point,
9363 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9365 * server.c (debug_hw_points): New global.
9366 (monitor_show_help): Document set debug-hw-points.
9367 (handle_query): Process "set debug-hw-points".
9368 * server.h (debug_hw_points): Declare.
9369 (paddress): Declare.
9370 * utils.c (NUMCELLS, CELLSIZE): New macros.
9371 (get_sell, xsnprintf, paddress): New functions.
9372 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9373 remove_point, stopped_by_watchpoint, stopped_data_address.
9374 * win32-i386-low.c: Include i386-low.h.
9375 (debug_reg_state): Replaces dr.
9376 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9377 (i386_dr_low_get_status): New function.
9378 (i386_insert_point, i386_remove_point): New functions.
9379 (i386_stopped_by_watchpoint): New function.
9380 (i386_stopped_data_address): New function.
9381 (i386_initial_stuff): Update.
9382 (get_thread_context,set_thread_context,i386_thread_added): Update.
9383 (the_low_target): Add entries for insert_point,
9384 remove_point, stopped_by_watchpoint, stopped_data_address.
9385 * win32-low.c (win32_insert_watchpoint): New function.
9386 (win32_remove_watchpoint): New function.
9387 (win32_stopped_by_watchpoint): New function.
9388 (win32_stopped_data_address): New function.
9389 (win32_target_ops): Add entries for insert_watchpoint,
9390 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9391 * win32-low.h (win32_target_ops): New members insert_point,
9392 remove_point, stopped_by_watchpoint, stopped_data_address.
9394 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9396 * server.c (process_serial_event): Re-return unsupported, not
9397 error, if the type isn't recognized. Re-allow supporting only
9398 insert or remove packets. Also call require_running for
9399 breakpoints. Add missing break statement to default case. Tidy.
9400 * target.h (struct target_ops): Rename insert_watchpoint to
9401 insert_point, and remove_watchpoint to remove_point.
9403 * linux-low.h (struct linux_target_ops): Likewise.
9404 * linux-low.c (linux_insert_watchpoint): Rename to ...
9405 (linux_insert_point): ... this. Adjust.
9406 (linux_remove_watchpoint): Rename to ...
9407 (linux_remove_point): ... this. Adjust.
9408 (linux_target_ops): Adjust.
9409 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9410 (cris_insert_point): ... this.
9411 (cris_remove_watchpoint): Rename to ...
9412 (cris_remove_point): ... this.
9413 (the_low_target): Adjust.
9415 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9417 * server.c (handle_v_kill): Pass signal_pid to
9418 kill_inferior if multi_process is zero.
9420 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9422 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9423 * target.h (target_ops): Comment for *_watchpoint to make it clear
9424 the functions can get types '0' and '1'.
9426 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9428 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9429 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9430 * regcache.c (get_regcache): Likewise.
9431 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9432 * win32-low.c (child_fetch_inferior_registers): Remove check for
9435 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9436 Pedro Alves <pedro@codesourcery.com>
9438 * target.h (struct target_ops) <supports_multi_process>: New
9440 (target_supports_multi_process): New.
9441 * server.c (handle_query): Even if GDB reports support, only
9442 enable multi-process if the target also supports it. Report
9443 multi-process support only if the target backend supports it.
9444 * linux-low.c (linux_supports_multi_process): New function.
9445 (linux_target_ops): Install it as target_supports_multi_process
9448 2009-05-24 Doug Evans <dje@google.com>
9450 Global renaming of find_thread_pid to find_thread_ptid.
9451 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9452 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9453 All callers updated.
9455 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9456 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9459 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9460 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9461 (linux_resume_one_lwp): Ditto.
9463 2009-05-23 Doug Evans <dje@google.com>
9465 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9466 from struct inferior_list_entry * to struct lwp_info *.
9467 All callers updated.
9469 2009-05-13 Doug Evans <dje@google.com>
9471 * linux-x86-low.c: Don't include assert.h.
9472 (x86_siginfo_fixup): Use fatal, not assert.
9473 (x86_arch_setup): Fix comment.
9475 2009-05-12 Doug Evans <dje@google.com>
9477 Biarch support for i386/amd64 gdbserver.
9478 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9479 Add linux-x86-low.c.
9480 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9481 (linux-x86-low.o): Add.
9482 * linux-x86-64-low.c: Delete.
9483 * linux-i386-low.c: Delete.
9484 * linux-x86-low.c: New file.
9485 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9487 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9489 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9490 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9491 (linux_child_pid_to_exec_file): New function.
9492 (elf_64_header_p, elf_64_file_p): New functions.
9493 (siginfo_fixup): New function.
9494 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9495 give target a chance to convert layout.
9496 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9497 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9499 2009-05-07 Doug Evans <dje@google.com>
9501 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9502 (regsets_store_inferior_registers): Ditto.
9504 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9508 * linux-low.c (must_set_ptrace_flags): Delete.
9509 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9511 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9512 `lwp->must_set_ptrace_flags' instead.
9513 (linux_wait_for_event_1): Set ptrace options here.
9514 (linux_wait_1): ... not here.
9516 2009-04-30 Doug Evans <dje@google.com>
9518 * inferiors.c (started_inferior_callback): New function.
9519 (attached_inferior_callback): New function.
9520 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9521 * server.c (print_started_pid, print_attached_pid): New functions.
9522 (detach_or_kill_for_exit): New function.
9523 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9524 * server.h (have_started_inferiors_p): Declare.
9525 (have_attached_inferiors_p): Declare.
9527 * inferiors.c (remove_process): Fix memory leak, free process.
9528 * linux-low.c (linux_remove_process): New function.
9529 (linux_kill): Call it instead of remove_process.
9530 (linux_detach, linux_wait_1): Ditto.
9532 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9534 * configure.srv: Add x86 Windows CE target.
9536 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9538 * inferiors.c (get_thread_process): Make global.
9539 * server.h (get_thread_process): Add prototype.
9540 * thread-db.c (find_one_thread): Use get_thread_process
9541 instead of current_process.
9542 (thread_db_get_tls_address): Do not crash if called when
9543 thread layer is not yet initialized.
9545 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9547 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9548 * spu-low.c (current_tid): Rename to ...
9549 (current_ptid): ... this.
9550 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9551 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9552 ptid_get_lwp (current_ptid) instead of current_tid.
9553 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9554 instead of current_tid. Use find_process_pid to verify pid
9555 argument is valid. Pass proper argument to remove_process.
9556 (spu_thread_alive): Compare current_ptid instead of current_tid.
9557 (spu_resume): Likewise.
9559 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9561 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9564 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9566 Implement the multiprocess extensions, and add linux multiprocess
9569 * server.h (ULONGEST): Declare.
9570 (struct ptid, ptid_t): New.
9571 (minus_one_ptid, null_ptid): Declare.
9572 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9573 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9574 (struct inferior_list_entry): Change `id' type from unsigned from
9576 (struct sym_cache, struct breakpoint, struct
9577 process_info_private): Forward declare.
9578 (struct process_info): Declare.
9579 (current_process): Declare.
9580 (all_processes): Declare.
9581 (initialize_inferiors): Declare.
9582 (add_thread): Adjust to use ptid_t.
9583 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9584 (add_process, remove_process, find_thread_pid): Declare.
9585 (find_inferior_id): Adjust to use ptid_t.
9586 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9587 (multi_process): Declare.
9588 (push_event): Adjust to use ptid_t.
9589 (read_ptid, write_ptid): Declare.
9590 (prepare_resume_reply): Adjust to use ptid_t.
9591 (clear_symbol_cache): Declare.
9592 * inferiors.c (all_processes): New.
9593 (null_ptid, minus_one_ptid): New.
9594 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9595 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9596 (add_thread): Change unsigned long to ptid. Remove gdb_id
9598 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9599 (gdb_id_to_thread): Rename to ...
9600 (find_thread_pid): ... this. Change unsigned long to ptid.
9601 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9602 (loaded_dll, pull_pid_from_list): Adjust.
9603 (add_process, remove_process, find_process_pid)
9604 (get_thread_process, current_process, initialize_inferiors): New.
9605 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9606 (struct target_waitstatus) <related_pid>: Ditto.
9607 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9609 (struct target_ops) <join>: Add `pid' argument.
9610 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9611 (struct target_ops) <wait>: Add `ptid' field. Change return type
9613 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9614 (mywait): Add `ptid' argument. Change return type to ptid_t.
9615 (target_pid_to_str): Declare.
9616 * target.c (set_desired_inferior): Adjust to use ptids.
9617 (mywait): Add new `ptid' argument. Adjust.
9618 (target_pid_to_str): New.
9619 * mem-break.h (free_all_breakpoints): Declare.
9620 * mem-break.c (breakpoints): Delelete.
9621 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9622 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9623 to use per-process breakpoint list.
9624 (free_all_breakpoints): New.
9625 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9626 (symbol_cache, all_symbols_looked_up): Delete.
9628 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9630 (prepare_resume_reply): Change ptid argument's type from unsigned
9631 long to ptid_t. Adjust. Implement W;process and X;process.
9632 (free_sym_cache, clear_symbol_cache): New.
9633 (look_up_one_symbol): Adjust to per-process symbol cache. *
9634 * server.c (cont_thread, general_thread, step_thread): Change type
9637 (multi_process): New.
9638 (last_ptid): Change type to ptid_t.
9639 (struct vstop_notif) <ptid>: Change type to ptid_t.
9640 (queue_stop_reply, push_event): Change `ptid' argument's type to
9642 (discard_queued_stop_replies): Add `pid' argument.
9643 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9644 changes. Don't reference the `attached' global.
9645 (attach_inferior): Adjust to mywait interface changes.
9646 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9647 features. Handle and report "multiprocess+". Handle
9649 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9651 (handle_v_kill): New.
9652 (handle_v_stopped): Adjust to use target_pid_to_str.
9653 (handle_v_requests): Allow multiple attaches and runs when
9654 multiprocess extensions are in effect. Handle "vKill".
9655 (myresume): Adjust to use ptids.
9656 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9657 (handle_status): Adjust to discard_queued_stop_replies interface
9659 (first_thread_of, kill_inferior_callback)
9660 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9661 (main): Call initialize_inferiors. Adjust to use ptids, killing
9662 and detaching from all inferiors. Handle multiprocess packet
9664 * linux-low.h: Include gdb_proc_service.h.
9665 (struct process_info_private): New.
9666 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9667 <lwpid_of>: Use ptid_get_lwp.
9668 (get_lwp_thread): Adjust.
9669 (struct lwp_info): Add `dead' member.
9670 (find_lwp_pid): Declare.
9671 * linux-low.c (thread_db_active): Delete.
9672 (new_inferior): Adjust comment.
9673 (inferior_pid): Delete.
9674 (linux_add_process): New.
9675 (handle_extended_wait): Adjust.
9676 (add_lwp): Change unsigned long to ptid.
9677 (linux_create_inferior): Add process to processes table. Adjust
9678 to use ptids. Don't set new_inferior here.
9679 (linux_attach_lwp): Rename to ...
9680 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9681 it. Adjust to use ptids.
9682 (linux_attach_lwp): New.
9683 (linux_attach): Add process to processes table. Don't set
9685 (struct counter): New.
9686 (second_thread_of_pid_p, last_thread_of_process_p): New.
9687 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9689 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9690 processes. Remove process from process table.
9691 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9692 to multiple processes.
9693 (any_thread_of): New.
9694 (linux_detach): Add `pid' argument, and handle it. Remove process
9695 from processes table.
9696 (linux_join): Add `pid' argument. Handle it.
9697 (linux_thread_alive): Change unsighed long argument to ptid_t.
9698 Consider dead lwps as not being alive.
9699 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9700 threads we're not interested in.
9701 (same_lwp, find_lwp_pid): New.
9702 (linux_wait_for_lwp): Change `pid' argument's type from int to
9704 (linux_wait_for_event): Rename to ...
9705 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9706 from int to ptid_t. Adjust.
9707 (linux_wait_for_event): New.
9708 (linux_wait_1): Add `ptid' argument. Change return type to
9709 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9710 that exit from the process table.
9711 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9713 (mark_lwp_dead): New.
9714 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9715 stopping all threads, mark its main lwp as dead.
9716 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9718 (fetch_register, usr_store_inferior_registers)
9719 (regsets_fetch_inferior_registers)
9720 (regsets_store_inferior_registers, linux_read_memory)
9721 (linux_write_memory): Inline `inferior_pid'.
9722 (linux_look_up_symbols): Adjust to use per-process
9724 (linux_request_interrupt): Adjust to use ptids.
9725 (linux_read_auxv): Inline `inferior_pid'.
9726 (initialize_low): Don't reference thread_db_active.
9727 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9728 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9729 (ps_getpid): Return the pid of the current inferior.
9730 * thread-db.c (proc_handle, thread_agent): Delete.
9731 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9733 (find_one_thread): Change argument type to ptid_t. Adjust to
9735 (maybe_attach_thread): Adjust to per-process data and ptids.
9736 (thread_db_find_new_threads): Ditto.
9737 (thread_db_init): Ditto.
9738 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9739 processes table. Adjust to use ptids.
9740 (spu_kill, spu_detach): Adjust interface. Remove process from
9742 (spu_join, spu_thread_alive): Adjust interface.
9743 (spu_wait): Adjust interface. Remove process from processes
9744 table. Adjust to use ptids.
9745 * win32-low.c (current_inferior_tid): Delete.
9746 (current_inferior_ptid): New.
9747 (debug_event_ptid): New.
9748 (thread_rec): Take a ptid. Adjust.
9749 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9750 (child_delete_thread): Ditto.
9751 (do_initial_child_stuff): Add `attached' argument. Add process to
9753 (child_fetch_inferior_registers, child_store_inferior_registers):
9755 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9756 (win32_attach): Pass 1 to do_initial_child_stuff.
9757 (win32_kill): Adjust interface. Remove process from processes
9759 (win32_detach): Ditto.
9760 (win32_join): Adjust interface.
9761 (win32_thread_alive): Take a ptid.
9762 (win32_resume): Adjust to use ptids.
9763 (get_child_debug_event): Ditto.
9764 (win32_wait): Adjust interface. Remove exiting process from
9767 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9769 Non-stop mode support.
9771 * server.h (non_stop): Declare.
9772 (gdb_client_data, handler_func): Declare.
9773 (delete_file_handler, add_file_handler, start_event_loop):
9775 (handle_serial_event, handle_target_event, push_event)
9776 (putpkt_notif): Declare.
9777 * target.h (enum resume_kind): New.
9778 (struct thread_resume): Replace `step' field by `kind' field.
9779 (TARGET_WNOHANG): Define.
9780 (struct target_ops) <wait>: Add `options' argument.
9781 <supports_non_stop, async, start_non_stop>: New fields.
9782 (target_supports_non_stop, target_async): New.
9783 (start_non_stop): Declare.
9784 (mywait): Add `options' argument.
9785 * target.c (mywait): Add `options' argument. Print child exit
9787 (start_non_stop): New.
9788 * server.c (non_stop, own_buf, mem_buf): New globals.
9789 (struct vstop_notif): New.
9790 (notif_queue): New global.
9791 (queue_stop_reply, push_event, discard_queued_stop_replies)
9792 (send_next_stop_reply): New.
9793 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9795 (attach_inferior): In non-stop mode, don't wait for the target
9797 (handle_general_set): Handle QNonStop.
9798 (handle_query): When handling qC, return the current general
9799 thread, instead of the first thread of the list.
9800 (handle_query): If the backend supports non-stop mode, include
9801 QNonStop+ in the qSupported query response.
9802 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9804 (handle_v_attach, handle_v_run): Handle non-stop mode.
9805 (handle_v_stopped): New.
9806 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9807 (myresume): Adjust to use resume_kind. Handle non-stop.
9808 (queue_stop_reply_callback): New.
9809 (handle_status): Handle non-stop mode.
9810 (main): Clear non_stop flag on reconnection. Use the event-loop.
9811 Refactor serial protocol handling from here ...
9812 (process_serial_event): ... to this new function. When GDB
9813 selects any thread, select one here. In non-stop mode, wait until
9814 GDB acks all pending events before exiting.
9815 (handle_serial_event, handle_target_event): New.
9816 * remote-utils.c (remote_open): Install remote_desc in the event
9818 (remote_close): Remove remote_desc from the event loop.
9819 (putpkt_binary): Rename to...
9820 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9821 (putpkt_binary): New as wrapper around putpkt_binary_1.
9822 (putpkt_notif): New.
9823 (prepare_resume_reply): In non-stop mode, don't change the
9825 * event-loop.c: New.
9826 * Makefile.in (OBJ): Add event-loop.o.
9827 (event-loop.o): New rule.
9829 * linux-low.h (pid_of): Moved here.
9831 (get_lwp_thread): Use lwpid_of.
9832 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9833 * linux-low.c (pid_of): Delete.
9834 (inferior_pid): Use lwpid_of.
9835 (linux_event_pipe): New.
9836 (target_is_async_p): New.
9838 (handle_extended_wait): Use lwpid_of.
9839 (add_lwp): Don't set lwpid field.
9840 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9841 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9842 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9843 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9844 first. Adjust to linux_wait_for_event interface changes. Use
9846 (linux_detach): Don't delete the main lwp here.
9847 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9848 (status_pending_p): Don't consider explicitly suspended lwps.
9849 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9850 pointer. Add OPTIONS argument. Change return type to int. Use
9851 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9852 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9853 pointer. Add status pointer argument. Return a pid instead of a
9854 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9855 changes. In non-stop mode, don't switch to a random thread.
9856 (linux_wait): Rename to...
9857 (linux_wait_1): ... this. Add target_options argument, and handle
9858 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9859 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9860 clean exit and signal exit code. Don't stop all threads in
9861 non-stop mode. In all-stop mode, only stop all threads when
9862 reporting a stop to GDB. Handle explicit thread stop requests.
9863 (async_file_flush, async_file_mark): New.
9865 (send_sigstop): Use lwpid_of.
9866 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9867 interface changes. In non-stop mode, don't switch to a random
9869 (linux_resume_one_lwp): Use lwpid_of.
9870 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9871 (linux_resume_one_thread): ... this. Handle resume_stop. In
9872 non-stop mode, don't look for pending flag in all threads.
9873 (resume_status_pending_p): Don't consider explicitly suspended
9875 (my_waitpid): Reimplement. Emulate __WALL.
9876 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9878 (sigchld_handler, linux_supports_non_stop, linux_async)
9879 (linux_start_non_stop): New.
9880 (linux_target_ops): Register linux_supports_non_stop, linux_async
9881 and linux_start_non_stop.
9882 (initialize_low): Install SIGCHLD handler.
9883 * thread-db.c (thread_db_create_event, find_one_thread)
9884 (thread_db_get_tls_address): Use lwpid_of.
9885 * win32-low.c (win32_detach): Adjust to use resume_kind.
9886 (win32_wait): Add `options' argument.
9887 * spu-low.c (spu_resume): Adjust to use resume_kind.
9888 (spu_wait): Add `options' argument.
9890 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9892 Decouple target code from remote protocol.
9894 * target.h (enum target_waitkind): New.
9895 (struct target_waitstatus): New.
9896 (struct target_ops) <wait>: Return an unsigned long. Take a
9897 target_waitstatus pointer instead of a char pointer.
9899 * target.c (mywait): Change prototype to return an unsigned long.
9900 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9901 * server.h (thread_from_wait, old_thread_from_wait): Delete
9903 (prepare_resume_reply): Change prototype to take a
9905 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9906 (last_status, last_ptid): New.
9907 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9908 pid instead of a signal.
9909 (attach_inferior): Remove "status" and "signal" parameters.
9911 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9913 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9914 (handle_v_requests, myresume): Remove "status" and "signal"
9916 (handle_status): New.
9917 (main): Delete local `status'. Adjust.
9918 * remote-utils.c: Include target.h.
9919 (prepare_resume_reply): Change prototype to take a
9920 target_waitstatus. Adjust.
9922 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9924 * spu-low.c (spu_wait): Adjust.
9925 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9927 (win32_wait): Adjust.
9929 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9931 * target.h (struct thread_resume): Delete leave_stopped member.
9932 (struct target_ops): Add a `n' argument to the `resume' callback.
9933 * server.c (start_inferior): Adjust.
9934 (handle_v_cont, myresume): Adjust.
9935 * linux-low.c (check_removed_breakpoint): Adjust to resume
9936 interface change, and to removed leave_stopped field.
9937 (resume_ptr): Delete.
9938 (struct thread_resume_array): New.
9939 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9940 resume interface change.
9941 (linux_continue_one_thread, linux_queue_one_thread)
9942 (resume_status_pending_p): Check if the resume field is NULL
9943 instead of checking the leave_stopped member.
9944 (linux_resume): Adjust to the target resume interface change.
9945 * spu-low.c (spu_resume): Adjust to the target resume interface
9947 * win32-low.c (win32_detach, win32_resume): Ditto.
9949 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9951 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9953 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9955 (linux_continue_one_thread): Only preserve the stepping flag if
9956 there's a pending breakpoint.
9958 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9960 * server.c (main): After the inferior having exited, call
9961 remote_close before exiting gdbserver.
9963 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9965 Fix size of FPSCR in Power 7 processors.
9966 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9967 (PPC_FEATURE_HAS_DFP): New #define.
9968 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9971 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9973 * server.c (handle_query) Whitespace and formatting.
9975 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9977 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9978 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9979 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9980 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9981 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9982 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9983 Makefile.in, configure.ac: Fix whitespace throughout.
9984 * configure: Regenerate.
9986 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9988 * inferiors.c (find_inferior): Make it safe for the callback
9989 function to delete the currently iterated inferior.
9991 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9993 * Makefile.in (linuw_low_h): Move higher.
9994 (thread-db.o): Depend on $(linux_low_h).
9996 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9998 Rename "process" to "lwp" throughout.
10000 * linux-low.c (all_processes): Rename to...
10001 (all_lwps): ... this.
10002 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10003 (add_process): Rename to ...
10004 (add_lwp): ... this. Adjust.
10005 (linux_create_inferior): Adjust.
10006 (linux_attach_lwp): Adjust.
10007 (linux_attach): Adjust.
10008 (linux_kill_one_process): Rename to ...
10009 (linux_kill_one_lwp): ... this. Adjust.
10010 (linux_kill): Adjust.
10011 (linux_detach_one_process): Rename to ...
10012 (linux_detach_one_lwp): ... this. Adjust.
10013 (linux_detach): Adjust.
10014 (check_removed_breakpoint): Adjust.
10015 (status_pending_p): Adjust.
10016 (linux_wait_for_process): Rename to ...
10017 (linux_wait_for_lwp): ... this. Adjust.
10018 (linux_wait_for_event): Adjust.
10019 (send_sigstop): Adjust.
10020 (wait_for_sigstop): Adjust.
10021 (stop_all_processes): Rename to ...
10022 (stop_all_lwps): ... this.
10023 (linux_resume_one_process): Rename to ...
10024 (linux_resume_one_lwp): ... this. Adjust.
10025 (linux_set_resume_request, linux_continue_one_thread)
10026 (linux_queue_one_thread, resume_status_pending_p)
10027 (usr_store_inferior_registers, regsets_store_inferior_registers)
10028 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10030 * linux-low.h (get_process): Rename to ...
10031 (get_lwp): ... this. Adjust.
10032 (get_thread_process): Rename to ...
10033 (get_thread_lwp): ... this. Adjust.
10034 (get_process_thread): Rename to ...
10035 (get_lwp_thread): ... this. Adjust.
10036 (struct process_info): Rename to ...
10037 (struct lwp_info): ... this.
10038 (all_processes): Rename to ...
10039 (all_lwps): ... this.
10040 * proc-service.c (ps_lgetregs): Adjust.
10041 * thread-db.c (thread_db_create_event, find_one_thread)
10042 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10044 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10046 * server.c (handle_query): Handle "qAttached".
10048 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10050 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10051 GPLv3, update license URL.
10053 2009-03-01 Doug Evans <dje@google.com>
10055 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10056 (server_h): Add gdb_signals.h.
10057 (signals.o): Update.
10058 * server.h (target_signal_from_host,target_signal_to_host_p)
10059 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10061 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10063 * remote-utils.c (getpkt): Also generate remote-debug
10064 information if noack_mode is set.
10066 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10068 * server.c (handle_query): Report qXfer:siginfo:read and
10069 qXfer:siginfo:write as supported and handle them.
10070 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10071 * linux-low.c (linux_xfer_siginfo): New.
10072 (linux_target_ops): Set it.
10074 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10076 * server.c (gdbserver_usage): Mention --remote-debug.
10077 (main): Accept '--remote-debug' switch.
10079 2009-01-18 Doug Evans <dje@google.com>
10081 * regcache.c (new_register_cache): No need to check result of xcalloc.
10082 * server.c (handle_search_memory): Back out calls to xmalloc,
10083 result is checked and error is returned to user upon failure.
10084 (handle_query): Ditto. Add more checks for result of malloc.
10085 (handle_v_cont): Check result of malloc, report error back to
10087 (handle_v_run): Ditto. Call freeargv.
10088 * server.h (freeargv): Declare.
10089 * utils.c (freeargv): New fn.
10091 2009-01-15 Doug Evans <dje@google.com>
10093 * gdbreplay.c (perror_with_name): Make arg const char *.
10094 * server.h (target_signal_to_name): Make return type const char *.
10095 * thread-db.c (thread_db_err_str): Make return type const char *.
10096 * utils.c (perror_with_name): Make arg const char *.
10098 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10100 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10101 when handling a EXIT_PROCESS_DEBUG_EVENT.
10103 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10105 * gdbreplay.c (gdbreplay_version): Update copyright year.
10106 * server.c (gdbserver_version): Likewise.
10108 2009-01-05 Doug Evans <dje@google.com>
10110 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10111 (handle_extended_wait): Improve comment.
10113 2008-12-13 Doug Evans <dje@google.com>
10115 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10116 * server.h (ATTR_MALLOC): New macro.
10117 (xmalloc,xcalloc,xstrdup): Declare.
10118 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10119 * inferiors.c: Ditto.
10120 * linux-low.c: Ditto.
10121 * mem-break.c: Ditto.
10122 * regcache.c: Ditto.
10123 * remote-utils.c: Ditto.
10126 * win32-low.c: Ditto.
10128 2008-12-12 Doug Evans <dje@google.com>
10130 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10131 in debugging printf.
10133 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10135 2008-12-09 Doug Evans <dje@google.com>
10137 * linux-low.h (struct process_info): Delete member tid, unused.
10138 * thread-db.c (find_one_thread): Update.
10139 (maybe_attach_thread): Update.
10141 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10143 * target.h (struct target_ops): Add qxfer_osdata member.
10144 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10146 (linux_qxfer_osdata): New functions.
10147 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10149 * server.c (handle_query): Handle "qXfer:osdata:read:".
10150 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10151 (buffer_xml_printf): New functions.
10152 * server.h (struct buffer): New.
10153 (buffer_grow_str, buffer_grow_str0): New macros.
10154 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10155 (buffer_xml_printf): Declare.
10157 2008-11-24 Doug Evans <dje@google.com>
10159 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10161 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10163 * server.c (handle_v_run): Always use the supplied argument list.
10165 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10167 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10168 (xtensa_regmap_table): Add entry for scompare1.
10170 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10172 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10173 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10174 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10175 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10176 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10177 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10178 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10179 XML target descriptions.
10180 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10181 when inferior is running on an ISA 2.05 or later processor. Add
10182 special case to return offset for full 64-bit slot of FPSCR when
10185 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10187 * Makefile.in (SFILES, clean): Added sparc64 files.
10188 (reg-sparc64.o, reg-sparc64.c): New.
10189 * configure.srv (sparc*-*-linux*): New configuration.
10190 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10191 syscall arguments for SPARC.
10192 (regsets_store_inferior_registers): Likewise.
10193 * linux-sparc-low.c: New file.
10195 2008-10-21 Doug Evans <dje@google.com>
10197 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10198 (READLINE_DIR,READLINE_DEP): Delete.
10199 (INTERNAL_CFLAGS): Update.
10200 (LINTFLAGS): Update.
10202 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10204 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10205 whole argv from the last run, not just argv[0].
10207 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10209 * regcache.c (new_register_cache): Return NULL if the register
10210 cache size isn't known yet.
10211 (free_register_cache): Avoid dereferencing a NULL regcache.
10213 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10215 * configure.srv: Merge MIPS and MIPS64.
10217 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10219 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10221 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10223 * Makefile.in: Add required vsx dependencies.
10225 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10226 Declare init_registers_powerpc_vsx32l.
10227 Declare init_registers_powerpc_vsx64l.
10228 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10229 (ppc_arch_setup): Check for VSX in hwcap.
10230 (ppc_fill_vsxregset): New function.
10231 (ppc_store_vsxregset): New function.
10232 Add new VSX entry in regset_info target_regsets.
10234 * configure.srv: Add new VSX dependencies.
10236 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10238 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10239 (remote_open): Set or clear transport_is_reliable.
10240 (putpkt_binary): Don't expect acks in noack mode.
10241 (getpkt): Don't send ack/nac in noack mode.
10242 * server.c (handle_general_set): Handle QStartNoAckMode.
10243 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10245 (main): Reset noack_mode on every connection.
10246 * server.h (noack_mode): Declare.
10248 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10250 * Makefile.in (GDBREPLAY_OBS): New variable.
10251 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10253 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10254 Daniel Jacobowitz <dan@codesourcery.com>
10256 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10257 (usr_store_inferior_registers): Likewise.
10258 (regsets_store_inferior_registers): Likewise.
10260 2008-07-31 Rolf Jansen <rj@surtec.com>
10261 Pedro Alves <pedro@codesourcery.com>
10263 * configure.ac: Check for memmem declaration.
10264 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10265 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10266 (disable_packet_qfThreadInfo): Unconditionally compile.
10267 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10268 * configure, config.in: Regenerate.
10270 2008-07-28 Doug Kwan <dougkwan@google.com>
10272 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10273 (linux_write_memory): Remove declaration of errno.
10275 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10277 * linux-low.c (handle_extended_wait): Do not use "status"
10278 variable uninitialized.
10280 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10282 * server.c (handle_v_attach): Inhibit reporting dll changes.
10284 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10286 * remote-utils.c (prepare_resume_reply): If requested, don't
10287 output "thread:TID" in the T stop reply.
10289 * server.c (disable_packet_vCont, disable_packet_Tthread)
10290 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10291 (handle_query): If requested, disable support for qC, qfThreadInfo
10293 (handle_v_requests): If requested, disable support for vCont.
10294 (gdbserver_show_disableable): New.
10295 (main): Handle --disable-packet and --disable-packet=LIST.
10297 * server.h (disable_packet_vCont, disable_packet_Tthread)
10298 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10300 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10302 * server.c (gdbserver_usage): Mention --version.
10304 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10306 * Makefile.in (gdbreplay.o): New rule.
10308 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10310 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10311 message, not gdbserver.
10313 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10314 Nathan Sidwell <nathan@codesourcery.com>
10315 Joseph Myers <joseph@codesourcery.com>
10317 * acinclude.m4: Include ../../config/acx.m4.
10318 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10319 * configure, config.in: Regenerate.
10320 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10321 * server.c (gdbserver_version): Print PKGVERSION.
10322 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10323 (main): Adjust gdbserver_usage calls.
10324 * gdbreplay.c (version, host_name): Add declarations.
10325 (gdbreplay_version, gdbreplay_usage): New.
10326 (main): Accept --version and --help options.
10328 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10330 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10331 (arm_breakpoint_at): Handle Thumb.
10332 (the_low_target): Add comment.
10334 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10336 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10338 2008-05-09 Doug Evans <dje@google.com>
10340 * server.h (decode_search_memory_packet): Declare.
10341 * remote-utils.c (decode_search_memory_packet): New fn.
10342 * server.c (handle_search_memory_1): New fn.
10343 (handle_search_memory): New fn.
10344 (handle_query): Process qSearch:memory packets.
10346 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10348 * regcache.c (registers_length): Remove.
10349 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10350 full register packet.
10351 * regcache.h (registers_length): Remove prototype.
10352 * server.h (PBUFSIZ): Define to 16384.
10354 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10356 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10357 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10358 powerpc-64l.o, and powerpc-altivec64l.o.
10359 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10360 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10361 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10362 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10363 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10366 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10367 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10368 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10369 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10370 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10371 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10372 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10373 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10374 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10375 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10378 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10379 (init_registers_powerpc_32l): ... this new prototype.
10380 (init_registers_powerpc_32): Remove, replace by ...
10381 (init_registers_powerpc_altivec32l): ... this new prototype.
10382 (init_registers_powerpc_e500): Remove, replace by ...
10383 (init_registers_powerpc_e500l): ... this new prototype.
10384 (init_registers_ppc64): Remove, replace by ...
10385 (init_registers_powerpc_64l): ... this new prototype.
10386 (init_registers_powerpc_64): Remove, replace by ...
10387 (init_registers_powerpc_altivec64l): ... this new prototype.
10388 (ppc_num_regs): Set to 73.
10389 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10390 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10391 (ppc_cannot_store_register): Handle orig_r3 and trap.
10392 (ppc_arch_setup): Update init_registers_... calls.
10393 (ppc_fill_gregset): Handle orig_r3 and trap.
10395 * inferiors.c (clear_inferiors): Reset current_inferior.
10397 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10399 * acinclude.m4: Add override.m4.
10400 * configure: Regenerate.
10402 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10404 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10405 initial call to init_register_ppc64.
10407 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10409 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10410 single powerpc*-*-linux* case.
10411 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10413 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10415 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10416 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10418 * linux-ppc-low.c: Include <elf.h>.
10419 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10420 (ppc_hwcap): New global variable.
10421 (ppc_regmap): Remove __SPE__ #ifdef sections.
10422 (ppc_regmap_e500): New global variable.
10423 (ppc_cannot_store_register): Update __SPE__ special case.
10424 (ppc_get_hwcap): New function.
10425 (ppc_arch_setup): Use it to determine whether inferior supports
10426 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10427 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10428 Do not access registers if target does not support AltiVec.
10429 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10430 Do not access registers if target does not support SPE.
10431 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10433 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10435 * linux-low.c (disabled_regsets, num_regsets): New.
10436 (use_regsets_p): Delete.
10437 (linux_wait_for_process): Clear disabled_regsets.
10438 (regsets_fetch_inferior_registers): Check and set it.
10439 (regsets_store_inferior_registers): Likewise.
10440 (linux_fetch_registers, linux_store_registers): Do not use
10442 (initialize_low): Allocate disabled_regsets.
10444 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10446 * Makefile.in (LIBOBJS): New.
10447 (OBS): Use LIBOBJS.
10448 (memmem.o): New rule.
10449 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10450 * configure: Regenerated.
10452 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10454 * server.c (handle_query): Never return "unsupported" for
10455 qXfer:features:read queries.
10457 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10459 * server.c (get_features_xml): Fix inverted condition.
10460 (handle_query): Always support qXfer:feature:read.
10462 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10464 * server.c (wrapper_argv): New.
10465 (start_inferior): Handle wrapper_argv. If set, expect an extra
10467 (gdbserver_usage): Document --wrapper.
10468 (main): Parse --wrapper.
10470 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10472 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10473 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10474 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10475 (ppc_set_pc): Likewise.
10476 (ppc_arch_setup): New function.
10477 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10478 of collect_register.
10479 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10481 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10483 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10484 instead of linux-ppc64-low.o.
10485 * linux-ppc64-low.c: Remove file.
10486 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10487 (linux-ppc64-low.o): Remove rule.
10489 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10490 (init_registers_powerpc_64): Likewise.
10491 (ppc_regmap): Conditionally define depending on __powerpc64__.
10492 (ppc_cannot_store_register): Do not special-case "fpscr" when
10493 compiled on __powerpc64__.
10494 (ppc_collect_ptrace_register): New function.
10495 (ppc_supply_ptrace_register): New function.
10496 (ppc_breakpoint): Change type to "unsigned int".
10497 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10498 (the_low_target): Conditionally provide initializers for the
10499 arch_setup member depending on __powerpc64__. Install
10500 collect_ptrace_register and supply_ptrace_register members.
10502 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10504 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10505 * server.c (gdbserver_xmltarget): Define.
10506 (get_features_xml): Use it to replace "target.xml" and arch_string.
10508 * configure.srv: Remove srv_xmltarget. Add XML files that were
10509 mentioned there to srv_xmlfiles instead. Remove conditional tests
10510 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10511 srv_xmlfiles and srv_regobj to include all possible choices.
10512 * configure.ac (srv_xmltarget): Remove.
10513 (srv_xmlfiles): Do not add "target.xml".
10514 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10515 checks for supplementary target information.
10516 * configure: Regenerate.
10517 * Makefile.in (XML_TARGET): Remove.
10518 (target.xml): Remove rule.
10519 (clean): Do not clean up target.xml.
10520 (.PRECIOUS): Do not mention target.xml.
10522 * target.h (struct target_ops): Remove arch_string member.
10523 * linux-low.c (linux_arch_string): Remove.
10524 (linux_target_ops): Remove arch_string initializer.
10525 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10526 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10527 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10528 * spu-low.c (spu_arch_string): Remove.
10529 (spu_target_ops): Remove arch_string initializer.
10530 * win32-low.c (win32_arch_string): Remove.
10531 (win32_target_ops): Remove arch_string initializer.
10532 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10533 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10534 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10536 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10538 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10539 by collect_ptrace_register and supply_ptrace_register hooks.
10540 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10541 instead of checking for the_low_target.left_pad_xfer.
10542 (usr_store_inferior_registers): Use collect_ptrace_register callback
10543 instead of checking for the_low_target.left_pad_xfer.
10545 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10546 (s390_supply_ptrace_register): Likewise.
10547 (s390_fill_gregset): Call s390_collect_ptrace_register.
10548 (the_low_target): Update.
10550 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10551 (ppc_supply_ptrace_register): Likewise.
10552 (the_low_target): Update.
10554 * linux-i386-low.c (the_low_target): Update.
10555 * linux-x86-64-low.c (the_low_target): Update.
10557 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10559 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10560 reg-s390.o and reg-s390x.o.
10562 * linux-low.c (new_inferior): New global variable.
10563 (linux_create_inferior, linux_attach): Set it.
10564 (linux_wait_for_process): Call the_low_target.arch_setup after the
10565 target has stopped for the first time.
10566 (initialize_low): Do not call the_low_target.arch_setup.
10568 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10569 (s390_set_pc): Likewise.
10570 (s390_arch_setup): New function.
10571 (the_low_target): Use s390_arch_setup as arch_setup routine.
10573 * regcache.c (realloc_register_cache): New function.
10574 (set_register_cache): Call it for each existing regcache.
10576 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10578 * server.h (init_registers): Remove prototype.
10580 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10581 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10582 instead of init_registers ().
10583 * linux-arm-low.c (init_registers_arm): Add prototype.
10584 (init_registers_arm_with_iwmmxt): Likewise.
10585 (the_low_target): Add initializer for arch_setup field.
10586 * linux-cris-low.c (init_registers_cris): Add prototype.
10587 (the_low_target): Add initializer for arch_setup field.
10588 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10589 (the_low_target): Add initializer for arch_setup field.
10590 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10591 (the_low_target): Add initializer for arch_setup field.
10592 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10593 (the_low_target): Add initializer for arch_setup field.
10594 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10595 (the_low_target): Add initializer for arch_setup field.
10596 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10597 (the_low_target): Add initializer for arch_setup field.
10598 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10599 (init_registers_mips64_linux): Likewise.
10600 (the_low_target): Add initializer for arch_setup field.
10601 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10602 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10603 (the_low_target): Add initializer for arch_setup field.
10604 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10605 (init_registers_powerpc_64): Likewise.
10606 (the_low_target): Add initializer for arch_setup field.
10607 * linux-s390-low.c (init_registers_s390): Add prototype.
10608 (init_registers_s390x): Likewise.
10609 (the_low_target): Add initializer for arch_setup field.
10610 * linux-sh-low.c (init_registers_sh): Add prototype.
10611 (the_low_target): Add initializer for arch_setup field.
10612 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10613 (the_low_target): Add initializer for arch_setup field.
10614 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10615 (the_low_target): Add initializer for arch_setup field.
10617 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10618 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10619 instead of init_registers ().
10620 * win32-arm-low.c (init_registers_arm): Add prototype.
10621 (the_low_target): Add initializer for arch_setup field.
10622 * win32-i386-low.c (init_registers_i386): Add prototype.
10623 (the_low_target): Add initializer for arch_setup field.
10625 * spu-low.c (init_registers_spu): Add prototype.
10626 (initialize_low): Call initialie_registers_spu () instead of
10627 initialize_registers ().
10629 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10631 * server.c (handle_v_requests): When handling the vRun and vAttach
10632 packets, if already debugging a process, don't kill it. Return an
10635 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10637 * server.c (handle_query): Correct length check.
10639 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10641 * win32-low.c (do_initial_child_stuff): Add process handle
10642 parameter. Set current_process_handle and current_process_id from the
10643 parameters. Clear globals.
10644 (win32_create_inferior): Don't set current_process_handle and
10645 current_process_id here. Instead pass them on the call to
10646 do_initial_child_stuff.
10647 (win32_attach): Likewise.
10648 (win32_clear_inferiors): New.
10649 (win32_kill): Don't close the current process handle or the
10650 current thread handle here. Instead call win32_clear_inferiors.
10651 (win32_detach): Don't open a new handle to the process. Call
10652 win32_clear_inferiors.
10653 (win32_join): Don't rely on current_process_handle; open a new
10654 handle using the process id.
10655 (win32_wait): Call win32_clear_inferiors when the inferior process
10658 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10660 * server.c (monitor_show_help): Add "exit".
10662 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10664 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10665 (clean): Add reg-xtensa.c.
10666 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10667 * configure.srv (xtensa*-*-linux*) New target.
10668 * linux-xtensa-low.c: New.
10669 * xtensa-xtregs.c: New.
10671 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10673 * hostio.c: Don't include errno.h.
10674 (errno_to_fileio_errno): Move to hostio-errno.
10675 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10676 error number outputting to the target->hostio_last_error callback.
10677 (hostio_packet_error): Use FILEIO_EINVAL directly.
10678 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10679 calls to hostio_error.
10680 * hostio-errno.c: New.
10681 * server.h (hostio_last_error_from_errno): Declare.
10682 * target.h (target_ops): Add hostio_last_error member.
10683 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10684 as hostio_last_error handler.
10685 * spu-low.c (spu_target_ops): Likewise.
10686 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10687 (wince_hostio_last_error): New functions.
10688 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10689 as hostio_last_error handler.
10690 (win32_target_ops) [!_WIN32_WCE]: Register
10691 hostio_last_error_from_errno as hostio_last_error handler.
10692 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10693 (hostio-errno.o): New rule.
10694 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10695 * configure.srv (srv_hostio_err_objs): New variable. Default to
10697 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10698 * configure: Regenerate.
10700 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10702 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10703 (linux_kill, linux_detach): Clean up the process list.
10704 * remote-utils.c (remote_open): Improve port number parsing.
10705 (putpkt_binary, input_interrupt): Only send interrupts if the target
10707 * server.c (extended_protocol): Make static.
10708 (attached): Define earlier.
10709 (exit_requested, response_needed, program_argv): New variables.
10710 (target_running): New.
10711 (start_inferior): Clear attached here.
10712 (attach_inferior): Set attached here.
10713 (require_running): Define.
10714 (handle_query): Use require_running and target_running. Implement
10716 (handle_v_attach, handle_v_run): New.
10717 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10718 (gdbserver_usage): Update.
10719 (main): Redo argument parsing. Handle --debug and --multi. Handle
10720 --attach along with other options or after the port. Save
10721 program_argv. Support no initial program. Resynchronize
10722 communication with GDB after an error. Handle "monitor exit".
10723 Use require_running and target_running. Always allow the extended
10724 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10725 restart in extended mode.
10726 * README: Refer to the GDB manual. Update --attach usage.
10728 2007-12-20 Andreas Schwab <schwab@suse.de>
10730 * linux-low.c (STACK_SIZE): Define.
10731 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10732 (linux_test_for_tracefork): Likewise.
10734 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10736 * linux-low.c (linux_wait_for_event): Update messages. Do not
10737 reinsert auto-delete breakpoints.
10738 * mem-break.c (struct breakpoint): Change return type of handler to
10740 (set_breakpoint_at): Update handler type.
10741 (reinsert_breakpoint_handler): Return 1 instead of calling
10743 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10745 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10746 * mem-break.h (set_breakpoint_at): Update handler type.
10747 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10748 * win32-low.c (auto_delete_breakpoint): New.
10749 (get_child_debug_event): Use it.
10751 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10753 * configure.ac: Check for pread and pwrite.
10754 * hostio.c (handle_pread): Fall back to lseek and read.
10755 (handle_pwrite): Fall back to lseek and write.
10756 * config.in, configure: Regenerated.
10758 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10760 * server.c (myresume): Add own_buf argument.
10761 (main): Update calls.
10763 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10765 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10766 * remote-utils.c (remote_open): Do not call disable_async_io.
10767 (block_async_io): Delete.
10768 (unblock_async_io): Make static.
10769 (initialize_async_io): New.
10770 * server.c (handle_v_cont): Handle async I/O here.
10771 (myresume): Likewise. Move other common resume tasks here...
10772 (main): ... from here. Call initialize_async_io. Disable async
10773 I/O before the main loop.
10774 * server.h (initialize_async_io): Declare.
10775 (block_async_io, unblock_async_io): Delete prototypes.
10776 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10778 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10780 * remote-utils.c (readchar): Allow binary data in received messages.
10782 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10784 * win32-low.c (attaching): New global.
10785 (win32_create_inferior): Clear the `attaching' global.
10786 (win32_attach): Set the `attaching' global.
10787 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10788 attaching. Only set a breakpoint at the entry point if not
10791 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10793 * server.c (main): Don't report dll events on the initial
10794 connection on attaches.
10796 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10798 * server.c (main): Relax numerical bases supported for the pid of
10799 the --attach command line argument.
10801 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10803 * win32-low.c (win32_attach): Call OpenProcess before
10804 DebugActiveProcess, not after. Add last error output to error
10807 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10809 * win32-low.c (win32_get_thread_context)
10810 (win32_set_thread_context): New functions.
10811 (thread_rec): Use win32_get_thread_context.
10812 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10813 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10816 2007-12-03 Leo Zayas
10817 Pedro Alves <pedro_alves@portugalmail.pt>
10819 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10821 (child_add_thread): Minor cleanup.
10822 (child_continue): Resume artificially suspended threads before
10823 calling ContinueDebugEvent.
10824 (suspend_one_thread): New.
10825 (fake_breakpoint_event): New.
10826 (get_child_debug_event): Change return type to int. Check here if
10827 gdb sent an interrupt request. If a soft interrupt was requested,
10828 fake a breakpoint event. Return 0 if there is no event to handle,
10830 (win32_wait): Don't check here if gdb sent an interrupt request.
10831 Ensure there is a valid event to handle.
10832 (win32_request_interrupt): Add soft interruption method as last
10835 2007-12-03 Leo Zayas
10836 Pedro Alves <pedro_alves@portugalmail.pt>
10838 * win32-low.h (win32_thread_info): Add descriptions to the
10839 structure members. Replace `suspend_count' counter by a
10841 * win32-low.c (thread_rec): Update condition of when to get the
10842 context from the inferior. Rely on ContextFlags being set if it
10843 has already been retrieved. Only suspend the inferior thread if
10844 we haven't already. Warn if that fails.
10845 (continue_one_thread): s/suspend_count/suspended/. Only call
10846 ResumeThread once. Warn if that fails.
10848 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10850 * win32-low.c (win32_wait): Don't read from the inferior when it
10851 has already exited.
10853 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10855 * Makefile.in (win32_low_h): New variable.
10856 (win32-low.o): Add dependency on $(win32_low_h).
10857 (win32-arm-low.o, win32-i386-low.o): New rules.
10859 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10861 * hostio.c: Correct copyright year.
10863 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10865 * Makefile.in (OBS): Add hostio.o.
10866 (hostio.o): New rule.
10867 * server.h (handle_vFile): Declare.
10868 * hostio.c: New file.
10869 * server.c (handle_v_requests): Take packet_len and new_packet_len
10870 for binary packets. Call handle_vFile.
10871 (main): Update call to handle_v_requests.
10873 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10875 * linux-low.c: Include <sched.h>.
10877 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10879 * linux-low.c (linux_tracefork_grandchild): New.
10880 (linux_tracefork_child): Use clone.
10881 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10883 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10885 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10887 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10889 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10891 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10893 * inferiors.c (change_inferior_id): Delete.
10894 (add_pid_to_list, pull_pid_from_list): New.
10895 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10896 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10897 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10898 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10899 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10900 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10901 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10902 (using_threads): Always set to 1.
10903 (handle_extended_wait): New.
10904 (add_process): Do not set TID.
10905 (linux_create_inferior): Set must_set_ptrace_flags.
10906 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10907 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10908 (linux_thread_alive): Rename TID argument to LWPID.
10909 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10910 (linux_wait_for_event): Do not use TID or check using_threads. Update
10911 call to dead_thread_notify. Call handle_extended_wait.
10912 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10913 (send_sigstop): Delete sigstop_sent.
10914 (wait_for_sigstop): Avoid TID.
10915 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10916 (linux_test_for_tracefork): New.
10917 (linux_lookup_signals): Use thread_db_active and
10918 linux_supports_tracefork_flag.
10919 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10920 * linux-low.h (get_process_thread): Avoid TID.
10921 (struct process_ifo): Move thread_known and tid to the end. Remove
10923 (linux_attach_lwp, thread_db_init): Update prototypes.
10924 * server.h (change_inferior_id): Delete prototype.
10925 (add_pid_to_list, pull_pid_from_list): New prototypes.
10926 * thread-db.c (thread_db_use_events): New.
10927 (find_first_thread): Rename to...
10928 (find_one_thread): ...this. Update callers and messages. Do not
10929 call fatal. Check thread_db_use_events. Do not call
10930 change_inferior_id or new_thread_notify.
10931 (maybe_attach_thread): Update. Do not call new_thread_notify.
10932 (thread_db_init): Set thread_db_use_events. Check use_events.
10933 * utils.c (fatal, warning): Correct message prefix.
10935 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10937 * Makefile.in (clean): Remove new files.
10938 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10939 (powerpc-64.o, powerpc-64.c): New rules.
10940 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10941 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10943 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10945 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10946 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10947 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10948 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10949 (target_regsets): Add AltiVec and SPE register sets.
10950 * configure.ac: Check for AltiVec and SPE.
10951 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10952 (ppc_fill_vrregset, ppc_store_vrregset): New.
10953 (target_regsets): Add AltiVec register set.
10954 * configure: Regenerated.
10956 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10958 * linux-low.c (O_LARGEFILE): Define.
10959 (linux_read_memory): Use /proc/PID/mem.
10960 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10961 * configure, config.in: Regenerated.
10963 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10965 * linux-low.c (linux_wait_for_event): Do not pass signals while
10968 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10970 * win32-low.c (create_process): New.
10971 (win32_create_inferior): Use create_process instead of
10972 CreateProcess. If create_process failed retry appending an ".exe"
10973 suffix. Store the GetLastError result immediatelly after
10974 create_process calls and use it on the call to error.
10976 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10978 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10980 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10982 * configure.ac: Switch license to GPLv3.
10984 2007-08-01 Michael Snyder <msnyder@access-company.com>
10986 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10988 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10990 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10992 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10993 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10994 CloseToolhelp32Snapshot.
10995 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10996 CloseToolhelp32Snapshot.
10998 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11000 * server.c (main): Check for inferior exit before main loop.
11002 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11004 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11005 instead of on tmp_desc.
11007 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11008 Daniel Jacobowitz <dan@codesourcery.com>
11010 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11011 (add_thread): Minor cleanups.
11012 (clear_inferiors): Move lower in the file. Clear the DLL
11014 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11015 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11016 (xml_escape_text): New.
11017 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11019 (handle_v_cont): Report errors.
11020 (gdbserver_version): Update.
11021 (main): Correct size of own_buf. Do not report initial DLL events.
11022 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11023 (unloaded_dll, xml_escape_text): New.
11024 * win32-low.c (enum target_waitkind): Update comments.
11025 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11026 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11027 (win32_EnumProcessModules, win32_GetModuleInformation)
11028 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11029 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11030 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11031 (win32_Module32First, win32_Module32Next, load_toolhelp)
11032 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11033 (get_child_debug_event): Handle DLL events.
11034 (win32_wait): Likewise.
11036 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11038 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11039 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11041 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11043 * win32-low.c (handle_output_debug_string): Ignore event if not
11046 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11048 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11050 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11052 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11054 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11056 * inferiors.c (change_inferior_id): Add comment.
11057 * linux-low.c (check_removed_breakpoint): Add an early
11058 prototype. Improve debug output.
11059 (linux_attach): Doc update.
11060 (linux_detach_one_process, linux_detach): Clean up before releasing
11062 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11063 * linux-low.h (struct process_info): Doc improvement.
11064 * mem-break.c (delete_all_breakpoints): New.
11065 * mem-break.h (delete_all_breakpoints): New prototype.
11066 * thread-db.c (find_first_thread): New.
11067 (thread_db_create_event): Call it instead of
11068 thread_db_find_new_threads. Clean up unused variables.
11069 (maybe_attach_thread): Remove first thread handling.
11070 (thread_db_find_new_threads): Use find_first_thread.
11071 (thread_db_get_tls_address): Likewise.
11073 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11075 * thread-db.c (thread_db_find_new_threads): Add prototype.
11076 (thread_db_create_event): Check for the main thread before adding
11078 (maybe_attach_thread): Only enable event reporting if TID == 0.
11079 (thread_db_get_tls_address): Check for new threads.
11081 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11083 * linux-low.c (linux_create_inferior): Try execv before execvp.
11084 * spu-low.c (spu_create_inferior): Likewise.
11086 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11088 * linux-low.c (linux_create_inferior): Change execv to execvp.
11089 * spu-low.c (spu_create_inferior): Likewies.
11091 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11093 * Makefile.in (clean): Clean new files instead of deleted ones.
11094 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11095 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11097 * configure.srv: Specify XML files and new regformats for MIPS and
11099 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11100 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11101 an entry for the restart register.
11102 (mips_cannot_fetch_register, mips_cannot_store_register)
11103 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11104 register names to match the XML descriptions.
11105 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11106 restart register instead of $0.
11108 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11109 Markus Deuling <deuling@de.ibm.com>
11111 * remote-utils.c (decode_xfer_write): New function.
11112 * server.h (decode_xfer_write): Add prototype.
11113 * server.c (handle_query): Add PACKET_LEN argument. Support
11114 qXfer:spu:read and qXfer:spu:write packets.
11115 (main): Pass packet_len to handle_query.
11116 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11117 * target.h (target_ops): Add qxfer_spu.
11119 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11121 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11122 accessing non-seekable spufs files.
11124 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11126 * server.c (handle_query): Add reply for qC packet.
11128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11129 Leo Zayas <lerele@champenstudios@com>
11131 * server.h (check_remote_input_interrupt_request): New function.
11132 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11133 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11134 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11135 (check_remote_input_interrupt_request): New function.
11136 * server.h (check_remote_input_interrupt_request): Declare.
11137 * win32-low.c (winapi_DebugBreakProcess,
11138 winapi_GenerateConsoleCtrlEvent): New typedefs.
11139 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11141 (win32_wait): Check for remote interrupt request
11142 with check_remote_input_interrupt_request.
11143 (win32_request_interrupt): New function.
11144 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11146 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11148 * win32-low.c (debug_registers_changed,
11149 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11150 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11151 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11152 (thread_rec): Get context using the low target.
11153 (child_add_thread): Call thread_added on the low target,
11154 which does the same thing.
11156 (do_initial_child_stuff): Remove debug registers references.
11157 Set context using the low target. Resume threads after
11158 setting the contexts.
11159 (child_continue): Remove dead variable. Remove debug
11160 registers references.
11161 (child_fetch_inferior_registers): Go through the low target.
11162 (do_child_store_inferior_registers): Remove.
11163 (child_store_inferior_registers): Go through the low target.
11164 (win32_resume): Remove debug registers references.
11165 Set context using the low target.
11166 (handle_exception): Change return type to void. Don't record
11167 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11168 first chance exception.
11169 (get_child_debug_event): Change return type to void. Remove
11170 goto loop. Always return after waiting for debug event.
11171 (win32_wait): Convert to switch statement. Handle spurious
11174 * win32-i386-low.c (debug_registers_changed,
11175 debug_registers_used): New.
11176 (initial_stuff): Rename to ...
11177 (i386_initial_stuff): ... this. Clear debug registers
11179 (store_debug_registers): Delete.
11180 (i386_get_thread_context): New.
11181 (load_debug_registers): Delete.
11182 (i386_set_thread_context): New.
11183 (i386_thread_added): New.
11184 (single_step): Rename to ...
11185 (i386_single_step): ... this.
11186 (do_fetch_inferior_registers): Rename to ...
11187 (i386_fetch_inferior_register): ... this.
11188 (i386_store_inferior_register): New.
11189 (the_low_target): Adapt to new interface.
11191 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11192 (arm_get_thread_context): New.
11193 (arm_set_thread_context): New.
11195 (do_fetch_inferior_registers): Rename to ...
11196 (arm_fetch_inferior_register): ... this.
11197 (arm_store_inferior_register): New.
11198 (arm_wince_breakpoint): Reimplement as unsigned long.
11199 (arm_wince_breakpoint_len): Define.
11200 (the_low_target): Adapt to new interface.
11202 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11203 load_debug_registers. Add get_thread_context, set_thread_context,
11204 thread_added and store_inferior_register. Rename
11205 fetch_inferior_registers to fetch_inferior_register.
11206 (regptr): Remove declaration.
11208 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11210 * linux-low.c (linux_detach): Change return type to int. Return 0.
11211 * spu-low.c (spu_detach): Likewise.
11213 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11215 * target.h (target_ops): Change return type of detach to int.
11217 (join_inferior): New.
11218 * server.c (main): Don't skip detach support on mingw32.
11219 If the inferior doesn't support detaching return error.
11220 Call join_inferior instead of using waitpid.
11221 * linux-low.c (linux_join): New.
11222 (linux_target_op): Add linux_join.
11223 * spu-low.c (spu_join): New.
11224 (spu_target_ops): Add spu_join.
11225 * win32-low.c (win32_detach): Adapt to new interface.
11226 Reopen current_process_handle before detaching. Issue a child
11227 resume before detaching.
11229 (win32_target_op): Add win32_join.
11231 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11233 * win32-low.c (win32-attach): Fix return value.
11234 * target.h (target_ops): Describe ATTACH return values.
11236 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11238 * win32-low.c (GETPROCADDRESS): Define.
11239 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11240 (winapi_DebugSetProcessKillOnExit): Likewise.
11241 (win32_create_inferior): Force usage of ansi CreateProcessA.
11242 (win32_attach): Use GETPROCADDRESS.
11243 (win32_detach): Likewise.
11245 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11247 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11249 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11251 * win32-low.c: Commit leftover changes from 2007-03-29.
11253 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11255 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11256 fields short instead of int. Add explicit padding.
11257 (i387_cache_to_fsave): Remove unnecessary casts.
11258 (i387_fsave_to_cache): Doc fix.
11259 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11261 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11263 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11264 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11266 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11268 * configure.srv (arm*-*-mingw32ce*): Move near the other
11271 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11273 * configure.ac: Add errno checking.
11274 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11275 sys/file.h and malloc.h.
11276 (AC_CHECK_DECLS): Add perror.
11277 (srv_mingwce): Handle.
11278 * configure.srv (i[34567]86-*-cygwin*): Add
11279 win32-i386-low.o to srv_tgtobj.
11280 (i[34567]86-*-mingw*): Likewise.
11281 (arm*-*-mingw32ce*): Add case.
11282 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11283 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11284 [__MINGW32CE__] (strerror): New function.
11285 [__MINGW32CE__] (errno): Define to GetLastError.
11286 [__MINGW32CE__] (COUNTOF): New macro.
11287 (remote_open): Remove extra close call.
11288 * mem-break.c (delete_breakpoint_at): New function.
11289 * mem-break.h (delete_breakpoint_at): Declare.
11290 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11291 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11292 [USE_WIN32API] (read, write): Add char* casts.
11293 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11294 * server.h: Include wincecompat.h on Windows CE.
11295 [HAVE_ERRNO_H]: Check.
11296 (perror): Declare if not declared.
11297 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11298 (perror_with_name): Remove errno declaration.
11299 * wincecompat.h: New.
11300 * wincecompat.c: New.
11301 * win32-low.h: New.
11302 * win32-arm-low.c: New.
11303 * win32-i386-low.c: New.
11304 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11305 (OUTMSG2): Make it safe.
11307 (COUNTOF): New macro.
11308 (NUM_REGS): Get it from the low target.
11309 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11310 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11311 (thread_rec): Let low target handle debug registers.
11312 (child_add_thread): Likewise.
11313 (child_init_thread_list): Likewise.
11314 (continue_one_thread): Likewise.
11316 (do_child_fetch_inferior_registers): Move to ...
11317 * win32-i386-low.c: ... here, and rename to ...
11318 (do_fetch_inferior_registers): ... this.
11319 * win32-low.c (child_fetch_inferior_registers):
11320 Go through the low target.
11321 (do_child_store_inferior_registers): Use regptr.
11322 (strwinerror): New function.
11323 (win32_create_inferior): Handle Windows CE.
11324 Use strwinerror instead of strerror on Windows error
11325 codes. Add program to the error output.
11326 Don't close the main thread handle on Windows CE.
11327 (win32_attach): Use coredll.dll on Windows CE.
11328 (win32_kill): Close current process and current
11330 (win32_detach): Use coredll.dll on Windows CE.
11331 (win32_resume): Let low target handle debug registers, and
11333 (handle_exception): Add/Remove initial breakpoint. Avoid
11334 non-existant WSTOPSIG on Windows CE.
11335 (win32_read_inferior_memory): Cast to remove warning.
11336 (win32_arch_string): Go through the low target.
11337 (initialize_low): Call set_breakpoint_data with the low
11338 target's breakpoint.
11339 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11340 FOP_REGNUM, mappings): Move to ...
11341 * win32-i386-low.c: ... here.
11342 * win32-low.c (win32_thread_info): Move to ...
11343 * win32-low.h: ... here.
11344 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11345 win32-arm-low.c and wincecompat.c.
11346 (all:): Add $EXEEXT.
11347 (install-only:): Likewise.
11348 (gdbserver:): Likewise.
11349 (gdbreplay:): Likewise.
11350 * config.in: Regenerate.
11351 * configure: Regenerate.
11353 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11355 * win32-low.c: Rename typedef thread_info to
11356 win32_thread_info throughout.
11358 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11360 * win32-i386-low.c: Rename to ...
11361 * win32-low.c: ... this.
11362 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11363 * Makefile.in: Likewise.
11365 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11367 * remote-utils.c (monitor_output): Constify msg parameter.
11368 * server.h (monitor_output): Likewise.
11369 * win32-i386-low.c (handle_output_debug_string): New.
11370 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11371 handle_output_debug_string.
11372 (get_child_debug_event): Likewise.
11374 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11376 * server.c (main): Correct strtoul check.
11378 2007-03-27 Jon Ringle <jon@ringle.org>
11380 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11382 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11384 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11386 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11388 * terminal.h: Check HAVE_SGTTY_H.
11390 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11392 * remote-utils.c (remote_open): Print out the assigned port number.
11394 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11396 * remote-utils.c (monitor_output): New function.
11397 * server.c (debug_threads): Define here.
11398 (monitor_show_help): New function.
11399 (handle_query): Handle qRcmd.
11400 (main): Do not handle 'd' packet.
11401 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11402 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11405 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11407 * Makefile.in (EXEEXT): New.
11408 (clean): Use $(EXEEXT).
11410 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11412 * target.h (target_ops): Rename send_signal to request_interrupt,
11413 and remove enum target_signal parameter.
11414 * linux-low.c (linux_request_interrupt): Rename from
11415 linux_send_signal, and always send SIGINT.
11416 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11417 and always send SIGINT.
11418 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11420 (input_interrupt): Likewise.
11422 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11424 * server.c (get_features_xml): Check if target implemented
11426 * win32-i386-low.c (win32_arch_string): New.
11427 (win32_target_ops): Add win32_arch_string as arch_string member.
11429 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11431 * spu-low.c (spu_arch_string): New.
11432 (spu_target_ops): Add spu_arch_string.
11434 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11436 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11437 * configure.ac: Do not check for terminal.h.
11438 * configure, config.in: Regenerated.
11440 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11442 * Makefile.in (OBS): Add $(XML_BUILTIN).
11443 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11445 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11446 (arm-with-iwmmxt.c): New.
11447 * config.in, configure: Regenerate.
11448 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11449 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11450 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11451 (arm*-*-linux*): Add iWMMXt and regset support.
11452 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11453 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11454 (arm_store_wmmxregset, target_regsets): New.
11455 * server.c (get_features_xml): Take annex argument. Check builtin
11457 (handle_query): Handle multiple annexes.
11459 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11461 * remote-utils.c [USE_WIN32API] (read, write): Define.
11462 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11465 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11467 * linux-i386-low.c (the_low_target): Set arch_string.
11468 * linux-x86-64-low.c (the_low_target): Likewise.
11469 * linux-low.c (linux_arch_string): New.
11470 (linux_target_ops): Add it.
11471 * linux-low.h (struct linux_target_ops): Add arch_string.
11472 * server.c (write_qxfer_response): Use const void * for DATA.
11473 (get_features_xml): New.
11474 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11475 * target.h (struct target_ops): Add arch_string method.
11477 2007-01-03 Denis Pilat <denis.pilat@st.com>
11478 Daniel Jacobowitz <dan@codesourcery.com>
11480 * linux-low.c (linux_kill): Handle being called with no threads.
11481 * win32-i386-low.c (win32_kill): Likewise.
11482 (get_child_debug_event): Clear current_process_handle.
11484 2006-12-30 Denis PILAT <denis.pilat@st.com>
11485 Daniel Jacobowitz <dan@codesourcery.com>
11487 * remote-utils.c (remote_open): Check the type of specified
11488 serial port devices before opening them.
11489 * server.c (main): Kill the inferior if an error occurs during
11490 the first remote_open.
11492 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11494 * README: Update supported targets.
11496 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11498 * Makefile.in (clean): Remove reg-mips64.c.
11499 (reg-mips64.c, reg-mips64.o): New rules.
11500 * configure.srv: Handle mips64. Include regset support for mips.
11501 * linux-mips-low.c (union mips_register): New.
11502 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11503 (mips_breakpoint, mips_breakpoint_at): Use int.
11504 (mips_collect_register, mips_supply_register)
11505 (mips_collect_register_32bit, mips_supply_register_32bit)
11506 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11507 (mips_store_fpregset, target_regsets): New.
11508 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11510 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11512 * configure.srv: Add target "spu*-*-*".
11513 * Makefile.in (clean): Remove reg-spu.c.
11514 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11515 * spu-low.c: New file.
11517 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11519 * configure.ac: Correct td_thr_tls_get_addr test.
11520 * configure: Regenerated.
11522 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11524 * linux-low.c (linux_wait_for_event): Reformat. Use the
11525 pass_signals array.
11526 * remote-utils.c (decode_address_to_semicolon): New.
11527 * server.c (pass_signals, handle_general_set): New.
11528 (handle_query): Mention QPassSignals for qSupported.
11529 (main): Call handle_general_set.
11530 * server.h (pass_signals, decode_address_to_semicolon): New.
11532 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11534 * server.c (handle_query): Correct error handling for read_auxv.
11536 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11538 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11539 and srv_linux_thread_db to yes.
11540 * linux-s390-low.c (s390_fill_gregset): New function.
11541 (target_regsets): Define data structure.
11543 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11545 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11546 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11547 * config.in, configure: Regenerated.
11548 * inferiors.c (gdb_id_to_thread): New function.
11549 (gdb_id_to_thread_id): Use it.
11550 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11551 * linux-low.h (struct process_info): Add th member.
11552 (thread_db_get_tls_address): New prototype.
11553 * remote-utils.c (decode_address): Make non-static.
11554 * server.c (handle_query): Handle qGetTLSAddr.
11555 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11556 * target.h (struct target_ops): Add get_tls_address.
11557 * thread-db.c (maybe_attach_thread): Save the thread handle.
11558 (thread_db_get_tls_address): New.
11560 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11562 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11563 (linux_resume_one_process): Take a siginfo_t *. Update all
11564 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11565 (struct pending_signals): Add a siginfo_t.
11566 (linux_wait_for_process): Always set last_status.
11567 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11568 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11569 * linux-low.h (struct process_info): Add last_status.
11571 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11573 * remote-utils.c (try_rle): New function.
11574 (putpkt_binary): Use it.
11576 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11578 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11579 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11580 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11581 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11582 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11585 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11587 * server.c (terminal_fd): New variable.
11588 (old_foreground_pgrp): Likewise.
11589 (restore_old_foreground_pgrp): New function.
11590 (start_inferior): Record the terminal file descriptor in terminal_fd
11591 and its original foreground group in old_foreground_pgrp. Register
11592 restore_old_foreground_pgrp with atexit().
11594 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11596 * server.c (handle_query): Correct qPart to qXfer.
11598 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11600 * configure.ac: Check for more headers which are missing on
11601 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11602 * configure.srv: Add Cygwin and mingw32.
11603 * remote-utils.c: Don't include headers unconditionally which
11604 are missing on mingw32. Include <winsock.h> for mingw32.
11605 (remote_open): Adjust for mingw32 support. Flush
11606 standard error after writing to it.
11607 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11608 (unblock_async_io, enable_async_io, disable_async_io)
11609 (readchar, getpkt): Update for Winsock support.
11610 (prepare_resume_reply): Expect a protocol signal number.
11611 * server.c: Disable <sys/wait.h> on mingw32.
11612 (start_inferior): Adjust for mingw32 support. Flush
11613 standard error after writing to it.
11614 (attach_inferior): Likewise. Use protocol signal
11616 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11618 * win32-i386-low.c: New file.
11619 * Makefile.in (XM_CLIBS): Set.
11620 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11621 (win32-i386-low.o): New dependency rule.
11622 * linux-low.c (linux_wait): Use target signal numbers.
11623 * target.h (struct target_ops): Doc fix.
11624 * server.h (target_signal_to_name): New prototype.
11625 * gdbreplay.c: Don't include headers unconditionally which
11626 are missing on mingw32. Include <winsock.h> for mingw32.
11627 (remote_close, remote_open): Adjust for Winsock support.
11628 * configure, config.in: Regenerated.
11630 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11632 * server.c (decode_xfer_read, write_qxfer_response): New.
11633 (handle_query): Take a packet length argument. Handle
11634 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11635 the qSupported response.
11636 (main): Update call to handle_query.
11638 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11640 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11641 (putpkt_binary): Renamed from putpkt and adjusted for binary
11643 (putpkt): New wrapper for putpkt_binary.
11644 (readchar): Don't mask off the high bit.
11645 (decode_X_packet): New function.
11646 * server.c (main): Call putpkt_binary if a handler sets the packet
11647 length. Save the length of the incoming packet. Handle 'X'.
11648 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11650 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11652 * server.c (handle_query): Handle qSupported.
11654 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11656 * remote-utils.c (all_symbols_looked_up): New variable.
11657 (look_up_one_symbol): Check it.
11658 * server.h (look_up_one_symbol): New declaration.
11659 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11661 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11663 * Makefile.in (linux-arm-low.o): Update dependencies.
11664 * linux-arm-low.c: Include "gdb_proc_service.h".
11665 (PTRACE_GET_THREAD_AREA): Define.
11666 (ps_get_thread_area): New function.
11668 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11670 * configure.srv (m68k*-*-uclinux*): New target.
11671 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11672 (linux_resume_one_process): Remove extraneous cast.
11673 (linux_read_offsets): New.
11674 (linux_target_op): Add linux_read_offsets on mmuless systems.
11675 * server.c (handle_query): Add qOffsets logic.
11676 * target.h (struct target_ops): Add read_offsets.
11678 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11680 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11681 (PTRACE_GET_THREAD_AREA): Define.
11682 (ps_get_thread_area): New function.
11683 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11684 (linux-x86-64-low.o): Update.
11686 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11688 * configure.ac: Remove checks for prfpregset_t.
11689 * gdb_proc_service.h: New file.
11690 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11691 new "gdb_proc_service.h".
11692 * proc-service.c: Likewise.
11693 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11694 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11695 * Makefile.in (gdb_proc_service_h): Updated.
11696 * configure, config.in: Regenerated.
11698 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11700 * remote-utils.c (prepare_resume_reply): Move declaration
11701 of gdb_id_from_wait to the top of the block.
11703 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11705 * linux-low.c (regsets_store_inferior_registers): Read the regset
11706 from the target before filling it.
11708 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11710 * server.c (attach_inferior): Return SIGTRAP for a successful
11713 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11715 * Makefile.in (OBS): Add version.o.
11716 (STAGESTUFF): Delete.
11717 (version.o): Add dependencies.
11718 (version.c): Replace rule.
11719 (clean): Remove version.c.
11720 * server.c (gdbserver_version): New.
11721 (gdbserver_usage): Use printf.
11722 (main): Handle --version and --help.
11723 * server.h (version, host_name): Add declarations.
11725 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11737 * linux-x86-64-low.c:
11739 * linux-s390-low.c:
11740 * linux-ppc64-low.c:
11742 * linux-mips-low.c:
11743 * linux-m68k-low.c:
11744 * linux-m32r-low.c:
11747 * linux-ia64-low.c:
11748 * linux-i386-low.c:
11749 * linux-crisv32-low.c:
11761 * gdbserver.1: Add (C) after Copyright. Update the FSF
11764 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11766 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11767 (arm_breakpoint_at): Recognize both breakpoints.
11768 (the_low_target): Use the correct breakpoint instruction.
11770 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11772 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11773 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11774 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11775 (the_low_target): Update.
11777 2005-10-25 Andreas Schwab <schwab@suse.de>
11779 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11781 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11782 (ia64_num_regs): Reduce to 462.
11784 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11786 * acinclude.m4: Correct quoting.
11787 * aclocal.m4: Regenerated.
11789 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11790 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11791 (thread_db_init): Call thread_db_err_str.
11792 * configure.ac: Check for TD_VERSION.
11793 * config.in, configure: Regenerated.
11795 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11797 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11799 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11801 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11802 is not available. Define HAVE_PTRACE_GETREGS if it is.
11803 * config.in, configure: Regenerated.
11804 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11805 * linux-i386-low.c, linux-m68k-low.c: Update to use
11806 HAVE_PTRACE_GETREGS.
11807 * linux-low.c (regsets_fetch_inferior_registers)
11808 (regsets_store_inferior_registers): Only return 0 if we processed
11810 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11811 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11813 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11815 * inferiors.c (struct thread_info): Add gdb_id.
11816 (add_thread): Add gdb_id argument.
11817 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11818 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11819 calls to add_thread.
11820 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11821 * server.c (handle_query): Use thread_to_gdb_id.
11822 (handle_v_cont, main): Use gdb_id_to_thread_id.
11823 * server.h (add_thread): Update prototype.
11824 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11827 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11829 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11830 left-padded registers.
11831 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11832 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11834 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11836 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11837 * configure: Regenerate.
11838 * config.in: Regenerate.
11839 * server.h (NEED_DECLARATION_STRERROR):
11840 Replace with !HAVE_DECL_STRERROR.
11842 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11844 * linux-low.c (linux_wait, linux_send_signal): Don't test
11845 an unsigned long variable for > 0 if it could be MAX_ULONG.
11846 * server.c (myresume): Likewise.
11847 * target.c (set_desired_inferior): Likewise.
11849 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11851 * configure.ac: Simplify and improve check for socklen_t.
11852 * configure, config.in: Regenerate.
11854 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11856 * acconfig.h: Remove.
11857 * configure.ac: Add a test for socklen_t. Use three-argument
11858 AC_DEFINE throughout.
11859 * config.in: Regenerated using autoheader 2.59.
11860 * configure: Regenerated.
11862 * gdbreplay.c (socklen_t): Provide a default.
11863 (remote_open): Use socklen_t.
11864 * remote-utils.c (socklen_t): Provide a default.
11865 (remote_open): Use socklen_t.
11866 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11869 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11871 * linux-low.c (linux_read_memory, linux_write_memory)
11872 (linux_read_auxv): Likewise.
11873 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11874 (check_mem_write): Likewise.
11875 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11877 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11878 (registers_from_string, register_data): Likewise.
11879 * server.c (handle_query, main): Likewise.
11880 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11881 (decode_M_packet): Likewise.
11882 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11883 * target.h (struct target_ops): Update read_memory, write_memory,
11885 (read_inferior_memory, write_inferior_memory): Update.
11886 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11887 to unsigned char *.
11888 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11889 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11890 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11891 linux-s390-low.c, linux-sh-low.c: Update for changes in
11892 read_inferior_memory and the_low_target->breakpoint.
11894 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11896 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11897 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11898 * configure.srv: Add powerpc64-*-linux*.
11899 * linux-ppc64-low.c: New file.
11901 2005-05-23 Orjan Friberg <orjanf@axis.com>
11903 * linux-cris-low.c: New file with support for CRIS.
11904 * linux-crisv32-low.c: Ditto for CRISv32.
11905 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11906 (clean): Add reg-cris.c and reg-crisv32.c.
11907 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11908 reg-crisv32.o, and reg-crisv32.c to make rules.
11909 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11910 recognized targets.
11912 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11914 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11915 of sizeof (PTRACE_XFER_TYPE).
11916 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11918 2005-05-12 Orjan Friberg <orjanf@axis.com>
11920 * target.h (struct target_ops): Add insert_watchpoint,
11921 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11922 pointers for hardware watchpoint support.
11923 * linux-low.h (struct linux_target_ops): Ditto.
11924 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11925 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11926 to linux_target_ops.
11927 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11929 * server.c (main): Recognize 'Z' and 'z' packets.
11931 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11933 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11934 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11935 (the_low_target): Add new members.
11937 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11939 * proc-service.c (ps_lgetregs): Search all_processes instead of
11942 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11944 * server.c (start_inferior): Change return type to int.
11945 (attach_inferior): Change sigptr to int *.
11946 (handle_v_cont, handle_v_requests): Change signal to int *.
11947 (main): Change signal to int.
11949 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11951 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11952 * configure.srv: Add m32r*-*-linux*.
11953 * linux-m32r-low.c: New file.
11955 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11957 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11959 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11961 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11962 Take unsigned long arguments for PIDs.
11963 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11964 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11965 (wait_for_sigstop, linux_resume_one_process)
11966 (regsets_fetch_inferior_registers, linux_send_signal)
11967 (linux_read_auxv): Likewise. Update the types of variables holding
11968 PIDs. Update format string specifiers.
11969 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11970 * remote-utils.c (prepare_resume_reply): Likewise.
11971 * server.c (cont_thread, general_thread, step_thread)
11972 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11974 (handle_query): Update format specifiers.
11975 (handle_v_cont, main): Use strtoul for thread IDs.
11976 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11977 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11978 (general_thread, step_thread, thread_from_wait)
11979 (old_thread_from_wait): Update.
11980 * target.h (struct thread_resume): Use unsigned long for THREAD.
11981 (struct target_ops): Use unsigned long for arguments to attach and
11984 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11986 * acinclude.m4: Include bfd/bfd.m4 directly.
11987 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11988 <agriffis@toolchain.org>.
11989 * aclocal.m4, configure: Regenerated.
11991 2005-01-07 Andrew Cagney <cagney@gnu.org>
11993 * configure.ac: Rename configure.in, require autoconf 2.59.
11994 * configure: Re-generate.
11996 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11998 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11999 LIBS when finished.
12000 * aclocal.m4: Regenerated.
12001 * configure: Regenerated.
12003 2004-11-21 Andreas Schwab <schwab@suse.de>
12005 * linux-m68k-low.c (m68k_num_gregs): Define.
12006 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12007 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12008 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12009 (m68k_breakpoint_at): New. Add to the_low_target.
12011 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12012 srv_linux_thread_db to yes.
12014 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12016 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12017 (ARCH_SET_FS): Likewise.
12018 (ARCH_GET_FS): Likewise.
12019 (ARCH_GET_GS): Likewise.
12021 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12023 * linux-i386-low.c (ps_get_thread_area): New.
12024 * linux-x86-64-low.c (ps_get_thread_area): New.
12025 * linux-low.c: Include <sys/syscall.h>.
12026 (linux_kill_one_process): Don't kill the first thread here.
12027 (linux_kill): Kill the first thread here.
12028 (kill_lwp): New function.
12029 (send_sigstop, linux_send_signal): Use it.
12030 * proc-service.c: Clean up #ifdefs.
12031 (fpregset_info): Delete.
12032 (ps_lgetregs): Update and enable implementation.
12033 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12035 * remote-utils.c (struct sym_cache, symbol_cache): New.
12036 (input_interrupt): Print a clearer message.
12037 (async_io_enabled): New variable.
12038 (enable_async_io, disable_async_io): Use it. Update comments.
12039 (look_up_one_symbol): Use the symbol cache.
12040 * thread-db.c (thread_db_look_up_symbols): New function.
12041 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12043 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12045 * configure.in: Test for -rdynamic.
12046 * configure: Regenerated.
12047 * Makefile (INTERNAL_LDFLAGS): New.
12048 (gdbserver, gdbreplay): Use it.
12050 2004-09-02 Andrew Cagney <cagney@gnu.org>
12052 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12054 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12056 * linux-low.c (linux_wait): Clear all_processes list also.
12058 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12060 * linux-low.c: Include <errno.h>. Remove extern declaration of
12063 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12065 * gdbreplay.c, server.h, utils.c: Update copyright years.
12067 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12069 * server.c (main): Print child status or termination signal from
12070 variable 'signal', not 'sig'.
12072 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12074 * linux-low.c (linux_read_memory): Change return type to
12075 int. Check for and return error from ptrace().
12076 * target.c (read_inferior_memory): Change return type to int. Pass
12077 back return status from the_target->read_memory().
12078 * target.h (struct target_ops): Adapt *read_memory() prototype.
12080 (read_inferior_memory): Adapt prototype.
12081 * server.c (main): Return an error packet if
12082 read_inferior_memory() returns an error.
12084 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12086 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12087 Unify with other clean targets.
12089 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12091 * server.c (handle_v_cont): Call set_desired_inferior.
12093 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12095 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12097 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12099 * linux-low.c (linux_wait): Unblock async I/O.
12100 (linux_resume): Block and enable async I/O.
12101 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12102 * server.h (block_async_io, unblock_async_io): Add prototypes.
12104 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12106 * remote-utils.c (remote_open): Print a status notice after
12107 opening a TCP port.
12108 * server.c (attach_inferior): Print a status notice after
12111 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12113 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12115 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12117 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12119 * server.c, target.h: Update copyright years.
12121 2004-02-25 Roland McGrath <roland@redhat.com>
12123 * target.h (struct target_ops): New member `read_auxv'.
12124 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12125 * linux-low.c (linux_read_auxv): New function.
12126 (linux_target_ops): Initialize `read_auxv' member to that.
12128 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12130 Committed by Jim Blandy <jimb@redhat.com>.
12132 * linux-s390-low.c (s390_num_regs): Update.
12133 (s390_regmap): Remove control registers. Use __s390x__ predefine
12134 instead of GPR_SIZE to distiguish s390 and s390x targets.
12136 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12138 * linux-low.c: Update copyright year.
12139 (check_removed_breakpoint): Clear pending_is_breakpoint.
12140 (linux_set_resume_request, linux_queue_one_thread)
12141 (resume_status_pending_p): New functions.
12142 (linux_continue_one_thread): Use process->resume.
12143 (linux_resume): Only resume threads if there are no pending events.
12144 * linux-low.h (struct process_info): Add resume request
12147 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12149 * regcache.c (new_register_cache): Clear the allocated register
12150 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12152 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12154 * linux-low.c (linux_resume): Take a struct thread_resume *
12156 (linux_wait): Update call.
12157 (resume_ptr): New static variable.
12158 (linux_continue_one_thread): Renamed from
12159 linux_continue_one_process. Use resume_ptr.
12160 (linux_resume): Use linux_continue_one_thread.
12161 * server.c (handle_v_cont, handle_v_requests): New functions.
12162 (myresume): New function.
12163 (main): Handle 'v' case.
12164 * target.h (struct thread_resume): New type.
12165 (struct target_ops): Change argument of "resume" to struct
12167 (myresume): Delete macro.
12169 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12171 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12172 (uninstall): Support DESTDIR.
12174 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12176 * configure.srv: Add xscale*linux copy of arm*linux entry.
12178 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12180 * linux-arm-low.c (arm_reinsert_addr): New function.
12181 (the_low_target): Add arm_reinsert_addr.
12183 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12185 * mem-break.c: Remove whitespace at end of file.
12187 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12189 * configure.in: Check whether we need to prototype strerror.
12190 * server.h: Optionally prototype strerror.
12191 * gdbreplay.c (perror_with_name): Use strerror.
12192 * linux-low.c (linux_attach_lwp): Use strerror.
12193 * utils.c (perror_with_name): Use strerror.
12194 * config.in, configure: Regenerated.
12196 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12198 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12199 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12201 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12203 * Makefile.in (SFILES): Update.
12204 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12205 low-sun3.c: Remove files.
12207 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12209 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12210 (linux_detach_one_process, linux_detach): New functions.
12211 (linux_target_ops): Add linux_detach.
12212 * server.c (main): Handle 'D' packet.
12213 * target.h (struct target_ops): Add "detach" member.
12214 (detach_inferior): Define.
12216 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12218 From Kelley Cook <kelleycook@wideopenwest.com>:
12219 * configure.srv: Accept i[34567]86 variants.
12221 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12223 * linux-low.c (linux_wait_for_event): Correct comment typos.
12224 (linux_resume_one_process): Call check_removed_breakpoint.
12225 (linux_send_signal): New function.
12226 (linux_target_ops): Add linux_send_signal.
12227 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12229 * target.h (struct target_ops): Add send_signal.
12231 2003-05-29 Jim Blandy <jimb@redhat.com>
12233 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12234 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12235 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12236 away part of the register's value.
12238 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12240 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12241 (linux_wait_for_event, linux_init_signals): Likewise.
12243 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12245 * configure.in: Check for stdlib.h.
12246 * configure: Regenerated.
12247 * config.in: Regenerated.
12249 2003-01-04 Andreas Schwab <schwab@suse.de>
12251 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12253 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12255 * Makefile.in: Remove obsolete code.
12257 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12259 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12260 defined(PT_FPR0_HI).
12262 2002-11-17 Stuart Hughes <seh@zee2.com>
12264 * linux-arm-low.c (arm_num_regs): Increase.
12265 (arm_regmap): Include status register.
12267 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12269 * linux-low.c (register_addr): Remove incorrect -1 check.
12271 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12273 * linux-low.c (linux_create_inferior): Call setpgid. Return
12275 (unstopped_p, linux_signal_pid): Remove.
12276 (linux_target_ops): Remove linux_signal_pid.
12277 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12278 global instead of target method.
12279 * target.h (struct target_ops): Remove signal_pid. Update comment
12280 for create_inferior.
12281 * server.c (signal_pid): New variable.
12282 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12283 gdbserver. Set the child to be the foreground process group.
12284 (attach_inferior): Set signal_pid.
12286 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12288 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12290 2002-08-20 Jim Blandy <jimb@redhat.com>
12292 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12295 2002-08-01 Andrew Cagney <cagney@redhat.com>
12297 * Makefile.in: Make chill references obsolete.
12299 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12301 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12302 * configure: Regenerate.
12303 * config.in: Regenerate.
12305 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12307 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12308 (perror_with_name, remote_close, remote_open, expect, play): Static.
12310 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12312 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12313 byte offsets instead of an array of indexes.
12314 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12316 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12318 * regcache.c: Add comment.
12320 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12322 * thread-db.c: New file.
12323 * proc-service.c: New file.
12324 * acinclude.m4: New file.
12325 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12326 proc-service.o, and thread-db.o.
12327 (linux-low.o): Add USE_THREAD_DB.
12328 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12329 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12330 * aclocal.m4: Regenerated.
12331 * config.in: Regenerated.
12332 * configure: Regenerated.
12333 * configure.in: Check for proc_service.h, sys/procfs.h,
12334 thread_db.h, and linux/elf.h headrs.
12335 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12336 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12337 Check for -lthread_db and thread support.
12338 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12339 PowerPC, and SuperH.
12340 * i387-fp.c: Constify arguments.
12341 * i387-fp.h: Likewise.
12342 * inferiors.c: (struct thread_info): Renamed from
12343 `struct inferior_info'. Remove PID member. Use generic inferior
12344 list header. All uses updated.
12345 (inferiors, signal_pid): Removed.
12346 (all_threads): New variable.
12347 (get_thread): Define.
12348 (add_inferior_to_list): New function.
12349 (for_each_inferior): New function.
12350 (change_inferior_id): New function.
12351 (add_inferior): Removed.
12352 (remove_inferior): New function.
12353 (add_thread): New function.
12354 (free_one_thread): New function.
12355 (remove_thread): New function.
12356 (clear_inferiors): Use for_each_inferior and free_one_thread.
12357 (find_inferior): New function.
12358 (find_inferior_id): New function.
12359 (inferior_target_data): Update argument type.
12360 (set_inferior_target_data): Likewise.
12361 (inferior_regcache_data): Likewise.
12362 (set_inferior_regcache_data): Likewise.
12363 * linux-low.c (linux_bp_reinsert): Remove.
12364 (all_processes, stopping_threads, using_thrads)
12365 (struct pending_signals, debug_threads, pid_of): New.
12366 (inferior_pid): Replace with macro.
12367 (struct inferior_linux_data): Remove.
12368 (get_stop_pc, add_process): New functions.
12369 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12370 Use add_process and add_thread.
12371 (linux_attach_lwp): New function, based on old linux_attach. Use
12372 add_process and add_thread. Set stop_expected for new threads.
12373 (linux_attach): New function.
12374 (linux_kill_one_process): New function.
12375 (linux_kill): Kill all LWPs.
12376 (linux_thread_alive): Use find_inferior_id.
12377 (check_removed_breakpoints, status_pending_p): New functions.
12378 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12379 Update. Use WNOHANG. Wait for cloned processes also. Update process
12380 struct for the found process.
12381 (linux_wait_for_event): New function.
12382 (linux_wait): Use it. Support LWPs.
12383 (send_sigstop, wait_for_sigstop, stop_all_processes)
12384 (linux_resume_one_process, linux_continue_one_process): New functions.
12385 (linux_resume): Support LWPs.
12386 (REGISTER_RAW_SIZE): Remove.
12387 (fetch_register): Use register_size instead. Call supply_register.
12388 (usr_store_inferior_registers): Likewise. Call collect_register.
12389 Fix recursive case.
12390 (regsets_fetch_inferior_registers): Improve error message.
12391 (regsets_store_inferior_registers): Add debugging.
12392 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12393 (unstopped_p, linux_signal_pid): New functions.
12394 (linux_target_ops): Add linux_signal_pid.
12395 (linux_init_signals): New function.
12396 (initialize_low): Call it. Initialize using_threads.
12397 * regcache.c (inferior_regcache_data): Add valid
12399 (get_regcache): Fetch registers lazily. Add fetch argument
12400 and update all callers.
12401 (regcache_invalidate_one, regcache_invalidate): New
12403 (new_register_cache): Renamed from create_register_cache.
12404 Return the new regcache.
12405 (free_register_cache): Change argument to a void *.
12406 (registers_to_string, registers_from_string): Call get_regcache
12407 with fetch flag set.
12408 (register_data): Make static. Pass fetch flag to get_regcache.
12409 (supply_register): Call get_regcache with fetch flag clear.
12410 (collect_register): Call get_regcache with fetch flag set.
12411 (collect_register_as_string): New function.
12412 * regcache.h: Update.
12413 * remote-utils.c (putpkt): Flush after debug output and use
12415 Handle input interrupts while waiting for an ACK.
12416 (input_interrupt): Use signal_pid method.
12417 (getpkt): Flush after debug output and use stderr.
12418 (outreg): Use collect_register_as_string.
12419 (new_thread_notify, dead_thread_notify): New functions.
12420 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12421 and general_thread.
12422 (look_up_one_symbol): Flush after debug output.
12423 * server.c (step_thread, server_waiting): New variables.
12424 (start_inferior): Don't use signal_pid. Update call to mywait.
12425 (attach_inferior): Update call to mywait.
12426 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12427 (main): Don't fetch/store registers explicitly. Use
12428 set_desired_inferior. Support proposed ``Hs'' packet. Update
12430 * server.h: Update.
12431 (struct inferior_list, struct_inferior_list_entry): New.
12432 * target.c (set_desired_inferior): New.
12433 (write_inferior_memory): Constify.
12434 (mywait): New function.
12435 * target.h: Update.
12436 (struct target_ops): New signal_pid method.
12437 (mywait): Removed macro, added prototype.
12439 * linux-low.h (regset_func): Removed.
12440 (regset_fill_func, regset_store_func): New.
12441 (enum regset_type): New.
12442 (struct regset_info): Add type field. Use new operation types.
12443 (struct linux_target_ops): stop_pc renamed to get_pc.
12444 Add decr_pc_after_break and breakpoint_at.
12445 (get_process, get_thread_proess, get_process_thread)
12446 (strut process_info, all_processes, linux_attach_lwp)
12447 (thread_db_init): New.
12449 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12450 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12451 (the_low_target): Add new members.
12452 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12453 (i386_store_fpxregset): Constify.
12454 (target_regsets): Add new kind identifier.
12455 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12456 (i386_set_pc): Add debugging.
12457 (i386_breakpoint_at): New function.
12458 (the_low_target): Add new members.
12459 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12460 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12461 (mips_breakpoint_at): New.
12462 (the_low_target): Add new members.
12463 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12464 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12465 (the_low_target): Add new members.
12466 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12467 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12468 (the_low_target): Add new members.
12469 * linux-x86-64-low.c (target_regsets): Add new kind
12472 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12474 From Martin Pool <mbp@samba.org>:
12475 * server.c (gdbserver_usage): New function.
12478 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12480 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12481 stop_at -> stop_pc.
12483 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12485 * Makefile.in: Remove obsolete code.
12487 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12489 * linux-low.c (regsets_fetch_inferior_registers),
12490 (regsets_store_inferior_registers): Removed cast to int from
12492 * regcache.h: Added declaration of struct inferior_info.
12494 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12496 * inferiors.c (struct inferior_info): Add regcache_data.
12497 (add_inferior): Call create_register_cache.
12498 (clear_inferiors): Call free_register_cache.
12499 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12500 * regcache.c (struct inferior_regcache_data): New.
12501 (registers): Remove.
12502 (get_regcache): New function.
12503 (create_register_cache, free_register_cache): New functions.
12504 (set_register_cache): Don't initialize the register cache here.
12505 (registers_to_string, registers_from_string, register_data): Call
12507 * regcache.h: Add prototypes.
12508 * server.h: Likewise.
12510 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12512 * mem-break.c: New file.
12513 * mem-break.h: New file.
12514 * Makefile.in: Add mem-break.o rule; update server.h
12516 * inferiors.c (struct inferior_info): Add target_data
12518 (clear_inferiors): Free target_data member if set.
12519 (inferior_target_data, set_inferior_target_data): New functions.
12520 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12521 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12522 * linux-low.c (linux_bp_reinsert): New variable.
12523 (struct inferior_linux_data): New.
12524 (linux_create_inferior): Use set_inferior_target_data.
12525 (linux_attach): Likewise. Call add_inferior.
12526 (linux_wait_for_one_inferior): New function.
12527 (linux_wait): Call it.
12528 (linux_write_memory): Add const.
12529 (initialize_low): Call set_breakpoint_data.
12530 * linux-low.h (struct linux_target_ops): Add breakpoint
12532 * server.c (attach_inferior): Remove extra add_inferior
12534 * server.h: Include mem-break.h. Update inferior.c
12536 * target.c (read_inferior_memory)
12537 (write_inferior_memory): New functions.
12538 * target.h (read_inferior_memory)
12539 (write_inferior_memory): Change macros to prototypes.
12540 (struct target_ops): Update comments. Add const to write_memory
12543 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12545 * linux-low.c (usr_store_inferior_registers): Support
12546 registers which are allowed to fail to store.
12547 * linux-low.h (linux_target_ops): Likewise.
12548 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12549 (ppc_cannot_store_register): FPSCR may not be storable.
12551 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12553 * server.h: Include <string.h> if HAVE_STRING_H.
12554 * ChangeLog: Correct paths in last ChangeLog entry.
12556 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12558 * linux-low.h: Remove obsolete prototypes.
12559 (struct linux_target_ops): New.
12560 (extern the_low_target): New.
12561 * linux-low.c (num_regs, regmap): Remove declarations.
12562 (register_addr): Use the_low_target explicitly.
12563 (fetch_register): Likewise.
12564 (usr_fetch_inferior_registers): Likewise.
12565 (usr_store_inferior_registers): Likewise.
12566 * linux-arm-low.c (num_regs): Remove.
12567 (arm_num_regs): Define.
12568 (arm_regmap): Renamed from regmap, made static.
12569 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12571 (arm_cannot_store_register): Renamed from cannot_store_register,
12573 (the_low_target): New.
12574 * linux-i386-low.c (num_regs): Remove.
12575 (i386_num_regs): Define.
12576 (i386_regmap): Renamed from regmap, made static.
12577 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12579 (i386_cannot_store_register): Renamed from cannot_store_register,
12581 (the_low_target): New.
12582 * linux-ia64-low.c (num_regs): Remove.
12583 (ia64_num_regs): Define.
12584 (ia64_regmap): Renamed from regmap, made static.
12585 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12587 (ia64_cannot_store_register): Renamed from cannot_store_register,
12589 (the_low_target): New.
12590 * linux-m68k-low.c (num_regs): Remove.
12591 (m68k_num_regs): Define.
12592 (m68k_regmap): Renamed from regmap, made static.
12593 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12595 (m68k_cannot_store_register): Renamed from cannot_store_register,
12597 (the_low_target): New.
12598 * linux-mips-low.c (num_regs): Remove.
12599 (mips_num_regs): Define.
12600 (mips_regmap): Renamed from regmap, made static.
12601 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12603 (mips_cannot_store_register): Renamed from cannot_store_register,
12605 (the_low_target): New.
12606 * linux-ppc-low.c (num_regs): Remove.
12607 (ppc_num_regs): Define.
12608 (ppc_regmap): Renamed from regmap, made static.
12609 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12611 (ppc_cannot_store_register): Renamed from cannot_store_register,
12613 (the_low_target): New.
12614 * linux-s390-low.c (num_regs): Remove.
12615 (s390_num_regs): Define.
12616 (s390_regmap): Renamed from regmap, made static.
12617 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12619 (s390_cannot_store_register): Renamed from cannot_store_register,
12621 (the_low_target): New.
12622 * linux-sh-low.c (num_regs): Remove.
12623 (sh_num_regs): Define.
12624 (sh_regmap): Renamed from regmap, made static.
12625 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12627 (sh_cannot_store_register): Renamed from cannot_store_register,
12629 (the_low_target): New.
12630 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12631 (the_low_target): New.
12633 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12635 * Makefile.in: Add stamp-h target.
12636 * configure.in: Create stamp-h.
12637 * configure: Regenerated.
12639 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12641 * inferiors.c: New file.
12642 * target.c: New file.
12643 * target.h: New file.
12644 * Makefile.in: Add target.o and inferiors.o. Update
12646 * linux-low.c (inferior_pid): New static variable,
12647 moved from server.c.
12648 (linux_create_inferior): Renamed from create_inferior.
12649 Call add_inferior. Return 0 on success instead of a PID.
12650 (linux_attach): Renamed from myattach.
12651 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12652 (linux_thread_alive): Renamed from mythread_alive.
12653 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12655 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12656 (regsets_store_inferior_registers): Correct error message.
12657 Add missing ``return 0''.
12658 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12659 (linux_store_registers): Renamed from store_inferior_registers.
12660 (linux_read_memory): Renamed from read_inferior_memory.
12661 (linux_write_memory): Renamed from write_inferior_memory.
12662 (linux_target_ops): New structure.
12663 (initialize_low): Call set_target_ops ().
12664 * remote-utils.c (unhexify): New function.
12665 (hexify): New function.
12666 (input_interrupt): Send signals to ``signal_pid''.
12667 * server.c (inferior_pid): Remove.
12668 (start_inferior): Update create_inferior call.
12669 (attach_inferior): Call add_inferior.
12670 (handle_query): New function.
12671 (main): Call handle_query for `q' packets.
12672 * server.h: Include "target.h". Remove obsolete prototypes.
12673 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12675 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12677 * Makefile.in: Add WARN_CFLAGS. Update configury
12679 * configure.in: Check for <string.h>
12680 * configure: Regenerate.
12681 * config.in: Regenerate.
12682 * gdbreplay.c: Include needed system headers.
12683 (remote_open): Remove strchr prototype.
12684 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12685 * regcache.c (supply_register): Change buf argument to const void *.
12686 (supply_register_by_name): Likewise.
12687 (collect_register): Change buf argument to void *.
12688 (collect_register_by_name): Likewise.
12689 * regcache.h: Add missing prototypes.
12690 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12691 * server.c (handle_query): New function.
12692 (attached): New static variable, moved out of main.
12693 (main): Quiet longjmp clobber warnings.
12694 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12695 * utils.c (error): Remove NORETURN.