Support software breakpoints for ARM linux in GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-arm-low.c (arm_supports_z_point_type): Add software
4 breakpoint support.
5
6 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7
8 * linux-arm-low.c: Refactor breakpoint definitions.
9 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
11
12 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
13
14 * Makefile.in: Add arm.c/o.
15 * configure.srv: Likewise.
16 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
17 (arm_breakpoint_kind_from_pc): New function.
18 (arm_sw_breakpoint_from_kind): Return proper kind.
19 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
20
21 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
22
23 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
24 removal.
25 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
26 (struct raw_breakpoint) <size>: Remove.
27 (struct raw_breakpoint) <kind>: Add.
28 (bp_size): New function.
29 (bp_opcode): Likewise.
30 (find_raw_breakpoint_at): Adjust for kind.
31 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
32 (remove_memory_breakpoint): Adjust for kind call bp_size.
33 (set_raw_breakpoint_at): Adjust for kind.
34 (set_breakpoint): Likewise.
35 (set_breakpoint_at): Call breakpoint_kind_from_pc.
36 (delete_raw_breakpoint): Adjust for kind.
37 (delete_breakpoint): Likewise.
38 (find_gdb_breakpoint): Likewise.
39 (set_gdb_breakpoint_1): Likewise.
40 (set_gdb_breakpoint): Likewise.
41 (delete_gdb_breakpoint_1): Likewise.
42 (delete_gdb_breakpoint): Likewise.
43 (uninsert_raw_breakpoint): Likewise.
44 (reinsert_raw_breakpoint): Likewise.
45 (set_breakpoint_data): Remove.
46 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
47 (check_mem_read): Adjust for kind call bp_size.
48 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
49 (clone_one_breakpoint): Adjust for kind.
50 * mem-break.h (set_gdb_breakpoint): Likewise.
51 (delete_gdb_breakpoint): Likewise.
52 * server.c (process_serial_event): Likewise.
53
54 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
55
56 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
57 (struct linux_target_ops) <breakpoint>: Remove.
58 (struct linux_target_ops) <breakpoint_len>: Remove.
59 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
60 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
61 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
62 (arm_sw_breakpoint_from_kind): New function.
63 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
64 (struct linux_target_ops) <breakpoint>: Remove.
65 (struct linux_target_ops) <breakpoint_len>: Remove.
66 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
67 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
68 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
69 (struct linux_target_ops) <breakpoint>: Remove.
70 (struct linux_target_ops) <breakpoint_len>: Remove.
71 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
72 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
73 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
74 (struct linux_target_ops) <breakpoint>: Remove.
75 (struct linux_target_ops) <breakpoint_len>: Remove.
76 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
77 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
78 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
79 and sw_breakpoint_from_kind to increment the pc.
80 (linux_breakpoint_kind_from_pc): New function.
81 (linux_sw_breakpoint_from_kind): New function.
82 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
83 (initialize_low): Call breakpoint_kind_from_pc and
84 sw_breakpoint_from_kind to replace breakpoint_data/len.
85 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
86 New field.
87 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
88 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
89 (struct linux_target_ops) <breakpoint>: Remove.
90 (struct linux_target_ops) <breakpoint_len>: Remove.
91 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
92 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
93 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
94 (struct linux_target_ops) <breakpoint>: Remove.
95 (struct linux_target_ops) <breakpoint_len>: Remove.
96 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
97 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
98 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
99 (struct linux_target_ops) <breakpoint>: Remove.
100 (struct linux_target_ops) <breakpoint_len>: Remove.
101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
103 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
104 (struct linux_target_ops) <breakpoint>: Remove.
105 (struct linux_target_ops) <breakpoint_len>: Remove.
106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
108 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
109 (struct linux_target_ops) <breakpoint>: Remove.
110 (struct linux_target_ops) <breakpoint_len>: Remove.
111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
113 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
114 (struct linux_target_ops) <breakpoint>: Remove.
115 (struct linux_target_ops) <breakpoint_len>: Remove.
116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
118 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
119 (struct linux_target_ops) <breakpoint>: Remove.
120 (struct linux_target_ops) <breakpoint_len>: Remove.
121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
123 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
124 (struct linux_target_ops) <breakpoint>: Remove.
125 (struct linux_target_ops) <breakpoint_len>: Remove.
126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
128 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
129 (struct linux_target_ops) <breakpoint>: Remove.
130 (struct linux_target_ops) <breakpoint_len>: Remove.
131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
133 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
134 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
135 (struct linux_target_ops) <breakpoint>: Remove.
136 (struct linux_target_ops) <breakpoint_len>: Remove.
137 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
138 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
139 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
140 (struct linux_target_ops) <breakpoint>: Remove.
141 (struct linux_target_ops) <breakpoint_len>: Remove.
142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
144
145 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
146
147 * linux-cris-low.c (cris_get_pc): Remove void arg.
148
149 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
150
151 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
152 variable name.
153
154 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
155
156 * inferiors.c (thread_pid_matches_callback): New function.
157 (find_thread_process): New function.
158 (remove_thread): Reset current_thread.
159 (remove_process): Assert threads have been removed first.
160
161 2015-10-15 Yao Qi <yao.qi@linaro.org>
162
163 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
164 if it is 3.
165 (aarch64_remove_point): Likewise.
166 * regcache.c (regcache_register_size): New function.
167
168 2015-10-12 Yao Qi <yao.qi@linaro.org>
169
170 * linux-aarch64-low.c: Update all callers as emit_load_store
171 is renamed to aarch64_emit_load_store.
172
173 2015-10-12 Yao Qi <yao.qi@linaro.org>
174
175 * linux-aarch64-low.c: Update all callers of function renaming
176 from emit_insn to aarch64_emit_insn.
177
178 2015-10-12 Yao Qi <yao.qi@linaro.org>
179
180 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
181 arch/aarch64-insn.h.
182 (struct aarch64_memory_operand): Likewise.
183 (ENCODE): Likewise.
184 (emit_insn): Move to arch/aarch64-insn.c.
185 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
186 (emit_load_store): Move to arch/aarch64-insn.c.
187 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
188 (can_encode_int32): Remove.
189
190 2015-10-12 Yao Qi <yao.qi@linaro.org>
191
192 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
193 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
194 (aarch64_relocate_instruction): Likewise.
195 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
196 (struct aarch64_insn_visitor): Likewise.
197
198 2015-10-12 Yao Qi <yao.qi@linaro.org>
199
200 * linux-aarch64-low.c (struct aarch64_insn_data): New.
201 (struct aarch64_insn_visitor): New.
202 (struct aarch64_insn_relocation_data): New.
203 (aarch64_ftrace_insn_reloc_b): New function.
204 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
205 (aarch64_ftrace_insn_reloc_cb): Likewise.
206 (aarch64_ftrace_insn_reloc_tb): Likewise.
207 (aarch64_ftrace_insn_reloc_adr): Likewise.
208 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
209 (aarch64_ftrace_insn_reloc_others): Likewise.
210 (visitor): New.
211 (aarch64_relocate_instruction): Use visitor.
212
213 2015-10-12 Yao Qi <yao.qi@linaro.org>
214
215 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
216 int. Add argument buf.
217 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
218 aarch64_relocate_instruction.
219
220 2015-10-12 Yao Qi <yao.qi@linaro.org>
221
222 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
223 argument insn. Remove local variable insn. Don't call
224 target_read_uint32.
225 (aarch64_install_fast_tracepoint_jump_pad): Call
226 target_read_uint32.
227
228 2015-09-30 Yao Qi <yao.qi@linaro.org>
229
230 * linux-aarch64-low.c (emit_movk): Shorten a long line.
231 (emit_load_store_pair): Likewise.
232
233 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
234
235 * dll.c (match_dll): Add cast(s).
236 (unloaded_dll): Likewise.
237 * linux-low.c (second_thread_of_pid_p): Likewise.
238 (delete_lwp_callback): Likewise.
239 (count_events_callback): Likewise.
240 (select_event_lwp_callback): Likewise.
241 (linux_set_resume_request): Likewise.
242 * server.c (accumulate_file_name_length): Likewise.
243 (emit_dll_description): Likewise.
244 (handle_qxfer_threads_worker): Likewise.
245 (visit_actioned_threads): Likewise.
246 * thread-db.c (any_thread_of): Likewise.
247 * tracepoint.c (same_process_p): Likewise.
248 (match_blocktype): Likewise.
249 (build_traceframe_info_xml): Likewise.
250
251 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
252
253 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
254 assignment.
255 (gdb_unparse_agent_expr): Likewise.
256 * hostio.c (require_data): Likewise.
257 (handle_pread): Likewise.
258 * linux-low.c (disable_regset): Likewise.
259 (fetch_register): Likewise.
260 (store_register): Likewise.
261 (get_dynamic): Likewise.
262 (linux_qxfer_libraries_svr4): Likewise.
263 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
264 (set_fast_tracepoint_jump): Likewise.
265 (uninsert_fast_tracepoint_jumps_at): Likewise.
266 (reinsert_fast_tracepoint_jumps_at): Likewise.
267 (validate_inserted_breakpoint): Likewise.
268 (clone_agent_expr): Likewise.
269 * regcache.c (init_register_cache): Likewise.
270 * remote-utils.c (putpkt_binary_1): Likewise.
271 (decode_M_packet): Likewise.
272 (decode_X_packet): Likewise.
273 (look_up_one_symbol): Likewise.
274 (relocate_instruction): Likewise.
275 (monitor_output): Likewise.
276 * server.c (handle_search_memory): Likewise.
277 (handle_qxfer_exec_file): Likewise.
278 (handle_qxfer_libraries): Likewise.
279 (handle_qxfer): Likewise.
280 (handle_query): Likewise.
281 (handle_v_cont): Likewise.
282 (handle_v_run): Likewise.
283 (captured_main): Likewise.
284 * target.c (write_inferior_memory): Likewise.
285 * thread-db.c (try_thread_db_load_from_dir): Likewise.
286 * tracepoint.c (init_trace_buffer): Likewise.
287 (add_tracepoint_action): Likewise.
288 (add_traceframe): Likewise.
289 (add_traceframe_block): Likewise.
290 (cmd_qtdpsrc): Likewise.
291 (cmd_qtdv): Likewise.
292 (cmd_qtstatus): Likewise.
293 (response_source): Likewise.
294 (response_tsv): Likewise.
295 (cmd_qtnotes): Likewise.
296 (gdb_collect): Likewise.
297 (initialize_tracepoint): Likewise.
298
299 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
300
301 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
302 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
303 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
304 <NOP>: New.
305 (enum aarch64_condition_codes): New enum.
306 (w0): New static global.
307 (fp): Likewise.
308 (lr): Likewise.
309 (struct aarch64_memory_operand) <type>: New
310 MEMORY_OPERAND_POSTINDEX type.
311 (postindex_memory_operand): New helper function.
312 (emit_ret): New function.
313 (emit_load_store_pair): New function, factored out of emit_stp
314 with support for MEMORY_OPERAND_POSTINDEX.
315 (emit_stp): Rewrite using emit_load_store_pair.
316 (emit_ldp): New function.
317 (emit_load_store): Likewise.
318 (emit_ldr): Mention post-index instruction in comment.
319 (emit_ldrh): New function.
320 (emit_ldrb): New function.
321 (emit_ldrsw): Mention post-index instruction in comment.
322 (emit_str): Likewise.
323 (emit_subs): New function.
324 (emit_cmp): Likewise.
325 (emit_and): Likewise.
326 (emit_orr): Likewise.
327 (emit_orn): Likewise.
328 (emit_eor): Likewise.
329 (emit_mvn): Likewise.
330 (emit_lslv): Likewise.
331 (emit_lsrv): Likewise.
332 (emit_asrv): Likewise.
333 (emit_mul): Likewise.
334 (emit_sbfm): Likewise.
335 (emit_sbfx): Likewise.
336 (emit_ubfm): Likewise.
337 (emit_ubfx): Likewise.
338 (emit_csinc): Likewise.
339 (emit_cset): Likewise.
340 (emit_nop): Likewise.
341 (emit_ops_insns): New helper function.
342 (emit_pop): Likewise.
343 (emit_push): Likewise.
344 (aarch64_emit_prologue): New function.
345 (aarch64_emit_epilogue): Likewise.
346 (aarch64_emit_add): Likewise.
347 (aarch64_emit_sub): Likewise.
348 (aarch64_emit_mul): Likewise.
349 (aarch64_emit_lsh): Likewise.
350 (aarch64_emit_rsh_signed): Likewise.
351 (aarch64_emit_rsh_unsigned): Likewise.
352 (aarch64_emit_ext): Likewise.
353 (aarch64_emit_log_not): Likewise.
354 (aarch64_emit_bit_and): Likewise.
355 (aarch64_emit_bit_or): Likewise.
356 (aarch64_emit_bit_xor): Likewise.
357 (aarch64_emit_bit_not): Likewise.
358 (aarch64_emit_equal): Likewise.
359 (aarch64_emit_less_signed): Likewise.
360 (aarch64_emit_less_unsigned): Likewise.
361 (aarch64_emit_ref): Likewise.
362 (aarch64_emit_if_goto): Likewise.
363 (aarch64_emit_goto): Likewise.
364 (aarch64_write_goto_address): Likewise.
365 (aarch64_emit_const): Likewise.
366 (aarch64_emit_call): Likewise.
367 (aarch64_emit_reg): Likewise.
368 (aarch64_emit_pop): Likewise.
369 (aarch64_emit_stack_flush): Likewise.
370 (aarch64_emit_zero_ext): Likewise.
371 (aarch64_emit_swap): Likewise.
372 (aarch64_emit_stack_adjust): Likewise.
373 (aarch64_emit_int_call_1): Likewise.
374 (aarch64_emit_void_call_2): Likewise.
375 (aarch64_emit_eq_goto): Likewise.
376 (aarch64_emit_ne_goto): Likewise.
377 (aarch64_emit_lt_goto): Likewise.
378 (aarch64_emit_le_goto): Likewise.
379 (aarch64_emit_gt_goto): Likewise.
380 (aarch64_emit_ge_got): Likewise.
381 (aarch64_emit_ops_impl): New static global variable.
382 (aarch64_emit_ops): New target function, return
383 &aarch64_emit_ops_impl.
384 (struct linux_target_ops): Install it.
385
386 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
387
388 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
389 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
390 aarch64-ipa.o.
391 * linux-aarch64-ipa.c: New file.
392 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
393 and endian.h.
394 (aarch64_get_thread_area): New target method.
395 (extract_signed_bitfield): New helper function.
396 (aarch64_decode_ldr_literal): New function.
397 (enum aarch64_opcodes): New enum.
398 (struct aarch64_register): New struct.
399 (struct aarch64_operand): New struct.
400 (x0): New static global.
401 (x1): Likewise.
402 (x2): Likewise.
403 (x3): Likewise.
404 (x4): Likewise.
405 (w2): Likewise.
406 (ip0): Likewise.
407 (sp): Likewise.
408 (xzr): Likewise.
409 (aarch64_register): New helper function.
410 (register_operand): Likewise.
411 (immediate_operand): Likewise.
412 (struct aarch64_memory_operand): New struct.
413 (offset_memory_operand): New helper function.
414 (preindex_memory_operand): Likewise.
415 (enum aarch64_system_control_registers): New enum.
416 (ENCODE): New macro.
417 (emit_insn): New helper function.
418 (emit_b): New function.
419 (emit_bcond): Likewise.
420 (emit_cb): Likewise.
421 (emit_tb): Likewise.
422 (emit_blr): Likewise.
423 (emit_stp): Likewise.
424 (emit_ldp_q_offset): Likewise.
425 (emit_stp_q_offset): Likewise.
426 (emit_load_store): Likewise.
427 (emit_ldr): Likewise.
428 (emit_ldrsw): Likewise.
429 (emit_str): Likewise.
430 (emit_ldaxr): Likewise.
431 (emit_stxr): Likewise.
432 (emit_stlr): Likewise.
433 (emit_data_processing_reg): Likewise.
434 (emit_data_processing): Likewise.
435 (emit_add): Likewise.
436 (emit_sub): Likewise.
437 (emit_mov): Likewise.
438 (emit_movk): Likewise.
439 (emit_mov_addr): Likewise.
440 (emit_mrs): Likewise.
441 (emit_msr): Likewise.
442 (emit_sevl): Likewise.
443 (emit_wfe): Likewise.
444 (append_insns): Likewise.
445 (can_encode_int32_in): New helper function.
446 (aarch64_relocate_instruction): New function.
447 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
448 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
449 (struct linux_target_ops): Install aarch64_get_thread_area,
450 aarch64_install_fast_tracepoint_jump_pad and
451 aarch64_get_min_fast_tracepoint_insn_len.
452
453 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
454
455 * Makefile.in (aarch64-insn.o): New rule.
456 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
457
458 2015-09-21 Yao Qi <yao.qi@linaro.org>
459
460 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
461
462 2015-09-21 Yao Qi <yao.qi@linaro.org>
463
464 * tracepoint.c (max_jump_pad_size): Remove.
465
466 2015-09-18 Yao Qi <yao.qi@linaro.org>
467
468 * linux-aarch64-low.c: Don't include sys/uio.h.
469 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
470
471 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
472
473 * tracepoint.c (eval_result_type): Change prototype.
474 (condition_true_at_tracepoint): Fix argument to compiled_cond.
475
476 2015-09-15 Pedro Alves <palves@redhat.com>
477
478 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
479 Check whether to report exec events instead of checking whether
480 multiprocess is enabled.
481
482 2015-09-15 Pedro Alves <palves@redhat.com>
483
484 PR remote/18965
485 * remote-utils.c (prepare_resume_reply): Merge
486 TARGET_WAITKIND_VFORK_DONE switch case with the
487 TARGET_WAITKIND_FORKED case.
488
489 2015-09-15 Yao Qi <yao.qi@linaro.org>
490
491 * server.c (handle_query): Check string comparison using
492 "else if" instead of "if".
493
494 2015-09-15 Yao Qi <yao.qi@linaro.org>
495
496 * server.c (vCont_supported): New global variable.
497 (handle_query): Set vCont_supported to 1 if "vContSupported+"
498 matches. Append ";vContSupported+" to own_buf.
499 (handle_v_requests): Append ";s;S" to own_buf if target supports
500 hardware single step or vCont_supported is false.
501 (capture_main): Set vCont_supported to zero.
502
503 2015-09-15 Yao Qi <yao.qi@linaro.org>
504
505 * linux-low.c (linux_supports_conditional_breakpoints): Rename
506 it to ...
507 (linux_supports_hardware_single_step): ... New function.
508 (linux_target_ops): Update.
509 * lynx-low.c (lynx_target_ops): Set field
510 supports_hardware_single_step to target_can_do_hardware_single_step.
511 * nto-low.c (nto_target_ops): Likewise.
512 * spu-low.c (spu_target_ops): Likewise.
513 * win32-low.c (win32_target_ops): Likewise.
514 * target.c (target_can_do_hardware_single_step): New function.
515 * target.h (struct target_ops) <supports_conditional_breakpoints>:
516 Remove. <supports_hardware_single_step>: New field.
517 (target_supports_conditional_breakpoints): Remove.
518 (target_supports_hardware_single_step): New macro.
519 (target_can_do_hardware_single_step): Declare.
520 * server.c (handle_query): Use target_supports_hardware_single_step
521 instead of target_supports_conditional_breakpoints.
522
523 2015-09-15 Yao Qi <yao.qi@linaro.org>
524
525 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
526 function.
527 (struct linux_target_ops the_low_target): Install
528 aarch64_linux_siginfo_fixup.
529
530 2015-09-11 Don Breazeal <donb@codesourcery.com>
531 Luis Machado <lgustavo@codesourcery.com>
532
533 * linux-low.c (linux_mourn): Static declaration.
534 (linux_arch_setup): Move in front of
535 handle_extended_wait.
536 (linux_arch_setup_thread): New function.
537 (handle_extended_wait): Handle exec events. Call
538 linux_arch_setup_thread. Make event_lwp argument a
539 pointer-to-a-pointer.
540 (check_zombie_leaders): Do not check stopped threads.
541 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
542 (linux_low_filter_event): Add lwp and thread for exec'ing
543 non-leader thread if leader thread has been deleted.
544 Refactor code into linux_arch_setup_thread and call it.
545 Pass child lwp pointer by reference to handle_extended_wait.
546 (linux_wait_for_event_filtered): Update comment.
547 (linux_wait_1): Prevent clobbering exec event status.
548 (linux_supports_exec_events): New function.
549 (linux_target_ops) <supports_exec_events>: Initialize new member.
550 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
551 new member.
552 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
553 * server.c (report_exec_events): New global variable.
554 (handle_query): Handle qSupported query for exec-events feature.
555 (captured_main): Initialize report_exec_events.
556 * server.h (report_exec_events): Declare new global variable.
557 * target.h (struct target_ops) <supports_exec_events>: New
558 member.
559 (target_supports_exec_events): New macro.
560 * win32-low.c (win32_target_ops) <supports_exec_events>:
561 Initialize new member.
562
563 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
564
565 * linux-low.c (linux_low_enable_btrace): Remove.
566 (linux_target_ops): Replace linux_low_enable_btrace with
567 linux_enable_btrace.
568
569 2015-09-03 Yao Qi <yao.qi@linaro.org>
570
571 * linux-aarch64-low.c (aarch64_insert_point): Call
572 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
573 returns true.
574
575 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
576
577 * linux-low.c (check_stopped_by_breakpoint): Use
578 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
579
580 2015-08-27 Pedro Alves <palves@redhat.com>
581
582 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
583
584 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
585
586 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
587 the XNEW-family equivalent.
588 (compile_bytecodes): Likewise.
589 * dll.c (loaded_dll): Likewise.
590 * event-loop.c (append_callback_event): Likewise.
591 (create_file_handler): Likewise.
592 (create_file_event): Likewise.
593 * hostio.c (handle_open): Likewise.
594 * inferiors.c (add_thread): Likewise.
595 (add_process): Likewise.
596 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
597 * linux-arm-low.c (arm_new_process): Likewise.
598 (arm_new_thread): Likewise.
599 * linux-low.c (add_to_pid_list): Likewise.
600 (linux_add_process): Likewise.
601 (handle_extended_wait): Likewise.
602 (add_lwp): Likewise.
603 (enqueue_one_deferred_signal): Likewise.
604 (enqueue_pending_signal): Likewise.
605 (linux_resume_one_lwp_throw): Likewise.
606 (linux_resume_one_thread): Likewise.
607 (linux_read_memory): Likewise.
608 (linux_write_memory): Likewise.
609 * linux-mips-low.c (mips_linux_new_process): Likewise.
610 (mips_linux_new_thread): Likewise.
611 (mips_add_watchpoint): Likewise.
612 * linux-x86-low.c (initialize_low_arch): Likewise.
613 * lynx-low.c (lynx_add_process): Likewise.
614 * mem-break.c (set_raw_breakpoint_at): Likewise.
615 (set_breakpoint): Likewise.
616 (add_condition_to_breakpoint): Likewise.
617 (add_commands_to_breakpoint): Likewise.
618 (clone_agent_expr): Likewise.
619 (clone_one_breakpoint): Likewise.
620 * regcache.c (new_register_cache): Likewise.
621 * remote-utils.c (look_up_one_symbol): Likewise.
622 * server.c (queue_stop_reply): Likewise.
623 (start_inferior): Likewise.
624 (queue_stop_reply_callback): Likewise.
625 (handle_target_event): Likewise.
626 * spu-low.c (fetch_ppc_memory): Likewise.
627 (store_ppc_memory): Likewise.
628 * target.c (set_target_ops): Likewise.
629 * thread-db.c (thread_db_load_search): Likewise.
630 (try_thread_db_load_1): Likewise.
631 * tracepoint.c (add_tracepoint): Likewise.
632 (add_tracepoint_action): Likewise.
633 (create_trace_state_variable): Likewise.
634 (cmd_qtdpsrc): Likewise.
635 (cmd_qtro): Likewise.
636 (add_while_stepping_state): Likewise.
637 * win32-low.c (child_add_thread): Likewise.
638 (get_image_name): Likewise.
639
640 2015-08-25 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
643
644 2015-08-25 Yao Qi <yao.qi@linaro.org>
645
646 * Makefile.in (aarch64-linux.o): New rule.
647 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
648 srv_tgtobj.
649 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
650 (aarch64_init_debug_reg_state): Make it extern.
651 (aarch64_linux_prepare_to_resume): Remove.
652
653 2015-08-25 Yao Qi <yao.qi@linaro.org>
654
655 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
656 lwp_arch_private_info and ptid_of_lwp.
657
658 2015-08-25 Yao Qi <yao.qi@linaro.org>
659
660 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
661 Find proc_info by find_process_pid. All callers updated.
662
663 2015-08-25 Yao Qi <yao.qi@linaro.org>
664
665 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
666 Remove.
667 (debug_reg_change_callback): Remove.
668 (aarch64_notify_debug_reg_change): Remove.
669
670 2015-08-25 Yao Qi <yao.qi@linaro.org>
671
672 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
673 Call current_lwp_ptid.
674
675 2015-08-25 Yao Qi <yao.qi@linaro.org>
676
677 * linux-aarch64-low.c (debug_reg_change_callback): Use
678 debug_printf.
679
680 2015-08-25 Yao Qi <yao.qi@linaro.org>
681
682 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
683
684 2015-08-25 Yao Qi <yao.qi@linaro.org>
685
686 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
687
688 2015-08-25 Yao Qi <yao.qi@linaro.org>
689
690 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
691 the code.
692
693 2015-08-25 Yao Qi <yao.qi@linaro.org>
694
695 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
696 Remove.
697 (debug_reg_change_callback): Remove argument entry and add argument
698 lwp. Remove local variable thread. Don't print thread id in the
699 debugging output. Don't check whether pid of thread equals to pid.
700 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
701 iterate_over_lwps instead find_inferior.
702
703 2015-08-24 Pedro Alves <palves@redhat.com>
704
705 * inferiors.c (get_first_process): New function.
706 * inferiors.h (get_first_process): New declaration.
707 * remote-utils.c (read_ptid): Default to the first process in the
708 list, instead of to the current thread's process.
709
710 2015-08-24 Pedro Alves <palves@redhat.com>
711
712 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
713 * event-loop.c: Likewise.
714 * remote-utils.c: Likewise.
715 * tracepoint.c: Likewise.
716
717 2015-08-24 Pedro Alves <palves@redhat.com>
718
719 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
720 ptid_get_lwp.
721
722 2015-08-21 Pedro Alves <palves@redhat.com>
723
724 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
725 instead of literal 1.
726
727 2015-08-21 Pedro Alves <palves@redhat.com>
728
729 * tdesc.c (default_description): Explicitly zero-initialize.
730
731 2015-08-21 Pedro Alves <palves@redhat.com>
732
733 PR gdb/18749
734 * inferiors.c (remove_thread): Discard any pending stop reply for
735 this thread.
736 * server.c (remove_all_on_match_pid): Rename to ...
737 (remove_all_on_match_ptid): ... this. Work with a filter ptid
738 instead of a pid.
739 (discard_queued_stop_replies): Change parameter to a ptid. Now
740 extern.
741 (handle_v_kill, kill_inferior_callback, captured_main)
742 (process_serial_event): Adjust.
743 * server.h (discard_queued_stop_replies): Declare.
744
745 2015-08-21 Pedro Alves <palves@redhat.com>
746
747 * linux-low.c (wait_for_sigstop): Always switch to no thread
748 selected if the previously current thread dies.
749 * lynx-low.c (lynx_request_interrupt): Use the first thread's
750 process instead of the current thread's.
751 * remote-utils.c (input_interrupt): Don't check if there's no
752 current thread.
753 * server.c (gdb_read_memory, gdb_write_memory): If setting the
754 current thread to the general thread fails, error out.
755 (handle_qxfer_auxv, handle_qxfer_libraries)
756 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
757 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
758 (handle_query): Check if there's a thread selected instead of
759 checking whether there's any thread in the thread list.
760 (handle_qxfer_threads, handle_qxfer_btrace)
761 (handle_qxfer_btrace_conf): Don't error out early if there's no
762 thread in the thread list.
763 (handle_v_cont, myresume): Don't set the current thread to the
764 continue thread.
765 (process_serial_event) <Hg handling>: Also set thread_id if the
766 previous general thread is still alive.
767 (process_serial_event) <g/G handling>: If setting the current
768 thread to the general thread fails, error out.
769 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
770 thread's lwp instead of the current thread's.
771 * target.c (set_desired_thread): If the desired thread was not
772 found, leave the current thread pointing to NULL. Return an int
773 (boolean) indicating success.
774 * target.h (set_desired_thread): Change return type to int.
775
776 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
777
778 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
779 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
780 #includes.
781 (ps_get_thread_area): New function.
782
783 2015-08-19 Gary Benson <gbenson@redhat.com>
784
785 * hostio.c (handle_pread): Do not attempt to read more data
786 than hostio_reply_with_data can fit in a packet.
787
788 2015-08-18 Joel Brobecker <brobecker@adacore.com>
789
790 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
791
792 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
793
794 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
795
796 2015-08-06 Pedro Alves <palves@redhat.com>
797
798 * tracepoint.c (expr_eval_result): Now an int.
799
800 2015-08-06 Pedro Alves <palves@redhat.com>
801
802 * gdbthread.h (struct regcache): Forward declare.
803 (struct thread_info) <regcache_data>: Now a struct regcache
804 pointer.
805 * inferiors.c (inferior_regcache_data)
806 (set_inferior_regcache_data): Now work with struct regcache
807 pointers.
808 * inferiors.h (struct regcache): Forward declare.
809 (inferior_regcache_data, set_inferior_regcache_data): Now work
810 with struct regcache pointers.
811 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
812 (free_register_cache_thread): Remove struct regcache pointer
813 casts.
814
815 2015-08-06 Pedro Alves <palves@redhat.com>
816
817 * server.c (captured_main): On error, print the exception message
818 to stderr, and if run_once is set, throw a quit.
819
820 2015-08-06 Pedro Alves <palves@redhat.com>
821
822 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
823 the current thread.
824
825 2015-08-06 Pedro Alves <palves@redhat.com>
826
827 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
828 reading beyond the passed in buffer length.
829
830 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
831
832 * tracepoint.c (symbol_list) <required>: Remove.
833
834 2015-08-06 Pedro Alves <palves@redhat.com>
835
836 * linux-low.c (handle_extended_wait): Set the fork child's suspend
837 count if stopping and suspending threads.
838 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
839 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
840 (linux_detach): Complete an ongoing step-over.
841 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
842 throughout.
843 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
844 (linux_wait_1): If passing a signal to the inferior after
845 finishing a step-over, unsuspend and re-resume all lwps. If we
846 see a single-step event but the thread should be continuing, don't
847 pass the trap to gdb.
848 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
849 internal_error instead of gdb_assert.
850 (enqueue_pending_signal): New function.
851 (check_ptrace_stopped_lwp_gone): Add debug output.
852 (start_step_over): Use internal_error instead of gdb_assert.
853 (complete_ongoing_step_over): New function.
854 (linux_resume_one_thread): Don't resume a suspended thread.
855 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
856 it stepping.
857
858 2015-08-06 Pedro Alves <palves@redhat.com>
859
860 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
861 (linux_thread_alive): Use lwp_is_marked_dead.
862 (extended_event_reported): Delete.
863 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
864 instead of extended_event_reported.
865 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
866 as well.
867 (lwp_is_marked_dead): New function.
868 (lwp_running): Use lwp_is_marked_dead.
869 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
870 comment.
871
872 2015-08-06 Pedro Alves <palves@redhat.com>
873
874 * linux-low.c (linux_wait_1): Move fork event output out of the
875 !report_to_gdb check. Pass event_child->waitstatus to
876 target_waitstatus_to_string instead of ourstatus.
877
878 2015-08-04 Yao Qi <yao.qi@linaro.org>
879
880 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
881 if current_thread is 32 bit.
882
883 2015-08-04 Yao Qi <yao.qi@linaro.org>
884
885 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
886 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
887 * server.c (extended_protocol): Remove "static".
888 * server.h (extended_protocol): Declare it.
889
890 2015-08-04 Yao Qi <yao.qi@linaro.org>
891
892 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
893 both aarch64 and aarch32.
894 (aarch64_set_pc): Likewise.
895
896 2015-08-04 Yao Qi <yao.qi@linaro.org>
897
898 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
899 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
900 arm-with-neon.xml to srv_xmlfiles.
901 * linux-aarch64-low.c: Include linux-aarch32-low.h.
902 (is_64bit_tdesc): New function.
903 (aarch64_linux_read_description): New function.
904 (aarch64_arch_setup): Call aarch64_linux_read_description.
905 (regs_info): Rename to regs_info_aarch64.
906 (aarch64_regs_info): Return right regs_info.
907 (initialize_low_arch): Call initialize_low_arch_aarch32.
908
909 2015-08-04 Yao Qi <yao.qi@linaro.org>
910
911 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
912 * linux-aarch32-low.c: New file.
913 * linux-aarch32-low.h: New file.
914 * linux-arm-low.c (arm_fill_gregset): Move it to
915 linux-aarch32-low.c.
916 (arm_store_gregset): Likewise.
917 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
918 (arm_store_vfpregset): Call arm_store_vfpregset_num.
919 (arm_arch_setup): Check if PTRACE_GETREGSET works.
920 (regs_info): Rename to regs_info_arm.
921 (arm_regs_info): Return regs_info_aarch32 if
922 have_ptrace_getregset is 1 and target description is
923 arm_with_neon or arm_with_vfpv3.
924 (initialize_low_arch): Don't call init_registers_arm_with_neon.
925 Call initialize_low_arch_aarch32 instead.
926
927 2015-08-04 Yao Qi <yao.qi@linaro.org>
928
929 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
930 * linux-low.c: ... here.
931 * linux-low.h (have_ptrace_getregset): Declare it.
932
933 2015-08-04 Pedro Alves <palves@redhat.com>
934
935 * thread-db.c (struct thread_db): Use new typedefs.
936 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
937 CHK calls.
938 (disable_thread_event_reporting): Cast result of dlsym to
939 destination function pointer type.
940 (thread_db_mourn): Use td_ta_delete_ftype.
941
942 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
943
944 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
945 arch variant.
946 (CDX_BREAKPOINT): Define for R2.
947 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
948 (the_low_target): Add comments.
949
950 2015-07-30 Yao Qi <yao.qi@linaro.org>
951
952 * linux-arm-low.c (arm_hwcap): Remove it.
953 (arm_read_description): New local variable arm_hwcap. Don't
954 set arm_hwcap to zero.
955
956 2015-07-30 Yao Qi <yao.qi@linaro.org>
957
958 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
959 Use regcache->tdesc instead.
960 (arm_store_wmmxregset): Likewise.
961 (arm_fill_vfpregset): Likewise.
962 (arm_store_vfpregset): Likewise.
963
964 2015-07-30 Yao Qi <yao.qi@linaro.org>
965
966 * linux-arm-low.c: Include arch/arm.h.
967 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
968 (arm_store_gregset): Likewise.
969
970 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
971
972 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
973 ptrace's 4th parameter.
974
975 2015-07-27 Yao Qi <yao.qi@linaro.org>
976
977 * configure.srv (case aarch64*-*-linux*): Don't set
978 srv_linux_usrregs.
979
980 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
981
982 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
983 sys/ptrace.h.
984 * linux-arm-low.c: Likewise.
985 * linux-cris-low.c: Likewise.
986 * linux-crisv32-low.c: Likewise.
987 * linux-low.c: Likewise.
988 * linux-m68k-low.c: Likewise.
989 * linux-mips-low.c: Likewise.
990 * linux-nios2-low.c: Likewise.
991 * linux-s390-low.c: Likewise.
992 * linux-sparc-low.c: Likewise.
993 * linux-tic6x-low.c: Likewise.
994 * linux-tile-low.c: Likewise.
995 * linux-x86-low.c: Likewise.
996
997 2015-07-24 Pedro Alves <palves@redhat.com>
998
999 * config.in: Regenerate.
1000 * configure: Regenerate.
1001
1002 2015-07-24 Pedro Alves <palves@redhat.com>
1003
1004 * acinclude.m4: Include ../ptrace.m4.
1005 * configure.ac: Call GDB_AC_PTRACE.
1006 * config.in, configure: Regenerate.
1007
1008 2015-07-24 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-low.c (linux_create_inferior): Remove setting to
1011 proc->priv->new_inferior.
1012 (linux_attach): Likewise.
1013 (linux_low_filter_event): Likewise.
1014 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1015
1016 2015-07-24 Yao Qi <yao.qi@linaro.org>
1017
1018 * linux-low.c (linux_arch_setup): New function.
1019 (linux_low_filter_event): If proc->tdesc is NULL and
1020 proc->attached is true, call the_low_target.arch_setup.
1021 Otherwise, keep status pending, and return.
1022 (linux_resume_one_lwp_throw): Don't call get_pc if
1023 thread->while_stepping isn't NULL. Don't call
1024 get_thread_regcache if proc->tdesc is NULL.
1025 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1026 (linux_target_ops): Install arch_setup.
1027 * server.c (start_inferior): Call the_target->arch_setup.
1028 * target.h (struct target_ops) <arch_setup>: New field.
1029 (target_arch_setup): New marco.
1030 * lynx-low.c (lynx_target_ops): Update.
1031 * nto-low.c (nto_target_ops): Update.
1032 * spu-low.c (spu_target_ops): Update.
1033 * win32-low.c (win32_target_ops): Update.
1034
1035 2015-07-24 Yao Qi <yao.qi@linaro.org>
1036
1037 * linux-low.c (linux_add_process): Don't set
1038 proc->priv->new_inferior.
1039 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1040 (linux_attach): Likewise.
1041
1042 2015-07-24 Yao Qi <yao.qi@linaro.org>
1043
1044 * server.c (start_inferior): Code refactor.
1045
1046 2015-07-24 Yao Qi <yao.qi@linaro.org>
1047
1048 * server.c (process_serial_event): Set general_thread.
1049
1050 2015-07-21 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1053 aarch64_linux_get_debug_reg_capacity.
1054
1055 2015-07-17 Yao Qi <yao.qi@linaro.org>
1056
1057 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1058 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1059 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1060 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1061 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1062 (AARCH64_HWP_ALIGNMENT): Likewise.
1063 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1064 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1065 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1066 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1067 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1068 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1069 (struct aarch64_debug_reg_state): Likewise.
1070 (struct arch_lwp_info): Likewise.
1071 (aarch64_align_watchpoint): Likewise.
1072 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1073 (aarch64_watchpoint_length): Likewise.
1074 (aarch64_point_encode_ctrl_reg): Likewise
1075 (aarch64_point_is_aligned): Likewise.
1076 (aarch64_align_watchpoint): Likewise.
1077 (aarch64_linux_set_debug_regs):
1078 (aarch64_dr_state_insert_one_point): Likewise.
1079 (aarch64_dr_state_remove_one_point): Likewise.
1080 (aarch64_handle_breakpoint): Likewise.
1081 (aarch64_handle_aligned_watchpoint): Likewise.
1082 (aarch64_handle_unaligned_watchpoint): Likewise.
1083 (aarch64_handle_watchpoint): Likewise.
1084
1085 2015-07-17 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1088 and don't aarch64_get_debug_reg_state. All callers update.
1089 (aarch64_handle_aligned_watchpoint): Likewise.
1090 (aarch64_handle_unaligned_watchpoint): Likewise.
1091 (aarch64_handle_watchpoint): Likewise.
1092 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1093 (aarch64_remove_point): Likewise.
1094
1095 2015-07-17 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1098 debug_printf.
1099 (aarch64_handle_unaligned_watchpoint): Likewise.
1100
1101 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1102
1103 Revert the previous 3 commits:
1104 Move gdb_regex* to common/
1105 Move linux_find_memory_regions_full & co.
1106 gdbserver build-id attribute generator
1107
1108 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1109 Jan Kratochvil <jan.kratochvil@redhat.com>
1110
1111 gdbserver build-id attribute generator.
1112 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1113 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1114 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1115 (find_phdr): New.
1116 (get_dynamic): Use find_pdhr to traverse program headers.
1117 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1118 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1119 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1120 (get_hex_build_id): New.
1121 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1122 to reply XML document.
1123
1124 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1125 Jan Kratochvil <jan.kratochvil@redhat.com>
1126
1127 * target.c: Include target/target-utils.h and fcntl.h.
1128 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1129 (target_fileio_read_stralloc): New functions.
1130
1131 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1132
1133 * Makefile.in (OBS): Add gdb_regex.o.
1134 (gdb_regex.o): New.
1135 * config.in: Rebuilt.
1136 * configure: Rebuilt.
1137
1138 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1139 Jan Kratochvil <jan.kratochvil@redhat.com>
1140
1141 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1142 * Makefile.in (OBS): Add target-utils.o.
1143 (linux-maps.o, target-utils.o): New.
1144 * configure.srv (srv_linux_obj): Add linux-maps.o.
1145
1146 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1147
1148 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1149 function, return 1.
1150 (the_low_target): Install it.
1151
1152 2015-07-14 Pedro Alves <palves@redhat.com>
1153
1154 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1155 Instead, ignore ECHILD, and throw an error for other errnos.
1156
1157 2015-07-10 Pedro Alves <palves@redhat.com>
1158
1159 * event-loop.c (struct callback_event) <data>: Change type to
1160 gdb_client_data instance instead of gdb_client_data pointer.
1161 (append_callback_event): Adjust.
1162
1163 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1164
1165 * linux-aarch64-low.c: Add comments for each linux_target_ops
1166 method. Remove comments already covered in target_ops and
1167 linux_target_ops definitions.
1168 (the_low_target): Add comments for each unimplemented method.
1169
1170 2015-07-09 Yao Qi <yao.qi@linaro.org>
1171
1172 * linux-aarch64-low.c (aarch64_regmap): Remove.
1173 (aarch64_usrregs_info): Remove.
1174 (regs_info): Set field usrregs to NULL.
1175
1176 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1177
1178 * linux-low.c: Include "rsp-low.h"
1179 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1180 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1181 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1182 (handle_btrace_enable_pt): New.
1183 (handle_btrace_general_set): Support "pt".
1184 (handle_btrace_conf_general_set): Support "pt:size".
1185
1186 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1187
1188 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1189 Z_PACKET_SW_BP.
1190
1191 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1192
1193 * linux-aarch64-low.c: Remove comment about endianness.
1194 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1195 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1196 memcmp.
1197
1198 2015-06-24 Gary Benson <gbenson@redhat.com>
1199
1200 * linux-i386-ipa.c (stdint.h): Do not include.
1201 * lynx-i386-low.c (stdint.h): Likewise.
1202 * lynx-ppc-low.c (stdint.h): Likewise.
1203 * mem-break.c (stdint.h): Likewise.
1204 * thread-db.c (stdint.h): Likewise.
1205 * tracepoint.c (stdint.h): Likewise.
1206 * win32-low.c (stdint.h): Likewise.
1207
1208 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1209
1210 * server.c (write_qxfer_response): Update call to
1211 remote_escape_output.
1212
1213 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1214 Jan Kratochvil <jan.kratochvil@redhat.com>
1215
1216 Merge multiple hex conversions.
1217 * gdbreplay.c (tohex): Rename to 'fromhex'.
1218 (logchar): Use fromhex.
1219
1220 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1221
1222 * server.c (handle_qxfer_libraries): Set `version' attribute for
1223 <library-list>.
1224
1225 2015-06-10 Gary Benson <gbenson@redhat.com>
1226
1227 * target.h (struct target_ops) <multifs_open>: New field.
1228 <multifs_unlink>: Likewise.
1229 <multifs_readlink>: Likewise.
1230 * linux-low.c (nat/linux-namespaces.h): New include.
1231 (linux_target_ops): Initialize the_target->multifs_open,
1232 the_target->multifs_unlink and the_target->multifs_readlink.
1233 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1234 * hostio.c (hostio_fs_pid): New static variable.
1235 (hostio_handle_new_gdb_connection): New function.
1236 (handle_setfs): Likewise.
1237 (handle_open): Use the_target->multifs_open as appropriate.
1238 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1239 (handle_readlink): Use the_target->multifs_readlink as
1240 appropriate.
1241 (handle_vFile): Handle vFile:setfs packets.
1242 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1243 after target_handle_new_gdb_connection.
1244
1245 2015-06-10 Gary Benson <gbenson@redhat.com>
1246
1247 * configure.ac (AC_CHECK_FUNCS): Add setns.
1248 * config.in: Regenerate.
1249 * configure: Likewise.
1250 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1251 (linux-namespaces.o): New rule.
1252 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1253
1254 2015-06-09 Gary Benson <gbenson@redhat.com>
1255
1256 * hostio.c (handle_open): Process mode argument with
1257 fileio_to_host_mode.
1258
1259 2015-06-01 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1262 * linux-x86-low.c: Likewise.
1263
1264 2015-05-28 Don Breazeal <donb@codesourcery.com>
1265
1266 * linux-low.c (handle_extended_wait): Initialize
1267 thread_info.last_resume_kind for new fork children.
1268
1269 2015-05-15 Pedro Alves <palves@redhat.com>
1270
1271 * target.h (target_handle_new_gdb_connection): Rewrite using if
1272 wrapped in do/while.
1273
1274 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1275
1276 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1277 * configure, config.in: Regenerate.
1278 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1279 Declare typedef.
1280
1281 2015-05-12 Don Breazeal <donb@codesourcery.com>
1282
1283 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1284 PTRACE_EVENT_VFORK_DONE.
1285 (linux_low_ptrace_options, extended_event_reported): Add vfork
1286 events.
1287 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1288 and "vforkdone" for RSP 'T' Stop Reply Packet.
1289 * server.h (report_vfork_events): Declare
1290 global variable.
1291
1292 2015-05-12 Don Breazeal <donb@codesourcery.com>
1293
1294 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1295 (the_low_target) <new_fork>: Initialize new member.
1296 * linux-arm-low.c (arm_new_fork): New function.
1297 (the_low_target) <new_fork>: Initialize new member.
1298 * linux-low.c (handle_extended_wait): Call new target function
1299 new_fork.
1300 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1301 * linux-mips-low.c (mips_add_watchpoint): New function
1302 extracted from mips_insert_point.
1303 (the_low_target) <new_fork>: Initialize new member.
1304 (mips_linux_new_fork): New function.
1305 (mips_insert_point): Call mips_add_watchpoint.
1306 * linux-x86-low.c (x86_linux_new_fork): New function.
1307 (the_low_target) <new_fork>: Initialize new member.
1308
1309 2015-05-12 Don Breazeal <donb@codesourcery.com>
1310
1311 * linux-low.c (handle_extended_wait): Implement return value,
1312 rename argument 'event_child' to 'event_lwp', handle
1313 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1314 (linux_low_ptrace_options): New function.
1315 (linux_low_filter_event): Call linux_low_ptrace_options,
1316 use different argument fo linux_enable_event_reporting,
1317 use return value from handle_extended_wait.
1318 (extended_event_reported): New function.
1319 (linux_wait_1): Call extended_event_reported and set
1320 status to report fork events.
1321 (linux_write_memory): Add pid to debug message.
1322 (reset_lwp_ptrace_options_callback): New function.
1323 (linux_handle_new_gdb_connection): New function.
1324 (linux_target_ops): Initialize new structure member.
1325 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1326 * lynx-low.c: Initialize new structure member.
1327 * remote-utils.c (prepare_resume_reply): Implement stop reason
1328 "fork" for "T" stop message.
1329 * server.c (handle_query): Call handle_new_gdb_connection.
1330 * server.h (report_fork_events): Declare global flag.
1331 * target.h (struct target_ops) <handle_new_gdb_connection>:
1332 New member.
1333 (target_handle_new_gdb_connection): New macro.
1334 * win32-low.c: Initialize new structure member.
1335
1336 2015-05-12 Don Breazeal <donb@codesourcery.com>
1337
1338 * mem-break.c (APPEND_TO_LIST): Define macro.
1339 (clone_agent_expr): New function.
1340 (clone_one_breakpoint): New function.
1341 (clone_all_breakpoints): New function.
1342 * mem-break.h: Declare new functions.
1343
1344 2015-05-12 Don Breazeal <donb@codesourcery.com>
1345
1346 * linux-low.c (linux_supports_fork_events): New function.
1347 (linux_supports_vfork_events): New function.
1348 (linux_target_ops): Initialize new structure members.
1349 (initialize_low): Call linux_check_ptrace_features.
1350 * lynx-low.c (lynx_target_ops): Initialize new structure
1351 members.
1352 * server.c (report_fork_events, report_vfork_events):
1353 New global flags.
1354 (handle_query): Add new features to qSupported packet and
1355 response.
1356 (captured_main): Initialize new global variables.
1357 * target.h (struct target_ops) <supports_fork_events>:
1358 New member.
1359 <supports_vfork_events>: New member.
1360 (target_supports_fork_events): New macro.
1361 (target_supports_vfork_events): New macro.
1362 * win32-low.c (win32_target_ops): Initialize new structure
1363 members.
1364
1365 2015-05-12 Gary Benson <gbenson@redhat.com>
1366
1367 * server.c (handle_qxfer_exec_file): Use current process
1368 if annex is empty.
1369
1370 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1371
1372 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1373 Remove HAVE_PTRACE_GETREGS conditionals.
1374 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1375 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1376
1377 2015-05-08 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (linux_supports_conditional_breakpoints): New
1380 function.
1381 (linux_target_ops): Install new target method.
1382 * lynx-low.c (lynx_target_ops): Install NULL hook for
1383 supports_conditional_breakpoints.
1384 * nto-low.c (nto_target_ops): Likewise.
1385 * spu-low.c (spu_target_ops): Likewise.
1386 * win32-low.c (win32_target_ops): Likewise.
1387 * server.c (handle_query): Check
1388 target_supports_conditional_breakpoints.
1389 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1390 New field.
1391 (target_supports_conditional_breakpoints): New macro.
1392
1393 2015-05-06 Pedro Alves <palves@redhat.com>
1394
1395 PR server/18081
1396 * server.c (start_inferior): If the process exits, mourn it.
1397
1398 2015-04-21 Gary Benson <gbenson@redhat.com>
1399
1400 * hostio.c (fileio_open_flags_to_host): Factored out to
1401 fileio_to_host_openflags in common/fileio.c. Single use
1402 updated.
1403
1404 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1405
1406 * linux-xtensa-low.c (xtensa_fill_gregset)
1407 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1408 XCHAL_HAVE_LOOP.
1409
1410 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1411
1412 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1413 (regs_info): Replace usrregs pointer with NULL.
1414
1415 2015-04-17 Gary Benson <gbenson@redhat.com>
1416
1417 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1418 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1419 * server.c (handle_qxfer_exec_file): New function.
1420 (qxfer_packets): Add exec-file entry.
1421 (handle_query): Report qXfer:exec-file:read as supported packet.
1422
1423 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1424
1425 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1426
1427 2015-04-09 Gary Benson <gbenson@redhat.com>
1428
1429 * hostio-errno.c (errno_to_fileio_error): Remove function.
1430 Update caller to use remote_fileio_to_fio_error.
1431
1432 2015-04-09 Yao Qi <yao.qi@linaro.org>
1433
1434 * linux-low.c (linux_insert_point): Call
1435 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1436 (linux_remove_point): Call remove_memory_breakpoint if type is
1437 raw_bkpt_type_sw.
1438 * linux-x86-low.c (x86_insert_point): Don't call
1439 insert_memory_breakpoint.
1440 (x86_remove_point): Don't call remove_memory_breakpoint.
1441
1442 2015-04-01 Pedro Alves <palves@redhat.com>
1443 Cleber Rosa <crosa@redhat.com>
1444
1445 * server.c (gdbserver_usage): Reorganize and extend the usage
1446 message.
1447
1448 2015-03-24 Pedro Alves <palves@redhat.com>
1449
1450 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1451 output. Also dump TRAP_TRACE.
1452 (linux_low_filter_event): In debug output, distinguish a
1453 resume_stop SIGSTOP from a delayed SIGSTOP.
1454
1455 2015-03-24 Gary Benson <gbenson@redhat.com>
1456
1457 * linux-x86-low.c (x86_linux_new_thread): Moved to
1458 nat/x86-linux.c.
1459 (x86_linux_prepare_to_resume): Likewise.
1460
1461 2015-03-24 Gary Benson <gbenson@redhat.com>
1462
1463 * Makefile.in (x86-linux-dregs.o): New rule.
1464 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1465 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1466 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1467 (x86_linux_dr_get): Likewise.
1468 (x86_linux_dr_set): Likewise.
1469 (update_debug_registers_callback): Likewise.
1470 (x86_linux_dr_set_addr): Likewise.
1471 (x86_linux_dr_get_addr): Likewise.
1472 (x86_linux_dr_set_control): Likewise.
1473 (x86_linux_dr_get_control): Likewise.
1474 (x86_linux_dr_get_status): Likewise.
1475 (x86_linux_update_debug_registers): Likewise.
1476
1477 2015-03-24 Gary Benson <gbenson@redhat.com>
1478
1479 * linux-x86-low.c (x86_linux_update_debug_registers):
1480 New function, factored out from...
1481 (x86_linux_prepare_to_resume): ...this.
1482
1483 2015-03-24 Gary Benson <gbenson@redhat.com>
1484
1485 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1486 (x86_linux_dr_set): Likewise.
1487 (update_debug_registers_callback): Likewise.
1488 (x86_linux_dr_set_addr): Likewise.
1489 (x86_linux_dr_get_addr): Likewise.
1490 (x86_linux_dr_set_control): Likewise.
1491 (x86_linux_dr_get_control): Likewise.
1492 (x86_linux_dr_get_status): Likewise.
1493 (x86_linux_prepare_to_resume): Likewise.
1494
1495 2015-03-24 Gary Benson <gbenson@redhat.com>
1496
1497 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1498 Use perror_with_name. Pass string through gettext.
1499 (x86_linux_dr_set): Likewise.
1500
1501 2015-03-24 Gary Benson <gbenson@redhat.com>
1502
1503 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1504 (x86_linux_dr_set_addr): ...this.
1505 (x86_dr_low_get_addr): Rename to...
1506 (x86_linux_dr_get_addr): ...this.
1507 (x86_dr_low_set_control): Rename to...
1508 (x86_linux_dr_set_control): ...this.
1509 (x86_dr_low_get_control): Rename to...
1510 (x86_linux_dr_get_control): ...this.
1511 (x86_dr_low_get_status): Rename to...
1512 (x86_linux_dr_get_status): ...this.
1513 (x86_dr_low): Update with new function names.
1514
1515 2015-03-24 Gary Benson <gbenson@redhat.com>
1516
1517 * Makefile.in (x86-linux.o): New rule.
1518 * configure.srv: Add x86-linux.o to relevant targets.
1519 * linux-low.c (lwp_set_arch_private_info): New function.
1520 (lwp_arch_private_info): Likewise.
1521 * linux-x86-low.c: Include nat/x86-linux.h.
1522 (arch_lwp_info): Removed structure.
1523 (update_debug_registers_callback):
1524 Use lwp_set_debug_registers_changed.
1525 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1526 and lwp_set_debug_registers_changed.
1527 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1528
1529 2015-03-24 Gary Benson <gbenson@redhat.com>
1530
1531 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1532 * linux-arm-low.c (arm_new_thread): Likewise.
1533 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1534 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1535 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1536 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1537
1538 2015-03-24 Gary Benson <gbenson@redhat.com>
1539
1540 * linux-low.c (ptid_of_lwp): New function.
1541 (lwp_is_stopped): Likewise.
1542 (lwp_stop_reason): Likewise.
1543 * linux-x86-low.c (update_debug_registers_callback):
1544 Use lwp_is_stopped.
1545 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1546 lwp_stop_reason.
1547
1548 2015-03-24 Gary Benson <gbenson@redhat.com>
1549
1550 * linux-low.h (linux_stop_lwp): Remove declaration.
1551
1552 2015-03-24 Gary Benson <gbenson@redhat.com>
1553
1554 * linux-low.h: Include nat/linux-nat.h.
1555 * linux-low.c (iterate_over_lwps_args): New structure.
1556 (iterate_over_lwps_filter): New function.
1557 (iterate_over_lwps): Likewise.
1558 * linux-x86-low.c (update_debug_registers_callback):
1559 Update signature to what iterate_over_lwps expects.
1560 Remove PID check that iterate_over_lwps now performs.
1561 (x86_dr_low_set_addr): Use iterate_over_lwps.
1562 (x86_dr_low_set_control): Likewise.
1563
1564 2015-03-24 Gary Benson <gbenson@redhat.com>
1565
1566 * linux-x86-low.c (x86_debug_reg_state): New function.
1567 (x86_linux_prepare_to_resume): Use the above.
1568
1569 2015-03-24 Gary Benson <gbenson@redhat.com>
1570
1571 * linux-low.c (current_lwp_ptid): New function.
1572 * linux-x86-low.c: Include nat/linux-nat.h.
1573 (x86_dr_low_get_addr): Use current_lwp_ptid.
1574 (x86_dr_low_get_control): Likewise.
1575 (x86_dr_low_get_status): Likewise.
1576
1577 2015-03-20 Pedro Alves <palves@redhat.com>
1578
1579 * tracepoint.c (cmd_qtstatus): Make "str" const.
1580
1581 2015-03-20 Pedro Alves <palves@redhat.com>
1582
1583 * server.c (handle_general_set): Make "req_str" const.
1584
1585 2015-03-19 Pedro Alves <palves@redhat.com>
1586
1587 * linux-low.c (linux_resume_one_lwp): Rename to ...
1588 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1589 instead call perror_with_name.
1590 (check_ptrace_stopped_lwp_gone): New function.
1591 (linux_resume_one_lwp): Reimplement as wrapper around
1592 linux_resume_one_lwp_throw that swallows errors if the LWP is
1593 gone.
1594
1595 2015-03-19 Pedro Alves <palves@redhat.com>
1596
1597 * linux-low.c (count_events_callback, select_event_lwp_callback):
1598 No longer check whether the thread has resume_stop as last resume
1599 kind.
1600
1601 2015-03-19 Pedro Alves <palves@redhat.com>
1602
1603 * linux-low.c (count_events_callback, select_event_lwp_callback):
1604 Use the lwp's status_pending_p field, not the thread's.
1605
1606 2015-03-19 Pedro Alves <palves@redhat.com>
1607
1608 * linux-low.c (select_event_lwp_callback): Update comments to
1609 no longer mention SIGTRAP.
1610
1611 2015-03-18 Gary Benson <gbenson@redhat.com>
1612
1613 * server.c (handle_query): Do not report vFile:fstat as supported.
1614
1615 2015-03-11 Gary Benson <gbenson@redhat.com>
1616
1617 * hostio.c (sys/types.h): New include.
1618 (sys/stat.h): Likewise.
1619 (common-remote-fileio.h): Likewise.
1620 (handle_fstat): New function.
1621 (handle_vFile): Handle vFile:fstat packets.
1622
1623 2015-03-11 Gary Benson <gbenson@redhat.com>
1624
1625 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1626 struct stat.st_blocks and struct stat.st_blksize.
1627 * configure: Regenerate.
1628 * config.in: Likewise.
1629 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1630 (OBS): Add common-remote-fileio.o.
1631 (common-remote-fileio.o): New rule.
1632
1633 2015-03-09 Pedro Alves <palves@redhat.com>
1634
1635 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1636 'struct sockaddr' pointer in 'accept' call.
1637
1638 2015-03-09 Pedro Alves <palves@redhat.com>
1639
1640 Revert:
1641 2015-03-07 Pedro Alves <palves@redhat.com>
1642 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1643 or <winsock2.h> here. Instead include "gdb_socket.h".
1644 (remote_open): Use union gdb_sockaddr_u.
1645 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1646 or <winsock2.h> here. Instead include "gdb_socket.h".
1647 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1648 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1649 or <sys/un.h>.
1650 (init_named_socket, gdb_agent_helper_thread): Use union
1651 gdb_sockaddr_u.
1652
1653 2015-03-07 Pedro Alves <palves@redhat.com>
1654
1655 * configure.ac (build_warnings): Move
1656 -Wdeclaration-after-statement to the C-specific set.
1657 * configure: Regenerate.
1658
1659 2015-03-07 Pedro Alves <palves@redhat.com>
1660
1661 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1662 or <winsock2.h> here. Instead include "gdb_socket.h".
1663 (remote_open): Use union gdb_sockaddr_u.
1664 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1665 or <winsock2.h> here. Instead include "gdb_socket.h".
1666 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1667 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1668 or <sys/un.h>.
1669 (init_named_socket, gdb_agent_helper_thread): Use union
1670 gdb_sockaddr_u.
1671
1672 2015-03-07 Pedro Alves <palves@redhat.com>
1673
1674 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1675 instead.
1676
1677 2015-03-06 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-aarch64-low.c (aarch64_insert_point): Use
1680 show_debug_regs as a boolean.
1681 (aarch64_remove_point): Likewise.
1682
1683 2015-03-05 Pedro Alves <palves@redhat.com>
1684
1685 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1686 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1687 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1688 * nto-low.c (nto_target_ops): Likewise.
1689 * spu-low.c (spu_target_ops): Likewise.
1690 * win32-low.c (win32_target_ops): Likewise.
1691
1692 2015-03-04 Pedro Alves <palves@redhat.com>
1693
1694 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1695 Decide whether a breakpoint triggered based on the SIGTRAP's
1696 siginfo.si_code.
1697 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1698 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1699 (linux_low_filter_event): Check for breakpoints before checking
1700 watchpoints.
1701 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1702 siginfo.si_code.
1703 (linux_stopped_by_sw_breakpoint)
1704 (linux_supports_stopped_by_sw_breakpoint)
1705 (linux_stopped_by_hw_breakpoint)
1706 (linux_supports_stopped_by_hw_breakpoint): New functions.
1707 (linux_target_ops): Install new target methods.
1708
1709 2015-03-04 Pedro Alves <palves@redhat.com>
1710
1711 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1712 * server.c (swbreak_feature, hwbreak_feature): New globals.
1713 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1714 (captured_main): Clear swbreak_feature and hwbreak_feature.
1715 * server.h (swbreak_feature, hwbreak_feature): Declare.
1716 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1717 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1718 supports_stopped_by_hw_breakpoint>: New fields.
1719 (target_supports_stopped_by_sw_breakpoint)
1720 (target_stopped_by_sw_breakpoint)
1721 (target_supports_stopped_by_hw_breakpoint)
1722 (target_stopped_by_hw_breakpoint): Declare.
1723
1724 2015-03-04 Pedro Alves <palves@redhat.com>
1725
1726 enum lwp_stop_reason -> enum target_stop_reason
1727 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1728 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1729 (linux_wait_1, stuck_in_jump_pad_callback)
1730 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1731 (linux_stopped_by_watchpoint):
1732 * linux-low.h (enum lwp_stop_reason): Delete.
1733 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1734 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1735
1736 2015-03-04 Yao Qi <yao.qi@linaro.org>
1737
1738 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1739
1740 2015-03-03 Gary Benson <gbenson@redhat.com>
1741
1742 * hostio.c (handle_vFile): Fix prefix lengths.
1743
1744 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1745
1746 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1747 ptr_bits.
1748
1749 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1750
1751 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1752 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1753 (clean): Add "rm -f" for above C files.
1754 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1755 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1756 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1757 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1758 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1759 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1760 (init_registers_s390x_vx_linux64)
1761 (init_registers_s390x_tevx_linux64)
1762 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1763 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1764 declarations.
1765 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1766 (s390_store_vxrs_high): New functions.
1767 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1768 NT_S390_VXRS_HIGH.
1769 (s390_arch_setup): Add logic for selecting one of the new target
1770 descriptions. Activate the new vector regsets if applicable.
1771 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1772 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1773 and init_registers_s390x_tevx_linux64.
1774
1775 2015-03-01 Pedro Alves <palves@redhat.com>
1776
1777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1778 parameter.
1779
1780 2015-02-27 Pedro Alves <palves@redhat.com>
1781
1782 * linux-x86-low.c (u_debugreg_offset): New function.
1783 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1784
1785 2015-02-27 Pedro Alves <palves@redhat.com>
1786
1787 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1788 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1789 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1790 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1791 (ps_lsetfpregs, ps_getpid)
1792 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1793 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1794 (ps_lsetxregs, ps_plog): Declare.
1795
1796 2015-02-27 Pedro Alves <palves@redhat.com>
1797
1798 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1799 IP_AGENT_EXPORT_FUNC.
1800 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1801 IP_AGENT_EXPORT_FUNC.
1802 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1803 (IP_AGENT_EXPORT): Delete.
1804 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1805 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1806 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1807 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1808 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1809 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1810 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1811 (traceframe_read_count, traceframe_write_count)
1812 (traceframes_created, trace_state_variables, get_raw_reg)
1813 (get_trace_state_variable_value, set_trace_state_variable_value)
1814 (ust_loaded, helper_thread_id, cmd_buf): Use
1815 IPA_SYM_EXPORTED_NAME.
1816 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1817 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1818 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1819 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1820 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1821 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1822 EXTERN_C_PUSH/EXTERN_C_POP.
1823 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1824 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1825 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1826 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1827 (traceframe_write_count, traceframe_read_count)
1828 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1829 (about_to_request_buffer_space, get_trace_state_variable_value)
1830 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1831 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1832 EXTERN_C_PUSH/EXTERN_C_POP.
1833 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1834 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1835 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1836 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1837 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1838 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1839 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1840 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1841 Define.
1842 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1843 (IP_AGENT_EXPORT_VAR_DECL): Define.
1844 (tracing): Declare.
1845 (gdb_agent_get_raw_reg): Declare.
1846
1847 2015-02-27 Tom Tromey <tromey@redhat.com>
1848 Pedro Alves <palves@redhat.com>
1849
1850 Rename symbols whose names are reserved C++ keywords throughout.
1851
1852 2015-02-27 Pedro Alves <palves@redhat.com>
1853
1854 * Makefile.in (COMPILER): New, get it from autoconf.
1855 (CXX): Get from autoconf instead.
1856 (COMPILE.pre): Use COMPILER.
1857 (CC-LD): Rename to ...
1858 (CC_LD): ... this. Use COMPILER.
1859 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1860 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1861 * acinclude.m4: Include build-with-cxx.m4.
1862 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1863 Disable -Werror by default if building in C++ mode.
1864 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1865 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1866 the C++ compiler. Save/restore CXXFLAGS too.
1867 * configure: Regenerate.
1868
1869 2015-02-27 Pedro Alves <palves@redhat.com>
1870
1871 * acinclude.m4: Include libiberty.m4.
1872 * configure.ac: Call libiberty_INIT.
1873 * config.in, configure: Regenerate.
1874
1875 2015-02-26 Pedro Alves <palves@redhat.com>
1876
1877 * linux-low.c (linux_wait_1): When incrementing the PC past a
1878 program breakpoint always use the_low_target.breakpoint_len as
1879 increment, rather than the maximum between that and
1880 the_low_target.decr_pc_after_break.
1881
1882 2015-02-23 Pedro Alves <palves@redhat.com>
1883
1884 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1885 thread was doing a step-over; always adjust the PC if
1886 we stepped over a permanent breakpoint.
1887 (linux_wait_1): If we stepped over breakpoint that was on top of a
1888 permanent breakpoint, manually advance the PC past it.
1889
1890 2015-02-23 Pedro Alves <palves@redhat.com>
1891
1892 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1893 modes.
1894 (x86_fill_gregset, x86_store_gregset): Use it when handling
1895 $orig_eax.
1896
1897 2015-02-20 Pedro Alves <palves@redhat.com>
1898
1899 * thread-db.c: Include "nat/linux-procfs.h".
1900 (thread_db_init): Skip listing new threads if the kernel supports
1901 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1902
1903 2015-02-20 Pedro Alves <palves@redhat.com>
1904
1905 * linux-low.c (status_pending_p_callback): Use ptid_match.
1906
1907 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1908
1909 PR breakpoints/16812
1910 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1911 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1912 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1913
1914 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1915
1916 PR breakpoints/15956
1917 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1918
1919 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1920
1921 * linux-low.c (linux_low_btrace_conf): Print size.
1922 * server.c (handle_btrace_conf_general_set): New.
1923 (hanle_general_set): Call handle_btrace_conf_general_set.
1924 (handle_query): Report Qbtrace-conf:bts:size as supported.
1925
1926 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1927
1928 * linux-low.c (linux_low_enable_btrace): Update parameters.
1929 (linux_low_btrace_conf): New.
1930 (linux_target_ops)<to_btrace_conf>: Initialize.
1931 * server.c (current_btrace_conf): New.
1932 (handle_btrace_enable): Rename to ...
1933 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1934 to target_enable_btrace. Update comment. Update users.
1935 (handle_qxfer_btrace_conf): New.
1936 (qxfer_packets): Add btrace-conf entry.
1937 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1938 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1939 (target_ops)<read_btrace_conf>: New.
1940 (target_enable_btrace): Update parameters.
1941 (target_read_btrace_conf): New.
1942
1943 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1944
1945 * server.c (handle_btrace_general_set): Remove call to
1946 target_supports_btrace.
1947 (supported_btrace_packets): New.
1948 (handle_query): Call supported_btrace_packets.
1949 * target.h: include btrace-common.h.
1950 (btrace_target_info): Removed.
1951 (supports_btrace, target_supports_btrace): Update parameters.
1952
1953 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1954
1955 * Makefile.in (SFILES): Add common/btrace-common.c.
1956 (OBS): Add common/btrace-common.o.
1957 (btrace-common.o): Add build rules.
1958 * linux-low: Include btrace-common.h.
1959 (linux_low_read_btrace): Use struct btrace_data. Call
1960 btrace_data_init and btrace_data_fini.
1961
1962 2015-02-06 Pedro Alves <palves@redhat.com>
1963
1964 * thread-db.c (find_new_threads_callback): Add debug output.
1965
1966 2015-02-04 Pedro Alves <palves@redhat.com>
1967
1968 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1969 (resume_stopped_resumed_lwps): New function.
1970 (linux_wait_for_event_filtered): Use it.
1971
1972 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * Makefile.in (SFILES): Add linux-personality.c.
1975 (linux-personality.o): New rule.
1976 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1977 list of objects to be built.
1978 * linux-low.c: Include nat/linux-personality.h.
1979 (linux_create_inferior): Remove code to disable address space
1980 randomization (moved to ../nat/linux-personality.c). Create
1981 cleanup to disable address space randomization.
1982
1983 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1984
1985 * Makefile.in (posix-strerror.o): New rule.
1986 (mingw-strerror.o): Likewise.
1987 * configure: Regenerated.
1988 * configure.ac: Source file ../common/common.host. Initialize new
1989 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1990
1991 2015-01-14 Yao Qi <yao@codesourcery.com>
1992
1993 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1994 (ppc-linux.o): New rule.
1995 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1996 * configure.ac: AC_CHECK_FUNCS(getauxval).
1997 * config.in: Re-generated.
1998 * configure: Re-generated.
1999 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2000 ppc64_64bit_inferior_p
2001
2002 2015-01-14 Yao Qi <yao@codesourcery.com>
2003
2004 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2005 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2006 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2007 (PT_ORIG_R3, PT_TRAP): Likewise.
2008 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2009 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2010 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2011
2012 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2013
2014 * i387-fp.c (i387_cache_to_xsave): In look over
2015 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2016 zmmh_low_space field by use of zmmh_high_space.
2017
2018 2015-01-09 Pedro Alves <palves@redhat.com>
2019
2020 * linux-low.c (step_over_bkpt): Move higher up in the file.
2021 (handle_extended_wait): Don't store the stop_pc here.
2022 (get_stop_pc): Adjust comments and rename to ...
2023 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2024 stopped for a software breakpoint or hardware breakpoint.
2025 (thread_still_has_status_pending_p): New function.
2026 (status_pending_p_callback): Use
2027 thread_still_has_status_pending_p. If the event is no longer
2028 interesting, resume the LWP.
2029 (handle_tracepoints): Add assert.
2030 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2031 (wstatus_maybe_breakpoint): New function.
2032 (cancel_breakpoint): Delete function.
2033 (check_stopped_by_watchpoint): New function, factored out from
2034 linux_low_filter_event.
2035 (lp_status_maybe_breakpoint): Delete function.
2036 (linux_low_filter_event): Remove filter_ptid argument.
2037 Leave thread group exits pending here. Store the LWP's stop PC.
2038 Always leave events pending.
2039 (linux_wait_for_event_filtered): Pull all events out of the
2040 kernel, and leave them all pending.
2041 (count_events_callback, select_event_lwp_callback): Consider all
2042 events.
2043 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2044 (select_event_lwp): Only give preference to the stepping LWP in
2045 all-stop mode. Adjust comments.
2046 (ignore_event): New function.
2047 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2048 references to cancel_breakpoints. Adjust to renames. Also give
2049 equal priority to all LWPs that have had events in non-stop mode.
2050 If reporting a software breakpoint event, unadjust the LWP's PC.
2051 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2052 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2053 Adjust.
2054 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2055 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2056 (linux_stopped_by_watchpoint): Adjust.
2057 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2058 * linux-low.h (enum lwp_stop_reason): New.
2059 (struct lwp_info) <stop_pc>: Adjust comment.
2060 <stopped_by_watchpoint>: Delete field.
2061 <stop_reason>: New field.
2062 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2063 * mem-break.c (software_breakpoint_inserted_here)
2064 (hardware_breakpoint_inserted_here): New function.
2065 * mem-break.h (software_breakpoint_inserted_here)
2066 (hardware_breakpoint_inserted_here): Declare.
2067 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2068 (cancel_breakpoints): Delete.
2069 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2070 (upload_fast_traceframes): Remove references to
2071 cancel_breakpoints.
2072
2073 2015-01-09 Pedro Alves <palves@redhat.com>
2074
2075 * thread-db.c (find_new_threads_callback): Ignore thread if the
2076 kernel thread ID is -1.
2077
2078 2015-01-09 Pedro Alves <palves@redhat.com>
2079
2080 * linux-low.c (linux_attach_fail_reason_string): Move to
2081 nat/linux-ptrace.c, and rename.
2082 (linux_attach_lwp): Update comment.
2083 (attach_proc_task_lwp_callback): New function.
2084 (linux_attach): Adjust to rename and use
2085 linux_proc_attach_tgid_threads.
2086 (linux_attach_fail_reason_string): Delete declaration.
2087
2088 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2089
2090 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2091 * server.c (gdbserver_version): Likewise.
2092
2093 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2094
2095 * remote-utils.c: Include ctype.h.
2096 (input_interrupt): Explicitly handle the case when the char
2097 received is the NUL byte. Improve the printing of non-ASCII
2098 characters.
2099
2100 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2101
2102 * linux-low.c (linux_low_filter_event): Update call to
2103 linux_enable_event_reporting following the addition of
2104 a new parameter to that function.
2105
2106 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2107
2108 PR server/17457
2109 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2110 (AARCH64_FPCR_REGNO): Likewise.
2111 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2112 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2113 (aarch64_store_fpregset): Likewise.
2114
2115 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2116
2117 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2118 Remove FIXME comment about assumption about N.
2119
2120 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2121
2122 * configure.ac: If large-file support is disabled in GDBserver,
2123 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2124 * configure: Regenerate.
2125
2126 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2127
2128 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2129 warning upon ENODATA from ptrace.
2130 * linux-s390-low.c (s390_store_tdb): New.
2131 (s390_regsets): Add regset for NT_S390_TDB.
2132
2133 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2134
2135 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2136 without a fill_function.
2137 * linux-s390-low.c (s390_fill_last_break): Remove.
2138 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2139 (s390_arch_setup): Use regset's size instead of fill_function for
2140 loop end condition.
2141
2142 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2143
2144 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2145 the regset's store function when ptrace returned an error.
2146 * regcache.c (get_thread_regcache): Invalidate register cache
2147 before fetching inferior's registers.
2148
2149 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2150
2151 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2152 while-loop as for-loop.
2153 (regsets_store_inferior_registers): Likewise.
2154
2155 2014-11-28 Yao Qi <yao@codesourcery.com>
2156
2157 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2158 * config.in, configure: Re-generate.
2159 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2160 is defined.
2161
2162 2014-11-21 Yao Qi <yao@codesourcery.com>
2163
2164 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2165 (AC_CHECK_HEADERS): Remove malloc.h.
2166 * configure: Re-generated.
2167 * config.in: Re-generated.
2168 * server.h: Don't include alloca.h and malloc.h.
2169 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2170 Don't include malloc.h.
2171
2172 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2173
2174 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2175 corresponding ERRNO check in same block.
2176
2177 2014-11-12 Pedro Alves <palves@redhat.com>
2178
2179 * server.c (cont_thread): Update comment.
2180 (start_inferior, attach_inferior): No longer clear cont_thread.
2181 (handle_v_cont): No longer set cont_thread.
2182 (captured_main): Clear cont_thread each time a GDB connects.
2183
2184 2014-11-12 Pedro Alves <palves@redhat.com>
2185
2186 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2187 thread, and don't resume all threads if the Hc thread has exited.
2188
2189 2014-11-12 Pedro Alves <palves@redhat.com>
2190
2191 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2192 the process group instead of to a specific LWP.
2193
2194 2014-10-15 Pedro Alves <palves@redhat.com>
2195
2196 PR server/17487
2197 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2198 parameter.
2199 (arm_set_thread_context): Delete.
2200 (the_low_target): Adjust.
2201 * win32-i386-low.c (debug_registers_changed)
2202 (debug_registers_used): Delete.
2203 (update_debug_registers_callback): New function.
2204 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2205 needing to update their debug registers.
2206 (win32_get_current_dr): New function.
2207 (x86_dr_low_get_addr, x86_dr_low_get_control)
2208 (x86_dr_low_get_status): Fetch the debug register from the thread
2209 record's context.
2210 (i386_initial_stuff): Adjust.
2211 (i386_get_thread_context): Remove current_event parameter. Don't
2212 clear debug_registers_changed nor copy DR values to
2213 debug_reg_state.
2214 (i386_set_thread_context): Delete.
2215 (i386_prepare_to_resume): New function.
2216 (i386_thread_added): Mark the thread as needing to update irs
2217 debug registers.
2218 (the_low_target): Remove i386_set_thread_context and install
2219 i386_prepare_to_resume.
2220 * win32-low.c (win32_get_thread_context): Adjust.
2221 (win32_set_thread_context): Use SetThreadContext
2222 directly.
2223 (win32_prepare_to_resume): New function.
2224 (win32_require_context): New function, factored out from ...
2225 (thread_rec): ... this.
2226 (continue_one_thread): Call win32_prepare_to_resume on each thread
2227 we're about to continue.
2228 (win32_resume): Call win32_prepare_to_resume on the event thread.
2229 * win32-low.h (struct win32_thread_info)
2230 <debug_registers_changed>: New field.
2231 (struct win32_target_ops): Change prototype of set_thread_context,
2232 delete set_thread_context and add prepare_to_resume.
2233 (win32_require_context): New declaration.
2234
2235 2014-10-08 Gary Benson <gbenson@redhat.com>
2236
2237 * server.h: Do not include common-exceptions.h.
2238
2239 2014-10-08 Gary Benson <gbenson@redhat.com>
2240
2241 * server.h: Do not include cleanups.h.
2242
2243 2014-09-30 James Hogan <james.hogan@imgtec.com>
2244
2245 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2246 mips64-dsp-linux.c.
2247
2248 2014-09-23 Yao Qi <yao@codesourcery.com>
2249
2250 * linux-low.c (lp_status_maybe_breakpoint): New function.
2251 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2252 (count_events_callback): Likewise.
2253 (select_event_lwp_callback): Likewise.
2254 (cancel_breakpoints_callback): Likewise.
2255
2256 2014-09-19 Don Breazeal <donb@codesourcery.com>
2257
2258 * linux-low.c (handle_extended_wait): Call
2259 linux_ptrace_get_extended_event.
2260 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2261 linux_is_extended_waitstatus.
2262
2263 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2264
2265 * Makefile.in (CPPFLAGS): Define.
2266 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2267 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2268
2269 2014-09-16 Gary Benson <gbenson@redhat.com>
2270
2271 * inferiors.h (current_inferior): Renamed as...
2272 (current_thread): New variable. All uses updated.
2273 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2274 (maybe_move_out_of_jump_pad): Likewise.
2275 (cancel_breakpoint): Likewise.
2276 (linux_low_filter_event): Likewise.
2277 (wait_for_sigstop): Likewise.
2278 (linux_resume_one_lwp): Likewise.
2279 (need_step_over_p): Likewise.
2280 (start_step_over): Likewise.
2281 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2282 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2283 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2284 and save_inferior as saved_thread.
2285 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2286 saved_thread.
2287 (regcache_invalidate_thread): Likewise.
2288 * remote-utils.c (prepare_resume_reply): Likewise.
2289 * thread-db.c (thread_db_get_tls_address): Likewise.
2290 (disable_thread_event_reporting): Likewise.
2291 (remove_thread_event_breakpoints): Likewise.
2292 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2293 as saved_thread.
2294 * target.h (set_desired_inferior): Renamed as...
2295 (set_desired_thread): New declaration. All uses updated.
2296 * server.c (myresume): Updated comment to reference thread instead
2297 of inferior.
2298 (handle_serial_event): Likewise.
2299 (handle_target_event): Likewise.
2300
2301 2014-09-12 Tom Tromey <tromey@redhat.com>
2302 Gary Benson <gbenson@redhat.com>
2303
2304 * regcache.h: Include common-regcache.h.
2305 (regcache_read_pc): Don't declare.
2306 * regcache.c (get_thread_regcache_for_ptid): New function.
2307
2308 2014-09-11 Tom Tromey <tromey@redhat.com>
2309 Gary Benson <gbenson@redhat.com>
2310
2311 * symbol.c: New file.
2312 * Makefile.in (SFILES): Add symbol.c.
2313 (OBS): Add symbol.o.
2314
2315 2014-09-11 Gary Benson <gbenson@redhat.com>
2316
2317 * target.c (target_stop_ptid, target_continue_ptid): New
2318 functions.
2319
2320 2014-09-11 Tom Tromey <tromey@redhat.com>
2321 Gary Benson <gbenson@redhat.com>
2322
2323 * target.h: Include target/target.h.
2324 * target.c (target_read_memory, target_read_uint32)
2325 (target_write_memory): New functions.
2326
2327 2014-09-11 Gary Benson <gbenson@redhat.com>
2328
2329 * server.h (debug_hw_points): Don't declare.
2330 * server.c (debug_hw_points): Don't define. Replace all uses
2331 with show_debug_regs.
2332 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2333 all uses with show_debug_regs.
2334
2335 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2336
2337 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2338 endianness into account.
2339 (ppc_supply_ptrace_register): Likewise.
2340
2341 2014-09-03 James Hogan <james.hogan@imgtec.com>
2342
2343 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2344 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2345
2346 2014-09-03 Gary Benson <gbenson@redhat.com>
2347
2348 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2349 ALL_DEBUG_ADDRESS_REGISTERS.
2350
2351 2014-09-02 Gary Benson <gbenson@redhat.com>
2352
2353 * i386-low.h: Renamed as...
2354 * x86-low.h: New file. All type, function and variable name
2355 prefixes changed from "i386_" to "x86_". All references updated.
2356 * i386-low.c: Renamed as...
2357 * x86-low.c: New file. All type, function and variable name
2358 prefixes changed from "i386_" to "x86_". All references updated.
2359
2360 2014-09-02 Gary Benson <gbenson@redhat.com>
2361
2362 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2363 (x86_linux_new_thread): Likewise.
2364
2365 2014-08-29 Gary Benson <gbenson@redhat.com>
2366
2367 * server.h (setjmp.h): Do not include.
2368 (toplevel): Do not declare.
2369 (common-exceptions.h): Include.
2370 (cleanups.h): Likewise.
2371 * server.c (toplevel): Do not define.
2372 (exit_code): New static global.
2373 (detach_or_kill_for_exit_cleanup): New function.
2374 (main): New function. Original main renamed to...
2375 (captured_main): New function.
2376 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2377
2378 2014-08-29 Gary Benson <gbenson@redhat.com>
2379
2380 * Makefile.in (SFILES): Add common/common-exceptions.c.
2381 (OBS): Add common-exceptions.o.
2382 (common-exceptions.o): New rule.
2383 * utils.c (prepare_to_throw_exception): New function.
2384
2385 2014-08-29 Gary Benson <gbenson@redhat.com>
2386
2387 * config.in: Regenerate.
2388 * configure: Likewise.
2389
2390 2014-08-29 Gary Benson <gbenson@redhat.com>
2391
2392 * Makefile.in (SFILES): Add common/cleanups.c.
2393 (OBS): cleanups.o.
2394 (cleanups.o): New rule.
2395
2396 2014-08-29 Gary Benson <gbenson@redhat.com>
2397
2398 * utils.c (internal_vwarning): New function.
2399
2400 2014-08-28 Gary Benson <gbenson@redhat.com>
2401
2402 * utils.h (fatal): Remove declaration.
2403 * utils.c (fatal): Remove function.
2404
2405 2014-08-28 Gary Benson <gbenson@redhat.com>
2406
2407 * tracepoint.c (gdb_agent_init): Replace fatal with
2408 perror_with_name.
2409 (initialize_tracepoint): Likewise.
2410
2411 2014-08-28 Gary Benson <gbenson@redhat.com>
2412
2413 * remote-utils.c (remote_prepare): Replace fatal with error.
2414
2415 2014-08-28 Gary Benson <gbenson@redhat.com>
2416
2417 * linux-low.c (linux_async): Replace fatal with warning.
2418 Tidy up and return.
2419 (linux_start_non_stop): Return -1 if linux_async failed.
2420
2421 2014-08-28 Gary Benson <gbenson@redhat.com>
2422
2423 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2424 gdb_assert.
2425 (i386_dr_low_get_addr): Remove vague comment.
2426 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2427 gdb_assert.
2428
2429 2014-08-28 Gary Benson <gbenson@redhat.com>
2430
2431 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2432 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2433 internal_error.
2434 (linux_resume_one_lwp): Likewise.
2435 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2436 gdb_assert.
2437 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2438 with internal_error.
2439 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2440 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2441 (find_register_by_name): Replace fatal with internal_error.
2442 (find_regno): Likewise.
2443 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2444 * thread-db.c (thread_db_create_event): Likewise.
2445 (thread_db_load_search): Likewise.
2446 (try_thread_db_load_1): Likewise.
2447 * tracepoint.c (get_jump_space_head): Replace fatal with
2448 internal_error.
2449 (claim_trampoline_space): Likewise.
2450 (have_fast_tracepoint_trampoline_buffer): Likewise.
2451 (cmd_qtstart): Likewise.
2452 (stop_tracing): Likewise.
2453 (fast_tracepoint_collecting): Likewise.
2454 (target_malloc): Likewise.
2455 (download_tracepoint): Likewise.
2456 (download_trace_state_variables): Replace check with gdb_assert.
2457 (upload_fast_traceframes): Replace fatal with internal_error.
2458
2459 2014-08-19 Tom Tromey <tromey@redhat.com>
2460 Gary Benson <gbenson@redhat.com>
2461
2462 * Makefile.in (SFILES): Add common/common-debug.c.
2463 (OBS): Add common-debug.o.
2464 (common-debug.o): New rule.
2465 * debug.h (debug_printf): Don't declare.
2466 * debug.c (debug_printf): Renamed and rewritten as...
2467 (debug_vprintf): New function.
2468
2469 2014-08-19 Gary Benson <gbenson@redhat.com>
2470
2471 * utils.h: Do not include print-utils.h.
2472
2473 2014-08-19 Tom Tromey <tromey@redhat.com>
2474 Gary Benson <gbenson@redhat.com>
2475
2476 * server.h: Add static assertion.
2477 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2478
2479 2014-08-19 Tom Tromey <tromey@redhat.com>
2480 Gary Benson <gbenson@redhat.com>
2481
2482 * Makefile.in (SFILES): Add common/errors.c.
2483 (OBS): Add errors.o.
2484 (IPA_OBS): Add errors-ipa.o.
2485 (errors.o): New rule.
2486 (errors-ipa.o): Likewise.
2487 * utils.h (perror_with_name, error, warning): Don't declare.
2488 * utils.c (warning): Renamed and rewritten as...
2489 (vwarning): New function.
2490 (error): Renamed and rewritten as...
2491 (verror): New function.
2492 (internal_error): Renamed and rewritten as...
2493 (internal_verror): New function.
2494
2495 2014-08-07 Gary Benson <gbenson@redhat.com>
2496
2497 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2498 * configure: Regenerate.
2499 * config.in: Likewise.
2500 * server.h: Do not include errno.h.
2501 * event-loop.c: Likewise.
2502 * hostio-errno.c: Likewise.
2503 * linux-low.c: Likewise.
2504 * remote-utils.c: Likewise.
2505 * spu-low.c: Likewise.
2506 * utils.c: Likewise.
2507 * gdbreplay.c: Unconditionally include errno.h.
2508
2509 2014-08-07 Gary Benson <gbenson@redhat.com>
2510
2511 * server.h: Do not include string.h.
2512 * event-loop.c: Likewise.
2513 * linux-low.c: Likewise.
2514 * regcache.c: Likewise.
2515 * remote-utils.c: Likewise.
2516 * spu-low.c: Likewise.
2517 * utils.c: Likewise.
2518
2519 2014-08-07 Gary Benson <gbenson@redhat.com>
2520
2521 * server.h: Do not include gdb_assert.h.
2522
2523 2014-08-07 Gary Benson <gbenson@redhat.com>
2524
2525 * server.h: Do not include common-utils.h.
2526
2527 2014-08-07 Gary Benson <gbenson@redhat.com>
2528
2529 * server.h: Do not include ptid.h.
2530 * notif.h: Likewise.
2531
2532 2014-08-07 Gary Benson <gbenson@redhat.com>
2533
2534 * server.h: Do not include gdb_locale.h.
2535
2536 2014-08-07 Gary Benson <gbenson@redhat.com>
2537
2538 * server.h: Do not include gdb/signals.h.
2539 * win32-low.c: Likewise.
2540
2541 2014-08-07 Gary Benson <gbenson@redhat.com>
2542
2543 * server.h: Do not include pathmax.h.
2544
2545 2014-08-07 Gary Benson <gbenson@redhat.com>
2546
2547 * server.h: Do not include libiberty.h.
2548 * linux-bfin-low.c: Likewise.
2549
2550 2014-08-07 Gary Benson <gbenson@redhat.com>
2551
2552 * server.h: Do not include ansidecl.h.
2553
2554 2014-08-07 Gary Benson <gbenson@redhat.com>
2555
2556 * linux-x86-low.c: Do not include stddef.h.
2557 * lynx-ppc-low.c: Likewise.
2558 * tracepoint.c: Likewise.
2559
2560 2014-08-07 Gary Benson <gbenson@redhat.com>
2561
2562 * server.h: Do not include stdarg.h.
2563 * nto-low.c: Likewise.
2564
2565 2014-08-07 Gary Benson <gbenson@redhat.com>
2566
2567 * server.h: Do not include stdlib.h.
2568 * inferiors.c: Likewise.
2569 * linux-low.c: Likewise.
2570 * regcache.c: Likewise.
2571 * spu-low.c: Likewise.
2572 * tracepoint.c: Likewise.
2573 * utils.c: Likewise.
2574
2575 2014-08-07 Gary Benson <gbenson@redhat.com>
2576
2577 * server.h: Do not include stdio.h.
2578 * linux-low.c: Likewise.
2579 * remote-utils.c: Likewise.
2580 * spu-low.c: Likewise.
2581 * utils.c: Likewise.
2582 * wincecompat.c: Likewise.
2583
2584 2014-08-06 Gary Benson <gbenson@redhat.com>
2585
2586 * regcache.c (init_register_cache): Move conditionals inside if.
2587
2588 2014-08-06 Gary Benson <gbenson@redhat.com>
2589
2590 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2591
2592 2014-07-31 Gary Benson <gbenson@redhat.com>
2593
2594 * ax.h: Do not include server.h.
2595 * gdbthread.h: Likewise.
2596 * lynx-low.h: Likewise.
2597 * notif.h: Likewise.
2598
2599 2014-07-30 Gary Benson <gbenson@redhat.com>
2600
2601 * server.h: Include common-defs.h.
2602 Do not include config.h or build-gnulib-gdbserver/config.h.
2603
2604 2014-07-30 Gary Benson <gbenson@redhat.com>
2605
2606 * hostio-errno.c: Move server.h to top of includes list.
2607 * inferiors.c: Likewise.
2608 * linux-x86-low.c: Likewise.
2609 * notif.c: Include server.h.
2610
2611 2014-07-24 Tom Tromey <tromey@redhat.com>
2612 Gary Benson <gbenson@redhat.com>
2613
2614 * server.h (CORE_ADDR): Now unsigned.
2615
2616 2014-07-16 Pedro Alves <palves@redhat.com>
2617
2618 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2619
2620 2014-07-15 Pedro Alves <palves@redhat.com>
2621
2622 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2623 copy.
2624
2625 2014-07-11 Pedro Alves <palves@redhat.com>
2626
2627 * linux-low.c (kill_wait_lwp): New function, based on
2628 kill_one_lwp_callback, but use my_waitpid directly.
2629 (kill_one_lwp_callback, linux_kill): Use it.
2630
2631 2014-06-23 Pedro Alves <palves@redhat.com>
2632
2633 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2634 before setting DR0..DR3.
2635
2636 2014-06-20 Gary Benson <gbenson@redhat.com>
2637
2638 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2639 * configure: Regenerated.
2640 * config.in: Likewise.
2641
2642 2014-06-20 Gary Benson <gbenson@redhat.com>
2643
2644 * Makefile.in (SFILES): Update locations for files moved
2645 from common to nat.
2646 (object file files): Reordered.
2647
2648 2014-06-20 Gary Benson <gbenson@redhat.com>
2649
2650 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2651 (i386_dr_low_set_addr): Likewise.
2652 (i386_dr_low_get_addr): Likewise.
2653 (i386_dr_low_can_set_control): Likewise.
2654 (i386_dr_low_set_control): Likewise.
2655 (i386_dr_low_get_control): Likewise.
2656 (i386_dr_low_get_status): Likewise.
2657 (i386_get_debug_register_length): Likewise.
2658 * linux-x86-low.c (i386_dr_low_set_addr):
2659 Changed signature. Made static.
2660 (i386_dr_low_get_addr): Likewise.
2661 (i386_dr_low_set_control): Likewise.
2662 (i386_dr_low_get_control): Likewise.
2663 (i386_dr_low_get_status): Likewise.
2664 (i386_dr_low): New global variable.
2665 * win32-i386-low.c (i386_dr_low_set_addr):
2666 Changed signature. Made static.
2667 (i386_dr_low_get_addr): Likewise.
2668 (i386_dr_low_set_control): Likewise.
2669 (i386_dr_low_get_control): Likewise.
2670 (i386_dr_low_get_status): Likewise.
2671 (i386_dr_low): New global variable.
2672
2673 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2674
2675 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2676 * Makefile.in (AR, AR_FLAGS): Define.
2677 * configure: Regenerate.
2678
2679 2014-06-19 Gary Benson <gbenson@redhat.com>
2680
2681 * Makefile.in (i386-dregs.o): New rule.
2682 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2683 * i386-low.c (target.h): Remove include.
2684 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2685 (DR_CONTROL_SHIFT): Likewise.
2686 (DR_CONTROL_SIZE): Likewise.
2687 (DR_RW_EXECUTE): Likewise.
2688 (DR_RW_WRITE): Likewise.
2689 (DR_RW_READ): Likewise.
2690 (DR_RW_IORW): Likewise.
2691 (DR_LEN_1): Likewise.
2692 (DR_LEN_2): Likewise.
2693 (DR_LEN_4): Likewise.
2694 (DR_LEN_8): Likewise.
2695 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2696 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2697 (DR_ENABLE_SIZE): Likewise.
2698 (DR_LOCAL_SLOWDOWN): Likewise.
2699 (DR_GLOBAL_SLOWDOWN): Likewise.
2700 (DR_CONTROL_RESERVED): Likewise.
2701 (I386_DR_CONTROL_MASK): Likewise.
2702 (I386_DR_VACANT): Likewise.
2703 (I386_DR_LOCAL_ENABLE): Likewise.
2704 (I386_DR_GLOBAL_ENABLE): Likewise.
2705 (I386_DR_DISABLE): Likewise.
2706 (I386_DR_SET_RW_LEN): Likewise.
2707 (I386_DR_GET_RW_LEN): Likewise.
2708 (I386_DR_WATCH_HIT): Likewise.
2709 (i386_wp_op_t): Likewise.
2710 (i386_show_dr): Likewise.
2711 (i386_length_and_rw_bits): Likewise.
2712 (i386_insert_aligned_watchpoint): Likewise.
2713 (i386_remove_aligned_watchpoint): Likewise.
2714 (i386_handle_nonaligned_watchpoint): Likewise.
2715 i386_update_inferior_debug_regs(): Likewise.
2716 (i386_dr_insert_watchpoint): Likewise.
2717 (i386_dr_remove_watchpoint): Likewise.
2718 (i386_dr_region_ok_for_watchpoint): Likewise.
2719 (i386_dr_stopped_data_address): Likewise.
2720 (i386_dr_stopped_by_watchpoint): Likewise.
2721
2722 2014-06-19 Gary Benson <gbenson@redhat.com>
2723
2724 * i386-low.c (i386_dr_show): Renamed to
2725 i386_show_dr and made static. All uses updated.
2726 (i386_dr_length_and_rw_bits): Renamed to
2727 i386_length_and_rw_bits and made static.
2728 All uses updated.
2729 (i386_dr_insert_aligned_watchpoint): Renamed to
2730 i386_insert_aligned_watchpoint and made static.
2731 All uses updated.
2732 (i386_dr_remove_aligned_watchpoint): Renamed to
2733 i386_remove_aligned_watchpoint and made static.
2734 All uses updated.
2735 (i386_dr_update_inferior_debug_regs): Renamed to
2736 i386_update_inferior_debug_regs and made static.
2737 All uses updated.
2738
2739 2014-06-18 Gary Benson <gbenson@redhat.com>
2740
2741 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2742 (i386_dr_low_can_set_control): Likewise.
2743 (i386_get_debug_register_length): Likewise.
2744 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2745 (i386_dr_low_can_set_control): Likewise.
2746 (i386_get_debug_register_length): Likewise.
2747
2748 2014-06-17 Gary Benson <gbenson@redhat.com>
2749
2750 * i386-low.h (i386-dregs.h): New include.
2751 (DR_FIRSTADDR): Now in i386-dregs.h.
2752 (DR_LASTADDR): Likewise.
2753 (DR_NADDR): Likewise.
2754 (DR_STATUS): Likewise.
2755 (DR_CONTROL): Likewise.
2756 (i386_debug_reg_state): Likewise.
2757 (i386_dr_insert_watchpoint): Likewise.
2758 (i386_dr_remove_watchpoint): Likewise.
2759 (i386_dr_region_ok_for_watchpoint): Likewise.
2760 (i386_dr_stopped_data_address): Likewise.
2761 (i386_dr_stopped_by_watchpoint): Likewise.
2762 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2763
2764 2014-06-18 Gary Benson <gbenson@redhat.com>
2765
2766 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2767 i386_dr_insert_watchpoint.
2768 (i386_low_remove_watchpoint): Renamed to
2769 i386_dr_remove_watchpoint.
2770 (i386_low_region_ok_for_watchpoint): Renamed to
2771 i386_dr_region_ok_for_watchpoint.
2772 (i386_low_stopped_data_address): Renamed to
2773 i386_dr_stopped_data_address.
2774 (i386_low_stopped_by_watchpoint): Renamed to
2775 i386_dr_stopped_by_watchpoint.
2776 * i386-low.c (i386_show_dr): Renamed to
2777 i386_dr_show and made nonstatic. All uses updated.
2778 (i386_length_and_rw_bits): Renamed to
2779 i386_dr_length_and_rw_bits and made nonstatic.
2780 All uses updated.
2781 (i386_insert_aligned_watchpoint): Renamed to
2782 i386_dr_insert_aligned_watchpoint and made nonstatic.
2783 All uses updated.
2784 (i386_remove_aligned_watchpoint): Renamed to
2785 i386_dr_remove_aligned_watchpoint and made nonstatic.
2786 All uses updated.
2787 (i386_update_inferior_debug_regs): Renamed to
2788 i386_dr_update_inferior_debug_regs and made nonstatic.
2789 All uses updated.
2790 (i386_low_insert_watchpoint): Renamed to
2791 i386_dr_insert_watchpoint. All uses updated.
2792 (i386_low_remove_watchpoint): Renamed to
2793 i386_dr_remove_watchpoint. All uses updated.
2794 (i386_low_region_ok_for_watchpoint): Renamed to
2795 i386_dr_region_ok_for_watchpoint. All uses updated.
2796 (i386_low_stopped_data_address): Renamed to
2797 i386_dr_stopped_data_address. All uses updated.
2798 (i386_low_stopped_by_watchpoint): Renamed to
2799 i386_dr_stopped_by_watchpoint. All uses updated.
2800
2801 2014-06-18 Gary Benson <gbenson@redhat.com>
2802
2803 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2804 (i386_dr_low_can_set_control): Likewise.
2805 (i386_insert_aligned_watchpoint): New check.
2806
2807 2014-06-18 Gary Benson <gbenson@redhat.com>
2808
2809 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2810 Renamed to state.
2811
2812 2014-06-18 Gary Benson <gbenson@redhat.com>
2813
2814 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2815 instead of fatal and error.
2816 (i386_handle_nonaligned_watchpoint): Likewise.
2817
2818 2014-06-18 Gary Benson <gbenson@redhat.com>
2819
2820 * i386-low.c (i386_get_debug_register_length): New macro.
2821 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2822 (i386_show_dr): Use debug_printf instead of fprintf. Use
2823 phex to format values.
2824
2825 2014-06-18 Gary Benson <gbenson@redhat.com>
2826
2827 * i386-low.h: Comment changes.
2828 * i386-low.c: Likewise.
2829
2830 2014-06-18 Gary Benson <gbenson@redhat.com>
2831
2832 * i386-low.c: Whitespace changes.
2833
2834 2014-06-12 Tom Tromey <tromey@redhat.com>
2835
2836 * utils.c (freeargv): Remove.
2837
2838 2014-06-12 Tom Tromey <tromey@redhat.com>
2839
2840 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2841 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2842 (parse_debug_format_options): Likewise.
2843 (gdbserver_usage): Likewise.
2844 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2845 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2846 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2847 against libiberty.
2848 ($(LIBGNU)): Depend on libiberty.
2849 (all-lib): Recurse into all subdirs.
2850 (install-only): Invoke "install" target in subdirs.
2851 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2852 targets.
2853 * configure: Rebuild.
2854 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2855 for vasprintf, vsnprintf, or gettimeofday.
2856 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2857 srv_tgtobj.
2858
2859 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2860
2861 * development.sh: Delete.
2862 * Makefile.in (config.status): Adjust dependency on development.sh.
2863 * configure.ac: Adjust development.sh source call.
2864 * configure: Regenerate.
2865
2866 2014-06-02 Pedro Alves <palves@redhat.com>
2867
2868 * ax.c (gdb_free_agent_expr): New function.
2869 * ax.h (gdb_free_agent_expr): New declaration.
2870 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2871 list.
2872 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2873 static.
2874 (clear_breakpoint_conditions_and_commands): New function.
2875 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2876 (clear_breakpoint_conditions_and_commands): New declaration.
2877
2878 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2879
2880 * linux-aarch64-low.c (asm/ptrace.h): Include.
2881
2882 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2883
2884 Fix TLS access for -static -pthread.
2885 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2886 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2887 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2888
2889 2014-05-20 Pedro Alves <palves@redhat.com>
2890
2891 * linux-aarch64-low.c (aarch64_insert_point)
2892 (aarch64_remove_point): No longer check whether the type is
2893 supported here. Adjust to new interface.
2894 (the_low_target): Install aarch64_supports_z_point_type as
2895 supports_z_point_type method.
2896 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2897 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2898 instead of a Z packet char. Adjust.
2899 (arm_supports_z_point_type): New function.
2900 (arm_insert_point, arm_remove_point): Adjust to new interface.
2901 (the_low_target): Install arm_supports_z_point_type.
2902 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2903 (cris_insert_point, cris_remove_point): Adjust to new interface.
2904 Don't check whether the type is supported here.
2905 (the_low_target): Install cris_supports_z_point_type.
2906 * linux-low.c (linux_supports_z_point_type): New function.
2907 (linux_insert_point, linux_remove_point): Adjust to new interface.
2908 * linux-low.h (struct linux_target_ops) <insert_point,
2909 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2910 raw_breakpoint pointer parameter.
2911 <supports_z_point_type>: New method.
2912 * linux-mips-low.c (mips_supports_z_point_type): New function.
2913 (mips_insert_point, mips_remove_point): Adjust to new interface.
2914 Use mips_supports_z_point_type.
2915 (the_low_target): Install mips_supports_z_point_type.
2916 * linux-ppc-low.c (the_low_target): Install NULL as
2917 supports_z_point_type method.
2918 * linux-s390-low.c (the_low_target): Install NULL as
2919 supports_z_point_type method.
2920 * linux-sparc-low.c (the_low_target): Install NULL as
2921 supports_z_point_type method.
2922 * linux-x86-low.c (x86_supports_z_point_type): New function.
2923 (x86_insert_point): Adjust to new insert_point interface. Use
2924 insert_memory_breakpoint. Adjust to new
2925 i386_low_insert_watchpoint interface.
2926 (x86_remove_point): Adjust to remove_point interface. Use
2927 remove_memory_breakpoint. Adjust to new
2928 i386_low_remove_watchpoint interface.
2929 (the_low_target): Install x86_supports_z_point_type.
2930 * lynx-low.c (lynx_target_ops): Install NULL as
2931 supports_z_point_type callback.
2932 * nto-low.c (nto_supports_z_point_type): New.
2933 (nto_insert_point, nto_remove_point): Adjust to new interface.
2934 (nto_target_ops): Install nto_supports_z_point_type.
2935 * mem-break.c: Adjust intro comment.
2936 (struct raw_breakpoint) <raw_type, size>: New fields.
2937 <inserted>: Update comment.
2938 <shlib_disabled>: Delete field.
2939 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2940 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2941 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2942 (raw_bkpt_type_to_target_hw_bp_type): New function.
2943 (find_enabled_raw_code_breakpoint_at): New function.
2944 (find_raw_breakpoint_at): New type and size parameters. Use them.
2945 (insert_memory_breakpoint): New function, based off
2946 set_raw_breakpoint_at.
2947 (remove_memory_breakpoint): New function.
2948 (set_raw_breakpoint_at): Reimplement.
2949 (set_breakpoint): New, based on set_breakpoint_at.
2950 (set_breakpoint_at): Reimplement.
2951 (delete_raw_breakpoint): Go through the_target->remove_point
2952 instead of assuming memory breakpoints.
2953 (find_gdb_breakpoint_at): Delete.
2954 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2955 (find_gdb_breakpoint): New function.
2956 (set_gdb_breakpoint_at): Delete.
2957 (z_type_supported): New function.
2958 (set_gdb_breakpoint_1): New function, loosely based off
2959 set_gdb_breakpoint_at.
2960 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2961 (delete_gdb_breakpoint_at): Delete.
2962 (delete_gdb_breakpoint_1): New function, loosely based off
2963 delete_gdb_breakpoint_at.
2964 (delete_gdb_breakpoint): New function.
2965 (clear_gdb_breakpoint_conditions): Rename to ...
2966 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2967 breakpoint.
2968 (add_condition_to_breakpoint): Make static.
2969 (add_breakpoint_condition): Take a struct breakpoint pointer
2970 instead of an address. Adjust.
2971 (gdb_condition_true_at_breakpoint): Rename to ...
2972 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2973 z_type parameter.
2974 (gdb_condition_true_at_breakpoint): Reimplement.
2975 (add_breakpoint_commands): Take a struct breakpoint pointer
2976 instead of an address. Adjust.
2977 (gdb_no_commands_at_breakpoint): Rename to ...
2978 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2979 parameter. Return true if no breakpoint was found. Change debug
2980 output.
2981 (gdb_no_commands_at_breakpoint): Reimplement.
2982 (run_breakpoint_commands): Rename to ...
2983 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2984 and change return type to boolean.
2985 (run_breakpoint_commands): New function.
2986 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2987 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2988 breakpoint. Go through the_target->remove_point instead of
2989 assuming memory breakpoint.
2990 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2991 software and hardware breakpoints.
2992 (reinsert_raw_breakpoint): Go through the_target->insert_point
2993 instead of assuming memory breakpoint.
2994 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2995 software and hardware breakpoints.
2996 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2997 Check both software and hardware breakpoints.
2998 (validate_inserted_breakpoint): Assert the breakpoint is a
2999 software breakpoint. Set the inserted flag to -1 instead of
3000 setting shlib_disabled.
3001 (delete_disabled_breakpoints): Adjust.
3002 (validate_breakpoints): Only validate software breakpoints.
3003 Adjust to inserted flag change.
3004 (check_mem_read, check_mem_write): Skip breakpoint types other
3005 than software breakpoints. Adjust to inserted flag change.
3006 * mem-break.h (enum raw_bkpt_type): New enum.
3007 (raw_breakpoint, struct process_info): Forward declare.
3008 (Z_packet_to_target_hw_bp_type): Delete declaration.
3009 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3010 (set_gdb_breakpoint, delete_gdb_breakpoint)
3011 (clear_breakpoint_conditions): New declarations.
3012 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3013 (breakpoint_inserted_here): Update comment.
3014 (add_breakpoint_condition, add_breakpoint_commands): Replace
3015 address parameter with a breakpoint pointer parameter.
3016 (gdb_breakpoint_here): Update comment.
3017 (delete_gdb_breakpoint_at): Delete.
3018 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3019 * server.c (process_point_options): Take a struct breakpoint
3020 pointer instead of an address. Adjust.
3021 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3022 delete_gdb_breakpoint.
3023 * spu-low.c (spu_target_ops): Install NULL as
3024 supports_z_point_type method.
3025 * target.h: Include mem-break.h.
3026 (struct target_ops) <prepare_to_access_memory>: Update comment.
3027 <supports_z_point_type>: New field.
3028 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3029 instead of a char. Also take a raw breakpoint pointer.
3030 * win32-arm-low.c (the_low_target): Install NULL as
3031 supports_z_point_type.
3032 * win32-i386-low.c (i386_supports_z_point_type): New function.
3033 (i386_insert_point, i386_remove_point): Adjust to new interface.
3034 (the_low_target): Install i386_supports_z_point_type.
3035 * win32-low.c (win32_supports_z_point_type): New function.
3036 (win32_insert_point, win32_remove_point): Adjust to new interface.
3037 (win32_target_ops): Install win32_supports_z_point_type.
3038 * win32-low.h (struct win32_target_ops):
3039 <supports_z_point_type>: New method.
3040 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3041 instead of a char. Also take a raw breakpoint pointer.
3042
3043 2014-05-20 Pedro Alves <palves@redhat.com>
3044
3045 * mem-break.h: Include break-common.h.
3046 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3047 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3048 (Z_packet_to_target_hw_bp_type): New declaration.
3049 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3050 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3051 (Z_PACKET_ACCESS_WP): Delete macros.
3052 (Z_packet_to_hw_type): Delete function.
3053 * i386-low.h: Don't include break-common.h here.
3054 (Z_packet_to_hw_type): Delete declaration.
3055 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3056 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3057 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3058 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3059 * linux-aarch64-low.c: Don't include break-common.h here.
3060 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3061 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3062 (Z_packet_to_target_hw_bp_type): Delete function.
3063 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3064 function.
3065 (mips_insert_point, mips_remove_point): Use
3066 Z_packet_to_target_hw_bp_type.
3067
3068 2014-05-20 Pedro Alves <palves@redhat.com>
3069
3070 * linux-aarch64-low.c: Include break-common.h.
3071 (enum target_point_type): Delete.
3072 (Z_packet_to_point_type): Rename to ...
3073 (Z_packet_to_target_hw_bp_type): ... this, and return a
3074 target_hw_bp_type instead.
3075 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3076 instead of an enum target_point_type.
3077 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3078 breakpoint type.
3079 (aarch64_dr_state_insert_one_point)
3080 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3081 (aarch64_handle_aligned_watchpoint)
3082 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3083 Take an enum target_hw_bp_type instead of an enum
3084 target_point_type.
3085 (aarch64_supports_z_point_type): New function.
3086 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3087 use Z_packet_to_target_hw_bp_type.
3088
3089 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3090
3091 * configure.ac: Only use -Werror by default when DEVELOPMENT
3092 is true.
3093 * configure: Regenerate.
3094
3095 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3096
3097 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3098 * linux-x86-low.c (X86_64_USER_REGS): New.
3099 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3100
3101 2014-04-28 Yao Qi <yao@codesourcery.com>
3102
3103 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3104 name.
3105
3106 2014-04-25 Pedro Alves <palves@redhat.com>
3107
3108 PR server/16255
3109 * linux-low.c (linux_attach_fail_reason_string): New function.
3110 (linux_attach_lwp): Delete.
3111 (linux_attach_lwp_1): Rename to ...
3112 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3113 argument. Remove "initial" parameter. Return int instead of
3114 void. Don't error or warn here.
3115 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3116 failure to attach to the tgid. Call warning when failing to
3117 attach to an lwp.
3118 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3119 argument. Remove "initial" parameter. Return int instead of
3120 void. Don't error or warn here.
3121 (linux_attach_fail_reason_string): New declaration.
3122 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3123 interface change. Use linux_attach_fail_reason_string.
3124
3125 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3126 Walfred Tedeschi <walfred.tedeschi@intel.com>
3127
3128 * Makefile.in: Added rules to handle new files
3129 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3130 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3131 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3132 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3133 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3134 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3135 x32-avx512-linux.o.
3136 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3137 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3138 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3139 i386/x32-avx512.xml.
3140 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3141 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3142 i386/x32-avx512-linux.xml.
3143 * i387-fp.c (num_avx512_k_registers): New constant for number
3144 of K registers.
3145 (num_avx512_zmmh_low_registers): New constant for number of
3146 lower ZMM registers (0-15).
3147 (num_avx512_zmmh_high_registers): New constant for number of
3148 higher ZMM registers (16-31).
3149 (num_avx512_ymmh_registers): New contant for number of higher
3150 YMM registers (ymm16-31 added by avx521 on x86_64).
3151 (num_avx512_xmm_registers): New constant for number of higher
3152 XMM registers (xmm16-31 added by AVX512 on x86_64).
3153 (struct i387_xsave): Add space for AVX512 registers.
3154 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3155 Add code to handle AVX512 registers.
3156 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3157 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3158 prototypei from generated file.
3159 (tdesc_amd64_avx512_linux): Likewise.
3160 (init_registers_x32_avx512_linux): Likewise.
3161 (tdesc_x32_avx512_linux): Likewise.
3162 (init_registers_i386_avx512_linux): Likewise.
3163 (tdesc_i386_avx512_linux): Likewise.
3164 (x86_64_regmap): Add AVX512 registers.
3165 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3166 mask.
3167 (initialize_low_arch): Add code to initialize AVX512 registers.
3168
3169 2014-04-23 Pedro Alves <palves@redhat.com>
3170
3171 * mem-break.c (find_gdb_breakpoint_at): Make static.
3172 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3173
3174 2014-04-23 Pedro Alves <palves@redhat.com>
3175
3176 * i386-low.c: Don't include break-common.h here.
3177 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3178 prototype to take target_hw_bp_type as argument instead of a Z
3179 packet char.
3180 * i386-low.h: Include break-common.h here.
3181 (Z_packet_to_hw_type): Declare.
3182 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3183 prototypes.
3184 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3185 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3186 (x86_remove_point): Convert the packet number to a
3187 target_hw_bp_type before calling i386_low_remove_watchpoint.
3188 * win32-i386-low.c (i386_insert_point): Convert the packet number
3189 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3190 (i386_remove_point): Convert the packet number to a
3191 target_hw_bp_type before calling i386_low_remove_watchpoint.
3192
3193 2014-04-23 Pedro Alves <palves@redhat.com>
3194
3195 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3196
3197 2014-04-10 Pedro Alves <palves@redhat.com>
3198
3199 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3200 Check if the condition or command is NULL before checking if the
3201 breakpoint is known. On success, return true.
3202 * mem-break.h (add_breakpoint_condition): Document return.
3203 (add_breakpoint_commands): Add describing comment.
3204 * server.c (skip_to_semicolon): New function.
3205 (process_point_options): Use it.
3206
3207 2014-04-09 Pedro Alves <palves@redhat.com>
3208
3209 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3210 to lwpid_of.
3211
3212 2014-02-27 Pedro Alves <palves@redhat.com>
3213
3214 PR 12702
3215 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3216 macros.
3217 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3218 output.
3219 (last_thread_of_process_p): Take a PID argument instead of a
3220 thread pointer.
3221 (linux_wait_for_lwp): Delete.
3222 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3223 functions.
3224 (linux_low_filter_event): New function, party factored out from
3225 linux_wait_for_event.
3226 (linux_wait_for_event): Rename to ...
3227 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3228 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3229 sigsuspend. Check for zombie leaders.
3230 (linux_wait_for_event): Reimplement as wrapper around
3231 linux_wait_for_event_filtered.
3232 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3233 a normal or signal exit is seen, it's the whole process exiting.
3234 (wait_for_sigstop): No longer a for_each_inferior callback.
3235 Rewrite on top of linux_wait_for_event_filtered.
3236 (stop_all_lwps): Call wait_for_sigstop directly.
3237 * server.c (resume, handle_target_event): Handle
3238 TARGET_WAITKIND_NO_RESUMED.
3239
3240 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3241
3242 * win32-low.c (psapi_get_dll_name,
3243 * win32_CreateToolhelp32Snapshot): Delete.
3244 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3245 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3246 Delete.
3247 (handle_load_dll): Add function description.
3248 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3249
3250 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3251
3252 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3253 Add comment.
3254 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3255 base address when calling win32_add_one_solib.
3256 (handle_load_dll): Delete local variable load_addr.
3257 Remove 0x1000 offset applied to DLL base address when calling
3258 win32_add_one_solib.
3259 (handle_unload_dll): Add comment.
3260
3261 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3262
3263 * win32-low.c (win32_add_all_dlls): Renames
3264 win32_ensure_ntdll_loaded. Rewrite function documentation.
3265 Adjust implementation to always load all DLLs.
3266 Add 0x1000 offset to DLL base address when calling
3267 win32_add_one_solib.
3268 (child_initialization_done): New static global.
3269 (do_initial_child_stuff): Set child_initialization_done to
3270 zero during child initialization, and 1 after. Replace call
3271 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3272 Add comment.
3273 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3274 (handle_unload_dll): Add function documentation.
3275 (get_child_debug_event): Ignore load and unload DLL events
3276 during child initialization.
3277
3278 2014-02-20 Doug Evans <dje@google.com>
3279
3280 Remove global all_lwps.
3281 * inferiors.h (ptid_of): Move here from linux-low.h.
3282 (pid_of, lwpid_of): Ditto.
3283 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3284 parameter is a struct thread_info * now.
3285 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3286 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3287 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3288 directly.
3289 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3290 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3291 * linux-arm-low.c (update_registers_callback): Update, "entry"
3292 parameter is a struct thread_info * now.
3293 Fetch lwpid from current_inferior directly.
3294 (arm_insert_point): Pass &all_threads to find_inferior instead of
3295 &all_lwps.
3296 (arm_remove_point): Ditto.
3297 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3298 (arm_prepare_to_resume): Fetch pid from thread.
3299 (arm_read_description): Fetch lwpid from current_inferior directly.
3300 * linux-low.c (all_lwps): Delete.
3301 (delete_lwp): Delete call to remove_inferior.
3302 (handle_extended_wait): Fetch lwpid from thread.
3303 (add_lwp): Don't set lwp->entry.id. Remove call to
3304 add_inferior_to_list.
3305 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3306 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3307 (kill_one_lwp_callback): Ditto.
3308 (linux_kill): Don't dereference NULL pointer.
3309 Fetch ptid,lwpid from thread.
3310 (get_detach_signal): Fetch ptid from thread.
3311 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3312 Simplify call to regcache_invalidate_thread.
3313 (delete_lwp_callback): Update, "entry" parameter is a
3314 struct thread_info * now. Fetch pid from thread.
3315 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3316 (status_pending_p_callback): Update, "entry" parameter is a
3317 struct thread_info * now. Fetch ptid from thread.
3318 (find_lwp_pid): Update, "entry" parameter is a
3319 struct thread_info * now.
3320 (linux_wait_for_lwp): Fetch pid from thread.
3321 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3322 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3323 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3324 (dequeue_one_deferred_signal): Ditto.
3325 (cancel_breakpoint): Fetch ptid from current_inferior.
3326 (linux_wait_for_event): Pass &all_threads to find_inferior,
3327 not &all_lwps. Fetch ptid, lwpid from thread.
3328 (count_events_callback): Update, "entry" parameter is a
3329 struct thread_info * now.
3330 (select_singlestep_lwp_callback): Ditto.
3331 (select_event_lwp_callback): Ditto.
3332 (cancel_breakpoints_callback): Ditto.
3333 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3334 not &all_lwps.
3335 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3336 (unsuspend_one_lwp): Update, "entry" parameter is a
3337 struct thread_info * now.
3338 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3339 not &all_lwps.
3340 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3341 Fetch lwpid from thread, not lwp.
3342 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3343 Pass &all_threads to find_inferior, not &all_lwps.
3344 (send_sigstop): Fetch lwpid from thread, not lwp.
3345 (send_sigstop_callback): Update, "entry" parameter is a
3346 struct thread_info * now.
3347 (suspend_and_send_sigstop_callback): Ditto.
3348 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3349 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3350 struct thread_info * now.
3351 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3352 from thread, lwp.
3353 (lwp_running): Update, "entry" parameter is a
3354 struct thread_info * now.
3355 (stop_all_lwps): Fetch ptid from thread.
3356 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3357 (linux_resume_one_lwp): Fetch lwpid from thread.
3358 (linux_set_resume_request): Update, "entry" parameter is a
3359 struct thread_info * now. Fetch pid, lwpid from thread.
3360 (resume_status_pending_p): Update, "entry" parameter is a
3361 struct thread_info * now.
3362 (need_step_over_p): Ditto. Fetch lwpid from thread.
3363 (start_step_over): Fetch lwpid from thread.
3364 (linux_resume_one_thread): Update, "entry" parameter is a
3365 struct thread_info * now. Fetch lwpid from thread.
3366 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3367 (proceed_one_lwp): Update, "entry" parameter is a
3368 struct thread_info * now. Fetch lwpid from thread.
3369 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3370 struct thread_info * now.
3371 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3372 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3373 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3374 directly.
3375 (regsets_store_inferior_registers): Ditto.
3376 (fetch_register, store_register): Ditto.
3377 (linux_read_memory, linux_write_memory): Ditto.
3378 (linux_request_interrupt): Ditto.
3379 (linux_read_auxv): Ditto.
3380 (linux_xfer_siginfo): Ditto.
3381 (linux_qxfer_spu): Ditto.
3382 (linux_qxfer_libraries_svr4): Ditto.
3383 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3384 moved to inferiors.h.
3385 (get_lwp): Delete.
3386 (get_thread_lwp): Update.
3387 (struct lwp_info): Delete member "entry". Simplify comment for
3388 member "thread".
3389 (all_lwps): Delete.
3390 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3391 current_inferior directly.
3392 (update_watch_registers_callback): Update, "entry" parameter is a
3393 struct thread_info * now. Fetch pid from thread.
3394 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3395 (mips_insert_point): Fetch lwpid from current_inferior.
3396 Pass &all_threads to find_inferior, not &all_lwps.
3397 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3398 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3399 directly.
3400 (mips_stopped_data_address): Ditto.
3401 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3402 directly.
3403 * linux-tile-low.c (tile_arch_setup): Ditto.
3404 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3405 (update_debug_registers_callback): Update, "entry" parameter is a
3406 struct thread_info * now. Fetch pid from thread.
3407 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3408 Pass &all_threads to find_inferior, not &all_lwps.
3409 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3410 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3411 Pass &all_threads to find_inferior, not &all_lwps.
3412 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3413 (i386_dr_low_get_status): Ditto.
3414 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3415 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3416 (x86_linux_read_description): Ditto.
3417 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3418
3419 2014-02-20 Doug Evans <dje@google.com>
3420
3421 * inferiors.c (get_first_inferior): Fix buglet.
3422
3423 2014-02-19 Doug Evans <dje@google.com>
3424
3425 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3426 * inferiors.c (add_thread): Change result type to struct thread_info *.
3427 All callers updated.
3428 (add_lwp): Call add_thread here instead of in callers.
3429 All callers updated.
3430 * linux-low.h (get_lwp_thread): Rewrite.
3431 (struct lwp_info): New member "thread".
3432
3433 2014-02-19 Doug Evans <dje@google.com>
3434
3435 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3436 All callers updated.
3437
3438 2014-02-19 Doug Evans <dje@google.com>
3439
3440 * inferiors.c (add_thread): Fix whitespace.
3441
3442 2014-02-19 Doug Evans <dje@google.com>
3443
3444 * dll.c (clear_dlls): Replace accessing list implemention details
3445 with API function.
3446 * gdbthread.h (get_first_thread): Declare.
3447 * inferiors.c (for_each_inferior_with_data): New function.
3448 (get_first_thread): New function.
3449 (find_thread_ptid): Simplify.
3450 (get_first_inferior): New function.
3451 (clear_list): Delete.
3452 (one_inferior_p): New function.
3453 (clear_inferior_list): New function.
3454 (clear_inferiors): Update.
3455 * inferiors.h (for_each_inferior_with_data): Declare.
3456 (clear_inferior_list): Declare.
3457 (one_inferior_p): Declare.
3458 (get_first_inferior): Declare.
3459 * linux-low.c (linux_wait_for_event): Replace accessing list
3460 implemention details with API function.
3461 * server.c (target_running): Ditto.
3462 (accumulate_file_name_length): New function.
3463 (emit_dll_description): New function.
3464 (handle_qxfer_libraries): Replace accessing list implemention
3465 details with API function.
3466 (handle_qxfer_threads_worker): New function.
3467 (handle_qxfer_threads_proper): Replace accessing list implemention
3468 details with API function.
3469 (handle_query): Ditto.
3470 (visit_actioned_threads_callback_ftype): New typedef.
3471 (visit_actioned_threads_data): New struct.
3472 (visit_actioned_threads): Rewrite to be find_inferior callback.
3473 (resume): Call find_inferior.
3474 (handle_status): Replace accessing list implemention
3475 details with API function.
3476 (process_serial_event): Replace accessing list implemention details
3477 with API function.
3478 * target.c (set_desired_inferior): Replace accessing list implemention
3479 details with API function.
3480 * tracepoint.c (same_process_p): New function.
3481 (gdb_agent_about_to_close): Replace accessing list implemention
3482 details with API function.
3483 * win32-low.c (child_delete_thread): Replace accessing list
3484 implemention details with API function.
3485 (match_dll_by_basename): New function.
3486 (dll_is_loaded_by_basename): New function.
3487 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3488 details call to dll_is_loaded_by_basename.
3489
3490 2014-02-19 Doug Evans <dje@google.com>
3491
3492 * dll.h (struct dll_info): Add comment.
3493 * gdbthread.h (struct thread_info): Add comment.
3494 (current_ptid): Simplify.
3495 * inferiors.c (add_process): Update.
3496 (remove_process): Update.
3497 * inferiors.h (struct process_info): Rename member "head" to "entry".
3498 * linux-low.c (delete_lwp): Update.
3499 (add_lwp): Update.
3500 (last_thread_of_process_p): Update.
3501 (kill_one_lwp_callback, linux_kill): Update.
3502 (status_pending_p_callback): Update.
3503 (wait_for_sigstop): Update. Simplify read of ptid.
3504 (start_step_over): Update.
3505 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3506 (get_lwp_thread): Update.
3507 (struct lwp_info): Rename member "head" to "entry".
3508 * regcache.h (inferior_list_entry): Delete.
3509 * server.c (kill_inferior_callback): Update.
3510 (detach_or_kill_inferior_callback): Update.
3511 (print_started_pid): Update.
3512 (print_attached_pid): Update.
3513 (process_serial_event): Simplify read of ptid.
3514 * thread-db.c (thread_db_create_event): Update.
3515 (thread_db_get_tls_address): Update.
3516 * win32-low.c (current_inferior_ptid): Simplify.
3517
3518 2014-02-19 Tom Tromey <tromey@redhat.com>
3519
3520 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3521 argument.
3522 (target_supports_btrace): Update.
3523
3524 2014-02-14 Yao Qi <yao@codesourcery.com>
3525
3526 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3527 (rsp-low-ipa.o): New target.
3528
3529 2014-02-12 Tom Tromey <tromey@redhat.com>
3530
3531 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3532 convert_ascii_to_int.
3533 * regcache.c (registers_to_string): Likewise.
3534 * remote-utils.c (decode_M_packet): Likewise.
3535 * server.c (process_serial_event): Likewise.
3536
3537 2014-02-12 Tom Tromey <tromey@redhat.com>
3538
3539 * server.c (handle_query, handle_v_run): Use hex2bin, not
3540 unhexify.
3541 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3542
3543 2014-02-12 Tom Tromey <tromey@redhat.com>
3544
3545 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3546 convert_int_to_ascii.
3547 * regcache.c (registers_to_string, collect_register_as_string):
3548 Likewise.
3549 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3550 Likewise.
3551 * server.c (process_serial_event): Likewise.
3552 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3553 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3554
3555 2014-02-12 Tom Tromey <tromey@redhat.com>
3556
3557 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3558 bin2hex, not hexify.
3559 * tracepoint.c (cmd_qtstatus): Likewise.
3560
3561 2014-02-12 Tom Tromey <tromey@redhat.com>
3562
3563 * remote-utils.c (monitor_output): Pass explicit length to
3564 hexify.
3565
3566 2014-02-12 Tom Tromey <tromey@redhat.com>
3567
3568 * tracepoint.c: Include rsp-low.h.
3569 * server.c: Include rsp-low.h.
3570 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3571 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3572 declare.
3573 * remote-utils.c: Include rsp-low.h.
3574 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3575 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3576 (convert_int_to_ascii, convert_ascii_to_int): Move to
3577 common/rsp-low.c.
3578 * regcache.c: Include rsp-low.h.
3579 * ax.c: Include rsp-low.h.
3580 * Makefile.in (SFILES): Add common/rsp-low.c.
3581 (OBS): Add rsp-low.o.
3582 (rsp-low.o): New target.
3583
3584 2014-02-12 Tom Tromey <tromey@redhat.com>
3585
3586 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3587 Include print-utils.h.
3588 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3589 (plongest, thirty_two, phex_nz): Remove.
3590 * Makefile.in (SFILES): Add common/print-utils.c.
3591 (OBS): Add print-utils.o.
3592 (print-utils-ipa.o): New target.
3593 (print-utils.o): New target.
3594 (IPA_OBJS): Add print-utils-ipa.o.
3595
3596 2014-02-06 Tom Tromey <tromey@redhat.com>
3597
3598 * Makefile.in (SFILES): Fix indentation.
3599
3600 2014-02-05 Doug Evans <dje@google.com>
3601
3602 * linux-low.c (linux_wait_for_event): Improve comment.
3603 (linux_wait_1): Keep current_inferior in sync with event_child.
3604
3605 2014-01-22 Doug Evans <dje@google.com>
3606
3607 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3608
3609 2014-01-22 Doug Evans <dje@google.com>
3610
3611 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3612 * configure: Regenerate.
3613 * config.in: Regenerate.
3614 * Makefile.in (SFILES): Add debug.c.
3615 (OBS): Add debug.o.
3616 * debug.c: New file.
3617 * debug.h: New file.
3618 * linux-aarch64-low.c (*): Update all debugging printfs to use
3619 debug_printf instead of fprintf.
3620 * linux-arm-low.c (*): Ditto.
3621 * linux-cris-low.c (*): Ditto.
3622 * linux-crisv32-low.c (*): Ditto.
3623 * linux-m32r-low.c (*): Ditto.
3624 * linux-sparc-low.c (*): Ditto.
3625 * linux-x86.c (*): Ditto.
3626 * linux-low.c (*): Ditto.
3627 (linux_wait_1): Add calls to debug_enter, debug_exit.
3628 (linux_wait): Remove redundant debugging printf.
3629 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3630 (linux_resume, unstop_all_lwps): Ditto.
3631 * mem-break.c (*): Update all debugging printfs to use
3632 debug_printf instead of fprintf.
3633 * remote-utils.c (*): Ditto.
3634 * thread-db.c (*): Ditto.
3635 * server.c #include <ctype.h>, "gdb_vecs.h".
3636 (debug_threads): Moved to debug.c.
3637 (*): Update all debugging printfs to use debug_printf instead of
3638 fprintf.
3639 (start_inferior): Replace call to fflush with call to debug_flush.
3640 (monitor_show_help): Mention set debug-format.
3641 (parse_debug_format_options): New function.
3642 (handle_monitor_command): Handle "monitor set debug-format".
3643 (gdbserver_usage): Mention --debug-format.
3644 (main): Parse --debug-format.
3645 * server.h (debug_threads): Declaration moved to debug.h.
3646 #include "debug.h".
3647 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3648 trace_debug_1 that uses debug_printf.
3649 (tracepoint_look_up_symbols): Update all debugging printfs to use
3650 debug_printf instead of fprintf.
3651
3652 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3653
3654 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3655 sys/ptrace.h.
3656
3657 2014-01-17 Pedro Alves <palves@redhat.com>
3658
3659 PR build/16445
3660 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3661 defined after including gdb_proc_service.h.
3662
3663 2014-01-16 Doug Evans <dje@google.com>
3664
3665 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3666 (match_dll): Use it.
3667
3668 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3669
3670 * target.h (target_ops) <read_btrace>: Change parameters and
3671 return type to allow error reporting.
3672 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3673 trace reading errors on.
3674 * linux-low.c (linux_low_read_btrace): Pass trace reading
3675 errors on.
3676 (linux_low_disable_btrace): New.
3677
3678 2014-01-15 Doug Evans <dje@google.com>
3679
3680 * inferiors.c (thread_id_to_gdb_id): Delete.
3681 * inferiors.h (thread_id_to_gdb_id): Delete.
3682
3683 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3684
3685 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3686 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3687 versions.
3688
3689 2014-01-08 Pedro Alves <palves@redhat.com>
3690
3691 * server.c (handle_status): Don't discard previous queued stop
3692 replies or thread's pending status here.
3693 (main) <disconnection>: Do it here instead.
3694
3695 2014-01-08 Pedro Alves <palves@redhat.com>
3696
3697 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3698 * server.c (visit_actioned_threads, handle_pending_status): New
3699 function.
3700 (handle_v_cont): Factor out parts to ...
3701 (resume): ... this new function. If in all-stop, and a thread
3702 being resumed has a pending status, report it without actually
3703 resuming.
3704 (myresume): Adjust to use the new 'resume' function.
3705 (clear_pending_status_callback, set_pending_status_callback)
3706 (find_status_pending_thread_callback): New functions.
3707 (handle_status): Handle the case of multiple threads having
3708 interesting statuses to report. Report threads' real last signal
3709 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3710 with an interesting thread to report the status for, instead of
3711 always reporting the status of the first thread.
3712
3713 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3714
3715 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3716 * gdbreplay.c (gdbreplay_version): Likewise.
3717
3718 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3719
3720 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3721 iov.iov_len with the real length in use.
3722
3723 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3724
3725 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3726 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3727 for all targets that use win32-low.c.
3728 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3729 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3730
3731 2013-12-13 Pedro Alves <palves@redhat.com>
3732
3733 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3734 if equal to TARGET_WAITKIND_LOADED.
3735 * win32-low.c (cached_status): New static global.
3736 (win32_wait): Add declaration.
3737 (do_initial_child_stuff): Flush all initial pending debug events
3738 up to the initial breakpoint.
3739 (win32_wait): If CACHED_STATUS was set, return that instead
3740 of doing a real wait. Remove the code resuming the execution
3741 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3742 during the initial phase. Also remove the code changing
3743 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3744 TARGET_WAITKIND_STOPPED.
3745
3746 2013-12-11 Yao Qi <yao@codesourcery.com>
3747
3748 * notif.c (handle_notif_ack): Return 0 if no notification
3749 matches.
3750
3751 2013-11-20 Doug Evans <dje@google.com>
3752
3753 * linux-low.c (linux_set_resume_request): Fix comment.
3754
3755 2013-11-20 Doug Evans <dje@google.com>
3756
3757 * linux-low.c (resume_status_pending_p): Tweak comment.
3758
3759 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3760
3761 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3762 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3763 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3764 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3765 (srv_amd64_regobj): Add amd64-mpx.o.
3766 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3767 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3768 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3769 * i387-fp.c (num_pl_bnd_register) Added constant.
3770 (num_pl_bnd_cfg_registers) Added constant.
3771 (struct i387_xsave) Added reserved area and MPX fields.
3772 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3773 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3774 function.
3775 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3776 (init_registers_amd64_mpx_linux): Declare new function.
3777 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3778 (x86_64_regmap): Add MPX registers.
3779 (x86_linux_read_description): Add MPX case.
3780 (initialize_low_arch): Initialize MPX targets.
3781
3782 2013-11-18 Tom Tromey <tromey@redhat.com>
3783
3784 * configure: Rebuild.
3785 * configure.ac: Don't check for stdlib.h.
3786 * gdbreplay.c: Unconditionally include stdlib.h.
3787
3788 2013-11-18 Tom Tromey <tromey@redhat.com>
3789
3790 * config.in: Rebuild.
3791 * configure: Rebuild.
3792 * configure.ac: Don't use AC_HEADER_DIRENT.
3793
3794 2013-11-18 Tom Tromey <tromey@redhat.com>
3795
3796 * server.h: Don't check HAVE_STRING_H.
3797 * gdbreplay.c: Don't check HAVE_STRING_H.
3798 * configure: Rebuild.
3799
3800 2013-11-18 Tom Tromey <tromey@redhat.com>
3801
3802 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3803 LIBGNU.
3804
3805 2013-11-08 Tom Tromey <tromey@redhat.com>
3806
3807 * configure, config.in: Rebuild.
3808 * configure.ac: Remove unused configury.
3809
3810 2013-11-08 Tom Tromey <tromey@redhat.com>
3811
3812 * acinclude.m4: Include common.m4, codeset.m4.
3813 * configure, config.in: Rebuild.
3814 * configure.ac: Use GDB_AC_COMMON.
3815
3816 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3817
3818 * linux-s390-low.c (HWCAP_S390_TE): New define.
3819 (s390_arch_setup): Consider the TE field in the HWCAP for
3820 determining 'have_regset_tdb'.
3821
3822 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3823
3824 PR gdb/16014
3825 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3826 call to sizeof.
3827
3828 2013-10-02 Pedro Alves <palves@redhat.com>
3829
3830 * server.c (process_serial_event): Don't output "GDBserver
3831 exiting" if GDB is connected through stdio.
3832 * target.c (mywait): Likewise, be silent if GDB is connected
3833 through stdio.
3834
3835 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3836
3837 * lynx-low.c (lynx_add_threads_after_attach): New function.
3838 (lynx_attach): Remove call to add_thread. Add call to
3839 lynx_add_threads_after_attach instead.
3840
3841 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3842
3843 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3844 * config.in, configure: Regenerated.
3845
3846 2013-09-18 Yao Qi <yao@codesourcery.com>
3847
3848 PR server/15959
3849 * server.c (start_inferior): Clear 'resume_info'.
3850
3851 2013-09-16 Jiong Wang <jiwang@tilera.com>
3852
3853 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3854 for each register.
3855
3856 2013-09-16 Jiong Wang <jiwang@tilera.com>
3857
3858 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3859 linux-tile-low.o to srv_tgtobj.
3860
3861 2013-09-16 Will Newton <will.newton@linaro.org>
3862
3863 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3864 out regs.
3865
3866 2013-09-06 Pedro Alves <palves@redhat.com>
3867
3868 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3869 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3870 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3871 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3872 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3873 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3874
3875 2013-09-06 Pedro Alves <palves@redhat.com>
3876
3877 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3878 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3879
3880 2013-09-06 Pedro Alves <palves@redhat.com>
3881
3882 * linux-amd64-ipa.c: Include tracepoint.h.
3883 * linux-i386-ipa.c: Include tracepoint.h.
3884
3885 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3886
3887 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3888 (ps_get_thread_area): New function.
3889
3890 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3891
3892 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3893 (initialize_low_arch): Call init_registers_crisv32 rather than
3894 init_register_crisv32.
3895
3896 2013-09-05 Pedro Alves <palves@redhat.com>
3897
3898 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3899 to ...
3900 * hostio.h: ... this new file.
3901 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3902 win32-low.c: Include hostio.h.
3903
3904 2013-09-05 Pedro Alves <palves@redhat.com>
3905
3906 * server.h (gdb_client_data, handler_func, callback_handler_func)
3907 (delete_file_handler, add_file_handler, append_callback_event)
3908 (delete_callback_event, start_event_loop, initialize_event_loop):
3909 Move to event-loop.h and include it.
3910 * event-loop.h: New file.
3911
3912 2013-09-05 Pedro Alves <palves@redhat.com>
3913
3914 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3915 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3916 (loaded_dll, unloaded_dll): Move to ...
3917 * dll.h: ... this new file.
3918 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3919
3920 2013-09-05 Pedro Alves <palves@redhat.com>
3921
3922 * server.h (current_process, get_thread_process, all_processes)
3923 (add_inferior_to_list, for_each_inferior, current_inferior)
3924 (remove_inferior, add_process, remove_process, find_process_pid)
3925 (have_started_inferiors_p, have_attached_inferiors_p)
3926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3927 (clear_inferiors, find_inferior, find_inferior_id)
3928 (inferior_target_data, set_inferior_target_data)
3929 (inferior_regcache_data, set_inferior_regcache_data): Move to
3930 inferiors.h, and include it.
3931 * inferiors.h: New file.
3932
3933 2013-09-05 Pedro Alves <palves@redhat.com>
3934
3935 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3936 Move ...
3937 * ax.h: ... here.
3938
3939 2013-09-05 Pedro Alves <palves@redhat.com>
3940
3941 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3942 tracepoint.h.
3943 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3944 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3945 (handle_tracepoint_general_set, handle_tracepoint_query)
3946 (tracepoint_finished_step, tracepoint_was_hit)
3947 (release_while_stepping_state_list, current_traceframe)
3948 (in_readonly_region, traceframe_read_mem)
3949 (fetch_traceframe_registers, traceframe_read_sdata)
3950 (traceframe_read_info, struct fast_tpoint_collect_status)
3951 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3952 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3953 (supply_fast_tracepoint_registers)
3954 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3955 (ipa_tdesc, claim_trampoline_space)
3956 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3957 (agent_mem_read, agent_get_trace_state_variable_value)
3958 (agent_set_trace_state_variable_value, agent_tsv_read)
3959 (agent_mem_read_string, get_raw_reg_func_addr)
3960 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3961 * tracepoint.h: ... this new file.
3962
3963 2013-09-05 Pedro Alves <palves@redhat.com>
3964
3965 * server.h (perror_with_name, error, fatal, warning, paddress)
3966 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3967 include it.
3968 * utils.h: New file.
3969
3970 2013-09-05 Pedro Alves <palves@redhat.com>
3971
3972 * server.h (remote_debug, noack_mode, transport_is_reliable)
3973 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3974 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3975 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3976 (write_enn, initialize_async_io, enable_async_io)
3977 (disable_async_io, check_remote_input_interrupt_request)
3978 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3979 (dead_thread_notify, prepare_resume_reply)
3980 (decode_address_to_semicolon, decode_address, decode_m_packet)
3981 (decode_M_packet, decode_X_packet, decode_xfer_write)
3982 (decode_search_memory_packet, unhexify, hexify)
3983 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3984 (look_up_one_symbol, relocate_instruction)
3985 (monitor_output): Move to remote-utils.h, and include it.
3986 * remote-utils.h: New file.
3987
3988 2013-09-05 Pedro Alves <palves@redhat.com>
3989
3990 * server.h (_): Delete.
3991
3992 2013-09-02 Pedro Alves <palves@redhat.com>
3993
3994 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3995 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3996 allocated.
3997 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3998
3999 2013-09-02 Pierre Muller <muller@sourceware.org>
4000
4001 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4002 or WriteProcessMemory complete successfully and handle
4003 ERROR_PARTIAL_COPY error.
4004
4005 2013-09-02 Pedro Alves <palves@redhat.com>
4006
4007 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4008 error instead of EIO.
4009
4010 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4011
4012 PR server/15604
4013 * linux-low.c: Include filestuff.h.
4014 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4015 * lynx-low.c: Include filestuff.h.
4016 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4017 * server.c: Include filestuff.h.
4018 (main): Call notice_open_fds.
4019 * spu-low.c: Include filestuff.h.
4020 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4021
4022 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4023
4024 * Makefile.in: Explain why ../target and ../nat are not
4025 listed as include file search paths.
4026 (linux-waitpid.o): New object file rule.
4027 * configure.srv (srv_native_linux_obj): New variable.
4028 Replace all occurrences of linux native object files with
4029 $srv_native_linux_obj.
4030 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4031 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4032 (linux_enable_event_reporting): Remove declaration.
4033 (my_waitpid): Moved to common/linux-waitpid.c.
4034 (linux_wait_for_event): Pass ptid when calling
4035 linux_enable_event_reporting.
4036 (linux_supports_tracefork_flag): Remove.
4037 (linux_enable_event_reporting): Likewise.
4038 (linux_tracefork_grandchild): Remove.
4039 (STACK_SIZE): Moved to common/linux-ptrace.c.
4040 (linux_tracefork_child): Remove.
4041 (linux_test_for_tracefork): Remove.
4042 (linux_look_up_symbols): Call linux_supports_traceclone.
4043 (initialize_low): Remove call to linux_test_for_tracefork.
4044 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4045 common/linux-ptrace.h.
4046 (PTRACE_TYPE_ARG4): Likewise.
4047 Include linux-ptrace.h.
4048
4049 2013-08-21 Pedro Alves <palves@redhat.com>
4050
4051 * config.in: Renegerate.
4052
4053 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4054
4055 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4056 (SFILES): Remove $(srcdir)/common/target-common.c and
4057 add $(srcdir)/target/waitstatus.c.
4058 (OBS): Remove target-common.o and add waitstatus.o.
4059 (server_h): Remove $(srcdir)/../common/target-common.h and
4060 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4061 and $(srcdir)/../target/waitstatus.h.
4062 (target-common.o): Remove.
4063 (waitstatus.o): New target object file.
4064 * target.h: Do not include target-common.h and
4065 include target/resume.h, target/wait.h and
4066 target/waitstatus.h.
4067
4068 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4069
4070 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4071 to PTRACE_TYPE_ARG3.
4072 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4073 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4074 PTRACE_TYPE_ARG4.
4075 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4076 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4077
4078 2013-07-27 Jie Zhang <jie@codesourcery.com>
4079 Daniel Jacobowitz <dan@codesourcery.com>
4080 Yao Qi <yao@codesourcery.com>
4081
4082 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4083 (mips-linux-watch.o): New rule.
4084 (mips_linux_watch_h): New variable.
4085 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4086 srv_tgtobj.
4087 * linux-mips-low.c: Include mips-linux-watch.h.
4088 (struct arch_process_info, struct arch_lwp_info): New.
4089 (update_watch_registers_callback): New function.
4090 (mips_linux_new_process, mips_linux_new_thread) New functions.
4091 (mips_linux_prepare_to_resume, mips_insert_point): New
4092 functions.
4093 (mips_remove_point, mips_stopped_by_watchpoint): New
4094 functions.
4095 (rsp_bp_type_to_target_hw_bp_type): New function.
4096 (mips_stopped_data_address): New function.
4097 (the_low_target): Add watchpoint support functions.
4098
4099 2013-07-27 Yao Qi <yao@codesourcery.com>
4100
4101 * i386-low.c: Include break-common.h.
4102 (enum target_hw_bp_type): Remove.
4103
4104 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4105
4106 * Makefile.in (SFILES): /common/target-common.c.
4107 (OBS): Add target-common.o.
4108 (server_h): Add $(srcdir)/../common/target-common.h.
4109 (target-common.o): New target.
4110 * server.c (queue_stop_reply_callback): Free
4111 status string after use.
4112 * target.c (target_waitstatus_to_string): Remove.
4113 * target.h: Include target-common.h.
4114 (resume_kind): Likewise.
4115 (target_waitkind): Likewise.
4116 (target_waitstatus): Likewise.
4117 (TARGET_WNOHANG): Likewise.
4118
4119 2013-07-04 Yao Qi <yao@codesourcery.com>
4120
4121 * Makefile.in (host_alias): Use @host_noncanonical@.
4122 (target_alias): Use @target_noncanonical@.
4123 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4124 ACX_NONCANONICAL_HOST.
4125 * configure: Regenerated.
4126
4127 Revert:
4128 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4129
4130 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4131 * configure: Rebuild.
4132 * Makefile.in (version_host, version_target): Get from configure.
4133 (version.c): Use $(version_host) and $(version_target).
4134
4135 2013-07-03 Pedro Alves <palves@redhat.com>
4136
4137 * Makefile.in (config.status): Depend on development.sh.
4138 * acinclude.m4: Include libmcheck.m4.
4139 * configure: Regenerate.
4140
4141 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4142
4143 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4144 attribute inside the parentheses.
4145 (winapi_DebugSetProcessKillOnExit): Ditto.
4146 (winapi_DebugBreakProcess): Ditto.
4147 (winapi_GenerateConsoleCtrlEvent): Ditto.
4148
4149 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4150
4151 * notif.h (notif_event): Add a dummy member to avoid compiler
4152 errors.
4153
4154 2013-07-01 Pedro Alves <palves@redhat.com>
4155
4156 * hostio.c (HOSTIO_PATH_MAX): Define.
4157 (require_filename, handle_open, handle_unlink, handle_readlink):
4158 Use it.
4159
4160 2013-07-01 Pedro Alves <palves@redhat.com>
4161
4162 * server.h: Include "pathmax.h".
4163 * linux-low.c: Don't include sys/param.h.
4164 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4165 MAXPATHLEN.
4166 * win32-low.c: Don't include sys/param.h.
4167 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4168
4169 2013-07-01 Pedro Alves <palves@redhat.com>
4170
4171 * event-loop.c: Don't check HAVE_UNISTD_H before including
4172 <unistd.h>.
4173 * gdbreplay.c: Likewise.
4174 * remote-utils.c: Likewise.
4175 * server.c: Likewise.
4176 * configure.ac: Don't check for unistd.h.
4177 * configure: Regenerate.
4178
4179 2013-06-28 Tom Tromey <tromey@redhat.com>
4180
4181 * Makefile.in (version.c): Use version.in, not
4182 common/version.in.
4183
4184 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4185
4186 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4187 * configure: Rebuild.
4188 * Makefile.in (version_host, version_target): Get from configure.
4189 (version.c): Use $(version_host) and $(version_target).
4190
4191 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4192
4193 Fix trace-status to output user name without trailing colon.
4194 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4195
4196 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4197
4198 Fix trace-status to output proper start-time and stop-time.
4199 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4200 output start time and stop time in hex as gdb expects.
4201
4202 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4203
4204 * tracepoint.c (build_traceframe_info_xml): Output trace state
4205 variables present in the trace buffer.
4206
4207 2013-06-24 Tom Tromey <tromey@redhat.com>
4208
4209 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4210 create-version.sh.
4211 (version.o): Remove.
4212 * gdbreplay.c: Include version.h.
4213 (version, host_name): Don't declare.
4214 * server.h: Include version.h.
4215 (version, host_name): Don't declare.
4216
4217 2013-06-12 Pedro Alves <palves@redhat.com>
4218
4219 * linux-x86-low.c (linux_is_elf64): Delete global.
4220 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4221 with local linux_pid_exe_is_elf_64_file use.
4222
4223 2013-06-11 Pedro Alves <palves@redhat.com>
4224
4225 * linux-low.c (regset_disabled, disable_regset): New functions.
4226 (regsets_fetch_inferior_registers)
4227 (regsets_store_inferior_registers): Use them.
4228 (initialize_regsets_info); Don't allocate the disabled_regsets
4229 array here.
4230 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4231 comment.
4232
4233 2013-06-11 Pedro Alves <palves@redhat.com>
4234
4235 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4236 xmalloc.
4237
4238 2013-06-11 Pedro Alves <palves@redhat.com>
4239
4240 * linux-x86-low.c (initialize_low_arch): Call
4241 init_registers_x32_avx_linux.
4242
4243 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4244
4245 Fix compatibility with Android Bionic.
4246 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4247 it is not empty.
4248
4249 2013-06-07 Pedro Alves <palves@redhat.com>
4250
4251 PR server/14823
4252 * Makefile.in (OBS): Add tdesc.o.
4253 (IPA_OBJS): Add tdesc-ipa.o.
4254 (tdesc-ipa.o): New rule.
4255 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4256 interface.
4257 * linux-low.c (new_inferior): Delete.
4258 (disabled_regsets, num_regsets): Delete.
4259 (linux_add_process): Adjust to set the new per-process
4260 new_inferior flag.
4261 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4262 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4263 was a stop. When calling arch_setup, switch the current inferior
4264 to the thread that got an event.
4265 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4266 (regsets_fetch_inferior_registers)
4267 (regsets_store_inferior_registers): New regsets_info parameter.
4268 Adjust to use it.
4269 (linux_register_in_regsets): New regs_info parameter. Adjust to
4270 use it.
4271 (register_addr, fetch_register, store_register): New usrregs_info
4272 parameter. Adjust to use it.
4273 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4274 parameter regs_info. Adjust to use it.
4275 (linux_fetch_registers): Get the current inferior's regs_info, and
4276 adjust to use it.
4277 (linux_store_registers): Ditto.
4278 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4279 (initialize_low): Don't initialize the target_regsets here. Call
4280 initialize_low_arch.
4281 * linux-low.h (target_regsets): Delete declaration.
4282 (struct regsets_info): New.
4283 (struct usrregs_info): New.
4284 (struct regs_info): New.
4285 (struct process_info_private) <new_inferior>: New field.
4286 (struct linux_target_ops): Delete the num_regs, regmap, and
4287 regset_bitmap fields. New field regs_info.
4288 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4289 * i387-fp.c (num_xmm_registers): Delete.
4290 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4291 calls to new interface.
4292 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4293 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4294 Infer the number of xmm registers from the regcache's target
4295 description.
4296 * i387-fp.h (num_xmm_registers): Delete.
4297 * inferiors.c (add_thread): Don't install the thread's regcache
4298 here.
4299 * proc-service.c (gregset_info): Fetch the current inferior's
4300 regs_info. Adjust to use it.
4301 * regcache.c: Include tdesc.h.
4302 (register_bytes, reg_defs, num_registers)
4303 (gdbserver_expedite_regs): Delete.
4304 (get_thread_regcache): If the thread doesn't have a regcache yet,
4305 create one, instead of aborting gdbserver.
4306 (regcache_invalidate_one): Rename to ...
4307 (regcache_invalidate_thread): ... this.
4308 (regcache_invalidate_one): New.
4309 (regcache_invalidate): Only invalidate registers of the current
4310 process.
4311 (init_register_cache): Add target_desc parameter, and use it.
4312 (new_register_cache): Ditto. Assert the target description has a
4313 non zero registers_size.
4314 (regcache_cpy): Add assertions. Adjust.
4315 (realloc_register_cache, set_register_cache): Delete.
4316 (registers_to_string, registers_from_string): Adjust.
4317 (find_register_by_name, find_regno, find_register_by_number)
4318 (register_cache_size): Add target_desc parameter, and use it.
4319 (free_register_cache_thread, free_register_cache_thread_one)
4320 (regcache_release, register_cache_size): New.
4321 (register_size): Add target_desc parameter, and use it.
4322 (register_data, supply_register, supply_register_zeroed)
4323 (supply_regblock, supply_register_by_name, collect_register)
4324 (collect_register_as_string, collect_register_by_name): Adjust.
4325 * regcache.h (struct target_desc): Forward declare.
4326 (struct regcache) <tdesc>: New field.
4327 (init_register_cache, new_register_cache): Add target_desc
4328 parameter.
4329 (regcache_invalidate_thread): Declare.
4330 (regcache_invalidate_one): Delete declaration.
4331 (regcache_release): Declare.
4332 (find_register_by_number, register_cache_size, register_size)
4333 (find_regno): Add target_desc parameter.
4334 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4335 declarations.
4336 * remote-utils.c: Include tdesc.h.
4337 (outreg, prepare_resume_reply): Adjust.
4338 * server.c: Include tdesc.h.
4339 (gdbserver_xmltarget): Delete declaration.
4340 (get_features_xml, process_serial_event): Adjust.
4341 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4342 declare.
4343 (struct process_info) <tdesc>: New field.
4344 (ipa_tdesc): Declare.
4345 * tdesc.c: New file.
4346 * tdesc.h: New file.
4347 * tracepoint.c: Include tdesc.h.
4348 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4349 (get_context_regcache): Adjust to pass ipa_tdesc down.
4350 (do_action_at_tracepoint): Adjust to get the register cache size
4351 from the context regcache's description.
4352 (traceframe_walk_blocks): Adjust to get the register cache size
4353 from the current trace frame's description.
4354 (traceframe_get_pc): Adjust to get current trace frame's
4355 description and pass it down.
4356 (gdb_collect): Adjust to get the register cache size from the
4357 IPA's description.
4358 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4359 (gdbserver_xmltarget): Delete.
4360 (initialize_low_tracepoint): Set the ipa's target description.
4361 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4362 (initialize_low_tracepoint): Set the ipa's target description.
4363 * linux-x86-low.c: Include tdesc.h.
4364 [__x86_64__] (is_64bit_tdesc): New.
4365 (ps_get_thread_area, x86_get_thread_area): Use it.
4366 (i386_cannot_store_register): Rename to ...
4367 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4368 (i386_cannot_fetch_register): Rename to ...
4369 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4370 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4371 to new interface.
4372 (target_regsets): Rename to ...
4373 (x86_regsets): ... this.
4374 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4375 interface.
4376 (x86_siginfo_fixup): Use is_64bit_tdesc.
4377 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4378 (tdesc_x32_avx_linux, tdesc_x32_linux)
4379 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4380 Declare.
4381 (x86_linux_update_xmltarget): Delete.
4382 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4383 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4384 (AMD64_LINUX_USER64_CS): New.
4385 (x86_linux_read_description): New, based on
4386 x86_linux_update_xmltarget.
4387 (same_process_callback): New.
4388 (x86_arch_setup_process_callback): New.
4389 (x86_linux_update_xmltarget): New.
4390 (x86_regsets_info): New.
4391 (amd64_linux_regs_info): New.
4392 (i386_linux_usrregs_info): New.
4393 (i386_linux_regs_info): New.
4394 (x86_linux_regs_info): New.
4395 (x86_arch_setup): Reimplement.
4396 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4397 (x86_emit_ops): Ditto.
4398 (the_low_target): Adjust. Install x86_linux_regs_info,
4399 x86_cannot_fetch_register, and x86_cannot_store_register.
4400 (initialize_low_arch): New.
4401 * linux-ia64-low.c (tdesc_ia64): Declare.
4402 (ia64_fetch_register): Adjust.
4403 (ia64_usrregs_info, regs_info): New globals.
4404 (ia64_regs_info): New function.
4405 (the_low_target): Adjust.
4406 (initialize_low_arch): New function.
4407 * linux-sparc-low.c (tdesc_sparc64): Declare.
4408 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4409 Adjust.
4410 (sparc_arch_setup): New function.
4411 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4412 (the_low_target): Adjust.
4413 (initialize_low_arch): New function.
4414 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4415 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4416 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4417 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4418 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4419 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4420 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4421 (tdesc_powerpc_isa205_vsx64l): Declare.
4422 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4423 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4424 (ppc_set_pc, ppc_get_hwcap): Adjust.
4425 (ppc_usrregs_info): Forward declare.
4426 (!__powerpc64__) ppc_regmap_adjusted: New global.
4427 (ppc_arch_setup): Adjust to the current process'es target
4428 description.
4429 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4430 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4431 (ppc_store_evrregset): Adjust.
4432 (target_regsets): Rename to ...
4433 (ppc_regsets): ... this, and make static.
4434 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4435 (ppc_regs_info): New function.
4436 (the_low_target): Adjust.
4437 (initialize_low_arch): New function.
4438 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4439 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4440 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4441 (tdesc_s390x_linux64v2): Declare.
4442 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4443 (s390_fill_gregset, s390_store_last_break): Adjust.
4444 (target_regsets): Rename to ...
4445 (s390_regsets): ... this, and make static.
4446 (s390_get_pc, s390_set_pc): Adjust.
4447 (s390_get_hwcap): New target_desc parameter, and use it.
4448 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4449 (s390_arch_setup): Adjust to set the current process'es target
4450 description. Don't adjust the regmap.
4451 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4452 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4453 (regs_info_3264): New globals.
4454 (s390_regs_info): New function.
4455 (the_low_target): Adjust.
4456 (initialize_low_arch): New function.
4457 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4458 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4459 [__mips64] (init_registers_mips_linux)
4460 (init_registers_mips_dsp_linux): Delete defines.
4461 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4462 (have_dsp): New global.
4463 (mips_read_description): New, based on mips_arch_setup.
4464 (mips_arch_setup): Reimplement.
4465 (get_usrregs_info): New function.
4466 (mips_cannot_fetch_register, mips_cannot_store_register)
4467 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4468 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4469 (target_regsets): Rename to ...
4470 (mips_regsets): ... this, and make static.
4471 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4472 (dsp_regs_info, regs_info): New globals.
4473 (mips_regs_info): New function.
4474 (the_low_target): Adjust.
4475 (initialize_low_arch): New function.
4476 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4477 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4478 Declare.
4479 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4480 (arm_read_description): New, with bits factored from
4481 arm_arch_setup.
4482 (arm_arch_setup): Reimplement.
4483 (target_regsets): Rename to ...
4484 (arm_regsets): ... this, and make static.
4485 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4486 (arm_regs_info): New function.
4487 (the_low_target): Adjust.
4488 (initialize_low_arch): New function.
4489 * linux-m68k-low.c (tdesc_m68k): Declare.
4490 (target_regsets): Rename to ...
4491 (m68k_regsets): ... this, and make static.
4492 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4493 (m68k_regs_info): New function.
4494 (m68k_arch_setup): New function.
4495 (the_low_target): Adjust.
4496 (initialize_low_arch): New function.
4497 * linux-sh-low.c (tdesc_sharch): Declare.
4498 (target_regsets): Rename to ...
4499 (sh_regsets): ... this, and make static.
4500 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4501 (sh_regs_info, sh_arch_setup): New functions.
4502 (the_low_target): Adjust.
4503 (initialize_low_arch): New function.
4504 * linux-bfin-low.c (tdesc_bfin): Declare.
4505 (bfin_arch_setup): New function.
4506 (bfin_usrregs_info, regs_info): New globals.
4507 (bfin_regs_info): New function.
4508 (the_low_target): Adjust.
4509 (initialize_low_arch): New function.
4510 * linux-cris-low.c (tdesc_cris): Declare.
4511 (cris_arch_setup): New function.
4512 (cris_usrregs_info, regs_info): New globals.
4513 (cris_regs_info): New function.
4514 (the_low_target): Adjust.
4515 (initialize_low_arch): New function.
4516 * linux-cris-low.c (tdesc_crisv32): Declare.
4517 (cris_arch_setup): New function.
4518 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4519 (cris_regs_info): New function.
4520 (the_low_target): Adjust.
4521 (initialize_low_arch): New function.
4522 * linux-m32r-low.c (tdesc_m32r): Declare.
4523 (m32r_arch_setup): New function.
4524 (m32r_usrregs_info, regs_info): New globals.
4525 (m32r_regs_info): Adjust.
4526 (initialize_low_arch): New function.
4527 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4528 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4529 (tic6x_usrregs_info): Forward declare.
4530 (tic6x_read_description): New function, based on ...
4531 (tic6x_arch_setup): ... this. Reimplement.
4532 (target_regsets): Rename to ...
4533 (tic6x_regsets): ... this, and make static.
4534 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4535 (tic6x_regs_info): New function.
4536 (the_low_target): Adjust.
4537 (initialize_low_arch): New function.
4538 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4539 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4540 (target_regsets): Rename to ...
4541 (xtensa_regsets): ... this, and make static.
4542 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4543 globals.
4544 (xtensa_arch_setup, xtensa_regs_info): New functions.
4545 (the_low_target): Adjust.
4546 (initialize_low_arch): New function.
4547 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4548 (nios2_arch_setup): Set the current process'es tdesc.
4549 (target_regsets): Rename to ...
4550 (nios2_regsets): ... this.
4551 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4552 (nios2_regs_info): New function.
4553 (the_low_target): Adjust.
4554 (initialize_low_arch): New function.
4555 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4556 (aarch64_arch_setup): Set the current process'es tdesc.
4557 (target_regsets): Rename to ...
4558 (aarch64_regsets): ... this.
4559 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4560 (aarch64_regs_info): New function.
4561 (the_low_target): Adjust.
4562 (initialize_low_arch): New function.
4563 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4564 globals.
4565 (target_regsets): Rename to ...
4566 (tile_regsets): ... this.
4567 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4568 (tile_regs_info): New function.
4569 (tile_arch_setup): Set the current process'es tdesc.
4570 (the_low_target): Adjust.
4571 (initialize_low_arch): New function.
4572 * spu-low.c (tdesc_spu): Declare.
4573 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4574 * win32-arm-low.c (tdesc_arm): Declare.
4575 (arm_arch_setup): New function.
4576 (the_low_target): Install arm_arch_setup instead of
4577 init_registers_arm.
4578 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4579 (init_windows_x86): Rename to ...
4580 (i386_arch_setup): ... this. Set `win32_tdesc'.
4581 (the_low_target): Adjust.
4582 * win32-low.c (win32_tdesc): New global.
4583 (child_add_thread): Don't create the thread cache here.
4584 (do_initial_child_stuff): Set the new process'es tdesc.
4585 * win32-low.h (struct target_desc): Forward declare.
4586 (win32_tdesc): Declare.
4587 * lynx-i386-low.c (tdesc_i386): Declare global.
4588 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4589 * lynx-low.c (lynx_tdesc): New global.
4590 (lynx_add_process): Set the new process'es tdesc.
4591 * lynx-low.h (struct target_desc): Forward declare.
4592 (lynx_tdesc): Declare global.
4593 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4594 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4595 * nto-low.c (nto_tdesc): New global.
4596 (do_attach): Set the new process'es tdesc.
4597 * nto-low.h (struct target_desc): Forward declare.
4598 (nto_tdesc): Declare.
4599 * nto-x86-low.c (tdesc_i386): Declare.
4600 (nto_x86_arch_setup): Set `nto_tdesc'.
4601
4602 2013-06-04 Gary Benson <gbenson@redhat.com>
4603
4604 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4605 to qSupported response when appropriate.
4606 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4607 with nonzero-length annex.
4608 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4609 arguments supplied in annex.
4610
4611 2013-05-31 Doug Evans <dje@google.com>
4612
4613 PR server/15594
4614 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4615 64 bits in 64-cross-32 environment.
4616
4617 2013-05-28 Pedro Alves <palves@redhat.com>
4618
4619 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4620 (aarch64-without-fpu.c): Delete rule.
4621 * configure.srv (aarch64*-*-linux*): Remove references to
4622 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4623 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4624 declaration.
4625
4626 2013-05-24 Pedro Alves <palves@redhat.com>
4627
4628 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4629 instead of strchr/decode_address. Error if the range isn't split
4630 with a ','. Don't assume there's be a ':' in the action.
4631
4632 2013-05-23 Yao Qi <yao@codesourcery.com>
4633 Pedro Alves <palves@redhat.com>
4634
4635 * linux-low.c (lwp_in_step_range): New function.
4636 (linux_wait_1): If the thread was range stepping and stopped
4637 outside the stepping range, report the stop to GDB. Otherwise,
4638 continue stepping. Add range stepping debug output.
4639 (linux_set_resume_request): Copy the step range from the resume
4640 request to the lwp.
4641 (linux_supports_range_stepping): New.
4642 (linux_target_ops) <supports_range_stepping>: Set to
4643 linux_supports_range_stepping.
4644 * linux-low.h (struct linux_target_ops)
4645 <supports_range_stepping>: New field.
4646 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4647 * linux-x86-low.c (x86_supports_range_stepping): New.
4648 (the_low_target) <supports_range_stepping>: Set to
4649 x86_supports_range_stepping.
4650 * server.c (handle_v_cont): Handle 'r' action.
4651 (handle_v_requests): Append ";r" if the target supports range
4652 stepping.
4653 * target.h (struct thread_resume) <step_range_start,
4654 step_range_end>: New fields.
4655 (struct target_ops) <supports_range_stepping>:
4656 New field.
4657 (target_supports_range_stepping): New macro.
4658
4659 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4660
4661 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4662 confusion in comment.
4663
4664 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4665
4666 * lynx-low.c (struct process_info_private): New type.
4667 (lynx_add_process): New function.
4668 (lynx_create_inferior, lynx_attach): Replace calls to
4669 add_process by calls to lynx_add_process.
4670 (lynx_resume): If PTID is null, then try using
4671 current_process()->private->last_wait_event_ptid.
4672 Add comments.
4673 (lynx_clear_inferiors): Delete. The contents of that function
4674 has been inlined in lynx_mourn;
4675 (lynx_wait_1): Save the ptid in the process's private data.
4676 (lynx_mourn): Free the process' private data. Replace call
4677 to lynx_clear_inferiors by call to clear_inferiors.
4678
4679 2013-05-17 Yao Qi <yao@codesourcery.com>
4680
4681 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4682 the right place.
4683
4684 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4685
4686 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4687 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4688 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4689 PT_TEXT_END_ADDR guards. Update comments.
4690 (linux_target_op) <read_offsets>: Conditionally define to
4691 linux_read_offsets if the target is UCLIBC and if it defines
4692 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4693
4694 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4695 Andrew Jenner <andrew@codesourcery.com>
4696
4697 * Makefile.in (SFILES): Add linux-nios2-low.c.
4698 (clean): Add action to delete nios2-linux.c.
4699 (nios2-linux.c): New rule.
4700 * configure.srv: Add nios2*-*-linux*.
4701 * linux-nios2-low.c: New.
4702
4703 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4704
4705 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4706
4707 2013-04-25 Hui Zhu <hui@codesourcery.com>
4708
4709 PR gdb/15186
4710 * ax.c (ax_printf): Add fflush.
4711
4712 2013-04-22 Tom Tromey <tromey@redhat.com>
4713
4714 * Makefile.in (SFILES): Add filestuff.c.
4715 (OBS): Add filestuff.o.
4716 (filestuff.o): New target.
4717 * config.in, configure: Rebuild.
4718 * configure.ac: Check for fdwalk, pipe2.
4719
4720 2013-04-17 Pedro Alves <palves@redhat.com>
4721
4722 * configure.ac (USE_THREAD_DB): Delete variable.
4723 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4724 Don't AC_SUBST USE_THREAD_DB.
4725 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4726 * config.in, configure: Regenerate.
4727
4728 2013-04-16 Pedro Alves <palves@redhat.com>
4729
4730 * linux-low.h (struct lwp_info) <thread_known>: Move under
4731 the USE_THREAD_DB #ifdef.
4732
4733 2013-04-16 Pedro Alves <palves@redhat.com>
4734
4735 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4736 (linux-low.o): Delete rule.
4737 * linux-low.h: Always include "gdb_thread_db.h" instead of
4738 conditionally including thread_db.h.
4739 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4740 HAVE_THREAD_DB_H.
4741
4742 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4743
4744 * Makefile.in (install-only): Fix make install regression.
4745
4746 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4747
4748 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4749 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4750 installation.
4751 * gdbserver.1: Remove.
4752
4753 2013-03-22 Pedro Alves <palves@redhat.com>
4754
4755 * linux-low.c (handle_extended_wait): Don't call
4756 linux_enable_event_reporting.
4757
4758 2013-03-15 Tony Theodore <tonyt@logyst.com>
4759
4760 PR build/9098:
4761 * Makefile.in (SHELL): Use @SHELL@.
4762
4763 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4764
4765 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4766 compiler warning.
4767
4768 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4769
4770 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4771 Remove extraneous NULL element.
4772
4773 2013-03-13 Yao Qi <yao@codesourcery.com>
4774
4775 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4776 'V' block in trace frame.
4777
4778 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4779
4780 * target.h (struct target_ops): Add btrace ops.
4781 (target_supports_btrace): New macro.
4782 (target_enable_btrace): New macro.
4783 (target_disable_btrace): New macro.
4784 (target_read_btrace): New macro.
4785 * gdbthread.h (struct thread_info): Add btrace field.
4786 * server.c: Include btrace-common.h.
4787 (handle_btrace_general_set): New function.
4788 (handle_btrace_enable): New function.
4789 (handle_btrace_disable): New function.
4790 (handle_general_set): Call handle_btrace_general_set.
4791 (handle_qxfer_btrace): New function.
4792 (struct qxfer qxfer_packets[]): Add btrace entry.
4793 * inferiors.c (remove_thread): Disable btrace.
4794 * linux-low: Include linux-btrace.h.
4795 (linux_low_enable_btrace): New function.
4796 (linux_low_read_btrace): New function.
4797 (linux_target_ops): Add btrace ops.
4798 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4799 Add srv_linux_btrace=yes.
4800 (x86_64-*-linux*): Add linux-btrace.o.
4801 Add srv_linux_btrace=yes.
4802 * configure.ac: Define HAVE_LINUX_BTRACE.
4803 * config.in: Regenerated.
4804 * configure: Regenerated.
4805
4806 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4807
4808 * server.c (handle_qxfer): Preserve error message if -3 is
4809 returned.
4810 (qxfer): Document the -3 return value.
4811
4812 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4813
4814 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4815 (linux_btrace_h): New variable.
4816 (linux-btrace.o): New rule.
4817
4818 2013-03-08 Stan Shebs <stan@codesourcery.com>
4819 Hafiz Abid Qadeer <abidh@codesourcery.com>
4820
4821 * tracepoint.c (trace_buffer_size): New global.
4822 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4823 (init_trace_buffer): Change to one-argument function. Allocate
4824 trace buffer memory.
4825 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4826 handle QTBuffer:size packet.
4827 (cmd_bigqtbuffer_size): New function.
4828 (initialize_tracepoint): Call init_trace_buffer with
4829 DEFAULT_TRACE_BUFFER_SIZE.
4830 * server.c (handle_query): Add QTBuffer:size in the
4831 supported packets.
4832
4833 2013-03-07 Yao Qi <yao@codesourcery.com>
4834
4835 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4836 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4837 of -1.
4838 (cmd_qtsp): Adjust condition. Do post increment.
4839 Set cur_action and cur_step_action back to 0.
4840
4841 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4842
4843 PR server/15236
4844 * linux-low.c (linux_write_memory): Return early success if LEN is
4845 zero.
4846
4847 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4848
4849 * configure.srv: Add x86_64-*-cygwin* as target.
4850
4851 2013-02-28 Tom Tromey <tromey@redhat.com>
4852
4853 * configure.ac: Invoke AC_SYS_LARGEFILE.
4854 * configure, config.in: Rebuild.
4855
4856 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4857
4858 * win32-low.c: Throughout, fix format strings and casts of
4859 printf-like functions to avoid type related warnings on all
4860 platforms.
4861 (get_child_debug_event): Print dwDebugEventCode as hex since
4862 that's how it's usually documented.
4863
4864 2013-02-28 Yao Qi <yao@codesourcery.com>
4865
4866 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4867 pulongest.
4868
4869 2013-02-27 Jiong Wang <jiwang@tilera.com>
4870
4871 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4872 (reg-tilegx32.c): New rule.
4873 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4874 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4875 different register info initializer according to elf class.
4876 (init_registers_tilgx32): New function. The tilegx32 register info
4877 initializer.
4878 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4879 (tile_store_gregset): Likewise.
4880
4881 2013-02-27 Yao Qi <yao@codesourcery.com>
4882
4883 * server.c (process_point_options): Print debug message when
4884 debug_threads is true.
4885
4886 2013-02-26 Yao Qi <yao@codesourcery.com>
4887
4888 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4889
4890 2013-02-19 Pedro Alves <palves@redhat.com>
4891 Kai Tietz <ktietz@redhat.com>
4892
4893 PR gdb/15161
4894
4895 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4896 instead of strtoul to extract address from packet.
4897 (process_serial_event) <'z'>: Likewise.
4898
4899 2013-02-18 Yao Qi <yao@codesourcery.com>
4900
4901 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4902
4903 2013-02-14 Pedro Alves <palves@redhat.com>
4904
4905 Plug memory leak.
4906
4907 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4908 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4909
4910 2013-02-14 Pedro Alves <palves@redhat.com>
4911
4912 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4913
4914 2013-02-14 Pedro Alves <palves@redhat.com>
4915
4916 * tracepoint.c (save_string): Delete.
4917 (add_tracepoint_action): Use savestring instead of save_string.
4918
4919 2013-02-12 Pedro Alves <palves@redhat.com>
4920
4921 * linux-xtensa-low.c: Ditto.
4922 * xtensa-xtregs.c: Ditto.
4923
4924 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4925
4926 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4927 thread_db.
4928
4929 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4930
4931 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4932 aarch64_num_wp_regs and aarch64_num_bp_regs to
4933 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4934
4935 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4936
4937 * linux-aarch64-low.c (ps_get_thread_area): Replace
4938 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4939
4940 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4941 Marcus Shawcroft <marcus.shawcroft@arm.com>
4942 Nigel Stephens <nigel.stephens@arm.com>
4943 Yufeng Zhang <yufeng.zhang@arm.com>
4944
4945 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4946 (aarch64.c, aarch64-without-fpu.c): New targets.
4947 * configure.srv (aarch64*-*-linux*): New.
4948 * linux-aarch64-low.c: New file.
4949
4950 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4951
4952 * linux-low.c (handle_extended_wait, linux_create_inferior)
4953 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4954 (dequeue_one_deferred_signal, linux_resume_one_thread)
4955 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4956 (linux_tracefork_grandchild, linux_test_for_tracefork)
4957 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4958 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4959 where the argument is 0.
4960
4961 2013-01-25 Yao Qi <yao@codesourcery.com>
4962
4963 * event-loop.c: Include "queue.h".
4964 (gdb_event_p): New typedef.
4965 (struct gdb_event) <next_event>: Remove.
4966 (event_queue): Change to QUEUE(gdb_event_p).
4967 (async_queue_event): Remove.
4968 (gdb_event_xfree): New.
4969 (initialize_event_loop): New.
4970 (process_event): Use API from QUEUE.
4971 (wait_for_event): Likewise.
4972 * server.c (main): Call initialize_event_loop.
4973 * server.h (initialize_event_loop): Declare.
4974
4975 2013-01-18 Yao Qi <yao@codesourcery.com>
4976
4977 * ax.h (struct eval_agent_expr_context): New.
4978 (gdb_eval_agent_expr): Update declaration.
4979 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4980 TFRAME. Add new argument CTX.
4981 * server.h (struct eval_agent_expr_context): Declare.
4982 (agent_mem_read, agent_tsv_read): Update declaration.
4983 (agent_mem_read_string): Likewise.
4984 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4985 (add_traceframe_block): Add new argument TPOINT.
4986 Increase TPOINT->traceframe_usage.
4987 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4988 eval_tracepoint_agent_expr.
4989 (condition_true_at_tracepoint): Likewise.
4990 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4991 (agent_mem_read_string, agent_tsv_read): Likewise.
4992
4993 2013-01-16 Yao Qi <yao@codesourcery.com>
4994
4995 * linux-low.c (linux_resume_one_lwp): Don't check
4996 'lwp->bp_reinsert != 0'.
4997
4998 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4999 Pedro Alves <palves@redhat.com>
5000
5001 * lynx-low.c (ptrace_request_to_str): Define a temporary
5002 macro and use it to simplify this function's implementation.
5003
5004 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5005
5006 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5007 sets errno.
5008
5009 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5010
5011 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5012
5013 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5014
5015 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5016
5017 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5018
5019 * lynx-low.c (lynx_resume): Use the resume_info parameter
5020 to determine the ptid for the lynx_ptrace call, unless
5021 it is equal to minus_one_ptid, in which case we use the
5022 ptid of the current_inferior.
5023 (lynx_wait_1): After having received a thread create/exit
5024 event, resume the inferior's execution using the signaling
5025 thread's ptid, rather than the old ptid.
5026
5027 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5028
5029 * lynx-low.c (lynx_resume): Delete variable ret.
5030
5031 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5032
5033 * gdbreplay.c (gdbreplay_version): Update copyright year.
5034 * server.c (gdbserver_version): Likewise.
5035
5036 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5037
5038 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5039 new thread.
5040
5041 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5042
5043 * lynx-low.c (ptrace_request_to_str): Add handling for
5044 PTRACE_GETTRACESIG.
5045
5046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5047
5048 * lynx-low.c (lynx_attach): Delete variable new_process.
5049
5050 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5051
5052 * lynx-low.c (lynx_create_inferior): Delete variable
5053 new_process.
5054
5055 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5056
5057 * lynx-low.c (ptrace_request_to_str): Do not handle
5058 PTRACE_GETTHREADLIST if this macro does not exist.
5059
5060 2012-12-15 Yao Qi <yao@codesourcery.com>
5061
5062 * Makefile.in (OBS): Add notif.o.
5063 * notif.c, notif.h: New.
5064 * server.c: Include "notif.h".
5065 (struct vstop_notif) <next>: Remove.
5066 <base>: New field.
5067 (queue_stop_reply): Update.
5068 (push_event, send_next_stop_reply): Remove.
5069 (discard_queued_stop_replies): Update.
5070 (notif_stop): New variable.
5071 (handle_v_stopped): Remove.
5072 (handle_v_requests): Don't call handle_v_stopped. Call
5073 handle_ack_notif instead.
5074 (queue_stop_reply_callback): Call notif_event_enque instead
5075 of queue_stop_reply.
5076 (handle_status): Don't call send_next_stop_reply, call
5077 notif_write_event instead.
5078 (kill_inferior_callback): Likewise.
5079 (detach_or_kill_inferior_callback): Likewise.
5080 (main): Call initialize_notif.
5081 (process_serial_event): Call QUEUE_is_empty.
5082 (handle_target_event): Call notif_push instead of push event.
5083 * server.h (push_event): Remove declaration.
5084
5085 2012-12-10 Tom Tromey <tromey@redhat.com>
5086
5087 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5088 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5089 macros.
5090 (.c.o): Rewrite.
5091 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5092 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5093 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5094 (amd64-linux-ipa.o, ax.o): Rewrite.
5095 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5096 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5097 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5098 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5099 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5100 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5101 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5102 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5103 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5104 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5105 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5106 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5107 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5108 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5109 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5110 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5111 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5112 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5113 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5114 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5115 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5116 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5117 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5118 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5119 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5120 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5121 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5122 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5123 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5124 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5125 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5126 (reg-tilegx.o): Remove.
5127 (all_object_files): New macro.
5128 Include .deps files.
5129 * aclocal.m4, configure: Rebuild.
5130 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5131 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5132 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5133
5134 2012-12-05 Tom Tromey <tromey@redhat.com>
5135
5136 PR gdb/14917:
5137 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5138
5139 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5140
5141 * configure.ac: Check for linux/perf_event.h.
5142 * config.in: Regenerated.
5143 * configure: Regenerated.
5144
5145 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5146
5147 * hostio.c (handle_readlink): Decrease buffer size
5148 parameter passed to readlink by one byte.
5149
5150 2012-11-26 Yao Qi <yao@codesourcery.com>
5151
5152 * configure.ac (build_warnings): Append '-Wempty-body'.
5153 * configure: Regenerated.
5154 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5155 body.
5156
5157 2012-11-15 Pierre Muller <muller@sourceware.org>
5158
5159 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5160 * config.in: Regenerate.
5161 * configure: Regenerate.
5162 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5163 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5164 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5165 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5166 header.
5167 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5168 instead of <sys/wait.h> header.
5169 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5170
5171 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5172
5173 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5174 (various make rules): Remove -DGDBSERVER
5175
5176 2012-11-09 Yao Qi <yao@codesourcery.com>
5177
5178 * spu-low.c (current_ptid): Move it to ..
5179 * gdbthread.h: ... here. New.
5180 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5181 * server.c (myresume, process_serial_event): Likewise.
5182 * thread-db.c (thread_db_find_new_threads): Likewise.
5183 * tracepoint.c (run_inferior_command): Likewise.
5184
5185 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5186
5187 * server.c (handle_search_memory_1): Include access length in
5188 warning message.
5189
5190 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5191
5192 * linux-crisv32-low.c: Fix compile errors.
5193
5194 2012-09-04 Yao Qi <yao@codesourcery.com>
5195
5196 * tracepoint.c (cmd_qtsv): Adjust debug message.
5197 Don't check CUR_TPOINT.
5198
5199 2012-08-28 Yao Qi <yao@codesourcery.com>
5200
5201 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5202 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5203 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5204 Remove declarations of xmalloc, xreallloc, xstrdup and
5205 freeargv.
5206 * Makefile.in (libiberty_h): New.
5207 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5208 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5209
5210 2012-08-23 Yao Qi <yao@codesourcery.com>
5211
5212 * server.h: Remove declaration of 'xsnprintf'.
5213
5214 2012-08-22 Keith Seitz <keiths@redhat.com>
5215
5216 * server.h: Include build-gnulib-gbserver/config.h.
5217 * gdbreplay.c: Likewise.
5218
5219 2012-08-08 Doug Evans <dje@google.com>
5220
5221 * Makefile.in (SFILES): Add gdb_vecs.c.
5222 (OBS): Add gdb_vecs.o.
5223 (gdb_vecs_h, host_defs_h): New variables.
5224 (thread-db.o): Add $(gdb_vecs_h) dependency.
5225 (gdb_vecs.o): New rule.
5226 * thread-db.c: #include "gdb_vecs.h".
5227 (thread_db_load_search): Use a vector to iterate over path elements.
5228 Handle text appearing after "$pdir".
5229
5230 * configure.ac: Add check for strstr.
5231 * config.in: Regenerate.
5232 * configure: Regenerate.
5233
5234 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5235
5236 * hostio.c (handle_pread): If pread fails, fall back to attempting
5237 lseek/read.
5238 (handle_pwrite): Likewise for pwrite.
5239
5240 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5241
5242 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5243 between unsupported TYPE and unimplementable ADDR/LEN combination.
5244 (arm_insert_point): Act on new return value.
5245
5246 2012-07-31 Pedro Alves <palves@redhat.com>
5247
5248 * server.c (process_point_options): Only skip tokens if we find
5249 one that is unrecognized. Don't treat 'X' specially while
5250 skipping unrecognized tokens.
5251
5252 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5253
5254 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5255 to 4-byte-align HW breakpoint addresses for Thumb.
5256
5257 2012-07-27 Yao Qi <yao@codesourcery.com>
5258
5259 PR remote/14161.
5260
5261 * server.h: Declare gdb_agent_about_to_close.
5262 * target.c (kill_inferior): Include "agent.h".
5263 New. Send command 'kill'.
5264 * target.h (kill_inferior): Removed macro.
5265 * tracepoint.c (gdb_agent_about_to_close): New.
5266 (gdb_agent_helper_thread): Handle command 'close'.
5267 Wait endlessly until the inferior stops.
5268 Install gdb_agent_remove_socket to atexit hook.
5269 (agent_socket_name): New static variable.
5270 (gdb_agent_socket_init): Replace local variable 'name' with
5271 'agent_socket_name'.
5272 (gdb_agent_remove_socket): New.
5273
5274 2012-07-27 Yao Qi <yao@codesourcery.com>
5275
5276 * server.c (process_point_options): Stop at 'X' when parsing.
5277
5278 2012-07-19 Michael Eager <eager@eagercon.com>
5279
5280 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5281 to hw_execute.
5282 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5283 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5284 hardware breakpoint.
5285
5286 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5287
5288 * gdbserver/linux-low.c (initialize_low): Call
5289 linux_ptrace_init_warnings.
5290
5291 2012-07-02 Doug Evans <dje@google.com>
5292
5293 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5294 pointer to int.
5295
5296 2012-07-02 Stan Shebs <stan@codesourcery.com>
5297
5298 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5299 (ax.o): Add it to build rule.
5300 (ax-ipa.o): Ditto.
5301 (OBS): Add format.o.
5302 (IPA_OBS): Add format.o.
5303 * server.c (handle_query): Claim support for breakpoint commands.
5304 (process_point_options): Add command case.
5305 (process_serial_event): Leave running if there are printfs in
5306 effect.
5307 * mem-break.h (any_persistent_commands): Declare.
5308 (add_breakpoint_commands): Declare.
5309 (gdb_no_commands_at_breakpoint): Declare.
5310 (run_breakpoint_commands): Declare.
5311 * mem-break.c (struct point_command_list): New struct.
5312 (struct breakpoint): New field command_list.
5313 (any_persistent_commands): New function.
5314 (add_commands_to_breakpoint): New function.
5315 (add_breakpoint_commands): New function.
5316 (gdb_no_commands_at_breakpoint): New function.
5317 (run_breakpoint_commands): New function.
5318 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5319 locally.
5320 * ax.c: Include format.h.
5321 (ax_printf): New function.
5322 (gdb_eval_agent_expr): Add printf opcode.
5323
5324 2012-06-13 Yao Qi <yao@codesourcery.com>
5325
5326 * server.c (start_inferior): Remove duplicated writes to fields
5327 'last_resume_kind' and 'last_status' of 'current_inferior'.
5328
5329 2012-06-12 Yao Qi <yao@codesourcery.com>
5330 Pedro Alves <palves@redhat.com>
5331
5332 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5333 comment.
5334 * server.c (handle_v_cont): Extend comment.
5335
5336 2012-06-11 Yao Qi <yao@codesourcery.com>
5337
5338 * linux-low.c (linux_attach): Add 'static'.
5339
5340 2012-06-06 Yao Qi <yao@codesourcery.com>
5341
5342 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5343
5344 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5345
5346 Fix gcc -flto compilation warning.
5347 * server.c (main): Make variable multi_mode and attach volatile.
5348
5349 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5350
5351 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5352 if the platform doesn't know about it.
5353
5354 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5355
5356 * Makefile.in (SFILES): Add linux-tile-low.c.
5357 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5358 * configure.srv: Handle tilegx-*-linux*.
5359 * linux-tile-low.c: New file.
5360
5361 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5362
5363 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5364
5365 2012-05-24 Pedro Alves <palves@redhat.com>
5366
5367 PR gdb/7205
5368
5369 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5370
5371 2012-05-24 Pedro Alves <palves@redhat.com>
5372
5373 PR gdb/7205
5374
5375 Replace target_signal with gdb_signal throughout.
5376
5377 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5378
5379 * linux-low.c (linux_store_registers): Avoid the copying sequence
5380 when no data has been retrieved by ptrace.
5381
5382 2012-05-22 Will Deacon <will.deacon@arm.com>
5383
5384 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5385 Include asm/ptrace.h.
5386 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5387 already defined.
5388
5389 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5390
5391 * linux-low.c (linux_store_registers): Don't re-retrieve data
5392 with ptrace that has already been obtained from /proc. Always
5393 copy any data retrieved with ptrace to the buffer supplied.
5394
5395 2012-05-11 Yao Qi <yao@codesourcery.com>
5396 Pedro Alves <palves@redhat.com>
5397
5398 * linux-low.c (enum stopping_threads_kind): New.
5399 (stopping_threads): Change type to `enum stopping_threads_kind'.
5400 (handle_extended_wait): If stopping and suspending threads, leave
5401 the new_lwp suspended too.
5402 (linux_wait_for_event): Adjust.
5403 (stop_all_lwps): Set `stopping_threads' to
5404 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5405 whether we're suspending threads or just stopping them. Assert no
5406 recursion happens.
5407
5408 2012-04-29 Yao Qi <yao@codesourcery.com>
5409
5410 * server.h: Move some code to ...
5411 * gdbthread.h: ... here. New.
5412 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5413 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5414 (nto-low.o, win32-low.o): Likewise.
5415 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5416 * regcache.c, remote-utils.c, server.c: Likewise.
5417 * target.c, tracepoint.c, win32-low.c: Likewise.
5418
5419 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5420
5421 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5422 (PTRACE_ARG4_TYPE): Likewise.
5423 (PTRACE_XFER_TYPE): Likewise.
5424 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5425 ptrace to PTRACE_ARG3_TYPE.
5426 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5427 (PTRACE_ARG4_TYPE): Likewise.
5428 (PTRACE_XFER_TYPE): Likewise.
5429 (linux_detach_one_lwp): Cast fourth argument of
5430 ptrace to long then PTRACE_ARG4_TYPE.
5431 (regsets_fetch_inferior_registers): Cast third argument of
5432 ptrace to long then PTRACE_ARG3_TYPE.
5433 (regsets_store_inferior_registers): Likewise.
5434
5435 2012-04-20 Pedro Alves <palves@redhat.com>
5436
5437 * configure: Regenerate.
5438
5439 2012-04-19 Pedro Alves <palves@redhat.com>
5440
5441 * Makefile.in (GNULIB_BUILDDIR): New.
5442 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5443 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5444 (all, install-only, uninstall, clean-info, all-lib, clean): No
5445 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5446 (maintainer-clean realclean distclean): Use subdir_do.
5447 (subdir_do): New.
5448 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5449 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5450 * acinclude.m4: Include acx_configure_dir.m4.
5451 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5452 calls. Call AC_PROG_RANLIB. Configure gnulib using
5453 ACX_CONFIGURE_DIR.
5454 (GNULIB): New.
5455 (GNULIB_STDINT_H): Adjust.
5456 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5457 * gdbreplay.c: Include build-gnulib/config.h.
5458 * server.h: Likewise.
5459 * aclocal.m4: Regenerate.
5460 * config.in: Regenerate.
5461 * configure: Regenerate.
5462
5463 2012-04-19 Pedro Alves <palves@redhat.com>
5464
5465 * Makefile.in (LIBGNU, INCGNU): Adjust.
5466 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5467 (all, install-only, uninstall, clean-info, all-lib, clean)
5468 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5469 * configure.ac: Adjust AC_OUTPUT output.
5470 * aclocal.m4: Regenerate.
5471 * configure: Regenerate.
5472
5473 2012-04-19 Pedro Alves <palves@redhat.com>
5474
5475 * Makefile.in (generated_files): New.
5476 (server_h): Remove the explicit dependency on config.h, and depend
5477 on $generated_files.
5478
5479 2012-04-19 Pedro Alves <palves@redhat.com>
5480
5481 * Makefile.in (INCGNU): Add -Ignulib.
5482
5483 2012-04-19 Pedro Alves <palves@redhat.com>
5484
5485 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5486 (INCGNU): ... this, and spell out -I here.
5487 (GNULIB_LIB): Rename to ...
5488 (LIBGNU): ... this.
5489 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5490
5491 2012-04-19 Pedro Alves <palves@redhat.com>
5492
5493 * config.in: Regenerate.
5494
5495 2012-04-19 Pedro Alves <palves@redhat.com>
5496
5497 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5498 * server.h (memmem): Remove declaration.
5499 * config.in: Regenerate.
5500 * configure: Regenerate.
5501
5502 2012-04-19 Yao Qi <yao@codesourcery.com>
5503
5504 * Makefile.in (SFILES): Add common/vec.c.
5505 (OBS): Add vec.o.
5506 (vec.o): New rule.
5507
5508 2012-04-19 Yao Qi <yao@codesourcery.com>
5509
5510 * remote-utils.c (prepare_resume_reply): Replace with macro
5511 target_core_of_thread.
5512 * server.c (handle_qxfer_threads_proper): Likewise.
5513 * target.h (traget_core_of_thread): New macro.
5514
5515 2012-04-18 Pedro Alves <palves@redhat.com>
5516
5517 * aclocal.m4: Regenerate.
5518 * configure: Regenerate.
5519
5520 2012-04-16 Yao Qi <yao@codesourcery.com>
5521
5522 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5523 duplicated on address.
5524
5525 2012-04-16 Yao Qi <yao@codesourcery.com>
5526
5527 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5528 (struct tracepoint_action_ops) <send>: New field.
5529 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5530 (agent_expr_send, x_tracepoint_action_send): New.
5531 (l_tracepoint_action_send): New.
5532 (cmd_qtdp): Download and install tracepoint
5533 according to `use_agent'.
5534 (run_inferior_command): Add one more parameter `len'.
5535 Update callers.
5536 (tracepoint_send_agent): New.
5537 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5538
5539 2012-04-16 Yao Qi <yao@codesourcery.com>
5540
5541 * tracepoint.c (download_tracepoints): Moved to ...
5542 (cmd_qtstart): ... here.
5543
5544 2012-04-14 Yao Qi <yao@codesourcery.com>
5545
5546 * tracepoint.c: Include inttypes.h.
5547 (struct collect_memory_action): Use sized types.
5548 (struct tracepoint): Likewise.
5549 (cmd_qtdp, stop_tracing): Update print specifiers.
5550 (cmd_qtp, response_tracepoint): Likewise.
5551 (collect_data_at_tracepoint): Likewise.
5552 (collect_data_at_step): Likewise.
5553
5554 2012-04-14 Yao Qi <yao@codesourcery.com>
5555
5556 Import gnulib module inttypes.
5557 * aclocal.m4, config.in, configure: Regenerated.
5558
5559 2012-04-14 Yao Qi <yao@codesourcery.com>
5560
5561 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5562 Makefile and config.status at last.
5563
5564 2012-04-13 Yao Qi <yao@codesourcery.com>
5565
5566 * tracepoint.c: Include stdint.h unconditionally.
5567
5568 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5569
5570 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5571 on BFD_HAVE_SYS_PROCFS_TYPE.
5572 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5573 * configure: Regenerate.
5574 * config.in: Likewise.
5575
5576 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5577
5578 * Makefile.in (clean): Also remove x32.c x32-linux.c
5579 x32-avx.c x32-avx-linux.c.
5580 (x32.o): New target.
5581 (x32.c): Likewise.
5582 (x32-linux.o): Likewise.
5583 (x32-linux.c): Likewise.
5584 (x32-avx.o): Likewise.
5585 (x32-avx.c): Likewise.
5586 (x32-avx-linux.o): Likewise.
5587 (x32-avx-linux.c): Likewise.
5588
5589 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5590 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5591 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5592 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5593 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5594 i386/x32-avx-linux.xml.
5595
5596 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5597 (init_registers_x32_avx_linux): Likwise.
5598 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5599 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5600
5601 2012-04-13 Pedro Alves <palves@redhat.com>
5602
5603 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5604 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5605 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5606 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5607 the sub-make.
5608
5609 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5610
5611 * linux-x86-low.c (compat_x32_clock_t): New.
5612 (compat_x32_siginfo_t): Likewise.
5613 (compat_x32_siginfo_from_siginfo): Likewise.
5614 (siginfo_from_compat_x32_siginfo): Likewise.
5615 (linux_is_elf64): Likewise.
5616 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5617 and siginfo_from_compat_x32_siginfo for x32.
5618 (x86_arch_setup): Set linux_is_elf64.
5619
5620 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5621
5622 PR gdb/13969
5623 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5624 e_machine field.
5625 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5626 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5627 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5628 compatible with process.
5629
5630 2012-04-12 Yao Qi <yao@codesourcery.com>
5631
5632 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5633 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5634 (install-only, install-info, clean): Handle sub dir gnulib.
5635 (all-lib, am--refresh): New targets.
5636 (memmem.o): Remove target.
5637 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5638 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5639 (AC_REPLACE_FUNCS): Remove memmem.
5640 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5641 (AC_OUTPUT): Generate Makefile in gnulib/.
5642 * aclocal.m4, config.in, configure: Regenerated.
5643
5644 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5645
5646 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5647
5648 2012-04-05 Pedro Alves <palves@redhat.com>
5649
5650 -Werror=strict-aliasing
5651
5652 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5653 pointer.
5654
5655 2012-04-04 Pedro Alves <palves@redhat.com>
5656
5657 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5658 (sparc_store_gregset_from_stack, sparc_store_gregset)
5659 (sparc_breakpoint_at): Fix formatting.
5660
5661 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5662
5663 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5664 are available.
5665 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5666 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5667 * config.in: Regenerate.
5668 * configure: Likewise.
5669
5670 2012-03-29 Pedro Alves <palves@redhat.com>
5671
5672 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5673 Correct ptrace arguments.
5674
5675 2012-03-28 Pedro Alves <palves@redhat.com>
5676
5677 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5678 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5679 (IA64_FR1_REGNUM): New defines.
5680 (ia64_fetch_register): New.
5681 (the_low_target): Install it.
5682 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5683 field.
5684 * linux-low.c (linux_fetch_registers): Try the
5685 the_low_target.fetch_register hook first.
5686
5687 * linux-arm-low.c (the_low_target): Adjust.
5688 * linux-bfin-low.c (the_low_target): Adjust.
5689 * linux-cris-low.c (the_low_target): Adjust.
5690 * linux-crisv32-low.c (the_low_target): Adjust.
5691 * linux-m32r-low.c (the_low_target): Adjust.
5692 * linux-m68k-low.c (the_low_target): Adjust.
5693 * linux-mips-low.c (the_low_target): Adjust.
5694 * linux-ppc-low.c (the_low_target): Adjust.
5695 * linux-s390-low.c (the_low_target): Adjust.
5696 * linux-sh-low.c (the_low_target): Adjust.
5697 * linux-sparc-low.c (the_low_target): Adjust.
5698 * linux-tic6x-low.c (the_low_target): Adjust.
5699 * linux-x86-low.c (the_low_target): Adjust.
5700 * linux-xtensa-low.c (the_low_target): Adjust.
5701
5702 2012-03-26 Pedro Alves <palves@redhat.com>
5703
5704 * server.c (handle_qxfer_libraries): Don't bail early if
5705 the_target->qxfer_libraries_svr4 is not NULL.
5706
5707 2012-03-26 Pedro Alves <palves@redhat.com>
5708
5709 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5710
5711 2012-03-23 Pedro Alves <palves@redhat.com>
5712
5713 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5714 "library-list-svr4" element's start tag when the the DSO list is
5715 empty.
5716
5717 2012-03-23 Pedro Alves <palves@redhat.com>
5718
5719 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5720 a variable whose type size is the same as the inferior's pointer
5721 size.
5722
5723 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5724
5725 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5726 struct siginfo.
5727 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5728 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5729 * linux-low.h: Include <signal.h>.
5730 (struct siginfo): Remove forward declaration.
5731 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5732 struct siginfo.
5733
5734 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5735
5736 * .gitignore: Ignore more files.
5737
5738 2012-03-19 Pedro Alves <palves@redhat.com>
5739 Jan Kratochvil <jan.kratochvil@redhat.com>
5740
5741 * server.c (cont_thread, general_thread): Add describing comments.
5742 (start_inferior): Clear `cont_thread'.
5743 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5744 of a process.
5745
5746 2012-03-15 Yao Qi <yao@codesourcery.com>
5747
5748 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5749 handling to ...
5750 (cmd_qtdp): ... here.
5751
5752 2012-03-15 Yao Qi <yao@codesourcery.com>
5753
5754 * tracepoint.c (struct tracepoint_action_ops): New.
5755 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5756 (m_tracepoint_action_download): New.
5757 (r_tracepoint_action_download): New.
5758 (x_tracepoint_action_download): New.
5759 (l_tracepoint_action_download): New.
5760 (add_tracepoint_action): Install `action->ops' according type.
5761 (download_tracepoint_1): Move code `download' function pointer
5762 of various tracepoint_action_ops.
5763
5764 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5765
5766 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5767 linux_ptrace_attach_warnings.
5768
5769 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5770
5771 * Makefile.in (linux-ptrace.o): New.
5772 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5773 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5774 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5775 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5776 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5777 of these targets.
5778 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5779
5780 2012-03-08 Yao Qi <yao@codesourcery.com>
5781 Pedro Alves <palves@redhat.com>
5782
5783 Fix PR server/13392.
5784 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5785 offset of JMP insn.
5786 * tracepoint.c (remove_tracepoint): New.
5787 (cmd_qtdp): Call remove_tracepoint when failed to install.
5788
5789 2012-03-07 Pedro Alves <palves@redhat.com>
5790
5791 * linux-low.c (get_detach_signal): New.
5792 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5793 Pass on pending signals to PTRACE_DETACH. Check the result of the
5794 ptrace call.
5795 * server.c (program_signals, program_signals_p): New.
5796 (handle_general_set): Handle QProgramSignals.
5797 * server.h (program_signals, program_signals_p): Declare.
5798
5799 2012-03-05 Pedro Alves <palves@redhat.com>
5800 Jan Kratochvil <jan.kratochvil@redhat.com>
5801
5802 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5803 New comment why.
5804
5805 2012-03-03 Yao Qi <yao@codesourcery.com>
5806
5807 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5808 agent_look_up_symbols.
5809
5810 2012-03-03 Yao Qi <yao@codesourcery.com>
5811
5812 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5813 (linux-x86-low.o): Likewise.
5814 * server.h: Remove in_process_agent_loaded.
5815 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5816 common/agent.c.
5817 Update callers.
5818
5819 2012-03-03 Yao Qi <yao@codesourcery.com>
5820
5821 * tracepoint.c (gdb_agent_capability): New global.
5822 (in_process_agent_loaded_ust): Renamed to
5823 `in_process_agent_supports_ust'.
5824 Update callers.
5825 (in_process_agent_supports_ust): Call agent_capability_check.
5826 (clear_installed_tracepoints): Assert that agent supports
5827 agent.
5828
5829 2012-03-03 Yao Qi <yao@codesourcery.com>
5830
5831 * linux-low.c (linux_supports_agent): New.
5832 (linux_target_ops): Initialize field `supports_agent' with
5833 linux_supports_agent.
5834 * target.h (struct target_ops) <supports_agent>: New.
5835 (target_supports_agent): New macro.
5836 * server.c (handle_general_set): Handle packet 'QAgent'.
5837 (handle_query): Send `QAgent+'.
5838 * Makefile.in (server.o): Depends on agent.h.
5839
5840 2012-03-03 Yao Qi <yao@codesourcery.com>
5841
5842 * Makefile.in (OBS): Add agent.o.
5843 Add new rule for agent.o.
5844 Track dependence of tracepoint.c on agent.h.
5845 * tracepoint.c (run_inferior_command_1):
5846 (run_inferior_command): Call agent_run_command.
5847 (gdb_ust_connect_sync_socket): Deleted. Move it to
5848 common/agent.c.
5849 (resume_thread, stop_thread): Likewise.
5850 (gdb_ust_socket_init): Renamed to ...
5851 (gdb_agent_socket_init): ... New.
5852 (gdb_ust_thread): Renamed to ...
5853 (gdb_agent_helper_thread): ... New.
5854 (gdb_ust_init): Move some code to ...
5855 (gdb_agent_init): ... here. New.
5856 [HAVE_UST]: Call gdb_ust_init.
5857 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5858 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5859 * config.in, configure: Regenerated.
5860
5861 2012-03-02 Pedro Alves <palves@redhat.com>
5862
5863 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5864 * linux-low.c (struct simple_pid_list): New.
5865 (stopped_pids): New a struct simple_pid_list pointer.
5866 (add_to_pid_list, pull_pid_from_list): New.
5867 (handle_extended_wait): Don't assume the first signal new children
5868 report is SIGSTOP. Adjust call to pull_pid_from_list.
5869 (linux_wait_for_lwp): Adjust.
5870
5871 2012-03-02 Yao Qi <yao@codesourcery.com>
5872
5873 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5874 debug log.
5875
5876 2012-03-02 Yao Qi <yao@codesourcery.com>
5877
5878 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5879 `stop_pc' and `tpoint'. Update caller.
5880
5881 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5882
5883 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5884 * linux-low.c (use_linux_regsets): New macro.
5885 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5886 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5887 (linux_register_in_regsets): New function.
5888 (usr_fetch_inferior_registers): Skip registers covered by
5889 regsets.
5890 (usr_store_inferior_registers): Likewise.
5891 (usr_fetch_inferior_registers): New macro.
5892 (usr_store_inferior_registers): Likewise.
5893 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5894 (linux_store_registers): Likewise.
5895 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5896 prototype.
5897 (init_registers_mips64_dsp_linux): Likewise.
5898 (init_registers_mips_linux): New macro.
5899 (init_registers_mips_dsp_linux): Likewise.
5900 (mips_dsp_num_regs): Likewise.
5901 (DSP_BASE, DSP_CONTROL): New fallback macros.
5902 (mips_base_regs): New macro.
5903 (mips_regmap): Use it. Fix the size.
5904 (mips_dsp_regmap): New variable.
5905 (mips_dsp_regset_bitmap): Likewise.
5906 (mips_arch_setup): New function.
5907 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5908 than mips_regmap.
5909 (mips_cannot_store_register): Likewise.
5910 (the_low_target): Update .arch_setup, .num_regs and .regmap
5911 initializers. Add .regset_bitmap initializer.
5912 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5913 initializer.
5914 * linux-bfin-low.c (the_low_target): Likewise.
5915 * linux-cris-low.c (the_low_target): Likewise.
5916 * linux-crisv32-low.c (the_low_target): Likewise.
5917 * linux-ia64-low.c (the_low_target): Likewise.
5918 * linux-m32r-low.c (the_low_target): Likewise.
5919 * linux-m68k-low.c (the_low_target): Likewise.
5920 * linux-ppc-low.c (the_low_target): Likewise.
5921 * linux-s390-low.c (the_low_target): Likewise.
5922 * linux-sh-low.c (the_low_target): Likewise.
5923 * linux-sparc-low.c (the_low_target): Likewise.
5924 * linux-tic6x-low.c (the_low_target): Likewise.
5925 * linux-x86-low.c (the_low_target): Likewise.
5926 * linux-xtensa-low.c (the_low_target): Likewise.
5927 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5928 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5929 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5930 srv_xmlfiles.
5931 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5932 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5933
5934 2012-02-29 Yao Qi <yao@codesourcery.com>
5935 Pedro Alves <palves@redhat.com>
5936
5937 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5938 `step_over_finished' is true.
5939
5940 2012-02-27 Pedro Alves <palves@redhat.com>
5941
5942 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5943 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5944
5945 2012-02-27 Pedro Alves <palves@redhat.com>
5946
5947 PR server/9684
5948 * linux-low.c (pid_is_stopped): New.
5949 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5950
5951 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5952
5953 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5954 of conditions.
5955
5956 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5957
5958 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5959
5960 2012-02-24 Luis Machado <lgustavo@codesourcery>
5961
5962 * server.c (handle_query): Advertise support for target-side
5963 breakpoint condition evaluation.
5964 (process_point_options): New function.
5965 (process_serial_event): When inserting a breakpoint, check for
5966 a target-side condition that should be evaluated.
5967
5968 * mem-break.c: Include regcache.h and ax.h.
5969 (point_cond_list_t): New data structure.
5970 (breakpoint) <cond_list>: New field.
5971 (find_gdb_breakpoint_at): Make non-static.
5972 (delete_gdb_breakpoint_at): Clear any target-side
5973 conditions.
5974 (clear_gdb_breakpoint_conditions): New function.
5975 (add_condition_to_breakpoint): Likewise.
5976 (add_breakpoint_condition): Likewise.
5977 (gdb_condition_true_at_breakpoint): Likewise.
5978 (gdb_breakpoint_here): Return result directly instead
5979 of going through a local variable.
5980
5981 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5982 (clear_gdb_breakpoint_conditions): Likewise.
5983 (add_breakpoint_condition): Likewise.
5984 (gdb_condition_true_at_breakpoint): Likewise.
5985
5986 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5987 (need_step_over_p): Take target-side breakpoint condition into
5988 consideration.
5989
5990 2012-02-24 Luis Machado <lgustavo@codesourcery>
5991
5992 * server.h: Include tracepoint.h.
5993 (agent_mem_read, agent_get_trace_state_variable_value,
5994 agent_set_trace_state_variable_value,
5995 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5996 get_set_tsv_func_addr): New prototypes.
5997
5998 * ax.h: New include file.
5999 * ax.c: New source file.
6000
6001 * tracepoint.c: Include ax.h.
6002 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6003 agent_expr, eval_result_type): Move to ax.h.
6004 (parse_agent_expr): Rename to ...
6005 (gdb_parse_agent_expr): ... this, make it non-static and move
6006 to ax.h.
6007 (unparse_agent_expr) Rename to ...
6008 (gdb_unparse_agent_expr): ... this, make it non-static and move
6009 to ax.h.
6010 (eval_agent_expr): Rename to ...
6011 (eval_tracepoint_agent_expr): ... this.
6012 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6013 forward declarations.
6014 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6015 (agent_get_trace_state_variable_value): New function.
6016 (agent_set_trace_state_variable_value): New function.
6017 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6018 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6019 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6020 (condition_true_at_tracepoint): Likewise.
6021 (parse_agent_expr): Rename to ...
6022 (gdb_parse_agent_expr): ... this and move to ax.c.
6023 (unparse_agent_expr): Rename to ...
6024 (gdb_unparse_agent_expr): ... this and move to ax.c.
6025 (gdb_agent_op_name): Move to ax.c.
6026 (eval_agent_expr): Rename to ...
6027 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6028 and move to ax.c.
6029 (eval_tracepoint_agent_expr): New function.
6030 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6031 non-static.
6032 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6033 ax.c.
6034 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6035 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6036 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6037 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6038 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6039 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6040 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6041 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6042 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6043 (compile_bytecodes): Remove forward declaration.
6044 (is_goto_target): Move to ax.c.
6045 (compile_bytecodes): Move to ax.c and call
6046 agent_get_trace_state_variable_value (...) and
6047 agent_set_trace_state_variable_value (...).
6048
6049 * Makefile.in: Update ax.c and IPA dependencies.
6050
6051 2012-02-24 Pedro Alves <palves@redhat.com>
6052
6053 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6054 (cmd_bigqtbuffer_circular): ... this. Only handle
6055 'QTBuffer:circular:'.
6056 (handle_tracepoint_general_set): Adjust.
6057
6058 2012-02-16 Yao Qi <yao@codesourcery.com>
6059
6060 * inferiors.c: Move code to ...
6061 * dll.c: .... here. New.
6062 * server.h: Declare clear_dlls.
6063 * Makefile.in (SFILES): Add dll.c.
6064 (OBS): Add dll.o
6065 (dll.o): New rule.
6066
6067 2012-02-11 Yao Qi <yao@codesourcery.com>
6068
6069 * server.c: (handle_monitor_command): Add a new parameter
6070 `own_buf'.
6071 (handle_query): Update caller.
6072
6073 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6074
6075 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6076 * configure, config.in: Regenerate.
6077 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6078 is not defined.
6079
6080 2012-02-02 Pedro Alves <palves@redhat.com>
6081
6082 Try SIGKILL first, then PTRACE_KILL.
6083 * linux-low.c (linux_kill_one_lwp): New.
6084 (linux_kill_one_lwp): Rename to ...
6085 (kill_one_lwp_callback): ... this. Use the new
6086 linux_kill_one_lwp.
6087
6088 2012-02-02 Pedro Alves <palves@redhat.com>
6089
6090 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6091 inferior.
6092
6093 2012-01-27 Pedro Alves <palves@redhat.com>
6094
6095 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6096 (elf_64_file_p): Make static.
6097 (linux_pid_exe_is_elf_64_file): New.
6098 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6099 Delete declarations.
6100 (linux_pid_exe_is_elf_64_file): Declare.
6101 * linux-x86-low.c (x86_arch_setup): Use
6102 linux_pid_exe_is_elf_64_file.
6103
6104 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6105
6106 * linux-low.c (linux_wait_for_event_1): Rename to ...
6107 (linux_wait_for_event): ... here and merge it with former
6108 linux_wait_for_event - new variable wait_ptid, use it.
6109 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6110
6111 2012-01-23 Pedro Alves <palves@redhat.com>
6112
6113 * server.c (main): Avoid yet another case of infinite loop while
6114 detaching/killing after a longjmp.
6115
6116 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6117
6118 Code cleanup.
6119 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6120
6121 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6122
6123 * hostio.c (handle_readlink): New function.
6124 (handle_vFile): Call it to handle "vFile:readlink" packets.
6125
6126 2012-01-20 Pedro Alves <palves@redhat.com>
6127 Ulrich Weigand <ulrich.weigand@linaro.org>
6128
6129 * server.c (handle_v_requests): Only support vAttach and vRun to
6130 start multiple processes when in extended protocol mode.
6131
6132 2012-01-17 Pedro Alves <palves@redhat.com>
6133
6134 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6135 memalign plus mprotect to allocate the scratch buffer.
6136
6137 2012-01-13 Pedro Alves <palves@redhat.com>
6138
6139 * server.c (attach_inferior): Clear `cont_thread'.
6140
6141 2012-01-13 Pedro Alves <palves@redhat.com>
6142
6143 * server.c (main): Avoid infinite loop while detaching/killing
6144 after a longjmp.
6145
6146 2012-01-09 Doug Evans <dje@google.com>
6147
6148 * server.c (start_inferior): Set last_ptid in --wrapper case.
6149
6150 2012-01-06 Yao Qi <yao@codesourcery.com>
6151
6152 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6153 defined.
6154 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6155
6156 2012-01-04 Yao Qi <yao@codesourcery.com>
6157
6158 * tracepoint.c (cmd_qtdp): Print debug message
6159 for static tracepoint.
6160
6161 2012-01-04 Yao Qi <yao@codesourcery.com>
6162
6163 * tracepoint.c (trace_vdebug): Differentiate debug message
6164 between gdbserver and IPA.
6165
6166 2012-01-03 Yao Qi <yao@codesourcery.com>
6167
6168 * tracepoint.c (tracepoint_was_hit): Don't collect for
6169 static tracepoint.
6170
6171 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6172
6173 * terminal.h: Reformat copyright header.
6174
6175 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6176
6177 * server.c (gdbserver_version): Update copyright year.
6178 * gdbreplay.c (gdbreplay_version): Likewise.
6179
6180 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6181
6182 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6183
6184 Revert:
6185 2011-12-18 Hui Zhu <teawater@gmail.com>
6186 * linux-low.c (linux_create_inferior): Save return value to ret.
6187
6188 2011-12-18 Hui Zhu <teawater@gmail.com>
6189
6190 * linux-low.c (linux_create_inferior): Save return value to ret.
6191
6192 2011-12-16 Doug Evans <dje@google.com>
6193
6194 * linux-low.c (linux_create_inferior): If stdio connection,
6195 redirect stdin from /dev/null, stdout to stderr.
6196 * remote-utils.c (remote_is_stdio): New static global.
6197 (remote_connection_is_stdio): New function.
6198 (remote_prepare): Handle stdio connection.
6199 (remote_open): Ditto.
6200 (remote_close): Don't close stdin for stdio connections.
6201 (read_prim,write_prim): New functions. Replace all calls to
6202 read/write to these.
6203 * server.c (main): Watch for "-" argument. Move call to
6204 remote_prepare before start_inferior.
6205 * server.h (STDIO_CONNECTION_NAME): New macro.
6206 (remote_connection_is_stdio): Declare.
6207
6208 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6209 in debugging output.
6210
6211 2011-12-15 Yao Qi <yao@codesourcery.com>
6212
6213 * tracepoint.c: Include sys/syscall.h.
6214 (gdb_ust_thread): Remove preprocessor conditional.
6215
6216 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6217
6218 * linux-low.c (linux_detach_one_lwp): Call
6219 the_low_target.prepare_to_resume before detaching.
6220
6221 2011-12-14 Yao Qi <yao@codesourcery.com>
6222
6223 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6224 of write.
6225
6226 2011-12-14 Yao Qi <yao@codesourcery.com>
6227
6228 * i386-low.c (i386_low_stopped_data_address): Initialize local
6229 variable `control'.
6230
6231 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6232
6233 PR remote/13492
6234
6235 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6236 DR_CONTROL unless necessary. Extend comments.
6237 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6238 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6239
6240 2011-12-13 Yao Qi <yao@codesourcery.com>
6241
6242 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6243 macros.
6244 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6245
6246 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6247
6248 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6249 Print new debug message for such case.
6250
6251 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6252
6253 Fix overlapping memcpy.
6254 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6255 the read_inferior_memory transfer.
6256 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6257 write_inferior_memory transfer.
6258 (set_fast_tracepoint_jump): New variable buf. Use it for the
6259 read_inferior_memory and write_inferior_memory transfers.
6260 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6261 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6262 Use it for the write_inferior_memory transfer.
6263 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6264 buffers.
6265
6266 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6267
6268 * linux-low.c (fetch_register, store_register): Make code
6269 consistent, fix formatting.
6270
6271 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6272
6273 * linux-low.c (usr_store_inferior_registers): Factor out code
6274 to handle individual registers into...
6275 (store_register): ... this new function.
6276
6277 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6278
6279 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6280 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6281 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6282 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6283 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6284 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6285 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6286 (srv_xmlfiles): Add new XML files.
6287
6288 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6289 and <sys/uio.h>.
6290 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6291 (init_registers_s390_linux32v1): Add prototype.
6292 (init_registers_s390_linux32v2): Likewise.
6293 (init_registers_s390_linux64v1): Likewise.
6294 (init_registers_s390_linux64v2): Likewise.
6295 (init_registers_s390x_linux64v1): Likewise.
6296 (init_registers_s390x_linux64v2): Likewise.
6297 (s390_num_regs): Increment to 52.
6298 (s390_regmap): Add orig_r2 register.
6299 (s390_num_regs_3264): Increment to 68.
6300 (s390_regmap_3264): Add orig_r2 register.
6301 (s390_collect_ptrace_register): Handle orig_r2 register.
6302 (s390_supply_ptrace_register): Likewise.
6303 (s390_fill_last_break): New function.
6304 (s390_store_last_break): Likewise.
6305 (s390_fill_system_call): New function.
6306 (s390_store_system_call): Likewise.
6307 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6308 register sets.
6309 (s390_check_regset): New function.
6310 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6311 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6312 Update target_regsets for available register sets.
6313
6314 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6315 Jan Kratochvil <jan.kratochvil@redhat.com>
6316
6317 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6318 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6319 New.
6320 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6321 * linux-low.h (struct process_info_private): New member r_debug.
6322 * server.c (handle_qxfer_libraries): Call
6323 the_target->qxfer_libraries_svr4.
6324 (handle_qxfer_libraries_svr4): New function.
6325 (qxfer_packets): New entry "libraries-svr4".
6326 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6327 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6328 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6329 PACKET_qXfer_libraries_svr4.
6330
6331 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6332
6333 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6334 PSW address/mask between 8-byte and 16-byte formats.
6335 (s390_supply_ptrace_register): Likewise.
6336 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6337 basic addressing mode bit.
6338
6339 2011-11-24 Stan Shebs <stan@codesourcery.com>
6340
6341 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6342
6343 2011-11-17 Stan Shebs <stan@codesourcery.com>
6344
6345 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6346 (tracing_start_time): New global.
6347 (tracing_stop_time): New global.
6348 (tracing_user_name): New global.
6349 (tracing_notes): New global.
6350 (tracing_stop_note): New global.
6351 (cmd_qtstart): Set traceframe_usage, start_time.
6352 (stop_tracing): Set stop_time.
6353 (cmd_qtstatus): Report additional status.
6354 (cmd_qtp): New function.
6355 (handle_tracepoint_query): Call it.
6356 (cmd_qtnotes): New function.
6357 (handle_tracepoint_general_set): Call it.
6358 (get_timestamp): Rename from tsv_get_timestamp.
6359
6360 2011-11-14 Stan Shebs <stan@codesourcery.com>
6361 Kwok Cheung Yeung <kcy@codesourcery.com>
6362
6363 * linux-x86-low.c (small_jump_insn): New.
6364 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6365 trampoline and error message, build a trampoline and issue a small
6366 jump instruction to it.
6367 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6368 trampoline and error message.
6369 (x86_get_min_fast_tracepoint_insn_len): New.
6370 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6371 * linux-low.h (struct linux_target_ops): Add arguments to
6372 install_fast_tracepoint_jump_pad operation, add new operation.
6373 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6374 arguments.
6375 (linux_get_min_fast_tracepoint_insn_len): New function.
6376 (linux_target_op): Add new operation.
6377 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6378 (gdb_trampoline_buffer_end): Ditto.
6379 (gdb_trampoline_buffer_error): Ditto.
6380 (struct ipa_sym_addresses): Add fields for new IPA variables.
6381 (symbol_list): Add entries for new IPA variables.
6382 (struct tracepoint): Add fields to hold the address range of the
6383 trampoline used by the tracepoint.
6384 (trampoline_buffer_head): New static variable.
6385 (trampoline_buffer_tail): Ditto.
6386 (claim_trampoline_space): New function.
6387 (have_fast_tracepoint_trampoline_buffer): New function.
6388 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6389 structure.
6390 (install_fast_tracepoint): Ditto, also add error buffer argument.
6391 (cmd_qtminftpilen): New function.
6392 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6393 (fast_tracepoint_from_trampoline_address): New function.
6394 (fast_tracepoint_collecting): Handle trampoline as part of jump
6395 pad space.
6396 (set_trampoline_buffer_space): New function.
6397 (initialize_tracepoint): Initialize new IPA variables.
6398 * target.h (struct target_ops): Add arguments to
6399 install_fast_tracepoint_jump_pad operation, add new
6400 get_min_fast_tracepoint_insn_len operation.
6401 (target_get_min_fast_tracepoint_insn_len): New.
6402 (install_fast_tracepoint_jump_pad): Add arguments.
6403 * server.h (IPA_BUFSIZ): Define.
6404 * linux-i386-ipa.c: Include extra header files.
6405 (initialize_fast_tracepoint_trampoline_buffer): New function.
6406 (initialize_low_tracepoint): Call it.
6407 * server.h (set_trampoline_buffer_space): Declare.
6408 (claim_trampoline_space): Ditto.
6409 (have_fast_tracepoint_trampoline_buffer): Ditto.
6410
6411 2011-11-14 Yao Qi <yao@codesourcery.com>
6412
6413 * server.c (handle_query): Handle InstallInTrace for qSupported.
6414 * tracepoint.c (add_tracepoint): Sort list.
6415 (install_tracepoint, download_tracepoint): New.
6416 (cmd_qtdp): Call them to install and download tracepoints.
6417 (sort_tracepoints): Removed.
6418 (cmd_qtstart): Update.
6419
6420 2011-11-14 Yao Qi <yao@codesourcery.com>
6421
6422 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6423 * mem-break.h: Declare.
6424 * tracepoint.c (cmd_qtstart): Move some code to ...
6425 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6426 New.
6427 (download_tracepoints): Move some code to ...
6428 (download_tracepoint_1): ... here. New.
6429
6430 2011-11-08 Yao Qi <yao@codesourcery.com>
6431
6432 * remote-utils.c (relocate_instruction): A comment fix.
6433
6434 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6435
6436 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6437 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6438 dr_status_mirror and dr_control_mirror from debug_reg_state.
6439 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6440 (i386_initial_stuff): Remove use of deleted globals.
6441 (i386_get_thread_context, i386_set_thread_context,
6442 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6443 from debug_reg_state.
6444
6445 2011-11-05 Yao Qi <yao@codesourcery.com>
6446
6447 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6448 address as TPOINT's.
6449
6450 2011-11-02 Stan Shebs <stan@codesourcery.com>
6451
6452 * tracepoint.c (agent_mem_read_string): New function.
6453 (eval_agent_expr): Call it for tracenz.
6454 * server.c (handle_query): Report support for tracenz.
6455
6456 2011-11-02 Yao Qi <yao@codesourcery.com>
6457
6458 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6459
6460 2011-11-02 Yao Qi <yao@codesourcery.com>
6461
6462 * target.h: Fix a typo in comment.
6463
6464 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6465
6466 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6467 clobber the breakpoints' shadows with fast tracepoint jumps.
6468 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6469 * target.c (write_inferior_memory): Also pass MYADDR down to
6470 check_mem_write.
6471
6472 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6473
6474 * configure.ac: Check support for personality routine.
6475 * configure: Regenerate.
6476 * config.in: Likewise.
6477 * linux-low.c: Include <sys/personality.h>.
6478 Define ADDR_NO_RANDOMIZE if necessary.
6479 (linux_create_inferior): Disable address space randomization when
6480 forking inferior, if requested.
6481 (linux_supports_disable_randomization): New function.
6482 (linux_target_ops): Install it.
6483 * server.h (disable_randomization): Declare.
6484 * server.c (disable_randomization): New global variable.
6485 (handle_general_set): Handle QDisableRandomization.
6486 (handle_query): Likewise for qSupported.
6487 (main): Support --disable-randomization and --no-disable-randomization
6488 command line arguments.
6489 * target.h (struct target_ops): Add supports_disable_randomization.
6490 (target_supports_disable_randomization): New macro.
6491
6492 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6493
6494 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6495 ifdef check.
6496 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6497 [!PT_GETDSBT] (target_loadmap): New definition.
6498 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6499 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6500 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6501 and PT_GETDSBT to LINUX_LOADMAP.
6502 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6503 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6504
6505 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6506
6507 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6508 (arm_linux_hwbp_cap): New static variable.
6509 (arm_linux_get_hwbp_cap): Replace by ...
6510 (arm_linux_init_hwbp_cap): ... this new function.
6511 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6512 (arm_linux_get_hw_watchpoint_count): Likewise.
6513 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6514 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6515 (arm_prepare_to_resume): Use perror_with_name instead of error.
6516
6517 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6518
6519 * linux-arm-low.c: Include <signal.h>.
6520 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6521 (struct arm_linux_hwbp_cap): New data type.
6522 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6523 (struct arm_linux_hw_breakpoint): New data type.
6524 (MAX_BPTS, MAX_WPTS): Define.
6525 (struct arch_process_info, struct arch_lwp_info): New data types.
6526 (arm_linux_get_hwbp_cap): New function.
6527 (arm_linux_get_hw_breakpoint_count): Likewise.
6528 (arm_linux_get_hw_watchpoint_count): Likewise.
6529 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6530 (arm_hwbp_control_initialize): Likewise.
6531 (arm_hwbp_control_is_enabled): Likewise.
6532 (arm_hwbp_control_is_initialized): Likewise.
6533 (arm_hwbp_control_disable): Likewise.
6534 (arm_linux_hw_breakpoint_equal): Likewise.
6535 (arm_linux_hw_point_initialize): Likewise.
6536 (struct update_registers_data): New data structure.
6537 (update_registers_callback: New function.
6538 (arm_insert_point): Likewise.
6539 (arm_remove_point): Likewise.
6540 (arm_stopped_by_watchpoint): Likewise.
6541 (arm_stopped_data_address): Likewise.
6542 (arm_new_process): Likewise.
6543 (arm_new_thread): Likewise.
6544 (arm_prepare_to_resume): Likewise.
6545 (the_low_target): Register arm_insert_point, arm_remove_point,
6546 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6547 arm_new_thread, and arm_prepare_to_resume.
6548
6549 2011-09-15 Stan Shebs <stan@codesourcery.com>
6550
6551 * server.h (struct emit_ops): Add compare-goto fields.
6552 * tracepoint.c (gdb_agent_op_sizes): New table.
6553 (emit_eq_goto): New function.
6554 (emit_ne_goto): New function.
6555 (emit_lt_goto): New function.
6556 (emit_le_goto): New function.
6557 (emit_gt_goto): New function.
6558 (emit_ge_goto): New function.
6559 (is_goto_target): New function.
6560 (compile_bytecodes): Recognize special cases of compare-goto
6561 combinations and call specialized emitters for them.
6562 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6563 (amd64_emit_ne_goto): New function.
6564 (amd64_emit_lt_goto): New function.
6565 (amd64_emit_le_goto): New function.
6566 (amd64_emit_gt_goto): New function.
6567 (amd64_emit_ge_goto): New function.
6568 (amd64_emit_ops): Add the new functions.
6569 (i386_emit_eq_goto): New function.
6570 (i386_emit_ne_goto): New function.
6571 (i386_emit_lt_goto): New function.
6572 (i386_emit_le_goto): New function.
6573 (i386_emit_gt_goto): New function.
6574 (i386_emit_ge_goto): New function.
6575 (i386_emit_ops): Add the new functions.
6576
6577 2011-09-08 Stan Shebs <stan@codesourcery.com>
6578
6579 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6580 (i386_emit_epilogue): Restore %ebx.
6581
6582 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6583
6584 * server.c (step_thread): Remove definition.
6585 (process_serial_event): Don't handle Hs.
6586 * server.h (step_thread): Remove declaration.
6587 * target.c (set_desired_inferior): Remove use of step_thread.
6588
6589 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6590
6591 * linux-low.c: Include linux-procfs.h.
6592 (linux_attach_lwp_1): Update comments.
6593 (linux_attach): Scan for existing threads when attaching to a
6594 process that is the tgid.
6595 * Makefile.in: Update dependencies.
6596
6597 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6598
6599 * configure.srv: Add linux-procfs.o dependencies.
6600
6601 2011-08-14 Yao Qi <yao@codesourcery.com>
6602
6603 * target.h (struct target_ops): Fix indent.
6604 * win32-low.c (win32_target_ops): Fix comment.
6605
6606 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6607 Yao Qi <yao@codesourcery.com>
6608
6609 * Makefile.in (clean): Remove tic6x-*.c files.
6610 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6611 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6612 (tic6x-c64xp-linux.c): Likewise.
6613 * configure.srv: Add support for tic6x-*-uclinux.
6614 * linux-tic6x-low.c: New.
6615 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6616
6617 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6618 Yao Qi <yao@codesourcery.com>
6619
6620 * target.h (struct target_ops): Add read_loadmap.
6621 * linux-low.c (struct target_loadseg): New type.
6622 (struct target_loadmap): New type.
6623 (linux_read_loadmap): New function.
6624 (linux_target_ops): Add linux_read_loadmap.
6625 * server.c (handle_query): Support qXfer:fdpic:read packet.
6626 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6627 to NULL.
6628
6629 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6630
6631 * win32-low.c: Include <stdint.h>.
6632
6633 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6634
6635 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6636 to the inferior here.
6637 (i386_remove_aligned_watchpoint): Ditto.
6638 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6639 fit part of the watchpoint in the debug registers.
6640 (i386_update_inferior_debug_regs): New.
6641 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6642 registers, and only update the inferior on success.
6643 (i386_low_remove_watchpoint): Ditto.
6644
6645 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6646
6647 * linux-low.c (compare_ints, unique, list_threads, show_process,
6648 linux_core_of_thread): Delete.
6649 (linux_target_ops): Change linux_core_of_thread to
6650 linux_common_core_of_thread.
6651 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6652 * utils.c (malloc_failure): Change type of argument.
6653 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6654 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6655 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6656 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6657 (IPA_OBJS): Add common-utils-ipa.o.
6658 (ptid_h, linux_osdata_h): New macros.
6659 (server_h): Add common/common-utils.h, common/xml-utils.h,
6660 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6661 common/ptid.h.
6662 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6663 ptid.o, buffer.o): New rules.
6664 (linux-low.o): Add common/linux-osdata.h as a dependency.
6665 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6666 * configure.ac: Add AC_HEADER_DIRENT check.
6667 * config.in: Regenerate.
6668 * configure: Regenerate.
6669 * remote-utils.c (xml_escape_text): Delete.
6670 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6671 buffer_xml_printf): Move to common/buffer.c.
6672 * server.c (main): Remove call to initialize_inferiors.
6673 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6674 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6675 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6676 internal_error, gdb_assert, gdb_assert_fail): Delete.
6677 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6678 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6679 common/buffer.h.
6680 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6681 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6682 initialize_inferiors): Delete.
6683
6684 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6685
6686 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6687 symbol error.
6688
6689 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6690
6691 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6692 assertion.
6693 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6694
6695 2011-05-26 Yao Qi <yao@codesourcery.com>
6696
6697 * Makefile.in (thread-db.o): Track dependence to
6698 common/gdb_thread_db.h.
6699 * thread-db.c: include gdb_thread_db.h from right place.
6700
6701 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6702
6703 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6704 __FILE__ and __LINE__ to internal_error.
6705
6706 2011-05-13 Doug Evans <dje@google.com>
6707
6708 * thread-db.c (try_thread_db_load_from_sdir): New function.
6709 (try_thread_db_load_from_dir): New function.
6710 (thread_db_load_search): Handle $sdir, ignore $pdir.
6711 Remove trying of system directories if search of
6712 libthread-db-search-path fails, that is now done via $sdir.
6713
6714 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6715
6716 * server.c (handle_query): Add EnableDisableTracepoints to the list
6717 of supported features.
6718 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6719 tracepoints.
6720 (cmd_qtenable_disable): New.
6721 (cmd_qtstart): Install tracepoints even if disabled.
6722 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6723 receiving a QTEnable or QTDisable packet.
6724 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6725 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6726 tracepoints.
6727 (gdb_probe): Skip data collection if static tracepoint is disabled.
6728
6729 2011-05-10 Doug Evans <dje@google.com>
6730
6731 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6732
6733 2011-05-04 Doug Evans <dje@google.com>
6734
6735 * linux-low.c (linux_join): Skip process lookup.
6736 * spu-low.c (spu_join): Ditto.
6737 * server.c (join_inferiors_callback): Delete.
6738 (process_serial_event): For 'D' packet (detach) call join_inferior
6739 directly.
6740
6741 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6742
6743 * README: Don't mention xscale*-*-linux*.
6744 * configure.srv (xscale*-*-linux*): Don't handle target.
6745
6746 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6747
6748 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6749 casting pointers.
6750 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6751 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6752 (i386_emit_void_call_2): Likewise.
6753
6754 2011-04-26 Yao Qi <yao@codesourcery.com>
6755
6756 * linux-low.c: Move common macros to linux-ptrace.h.
6757 Include linux-ptrace.h.
6758 * Makefile.in (linux_ptrace_h): New.
6759 (linux-low.o): Depends on linux-ptrace.h.
6760
6761 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6762
6763 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6764 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6765 (remote_prepare): New function with most of the TCP code from ...
6766 (remote_open): ... here. Detect PORT here unconditionally. Move also
6767 setting transport_is_reliable.
6768 * server.c (run_once): New variable.
6769 (gdbserver_usage): Document it.
6770 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6771 the first run if RUN_ONCE.
6772 * server.h (run_once, remote_prepare): New declarations.
6773
6774 2011-04-19 Tom Tromey <tromey@redhat.com>
6775
6776 * win32-low.c (handle_load_dll): Remove duplicate "the".
6777
6778 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6779
6780 Remove support for old Cygwin 1.5 versions.
6781 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6782 function to avoid warning.
6783 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6784 warning.
6785
6786 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6787
6788 * gdbserver/server.h (Macro _): Define it if not available.
6789
6790 2011-03-14 Michael Snyder <msnyder@vmware.com>
6791
6792 * hostio.c (handle_close): Remove unnecessary null test.
6793
6794 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6795
6796 * Makefile.in (maintainer-clean realclean distclean): Remove
6797 "make ... subdir_do" command.
6798
6799 2011-03-10 Michael Snyder <msnyder@vmware.com>
6800
6801 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6802
6803 * server.c (handle_v_run): Free alloced buffer on early return.
6804
6805 2011-03-09 Yao Qi <yao@codesourcery.com>
6806
6807 Revert:
6808 2011-03-04 Yao Qi <yao@codesourcery.com>
6809
6810 * Makefile.in: Remove GNU make feature --directory.
6811
6812 2011-03-05 Yao Qi <yao@codesourcery.com>
6813
6814 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6815 (subdir_do): New make target. Copied from gdb/Makefile.
6816 (maintainer-clean, realclean, distclean, clean): Call corresponding
6817 make targets in common/Makefile.
6818
6819 2011-02-11 Yao Qi <yao@codesourcery.com>
6820
6821 * configure.ac: Call AC_PROG_RANLIB.
6822 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6823 * configure: Regenerate.
6824
6825 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6826
6827 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6828
6829 2011-03-06 Yao Qi <yao@codesourcery.com>
6830
6831 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6832
6833 2011-03-05 Yao Qi <yao@codesourcery.com>
6834
6835 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6836 (subdir_do): New make target. Copied from gdb/Makefile.
6837 (maintainer-clean, realclean, distclean, clean): Call corresponding
6838 make targets in common/Makefile.
6839
6840 2011-03-04 Yao Qi <yao@codesourcery.com>
6841
6842 * Makefile.in: Remove GNU make feature --directory.
6843
6844 2011-03-04 Michael Snyder <msnyder@vmware.com>
6845
6846 * server.c (queue_stop_reply): Call xmalloc not malloc.
6847
6848 2011-03-02 Michael Snyder <msnyder@vmware.com>
6849
6850 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6851
6852 2011-02-28 Michael Snyder <msnyder@vmware.com>
6853
6854 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6855 (cmd_qtframe): Ditto.
6856 (cmd_qtbuffer): Ditto.
6857 (cmd_bigqtbuffer): Ditto.
6858
6859 * utils.c (decimal2str): Initialize 'width' to nine, then
6860 don't mess with it.
6861
6862 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6863
6864 * hostio.c (require_data): Free *data, not data.
6865
6866 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6867
6868 * hostio.c (require_data): Use free, not xfree.
6869
6870 2011-02-27 Michael Snyder <msnyder@vmware.com>
6871
6872 * server.c (handle_query): Discard unused value.
6873
6874 * hostio.c (require_data): Free malloc memory before returning
6875 error.
6876
6877 2011-02-26 Michael Snyder <msnyder@vmware.com>
6878
6879 * linux-low.c (list_threads): Call closedir for dirent.
6880
6881 2011-02-27 Michael Snyder <msnyder@vmware.com>
6882
6883 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6884 a case statement falls through.
6885
6886 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6887
6888 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6889 in comparison.
6890
6891 2011-02-26 Michael Snyder <msnyder@vmware.com>
6892
6893 * utils.c (decimal2str): Eliminate dead code and dead param.
6894 (pulongest): Drop dead param from call to decimal2str.
6895 (plongest): Ditto.
6896
6897 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6898
6899 Revert the following patch (not approved yet):
6900 2011-02-21 Hui Zhu <teawater@gmail.com>
6901 * tracepoint.c (tp_printf): New function.
6902 (eval_agent_expr): Handle gdb_agent_op_printf.
6903
6904 2011-02-21 Hui Zhu <teawater@gmail.com>
6905
6906 * tracepoint.c (tp_printf): New function.
6907 (eval_agent_expr): Handle gdb_agent_op_printf.
6908
6909 2011-02-18 Tom Tromey <tromey@redhat.com>
6910
6911 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6912 (tracepoint.o): Likewise.
6913 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6914 (gdb_agent_op_names): Likewise.
6915
6916 2011-02-18 Tom Tromey <tromey@redhat.com>
6917
6918 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6919 gdb_agent_op_rot>: New constants.
6920 (gdb_agent_op_names): Add pick and roll.
6921 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6922 cases.
6923
6924 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6925
6926 * aclocal.m4: Regenerated with aclocal-1.11.1.
6927
6928 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6929
6930 * server.c (handle_qxfer_traceframe_info): New.
6931 (qxfer_packets): Register "traceframe-info".
6932 (handle_query): Report support for qXfer:traceframe-info:read+.
6933 * tracepoint.c (match_blocktype): New.
6934 (traceframe_find_block_type): Rename to ...
6935 (traceframe_walk_blocks): ... this. Add callback filter argument,
6936 and use it.
6937 (traceframe_find_block_type): New, reimplemented on top of
6938 traceframe_walk_blocks.
6939 (build_traceframe_info_xml): New.
6940 (traceframe_read_info): New.
6941 * server.h (traceframe_read_info): Declare.
6942
6943 2011-02-11 Yao Qi <yao@codesourcery.com>
6944
6945 * configure.ac: Call AC_PROG_RANLIB.
6946 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6947 * configure: Regenerate.
6948
6949 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6950
6951 * server.c (gdb_read_memory): Change return semantics to allow
6952 partial transfers.
6953 (handle_search_memory_1): Adjust.
6954 (process_serial_event) <'m' packet>: Handle partial transfers.
6955 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6956
6957 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6958
6959 * regcache.c (init_register_cache): Initialize
6960 regcache->register_status.
6961 (free_register_cache): Release regcache->register_status.
6962 (regcache_cpy): Copy register_status.
6963 (registers_to_string): Print 'x's for unavailable registers.
6964 (supply_register): Mark the register's status valid or
6965 unavailable, depending on whether a buffer was passed in or not.
6966 (supply_register_zeroed): New.
6967 (supply_regblock): Mark the registers' status valid or
6968 unavailable, depending on whether a buffer was passed in or not.
6969 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6970 (struct regcache): New `register_status' field.
6971 (supply_register_zeroed): Declare.
6972 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6973 supply_register_zeroed, rather than passing a NULL buffer to
6974 supply_register.
6975 * tracepoint.c (fetch_traceframe_registers): Update comment.
6976
6977 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6978
6979 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6980 buffer explicit.
6981
6982 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6983
6984 * server.h (decode_xfer_write): Change prototype.
6985 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6986 and don't extract the annex here.
6987 * server.c (decode_xfer_read): Remove `annex' parameter,
6988 and don't extract the annex here.
6989 (decode_xfer): New.
6990 (struct qxfer): New.
6991 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6992 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6993 (handle_qxfer_statictrace): New functions, abstracted out from
6994 handle_query, and made to use the struct qxfer interface.
6995 (handle_threads_qxfer_proper): Rename to ...
6996 (handle_qxfer_threads_proper): ... this.
6997 (handle_threads_qxfer): Rename to ...
6998 (handle_qxfer_threads): ... this. Adjust.
6999 (qxfer_packets): New array.
7000 (handle_qxfer): New function.
7001 (handle_query): Use handle_qxfer.
7002
7003 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7004
7005 * gdbreplay.c: Shorten lines of >= 80 columns.
7006 * linux-low.c: Ditto.
7007 * linux-ppc-low.c: Ditto.
7008 * linux-s390-low.c: Ditto.
7009 * linux-sparc-low.c: Ditto.
7010 * linux-x86-low.c: Ditto.
7011 * linux-xtensa-low.c: Ditto.
7012 * mem-break.c: Ditto.
7013 * nto-low.c: Ditto.
7014 * regcache.h: Ditto.
7015 * remote-utils.c: Ditto.
7016 * server.c: Ditto.
7017 * server.h: Ditto.
7018 * thread-db.c: Ditto.
7019 * tracepoint.c: Ditto.
7020 * utils.c: Ditto.
7021 * win32-low.h: Ditto.
7022
7023 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7024
7025 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7026 update.
7027
7028 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7029
7030 * server.c (gdbserver_version): Update copyright year in version
7031 output.
7032 * gdbreplay.c (gdbreplay_version): Ditto.
7033
7034 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7035
7036 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7037 * linux-bfin-low.c: New file.
7038 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7039 PT_DATA_ADDR for BFIN targets.
7040 * Makefile.in (SFILES): Add linux-bfin-low.c.
7041 (clean): Remove reg-bfin.c.
7042 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7043 * README: Mention supported Blackfin targets.
7044
7045 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7046
7047 * .gitignore: New file.
7048
7049 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7050
7051 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7052
7053 2010-10-22 Jie Zhang <jie@codesourcery.com>
7054
7055 * Makefile.in: Add FLAGS_TO_PASS variable.
7056 (install): Remove dependency of install-only and recursively
7057 invoke make for install-only.
7058
7059 2010-10-04 Doug Evans <dje@google.com>
7060
7061 * Makefile.in (uninstall): Use $(DESTDIR).
7062
7063 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7064
7065 PR gdb/11842
7066
7067 * linux-x86-low.c (compat_siginfo_from_siginfo)
7068 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7069 si_code is < 0. Check for si_code == SI_TIMER before checking for
7070 si_code < 0.
7071
7072 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7073
7074 * lynx-i386-low.c: New file.
7075 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7076
7077 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7078
7079 * lynx-low.c (ptrace_request_to_str): Remove handling for
7080 request values that have been removed in LynxOS 5.x.
7081
7082 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7083
7084 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7085 <ptrace.h>
7086
7087 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7088
7089 * configure.ac: Add --enable-inprocess-agent option.
7090 * configure: Rebuilt.
7091
7092 2010-09-06 Yao Qi <yao@codesourcery.com>
7093
7094 * linux-low.c (linux_kill): Remove unused variable.
7095 (linux_stabilize_threads): Likewise.
7096 * server.c (start_inferior): Likewise.
7097 (queue_stop_reply_callback): Likewise.
7098 * tracepoint.c (do_action_at_tracepoint): Likewise.
7099
7100 2010-09-06 Yao Qi <yao@codesourcery.com>
7101
7102 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7103 on return.
7104
7105 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7106
7107 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7108
7109 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7110
7111 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7112 "$(IPA_DEPFILES)".
7113
7114 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7115
7116 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7117 gdbserver/lynx-ppc-low.c: New files.
7118 * Makefile.in (lynx_low_h): New variable.
7119 (lynx-low.o, lynx-ppc-low.o): New rules.
7120 * configure.ac: On LynxOS, link with -lnetinet.
7121 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7122 * configure: regenerate.
7123
7124 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7125
7126 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7127 * configure.ac: Add check for vasprintf and vsnprintf.
7128 * configure, config.in: Regenerate.
7129 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7130
7131 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7132
7133 * gdbreplay.c: Move include of alloca.h up, next to include of
7134 malloc.h.
7135 * server.h: Add include of malloc.h.
7136 * mem-break.c: Remove include of malloc.h.
7137 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7138
7139 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7140
7141 * Makefile.in (memmem.o): Build with -Wno-error.
7142
7143 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7144
7145 * utils.c (xsnprintf): Make non-static.
7146 * server.h: Add xsnprintf declaration.
7147 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7148 replace calls to snprintf by calls to xsnprintf throughout.
7149
7150 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7151
7152 * configure.ac: Add configure check for alloca.
7153 * configure, config.in: Regenerate.
7154 * server.h: Include alloca.h if it exists.
7155 * gdbreplay.c: Include alloca.h if it exists.
7156
7157 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7158
7159 * linux-low.c (__SIGRTMIN): Define if not already defined.
7160 (linux_create_inferior): Check for __ANDROID__ rather than
7161 __SIGRTMIN.
7162 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7163 are already deferred.
7164 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7165 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7166 stopped and already has a pending signal to report.
7167 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7168 a pending signal to report or is moving out of a jump pad.
7169 (linux_init_signals): Check for __ANDROID__ rather than
7170 __SIGRTMIN.
7171
7172 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7173
7174 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7175 debug_threads check. Avoid a linear search when not doing debug
7176 output.
7177
7178 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7179
7180 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7181 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7182 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7183 (process_event): Change local fd's type to gdb_fildes_t.
7184 (create_file_handler): Adjust prototype.
7185 (delete_file_handler): Adjust prototype.
7186 (handle_file_event): Adjust prototype. Use pfildes.
7187 (create_file_event): Adjsut prototype.
7188 * remote-utils.c (remote_desc, listen_desc): Change type to
7189 gdb_fildes_t.
7190 * server.h: New gdb_fildes_t typedef.
7191 [USE_WIN32API]: Include winsock2.h.
7192 (delete_file_handler, add_file_handler): Adjust prototypes.
7193 (pfildes): Declare.
7194 * utils.c (pfildes): New.
7195
7196 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7197
7198 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7199 * configure: Regenerate.
7200
7201 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7202
7203 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7204 (linux_done_accessing_memory): ... this.
7205 (linux_target_ops): Adjust.
7206 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7207 * nto-low.c (nto_target_ops): Adjust comment.
7208 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7209 * spu-low.c (spu_target_ops): Adjust comment.
7210 * target.h (target_ops): Rename unprepare_to_access_memory field
7211 to done_accessing_memory.
7212 (unprepare_to_access_memory): Rename to ...
7213 (done_accessing_memory): ... this.
7214
7215 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7216
7217 * linux-low.c (linux_prepare_to_access_memory): New.
7218 (linux_unprepare_to_access_memory): New.
7219 (linux_target_ops): Install them.
7220 * server.c (read_memory): Rename to ...
7221 (gdb_read_memory): ... this. Use
7222 prepare_to_access_memory/prepare_to_access_memory.
7223 (write_memory): Rename to ...
7224 (gdb_write_memory): ... this. Use
7225 prepare_to_access_memory/prepare_to_access_memory.
7226 (handle_search_memory_1): Adjust.
7227 (process_serial_event): Adjust.
7228 * target.h (struct target_ops): New fields
7229 prepare_to_access_memory and unprepare_to_access_memory.
7230 (prepare_to_access_memory, unprepare_to_access_memory): New.
7231 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7232 prepare_to_access_memory/prepare_to_access_memory.
7233 * nto-low.c (nto_target_ops): Adjust.
7234 * spu-low.c (spu_target_ops): Adjust.
7235 * win32-low.c (win32_target_ops): Adjust.
7236
7237 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7238
7239 * Makefile.in (WARN_CFLAGS): Get it from configure.
7240 (WERROR_CFLAGS): New.
7241 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7242 * configure.ac: Introduce --enable-werror, which adds -Werror to
7243 the compiler command line. Enabled by default. Disable with
7244 --disable-werror. Add -Wdeclaration-after-statement
7245 Wpointer-arith and -Wformat-nonliteral to warning flags.
7246 * configure: Regenerate.
7247
7248 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7249
7250 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7251
7252 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7253
7254 * gdbreplay.c (remote_error): New.
7255 (gdbchar): New.
7256 (expect): Use gdbchar. Check for error reading from GDB.
7257 Clarify sync error output.
7258 (play): Check for errors writing to GDB.
7259 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7260 * remote-utils.c (getpkt): Check for errors writing to the remote
7261 descriptor.
7262
7263 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7264
7265 * linux-low.c (linux_wait_1): Move non-debugging code out of
7266 `debug_threads' control.
7267
7268 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7269
7270 * linux-low.c (linux_wait_1): Don't set last_status here.
7271 * server.c (push_event, queue_stop_reply_callback): Assert we're
7272 not pushing a TARGET_WAITKIND_IGNORE event.
7273 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7274 (myresume, handle_target_event): Set the thread's last_resume_kind
7275 and last_status from the target returned status.
7276
7277 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7278
7279 PR threads/10729
7280
7281 * linux-x86-low.c (update_debug_registers_callback): New.
7282 (i386_dr_low_set_addr): Use it.
7283 (i386_dr_low_get_addr): New.
7284 (i386_dr_low_set_control): Use update_debug_registers_callback.
7285 (i386_dr_low_get_control): New.
7286 (i386_dr_low_get_status): Adjust.
7287 * linux-low.c (linux_stop_lwp): New.
7288 * linux-low.h (linux_stop_lwp): Declare.
7289
7290 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7291 argument instead of a i386_debug_reg_state.
7292 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7293 a i386_debug_reg_state.
7294 (i386_insert_aligned_watchpoint): Adjust.
7295 (i386_remove_aligned_watchpoint): Adjust.
7296 (i386_low_stopped_data_address): Read the debug registers from the
7297 inferior instead of from the mirrors.
7298 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7299 (i386_dr_low_get_addr): Declare.
7300 (i386_dr_low_get_control): Declare.
7301 (i386_dr_low_get_status): Change prototype.
7302
7303 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7304 (i386_dr_low_get_addr): New.
7305 (i386_dr_low_get_control): New.
7306 (i386_dr_low_get_status): Adjust prototype. Return
7307 dr_status_mirror.
7308 (i386_initial_stuff): Clear dr_status_mirror and
7309 dr_control_mirror.
7310 (i386_get_thread_context): Adjust.
7311 (i386_set_thread_context): Adjust.
7312 (i386_thread_added): Adjust.
7313
7314 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7315
7316 * linux-low.h (linux_thread_area): Delete declaration.
7317
7318 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7319
7320 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7321 after its termination.
7322
7323 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7324
7325 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7326 (gdb_wants_all_stopped): Delete.
7327 (linux_wait_1): Don't call them.
7328 * server.c (handle_v_cont): Tag all threads as want-stopped.
7329 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7330 stopped as "client-wants-stopped".
7331
7332 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7333
7334 * Makefile.in (signals_h): New.
7335 (server_h): Depend on it.
7336 (server.o): Don't depend on $(signals_def).
7337 (signals.o): Depend on $(signals_def).
7338
7339 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7340
7341 * Makefile.in (signals_def): New.
7342 (server_h): Append include/gdb/signals.h and signals_def.
7343 (server.o): Append signals_def.
7344
7345 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7346
7347 * server.c (handle_target_event): Use target_signal_to_host for
7348 resume_info.sig initialization.
7349 * target.h (struct thread_resume) <sig>: New comment.
7350
7351 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7352
7353 * server.c (handle_query): strcpy() the returned string from paddress()
7354 instead of sprintf().
7355 * utils.c (paddress): Return phex_nz().
7356
7357 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7358
7359 * server.c (handle_v_cont): Call mourn_inferior if process
7360 just exited.
7361 (myresume): Likewise.
7362
7363 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7364
7365 Static tracepoints, and integration with UST.
7366
7367 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7368 * mem-break.c (uninsert_all_breakpoints)
7369 (reinsert_all_breakpoints): New.
7370 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7371 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7372 (gdb_agent_ust_loaded, helper_thread_id)
7373 (gdb_agent_helper_thread_id): New macros.
7374 (struct ipa_sym_addresses): Add addr_ust_loaded,
7375 addr_helper_thread_id, addr_cmd_buf.
7376 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7377 (in_process_agent_loaded_ust): New.
7378 (write_e_ust_not_loaded): New.
7379 (maybe_write_ipa_ust_not_loaded): New.
7380 (struct collect_static_trace_data_action): New.
7381 (enum tracepoint_type) <static_tracepoint>: New.
7382 (struct tracepoint) <handle>: Mention static tracepoints.
7383 (struct static_tracepoint_ctx): New.
7384 (CMD_BUF_SIZE): New.
7385 (add_tracepoint_action): Handle static tracepoint actions.
7386 (unprobe_marker_at): New.
7387 (clear_installed_tracepoints): Handle static tracepoints.
7388 (cmd_qtdp): Handle static tracepoints.
7389 (probe_marker_at): New.
7390 (cmd_qtstart): Handle static tracepoints.
7391 (response_tracepoint): Handle static tracepoints.
7392 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7393 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7394 (get_context_regcache): Handle static tracepoints.
7395 (do_action_at_tracepoint): Handle static tracepoint actions.
7396 (traceframe_find_block_type): Handle static trace data blocks.
7397 (traceframe_read_sdata): New.
7398 (download_tracepoints): Download static tracepoint actions.
7399 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7400 (GDB_PROBE_NAME): New.
7401 (ust_ops): New.
7402 (GET_UST_SYM): New.
7403 (USTF): New.
7404 (dlsym_ust): New.
7405 (ust_marker_to_static_tracepoint): New.
7406 (gdb_probe): New.
7407 (collect_ust_data_at_tracepoint): New.
7408 (gdb_ust_probe): New.
7409 (UNIX_PATH_MAX, SOCK_DIR): New.
7410 (gdb_ust_connect_sync_socket): New.
7411 (resume_thread, stop_thread): New.
7412 (run_inferior_command): New.
7413 (init_named_socket): New.
7414 (gdb_ust_socket_init): New.
7415 (cstr_to_hexstr): New.
7416 (next_st): New.
7417 (first_marker, next_marker): New.
7418 (response_ust_marker): New.
7419 (cmd_qtfstm, cmd_qtsstm): New.
7420 (unprobe_marker_at, probe_marker_at): New.
7421 (cmd_qtstmat, gdb_ust_thread): New.
7422 (gdb_ust_init): New.
7423 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7424 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7425 (ST_REGENTRY): New.
7426 (x86_64_st_collect_regmap): New.
7427 (X86_64_NUM_ST_COLLECT_GREGS): New.
7428 (AMD64_RIP_REGNUM): New.
7429 (supply_static_tracepoint_registers): New.
7430 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7431 (ST_REGENTRY): New.
7432 (i386_st_collect_regmap): New.
7433 (i386_NUM_ST_COLLECT_GREGS): New.
7434 (supply_static_tracepoint_registers): New.
7435 * server.c (handle_query): Handle qXfer:statictrace:read.
7436 <qSupported>: Report support for StaticTracepoints, and
7437 qXfer:statictrace:read features.
7438 * server.h (traceframe_read_sdata)
7439 (supply_static_tracepoint_registers): Declare.
7440 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7441 (unpack_varlen_hex): Include in IPA build.
7442 * Makefile.in (ustlibs, ustinc): New.
7443 (IPA_OBJS): Add remote-utils-ipa.o.
7444 ($(IPA_LIB)): Link -ldl and -lpthread.
7445 (UST_CFLAGS): New.
7446 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7447 * config.in, configure: Regenerate.
7448
7449 2010-06-20 Ian Lance Taylor <iant@google.com>
7450 Pedro Alves <pedro@codesourcery.com>
7451
7452 * linux-x86-low.c (always_true): Delete.
7453 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7454 trying to fool the compiler with always_true.
7455
7456 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7457
7458 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7459 conditions in gdbserver.
7460
7461 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7462
7463 * spu-low.c (spu_read_memory): Wrap around local store limit.
7464 (spu_write_memory): Likewise.
7465
7466 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7467
7468 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7469 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7470 LONGEST uses.
7471 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7472 uses.
7473 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7474 uses with LONGEST uses.
7475
7476 2010-06-14 Stan Shebs <stan@codesourcery.com>
7477 Pedro Alves <pedro@codesourcery.com>
7478
7479 Bytecode compiler.
7480
7481 * linux-x86-low.c: Include limits.h.
7482 (add_insns): New.
7483 (always_true): New.
7484 (EMIT_ASM): New.
7485 (EMIT_ASM32): New.
7486 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7487 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7488 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7489 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7490 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7491 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7492 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7493 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7494 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7495 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7496 (amd64_emit_void_call_2): New.
7497 (amd64_emit_ops): New.
7498 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7499 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7500 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7501 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7502 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7503 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7504 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7505 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7506 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7507 (i386_emit_stack_adjust, i386_emit_int_call_1)
7508 (i386_emit_void_call_2): New.
7509 (i386_emit_ops): New.
7510 (x86_emit_ops): New.
7511 (the_low_target): Install x86_emit_ops.
7512 * server.h (struct emit_ops): New.
7513 (get_raw_reg_func_addr): Declare.
7514 (current_insn_ptr, emit_error): Declare.
7515 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7516 (set_trace_state_variable_value): New defines.
7517 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7518 addr_get_trace_state_variable_value and
7519 addr_set_trace_state_variable_value.
7520 (symbol_list): New fields for get_raw_reg,
7521 get_trace_state_variable_value and set_trace_state_variable_value.
7522 (condfn): New typedef.
7523 (struct tracepoint): New field `compiled_cond'.
7524 (do_action_at_tracepoint): Clear compiled_cond.
7525 (get_trace_state_variable_value, set_trace_state_variable_value):
7526 Export in the IPA.
7527 (condition_true_at_tracepoint): If there's a compiled condition,
7528 run that.
7529 (current_insn_ptr, emit_error): New globals.
7530 (struct bytecode_address): New.
7531 (get_raw_reg_func_addr): New.
7532 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7533 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7534 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7535 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7536 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7537 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7538 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7539 (compile_tracepoint_condition, compile_bytecodes): New.
7540 * target.h (emit_ops): Forward declare.
7541 (struct target_ops): New field emit_ops.
7542 (target_emit_ops): New.
7543 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7544 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7545 * linux-low.c (linux_emit_ops): New.
7546 (linux_target_ops): Install it.
7547 * linux-low.h (struct linux_target_ops): New field emit_ops.
7548
7549 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7550
7551 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7552 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7553
7554 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7555 Stan Shebs <stan@codesourcery.com>
7556
7557 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7558 (all): Depend on $(extra_libraries).
7559 (install-only): Install the IPA.
7560 (IPA_OBJS, IPA_LIB): New.
7561 (clean): Remove the IPA lib.
7562 (IPAGENT_CFLAGS): New.
7563 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7564 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7565 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7566 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7567 * configure.ac: Check for atomic builtins support in the compiler.
7568 (IPA_DEPFILES, extra_libraries): Define.
7569 * configure.srv (ipa_obj): Add description.
7570 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7571 (i[34567]86-*-linux*): Set ipa_obj.
7572 (x86_64-*-linux*): Set ipa_obj.
7573 * linux-low.c (stabilizing_threads): New.
7574 (supports_fast_tracepoints): New.
7575 (linux_detach): Stabilize threads before detaching.
7576 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7577 the lwp is either not stabilizing, or is moving out of a jump pad.
7578 (linux_fast_tracepoint_collecting): New.
7579 (maybe_move_out_of_jump_pad): New.
7580 (enqueue_one_deferred_signal): New.
7581 (dequeue_one_deferred_signal): New.
7582 (linux_wait_for_event_1): If moving out of a jump pad, defer
7583 pending signals to later.
7584 (linux_stabilize_threads): New.
7585 (linux_wait_1): Check if threads need moving out of jump pads, and
7586 do it if so.
7587 (stuck_in_jump_pad_callback): New.
7588 (move_out_of_jump_pad_callback): New.
7589 (lwp_running): New.
7590 (linux_resume_one_lwp): Handle moving out of jump pads.
7591 (linux_set_resume_request): Dequeue deferred signals.
7592 (need_step_over_p): Also step over fast tracepoint jumps.
7593 (start_step_over): Also uninsert fast tracepoint jumps.
7594 (finish_step_over): Also reinsert fast tracepoint jumps.
7595 (linux_install_fast_tracepoint_jump): New.
7596 (linux_target_ops): Install linux_stabilize_threads and
7597 linux_install_fast_tracepoint_jump_pad.
7598 * linux-low.h (linux_target_ops) <get_thread_area,
7599 install_fast_tracepoint_jump_pad>: New fields.
7600 (struct lwp_info) <collecting_fast_tracepoint,
7601 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7602 (linux_get_thread_area): Declare.
7603 * linux-x86-low.c (jump_insn): New.
7604 (x86_get_thread_area): New.
7605 (append_insns): New.
7606 (push_opcode): New.
7607 (amd64_install_fast_tracepoint_jump_pad): New.
7608 (i386_install_fast_tracepoint_jump_pad): New.
7609 (x86_install_fast_tracepoint_jump_pad): New.
7610 (the_low_target): Install x86_get_thread_area and
7611 x86_install_fast_tracepoint_jump_pad.
7612 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7613 (struct fast_tracepoint_jump): New.
7614 (fast_tracepoint_jump_insn): New.
7615 (fast_tracepoint_jump_shadow): New.
7616 (find_fast_tracepoint_jump_at): New.
7617 (fast_tracepoint_jump_here): New.
7618 (delete_fast_tracepoint_jump): New.
7619 (set_fast_tracepoint_jump): New.
7620 (uninsert_fast_tracepoint_jumps_at): New.
7621 (reinsert_fast_tracepoint_jumps_at): New.
7622 (set_breakpoint_at): Use write_inferior_memory.
7623 (uninsert_raw_breakpoint): Use write_inferior_memory.
7624 (check_mem_read): Mask out fast tracepoint jumps.
7625 (check_mem_write): Mask out fast tracepoint jumps.
7626 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7627 (set_fast_tracepoint_jump): Declare.
7628 (delete_fast_tracepoint_jump)
7629 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7630 (reinsert_fast_tracepoint_jumps_at): Declare.
7631 * regcache.c: Don't compile many functions when building the
7632 in-process agent library.
7633 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7634 the register buffer in the heap.
7635 (free_register_cache): If the register buffer isn't owned by the
7636 regcache, don't free it.
7637 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7638 pre-existing register caches.
7639 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7640 type.
7641 (convert_ascii_to_int): : Constify `from' parameter type.
7642 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7643 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7644 the needed buffer in-place.
7645 (relocate_instruction): New.
7646 * server.c (handle_query) <qSymbols>: If the target supports
7647 tracepoints, give it a chance of looking up symbols. Report
7648 support for fast tracepoints.
7649 (handle_status): Stabilize threads.
7650 (process_serial_event): Adjust.
7651 * server.h (struct fast_tracepoint_jump): Forward declare.
7652 (struct process_info) <fast_tracepoint_jumps>: New field.
7653 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7654 (decode_X_packet, decode_M_packet): Adjust.
7655 (relocate_instruction): Declare.
7656 (in_process_agent_loaded): Declare.
7657 (tracepoint_look_up_symbols): Declare.
7658 (struct fast_tpoint_collect_status): Declare.
7659 (fast_tracepoint_collecting): Declare.
7660 (force_unlock_trace_buffer): Declare.
7661 (handle_tracepoint_bkpts): Declare.
7662 (initialize_low_tracepoint)
7663 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7664 * target.h (struct target_ops) <stabilize_threads,
7665 install_fast_tracepoint_jump_pad>: New fields.
7666 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7667 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7668 [HAVE_STDINT_H]: Include stdint.h.
7669 (trace_debug_1): Rename to ...
7670 (trace_vdebug): ... this.
7671 (trace_debug): Rename to ...
7672 (trace_debug_1): ... this. Add `level' parameter.
7673 (trace_debug): New.
7674 (ATTR_USED, ATTR_NOINLINE): New.
7675 (IP_AGENT_EXPORT): New.
7676 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7677 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7678 (about_to_request_buffer_space, trace_buffer_is_full)
7679 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7680 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7681 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7682 (traceframe_write_count, traceframes_created)
7683 (trace_state_variables)
7684 New renaming defines.
7685 (struct ipa_sym_addresses): New.
7686 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7687 (symbol_list): New.
7688 (ipa_sym_addrs): New.
7689 (all_tracepoint_symbols_looked_up): New.
7690 (in_process_agent_loaded): New.
7691 (write_e_ipa_not_loaded): New.
7692 (maybe_write_ipa_not_loaded): New.
7693 (tracepoint_look_up_symbols): New.
7694 (debug_threads) [IN_PROCESS_AGENT]: New.
7695 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7696 (UNKNOWN_SIDE_EFFECTS): New.
7697 (stop_tracing): New.
7698 (flush_trace_buffer): New.
7699 (stop_tracing_bkpt): New.
7700 (flush_trace_buffer_bkpt): New.
7701 (read_inferior_integer): New.
7702 (read_inferior_uinteger): New.
7703 (read_inferior_data_pointer): New.
7704 (write_inferior_data_pointer): New.
7705 (write_inferior_integer): New.
7706 (write_inferior_uinteger): New.
7707 (struct collect_static_trace_data_action): Delete.
7708 (enum tracepoint_type): New.
7709 (struct tracepoint) <type>: New field `type'.
7710 <actions_str, step_actions, step_actions_str>: Only include in
7711 GDBserver.
7712 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7713 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7714 (tracepoints): Use IP_AGENT_EXPORT.
7715 (last_tracepoint): Don't include in the IPA.
7716 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7717 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7718 (alloced_trace_state_variables): New.
7719 (trace_state_variables): Use IP_AGENT_EXPORT.
7720 (traceframe_t): Delete unused variable.
7721 (circular_trace_buffer): Don't include in the IPA.
7722 (trace_buffer_start): Delete.
7723 (struct trace_buffer_control): New.
7724 (trace_buffer_free): Delete.
7725 (struct ipa_trace_buffer_control): New.
7726 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7727 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7728 New.
7729 (trace_buffer_ctrl): New.
7730 (TRACE_BUFFER_CTRL_CURR): New.
7731 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7732 Reimplement as macros.
7733 (trace_buffer_wrap): Delete.
7734 (traceframe_write_count, traceframe_read_count)
7735 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7736 (struct tracepoint_hit_ctx) <type>: New field.
7737 (struct fast_tracepoint_ctx): New.
7738 (memory_barrier): New.
7739 (cmpxchg): New.
7740 (record_tracepoint_error): Update atomically in the IPA.
7741 (clear_inferior_trace_buffer): New.
7742 (about_to_request_buffer_space): New.
7743 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7744 updating the same buffer.
7745 (add_tracepoint): Default the tracepoint's type to trap
7746 tracepoint, and orig_size to -1.
7747 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7748 internal variables.
7749 (create_trace_state_variable): New parameter `gdb'. Handle it.
7750 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7751 (cmd_qtdp): Handle fast tracepoints.
7752 (cmd_qtdv): Adjust.
7753 (max_jump_pad_size): New.
7754 (gdb_jump_pad_head): New.
7755 (get_jump_space_head): New.
7756 (claim_jump_space): New.
7757 (sort_tracepoints): New.
7758 (MAX_JUMP_SIZE): New.
7759 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7760 IPA.
7761 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7762 support. Upload fast traceframes, and delete internal IPA
7763 breakpoints.
7764 (stop_tracing_handler): New.
7765 (flush_trace_buffer_handler): New.
7766 (cmd_qtstop): Upload fast tracepoints.
7767 (response_tracepoint): Handle fast tracepoints.
7768 (tracepoint_finished_step): Upload fast traceframes. Set the
7769 tracepoint hit context's tracepoint type.
7770 (handle_tracepoint_bkpts): New.
7771 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7772 type. Add comment about fast tracepoints.
7773 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7774 non-existing action_str field.
7775 (get_context_regcache): Handle fast tracepoints.
7776 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7777 to the regcache.
7778 (fast_tracepoint_from_jump_pad_address): New.
7779 (fast_tracepoint_from_ipa_tpoint_address): New.
7780 (collecting_t): New.
7781 (force_unlock_trace_buffer): New.
7782 (fast_tracepoint_collecting): New.
7783 (collecting): New.
7784 (gdb_collect): New.
7785 (write_inferior_data_ptr): New.
7786 (target_tp_heap): New.
7787 (target_malloc): New.
7788 (download_agent_expr): New.
7789 (UALIGN): New.
7790 (download_tracepoints): New.
7791 (download_trace_state_variables): New.
7792 (upload_fast_traceframes): New.
7793 (IPA_FIRST_TRACEFRAME): New.
7794 (IPA_NEXT_TRACEFRAME_1): New.
7795 (IPA_NEXT_TRACEFRAME): New.
7796 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7797 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7798 (gdb_jump_pad_buffer_end): New.
7799 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7800 (initialize_tracepoint): Adjust.
7801 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7802 buffer. Initialize the low module.
7803 * utils.c (PREFIX, TOOLNAME): New.
7804 (malloc_failure): Use PREFIX.
7805 (error): In the IPA, an error causes an exit.
7806 (fatal, warning): Use PREFIX.
7807 (internal_error): Use TOOLNAME.
7808 (NUMCELLS): Increase to 10.
7809 * configure, config.in: Regenerate.
7810
7811 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7812
7813 * server.c (handle_query) <qSupported>: Do two passes over the
7814 qSupported string to avoid nesting strtok.
7815
7816 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7817
7818 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7819 (CDEPS): New.
7820 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7821 -Wl,--dynamic-list.
7822 * configure: Regenerate.
7823 * proc-service.list: New.
7824
7825 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7826
7827 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7828 New comment.
7829
7830 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7831
7832 * gdbreplay.c (remote_open): Check error return from socket() call by
7833 its equality to -1 not by it being negative.
7834 * remote-utils.c (remote_open): Likewise.
7835
7836 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7837
7838 * config.h: Regenerate.
7839
7840 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7841
7842 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7843 doesn't provide PTRACE_GET_THREAD_AREA.
7844
7845 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7846
7847 * linux-m68k-low.c: Include <asm/ptrace.h>
7848 (ps_get_thread_area): Implement.
7849
7850 2010-05-03 Doug Evans <dje@google.com>
7851
7852 * event-loop.c (struct callback_event): New struct.
7853 (callback_list): New global.
7854 (append_callback_event, delete_callback_event): New functions.
7855 (process_callback): New function.
7856 (start_event_loop): Call it.
7857 * remote-utils.c (NOT_SCHEDULED): Define.
7858 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7859 moved out of readchar.
7860 (readchar): Rewrite. Call reschedule before returning.
7861 (reset_readchar): New function.
7862 (remote_close): Call it.
7863 (process_remaining, reschedule): New functions.
7864 * server.h (callback_handler_func): New typedef.
7865 (append_callback_event, delete_callback_event): Declare.
7866
7867 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7868
7869 * proc-service.c (ps_pglobal_lookup): Use
7870 thread_db_look_up_one_symbol.
7871 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7872 parameter. Use it instead of all_symbols_looked_up.
7873 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7874 field.
7875 (all_symbols_looked_up): Don't declare.
7876 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7877 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7878 field.
7879 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7880 Set all_symbols_looked_up here.
7881 (thread_db_look_up_one_symbol): New.
7882 (thread_db_get_tls_address): Adjust.
7883 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7884 thread_db object on the heap, and tentatively set it in the
7885 process structure.
7886 (thread_db_init): Don't set all_symbols_looked_up here.
7887 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7888
7889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7890
7891 * linux-low.c (linux_kill, linux_detach): Adjust.
7892 (status_pending_p_callback): Remove redundant statement. Check
7893 for !TARGET_WAITIKIND_IGNORE, instead of
7894 TARGET_WAITKIND_STOPPED.
7895 (handle_tracepoints): Make sure LWP is locked. Adjust.
7896 (linux_wait_for_event_1): Adjust.
7897 (linux_cancel_breakpoints): New.
7898 (unsuspend_one_lwp): New.
7899 (unsuspend_all_lwps): New.
7900 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7901 (send_sigstop_callback): Change return type to int, add new
7902 `except' parameter and handle it.
7903 (suspend_and_send_sigstop_callback): New.
7904 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7905 pass them down. If SUSPEND, also increment the lwp's suspend
7906 count.
7907 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7908 (need_step_over_p): Don't consider suspended LWPs.
7909 (start_step_over): Adjust.
7910 (proceed_one_lwp): Change return type to int, add new `except'
7911 parameter and handle it.
7912 (unsuspend_and_proceed_one_lwp): New.
7913 (proceed_all_lwps): Use find_inferior instead of
7914 for_each_inferior.
7915 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7916 also decrement the suspend count of LWPs. Pass `except' down,
7917 instead of hacking its suspend count.
7918 (linux_pause_all): Add `freeze' parameter. Adjust.
7919 (linux_unpause_all): New.
7920 (linux_target_ops): Install linux_unpause_all.
7921 * server.c (handle_status): Adjust.
7922 * target.h (struct target_ops): New fields `unpause_all' and
7923 `cancel_breakpoints'. Add new parameter to `pause_all'.
7924 (pause_all): Add new `freeze' parameter.
7925 (unpause_all): New.
7926 (cancel_breakpoints): New.
7927 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7928 cancel breakpoints.
7929 (cmd_qtstart): Pause threads.
7930 (stop_tracing): Pause threads, and cancel breakpoints.
7931 * win32-low.c (win32_target_ops): Adjust.
7932
7933 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7934
7935 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7936 the inferior right away from here...
7937 (linux_wait_1): ... to here, and adjust to check the thread's
7938 last_resume_kind instead of the lwp's step or stop_expected flags.
7939
7940 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7941
7942 * README: Use consistent `GDB' and `GDBserver' spellings.
7943
7944 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7945
7946 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7947 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7948 (linux_detach_one_lwp): Assume the lwp is stopped.
7949 (any_thread_of): Delete.
7950 (linux_detach): Stop all lwps here. Don't blindly delete all
7951 breakpoints.
7952 (delete_lwp_callback): New.
7953 (linux_mourn): Delete all lwps of the process that is gone.
7954 (linux_wait_1): Don't delete the last lwp of the process here.
7955 * mem-break.h (mark_breakpoints_out): Declare.
7956 * mem-break.c (mark_breakpoints_out): New.
7957 (free_all_breakpoints): Use it.
7958 * server.c (handle_target_event): If the process is gone, mark
7959 breakpoints out.
7960 * thread-db.c (struct thread_db) <create_bp>: New field.
7961 (thread_db_enable_reporting): Fix prototype. Store a thread event
7962 breakpoint reference in the thread_db struct.
7963 (thread_db_load_search): Clear the thread_db object.
7964 (try_thread_db_load_1): Ditto.
7965 (switch_to_process): New.
7966 (disable_thread_event_reporting): Use it.
7967 (remove_thread_event_breakpoints): New.
7968 (thread_db_detach, thread_db_mourn): Use it.
7969
7970 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7971
7972 * linux-low.c (linux_enable_event_reporting): New.
7973 (linux_wait_for_event_1, handle_extended_wait): Use it.
7974
7975 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7976
7977 * linux-low.c (linux_kill_one_lwp, linux_kill)
7978 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7979 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7980 SIGSTOP even if the LWP is stopped.
7981 (send_sigstop_callback): New.
7982 (stop_all_lwps): Use send_sigstop_callback instead.
7983 (linux_resume_one_thread): Adjust.
7984 (proceed_one_lwp): Still proceed an LWP that the client has
7985 requested to stop, if we haven't reported it as stopped yet. Make
7986 sure that LWPs the client want stopped, have a pending SIGSTOP.
7987
7988 2010-04-26 Doug Evans <dje@google.com>
7989
7990 * server.c (handle_general_set): Make static.
7991
7992 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7993 Print received char after testing for error/eof instead of before.
7994 (input_interrupt): Tweak comment.
7995
7996 2010-04-23 Doug Evans <dje@google.com>
7997
7998 * server.c (start_inferior): Print inferior argv if --debug.
7999
8000 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8001
8002 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8003 * nto-x86-low.c: Include server.h
8004
8005 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8006
8007 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8008 be consistent with other sources of this directory.
8009 (init_registers_amd64): Correct name of source file of this function
8010 in the comment.
8011
8012 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8013
8014 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8015 64-bit executables.
8016
8017 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8018
8019 * win32-i386-low.c: Add 64-bit support.
8020 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8021 (init_registers_amd64): Declare.
8022 (mappings): Add 64-bit version of array.
8023 (init_windows_x86): New function.
8024 (the_low_target): Change init_arch field to init_windows_x86.
8025
8026 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8027
8028 * win32-low.c: Adapt to support also 64-bit architecture.
8029 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8030 (get_image_name): Use SIZE_T type for local variable `done'.
8031 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8032 (toolhelp_get_dll_name): Idem.
8033 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8034 Use uintptr_t typecast to avoid warning.
8035 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8036 (handle_exception): Use phex_nz to avoid warning.
8037 (win32_wait): Remove unused local variable `process'.
8038
8039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8040
8041 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8042 `amd64-avx.o'.
8043
8044 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8045
8046 * configure.ac: Use `ws2_32' library for srv_mingw.
8047 * configure: Regenerate.
8048 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8049 * remote-utils.c: Likewise.
8050
8051 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8052
8053 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8054 if __x86_64__ is defined.
8055
8056 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8057
8058 * configure: Regenerate.
8059
8060 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8061
8062 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8063 * target.h (target_ops): New get_tib_address field.
8064 * win32-low.h (win32_thread_info): Add thread_local_base field.
8065 * win32-low.c (child_add_thread): Add tlb argument.
8066 Set thread_local_base field to TLB.
8067 (get_child_debug_event): Adapt to child_add_thread change.
8068 (win32_get_tib_address): New function.
8069 (win32_target_ops): Set get_tib_address field to
8070 win32_get_tib_address.
8071 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8072
8073 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8074
8075 * linux-low.c (linux_mourn): Also remove the process.
8076 * server.c (handle_target_event): Don't remove the process here.
8077 * nto-low.c (nto_mourn): New.
8078 (nto_target_ops): Install it.
8079 * spu-low.c (spu_mourn): New.
8080 (spu_target_ops): Install it.
8081 * win32-low.c (win32_mourn): New.
8082 (win32_target_ops): Install it.
8083
8084 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8085
8086 * server.h (buffer_xml_printf): Remove redundant `;'.
8087
8088 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8089
8090 * regcache.c (set_register_cache): Invalidate regcaches before
8091 changing the register cache layout.
8092 (regcache_invalidate_one): Allow a NULL regcache.
8093 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8094 regcaches before changing the register cache layout or the target
8095 regsets.
8096
8097 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8098
8099 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8100 variable warning on Linux/x86-64.
8101
8102 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8103
8104 GDBserver disconnected tracing support.
8105
8106 * linux-low.c (linux_remove_process): Delete.
8107 (add_lwp): Don't set last_resume_kind here.
8108 (linux_kill): Use `mourn'.
8109 (linux_detach): Use `thread_db_detach', and `mourn'.
8110 (linux_mourn): New.
8111 (linux_attach_lwp_1): Adjust comment.
8112 (linux_attach): last_resume_kind moved the thread_info; adjust.
8113 (status_pending_p_callback): Adjust.
8114 (linux_wait_for_event_1): Adjust.
8115 (count_events_callback, select_singlestep_lwp_callback)
8116 (select_event_lwp_callback, cancel_breakpoints_callback)
8117 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8118 (proceed_one_lwp): Adjust.
8119 (linux_async): Add debug output.
8120 (linux_thread_stopped): New.
8121 (linux_pause_all): New.
8122 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8123 linux_pause_all.
8124 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8125 (thread_db_free): Delete declaration.
8126 (thread_db_detach, thread_db_mourn): Declare.
8127 * thread-db.c (thread_db_init): Use thread_db_mourn.
8128 (thread_db_free): Delete, split in two.
8129 (disable_thread_event_reporting): New.
8130 (thread_db_detach): New.
8131 (thread_db_mourn): New.
8132
8133 * server.h (struct thread_info) <last_resume_kind>: New field.
8134 <attached>: Add comment.
8135 <gdb_detached>: New field.
8136 (handler_func): Change return type to int.
8137 (handle_serial_event, handle_target_event): Ditto.
8138 (gdb_connected): Declare.
8139 (tracing): Delete.
8140 (disconnected_tracing): Declare.
8141 (stop_tracing): Declare.
8142
8143 * server.c (handle_query) <qSupported>: Report support for
8144 disconnected tracing.
8145 (queue_stop_reply_callback): Account for running threads.
8146 (gdb_wants_thread_stopped): New.
8147 (gdb_wants_all_threads_stopped): New.
8148 (gdb_reattached_process): New.
8149 (handle_status): Clear the `gdb_detached' flag of all processes.
8150 In all-stop, stop all threads.
8151 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8152 (process_serial_event): If the remote connection breaks, or if an
8153 exit was forced with "monitor exit", force an event loop exit.
8154 Handle disconnected tracing on detach.
8155 (handle_serial_event): Adjust.
8156 (handle_target_event): If GDB isn't connected, forward events back
8157 to the inferior, unless the last process exited, in which case,
8158 exit gdbserver. Adjust interface.
8159
8160 * remote-utils.c (remote_open): Don't block in accept. Instead
8161 register an event loop source on the listen socket file
8162 descriptor. Refactor bits into ...
8163 (listen_desc): ... this new global.
8164 (gdb_connected): ... this new function.
8165 (enable_async_notification): ... this new function.
8166 (handle_accept_event): ... this new function.
8167 (remote_close): Clear remote_desc.
8168
8169 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8170
8171 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8172 New fields.
8173 (mourn_inferior): Define.
8174 (target_process_qsupported): Avoid the dangling else problem.
8175 (thread_stopped): Define.
8176 (pause_all): Define.
8177 (target_waitstatus_to_string): Declare.
8178 * target.c (target_waitstatus_to_string): New.
8179
8180 * tracepoint.c (tracing): Make extern.
8181 (disconnected_tracing): New.
8182 (stop_tracing): Make extern. Handle tracing stops due to GDB
8183 disconnecting.
8184 (cmd_qtdisconnected): New.
8185 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8186 (handle_tracepoint_general_set): Handle QTDisconnected.
8187
8188 * event-loop.c (event_handler_func): Change return type to int.
8189 (process_event): Bail out if the event handler wants the event
8190 loop to stop.
8191 (handle_file_event): Ditto.
8192 (start_event_loop): Bail out if the event handler wants the event
8193 loop to stop.
8194
8195 * nto-low.c (nto_target_ops): Adjust.
8196 * spu-low.c (spu_wait): Don't remove the process here.
8197 (spu_target_ops): Adjust.
8198 * win32-low.c (win32_wait): Don't remove the process here.
8199 (win32_target_ops): Adjust.
8200
8201 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8202
8203 * regcache.c (realloc_register_cache): Invalidate inferior's
8204 regcache before recreating it.
8205
8206 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8207
8208 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8209
8210 2010-04-09 Stan Shebs <stan@codesourcery.com>
8211 Pedro Alves <pedro@codesourcery.com>
8212
8213 * server.h (LONGEST): New.
8214 (struct thread_info) <while_stepping>: New field.
8215 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8216 Declare.
8217 (initialize_tracepoint, handle_tracepoint_general_set)
8218 (handle_tracepoint_query, tracepoint_finished_step)
8219 (tracepoint_was_hit, release_while_stepping_state_list):
8220 (current_traceframe): Declare.
8221 * server.c (handle_general_set): Handle tracepoint packets.
8222 (read_memory): New.
8223 (write_memory): New.
8224 (handle_search_memory_1): Use read_memory.
8225 (handle_query): Report support for conditional tracepoints, trace
8226 state variables, and tracepoint sources. Handle tracepoint
8227 queries.
8228 (main): Initialize the tracepoints module.
8229 (process_serial_event): Handle traceframe reads/writes.
8230
8231 * linux-low.c (handle_tracepoints): New.
8232 (linux_wait_1): Call it.
8233 (linux_resume_one_lwp): Handle while-stepping.
8234 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8235 (linux_target_ops): Install them.
8236 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8237 New field.
8238 * linux-x86-low.c (x86_supports_tracepoints): New.
8239 (the_low_target). Install it.
8240
8241 * mem-break.h (delete_breakpoint): Declare.
8242 * mem-break.c (delete_breakpoint): Make external.
8243
8244 * target.h (struct target_ops): Add `supports_tracepoints',
8245 `read_pc', and `write_pc' fields.
8246 (target_supports_tracepoints): Define.
8247 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8248 (phex_nz): New.
8249
8250 * regcache.h (struct regcache) <registers_owned>: New field.
8251 (init_register_cache, regcache_cpy): Declare.
8252 (regcache_read_pc, regcache_write_pc): Declare.
8253 (register_cache_size): Declare.
8254 (supply_regblock): Declare.
8255 * regcache.c (init_register_cache): New.
8256 (new_register_cache): Use it.
8257 (regcache_cpy): New.
8258 (register_cache_size): New.
8259 (supply_regblock): New.
8260 (regcache_read_pc, regcache_write_pc): New.
8261
8262 * tracepoint.c: New.
8263
8264 * Makefile.in (OBS): Add tracepoint.o.
8265 (tracepoint.o): New rule.
8266
8267 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8268
8269 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8270 (i386-mmx.o): New.
8271 (i386-mmx.c): Likewise.
8272 (i386-mmx-linux.o): Likewise.
8273 (i386-mmx-linux.c): Likewise.
8274
8275 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8276 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8277 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8278 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8279
8280 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8281 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8282 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8283
8284 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8285
8286 * Makefile.in (clean): Updated.
8287 (i386-avx.o): New.
8288 (i386-avx.c): Likewise.
8289 (i386-avx-linux.o): Likewise.
8290 (i386-avx-linux.c): Likewise.
8291 (amd64-avx.o): Likewise.
8292 (amd64-avx.c): Likewise.
8293 (amd64-avx-linux.o): Likewise.
8294 (amd64-avx-linux.c): Likewise.
8295
8296 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8297 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8298 (srv_amd64_regobj): Add amd64-avx.o.
8299 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8300 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8301 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8302 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8303 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8304 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8305 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8306
8307 * i387-fp.c: Include "i386-xstate.h".
8308 (i387_xsave): New.
8309 (i387_cache_to_xsave): Likewise.
8310 (i387_xsave_to_cache): Likewise.
8311 (x86_xcr0): Likewise.
8312
8313 * i387-fp.h (i387_cache_to_xsave): Likewise.
8314 (i387_xsave_to_cache): Likewise.
8315 (x86_xcr0): Likewise.
8316
8317 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8318 * linux-crisv32-low.c (target_regsets): Likewise.
8319 * linux-m68k-low.c (target_regsets): Likewise.
8320 * linux-mips-low.c (target_regsets): Likewise.
8321 * linux-ppc-low.c (target_regsets): Likewise.
8322 * linux-s390-low.c (target_regsets): Likewise.
8323 * linux-sh-low.c (target_regsets): Likewise.
8324 * linux-sparc-low.c (target_regsets): Likewise.
8325 * linux-xtensa-low.c (target_regsets): Likewise.
8326
8327 * linux-low.c: Include <sys/uio.h>.
8328 (regsets_fetch_inferior_registers): Support nt_type.
8329 (regsets_store_inferior_registers): Likewise.
8330 (linux_process_qsupported): New.
8331 (linux_target_ops): Add linux_process_qsupported.
8332
8333 * linux-low.h (regset_info): Add nt_type.
8334 (linux_target_ops): Add process_qsupported.
8335
8336 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8337 and <sys/uio.h>.
8338 (init_registers_i386_avx_linux): New.
8339 (init_registers_amd64_avx_linux): Likewise.
8340 (xmltarget_i386_linux_no_xml): Likewise.
8341 (xmltarget_amd64_linux_no_xml): Likewise.
8342 (PTRACE_GETREGSET): Likewise.
8343 (PTRACE_SETREGSET): Likewise.
8344 (x86_fill_xstateregset): Likewise.
8345 (x86_store_xstateregset): Likewise.
8346 (use_xml): Likewise.
8347 (x86_linux_update_xmltarget): Likewise.
8348 (x86_linux_process_qsupported): Likewise.
8349 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8350 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8351 init_registers_i386_linux here. Call
8352 x86_linux_update_xmltarget.
8353 (the_low_target): Add x86_linux_process_qsupported.
8354
8355 * server.c (handle_query): Call target_process_qsupported.
8356
8357 * target.h (target_ops): Add process_qsupported.
8358 (target_process_qsupported): New.
8359
8360 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8361
8362 * inferiors.c (add_thread): Set last_status kind to
8363 TARGET_WAITKIND_IGNORE.
8364 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8365 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8366 (linux_wait_1): Move `thread' local definition to block that uses
8367 it. Don't NULL initialize `event_child'.
8368 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8369 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8370 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8371
8372 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8373
8374 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8375 an extended waitstatus, or by a watchpoint.
8376 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8377 thread was stepping or has been stopped by a watchpoint.
8378
8379 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8380
8381 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8382 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8383 of another, then delete the previous, and validate all
8384 breakpoints.
8385 (validate_inserted_breakpoint): New.
8386 (delete_disabled_breakpoints): New.
8387 (validate_breakpoints): New.
8388 (check_mem_read): Validate breakpoints before trusting their
8389 shadow. Delete disabled breakpoints.
8390 (check_mem_write): Validate breakpoints before trusting they
8391 should be inserted. Delete disabled breakpoints.
8392 * mem-break.h (validate_breakpoints):
8393 * server.c (handle_query): Validate breakpoints when we see a
8394 qSymbol query.
8395
8396 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8397
8398 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8399 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8400 if we could tell there's a GDB breakpoint at stop_pc.
8401 (need_step_over_p): Don't do a step over if we find a GDB
8402 breakpoint at the resume PC.
8403
8404 * mem-break.c (struct raw_breakpoint): New.
8405 (enum bkpt_type): New type `gdb_breakpoint'.
8406 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8407 fields. New field `raw'.
8408 (find_raw_breakpoint_at): New.
8409 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8410 breakpoint instead.
8411 (set_breakpoint_at): Adjust.
8412 (delete_raw_breakpoint): New.
8413 (release_breakpoint): New.
8414 (delete_breakpoint): Rename to...
8415 (delete_breakpoint_1): ... this. Add proc parameter. Use
8416 release_breakpoint. Return ENOENT.
8417 (delete_breakpoint): Reimplement.
8418 (find_breakpoint_at): Delete.
8419 (find_gdb_breakpoint_at): New.
8420 (delete_breakpoint_at): Delete.
8421 (set_gdb_breakpoint_at): New.
8422 (delete_gdb_breakpoint_at): New.
8423 (gdb_breakpoint_here): New.
8424 (set_reinsert_breakpoint): Use release_breakpoint.
8425 (uninsert_breakpoint): Rename to ...
8426 (uninsert_raw_breakpoint): ... this.
8427 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8428 (reinsert_raw_breakpoint): Change parameter type to
8429 raw_breakpoint.
8430 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8431 instead.
8432 (check_breakpoints): Adjust. Use release_breakpoint.
8433 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8434 (breakpoint_inserted_here): Ditto.
8435 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8436 Don't trust the breakpoint's shadow if it is not inserted.
8437 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8438 (delete_all_breakpoints): Adjust.
8439 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8440 use delete_breakpoint_1.
8441
8442 * mem-break.h (breakpoints_supported): Delete declaration.
8443 (set_gdb_breakpoint_at): Declare.
8444 (gdb_breakpoint_here): Declare.
8445 (delete_breakpoint_at): Delete.
8446 (delete_gdb_breakpoint_at): Declare.
8447
8448 * server.h (struct raw_breakpoint): Forward declare.
8449 (struct process_info): New field `raw_breakpoints'.
8450
8451 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8452 breakpoints.
8453
8454 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8455
8456 * linux-low.c (status_pending_p_callback): Fix comment.
8457 (linux_wait_for_event_1): Move most of the internal breakpoint
8458 handling from here...
8459 (linux_wait_1): ... to here.
8460 (count_events_callback): New.
8461 (select_singlestep_lwp_callback): New.
8462 (select_event_lwp_callback): New.
8463 (cancel_breakpoints_callback): New.
8464 (select_event_lwp): New.
8465 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8466 priority to all LWPs that have had events that should be reported
8467 to the client. Cancel breakpoints when about to reporting the
8468 event to the client, not while stopping lwps. No longer cancel
8469 finished single-steps here.
8470 (cancel_finished_single_step): Delete.
8471 (cancel_finished_single_steps): Delete.
8472
8473 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8474
8475 * mem-break.c (enum bkpt_type): New.
8476 (struct breakpoint): New field `type'.
8477 (set_breakpoint_at): Change return type to struct breakpoint
8478 pointer. Set type to `other_breakpoint' by default.
8479 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8480 in the breakpoint list.
8481 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8482 (reinsert_breakpoint): Rename to ...
8483 (reinsert_raw_breakpoint): ... this.
8484 (reinsert_breakpoints_at): Adjust.
8485 * mem-break.h (struct breakpoint): Declare.
8486 (set_breakpoint_at): Change return type to struct breakpoint
8487 pointer.
8488
8489 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8490
8491 * server.c (handle_query): Assign, not compare.
8492
8493 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8494
8495 Teach linux gdbserver to step-over-breakpoints.
8496
8497 * linux-low.c (can_hardware_single_step): New.
8498 (supports_breakpoints): New.
8499 (handle_extended_wait): If stopping threads, read the stop pc of
8500 the new cloned LWP.
8501 (get_pc): New.
8502 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8503 low target doesn't support retrieving the PC.
8504 (add_lwp): Set last_resume_kind to resume_continue.
8505 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8506 (linux_attach): Don't clear stop_expected. Set the lwp's
8507 last_resume_kind to resume_stop.
8508 (linux_detach_one_lwp): Don't check for removed breakpoints.
8509 (check_removed_breakpoint): Delete.
8510 (status_pending_p): Rename to ...
8511 (status_pending_p_callback): ... this. Don't check for removed
8512 breakpoints. Don't consider threads that are stopped from GDB's
8513 perspective.
8514 (linux_wait_for_lwp): Always read the stop_pc here.
8515 (cancel_breakpoint): New.
8516 (step_over_bkpt): New global.
8517 (linux_wait_for_event_1): Implement stepping over breakpoints.
8518 (gdb_wants_lwp_stopped): New.
8519 (gdb_wants_all_stopped): New.
8520 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8521 single-step traps here. Store the thread's last reported target
8522 wait status.
8523 (send_sigstop): Don't clear stop_expected. Always set it,
8524 instead.
8525 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8526 (cancel_finished_single_step): New.
8527 (cancel_finished_single_steps): New.
8528 (wait_for_sigstop): Don't cancel finished single-step traps here.
8529 (linux_resume_one_lwp): Don't check for removed breakpoints.
8530 Don't set `step' on non-hardware step archs.
8531 (linux_set_resume_request): Ignore resume_stop requests if already
8532 stopping or stopped. Set the lwp's last_resume_kind.
8533 (resume_status_pending_p): Don't check for removed breakpoints.
8534 (need_step_over_p): New.
8535 (start_step_over): New.
8536 (finish_step_over): New.
8537 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8538 requests. Clear the thread's last reported target waitstatus.
8539 Don't use the `suspended' flag. Don't consider pending breakpoints.
8540 (linux_resume): Start a step-over if necessary.
8541 (proceed_one_lwp): New.
8542 (proceed_all_lwps): New.
8543 (unstop_all_lwps): New.
8544 * linux-low.h (struct lwp_info): Rewrite comment for the
8545 `suspended' flag. Add the `stop_pc' field. Delete the
8546 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8547 Add `'last_resume_kind' and `need_step_over' fields.
8548 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8549 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8550 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8551 (set_raw_breakpoint_at): New.
8552 (set_breakpoint_at): Rewrite to use it.
8553 (reinsert_breakpoint_handler): Delete.
8554 (set_reinsert_breakpoint): New.
8555 (reinsert_breakpoint_by_bp): Delete.
8556 (delete_reinsert_breakpoints): New.
8557 (uninsert_breakpoint): Rewrite.
8558 (uninsert_breakpoints_at): New.
8559 (reinsert_breakpoint): Rewrite.
8560 (reinsert_breakpoints_at): New.
8561 (check_breakpoints): Rewrite.
8562 (breakpoint_here): New.
8563 (breakpoint_inserted_here): New.
8564 (check_mem_read): Adjust.
8565 * mem-break.h (breakpoints_supported, breakpoint_here)
8566 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8567 (reinsert_breakpoint_by_bp): Delete declaration.
8568 (delete_reinsert_breakpoints): Declare.
8569 (reinsert_breakpoint): Delete declaration.
8570 (reinsert_breakpoints_at): Declare.
8571 (uninsert_breakpoint): Delete declaration.
8572 (uninsert_breakpoints_at): Declare.
8573 (check_breakpoints): Adjust prototype.
8574 * server.h: Adjust include order.
8575 (struct thread_info): Declare here. Add a `last_status' field.
8576
8577 2010-03-23 Michael Snyder <msnyder@vmware.com>
8578
8579 * server.c (crc32): New function.
8580 (handle_query): Add handling for 'qCRC:' request.
8581
8582 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8583
8584 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8585 lwp had been stopped by a watchpoint.
8586
8587 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8588
8589 * server.h (internal_error): Declare.
8590 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8591 * utils.c (internal_error): New function.
8592
8593 2010-03-15 Andreas Schwab <schwab@redhat.com>
8594
8595 * configure.srv: Fix typo setting srv_regobj.
8596
8597 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8598
8599 * linux-low.c (fetch_register): Avoid passing a non string literal
8600 format to `error'.
8601 (usr_store_inferior_registers): Ditto.
8602
8603 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8604
8605 * linux-low.c (linux_write_memory): Bail out early if peeking
8606 memory failed.
8607
8608 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8609
8610 * linux-low.h (struct lwp_info): New fields
8611 `stopped_by_watchpoint' and `stopped_data_address'.
8612 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8613 here, and cache them in the lwp object.
8614 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8615 directly.
8616 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8617 field.
8618 (linux_stopped_by_watchpoint): Rewrite.
8619 (linux_stopped_data_address): Rewrite.
8620
8621 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8622
8623 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8624 switching the current inferior, not before.
8625
8626 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8627
8628 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8629 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8630 i386-linux.c and amd64-linux.c.
8631 (reg-i386.o): Removed.
8632 (reg-i386.c): Likewise.
8633 (reg-i386-linux.o): Likewise.
8634 (reg-i386-linux.c): Likewise.
8635 (reg-x86-64.o): Likewise.
8636 (reg-x86-64.c): Likewise.
8637 (reg-x86-64-linux.o): Likewise.
8638 (reg-x86-64-linux.c): Likewise.
8639 (i386.o): New.
8640 (i386.c): Likewise.
8641 (i386-linux.o): Likewise.
8642 (i386-linux.c): Likewise.
8643 (amd64.o): Likewise.
8644 (amd64.c): Likewise.
8645 (amd64-linux.o): Likewise.
8646 (amd64-linux.c): Likewise.
8647
8648 * configure.srv (srv_i386_regobj): New.
8649 (srv_i386_linux_regobj): Likewise.
8650 (srv_amd64_regobj): Likewise.
8651 (srv_amd64_linux_regobj): Likewise.
8652 (srv_i386_32bit_xmlfiles): Likewise.
8653 (srv_i386_64bit_xmlfiles): Likewise.
8654 (srv_i386_xmlfiles): Likewise.
8655 (srv_amd64_xmlfiles): Likewise.
8656 (srv_i386_linux_xmlfiles): Likewise.
8657 (srv_amd64_linux_xmlfiles): Likewise.
8658 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8659 srv_xmlfiles to $srv_i386_xmlfiles.
8660 (i[34567]86-*-mingw32ce*): Likewise.
8661 (i[34567]86-*-mingw*): Likewise.
8662 (i[34567]86-*-nto*): Likewise.
8663 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8664 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8665 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8666 (x86_64-*-linux*): Likewise.
8667
8668 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8669 (init_registers_amd64_linux): New.
8670 (x86_arch_setup): Replace init_registers_x86_64_linux with
8671 init_registers_amd64_linux.
8672
8673 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8674
8675 * configure.ac: Check for libdl. If it is not available link against
8676 static libthread_db.
8677 * configure: Regenerate.
8678
8679 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8680
8681 PR9605
8682
8683 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8684 handing a read watchpoint.
8685 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8686
8687 2010-02-12 Doug Evans <dje@google.com>
8688
8689 * linux-low.c (linux_supports_tracefork_flag): Document.
8690 (linux_look_up_symbols): Add comment.
8691
8692 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8693
8694 * regcache.c (supply_register): Clear regcache if buf is NULL.
8695
8696 2010-02-02 Nicolas Roche <roche@sourceware.org>
8697 Joel Brobecker <brobecker@adacore.com>
8698
8699 * inferiors.c (find_inferior): Add function documentation.
8700 (unloaded_dll): Handle the case where the unloaded dll has not
8701 been previously registered in the dll list.
8702
8703 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8704
8705 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8706 (thumb2_breakpoint): New.
8707 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8708
8709 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8710
8711 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8712 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8713 breakpoints.
8714
8715 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8716
8717 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8718
8719 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8720
8721 * linux-s390-low.c (s390_collect_ptrace_register)
8722 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8723
8724 2010-01-21 Doug Evans <dje@google.com>
8725
8726 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8727 (PTRACE_ARG4_TYPE): New macro.
8728 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8729 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8730 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8731 (usr_store_inferior_registers): Ditto.
8732 (linux_read_memory, linux_write_memory): Ditto.
8733 (linux_test_for_tracefork): Ditto.
8734
8735 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8736 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8737
8738 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8739
8740 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8741 target.
8742
8743 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8744
8745 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8746 prototype to take a regcache. Adjust.
8747
8748 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8749
8750 * regcache.h (struct thread_info): Forward declare.
8751 (struct regcache): New.
8752 (new_register_cache): Adjust prototype.
8753 (get_thread_regcache): Declare.
8754 (free_register_cache): Adjust prototype.
8755 (registers_to_string, registers_from_string): Ditto.
8756 (supply_register, supply_register_by_name, collect_register)
8757 (collect_register_as_string, collect_register_by_name): Ditto.
8758 * regcache.c (struct inferior_regcache_data): Delete.
8759 (get_regcache): Rename to ...
8760 (get_thread_regcache): ... this. Adjust. Switch inferior before
8761 fetching registers.
8762 (regcache_invalidate_one): Adjust.
8763 (regcache_invalidate): Fix prototype.
8764 (new_register_cache): Return the new register cache.
8765 (free_register_cache): Change prototype.
8766 (realloc_register_cache): Adjust.
8767 (registers_to_string): Change prototype to take a regcache. Adjust.
8768 (registers_from_string): Ditto.
8769 (register_data): Ditto.
8770 (supply_register): Ditto.
8771 (supply_register_by_name): Ditto.
8772 (collect_register): Ditto.
8773 (collect_register_as_string): Ditto.
8774 (collect_register_by_name): Ditto.
8775 * server.c (process_serial_event): Adjust.
8776 * linux-low.h (regset_fill_func, regset_store_func): Change
8777 prototype.
8778 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8779 Change prototype.
8780 * linux-low.c (get_stop_pc): Adjust.
8781 (check_removed_breakpoint): Adjust.
8782 (linux_wait_for_event): Adjust.
8783 (linux_resume_one_lwp): Adjust.
8784 (fetch_register): Add regcache parameter. Adjust.
8785 (usr_store_inferior_registers): Ditto.
8786 (regsets_fetch_inferior_registers): Ditto.
8787 (regsets_store_inferior_registers): Ditto.
8788 (linux_fetch_registers, linux_store_registers): Ditto.
8789 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8790 regcache. Adjust.
8791 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8792 Ditto.
8793 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8794 prototype to take a regcache.
8795 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8796 * remote-utils.c (convert_ascii_to_int, outreg)
8797 (prepare_resume_reply): Change prototype to take a regcache.
8798 Adjust.
8799 * target.h (struct target_ops) <fetch_registers, store_registers>:
8800 Change prototype to take a regcache.
8801 (fetch_inferior_registers, store_inferior_registers): Change
8802 prototype to take a regcache. Adjust.
8803 * proc-service.c (ps_lgetregs): Adjust.
8804 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8805 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8806 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8807 take a regcache. Adjust.
8808 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8809 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8810 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8811 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8812 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8813 (cris_cannot_fetch_register):
8814 (cris_breakpoint_at): Change prototype to take a regcache.
8815 Adjust.
8816 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8817 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8818 to take a regcache. Adjust.
8819 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8820 Adjust.
8821 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8822 take a regcache. Adjust.
8823 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8824 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8825 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8826 * linux-mips-low.c (mips_get_pc):
8827 (mips_set_pc): Change prototype to take a regcache. Adjust.
8828 (mips_reinsert_addr): Adjust.
8829 (mips_collect_register): Change prototype to take a regcache.
8830 Adjust.
8831 (mips_supply_register):
8832 (mips_collect_register_32bit, mips_supply_register_32bit)
8833 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8834 (mips_store_fpregset): Ditto.
8835 * linux-ppc-low.c (ppc_supply_ptrace_register)
8836 (ppc_supply_ptrace_register): Ditto.
8837 (parse_spufs_run): Adjust.
8838 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8839 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8840 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8841 take a regcache. Adjust.
8842 * linux-s390-low.c (s390_collect_ptrace_register)
8843 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8844 (s390_set_pc): Change prototype to take a regcache. Adjust.
8845 (s390_arch_setup): Adjust.
8846 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8847 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8848 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8849 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8850 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8851 regcache. Adjust.
8852 (sparc_breakpoint_at): Adjust.
8853 * linux-xtensa-low.c (xtensa_fill_gregset):
8854 (xtensa_store_gregset):
8855 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8856 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8857 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8858 prototype to take a regcache. Adjust.
8859 * win32-arm-low.c (arm_fetch_inferior_register)
8860 (arm_store_inferior_register): Change prototype to take a
8861 regcache. Adjust.
8862 * win32-i386-low.c (i386_fetch_inferior_register)
8863 (i386_store_inferior_register): Change prototype to take a
8864 regcache. Adjust.
8865 * win32-low.c (child_fetch_inferior_registers)
8866 (child_store_inferior_registers): Change prototype to take a
8867 regcache. Adjust.
8868 (win32_wait): Adjust.
8869 (win32_fetch_inferior_registers): Change prototype to take a
8870 regcache. Adjust.
8871 (win32_store_inferior_registers): Adjust.
8872 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8873 store_inferior_register>: Change prototype to take a regcache.
8874
8875 2010-01-20 Doug Evans <dje@google.com>
8876
8877 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8878 #ifdef.
8879 (linux_wait_for_event1, linux_init_signals): Ditto.
8880 (W_STOPCODE): Provide definition if missing.
8881
8882 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8883
8884 * linux-low.c (linux_core_of_thread): New.
8885 (compare_ints, show_process, list_threads): New.
8886 (linux_qxfer_osdata): Report threads and cores.
8887 (linux_target_op): Register linux_core_of_thread.
8888 * remote-utils.c (prepare_resume_reply): Report the core.
8889 (buffer_xml_printf): Support %d specifier.
8890 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8891 New.
8892 (handle_query): Handle qXfer:threads. Announce availability
8893 thereof.
8894 * target.h (struct target_ops): New field core_of_thread.
8895
8896 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8897
8898 * Makefile.in (clean): Remove new generated files.
8899 (reg-s390.o, reg-s390.c): Remove rules.
8900 (reg-s390x.o, reg-s390x.c): Likewise.
8901 (s390-linux32.o, s390-linux32.c): Add rules.
8902 (s390-linux64.o, s390-linux64.c): Likewise.
8903 (s390x-linux64.o, s390x-linux64.c): Likewise.
8904 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8905 * linux-s390-low.c: Include <elf.h>.
8906 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8907 (init_registers_s390): Remove prototype.
8908 (init_registers_s390x): Likewise.
8909 (init_registers_s390_linux32): Add prototype.
8910 (init_registers_s390_linux64): Likewise.
8911 (init_registers_s390x_linux64): Likewise.
8912 (s390_num_regs_3264): New define.
8913 (s390_regmap_3264): New global variable.
8914 (s390_cannot_fetch_register): Remove obsolete check.
8915 (s390_cannot_store_register): Likewise.
8916 (s390_collect_ptrace_register): Handle upper/lower register halves.
8917 (s390_supply_ptrace_register): Likewise.
8918 (s390_fill_gregset): Update to register number changes.
8919 (s390_get_hwcap): New routine.
8920 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8921 Install appropriate regmap and register set.
8922
8923 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8924
8925 * server.c (gdbserver_version): Update copyright year to 2010.
8926 * gdbreplay.c (gdbreplay_version): Likewise.
8927
8928 2009-12-28 Doug Evans <dje@google.com>
8929
8930 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8931 elf/external.h. Include <elf.h> instead but only if necessary.
8932
8933 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8934
8935 * linux-low.c (linux_remove_process): Remove `detaching'
8936 parameter. Don't release/detach from thread_db here.
8937 (linux_kill): Release/detach from thread_db here, ...
8938 (linux_detach): ... and here, before actually detaching.
8939 (linux_wait_1): ... and here, when a process exits.
8940 * thread-db.c (any_thread_of): New.
8941 (thread_db_free): Switch the current inferior to a thread of the
8942 passed in process.
8943
8944 2009-12-21 Doug Evans <dje@google.com>
8945
8946 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8947
8948 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8949 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8950 warning ifndef __NR_tkill. Move setting of errno there too.
8951 Delete unnecessary resetting of errno after syscall.
8952 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8953
8954 * configure.ac: Check for dladdr.
8955 * config.in: Regenerate.
8956 * configure: Regenerate.
8957 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8958 (try_thread_db_load): Update.
8959
8960 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8961
8962 2009-12-18 Doug Evans <dje@google.com>
8963
8964 * event-loop.c: Include unistd.h if it exists.
8965
8966 * linux-low.c (my_waitpid): Move definition away from being in
8967 between linux_tracefork_child/linux_test_for_tracefork.
8968
8969 * gdb_proc_service.h (psaddr_t): Fix type.
8970 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8971 signature to match glibc.
8972
8973 2009-12-16 Doug Evans <dje@google.com>
8974
8975 * linux-low.c (linux_read_memory): Fix argument to read.
8976
8977 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8978
8979 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8980 events, don't leave current_inferior pointing at null.
8981
8982 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8983
8984 * win32-low.c (LOG): Delete.
8985 (OUTMSG): Output to stderr.
8986 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8987 on compile time LOG macro.
8988 (win32_wait): Fix debug output.
8989
8990 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8991
8992 * win32-low.c (win32_add_one_solib): If the dll name is
8993 "ntdll.dll", prepend the system directory to the dll path.
8994
8995 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8996
8997 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8998
8999 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9000 Vladimir Prus <vladimir@codesourcery.com>
9001
9002 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9003 * configure.ac: Check for __mcoldfire__ and set
9004 gdb_cv_m68k_is_coldfire.
9005 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9006 reg-cf.o and reg-m68k.o.
9007 * configure: Regenerated.
9008
9009 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9010
9011 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9012 Pass it to thread_db_free.
9013 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9014 proper `detaching' argument to linux_remove_process.
9015 * linux-low.h (thread_db_free): Add `detaching' parameter.
9016 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9017 to thread_db_free.
9018 (thread_db_free): Add `detaching' parameter. Only
9019 call td_ta_clear_event if detaching from process.
9020
9021 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9022
9023 * thread-db.c (thread_db_free): Fix typo.
9024
9025 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9026
9027 PR gdb/10838
9028 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9029
9030 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9031
9032 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9033 with an i686 compiler.
9034 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9035 needed.
9036 * configure: Rebuilt.
9037
9038 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9039
9040 PR gdb/10783
9041
9042 * server.c (handle_search_memory_1): Correct read_addr initialization
9043 in loop for searching subsequent chunks.
9044
9045 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9046
9047 * configure.ac: New --with-libthread-db option.
9048 * thread-db.c: Allow direct dependence on libthread_db.
9049 (thread_db_free): Adjust.
9050 * config.in: Regenerate.
9051 * configure: Likewise.
9052
9053 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9054
9055 PR gdb/10757
9056 * thread-db.c (attach_thread): New function.
9057 (maybe_attach_thread): Return success/failure.
9058 (find_new_threads_callback): Adjust.
9059 (thread_db_find_new_threads): Loop until no new threads.
9060
9061 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9062
9063 * proc-service.c (ps_lgetregs): Formatting.
9064
9065 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9066
9067 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9068 * configure.ac: Adjust.
9069 * linux-low.h (struct process_info_private): Move members to struct
9070 thread_db.
9071 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9072 * linux-low.c (linux_remove_process): Adjust.
9073 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9074 * server.c (handle_query): Move code ...
9075 (handle_monitor_command): ... here. New function.
9076 * target.h (struct target_ops): New member.
9077 * thread-db.c (struct thread_db): New.
9078 (libthread_db_search_path): New variable.
9079 (thread_db_create_event, thread_db_enable_reporting)
9080 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9081 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9082 (try_thread_db_load_1, dladdr_to_soname): New functions.
9083 (try_thread_db_load, thread_db_load_search): New functions.
9084 (thread_db_init): Search for libthread_db.
9085 (thread_db_free): New function.
9086 (thread_db_handle_monitor_command): Likewise.
9087 * config.in: Regenerate.
9088 * configure: Regenerate.
9089
9090 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9091
9092 * spu-low.c (spu_kill): Wait for inferior to terminate.
9093 Call clear_inferiors.
9094 (spu_detach): Call clear_inferiors.
9095
9096 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9097
9098 * aclocal.m4: Regenerate.
9099 * config.in: Likewise.
9100 * configure: Likewise.
9101
9102 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9103
9104 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9105 (parse_spufs_run): New function.
9106 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9107 (ppc_breakpoint_at): Handle SPU breakpoints.
9108
9109 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9110
9111 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9112 (SPUFS_MAGIC): Define.
9113 (spu_enumerate_spu_ids): New function.
9114 (linux_qxfer_spu): New function.
9115 (linux_target_ops): Install linux_qxfer_spu.
9116
9117 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9118
9119 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9120 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9121 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9122 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9123 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9124 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9125 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9126 (init_registers_powerpc_cell32l): Add prototype.
9127 (init_registers_powerpc_cell64l): Likewise.
9128 (ppc_arch_setup): Detect Cell/B.E. architecture.
9129
9130 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9131
9132 * Makefile.in (datarootdir): New variable.
9133
9134 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9135
9136 * linux-low.c (linux_write_memory): Update debugging output.
9137 * Makefile.in (clean): Add new descriptions.
9138 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9139 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9140 * configure.srv: Add new files for arm*-*-linux*.
9141 * linux-arm-low.c: Add new declarations.
9142 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9143 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9144 (HWCAP_VFPv3D16): New.
9145 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9146 instead of __IWMMXT__.
9147 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9148 (arm_arch_setup): New.
9149 (target_regsets): Remove #ifdef. Add VFP regset.
9150 (the_low_target): Use arm_arch_setup.
9151
9152 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9153
9154 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9155 the main thread again.
9156
9157 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9158
9159 Adding Neutrino gdbserver.
9160 * configure: Regenerated.
9161 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9162 * configure.srv (i[34567]86-*-nto*): New target.
9163 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9164 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9165 (nto_comctrl) [__QNX__]: New function.
9166 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9167
9168 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9169
9170 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9171 srv_tgtobj.
9172
9173 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9174 Pedro Alves <pedro@codesourcery.com>
9175
9176 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9177 don't support CONTEXT_EXTENDED_REGISTERS.
9178 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9179 (the_low_target): Install them.
9180 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9181 failing with ERROR_PIPE_NOT_CONNECTED.
9182
9183 2009-06-30 Doug Evans <dje@google.com>
9184 Pierre Muller <muller@ics.u-strasbg.fr>
9185
9186 Add h/w watchpoint support to x86-linux, win32-i386.
9187 * Makefile.in (SFILES): Add i386-low.c
9188 (i386_low_h): Define.
9189 (i386-low.o): Add dependencies.
9190 (linux-x86-low.o): Add i386-low.h dependency.
9191 (win32-i386-low.o): Ditto.
9192 * i386-low.c: New file.
9193 * i386-low.h: New file.
9194 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9195 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9196 * linux-low.c (linux_add_process): Initialize arch_private.
9197 (linux_remove_process): Free arch_private.
9198 (add_lwp): Initialize arch_private.
9199 (delete_lwp): Free arch_private.
9200 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9201 provided.
9202 * linux-low.h (process_info_private): New member arch_private.
9203 (lwp_info): New member arch_private.
9204 (linux_target_ops): New members new_process, new_thread,
9205 prepare_to_resume.
9206 (ptid_of): New macro.
9207 * linux-x86-low.c: Include stddef.h, i386-low.h.
9208 (arch_process_info): New struct.
9209 (arch_lwp_info): New struct.
9210 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9211 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9212 (i386_dr_low_get_status): New function.
9213 (x86_insert_point, x86_remove_point): New functions.
9214 (x86_stopped_by_watchpoint): New function.
9215 (x86_stopped_data_address): New function.
9216 (x86_linux_new_process, x86_linux_new_thread): New functions.
9217 (x86_linux_prepare_to_resume): New function.
9218 (the_low_target): Add entries for insert_point, remove_point,
9219 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9220 prepare_to_resume.
9221 * server.c (debug_hw_points): New global.
9222 (monitor_show_help): Document set debug-hw-points.
9223 (handle_query): Process "set debug-hw-points".
9224 * server.h (debug_hw_points): Declare.
9225 (paddress): Declare.
9226 * utils.c (NUMCELLS, CELLSIZE): New macros.
9227 (get_sell, xsnprintf, paddress): New functions.
9228 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9229 remove_point, stopped_by_watchpoint, stopped_data_address.
9230 * win32-i386-low.c: Include i386-low.h.
9231 (debug_reg_state): Replaces dr.
9232 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9233 (i386_dr_low_get_status): New function.
9234 (i386_insert_point, i386_remove_point): New functions.
9235 (i386_stopped_by_watchpoint): New function.
9236 (i386_stopped_data_address): New function.
9237 (i386_initial_stuff): Update.
9238 (get_thread_context,set_thread_context,i386_thread_added): Update.
9239 (the_low_target): Add entries for insert_point,
9240 remove_point, stopped_by_watchpoint, stopped_data_address.
9241 * win32-low.c (win32_insert_watchpoint): New function.
9242 (win32_remove_watchpoint): New function.
9243 (win32_stopped_by_watchpoint): New function.
9244 (win32_stopped_data_address): New function.
9245 (win32_target_ops): Add entries for insert_watchpoint,
9246 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9247 * win32-low.h (win32_target_ops): New members insert_point,
9248 remove_point, stopped_by_watchpoint, stopped_data_address.
9249
9250 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9251
9252 * server.c (process_serial_event): Re-return unsupported, not
9253 error, if the type isn't recognized. Re-allow supporting only
9254 insert or remove packets. Also call require_running for
9255 breakpoints. Add missing break statement to default case. Tidy.
9256 * target.h (struct target_ops): Rename insert_watchpoint to
9257 insert_point, and remove_watchpoint to remove_point.
9258
9259 * linux-low.h (struct linux_target_ops): Likewise.
9260 * linux-low.c (linux_insert_watchpoint): Rename to ...
9261 (linux_insert_point): ... this. Adjust.
9262 (linux_remove_watchpoint): Rename to ...
9263 (linux_remove_point): ... this. Adjust.
9264 (linux_target_ops): Adjust.
9265 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9266 (cris_insert_point): ... this.
9267 (cris_remove_watchpoint): Rename to ...
9268 (cris_remove_point): ... this.
9269 (the_low_target): Adjust.
9270
9271 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9272
9273 * server.c (handle_v_kill): Pass signal_pid to
9274 kill_inferior if multi_process is zero.
9275
9276 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9277
9278 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9279 * target.h (target_ops): Comment for *_watchpoint to make it clear
9280 the functions can get types '0' and '1'.
9281
9282 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9283
9284 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9285 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9286 * regcache.c (get_regcache): Likewise.
9287 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9288 * win32-low.c (child_fetch_inferior_registers): Remove check for
9289 regno 0.
9290
9291 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9292 Pedro Alves <pedro@codesourcery.com>
9293
9294 * target.h (struct target_ops) <supports_multi_process>: New
9295 callback.
9296 (target_supports_multi_process): New.
9297 * server.c (handle_query): Even if GDB reports support, only
9298 enable multi-process if the target also supports it. Report
9299 multi-process support only if the target backend supports it.
9300 * linux-low.c (linux_supports_multi_process): New function.
9301 (linux_target_ops): Install it as target_supports_multi_process
9302 callback.
9303
9304 2009-05-24 Doug Evans <dje@google.com>
9305
9306 Global renaming of find_thread_pid to find_thread_ptid.
9307 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9308 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9309 All callers updated.
9310
9311 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9312 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9313 directly.
9314
9315 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9316 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9317 (linux_resume_one_lwp): Ditto.
9318
9319 2009-05-23 Doug Evans <dje@google.com>
9320
9321 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9322 from struct inferior_list_entry * to struct lwp_info *.
9323 All callers updated.
9324
9325 2009-05-13 Doug Evans <dje@google.com>
9326
9327 * linux-x86-low.c: Don't include assert.h.
9328 (x86_siginfo_fixup): Use fatal, not assert.
9329 (x86_arch_setup): Fix comment.
9330
9331 2009-05-12 Doug Evans <dje@google.com>
9332
9333 Biarch support for i386/amd64 gdbserver.
9334 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9335 Add linux-x86-low.c.
9336 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9337 (linux-x86-low.o): Add.
9338 * linux-x86-64-low.c: Delete.
9339 * linux-i386-low.c: Delete.
9340 * linux-x86-low.c: New file.
9341 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9342 linux-x86-low.o.
9343 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9344 linux-x86-low.o.
9345 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9346 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9347 (linux_child_pid_to_exec_file): New function.
9348 (elf_64_header_p, elf_64_file_p): New functions.
9349 (siginfo_fixup): New function.
9350 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9351 give target a chance to convert layout.
9352 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9353 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9354
9355 2009-05-07 Doug Evans <dje@google.com>
9356
9357 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9358 (regsets_store_inferior_registers): Ditto.
9359
9360 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9361
9362 PR server/10048
9363
9364 * linux-low.c (must_set_ptrace_flags): Delete.
9365 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9366 of the global.
9367 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9368 `lwp->must_set_ptrace_flags' instead.
9369 (linux_wait_for_event_1): Set ptrace options here.
9370 (linux_wait_1): ... not here.
9371
9372 2009-04-30 Doug Evans <dje@google.com>
9373
9374 * inferiors.c (started_inferior_callback): New function.
9375 (attached_inferior_callback): New function.
9376 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9377 * server.c (print_started_pid, print_attached_pid): New functions.
9378 (detach_or_kill_for_exit): New function.
9379 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9380 * server.h (have_started_inferiors_p): Declare.
9381 (have_attached_inferiors_p): Declare.
9382
9383 * inferiors.c (remove_process): Fix memory leak, free process.
9384 * linux-low.c (linux_remove_process): New function.
9385 (linux_kill): Call it instead of remove_process.
9386 (linux_detach, linux_wait_1): Ditto.
9387
9388 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9389
9390 * configure.srv: Add x86 Windows CE target.
9391
9392 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9393
9394 * inferiors.c (get_thread_process): Make global.
9395 * server.h (get_thread_process): Add prototype.
9396 * thread-db.c (find_one_thread): Use get_thread_process
9397 instead of current_process.
9398 (thread_db_get_tls_address): Do not crash if called when
9399 thread layer is not yet initialized.
9400
9401 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9402
9403 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9404 * spu-low.c (current_tid): Rename to ...
9405 (current_ptid): ... this.
9406 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9407 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9408 ptid_get_lwp (current_ptid) instead of current_tid.
9409 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9410 instead of current_tid. Use find_process_pid to verify pid
9411 argument is valid. Pass proper argument to remove_process.
9412 (spu_thread_alive): Compare current_ptid instead of current_tid.
9413 (spu_resume): Likewise.
9414
9415 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9416
9417 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9418 variable.
9419
9420 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9421
9422 Implement the multiprocess extensions, and add linux multiprocess
9423 support.
9424
9425 * server.h (ULONGEST): Declare.
9426 (struct ptid, ptid_t): New.
9427 (minus_one_ptid, null_ptid): Declare.
9428 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9429 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9430 (struct inferior_list_entry): Change `id' type from unsigned from
9431 to ptid_t.
9432 (struct sym_cache, struct breakpoint, struct
9433 process_info_private): Forward declare.
9434 (struct process_info): Declare.
9435 (current_process): Declare.
9436 (all_processes): Declare.
9437 (initialize_inferiors): Declare.
9438 (add_thread): Adjust to use ptid_t.
9439 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9440 (add_process, remove_process, find_thread_pid): Declare.
9441 (find_inferior_id): Adjust to use ptid_t.
9442 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9443 (multi_process): Declare.
9444 (push_event): Adjust to use ptid_t.
9445 (read_ptid, write_ptid): Declare.
9446 (prepare_resume_reply): Adjust to use ptid_t.
9447 (clear_symbol_cache): Declare.
9448 * inferiors.c (all_processes): New.
9449 (null_ptid, minus_one_ptid): New.
9450 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9451 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9452 (add_thread): Change unsigned long to ptid. Remove gdb_id
9453 parameter. Adjust.
9454 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9455 (gdb_id_to_thread): Rename to ...
9456 (find_thread_pid): ... this. Change unsigned long to ptid.
9457 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9458 (loaded_dll, pull_pid_from_list): Adjust.
9459 (add_process, remove_process, find_process_pid)
9460 (get_thread_process, current_process, initialize_inferiors): New.
9461 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9462 (struct target_waitstatus) <related_pid>: Ditto.
9463 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9464 return type to int.
9465 (struct target_ops) <join>: Add `pid' argument.
9466 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9467 (struct target_ops) <wait>: Add `ptid' field. Change return type
9468 to ptid.
9469 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9470 (mywait): Add `ptid' argument. Change return type to ptid_t.
9471 (target_pid_to_str): Declare.
9472 * target.c (set_desired_inferior): Adjust to use ptids.
9473 (mywait): Add new `ptid' argument. Adjust.
9474 (target_pid_to_str): New.
9475 * mem-break.h (free_all_breakpoints): Declare.
9476 * mem-break.c (breakpoints): Delelete.
9477 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9478 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9479 to use per-process breakpoint list.
9480 (free_all_breakpoints): New.
9481 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9482 (symbol_cache, all_symbols_looked_up): Delete.
9483 (hexchars): New.
9484 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9485 read_ptid): New.
9486 (prepare_resume_reply): Change ptid argument's type from unsigned
9487 long to ptid_t. Adjust. Implement W;process and X;process.
9488 (free_sym_cache, clear_symbol_cache): New.
9489 (look_up_one_symbol): Adjust to per-process symbol cache. *
9490 * server.c (cont_thread, general_thread, step_thread): Change type
9491 to ptid_t.
9492 (attached): Delete.
9493 (multi_process): New.
9494 (last_ptid): Change type to ptid_t.
9495 (struct vstop_notif) <ptid>: Change type to ptid_t.
9496 (queue_stop_reply, push_event): Change `ptid' argument's type to
9497 ptid_t.
9498 (discard_queued_stop_replies): Add `pid' argument.
9499 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9500 changes. Don't reference the `attached' global.
9501 (attach_inferior): Adjust to mywait interface changes.
9502 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9503 features. Handle and report "multiprocess+". Handle
9504 "qAttached:PID".
9505 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9506 changes.
9507 (handle_v_kill): New.
9508 (handle_v_stopped): Adjust to use target_pid_to_str.
9509 (handle_v_requests): Allow multiple attaches and runs when
9510 multiprocess extensions are in effect. Handle "vKill".
9511 (myresume): Adjust to use ptids.
9512 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9513 (handle_status): Adjust to discard_queued_stop_replies interface
9514 change.
9515 (first_thread_of, kill_inferior_callback)
9516 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9517 (main): Call initialize_inferiors. Adjust to use ptids, killing
9518 and detaching from all inferiors. Handle multiprocess packet
9519 variants.
9520 * linux-low.h: Include gdb_proc_service.h.
9521 (struct process_info_private): New.
9522 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9523 <lwpid_of>: Use ptid_get_lwp.
9524 (get_lwp_thread): Adjust.
9525 (struct lwp_info): Add `dead' member.
9526 (find_lwp_pid): Declare.
9527 * linux-low.c (thread_db_active): Delete.
9528 (new_inferior): Adjust comment.
9529 (inferior_pid): Delete.
9530 (linux_add_process): New.
9531 (handle_extended_wait): Adjust.
9532 (add_lwp): Change unsigned long to ptid.
9533 (linux_create_inferior): Add process to processes table. Adjust
9534 to use ptids. Don't set new_inferior here.
9535 (linux_attach_lwp): Rename to ...
9536 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9537 it. Adjust to use ptids.
9538 (linux_attach_lwp): New.
9539 (linux_attach): Add process to processes table. Don't set
9540 new_inferior here.
9541 (struct counter): New.
9542 (second_thread_of_pid_p, last_thread_of_process_p): New.
9543 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9544 multiple processes.
9545 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9546 processes. Remove process from process table.
9547 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9548 to multiple processes.
9549 (any_thread_of): New.
9550 (linux_detach): Add `pid' argument, and handle it. Remove process
9551 from processes table.
9552 (linux_join): Add `pid' argument. Handle it.
9553 (linux_thread_alive): Change unsighed long argument to ptid_t.
9554 Consider dead lwps as not being alive.
9555 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9556 threads we're not interested in.
9557 (same_lwp, find_lwp_pid): New.
9558 (linux_wait_for_lwp): Change `pid' argument's type from int to
9559 ptid_t. Adjust.
9560 (linux_wait_for_event): Rename to ...
9561 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9562 from int to ptid_t. Adjust.
9563 (linux_wait_for_event): New.
9564 (linux_wait_1): Add `ptid' argument. Change return type to
9565 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9566 that exit from the process table.
9567 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9568 Adjust.
9569 (mark_lwp_dead): New.
9570 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9571 stopping all threads, mark its main lwp as dead.
9572 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9573 ptids.
9574 (fetch_register, usr_store_inferior_registers)
9575 (regsets_fetch_inferior_registers)
9576 (regsets_store_inferior_registers, linux_read_memory)
9577 (linux_write_memory): Inline `inferior_pid'.
9578 (linux_look_up_symbols): Adjust to use per-process
9579 `thread_db_active'.
9580 (linux_request_interrupt): Adjust to use ptids.
9581 (linux_read_auxv): Inline `inferior_pid'.
9582 (initialize_low): Don't reference thread_db_active.
9583 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9584 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9585 (ps_getpid): Return the pid of the current inferior.
9586 * thread-db.c (proc_handle, thread_agent): Delete.
9587 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9588 per-process data.
9589 (find_one_thread): Change argument type to ptid_t. Adjust to
9590 per-process data.
9591 (maybe_attach_thread): Adjust to per-process data and ptids.
9592 (thread_db_find_new_threads): Ditto.
9593 (thread_db_init): Ditto.
9594 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9595 processes table. Adjust to use ptids.
9596 (spu_kill, spu_detach): Adjust interface. Remove process from
9597 processes table.
9598 (spu_join, spu_thread_alive): Adjust interface.
9599 (spu_wait): Adjust interface. Remove process from processes
9600 table. Adjust to use ptids.
9601 * win32-low.c (current_inferior_tid): Delete.
9602 (current_inferior_ptid): New.
9603 (debug_event_ptid): New.
9604 (thread_rec): Take a ptid. Adjust.
9605 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9606 (child_delete_thread): Ditto.
9607 (do_initial_child_stuff): Add `attached' argument. Add process to
9608 processes table.
9609 (child_fetch_inferior_registers, child_store_inferior_registers):
9610 Adjust.
9611 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9612 (win32_attach): Pass 1 to do_initial_child_stuff.
9613 (win32_kill): Adjust interface. Remove process from processes
9614 table.
9615 (win32_detach): Ditto.
9616 (win32_join): Adjust interface.
9617 (win32_thread_alive): Take a ptid.
9618 (win32_resume): Adjust to use ptids.
9619 (get_child_debug_event): Ditto.
9620 (win32_wait): Adjust interface. Remove exiting process from
9621 processes table.
9622
9623 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9624
9625 Non-stop mode support.
9626
9627 * server.h (non_stop): Declare.
9628 (gdb_client_data, handler_func): Declare.
9629 (delete_file_handler, add_file_handler, start_event_loop):
9630 Declare.
9631 (handle_serial_event, handle_target_event, push_event)
9632 (putpkt_notif): Declare.
9633 * target.h (enum resume_kind): New.
9634 (struct thread_resume): Replace `step' field by `kind' field.
9635 (TARGET_WNOHANG): Define.
9636 (struct target_ops) <wait>: Add `options' argument.
9637 <supports_non_stop, async, start_non_stop>: New fields.
9638 (target_supports_non_stop, target_async): New.
9639 (start_non_stop): Declare.
9640 (mywait): Add `options' argument.
9641 * target.c (mywait): Add `options' argument. Print child exit
9642 notifications here.
9643 (start_non_stop): New.
9644 * server.c (non_stop, own_buf, mem_buf): New globals.
9645 (struct vstop_notif): New.
9646 (notif_queue): New global.
9647 (queue_stop_reply, push_event, discard_queued_stop_replies)
9648 (send_next_stop_reply): New.
9649 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9650 interface changes.
9651 (attach_inferior): In non-stop mode, don't wait for the target
9652 here.
9653 (handle_general_set): Handle QNonStop.
9654 (handle_query): When handling qC, return the current general
9655 thread, instead of the first thread of the list.
9656 (handle_query): If the backend supports non-stop mode, include
9657 QNonStop+ in the qSupported query response.
9658 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9659 and non-stop mode.
9660 (handle_v_attach, handle_v_run): Handle non-stop mode.
9661 (handle_v_stopped): New.
9662 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9663 (myresume): Adjust to use resume_kind. Handle non-stop.
9664 (queue_stop_reply_callback): New.
9665 (handle_status): Handle non-stop mode.
9666 (main): Clear non_stop flag on reconnection. Use the event-loop.
9667 Refactor serial protocol handling from here ...
9668 (process_serial_event): ... to this new function. When GDB
9669 selects any thread, select one here. In non-stop mode, wait until
9670 GDB acks all pending events before exiting.
9671 (handle_serial_event, handle_target_event): New.
9672 * remote-utils.c (remote_open): Install remote_desc in the event
9673 loop.
9674 (remote_close): Remove remote_desc from the event loop.
9675 (putpkt_binary): Rename to...
9676 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9677 (putpkt_binary): New as wrapper around putpkt_binary_1.
9678 (putpkt_notif): New.
9679 (prepare_resume_reply): In non-stop mode, don't change the
9680 general_thread.
9681 * event-loop.c: New.
9682 * Makefile.in (OBJ): Add event-loop.o.
9683 (event-loop.o): New rule.
9684
9685 * linux-low.h (pid_of): Moved here.
9686 (lwpid_of): New.
9687 (get_lwp_thread): Use lwpid_of.
9688 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9689 * linux-low.c (pid_of): Delete.
9690 (inferior_pid): Use lwpid_of.
9691 (linux_event_pipe): New.
9692 (target_is_async_p): New.
9693 (delete_lwp): New.
9694 (handle_extended_wait): Use lwpid_of.
9695 (add_lwp): Don't set lwpid field.
9696 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9697 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9698 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9699 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9700 first. Adjust to linux_wait_for_event interface changes. Use
9701 lwpid_of.
9702 (linux_detach): Don't delete the main lwp here.
9703 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9704 (status_pending_p): Don't consider explicitly suspended lwps.
9705 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9706 pointer. Add OPTIONS argument. Change return type to int. Use
9707 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9708 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9709 pointer. Add status pointer argument. Return a pid instead of a
9710 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9711 changes. In non-stop mode, don't switch to a random thread.
9712 (linux_wait): Rename to...
9713 (linux_wait_1): ... this. Add target_options argument, and handle
9714 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9715 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9716 clean exit and signal exit code. Don't stop all threads in
9717 non-stop mode. In all-stop mode, only stop all threads when
9718 reporting a stop to GDB. Handle explicit thread stop requests.
9719 (async_file_flush, async_file_mark): New.
9720 (linux_wait): New.
9721 (send_sigstop): Use lwpid_of.
9722 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9723 interface changes. In non-stop mode, don't switch to a random
9724 thread.
9725 (linux_resume_one_lwp): Use lwpid_of.
9726 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9727 (linux_resume_one_thread): ... this. Handle resume_stop. In
9728 non-stop mode, don't look for pending flag in all threads.
9729 (resume_status_pending_p): Don't consider explicitly suspended
9730 threads.
9731 (my_waitpid): Reimplement. Emulate __WALL.
9732 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9733 Use lwpid_of.
9734 (sigchld_handler, linux_supports_non_stop, linux_async)
9735 (linux_start_non_stop): New.
9736 (linux_target_ops): Register linux_supports_non_stop, linux_async
9737 and linux_start_non_stop.
9738 (initialize_low): Install SIGCHLD handler.
9739 * thread-db.c (thread_db_create_event, find_one_thread)
9740 (thread_db_get_tls_address): Use lwpid_of.
9741 * win32-low.c (win32_detach): Adjust to use resume_kind.
9742 (win32_wait): Add `options' argument.
9743 * spu-low.c (spu_resume): Adjust to use resume_kind.
9744 (spu_wait): Add `options' argument.
9745
9746 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9747
9748 Decouple target code from remote protocol.
9749
9750 * target.h (enum target_waitkind): New.
9751 (struct target_waitstatus): New.
9752 (struct target_ops) <wait>: Return an unsigned long. Take a
9753 target_waitstatus pointer instead of a char pointer.
9754 (mywait): Likewise.
9755 * target.c (mywait): Change prototype to return an unsigned long.
9756 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9757 * server.h (thread_from_wait, old_thread_from_wait): Delete
9758 declarations.
9759 (prepare_resume_reply): Change prototype to take a
9760 target_waitstatus.
9761 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9762 (last_status, last_ptid): New.
9763 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9764 pid instead of a signal.
9765 (attach_inferior): Remove "status" and "signal" parameters.
9766 Adjust.
9767 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9768 not as an address.
9769 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9770 (handle_v_requests, myresume): Remove "status" and "signal"
9771 parameters. Adjust.
9772 (handle_status): New.
9773 (main): Delete local `status'. Adjust.
9774 * remote-utils.c: Include target.h.
9775 (prepare_resume_reply): Change prototype to take a
9776 target_waitstatus. Adjust.
9777
9778 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9779 interface.
9780 * spu-low.c (spu_wait): Adjust.
9781 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9782 Delete.
9783 (win32_wait): Adjust.
9784
9785 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9786
9787 * target.h (struct thread_resume): Delete leave_stopped member.
9788 (struct target_ops): Add a `n' argument to the `resume' callback.
9789 * server.c (start_inferior): Adjust.
9790 (handle_v_cont, myresume): Adjust.
9791 * linux-low.c (check_removed_breakpoint): Adjust to resume
9792 interface change, and to removed leave_stopped field.
9793 (resume_ptr): Delete.
9794 (struct thread_resume_array): New.
9795 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9796 resume interface change.
9797 (linux_continue_one_thread, linux_queue_one_thread)
9798 (resume_status_pending_p): Check if the resume field is NULL
9799 instead of checking the leave_stopped member.
9800 (linux_resume): Adjust to the target resume interface change.
9801 * spu-low.c (spu_resume): Adjust to the target resume interface
9802 change.
9803 * win32-low.c (win32_detach, win32_resume): Ditto.
9804
9805 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9806
9807 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9808 flag.
9809 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9810 pending.
9811 (linux_continue_one_thread): Only preserve the stepping flag if
9812 there's a pending breakpoint.
9813
9814 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9815
9816 * server.c (main): After the inferior having exited, call
9817 remote_close before exiting gdbserver.
9818
9819 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9820
9821 Fix size of FPSCR in Power 7 processors.
9822 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9823 (PPC_FEATURE_HAS_DFP): New #define.
9824 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9825 size of the FPSCR.
9826
9827 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9828
9829 * server.c (handle_query) Whitespace and formatting.
9830
9831 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9832
9833 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9834 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9835 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9836 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9837 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9838 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9839 Makefile.in, configure.ac: Fix whitespace throughout.
9840 * configure: Regenerate.
9841
9842 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9843
9844 * inferiors.c (find_inferior): Make it safe for the callback
9845 function to delete the currently iterated inferior.
9846
9847 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9848
9849 * Makefile.in (linuw_low_h): Move higher.
9850 (thread-db.o): Depend on $(linux_low_h).
9851
9852 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9853
9854 Rename "process" to "lwp" throughout.
9855
9856 * linux-low.c (all_processes): Rename to...
9857 (all_lwps): ... this.
9858 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9859 (add_process): Rename to ...
9860 (add_lwp): ... this. Adjust.
9861 (linux_create_inferior): Adjust.
9862 (linux_attach_lwp): Adjust.
9863 (linux_attach): Adjust.
9864 (linux_kill_one_process): Rename to ...
9865 (linux_kill_one_lwp): ... this. Adjust.
9866 (linux_kill): Adjust.
9867 (linux_detach_one_process): Rename to ...
9868 (linux_detach_one_lwp): ... this. Adjust.
9869 (linux_detach): Adjust.
9870 (check_removed_breakpoint): Adjust.
9871 (status_pending_p): Adjust.
9872 (linux_wait_for_process): Rename to ...
9873 (linux_wait_for_lwp): ... this. Adjust.
9874 (linux_wait_for_event): Adjust.
9875 (send_sigstop): Adjust.
9876 (wait_for_sigstop): Adjust.
9877 (stop_all_processes): Rename to ...
9878 (stop_all_lwps): ... this.
9879 (linux_resume_one_process): Rename to ...
9880 (linux_resume_one_lwp): ... this. Adjust.
9881 (linux_set_resume_request, linux_continue_one_thread)
9882 (linux_queue_one_thread, resume_status_pending_p)
9883 (usr_store_inferior_registers, regsets_store_inferior_registers)
9884 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9885 Adjust.
9886 * linux-low.h (get_process): Rename to ...
9887 (get_lwp): ... this. Adjust.
9888 (get_thread_process): Rename to ...
9889 (get_thread_lwp): ... this. Adjust.
9890 (get_process_thread): Rename to ...
9891 (get_lwp_thread): ... this. Adjust.
9892 (struct process_info): Rename to ...
9893 (struct lwp_info): ... this.
9894 (all_processes): Rename to ...
9895 (all_lwps): ... this.
9896 * proc-service.c (ps_lgetregs): Adjust.
9897 * thread-db.c (thread_db_create_event, find_one_thread)
9898 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9899
9900 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9901
9902 * server.c (handle_query): Handle "qAttached".
9903
9904 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9905
9906 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9907 GPLv3, update license URL.
9908
9909 2009-03-01 Doug Evans <dje@google.com>
9910
9911 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9912 (server_h): Add gdb_signals.h.
9913 (signals.o): Update.
9914 * server.h (target_signal_from_host,target_signal_to_host_p)
9915 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9916
9917 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9918
9919 * remote-utils.c (getpkt): Also generate remote-debug
9920 information if noack_mode is set.
9921
9922 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9923
9924 * server.c (handle_query): Report qXfer:siginfo:read and
9925 qXfer:siginfo:write as supported and handle them.
9926 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9927 * linux-low.c (linux_xfer_siginfo): New.
9928 (linux_target_ops): Set it.
9929
9930 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9931
9932 * server.c (gdbserver_usage): Mention --remote-debug.
9933 (main): Accept '--remote-debug' switch.
9934
9935 2009-01-18 Doug Evans <dje@google.com>
9936
9937 * regcache.c (new_register_cache): No need to check result of xcalloc.
9938 * server.c (handle_search_memory): Back out calls to xmalloc,
9939 result is checked and error is returned to user upon failure.
9940 (handle_query): Ditto. Add more checks for result of malloc.
9941 (handle_v_cont): Check result of malloc, report error back to
9942 user upon failure.
9943 (handle_v_run): Ditto. Call freeargv.
9944 * server.h (freeargv): Declare.
9945 * utils.c (freeargv): New fn.
9946
9947 2009-01-15 Doug Evans <dje@google.com>
9948
9949 * gdbreplay.c (perror_with_name): Make arg const char *.
9950 * server.h (target_signal_to_name): Make return type const char *.
9951 * thread-db.c (thread_db_err_str): Make return type const char *.
9952 * utils.c (perror_with_name): Make arg const char *.
9953
9954 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9955
9956 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9957 when handling a EXIT_PROCESS_DEBUG_EVENT.
9958
9959 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9960
9961 * gdbreplay.c (gdbreplay_version): Update copyright year.
9962 * server.c (gdbserver_version): Likewise.
9963
9964 2009-01-05 Doug Evans <dje@google.com>
9965
9966 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9967 (handle_extended_wait): Improve comment.
9968
9969 2008-12-13 Doug Evans <dje@google.com>
9970
9971 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9972 * server.h (ATTR_MALLOC): New macro.
9973 (xmalloc,xcalloc,xstrdup): Declare.
9974 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9975 * inferiors.c: Ditto.
9976 * linux-low.c: Ditto.
9977 * mem-break.c: Ditto.
9978 * regcache.c: Ditto.
9979 * remote-utils.c: Ditto.
9980 * server.c: Ditto.
9981 * target.c: Ditto.
9982 * win32-low.c: Ditto.
9983
9984 2008-12-12 Doug Evans <dje@google.com>
9985
9986 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9987 in debugging printf.
9988
9989 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9990
9991 2008-12-09 Doug Evans <dje@google.com>
9992
9993 * linux-low.h (struct process_info): Delete member tid, unused.
9994 * thread-db.c (find_one_thread): Update.
9995 (maybe_attach_thread): Update.
9996
9997 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9998
9999 * target.h (struct target_ops): Add qxfer_osdata member.
10000 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10001 and dirent.h.
10002 (linux_qxfer_osdata): New functions.
10003 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10004 callback.
10005 * server.c (handle_query): Handle "qXfer:osdata:read:".
10006 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10007 (buffer_xml_printf): New functions.
10008 * server.h (struct buffer): New.
10009 (buffer_grow_str, buffer_grow_str0): New macros.
10010 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10011 (buffer_xml_printf): Declare.
10012
10013 2008-11-24 Doug Evans <dje@google.com>
10014
10015 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10016
10017 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * server.c (handle_v_run): Always use the supplied argument list.
10020
10021 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10022
10023 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10024 (xtensa_regmap_table): Add entry for scompare1.
10025
10026 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10027
10028 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10029 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10030 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10031 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10032 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10033 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10034 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10035 XML target descriptions.
10036 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10037 when inferior is running on an ISA 2.05 or later processor. Add
10038 special case to return offset for full 64-bit slot of FPSCR when
10039 in 32-bits.
10040
10041 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10042
10043 * Makefile.in (SFILES, clean): Added sparc64 files.
10044 (reg-sparc64.o, reg-sparc64.c): New.
10045 * configure.srv (sparc*-*-linux*): New configuration.
10046 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10047 syscall arguments for SPARC.
10048 (regsets_store_inferior_registers): Likewise.
10049 * linux-sparc-low.c: New file.
10050
10051 2008-10-21 Doug Evans <dje@google.com>
10052
10053 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10054 (READLINE_DIR,READLINE_DEP): Delete.
10055 (INTERNAL_CFLAGS): Update.
10056 (LINTFLAGS): Update.
10057
10058 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10059
10060 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10061 whole argv from the last run, not just argv[0].
10062
10063 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10064
10065 * regcache.c (new_register_cache): Return NULL if the register
10066 cache size isn't known yet.
10067 (free_register_cache): Avoid dereferencing a NULL regcache.
10068
10069 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10070
10071 * configure.srv: Merge MIPS and MIPS64.
10072
10073 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10074
10075 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10076
10077 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10078
10079 * Makefile.in: Add required vsx dependencies.
10080
10081 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10082 Declare init_registers_powerpc_vsx32l.
10083 Declare init_registers_powerpc_vsx64l.
10084 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10085 (ppc_arch_setup): Check for VSX in hwcap.
10086 (ppc_fill_vsxregset): New function.
10087 (ppc_store_vsxregset): New function.
10088 Add new VSX entry in regset_info target_regsets.
10089
10090 * configure.srv: Add new VSX dependencies.
10091
10092 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10093
10094 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10095 (remote_open): Set or clear transport_is_reliable.
10096 (putpkt_binary): Don't expect acks in noack mode.
10097 (getpkt): Don't send ack/nac in noack mode.
10098 * server.c (handle_general_set): Handle QStartNoAckMode.
10099 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10100 qSupported.
10101 (main): Reset noack_mode on every connection.
10102 * server.h (noack_mode): Declare.
10103
10104 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10105
10106 * Makefile.in (GDBREPLAY_OBS): New variable.
10107 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10108
10109 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10110 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10113 (usr_store_inferior_registers): Likewise.
10114 (regsets_store_inferior_registers): Likewise.
10115
10116 2008-07-31 Rolf Jansen <rj@surtec.com>
10117 Pedro Alves <pedro@codesourcery.com>
10118
10119 * configure.ac: Check for memmem declaration.
10120 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10121 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10122 (disable_packet_qfThreadInfo): Unconditionally compile.
10123 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10124 * configure, config.in: Regenerate.
10125
10126 2008-07-28 Doug Kwan <dougkwan@google.com>
10127
10128 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10129 (linux_write_memory): Remove declaration of errno.
10130
10131 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10132
10133 * linux-low.c (handle_extended_wait): Do not use "status"
10134 variable uninitialized.
10135
10136 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10137
10138 * server.c (handle_v_attach): Inhibit reporting dll changes.
10139
10140 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10141
10142 * remote-utils.c (prepare_resume_reply): If requested, don't
10143 output "thread:TID" in the T stop reply.
10144
10145 * server.c (disable_packet_vCont, disable_packet_Tthread)
10146 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10147 (handle_query): If requested, disable support for qC, qfThreadInfo
10148 and qsThreadInfo.
10149 (handle_v_requests): If requested, disable support for vCont.
10150 (gdbserver_show_disableable): New.
10151 (main): Handle --disable-packet and --disable-packet=LIST.
10152
10153 * server.h (disable_packet_vCont, disable_packet_Tthread)
10154 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10155
10156 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10157
10158 * server.c (gdbserver_usage): Mention --version.
10159
10160 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10161
10162 * Makefile.in (gdbreplay.o): New rule.
10163
10164 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10165
10166 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10167 message, not gdbserver.
10168
10169 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10170 Nathan Sidwell <nathan@codesourcery.com>
10171 Joseph Myers <joseph@codesourcery.com>
10172
10173 * acinclude.m4: Include ../../config/acx.m4.
10174 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10175 * configure, config.in: Regenerate.
10176 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10177 * server.c (gdbserver_version): Print PKGVERSION.
10178 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10179 (main): Adjust gdbserver_usage calls.
10180 * gdbreplay.c (version, host_name): Add declarations.
10181 (gdbreplay_version, gdbreplay_usage): New.
10182 (main): Accept --version and --help options.
10183
10184 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10185
10186 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10187 (arm_breakpoint_at): Handle Thumb.
10188 (the_low_target): Add comment.
10189
10190 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10191
10192 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10193
10194 2008-05-09 Doug Evans <dje@google.com>
10195
10196 * server.h (decode_search_memory_packet): Declare.
10197 * remote-utils.c (decode_search_memory_packet): New fn.
10198 * server.c (handle_search_memory_1): New fn.
10199 (handle_search_memory): New fn.
10200 (handle_query): Process qSearch:memory packets.
10201
10202 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * regcache.c (registers_length): Remove.
10205 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10206 full register packet.
10207 * regcache.h (registers_length): Remove prototype.
10208 * server.h (PBUFSIZ): Define to 16384.
10209
10210 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10211
10212 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10213 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10214 powerpc-64l.o, and powerpc-altivec64l.o.
10215 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10216 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10217 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10218 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10219 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10220 to srv_xmlfiles.
10221
10222 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10223 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10224 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10225 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10226 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10227 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10228 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10229 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10230 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10231 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10232 (clean): Update.
10233
10234 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10235 (init_registers_powerpc_32l): ... this new prototype.
10236 (init_registers_powerpc_32): Remove, replace by ...
10237 (init_registers_powerpc_altivec32l): ... this new prototype.
10238 (init_registers_powerpc_e500): Remove, replace by ...
10239 (init_registers_powerpc_e500l): ... this new prototype.
10240 (init_registers_ppc64): Remove, replace by ...
10241 (init_registers_powerpc_64l): ... this new prototype.
10242 (init_registers_powerpc_64): Remove, replace by ...
10243 (init_registers_powerpc_altivec64l): ... this new prototype.
10244 (ppc_num_regs): Set to 73.
10245 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10246 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10247 (ppc_cannot_store_register): Handle orig_r3 and trap.
10248 (ppc_arch_setup): Update init_registers_... calls.
10249 (ppc_fill_gregset): Handle orig_r3 and trap.
10250
10251 * inferiors.c (clear_inferiors): Reset current_inferior.
10252
10253 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10254
10255 * acinclude.m4: Add override.m4.
10256 * configure: Regenerate.
10257
10258 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10259
10260 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10261 initial call to init_register_ppc64.
10262
10263 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10264
10265 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10266 single powerpc*-*-linux* case.
10267 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10268
10269 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10270
10271 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10272 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10273 from reg_xmlfiles.
10274 * linux-ppc-low.c: Include <elf.h>.
10275 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10276 (ppc_hwcap): New global variable.
10277 (ppc_regmap): Remove __SPE__ #ifdef sections.
10278 (ppc_regmap_e500): New global variable.
10279 (ppc_cannot_store_register): Update __SPE__ special case.
10280 (ppc_get_hwcap): New function.
10281 (ppc_arch_setup): Use it to determine whether inferior supports
10282 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10283 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10284 Do not access registers if target does not support AltiVec.
10285 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10286 Do not access registers if target does not support SPE.
10287 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10288
10289 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * linux-low.c (disabled_regsets, num_regsets): New.
10292 (use_regsets_p): Delete.
10293 (linux_wait_for_process): Clear disabled_regsets.
10294 (regsets_fetch_inferior_registers): Check and set it.
10295 (regsets_store_inferior_registers): Likewise.
10296 (linux_fetch_registers, linux_store_registers): Do not use
10297 use_regsets_p.
10298 (initialize_low): Allocate disabled_regsets.
10299
10300 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10301
10302 * Makefile.in (LIBOBJS): New.
10303 (OBS): Use LIBOBJS.
10304 (memmem.o): New rule.
10305 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10306 * configure: Regenerated.
10307
10308 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10309
10310 * server.c (handle_query): Never return "unsupported" for
10311 qXfer:features:read queries.
10312
10313 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10314
10315 * server.c (get_features_xml): Fix inverted condition.
10316 (handle_query): Always support qXfer:feature:read.
10317
10318 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10319
10320 * server.c (wrapper_argv): New.
10321 (start_inferior): Handle wrapper_argv. If set, expect an extra
10322 trap.
10323 (gdbserver_usage): Document --wrapper.
10324 (main): Parse --wrapper.
10325
10326 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10327
10328 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10329 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10330 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10331 (ppc_set_pc): Likewise.
10332 (ppc_arch_setup): New function.
10333 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10334 of collect_register.
10335 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10336
10337 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10338
10339 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10340 instead of linux-ppc64-low.o.
10341 * linux-ppc64-low.c: Remove file.
10342 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10343 (linux-ppc64-low.o): Remove rule.
10344
10345 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10346 (init_registers_powerpc_64): Likewise.
10347 (ppc_regmap): Conditionally define depending on __powerpc64__.
10348 (ppc_cannot_store_register): Do not special-case "fpscr" when
10349 compiled on __powerpc64__.
10350 (ppc_collect_ptrace_register): New function.
10351 (ppc_supply_ptrace_register): New function.
10352 (ppc_breakpoint): Change type to "unsigned int".
10353 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10354 (the_low_target): Conditionally provide initializers for the
10355 arch_setup member depending on __powerpc64__. Install
10356 collect_ptrace_register and supply_ptrace_register members.
10357
10358 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10359
10360 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10361 * server.c (gdbserver_xmltarget): Define.
10362 (get_features_xml): Use it to replace "target.xml" and arch_string.
10363
10364 * configure.srv: Remove srv_xmltarget. Add XML files that were
10365 mentioned there to srv_xmlfiles instead. Remove conditional tests
10366 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10367 srv_xmlfiles and srv_regobj to include all possible choices.
10368 * configure.ac (srv_xmltarget): Remove.
10369 (srv_xmlfiles): Do not add "target.xml".
10370 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10371 checks for supplementary target information.
10372 * configure: Regenerate.
10373 * Makefile.in (XML_TARGET): Remove.
10374 (target.xml): Remove rule.
10375 (clean): Do not clean up target.xml.
10376 (.PRECIOUS): Do not mention target.xml.
10377
10378 * target.h (struct target_ops): Remove arch_string member.
10379 * linux-low.c (linux_arch_string): Remove.
10380 (linux_target_ops): Remove arch_string initializer.
10381 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10382 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10383 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10384 * spu-low.c (spu_arch_string): Remove.
10385 (spu_target_ops): Remove arch_string initializer.
10386 * win32-low.c (win32_arch_string): Remove.
10387 (win32_target_ops): Remove arch_string initializer.
10388 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10389 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10390 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10391
10392 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10395 by collect_ptrace_register and supply_ptrace_register hooks.
10396 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10397 instead of checking for the_low_target.left_pad_xfer.
10398 (usr_store_inferior_registers): Use collect_ptrace_register callback
10399 instead of checking for the_low_target.left_pad_xfer.
10400
10401 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10402 (s390_supply_ptrace_register): Likewise.
10403 (s390_fill_gregset): Call s390_collect_ptrace_register.
10404 (the_low_target): Update.
10405
10406 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10407 (ppc_supply_ptrace_register): Likewise.
10408 (the_low_target): Update.
10409
10410 * linux-i386-low.c (the_low_target): Update.
10411 * linux-x86-64-low.c (the_low_target): Update.
10412
10413 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10414
10415 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10416 reg-s390.o and reg-s390x.o.
10417
10418 * linux-low.c (new_inferior): New global variable.
10419 (linux_create_inferior, linux_attach): Set it.
10420 (linux_wait_for_process): Call the_low_target.arch_setup after the
10421 target has stopped for the first time.
10422 (initialize_low): Do not call the_low_target.arch_setup.
10423
10424 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10425 (s390_set_pc): Likewise.
10426 (s390_arch_setup): New function.
10427 (the_low_target): Use s390_arch_setup as arch_setup routine.
10428
10429 * regcache.c (realloc_register_cache): New function.
10430 (set_register_cache): Call it for each existing regcache.
10431
10432 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10433
10434 * server.h (init_registers): Remove prototype.
10435
10436 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10437 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10438 instead of init_registers ().
10439 * linux-arm-low.c (init_registers_arm): Add prototype.
10440 (init_registers_arm_with_iwmmxt): Likewise.
10441 (the_low_target): Add initializer for arch_setup field.
10442 * linux-cris-low.c (init_registers_cris): Add prototype.
10443 (the_low_target): Add initializer for arch_setup field.
10444 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10445 (the_low_target): Add initializer for arch_setup field.
10446 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10447 (the_low_target): Add initializer for arch_setup field.
10448 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10449 (the_low_target): Add initializer for arch_setup field.
10450 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10451 (the_low_target): Add initializer for arch_setup field.
10452 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10453 (the_low_target): Add initializer for arch_setup field.
10454 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10455 (init_registers_mips64_linux): Likewise.
10456 (the_low_target): Add initializer for arch_setup field.
10457 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10458 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10459 (the_low_target): Add initializer for arch_setup field.
10460 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10461 (init_registers_powerpc_64): Likewise.
10462 (the_low_target): Add initializer for arch_setup field.
10463 * linux-s390-low.c (init_registers_s390): Add prototype.
10464 (init_registers_s390x): Likewise.
10465 (the_low_target): Add initializer for arch_setup field.
10466 * linux-sh-low.c (init_registers_sh): Add prototype.
10467 (the_low_target): Add initializer for arch_setup field.
10468 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10469 (the_low_target): Add initializer for arch_setup field.
10470 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10471 (the_low_target): Add initializer for arch_setup field.
10472
10473 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10474 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10475 instead of init_registers ().
10476 * win32-arm-low.c (init_registers_arm): Add prototype.
10477 (the_low_target): Add initializer for arch_setup field.
10478 * win32-i386-low.c (init_registers_i386): Add prototype.
10479 (the_low_target): Add initializer for arch_setup field.
10480
10481 * spu-low.c (init_registers_spu): Add prototype.
10482 (initialize_low): Call initialie_registers_spu () instead of
10483 initialize_registers ().
10484
10485 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10486
10487 * server.c (handle_v_requests): When handling the vRun and vAttach
10488 packets, if already debugging a process, don't kill it. Return an
10489 error instead.
10490
10491 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10492
10493 * server.c (handle_query): Correct length check.
10494
10495 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10496
10497 * win32-low.c (do_initial_child_stuff): Add process handle
10498 parameter. Set current_process_handle and current_process_id from the
10499 parameters. Clear globals.
10500 (win32_create_inferior): Don't set current_process_handle and
10501 current_process_id here. Instead pass them on the call to
10502 do_initial_child_stuff.
10503 (win32_attach): Likewise.
10504 (win32_clear_inferiors): New.
10505 (win32_kill): Don't close the current process handle or the
10506 current thread handle here. Instead call win32_clear_inferiors.
10507 (win32_detach): Don't open a new handle to the process. Call
10508 win32_clear_inferiors.
10509 (win32_join): Don't rely on current_process_handle; open a new
10510 handle using the process id.
10511 (win32_wait): Call win32_clear_inferiors when the inferior process
10512 has exited.
10513
10514 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * server.c (monitor_show_help): Add "exit".
10517
10518 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10519
10520 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10521 (clean): Add reg-xtensa.c.
10522 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10523 * configure.srv (xtensa*-*-linux*) New target.
10524 * linux-xtensa-low.c: New.
10525 * xtensa-xtregs.c: New.
10526
10527 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10528
10529 * hostio.c: Don't include errno.h.
10530 (errno_to_fileio_errno): Move to hostio-errno.
10531 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10532 error number outputting to the target->hostio_last_error callback.
10533 (hostio_packet_error): Use FILEIO_EINVAL directly.
10534 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10535 calls to hostio_error.
10536 * hostio-errno.c: New.
10537 * server.h (hostio_last_error_from_errno): Declare.
10538 * target.h (target_ops): Add hostio_last_error member.
10539 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10540 as hostio_last_error handler.
10541 * spu-low.c (spu_target_ops): Likewise.
10542 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10543 (wince_hostio_last_error): New functions.
10544 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10545 as hostio_last_error handler.
10546 (win32_target_ops) [!_WIN32_WCE]: Register
10547 hostio_last_error_from_errno as hostio_last_error handler.
10548 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10549 (hostio-errno.o): New rule.
10550 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10551 * configure.srv (srv_hostio_err_objs): New variable. Default to
10552 hostio-errno.o.
10553 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10554 * configure: Regenerate.
10555
10556 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10557
10558 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10559 (linux_kill, linux_detach): Clean up the process list.
10560 * remote-utils.c (remote_open): Improve port number parsing.
10561 (putpkt_binary, input_interrupt): Only send interrupts if the target
10562 is running.
10563 * server.c (extended_protocol): Make static.
10564 (attached): Define earlier.
10565 (exit_requested, response_needed, program_argv): New variables.
10566 (target_running): New.
10567 (start_inferior): Clear attached here.
10568 (attach_inferior): Set attached here.
10569 (require_running): Define.
10570 (handle_query): Use require_running and target_running. Implement
10571 "monitor exit".
10572 (handle_v_attach, handle_v_run): New.
10573 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10574 (gdbserver_usage): Update.
10575 (main): Redo argument parsing. Handle --debug and --multi. Handle
10576 --attach along with other options or after the port. Save
10577 program_argv. Support no initial program. Resynchronize
10578 communication with GDB after an error. Handle "monitor exit".
10579 Use require_running and target_running. Always allow the extended
10580 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10581 restart in extended mode.
10582 * README: Refer to the GDB manual. Update --attach usage.
10583
10584 2007-12-20 Andreas Schwab <schwab@suse.de>
10585
10586 * linux-low.c (STACK_SIZE): Define.
10587 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10588 (linux_test_for_tracefork): Likewise.
10589
10590 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * linux-low.c (linux_wait_for_event): Update messages. Do not
10593 reinsert auto-delete breakpoints.
10594 * mem-break.c (struct breakpoint): Change return type of handler to
10595 int.
10596 (set_breakpoint_at): Update handler type.
10597 (reinsert_breakpoint_handler): Return 1 instead of calling
10598 delete_breakpoint.
10599 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10600 setting a new one.
10601 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10602 * mem-break.h (set_breakpoint_at): Update handler type.
10603 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10604 * win32-low.c (auto_delete_breakpoint): New.
10605 (get_child_debug_event): Use it.
10606
10607 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10608
10609 * configure.ac: Check for pread and pwrite.
10610 * hostio.c (handle_pread): Fall back to lseek and read.
10611 (handle_pwrite): Fall back to lseek and write.
10612 * config.in, configure: Regenerated.
10613
10614 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10615
10616 * server.c (myresume): Add own_buf argument.
10617 (main): Update calls.
10618
10619 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10622 * remote-utils.c (remote_open): Do not call disable_async_io.
10623 (block_async_io): Delete.
10624 (unblock_async_io): Make static.
10625 (initialize_async_io): New.
10626 * server.c (handle_v_cont): Handle async I/O here.
10627 (myresume): Likewise. Move other common resume tasks here...
10628 (main): ... from here. Call initialize_async_io. Disable async
10629 I/O before the main loop.
10630 * server.h (initialize_async_io): Declare.
10631 (block_async_io, unblock_async_io): Delete prototypes.
10632 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10633
10634 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10635
10636 * remote-utils.c (readchar): Allow binary data in received messages.
10637
10638 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10639
10640 * win32-low.c (attaching): New global.
10641 (win32_create_inferior): Clear the `attaching' global.
10642 (win32_attach): Set the `attaching' global.
10643 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10644 attaching. Only set a breakpoint at the entry point if not
10645 attaching.
10646
10647 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10648
10649 * server.c (main): Don't report dll events on the initial
10650 connection on attaches.
10651
10652 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10653
10654 * server.c (main): Relax numerical bases supported for the pid of
10655 the --attach command line argument.
10656
10657 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10658
10659 * win32-low.c (win32_attach): Call OpenProcess before
10660 DebugActiveProcess, not after. Add last error output to error
10661 call.
10662
10663 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10664
10665 * win32-low.c (win32_get_thread_context)
10666 (win32_set_thread_context): New functions.
10667 (thread_rec): Use win32_get_thread_context.
10668 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10669 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10670 field.
10671
10672 2007-12-03 Leo Zayas
10673 Pedro Alves <pedro_alves@portugalmail.pt>
10674
10675 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10676 global variables.
10677 (child_add_thread): Minor cleanup.
10678 (child_continue): Resume artificially suspended threads before
10679 calling ContinueDebugEvent.
10680 (suspend_one_thread): New.
10681 (fake_breakpoint_event): New.
10682 (get_child_debug_event): Change return type to int. Check here if
10683 gdb sent an interrupt request. If a soft interrupt was requested,
10684 fake a breakpoint event. Return 0 if there is no event to handle,
10685 and 1 otherwise.
10686 (win32_wait): Don't check here if gdb sent an interrupt request.
10687 Ensure there is a valid event to handle.
10688 (win32_request_interrupt): Add soft interruption method as last
10689 resort.
10690
10691 2007-12-03 Leo Zayas
10692 Pedro Alves <pedro_alves@portugalmail.pt>
10693
10694 * win32-low.h (win32_thread_info): Add descriptions to the
10695 structure members. Replace `suspend_count' counter by a
10696 `suspended' flag.
10697 * win32-low.c (thread_rec): Update condition of when to get the
10698 context from the inferior. Rely on ContextFlags being set if it
10699 has already been retrieved. Only suspend the inferior thread if
10700 we haven't already. Warn if that fails.
10701 (continue_one_thread): s/suspend_count/suspended/. Only call
10702 ResumeThread once. Warn if that fails.
10703
10704 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10705
10706 * win32-low.c (win32_wait): Don't read from the inferior when it
10707 has already exited.
10708
10709 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10710
10711 * Makefile.in (win32_low_h): New variable.
10712 (win32-low.o): Add dependency on $(win32_low_h).
10713 (win32-arm-low.o, win32-i386-low.o): New rules.
10714
10715 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10716
10717 * hostio.c: Correct copyright year.
10718
10719 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10720
10721 * Makefile.in (OBS): Add hostio.o.
10722 (hostio.o): New rule.
10723 * server.h (handle_vFile): Declare.
10724 * hostio.c: New file.
10725 * server.c (handle_v_requests): Take packet_len and new_packet_len
10726 for binary packets. Call handle_vFile.
10727 (main): Update call to handle_v_requests.
10728
10729 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10730
10731 * linux-low.c: Include <sched.h>.
10732
10733 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10734
10735 * linux-low.c (linux_tracefork_grandchild): New.
10736 (linux_tracefork_child): Use clone.
10737 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10738
10739 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10740
10741 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10742
10743 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10744
10745 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10746
10747 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10748
10749 * inferiors.c (change_inferior_id): Delete.
10750 (add_pid_to_list, pull_pid_from_list): New.
10751 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10752 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10753 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10754 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10755 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10756 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10757 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10758 (using_threads): Always set to 1.
10759 (handle_extended_wait): New.
10760 (add_process): Do not set TID.
10761 (linux_create_inferior): Set must_set_ptrace_flags.
10762 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10763 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10764 (linux_thread_alive): Rename TID argument to LWPID.
10765 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10766 (linux_wait_for_event): Do not use TID or check using_threads. Update
10767 call to dead_thread_notify. Call handle_extended_wait.
10768 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10769 (send_sigstop): Delete sigstop_sent.
10770 (wait_for_sigstop): Avoid TID.
10771 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10772 (linux_test_for_tracefork): New.
10773 (linux_lookup_signals): Use thread_db_active and
10774 linux_supports_tracefork_flag.
10775 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10776 * linux-low.h (get_process_thread): Avoid TID.
10777 (struct process_ifo): Move thread_known and tid to the end. Remove
10778 sigstop_sent.
10779 (linux_attach_lwp, thread_db_init): Update prototypes.
10780 * server.h (change_inferior_id): Delete prototype.
10781 (add_pid_to_list, pull_pid_from_list): New prototypes.
10782 * thread-db.c (thread_db_use_events): New.
10783 (find_first_thread): Rename to...
10784 (find_one_thread): ...this. Update callers and messages. Do not
10785 call fatal. Check thread_db_use_events. Do not call
10786 change_inferior_id or new_thread_notify.
10787 (maybe_attach_thread): Update. Do not call new_thread_notify.
10788 (thread_db_init): Set thread_db_use_events. Check use_events.
10789 * utils.c (fatal, warning): Correct message prefix.
10790
10791 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10792
10793 * Makefile.in (clean): Remove new files.
10794 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10795 (powerpc-64.o, powerpc-64.c): New rules.
10796 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10797 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10798 with SPE.
10799 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10800 SPE targets.
10801 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10802 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10803 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10804 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10805 (target_regsets): Add AltiVec and SPE register sets.
10806 * configure.ac: Check for AltiVec and SPE.
10807 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10808 (ppc_fill_vrregset, ppc_store_vrregset): New.
10809 (target_regsets): Add AltiVec register set.
10810 * configure: Regenerated.
10811
10812 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * linux-low.c (O_LARGEFILE): Define.
10815 (linux_read_memory): Use /proc/PID/mem.
10816 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10817 * configure, config.in: Regenerated.
10818
10819 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * linux-low.c (linux_wait_for_event): Do not pass signals while
10822 single-stepping.
10823
10824 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10825
10826 * win32-low.c (create_process): New.
10827 (win32_create_inferior): Use create_process instead of
10828 CreateProcess. If create_process failed retry appending an ".exe"
10829 suffix. Store the GetLastError result immediatelly after
10830 create_process calls and use it on the call to error.
10831
10832 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10833
10834 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10835
10836 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10837
10838 * configure.ac: Switch license to GPLv3.
10839
10840 2007-08-01 Michael Snyder <msnyder@access-company.com>
10841
10842 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10843
10844 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10845
10846 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10847 typedef.
10848 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10849 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10850 CloseToolhelp32Snapshot.
10851 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10852 CloseToolhelp32Snapshot.
10853
10854 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10855
10856 * server.c (main): Check for inferior exit before main loop.
10857
10858 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10859
10860 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10861 instead of on tmp_desc.
10862
10863 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10864 Daniel Jacobowitz <dan@codesourcery.com>
10865
10866 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10867 (add_thread): Minor cleanups.
10868 (clear_inferiors): Move lower in the file. Clear the DLL
10869 list.
10870 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10871 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10872 (xml_escape_text): New.
10873 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10874 for qSupported.
10875 (handle_v_cont): Report errors.
10876 (gdbserver_version): Update.
10877 (main): Correct size of own_buf. Do not report initial DLL events.
10878 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10879 (unloaded_dll, xml_escape_text): New.
10880 * win32-low.c (enum target_waitkind): Update comments.
10881 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10882 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10883 (win32_EnumProcessModules, win32_GetModuleInformation)
10884 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10885 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10886 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10887 (win32_Module32First, win32_Module32Next, load_toolhelp)
10888 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10889 (get_child_debug_event): Handle DLL events.
10890 (win32_wait): Likewise.
10891
10892 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10893
10894 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10895 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10896
10897 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10898
10899 * win32-low.c (handle_output_debug_string): Ignore event if not
10900 waiting.
10901
10902 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10903
10904 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10905
10906 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10907
10908 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10909
10910 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10911
10912 * inferiors.c (change_inferior_id): Add comment.
10913 * linux-low.c (check_removed_breakpoint): Add an early
10914 prototype. Improve debug output.
10915 (linux_attach): Doc update.
10916 (linux_detach_one_process, linux_detach): Clean up before releasing
10917 each process.
10918 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10919 * linux-low.h (struct process_info): Doc improvement.
10920 * mem-break.c (delete_all_breakpoints): New.
10921 * mem-break.h (delete_all_breakpoints): New prototype.
10922 * thread-db.c (find_first_thread): New.
10923 (thread_db_create_event): Call it instead of
10924 thread_db_find_new_threads. Clean up unused variables.
10925 (maybe_attach_thread): Remove first thread handling.
10926 (thread_db_find_new_threads): Use find_first_thread.
10927 (thread_db_get_tls_address): Likewise.
10928
10929 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10930
10931 * thread-db.c (thread_db_find_new_threads): Add prototype.
10932 (thread_db_create_event): Check for the main thread before adding
10933 a new thread.
10934 (maybe_attach_thread): Only enable event reporting if TID == 0.
10935 (thread_db_get_tls_address): Check for new threads.
10936
10937 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10938
10939 * linux-low.c (linux_create_inferior): Try execv before execvp.
10940 * spu-low.c (spu_create_inferior): Likewise.
10941
10942 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10943
10944 * linux-low.c (linux_create_inferior): Change execv to execvp.
10945 * spu-low.c (spu_create_inferior): Likewies.
10946
10947 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * Makefile.in (clean): Clean new files instead of deleted ones.
10950 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10951 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10952 rules.
10953 * configure.srv: Specify XML files and new regformats for MIPS and
10954 MIPS64 GNU/Linux.
10955 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10956 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10957 an entry for the restart register.
10958 (mips_cannot_fetch_register, mips_cannot_store_register)
10959 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10960 register names to match the XML descriptions.
10961 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10962 restart register instead of $0.
10963
10964 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10965 Markus Deuling <deuling@de.ibm.com>
10966
10967 * remote-utils.c (decode_xfer_write): New function.
10968 * server.h (decode_xfer_write): Add prototype.
10969 * server.c (handle_query): Add PACKET_LEN argument. Support
10970 qXfer:spu:read and qXfer:spu:write packets.
10971 (main): Pass packet_len to handle_query.
10972 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10973 * target.h (target_ops): Add qxfer_spu.
10974
10975 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10976
10977 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10978 accessing non-seekable spufs files.
10979
10980 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10981
10982 * server.c (handle_query): Add reply for qC packet.
10983
10984 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10985 Leo Zayas <lerele@champenstudios@com>
10986
10987 * server.h (check_remote_input_interrupt_request): New function.
10988 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10989 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10990 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10991 (check_remote_input_interrupt_request): New function.
10992 * server.h (check_remote_input_interrupt_request): Declare.
10993 * win32-low.c (winapi_DebugBreakProcess,
10994 winapi_GenerateConsoleCtrlEvent): New typedefs.
10995 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10996 to 250 ms.
10997 (win32_wait): Check for remote interrupt request
10998 with check_remote_input_interrupt_request.
10999 (win32_request_interrupt): New function.
11000 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11001
11002 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11003
11004 * win32-low.c (debug_registers_changed,
11005 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11006 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11007 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11008 (thread_rec): Get context using the low target.
11009 (child_add_thread): Call thread_added on the low target,
11010 which does the same thing.
11011 (regptr): Delete.
11012 (do_initial_child_stuff): Remove debug registers references.
11013 Set context using the low target. Resume threads after
11014 setting the contexts.
11015 (child_continue): Remove dead variable. Remove debug
11016 registers references.
11017 (child_fetch_inferior_registers): Go through the low target.
11018 (do_child_store_inferior_registers): Remove.
11019 (child_store_inferior_registers): Go through the low target.
11020 (win32_resume): Remove debug registers references.
11021 Set context using the low target.
11022 (handle_exception): Change return type to void. Don't record
11023 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11024 first chance exception.
11025 (get_child_debug_event): Change return type to void. Remove
11026 goto loop. Always return after waiting for debug event.
11027 (win32_wait): Convert to switch statement. Handle spurious
11028 events.
11029
11030 * win32-i386-low.c (debug_registers_changed,
11031 debug_registers_used): New.
11032 (initial_stuff): Rename to ...
11033 (i386_initial_stuff): ... this. Clear debug registers
11034 state variables.
11035 (store_debug_registers): Delete.
11036 (i386_get_thread_context): New.
11037 (load_debug_registers): Delete.
11038 (i386_set_thread_context): New.
11039 (i386_thread_added): New.
11040 (single_step): Rename to ...
11041 (i386_single_step): ... this.
11042 (do_fetch_inferior_registers): Rename to ...
11043 (i386_fetch_inferior_register): ... this.
11044 (i386_store_inferior_register): New.
11045 (the_low_target): Adapt to new interface.
11046
11047 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11048 (arm_get_thread_context): New.
11049 (arm_set_thread_context): New.
11050 (regptr): New.
11051 (do_fetch_inferior_registers): Rename to ...
11052 (arm_fetch_inferior_register): ... this.
11053 (arm_store_inferior_register): New.
11054 (arm_wince_breakpoint): Reimplement as unsigned long.
11055 (arm_wince_breakpoint_len): Define.
11056 (the_low_target): Adapt to new interface.
11057
11058 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11059 load_debug_registers. Add get_thread_context, set_thread_context,
11060 thread_added and store_inferior_register. Rename
11061 fetch_inferior_registers to fetch_inferior_register.
11062 (regptr): Remove declaration.
11063
11064 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11065
11066 * linux-low.c (linux_detach): Change return type to int. Return 0.
11067 * spu-low.c (spu_detach): Likewise.
11068
11069 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11070
11071 * target.h (target_ops): Change return type of detach to int.
11072 Add join.
11073 (join_inferior): New.
11074 * server.c (main): Don't skip detach support on mingw32.
11075 If the inferior doesn't support detaching return error.
11076 Call join_inferior instead of using waitpid.
11077 * linux-low.c (linux_join): New.
11078 (linux_target_op): Add linux_join.
11079 * spu-low.c (spu_join): New.
11080 (spu_target_ops): Add spu_join.
11081 * win32-low.c (win32_detach): Adapt to new interface.
11082 Reopen current_process_handle before detaching. Issue a child
11083 resume before detaching.
11084 (win32_join): New.
11085 (win32_target_op): Add win32_join.
11086
11087 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11088
11089 * win32-low.c (win32-attach): Fix return value.
11090 * target.h (target_ops): Describe ATTACH return values.
11091
11092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11093
11094 * win32-low.c (GETPROCADDRESS): Define.
11095 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11096 (winapi_DebugSetProcessKillOnExit): Likewise.
11097 (win32_create_inferior): Force usage of ansi CreateProcessA.
11098 (win32_attach): Use GETPROCADDRESS.
11099 (win32_detach): Likewise.
11100
11101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11102
11103 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11104
11105 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11106
11107 * win32-low.c: Commit leftover changes from 2007-03-29.
11108
11109 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11110
11111 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11112 fields short instead of int. Add explicit padding.
11113 (i387_cache_to_fsave): Remove unnecessary casts.
11114 (i387_fsave_to_cache): Doc fix.
11115 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11116
11117 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11118
11119 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11120 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11121
11122 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11123
11124 * configure.srv (arm*-*-mingw32ce*): Move near the other
11125 arm targets.
11126
11127 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11128
11129 * configure.ac: Add errno checking.
11130 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11131 sys/file.h and malloc.h.
11132 (AC_CHECK_DECLS): Add perror.
11133 (srv_mingwce): Handle.
11134 * configure.srv (i[34567]86-*-cygwin*): Add
11135 win32-i386-low.o to srv_tgtobj.
11136 (i[34567]86-*-mingw*): Likewise.
11137 (arm*-*-mingw32ce*): Add case.
11138 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11139 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11140 [__MINGW32CE__] (strerror): New function.
11141 [__MINGW32CE__] (errno): Define to GetLastError.
11142 [__MINGW32CE__] (COUNTOF): New macro.
11143 (remote_open): Remove extra close call.
11144 * mem-break.c (delete_breakpoint_at): New function.
11145 * mem-break.h (delete_breakpoint_at): Declare.
11146 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11147 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11148 [USE_WIN32API] (read, write): Add char* casts.
11149 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11150 * server.h: Include wincecompat.h on Windows CE.
11151 [HAVE_ERRNO_H]: Check.
11152 (perror): Declare if not declared.
11153 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11154 (perror_with_name): Remove errno declaration.
11155 * wincecompat.h: New.
11156 * wincecompat.c: New.
11157 * win32-low.h: New.
11158 * win32-arm-low.c: New.
11159 * win32-i386-low.c: New.
11160 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11161 (OUTMSG2): Make it safe.
11162 (_T): New macro.
11163 (COUNTOF): New macro.
11164 (NUM_REGS): Get it from the low target.
11165 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11166 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11167 (thread_rec): Let low target handle debug registers.
11168 (child_add_thread): Likewise.
11169 (child_init_thread_list): Likewise.
11170 (continue_one_thread): Likewise.
11171 (regptr): New.
11172 (do_child_fetch_inferior_registers): Move to ...
11173 * win32-i386-low.c: ... here, and rename to ...
11174 (do_fetch_inferior_registers): ... this.
11175 * win32-low.c (child_fetch_inferior_registers):
11176 Go through the low target.
11177 (do_child_store_inferior_registers): Use regptr.
11178 (strwinerror): New function.
11179 (win32_create_inferior): Handle Windows CE.
11180 Use strwinerror instead of strerror on Windows error
11181 codes. Add program to the error output.
11182 Don't close the main thread handle on Windows CE.
11183 (win32_attach): Use coredll.dll on Windows CE.
11184 (win32_kill): Close current process and current
11185 thread handles.
11186 (win32_detach): Use coredll.dll on Windows CE.
11187 (win32_resume): Let low target handle debug registers, and
11188 step request.
11189 (handle_exception): Add/Remove initial breakpoint. Avoid
11190 non-existant WSTOPSIG on Windows CE.
11191 (win32_read_inferior_memory): Cast to remove warning.
11192 (win32_arch_string): Go through the low target.
11193 (initialize_low): Call set_breakpoint_data with the low
11194 target's breakpoint.
11195 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11196 FOP_REGNUM, mappings): Move to ...
11197 * win32-i386-low.c: ... here.
11198 * win32-low.c (win32_thread_info): Move to ...
11199 * win32-low.h: ... here.
11200 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11201 win32-arm-low.c and wincecompat.c.
11202 (all:): Add $EXEEXT.
11203 (install-only:): Likewise.
11204 (gdbserver:): Likewise.
11205 (gdbreplay:): Likewise.
11206 * config.in: Regenerate.
11207 * configure: Regenerate.
11208
11209 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11210
11211 * win32-low.c: Rename typedef thread_info to
11212 win32_thread_info throughout.
11213
11214 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11215
11216 * win32-i386-low.c: Rename to ...
11217 * win32-low.c: ... this.
11218 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11219 * Makefile.in: Likewise.
11220
11221 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11222
11223 * remote-utils.c (monitor_output): Constify msg parameter.
11224 * server.h (monitor_output): Likewise.
11225 * win32-i386-low.c (handle_output_debug_string): New.
11226 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11227 handle_output_debug_string.
11228 (get_child_debug_event): Likewise.
11229
11230 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11231
11232 * server.c (main): Correct strtoul check.
11233
11234 2007-03-27 Jon Ringle <jon@ringle.org>
11235
11236 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11237
11238 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11239
11240 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11241
11242 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11243
11244 * terminal.h: Check HAVE_SGTTY_H.
11245
11246 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11247
11248 * remote-utils.c (remote_open): Print out the assigned port number.
11249
11250 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11251
11252 * remote-utils.c (monitor_output): New function.
11253 * server.c (debug_threads): Define here.
11254 (monitor_show_help): New function.
11255 (handle_query): Handle qRcmd.
11256 (main): Do not handle 'd' packet.
11257 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11258 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11259 of debug_threads.
11260
11261 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11262
11263 * Makefile.in (EXEEXT): New.
11264 (clean): Use $(EXEEXT).
11265
11266 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * target.h (target_ops): Rename send_signal to request_interrupt,
11269 and remove enum target_signal parameter.
11270 * linux-low.c (linux_request_interrupt): Rename from
11271 linux_send_signal, and always send SIGINT.
11272 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11273 and always send SIGINT.
11274 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11275 of send_signal.
11276 (input_interrupt): Likewise.
11277
11278 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11279
11280 * server.c (get_features_xml): Check if target implemented
11281 arch_string.
11282 * win32-i386-low.c (win32_arch_string): New.
11283 (win32_target_ops): Add win32_arch_string as arch_string member.
11284
11285 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11286
11287 * spu-low.c (spu_arch_string): New.
11288 (spu_target_ops): Add spu_arch_string.
11289
11290 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11291
11292 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11293 * configure.ac: Do not check for terminal.h.
11294 * configure, config.in: Regenerated.
11295
11296 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11297
11298 * Makefile.in (OBS): Add $(XML_BUILTIN).
11299 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11300 (clean): Update.
11301 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11302 (arm-with-iwmmxt.c): New.
11303 * config.in, configure: Regenerate.
11304 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11305 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11306 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11307 (arm*-*-linux*): Add iWMMXt and regset support.
11308 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11309 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11310 (arm_store_wmmxregset, target_regsets): New.
11311 * server.c (get_features_xml): Take annex argument. Check builtin
11312 XML documents.
11313 (handle_query): Handle multiple annexes.
11314
11315 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * remote-utils.c [USE_WIN32API] (read, write): Define.
11318 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11319 write.
11320
11321 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * linux-i386-low.c (the_low_target): Set arch_string.
11324 * linux-x86-64-low.c (the_low_target): Likewise.
11325 * linux-low.c (linux_arch_string): New.
11326 (linux_target_ops): Add it.
11327 * linux-low.h (struct linux_target_ops): Add arch_string.
11328 * server.c (write_qxfer_response): Use const void * for DATA.
11329 (get_features_xml): New.
11330 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11331 * target.h (struct target_ops): Add arch_string method.
11332
11333 2007-01-03 Denis Pilat <denis.pilat@st.com>
11334 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * linux-low.c (linux_kill): Handle being called with no threads.
11337 * win32-i386-low.c (win32_kill): Likewise.
11338 (get_child_debug_event): Clear current_process_handle.
11339
11340 2006-12-30 Denis PILAT <denis.pilat@st.com>
11341 Daniel Jacobowitz <dan@codesourcery.com>
11342
11343 * remote-utils.c (remote_open): Check the type of specified
11344 serial port devices before opening them.
11345 * server.c (main): Kill the inferior if an error occurs during
11346 the first remote_open.
11347
11348 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11349
11350 * README: Update supported targets.
11351
11352 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11353
11354 * Makefile.in (clean): Remove reg-mips64.c.
11355 (reg-mips64.c, reg-mips64.o): New rules.
11356 * configure.srv: Handle mips64. Include regset support for mips.
11357 * linux-mips-low.c (union mips_register): New.
11358 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11359 (mips_breakpoint, mips_breakpoint_at): Use int.
11360 (mips_collect_register, mips_supply_register)
11361 (mips_collect_register_32bit, mips_supply_register_32bit)
11362 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11363 (mips_store_fpregset, target_regsets): New.
11364 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11365
11366 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11367
11368 * configure.srv: Add target "spu*-*-*".
11369 * Makefile.in (clean): Remove reg-spu.c.
11370 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11371 * spu-low.c: New file.
11372
11373 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11374
11375 * configure.ac: Correct td_thr_tls_get_addr test.
11376 * configure: Regenerated.
11377
11378 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11379
11380 * linux-low.c (linux_wait_for_event): Reformat. Use the
11381 pass_signals array.
11382 * remote-utils.c (decode_address_to_semicolon): New.
11383 * server.c (pass_signals, handle_general_set): New.
11384 (handle_query): Mention QPassSignals for qSupported.
11385 (main): Call handle_general_set.
11386 * server.h (pass_signals, decode_address_to_semicolon): New.
11387
11388 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11389
11390 * server.c (handle_query): Correct error handling for read_auxv.
11391
11392 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11393
11394 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11395 and srv_linux_thread_db to yes.
11396 * linux-s390-low.c (s390_fill_gregset): New function.
11397 (target_regsets): Define data structure.
11398
11399 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11400
11401 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11402 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11403 * config.in, configure: Regenerated.
11404 * inferiors.c (gdb_id_to_thread): New function.
11405 (gdb_id_to_thread_id): Use it.
11406 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11407 * linux-low.h (struct process_info): Add th member.
11408 (thread_db_get_tls_address): New prototype.
11409 * remote-utils.c (decode_address): Make non-static.
11410 * server.c (handle_query): Handle qGetTLSAddr.
11411 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11412 * target.h (struct target_ops): Add get_tls_address.
11413 * thread-db.c (maybe_attach_thread): Save the thread handle.
11414 (thread_db_get_tls_address): New.
11415
11416 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11419 (linux_resume_one_process): Take a siginfo_t *. Update all
11420 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11421 (struct pending_signals): Add a siginfo_t.
11422 (linux_wait_for_process): Always set last_status.
11423 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11424 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11425 * linux-low.h (struct process_info): Add last_status.
11426
11427 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11428
11429 * remote-utils.c (try_rle): New function.
11430 (putpkt_binary): Use it.
11431
11432 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11433
11434 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11435 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11436 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11437 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11438 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11439 point registers.
11440
11441 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11442
11443 * server.c (terminal_fd): New variable.
11444 (old_foreground_pgrp): Likewise.
11445 (restore_old_foreground_pgrp): New function.
11446 (start_inferior): Record the terminal file descriptor in terminal_fd
11447 and its original foreground group in old_foreground_pgrp. Register
11448 restore_old_foreground_pgrp with atexit().
11449
11450 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * server.c (handle_query): Correct qPart to qXfer.
11453
11454 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11455
11456 * configure.ac: Check for more headers which are missing on
11457 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11458 * configure.srv: Add Cygwin and mingw32.
11459 * remote-utils.c: Don't include headers unconditionally which
11460 are missing on mingw32. Include <winsock.h> for mingw32.
11461 (remote_open): Adjust for mingw32 support. Flush
11462 standard error after writing to it.
11463 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11464 (unblock_async_io, enable_async_io, disable_async_io)
11465 (readchar, getpkt): Update for Winsock support.
11466 (prepare_resume_reply): Expect a protocol signal number.
11467 * server.c: Disable <sys/wait.h> on mingw32.
11468 (start_inferior): Adjust for mingw32 support. Flush
11469 standard error after writing to it.
11470 (attach_inferior): Likewise. Use protocol signal
11471 numbers.
11472 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11473 and names.
11474 * win32-i386-low.c: New file.
11475 * Makefile.in (XM_CLIBS): Set.
11476 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11477 (win32-i386-low.o): New dependency rule.
11478 * linux-low.c (linux_wait): Use target signal numbers.
11479 * target.h (struct target_ops): Doc fix.
11480 * server.h (target_signal_to_name): New prototype.
11481 * gdbreplay.c: Don't include headers unconditionally which
11482 are missing on mingw32. Include <winsock.h> for mingw32.
11483 (remote_close, remote_open): Adjust for Winsock support.
11484 * configure, config.in: Regenerated.
11485
11486 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11487
11488 * server.c (decode_xfer_read, write_qxfer_response): New.
11489 (handle_query): Take a packet length argument. Handle
11490 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11491 the qSupported response.
11492 (main): Update call to handle_query.
11493
11494 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11495
11496 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11497 (putpkt_binary): Renamed from putpkt and adjusted for binary
11498 data.
11499 (putpkt): New wrapper for putpkt_binary.
11500 (readchar): Don't mask off the high bit.
11501 (decode_X_packet): New function.
11502 * server.c (main): Call putpkt_binary if a handler sets the packet
11503 length. Save the length of the incoming packet. Handle 'X'.
11504 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11505
11506 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11507
11508 * server.c (handle_query): Handle qSupported.
11509
11510 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11511
11512 * remote-utils.c (all_symbols_looked_up): New variable.
11513 (look_up_one_symbol): Check it.
11514 * server.h (look_up_one_symbol): New declaration.
11515 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11516
11517 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11518
11519 * Makefile.in (linux-arm-low.o): Update dependencies.
11520 * linux-arm-low.c: Include "gdb_proc_service.h".
11521 (PTRACE_GET_THREAD_AREA): Define.
11522 (ps_get_thread_area): New function.
11523
11524 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11525
11526 * configure.srv (m68k*-*-uclinux*): New target.
11527 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11528 (linux_resume_one_process): Remove extraneous cast.
11529 (linux_read_offsets): New.
11530 (linux_target_op): Add linux_read_offsets on mmuless systems.
11531 * server.c (handle_query): Add qOffsets logic.
11532 * target.h (struct target_ops): Add read_offsets.
11533
11534 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11537 (PTRACE_GET_THREAD_AREA): Define.
11538 (ps_get_thread_area): New function.
11539 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11540 (linux-x86-64-low.o): Update.
11541
11542 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * configure.ac: Remove checks for prfpregset_t.
11545 * gdb_proc_service.h: New file.
11546 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11547 new "gdb_proc_service.h".
11548 * proc-service.c: Likewise.
11549 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11550 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11551 * Makefile.in (gdb_proc_service_h): Updated.
11552 * configure, config.in: Regenerated.
11553
11554 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11555
11556 * remote-utils.c (prepare_resume_reply): Move declaration
11557 of gdb_id_from_wait to the top of the block.
11558
11559 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11560
11561 * linux-low.c (regsets_store_inferior_registers): Read the regset
11562 from the target before filling it.
11563
11564 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11565
11566 * server.c (attach_inferior): Return SIGTRAP for a successful
11567 attach.
11568
11569 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11570
11571 * Makefile.in (OBS): Add version.o.
11572 (STAGESTUFF): Delete.
11573 (version.o): Add dependencies.
11574 (version.c): Replace rule.
11575 (clean): Remove version.c.
11576 * server.c (gdbserver_version): New.
11577 (gdbserver_usage): Use printf.
11578 (main): Handle --version and --help.
11579 * server.h (version, host_name): Add declarations.
11580
11581 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11582
11583 * linux-arm-low.c:
11584 * linux-arm-low.c:
11585 * inferiors.c:
11586 * i387-fp.h:
11587 * i387-fp.c:
11588 * gdbreplay.c:
11589 * regcache.c:
11590 * proc-service.c:
11591 * mem-break.h:
11592 * mem-break.c:
11593 * linux-x86-64-low.c:
11594 * linux-sh-low.c:
11595 * linux-s390-low.c:
11596 * linux-ppc64-low.c:
11597 * linux-ppc-low.c:
11598 * linux-mips-low.c:
11599 * linux-m68k-low.c:
11600 * linux-m32r-low.c:
11601 * linux-low.h:
11602 * linux-low.c:
11603 * linux-ia64-low.c:
11604 * linux-i386-low.c:
11605 * linux-crisv32-low.c:
11606 * thread-db.c:
11607 * terminal.h:
11608 * target.h:
11609 * target.c:
11610 * server.h:
11611 * server.c:
11612 * remote-utils.c:
11613 * regcache.h:
11614 * utils.c:
11615 * Makefile.in:
11616 * configure.ac:
11617 * gdbserver.1: Add (C) after Copyright. Update the FSF
11618 address.
11619
11620 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11623 (arm_breakpoint_at): Recognize both breakpoints.
11624 (the_low_target): Use the correct breakpoint instruction.
11625
11626 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11629 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11630 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11631 (the_low_target): Update.
11632
11633 2005-10-25 Andreas Schwab <schwab@suse.de>
11634
11635 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11636
11637 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11638 (ia64_num_regs): Reduce to 462.
11639
11640 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11641
11642 * acinclude.m4: Correct quoting.
11643 * aclocal.m4: Regenerated.
11644
11645 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11646 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11647 (thread_db_init): Call thread_db_err_str.
11648 * configure.ac: Check for TD_VERSION.
11649 * config.in, configure: Regenerated.
11650
11651 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11652
11653 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11654
11655 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11656
11657 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11658 is not available. Define HAVE_PTRACE_GETREGS if it is.
11659 * config.in, configure: Regenerated.
11660 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11661 * linux-i386-low.c, linux-m68k-low.c: Update to use
11662 HAVE_PTRACE_GETREGS.
11663 * linux-low.c (regsets_fetch_inferior_registers)
11664 (regsets_store_inferior_registers): Only return 0 if we processed
11665 GENERAL_REGS.
11666 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11667 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11668
11669 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11670
11671 * inferiors.c (struct thread_info): Add gdb_id.
11672 (add_thread): Add gdb_id argument.
11673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11674 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11675 calls to add_thread.
11676 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11677 * server.c (handle_query): Use thread_to_gdb_id.
11678 (handle_v_cont, main): Use gdb_id_to_thread_id.
11679 * server.h (add_thread): Update prototype.
11680 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11681 prototypes.
11682
11683 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11684
11685 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11686 left-padded registers.
11687 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11688 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11689
11690 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11691
11692 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11693 * configure: Regenerate.
11694 * config.in: Regenerate.
11695 * server.h (NEED_DECLARATION_STRERROR):
11696 Replace with !HAVE_DECL_STRERROR.
11697
11698 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11699
11700 * linux-low.c (linux_wait, linux_send_signal): Don't test
11701 an unsigned long variable for > 0 if it could be MAX_ULONG.
11702 * server.c (myresume): Likewise.
11703 * target.c (set_desired_inferior): Likewise.
11704
11705 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11706
11707 * configure.ac: Simplify and improve check for socklen_t.
11708 * configure, config.in: Regenerate.
11709
11710 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11711
11712 * acconfig.h: Remove.
11713 * configure.ac: Add a test for socklen_t. Use three-argument
11714 AC_DEFINE throughout.
11715 * config.in: Regenerated using autoheader 2.59.
11716 * configure: Regenerated.
11717
11718 * gdbreplay.c (socklen_t): Provide a default.
11719 (remote_open): Use socklen_t.
11720 * remote-utils.c (socklen_t): Provide a default.
11721 (remote_open): Use socklen_t.
11722 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11723 unsigned char.
11724
11725 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11726 char for buffers.
11727 * linux-low.c (linux_read_memory, linux_write_memory)
11728 (linux_read_auxv): Likewise.
11729 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11730 (check_mem_write): Likewise.
11731 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11732 Likewise.
11733 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11734 (registers_from_string, register_data): Likewise.
11735 * server.c (handle_query, main): Likewise.
11736 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11737 (decode_M_packet): Likewise.
11738 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11739 * target.h (struct target_ops): Update read_memory, write_memory,
11740 and read_auxv.
11741 (read_inferior_memory, write_inferior_memory): Update.
11742 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11743 to unsigned char *.
11744 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11745 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11746 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11747 linux-s390-low.c, linux-sh-low.c: Update for changes in
11748 read_inferior_memory and the_low_target->breakpoint.
11749
11750 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11751
11752 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11753 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11754 * configure.srv: Add powerpc64-*-linux*.
11755 * linux-ppc64-low.c: New file.
11756
11757 2005-05-23 Orjan Friberg <orjanf@axis.com>
11758
11759 * linux-cris-low.c: New file with support for CRIS.
11760 * linux-crisv32-low.c: Ditto for CRISv32.
11761 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11762 (clean): Add reg-cris.c and reg-crisv32.c.
11763 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11764 reg-crisv32.o, and reg-crisv32.c to make rules.
11765 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11766 recognized targets.
11767
11768 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11769
11770 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11771 of sizeof (PTRACE_XFER_TYPE).
11772 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11773
11774 2005-05-12 Orjan Friberg <orjanf@axis.com>
11775
11776 * target.h (struct target_ops): Add insert_watchpoint,
11777 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11778 pointers for hardware watchpoint support.
11779 * linux-low.h (struct linux_target_ops): Ditto.
11780 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11781 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11782 to linux_target_ops.
11783 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11784 reply packet.
11785 * server.c (main): Recognize 'Z' and 'z' packets.
11786
11787 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11788
11789 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11790 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11791 (the_low_target): Add new members.
11792
11793 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11794
11795 * proc-service.c (ps_lgetregs): Search all_processes instead of
11796 all_threads.
11797
11798 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11799
11800 * server.c (start_inferior): Change return type to int.
11801 (attach_inferior): Change sigptr to int *.
11802 (handle_v_cont, handle_v_requests): Change signal to int *.
11803 (main): Change signal to int.
11804
11805 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11806
11807 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11808 * configure.srv: Add m32r*-*-linux*.
11809 * linux-m32r-low.c: New file.
11810
11811 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11812
11813 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11814
11815 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11818 Take unsigned long arguments for PIDs.
11819 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11820 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11821 (wait_for_sigstop, linux_resume_one_process)
11822 (regsets_fetch_inferior_registers, linux_send_signal)
11823 (linux_read_auxv): Likewise. Update the types of variables holding
11824 PIDs. Update format string specifiers.
11825 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11826 * remote-utils.c (prepare_resume_reply): Likewise.
11827 * server.c (cont_thread, general_thread, step_thread)
11828 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11829 unsigned long.
11830 (handle_query): Update format specifiers.
11831 (handle_v_cont, main): Use strtoul for thread IDs.
11832 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11833 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11834 (general_thread, step_thread, thread_from_wait)
11835 (old_thread_from_wait): Update.
11836 * target.h (struct thread_resume): Use unsigned long for THREAD.
11837 (struct target_ops): Use unsigned long for arguments to attach and
11838 thread_alive.
11839
11840 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * acinclude.m4: Include bfd/bfd.m4 directly.
11843 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11844 <agriffis@toolchain.org>.
11845 * aclocal.m4, configure: Regenerated.
11846
11847 2005-01-07 Andrew Cagney <cagney@gnu.org>
11848
11849 * configure.ac: Rename configure.in, require autoconf 2.59.
11850 * configure: Re-generate.
11851
11852 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11853
11854 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11855 LIBS when finished.
11856 * aclocal.m4: Regenerated.
11857 * configure: Regenerated.
11858
11859 2004-11-21 Andreas Schwab <schwab@suse.de>
11860
11861 * linux-m68k-low.c (m68k_num_gregs): Define.
11862 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11863 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11864 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11865 (m68k_breakpoint_at): New. Add to the_low_target.
11866
11867 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11868 srv_linux_thread_db to yes.
11869
11870 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11871
11872 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11873 (ARCH_SET_FS): Likewise.
11874 (ARCH_GET_FS): Likewise.
11875 (ARCH_GET_GS): Likewise.
11876
11877 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11878
11879 * linux-i386-low.c (ps_get_thread_area): New.
11880 * linux-x86-64-low.c (ps_get_thread_area): New.
11881 * linux-low.c: Include <sys/syscall.h>.
11882 (linux_kill_one_process): Don't kill the first thread here.
11883 (linux_kill): Kill the first thread here.
11884 (kill_lwp): New function.
11885 (send_sigstop, linux_send_signal): Use it.
11886 * proc-service.c: Clean up #ifdefs.
11887 (fpregset_info): Delete.
11888 (ps_lgetregs): Update and enable implementation.
11889 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11890 implementations.
11891 * remote-utils.c (struct sym_cache, symbol_cache): New.
11892 (input_interrupt): Print a clearer message.
11893 (async_io_enabled): New variable.
11894 (enable_async_io, disable_async_io): Use it. Update comments.
11895 (look_up_one_symbol): Use the symbol cache.
11896 * thread-db.c (thread_db_look_up_symbols): New function.
11897 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11898
11899 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11900
11901 * configure.in: Test for -rdynamic.
11902 * configure: Regenerated.
11903 * Makefile (INTERNAL_LDFLAGS): New.
11904 (gdbserver, gdbreplay): Use it.
11905
11906 2004-09-02 Andrew Cagney <cagney@gnu.org>
11907
11908 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11909
11910 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11911
11912 * linux-low.c (linux_wait): Clear all_processes list also.
11913
11914 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11915
11916 * linux-low.c: Include <errno.h>. Remove extern declaration of
11917 errno.
11918
11919 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11920
11921 * gdbreplay.c, server.h, utils.c: Update copyright years.
11922
11923 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11924
11925 * server.c (main): Print child status or termination signal from
11926 variable 'signal', not 'sig'.
11927
11928 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11929
11930 * linux-low.c (linux_read_memory): Change return type to
11931 int. Check for and return error from ptrace().
11932 * target.c (read_inferior_memory): Change return type to int. Pass
11933 back return status from the_target->read_memory().
11934 * target.h (struct target_ops): Adapt *read_memory() prototype.
11935 Update comment.
11936 (read_inferior_memory): Adapt prototype.
11937 * server.c (main): Return an error packet if
11938 read_inferior_memory() returns an error.
11939
11940 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11941
11942 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11943 Unify with other clean targets.
11944
11945 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11946
11947 * server.c (handle_v_cont): Call set_desired_inferior.
11948
11949 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11950
11951 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11952
11953 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11954
11955 * linux-low.c (linux_wait): Unblock async I/O.
11956 (linux_resume): Block and enable async I/O.
11957 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11958 * server.h (block_async_io, unblock_async_io): Add prototypes.
11959
11960 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11961
11962 * remote-utils.c (remote_open): Print a status notice after
11963 opening a TCP port.
11964 * server.c (attach_inferior): Print a status notice after
11965 attaching.
11966
11967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11968
11969 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11970
11971 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11972
11973 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11974 error packet.
11975 * server.c, target.h: Update copyright years.
11976
11977 2004-02-25 Roland McGrath <roland@redhat.com>
11978
11979 * target.h (struct target_ops): New member `read_auxv'.
11980 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11981 * linux-low.c (linux_read_auxv): New function.
11982 (linux_target_ops): Initialize `read_auxv' member to that.
11983
11984 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11985
11986 Committed by Jim Blandy <jimb@redhat.com>.
11987
11988 * linux-s390-low.c (s390_num_regs): Update.
11989 (s390_regmap): Remove control registers. Use __s390x__ predefine
11990 instead of GPR_SIZE to distiguish s390 and s390x targets.
11991
11992 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11993
11994 * linux-low.c: Update copyright year.
11995 (check_removed_breakpoint): Clear pending_is_breakpoint.
11996 (linux_set_resume_request, linux_queue_one_thread)
11997 (resume_status_pending_p): New functions.
11998 (linux_continue_one_thread): Use process->resume.
11999 (linux_resume): Only resume threads if there are no pending events.
12000 * linux-low.h (struct process_info): Add resume request
12001 pointer.
12002
12003 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12004
12005 * regcache.c (new_register_cache): Clear the allocated register
12006 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12007
12008 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12009
12010 * linux-low.c (linux_resume): Take a struct thread_resume *
12011 argument.
12012 (linux_wait): Update call.
12013 (resume_ptr): New static variable.
12014 (linux_continue_one_thread): Renamed from
12015 linux_continue_one_process. Use resume_ptr.
12016 (linux_resume): Use linux_continue_one_thread.
12017 * server.c (handle_v_cont, handle_v_requests): New functions.
12018 (myresume): New function.
12019 (main): Handle 'v' case.
12020 * target.h (struct thread_resume): New type.
12021 (struct target_ops): Change argument of "resume" to struct
12022 thread_resume *.
12023 (myresume): Delete macro.
12024
12025 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12026
12027 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12028 (uninstall): Support DESTDIR.
12029
12030 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12031
12032 * configure.srv: Add xscale*linux copy of arm*linux entry.
12033
12034 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12035
12036 * linux-arm-low.c (arm_reinsert_addr): New function.
12037 (the_low_target): Add arm_reinsert_addr.
12038
12039 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12040
12041 * mem-break.c: Remove whitespace at end of file.
12042
12043 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12044
12045 * configure.in: Check whether we need to prototype strerror.
12046 * server.h: Optionally prototype strerror.
12047 * gdbreplay.c (perror_with_name): Use strerror.
12048 * linux-low.c (linux_attach_lwp): Use strerror.
12049 * utils.c (perror_with_name): Use strerror.
12050 * config.in, configure: Regenerated.
12051
12052 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12053
12054 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12055 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12056
12057 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12058
12059 * Makefile.in (SFILES): Update.
12060 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12061 low-sun3.c: Remove files.
12062
12063 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12064
12065 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12066 (linux_detach_one_process, linux_detach): New functions.
12067 (linux_target_ops): Add linux_detach.
12068 * server.c (main): Handle 'D' packet.
12069 * target.h (struct target_ops): Add "detach" member.
12070 (detach_inferior): Define.
12071
12072 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12073
12074 From Kelley Cook <kelleycook@wideopenwest.com>:
12075 * configure.srv: Accept i[34567]86 variants.
12076
12077 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12078
12079 * linux-low.c (linux_wait_for_event): Correct comment typos.
12080 (linux_resume_one_process): Call check_removed_breakpoint.
12081 (linux_send_signal): New function.
12082 (linux_target_ops): Add linux_send_signal.
12083 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12084 of kill.
12085 * target.h (struct target_ops): Add send_signal.
12086
12087 2003-05-29 Jim Blandy <jimb@redhat.com>
12088
12089 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12090 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12091 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12092 away part of the register's value.
12093
12094 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12095
12096 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12097 (linux_wait_for_event, linux_init_signals): Likewise.
12098
12099 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12100
12101 * configure.in: Check for stdlib.h.
12102 * configure: Regenerated.
12103 * config.in: Regenerated.
12104
12105 2003-01-04 Andreas Schwab <schwab@suse.de>
12106
12107 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12108
12109 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12110
12111 * Makefile.in: Remove obsolete code.
12112
12113 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12114
12115 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12116 defined(PT_FPR0_HI).
12117
12118 2002-11-17 Stuart Hughes <seh@zee2.com>
12119
12120 * linux-arm-low.c (arm_num_regs): Increase.
12121 (arm_regmap): Include status register.
12122
12123 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12124
12125 * linux-low.c (register_addr): Remove incorrect -1 check.
12126
12127 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12128
12129 * linux-low.c (linux_create_inferior): Call setpgid. Return
12130 the new PID.
12131 (unstopped_p, linux_signal_pid): Remove.
12132 (linux_target_ops): Remove linux_signal_pid.
12133 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12134 global instead of target method.
12135 * target.h (struct target_ops): Remove signal_pid. Update comment
12136 for create_inferior.
12137 * server.c (signal_pid): New variable.
12138 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12139 gdbserver. Set the child to be the foreground process group.
12140 (attach_inferior): Set signal_pid.
12141
12142 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12143
12144 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12145
12146 2002-08-20 Jim Blandy <jimb@redhat.com>
12147
12148 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12149 default for this.
12150
12151 2002-08-01 Andrew Cagney <cagney@redhat.com>
12152
12153 * Makefile.in: Make chill references obsolete.
12154
12155 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12156
12157 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12158 * configure: Regenerate.
12159 * config.in: Regenerate.
12160
12161 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12162
12163 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12164 (perror_with_name, remote_close, remote_open, expect, play): Static.
12165
12166 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12167
12168 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12169 byte offsets instead of an array of indexes.
12170 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12171
12172 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12173
12174 * regcache.c: Add comment.
12175
12176 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12177
12178 * thread-db.c: New file.
12179 * proc-service.c: New file.
12180 * acinclude.m4: New file.
12181 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12182 proc-service.o, and thread-db.o.
12183 (linux-low.o): Add USE_THREAD_DB.
12184 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12185 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12186 * aclocal.m4: Regenerated.
12187 * config.in: Regenerated.
12188 * configure: Regenerated.
12189 * configure.in: Check for proc_service.h, sys/procfs.h,
12190 thread_db.h, and linux/elf.h headrs.
12191 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12192 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12193 Check for -lthread_db and thread support.
12194 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12195 PowerPC, and SuperH.
12196 * i387-fp.c: Constify arguments.
12197 * i387-fp.h: Likewise.
12198 * inferiors.c: (struct thread_info): Renamed from
12199 `struct inferior_info'. Remove PID member. Use generic inferior
12200 list header. All uses updated.
12201 (inferiors, signal_pid): Removed.
12202 (all_threads): New variable.
12203 (get_thread): Define.
12204 (add_inferior_to_list): New function.
12205 (for_each_inferior): New function.
12206 (change_inferior_id): New function.
12207 (add_inferior): Removed.
12208 (remove_inferior): New function.
12209 (add_thread): New function.
12210 (free_one_thread): New function.
12211 (remove_thread): New function.
12212 (clear_inferiors): Use for_each_inferior and free_one_thread.
12213 (find_inferior): New function.
12214 (find_inferior_id): New function.
12215 (inferior_target_data): Update argument type.
12216 (set_inferior_target_data): Likewise.
12217 (inferior_regcache_data): Likewise.
12218 (set_inferior_regcache_data): Likewise.
12219 * linux-low.c (linux_bp_reinsert): Remove.
12220 (all_processes, stopping_threads, using_thrads)
12221 (struct pending_signals, debug_threads, pid_of): New.
12222 (inferior_pid): Replace with macro.
12223 (struct inferior_linux_data): Remove.
12224 (get_stop_pc, add_process): New functions.
12225 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12226 Use add_process and add_thread.
12227 (linux_attach_lwp): New function, based on old linux_attach. Use
12228 add_process and add_thread. Set stop_expected for new threads.
12229 (linux_attach): New function.
12230 (linux_kill_one_process): New function.
12231 (linux_kill): Kill all LWPs.
12232 (linux_thread_alive): Use find_inferior_id.
12233 (check_removed_breakpoints, status_pending_p): New functions.
12234 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12235 Update. Use WNOHANG. Wait for cloned processes also. Update process
12236 struct for the found process.
12237 (linux_wait_for_event): New function.
12238 (linux_wait): Use it. Support LWPs.
12239 (send_sigstop, wait_for_sigstop, stop_all_processes)
12240 (linux_resume_one_process, linux_continue_one_process): New functions.
12241 (linux_resume): Support LWPs.
12242 (REGISTER_RAW_SIZE): Remove.
12243 (fetch_register): Use register_size instead. Call supply_register.
12244 (usr_store_inferior_registers): Likewise. Call collect_register.
12245 Fix recursive case.
12246 (regsets_fetch_inferior_registers): Improve error message.
12247 (regsets_store_inferior_registers): Add debugging.
12248 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12249 (unstopped_p, linux_signal_pid): New functions.
12250 (linux_target_ops): Add linux_signal_pid.
12251 (linux_init_signals): New function.
12252 (initialize_low): Call it. Initialize using_threads.
12253 * regcache.c (inferior_regcache_data): Add valid
12254 flag.
12255 (get_regcache): Fetch registers lazily. Add fetch argument
12256 and update all callers.
12257 (regcache_invalidate_one, regcache_invalidate): New
12258 functions.
12259 (new_register_cache): Renamed from create_register_cache.
12260 Return the new regcache.
12261 (free_register_cache): Change argument to a void *.
12262 (registers_to_string, registers_from_string): Call get_regcache
12263 with fetch flag set.
12264 (register_data): Make static. Pass fetch flag to get_regcache.
12265 (supply_register): Call get_regcache with fetch flag clear.
12266 (collect_register): Call get_regcache with fetch flag set.
12267 (collect_register_as_string): New function.
12268 * regcache.h: Update.
12269 * remote-utils.c (putpkt): Flush after debug output and use
12270 stderr.
12271 Handle input interrupts while waiting for an ACK.
12272 (input_interrupt): Use signal_pid method.
12273 (getpkt): Flush after debug output and use stderr.
12274 (outreg): Use collect_register_as_string.
12275 (new_thread_notify, dead_thread_notify): New functions.
12276 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12277 and general_thread.
12278 (look_up_one_symbol): Flush after debug output.
12279 * server.c (step_thread, server_waiting): New variables.
12280 (start_inferior): Don't use signal_pid. Update call to mywait.
12281 (attach_inferior): Update call to mywait.
12282 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12283 (main): Don't fetch/store registers explicitly. Use
12284 set_desired_inferior. Support proposed ``Hs'' packet. Update
12285 calls to mywait.
12286 * server.h: Update.
12287 (struct inferior_list, struct_inferior_list_entry): New.
12288 * target.c (set_desired_inferior): New.
12289 (write_inferior_memory): Constify.
12290 (mywait): New function.
12291 * target.h: Update.
12292 (struct target_ops): New signal_pid method.
12293 (mywait): Removed macro, added prototype.
12294
12295 * linux-low.h (regset_func): Removed.
12296 (regset_fill_func, regset_store_func): New.
12297 (enum regset_type): New.
12298 (struct regset_info): Add type field. Use new operation types.
12299 (struct linux_target_ops): stop_pc renamed to get_pc.
12300 Add decr_pc_after_break and breakpoint_at.
12301 (get_process, get_thread_proess, get_process_thread)
12302 (strut process_info, all_processes, linux_attach_lwp)
12303 (thread_db_init): New.
12304
12305 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12306 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12307 (the_low_target): Add new members.
12308 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12309 (i386_store_fpxregset): Constify.
12310 (target_regsets): Add new kind identifier.
12311 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12312 (i386_set_pc): Add debugging.
12313 (i386_breakpoint_at): New function.
12314 (the_low_target): Add new members.
12315 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12316 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12317 (mips_breakpoint_at): New.
12318 (the_low_target): Add new members.
12319 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12320 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12321 (the_low_target): Add new members.
12322 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12323 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12324 (the_low_target): Add new members.
12325 * linux-x86-64-low.c (target_regsets): Add new kind
12326 identifier.
12327
12328 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12329
12330 From Martin Pool <mbp@samba.org>:
12331 * server.c (gdbserver_usage): New function.
12332 (main): Call it.
12333
12334 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12335
12336 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12337 stop_at -> stop_pc.
12338
12339 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12340
12341 * Makefile.in: Remove obsolete code.
12342
12343 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12344
12345 * linux-low.c (regsets_fetch_inferior_registers),
12346 (regsets_store_inferior_registers): Removed cast to int from
12347 ptrace() calls.
12348 * regcache.h: Added declaration of struct inferior_info.
12349
12350 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12351
12352 * inferiors.c (struct inferior_info): Add regcache_data.
12353 (add_inferior): Call create_register_cache.
12354 (clear_inferiors): Call free_register_cache.
12355 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12356 * regcache.c (struct inferior_regcache_data): New.
12357 (registers): Remove.
12358 (get_regcache): New function.
12359 (create_register_cache, free_register_cache): New functions.
12360 (set_register_cache): Don't initialize the register cache here.
12361 (registers_to_string, registers_from_string, register_data): Call
12362 get_regcache.
12363 * regcache.h: Add prototypes.
12364 * server.h: Likewise.
12365
12366 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12367
12368 * mem-break.c: New file.
12369 * mem-break.h: New file.
12370 * Makefile.in: Add mem-break.o rule; update server.h
12371 dependencies.
12372 * inferiors.c (struct inferior_info): Add target_data
12373 member.
12374 (clear_inferiors): Free target_data member if set.
12375 (inferior_target_data, set_inferior_target_data): New functions.
12376 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12377 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12378 * linux-low.c (linux_bp_reinsert): New variable.
12379 (struct inferior_linux_data): New.
12380 (linux_create_inferior): Use set_inferior_target_data.
12381 (linux_attach): Likewise. Call add_inferior.
12382 (linux_wait_for_one_inferior): New function.
12383 (linux_wait): Call it.
12384 (linux_write_memory): Add const.
12385 (initialize_low): Call set_breakpoint_data.
12386 * linux-low.h (struct linux_target_ops): Add breakpoint
12387 handling members.
12388 * server.c (attach_inferior): Remove extra add_inferior
12389 call.
12390 * server.h: Include mem-break.h. Update inferior.c
12391 prototypes.
12392 * target.c (read_inferior_memory)
12393 (write_inferior_memory): New functions.
12394 * target.h (read_inferior_memory)
12395 (write_inferior_memory): Change macros to prototypes.
12396 (struct target_ops): Update comments. Add const to write_memory
12397 definition.
12398
12399 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12400
12401 * linux-low.c (usr_store_inferior_registers): Support
12402 registers which are allowed to fail to store.
12403 * linux-low.h (linux_target_ops): Likewise.
12404 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12405 (ppc_cannot_store_register): FPSCR may not be storable.
12406
12407 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12408
12409 * server.h: Include <string.h> if HAVE_STRING_H.
12410 * ChangeLog: Correct paths in last ChangeLog entry.
12411
12412 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12413
12414 * linux-low.h: Remove obsolete prototypes.
12415 (struct linux_target_ops): New.
12416 (extern the_low_target): New.
12417 * linux-low.c (num_regs, regmap): Remove declarations.
12418 (register_addr): Use the_low_target explicitly.
12419 (fetch_register): Likewise.
12420 (usr_fetch_inferior_registers): Likewise.
12421 (usr_store_inferior_registers): Likewise.
12422 * linux-arm-low.c (num_regs): Remove.
12423 (arm_num_regs): Define.
12424 (arm_regmap): Renamed from regmap, made static.
12425 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12426 made static.
12427 (arm_cannot_store_register): Renamed from cannot_store_register,
12428 made static.
12429 (the_low_target): New.
12430 * linux-i386-low.c (num_regs): Remove.
12431 (i386_num_regs): Define.
12432 (i386_regmap): Renamed from regmap, made static.
12433 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12434 made static.
12435 (i386_cannot_store_register): Renamed from cannot_store_register,
12436 made static.
12437 (the_low_target): New.
12438 * linux-ia64-low.c (num_regs): Remove.
12439 (ia64_num_regs): Define.
12440 (ia64_regmap): Renamed from regmap, made static.
12441 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12442 made static.
12443 (ia64_cannot_store_register): Renamed from cannot_store_register,
12444 made static.
12445 (the_low_target): New.
12446 * linux-m68k-low.c (num_regs): Remove.
12447 (m68k_num_regs): Define.
12448 (m68k_regmap): Renamed from regmap, made static.
12449 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12450 made static.
12451 (m68k_cannot_store_register): Renamed from cannot_store_register,
12452 made static.
12453 (the_low_target): New.
12454 * linux-mips-low.c (num_regs): Remove.
12455 (mips_num_regs): Define.
12456 (mips_regmap): Renamed from regmap, made static.
12457 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12458 made static.
12459 (mips_cannot_store_register): Renamed from cannot_store_register,
12460 made static.
12461 (the_low_target): New.
12462 * linux-ppc-low.c (num_regs): Remove.
12463 (ppc_num_regs): Define.
12464 (ppc_regmap): Renamed from regmap, made static.
12465 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12466 made static.
12467 (ppc_cannot_store_register): Renamed from cannot_store_register,
12468 made static.
12469 (the_low_target): New.
12470 * linux-s390-low.c (num_regs): Remove.
12471 (s390_num_regs): Define.
12472 (s390_regmap): Renamed from regmap, made static.
12473 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12474 made static.
12475 (s390_cannot_store_register): Renamed from cannot_store_register,
12476 made static.
12477 (the_low_target): New.
12478 * linux-sh-low.c (num_regs): Remove.
12479 (sh_num_regs): Define.
12480 (sh_regmap): Renamed from regmap, made static.
12481 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12482 made static.
12483 (sh_cannot_store_register): Renamed from cannot_store_register,
12484 made static.
12485 (the_low_target): New.
12486 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12487 (the_low_target): New.
12488
12489 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12490
12491 * Makefile.in: Add stamp-h target.
12492 * configure.in: Create stamp-h.
12493 * configure: Regenerated.
12494
12495 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12496
12497 * inferiors.c: New file.
12498 * target.c: New file.
12499 * target.h: New file.
12500 * Makefile.in: Add target.o and inferiors.o. Update
12501 dependencies.
12502 * linux-low.c (inferior_pid): New static variable,
12503 moved from server.c.
12504 (linux_create_inferior): Renamed from create_inferior.
12505 Call add_inferior. Return 0 on success instead of a PID.
12506 (linux_attach): Renamed from myattach.
12507 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12508 (linux_thread_alive): Renamed from mythread_alive.
12509 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12510 child dies.
12511 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12512 (regsets_store_inferior_registers): Correct error message.
12513 Add missing ``return 0''.
12514 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12515 (linux_store_registers): Renamed from store_inferior_registers.
12516 (linux_read_memory): Renamed from read_inferior_memory.
12517 (linux_write_memory): Renamed from write_inferior_memory.
12518 (linux_target_ops): New structure.
12519 (initialize_low): Call set_target_ops ().
12520 * remote-utils.c (unhexify): New function.
12521 (hexify): New function.
12522 (input_interrupt): Send signals to ``signal_pid''.
12523 * server.c (inferior_pid): Remove.
12524 (start_inferior): Update create_inferior call.
12525 (attach_inferior): Call add_inferior.
12526 (handle_query): New function.
12527 (main): Call handle_query for `q' packets.
12528 * server.h: Include "target.h". Remove obsolete prototypes.
12529 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12530
12531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12532
12533 * Makefile.in: Add WARN_CFLAGS. Update configury
12534 dependencies.
12535 * configure.in: Check for <string.h>
12536 * configure: Regenerate.
12537 * config.in: Regenerate.
12538 * gdbreplay.c: Include needed system headers.
12539 (remote_open): Remove strchr prototype.
12540 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12541 * regcache.c (supply_register): Change buf argument to const void *.
12542 (supply_register_by_name): Likewise.
12543 (collect_register): Change buf argument to void *.
12544 (collect_register_by_name): Likewise.
12545 * regcache.h: Add missing prototypes.
12546 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12547 * server.c (handle_query): New function.
12548 (attached): New static variable, moved out of main.
12549 (main): Quiet longjmp clobber warnings.
12550 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12551 * utils.c (error): Remove NORETURN.
12552 (fatal): Likewise.
This page took 0.328765 seconds and 4 git commands to generate.