Support breakpoint kinds for software breakpoints in GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4 removal.
5 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6 (struct raw_breakpoint) <size>: Remove.
7 (struct raw_breakpoint) <kind>: Add.
8 (bp_size): New function.
9 (bp_opcode): Likewise.
10 (find_raw_breakpoint_at): Adjust for kind.
11 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
12 (remove_memory_breakpoint): Adjust for kind call bp_size.
13 (set_raw_breakpoint_at): Adjust for kind.
14 (set_breakpoint): Likewise.
15 (set_breakpoint_at): Call breakpoint_kind_from_pc.
16 (delete_raw_breakpoint): Adjust for kind.
17 (delete_breakpoint): Likewise.
18 (find_gdb_breakpoint): Likewise.
19 (set_gdb_breakpoint_1): Likewise.
20 (set_gdb_breakpoint): Likewise.
21 (delete_gdb_breakpoint_1): Likewise.
22 (delete_gdb_breakpoint): Likewise.
23 (uninsert_raw_breakpoint): Likewise.
24 (reinsert_raw_breakpoint): Likewise.
25 (set_breakpoint_data): Remove.
26 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
27 (check_mem_read): Adjust for kind call bp_size.
28 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
29 (clone_one_breakpoint): Adjust for kind.
30 * mem-break.h (set_gdb_breakpoint): Likewise.
31 (delete_gdb_breakpoint): Likewise.
32 * server.c (process_serial_event): Likewise.
33
342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
35
36 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
37 (struct linux_target_ops) <breakpoint>: Remove.
38 (struct linux_target_ops) <breakpoint_len>: Remove.
39 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
40 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
41 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
42 (arm_sw_breakpoint_from_kind): New function.
43 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
44 (struct linux_target_ops) <breakpoint>: Remove.
45 (struct linux_target_ops) <breakpoint_len>: Remove.
46 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
47 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
48 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
49 (struct linux_target_ops) <breakpoint>: Remove.
50 (struct linux_target_ops) <breakpoint_len>: Remove.
51 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
52 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
53 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
54 (struct linux_target_ops) <breakpoint>: Remove.
55 (struct linux_target_ops) <breakpoint_len>: Remove.
56 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
57 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
58 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
59 and sw_breakpoint_from_kind to increment the pc.
60 (linux_breakpoint_kind_from_pc): New function.
61 (linux_sw_breakpoint_from_kind): New function.
62 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
63 (initialize_low): Call breakpoint_kind_from_pc and
64 sw_breakpoint_from_kind to replace breakpoint_data/len.
65 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
66 New field.
67 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
68 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
79 (struct linux_target_ops) <breakpoint>: Remove.
80 (struct linux_target_ops) <breakpoint_len>: Remove.
81 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
82 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
83 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
84 (struct linux_target_ops) <breakpoint>: Remove.
85 (struct linux_target_ops) <breakpoint_len>: Remove.
86 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
87 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
88 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
114 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
115 (struct linux_target_ops) <breakpoint>: Remove.
116 (struct linux_target_ops) <breakpoint_len>: Remove.
117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
119 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
120 (struct linux_target_ops) <breakpoint>: Remove.
121 (struct linux_target_ops) <breakpoint_len>: Remove.
122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
124
1252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
126
127 * linux-cris-low.c (cris_get_pc): Remove void arg.
128
1292015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
130
131 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
132 variable name.
133
1342015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
135
136 * inferiors.c (thread_pid_matches_callback): New function.
137 (find_thread_process): New function.
138 (remove_thread): Reset current_thread.
139 (remove_process): Assert threads have been removed first.
140
1412015-10-15 Yao Qi <yao.qi@linaro.org>
142
143 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
144 if it is 3.
145 (aarch64_remove_point): Likewise.
146 * regcache.c (regcache_register_size): New function.
147
1482015-10-12 Yao Qi <yao.qi@linaro.org>
149
150 * linux-aarch64-low.c: Update all callers as emit_load_store
151 is renamed to aarch64_emit_load_store.
152
1532015-10-12 Yao Qi <yao.qi@linaro.org>
154
155 * linux-aarch64-low.c: Update all callers of function renaming
156 from emit_insn to aarch64_emit_insn.
157
1582015-10-12 Yao Qi <yao.qi@linaro.org>
159
160 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
161 arch/aarch64-insn.h.
162 (struct aarch64_memory_operand): Likewise.
163 (ENCODE): Likewise.
164 (emit_insn): Move to arch/aarch64-insn.c.
165 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
166 (emit_load_store): Move to arch/aarch64-insn.c.
167 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
168 (can_encode_int32): Remove.
169
1702015-10-12 Yao Qi <yao.qi@linaro.org>
171
172 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
173 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
174 (aarch64_relocate_instruction): Likewise.
175 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
176 (struct aarch64_insn_visitor): Likewise.
177
1782015-10-12 Yao Qi <yao.qi@linaro.org>
179
180 * linux-aarch64-low.c (struct aarch64_insn_data): New.
181 (struct aarch64_insn_visitor): New.
182 (struct aarch64_insn_relocation_data): New.
183 (aarch64_ftrace_insn_reloc_b): New function.
184 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
185 (aarch64_ftrace_insn_reloc_cb): Likewise.
186 (aarch64_ftrace_insn_reloc_tb): Likewise.
187 (aarch64_ftrace_insn_reloc_adr): Likewise.
188 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
189 (aarch64_ftrace_insn_reloc_others): Likewise.
190 (visitor): New.
191 (aarch64_relocate_instruction): Use visitor.
192
1932015-10-12 Yao Qi <yao.qi@linaro.org>
194
195 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
196 int. Add argument buf.
197 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
198 aarch64_relocate_instruction.
199
2002015-10-12 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
203 argument insn. Remove local variable insn. Don't call
204 target_read_uint32.
205 (aarch64_install_fast_tracepoint_jump_pad): Call
206 target_read_uint32.
207
2082015-09-30 Yao Qi <yao.qi@linaro.org>
209
210 * linux-aarch64-low.c (emit_movk): Shorten a long line.
211 (emit_load_store_pair): Likewise.
212
2132015-09-25 Simon Marchi <simon.marchi@ericsson.com>
214
215 * dll.c (match_dll): Add cast(s).
216 (unloaded_dll): Likewise.
217 * linux-low.c (second_thread_of_pid_p): Likewise.
218 (delete_lwp_callback): Likewise.
219 (count_events_callback): Likewise.
220 (select_event_lwp_callback): Likewise.
221 (linux_set_resume_request): Likewise.
222 * server.c (accumulate_file_name_length): Likewise.
223 (emit_dll_description): Likewise.
224 (handle_qxfer_threads_worker): Likewise.
225 (visit_actioned_threads): Likewise.
226 * thread-db.c (any_thread_of): Likewise.
227 * tracepoint.c (same_process_p): Likewise.
228 (match_blocktype): Likewise.
229 (build_traceframe_info_xml): Likewise.
230
2312015-09-25 Simon Marchi <simon.marchi@ericsson.com>
232
233 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
234 assignment.
235 (gdb_unparse_agent_expr): Likewise.
236 * hostio.c (require_data): Likewise.
237 (handle_pread): Likewise.
238 * linux-low.c (disable_regset): Likewise.
239 (fetch_register): Likewise.
240 (store_register): Likewise.
241 (get_dynamic): Likewise.
242 (linux_qxfer_libraries_svr4): Likewise.
243 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
244 (set_fast_tracepoint_jump): Likewise.
245 (uninsert_fast_tracepoint_jumps_at): Likewise.
246 (reinsert_fast_tracepoint_jumps_at): Likewise.
247 (validate_inserted_breakpoint): Likewise.
248 (clone_agent_expr): Likewise.
249 * regcache.c (init_register_cache): Likewise.
250 * remote-utils.c (putpkt_binary_1): Likewise.
251 (decode_M_packet): Likewise.
252 (decode_X_packet): Likewise.
253 (look_up_one_symbol): Likewise.
254 (relocate_instruction): Likewise.
255 (monitor_output): Likewise.
256 * server.c (handle_search_memory): Likewise.
257 (handle_qxfer_exec_file): Likewise.
258 (handle_qxfer_libraries): Likewise.
259 (handle_qxfer): Likewise.
260 (handle_query): Likewise.
261 (handle_v_cont): Likewise.
262 (handle_v_run): Likewise.
263 (captured_main): Likewise.
264 * target.c (write_inferior_memory): Likewise.
265 * thread-db.c (try_thread_db_load_from_dir): Likewise.
266 * tracepoint.c (init_trace_buffer): Likewise.
267 (add_tracepoint_action): Likewise.
268 (add_traceframe): Likewise.
269 (add_traceframe_block): Likewise.
270 (cmd_qtdpsrc): Likewise.
271 (cmd_qtdv): Likewise.
272 (cmd_qtstatus): Likewise.
273 (response_source): Likewise.
274 (response_tsv): Likewise.
275 (cmd_qtnotes): Likewise.
276 (gdb_collect): Likewise.
277 (initialize_tracepoint): Likewise.
278
2792015-09-21 Pierre Langlois <pierre.langlois@arm.com>
280
281 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
282 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
283 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
284 <NOP>: New.
285 (enum aarch64_condition_codes): New enum.
286 (w0): New static global.
287 (fp): Likewise.
288 (lr): Likewise.
289 (struct aarch64_memory_operand) <type>: New
290 MEMORY_OPERAND_POSTINDEX type.
291 (postindex_memory_operand): New helper function.
292 (emit_ret): New function.
293 (emit_load_store_pair): New function, factored out of emit_stp
294 with support for MEMORY_OPERAND_POSTINDEX.
295 (emit_stp): Rewrite using emit_load_store_pair.
296 (emit_ldp): New function.
297 (emit_load_store): Likewise.
298 (emit_ldr): Mention post-index instruction in comment.
299 (emit_ldrh): New function.
300 (emit_ldrb): New function.
301 (emit_ldrsw): Mention post-index instruction in comment.
302 (emit_str): Likewise.
303 (emit_subs): New function.
304 (emit_cmp): Likewise.
305 (emit_and): Likewise.
306 (emit_orr): Likewise.
307 (emit_orn): Likewise.
308 (emit_eor): Likewise.
309 (emit_mvn): Likewise.
310 (emit_lslv): Likewise.
311 (emit_lsrv): Likewise.
312 (emit_asrv): Likewise.
313 (emit_mul): Likewise.
314 (emit_sbfm): Likewise.
315 (emit_sbfx): Likewise.
316 (emit_ubfm): Likewise.
317 (emit_ubfx): Likewise.
318 (emit_csinc): Likewise.
319 (emit_cset): Likewise.
320 (emit_nop): Likewise.
321 (emit_ops_insns): New helper function.
322 (emit_pop): Likewise.
323 (emit_push): Likewise.
324 (aarch64_emit_prologue): New function.
325 (aarch64_emit_epilogue): Likewise.
326 (aarch64_emit_add): Likewise.
327 (aarch64_emit_sub): Likewise.
328 (aarch64_emit_mul): Likewise.
329 (aarch64_emit_lsh): Likewise.
330 (aarch64_emit_rsh_signed): Likewise.
331 (aarch64_emit_rsh_unsigned): Likewise.
332 (aarch64_emit_ext): Likewise.
333 (aarch64_emit_log_not): Likewise.
334 (aarch64_emit_bit_and): Likewise.
335 (aarch64_emit_bit_or): Likewise.
336 (aarch64_emit_bit_xor): Likewise.
337 (aarch64_emit_bit_not): Likewise.
338 (aarch64_emit_equal): Likewise.
339 (aarch64_emit_less_signed): Likewise.
340 (aarch64_emit_less_unsigned): Likewise.
341 (aarch64_emit_ref): Likewise.
342 (aarch64_emit_if_goto): Likewise.
343 (aarch64_emit_goto): Likewise.
344 (aarch64_write_goto_address): Likewise.
345 (aarch64_emit_const): Likewise.
346 (aarch64_emit_call): Likewise.
347 (aarch64_emit_reg): Likewise.
348 (aarch64_emit_pop): Likewise.
349 (aarch64_emit_stack_flush): Likewise.
350 (aarch64_emit_zero_ext): Likewise.
351 (aarch64_emit_swap): Likewise.
352 (aarch64_emit_stack_adjust): Likewise.
353 (aarch64_emit_int_call_1): Likewise.
354 (aarch64_emit_void_call_2): Likewise.
355 (aarch64_emit_eq_goto): Likewise.
356 (aarch64_emit_ne_goto): Likewise.
357 (aarch64_emit_lt_goto): Likewise.
358 (aarch64_emit_le_goto): Likewise.
359 (aarch64_emit_gt_goto): Likewise.
360 (aarch64_emit_ge_got): Likewise.
361 (aarch64_emit_ops_impl): New static global variable.
362 (aarch64_emit_ops): New target function, return
363 &aarch64_emit_ops_impl.
364 (struct linux_target_ops): Install it.
365
3662015-09-21 Pierre Langlois <pierre.langlois@arm.com>
367
368 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
369 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
370 aarch64-ipa.o.
371 * linux-aarch64-ipa.c: New file.
372 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
373 and endian.h.
374 (aarch64_get_thread_area): New target method.
375 (extract_signed_bitfield): New helper function.
376 (aarch64_decode_ldr_literal): New function.
377 (enum aarch64_opcodes): New enum.
378 (struct aarch64_register): New struct.
379 (struct aarch64_operand): New struct.
380 (x0): New static global.
381 (x1): Likewise.
382 (x2): Likewise.
383 (x3): Likewise.
384 (x4): Likewise.
385 (w2): Likewise.
386 (ip0): Likewise.
387 (sp): Likewise.
388 (xzr): Likewise.
389 (aarch64_register): New helper function.
390 (register_operand): Likewise.
391 (immediate_operand): Likewise.
392 (struct aarch64_memory_operand): New struct.
393 (offset_memory_operand): New helper function.
394 (preindex_memory_operand): Likewise.
395 (enum aarch64_system_control_registers): New enum.
396 (ENCODE): New macro.
397 (emit_insn): New helper function.
398 (emit_b): New function.
399 (emit_bcond): Likewise.
400 (emit_cb): Likewise.
401 (emit_tb): Likewise.
402 (emit_blr): Likewise.
403 (emit_stp): Likewise.
404 (emit_ldp_q_offset): Likewise.
405 (emit_stp_q_offset): Likewise.
406 (emit_load_store): Likewise.
407 (emit_ldr): Likewise.
408 (emit_ldrsw): Likewise.
409 (emit_str): Likewise.
410 (emit_ldaxr): Likewise.
411 (emit_stxr): Likewise.
412 (emit_stlr): Likewise.
413 (emit_data_processing_reg): Likewise.
414 (emit_data_processing): Likewise.
415 (emit_add): Likewise.
416 (emit_sub): Likewise.
417 (emit_mov): Likewise.
418 (emit_movk): Likewise.
419 (emit_mov_addr): Likewise.
420 (emit_mrs): Likewise.
421 (emit_msr): Likewise.
422 (emit_sevl): Likewise.
423 (emit_wfe): Likewise.
424 (append_insns): Likewise.
425 (can_encode_int32_in): New helper function.
426 (aarch64_relocate_instruction): New function.
427 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
428 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
429 (struct linux_target_ops): Install aarch64_get_thread_area,
430 aarch64_install_fast_tracepoint_jump_pad and
431 aarch64_get_min_fast_tracepoint_insn_len.
432
4332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
434
435 * Makefile.in (aarch64-insn.o): New rule.
436 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
437
4382015-09-21 Yao Qi <yao.qi@linaro.org>
439
440 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
441
4422015-09-21 Yao Qi <yao.qi@linaro.org>
443
444 * tracepoint.c (max_jump_pad_size): Remove.
445
4462015-09-18 Yao Qi <yao.qi@linaro.org>
447
448 * linux-aarch64-low.c: Don't include sys/uio.h.
449 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
450
4512015-09-16 Wei-cheng Wang <cole945@gmail.com>
452
453 * tracepoint.c (eval_result_type): Change prototype.
454 (condition_true_at_tracepoint): Fix argument to compiled_cond.
455
4562015-09-15 Pedro Alves <palves@redhat.com>
457
458 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
459 Check whether to report exec events instead of checking whether
460 multiprocess is enabled.
461
4622015-09-15 Pedro Alves <palves@redhat.com>
463
464 PR remote/18965
465 * remote-utils.c (prepare_resume_reply): Merge
466 TARGET_WAITKIND_VFORK_DONE switch case with the
467 TARGET_WAITKIND_FORKED case.
468
4692015-09-15 Yao Qi <yao.qi@linaro.org>
470
471 * server.c (handle_query): Check string comparison using
472 "else if" instead of "if".
473
4742015-09-15 Yao Qi <yao.qi@linaro.org>
475
476 * server.c (vCont_supported): New global variable.
477 (handle_query): Set vCont_supported to 1 if "vContSupported+"
478 matches. Append ";vContSupported+" to own_buf.
479 (handle_v_requests): Append ";s;S" to own_buf if target supports
480 hardware single step or vCont_supported is false.
481 (capture_main): Set vCont_supported to zero.
482
4832015-09-15 Yao Qi <yao.qi@linaro.org>
484
485 * linux-low.c (linux_supports_conditional_breakpoints): Rename
486 it to ...
487 (linux_supports_hardware_single_step): ... New function.
488 (linux_target_ops): Update.
489 * lynx-low.c (lynx_target_ops): Set field
490 supports_hardware_single_step to target_can_do_hardware_single_step.
491 * nto-low.c (nto_target_ops): Likewise.
492 * spu-low.c (spu_target_ops): Likewise.
493 * win32-low.c (win32_target_ops): Likewise.
494 * target.c (target_can_do_hardware_single_step): New function.
495 * target.h (struct target_ops) <supports_conditional_breakpoints>:
496 Remove. <supports_hardware_single_step>: New field.
497 (target_supports_conditional_breakpoints): Remove.
498 (target_supports_hardware_single_step): New macro.
499 (target_can_do_hardware_single_step): Declare.
500 * server.c (handle_query): Use target_supports_hardware_single_step
501 instead of target_supports_conditional_breakpoints.
502
5032015-09-15 Yao Qi <yao.qi@linaro.org>
504
505 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
506 function.
507 (struct linux_target_ops the_low_target): Install
508 aarch64_linux_siginfo_fixup.
509
5102015-09-11 Don Breazeal <donb@codesourcery.com>
511 Luis Machado <lgustavo@codesourcery.com>
512
513 * linux-low.c (linux_mourn): Static declaration.
514 (linux_arch_setup): Move in front of
515 handle_extended_wait.
516 (linux_arch_setup_thread): New function.
517 (handle_extended_wait): Handle exec events. Call
518 linux_arch_setup_thread. Make event_lwp argument a
519 pointer-to-a-pointer.
520 (check_zombie_leaders): Do not check stopped threads.
521 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
522 (linux_low_filter_event): Add lwp and thread for exec'ing
523 non-leader thread if leader thread has been deleted.
524 Refactor code into linux_arch_setup_thread and call it.
525 Pass child lwp pointer by reference to handle_extended_wait.
526 (linux_wait_for_event_filtered): Update comment.
527 (linux_wait_1): Prevent clobbering exec event status.
528 (linux_supports_exec_events): New function.
529 (linux_target_ops) <supports_exec_events>: Initialize new member.
530 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
531 new member.
532 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
533 * server.c (report_exec_events): New global variable.
534 (handle_query): Handle qSupported query for exec-events feature.
535 (captured_main): Initialize report_exec_events.
536 * server.h (report_exec_events): Declare new global variable.
537 * target.h (struct target_ops) <supports_exec_events>: New
538 member.
539 (target_supports_exec_events): New macro.
540 * win32-low.c (win32_target_ops) <supports_exec_events>:
541 Initialize new member.
542
5432015-09-09 Markus Metzger <markus.t.metzger@intel.com>
544
545 * linux-low.c (linux_low_enable_btrace): Remove.
546 (linux_target_ops): Replace linux_low_enable_btrace with
547 linux_enable_btrace.
548
5492015-09-03 Yao Qi <yao.qi@linaro.org>
550
551 * linux-aarch64-low.c (aarch64_insert_point): Call
552 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
553 returns true.
554
5552015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
556
557 * linux-low.c (check_stopped_by_breakpoint): Use
558 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
559
5602015-08-27 Pedro Alves <palves@redhat.com>
561
562 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
563
5642015-08-26 Simon Marchi <simon.marchi@ericsson.com>
565
566 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
567 the XNEW-family equivalent.
568 (compile_bytecodes): Likewise.
569 * dll.c (loaded_dll): Likewise.
570 * event-loop.c (append_callback_event): Likewise.
571 (create_file_handler): Likewise.
572 (create_file_event): Likewise.
573 * hostio.c (handle_open): Likewise.
574 * inferiors.c (add_thread): Likewise.
575 (add_process): Likewise.
576 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
577 * linux-arm-low.c (arm_new_process): Likewise.
578 (arm_new_thread): Likewise.
579 * linux-low.c (add_to_pid_list): Likewise.
580 (linux_add_process): Likewise.
581 (handle_extended_wait): Likewise.
582 (add_lwp): Likewise.
583 (enqueue_one_deferred_signal): Likewise.
584 (enqueue_pending_signal): Likewise.
585 (linux_resume_one_lwp_throw): Likewise.
586 (linux_resume_one_thread): Likewise.
587 (linux_read_memory): Likewise.
588 (linux_write_memory): Likewise.
589 * linux-mips-low.c (mips_linux_new_process): Likewise.
590 (mips_linux_new_thread): Likewise.
591 (mips_add_watchpoint): Likewise.
592 * linux-x86-low.c (initialize_low_arch): Likewise.
593 * lynx-low.c (lynx_add_process): Likewise.
594 * mem-break.c (set_raw_breakpoint_at): Likewise.
595 (set_breakpoint): Likewise.
596 (add_condition_to_breakpoint): Likewise.
597 (add_commands_to_breakpoint): Likewise.
598 (clone_agent_expr): Likewise.
599 (clone_one_breakpoint): Likewise.
600 * regcache.c (new_register_cache): Likewise.
601 * remote-utils.c (look_up_one_symbol): Likewise.
602 * server.c (queue_stop_reply): Likewise.
603 (start_inferior): Likewise.
604 (queue_stop_reply_callback): Likewise.
605 (handle_target_event): Likewise.
606 * spu-low.c (fetch_ppc_memory): Likewise.
607 (store_ppc_memory): Likewise.
608 * target.c (set_target_ops): Likewise.
609 * thread-db.c (thread_db_load_search): Likewise.
610 (try_thread_db_load_1): Likewise.
611 * tracepoint.c (add_tracepoint): Likewise.
612 (add_tracepoint_action): Likewise.
613 (create_trace_state_variable): Likewise.
614 (cmd_qtdpsrc): Likewise.
615 (cmd_qtro): Likewise.
616 (add_while_stepping_state): Likewise.
617 * win32-low.c (child_add_thread): Likewise.
618 (get_image_name): Likewise.
619
6202015-08-25 Yao Qi <yao.qi@linaro.org>
621
622 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
623
6242015-08-25 Yao Qi <yao.qi@linaro.org>
625
626 * Makefile.in (aarch64-linux.o): New rule.
627 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
628 srv_tgtobj.
629 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
630 (aarch64_init_debug_reg_state): Make it extern.
631 (aarch64_linux_prepare_to_resume): Remove.
632
6332015-08-25 Yao Qi <yao.qi@linaro.org>
634
635 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
636 lwp_arch_private_info and ptid_of_lwp.
637
6382015-08-25 Yao Qi <yao.qi@linaro.org>
639
640 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
641 Find proc_info by find_process_pid. All callers updated.
642
6432015-08-25 Yao Qi <yao.qi@linaro.org>
644
645 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
646 Remove.
647 (debug_reg_change_callback): Remove.
648 (aarch64_notify_debug_reg_change): Remove.
649
6502015-08-25 Yao Qi <yao.qi@linaro.org>
651
652 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
653 Call current_lwp_ptid.
654
6552015-08-25 Yao Qi <yao.qi@linaro.org>
656
657 * linux-aarch64-low.c (debug_reg_change_callback): Use
658 debug_printf.
659
6602015-08-25 Yao Qi <yao.qi@linaro.org>
661
662 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
663
6642015-08-25 Yao Qi <yao.qi@linaro.org>
665
666 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
667
6682015-08-25 Yao Qi <yao.qi@linaro.org>
669
670 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
671 the code.
672
6732015-08-25 Yao Qi <yao.qi@linaro.org>
674
675 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
676 Remove.
677 (debug_reg_change_callback): Remove argument entry and add argument
678 lwp. Remove local variable thread. Don't print thread id in the
679 debugging output. Don't check whether pid of thread equals to pid.
680 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
681 iterate_over_lwps instead find_inferior.
682
6832015-08-24 Pedro Alves <palves@redhat.com>
684
685 * inferiors.c (get_first_process): New function.
686 * inferiors.h (get_first_process): New declaration.
687 * remote-utils.c (read_ptid): Default to the first process in the
688 list, instead of to the current thread's process.
689
6902015-08-24 Pedro Alves <palves@redhat.com>
691
692 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
693 * event-loop.c: Likewise.
694 * remote-utils.c: Likewise.
695 * tracepoint.c: Likewise.
696
6972015-08-24 Pedro Alves <palves@redhat.com>
698
699 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
700 ptid_get_lwp.
701
7022015-08-21 Pedro Alves <palves@redhat.com>
703
704 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
705 instead of literal 1.
706
7072015-08-21 Pedro Alves <palves@redhat.com>
708
709 * tdesc.c (default_description): Explicitly zero-initialize.
710
7112015-08-21 Pedro Alves <palves@redhat.com>
712
713 PR gdb/18749
714 * inferiors.c (remove_thread): Discard any pending stop reply for
715 this thread.
716 * server.c (remove_all_on_match_pid): Rename to ...
717 (remove_all_on_match_ptid): ... this. Work with a filter ptid
718 instead of a pid.
719 (discard_queued_stop_replies): Change parameter to a ptid. Now
720 extern.
721 (handle_v_kill, kill_inferior_callback, captured_main)
722 (process_serial_event): Adjust.
723 * server.h (discard_queued_stop_replies): Declare.
724
7252015-08-21 Pedro Alves <palves@redhat.com>
726
727 * linux-low.c (wait_for_sigstop): Always switch to no thread
728 selected if the previously current thread dies.
729 * lynx-low.c (lynx_request_interrupt): Use the first thread's
730 process instead of the current thread's.
731 * remote-utils.c (input_interrupt): Don't check if there's no
732 current thread.
733 * server.c (gdb_read_memory, gdb_write_memory): If setting the
734 current thread to the general thread fails, error out.
735 (handle_qxfer_auxv, handle_qxfer_libraries)
736 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
737 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
738 (handle_query): Check if there's a thread selected instead of
739 checking whether there's any thread in the thread list.
740 (handle_qxfer_threads, handle_qxfer_btrace)
741 (handle_qxfer_btrace_conf): Don't error out early if there's no
742 thread in the thread list.
743 (handle_v_cont, myresume): Don't set the current thread to the
744 continue thread.
745 (process_serial_event) <Hg handling>: Also set thread_id if the
746 previous general thread is still alive.
747 (process_serial_event) <g/G handling>: If setting the current
748 thread to the general thread fails, error out.
749 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
750 thread's lwp instead of the current thread's.
751 * target.c (set_desired_thread): If the desired thread was not
752 found, leave the current thread pointing to NULL. Return an int
753 (boolean) indicating success.
754 * target.h (set_desired_thread): Change return type to int.
755
7562015-08-20 Max Filippov <jcmvbkbc@gmail.com>
757
758 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
759 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
760 #includes.
761 (ps_get_thread_area): New function.
762
7632015-08-19 Gary Benson <gbenson@redhat.com>
764
765 * hostio.c (handle_pread): Do not attempt to read more data
766 than hostio_reply_with_data can fit in a packet.
767
7682015-08-18 Joel Brobecker <brobecker@adacore.com>
769
770 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
771
7722015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
773
774 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
775
7762015-08-06 Pedro Alves <palves@redhat.com>
777
778 * tracepoint.c (expr_eval_result): Now an int.
779
7802015-08-06 Pedro Alves <palves@redhat.com>
781
782 * gdbthread.h (struct regcache): Forward declare.
783 (struct thread_info) <regcache_data>: Now a struct regcache
784 pointer.
785 * inferiors.c (inferior_regcache_data)
786 (set_inferior_regcache_data): Now work with struct regcache
787 pointers.
788 * inferiors.h (struct regcache): Forward declare.
789 (inferior_regcache_data, set_inferior_regcache_data): Now work
790 with struct regcache pointers.
791 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
792 (free_register_cache_thread): Remove struct regcache pointer
793 casts.
794
7952015-08-06 Pedro Alves <palves@redhat.com>
796
797 * server.c (captured_main): On error, print the exception message
798 to stderr, and if run_once is set, throw a quit.
799
8002015-08-06 Pedro Alves <palves@redhat.com>
801
802 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
803 the current thread.
804
8052015-08-06 Pedro Alves <palves@redhat.com>
806
807 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
808 reading beyond the passed in buffer length.
809
8102015-08-06 Pierre Langlois <pierre.langlois@arm.com>
811
812 * tracepoint.c (symbol_list) <required>: Remove.
813
8142015-08-06 Pedro Alves <palves@redhat.com>
815
816 * linux-low.c (handle_extended_wait): Set the fork child's suspend
817 count if stopping and suspending threads.
818 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
819 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
820 (linux_detach): Complete an ongoing step-over.
821 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
822 throughout.
823 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
824 (linux_wait_1): If passing a signal to the inferior after
825 finishing a step-over, unsuspend and re-resume all lwps. If we
826 see a single-step event but the thread should be continuing, don't
827 pass the trap to gdb.
828 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
829 internal_error instead of gdb_assert.
830 (enqueue_pending_signal): New function.
831 (check_ptrace_stopped_lwp_gone): Add debug output.
832 (start_step_over): Use internal_error instead of gdb_assert.
833 (complete_ongoing_step_over): New function.
834 (linux_resume_one_thread): Don't resume a suspended thread.
835 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
836 it stepping.
837
8382015-08-06 Pedro Alves <palves@redhat.com>
839
840 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
841 (linux_thread_alive): Use lwp_is_marked_dead.
842 (extended_event_reported): Delete.
843 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
844 instead of extended_event_reported.
845 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
846 as well.
847 (lwp_is_marked_dead): New function.
848 (lwp_running): Use lwp_is_marked_dead.
849 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
850 comment.
851
8522015-08-06 Pedro Alves <palves@redhat.com>
853
854 * linux-low.c (linux_wait_1): Move fork event output out of the
855 !report_to_gdb check. Pass event_child->waitstatus to
856 target_waitstatus_to_string instead of ourstatus.
857
8582015-08-04 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
861 if current_thread is 32 bit.
862
8632015-08-04 Yao Qi <yao.qi@linaro.org>
864
865 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
866 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
867 * server.c (extended_protocol): Remove "static".
868 * server.h (extended_protocol): Declare it.
869
8702015-08-04 Yao Qi <yao.qi@linaro.org>
871
872 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
873 both aarch64 and aarch32.
874 (aarch64_set_pc): Likewise.
875
8762015-08-04 Yao Qi <yao.qi@linaro.org>
877
878 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
879 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
880 arm-with-neon.xml to srv_xmlfiles.
881 * linux-aarch64-low.c: Include linux-aarch32-low.h.
882 (is_64bit_tdesc): New function.
883 (aarch64_linux_read_description): New function.
884 (aarch64_arch_setup): Call aarch64_linux_read_description.
885 (regs_info): Rename to regs_info_aarch64.
886 (aarch64_regs_info): Return right regs_info.
887 (initialize_low_arch): Call initialize_low_arch_aarch32.
888
8892015-08-04 Yao Qi <yao.qi@linaro.org>
890
891 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
892 * linux-aarch32-low.c: New file.
893 * linux-aarch32-low.h: New file.
894 * linux-arm-low.c (arm_fill_gregset): Move it to
895 linux-aarch32-low.c.
896 (arm_store_gregset): Likewise.
897 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
898 (arm_store_vfpregset): Call arm_store_vfpregset_num.
899 (arm_arch_setup): Check if PTRACE_GETREGSET works.
900 (regs_info): Rename to regs_info_arm.
901 (arm_regs_info): Return regs_info_aarch32 if
902 have_ptrace_getregset is 1 and target description is
903 arm_with_neon or arm_with_vfpv3.
904 (initialize_low_arch): Don't call init_registers_arm_with_neon.
905 Call initialize_low_arch_aarch32 instead.
906
9072015-08-04 Yao Qi <yao.qi@linaro.org>
908
909 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
910 * linux-low.c: ... here.
911 * linux-low.h (have_ptrace_getregset): Declare it.
912
9132015-08-04 Pedro Alves <palves@redhat.com>
914
915 * thread-db.c (struct thread_db): Use new typedefs.
916 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
917 CHK calls.
918 (disable_thread_event_reporting): Cast result of dlsym to
919 destination function pointer type.
920 (thread_db_mourn): Use td_ta_delete_ftype.
921
9222015-08-03 Sandra Loosemore <sandra@codesourcery.com>
923
924 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
925 arch variant.
926 (CDX_BREAKPOINT): Define for R2.
927 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
928 (the_low_target): Add comments.
929
9302015-07-30 Yao Qi <yao.qi@linaro.org>
931
932 * linux-arm-low.c (arm_hwcap): Remove it.
933 (arm_read_description): New local variable arm_hwcap. Don't
934 set arm_hwcap to zero.
935
9362015-07-30 Yao Qi <yao.qi@linaro.org>
937
938 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
939 Use regcache->tdesc instead.
940 (arm_store_wmmxregset): Likewise.
941 (arm_fill_vfpregset): Likewise.
942 (arm_store_vfpregset): Likewise.
943
9442015-07-30 Yao Qi <yao.qi@linaro.org>
945
946 * linux-arm-low.c: Include arch/arm.h.
947 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
948 (arm_store_gregset): Likewise.
949
9502015-07-29 Simon Marchi <simon.marchi@ericsson.com>
951
952 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
953 ptrace's 4th parameter.
954
9552015-07-27 Yao Qi <yao.qi@linaro.org>
956
957 * configure.srv (case aarch64*-*-linux*): Don't set
958 srv_linux_usrregs.
959
9602015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
961
962 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
963 sys/ptrace.h.
964 * linux-arm-low.c: Likewise.
965 * linux-cris-low.c: Likewise.
966 * linux-crisv32-low.c: Likewise.
967 * linux-low.c: Likewise.
968 * linux-m68k-low.c: Likewise.
969 * linux-mips-low.c: Likewise.
970 * linux-nios2-low.c: Likewise.
971 * linux-s390-low.c: Likewise.
972 * linux-sparc-low.c: Likewise.
973 * linux-tic6x-low.c: Likewise.
974 * linux-tile-low.c: Likewise.
975 * linux-x86-low.c: Likewise.
976
9772015-07-24 Pedro Alves <palves@redhat.com>
978
979 * config.in: Regenerate.
980 * configure: Regenerate.
981
9822015-07-24 Pedro Alves <palves@redhat.com>
983
984 * acinclude.m4: Include ../ptrace.m4.
985 * configure.ac: Call GDB_AC_PTRACE.
986 * config.in, configure: Regenerate.
987
9882015-07-24 Yao Qi <yao.qi@linaro.org>
989
990 * linux-low.c (linux_create_inferior): Remove setting to
991 proc->priv->new_inferior.
992 (linux_attach): Likewise.
993 (linux_low_filter_event): Likewise.
994 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
995
9962015-07-24 Yao Qi <yao.qi@linaro.org>
997
998 * linux-low.c (linux_arch_setup): New function.
999 (linux_low_filter_event): If proc->tdesc is NULL and
1000 proc->attached is true, call the_low_target.arch_setup.
1001 Otherwise, keep status pending, and return.
1002 (linux_resume_one_lwp_throw): Don't call get_pc if
1003 thread->while_stepping isn't NULL. Don't call
1004 get_thread_regcache if proc->tdesc is NULL.
1005 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1006 (linux_target_ops): Install arch_setup.
1007 * server.c (start_inferior): Call the_target->arch_setup.
1008 * target.h (struct target_ops) <arch_setup>: New field.
1009 (target_arch_setup): New marco.
1010 * lynx-low.c (lynx_target_ops): Update.
1011 * nto-low.c (nto_target_ops): Update.
1012 * spu-low.c (spu_target_ops): Update.
1013 * win32-low.c (win32_target_ops): Update.
1014
10152015-07-24 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-low.c (linux_add_process): Don't set
1018 proc->priv->new_inferior.
1019 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1020 (linux_attach): Likewise.
1021
10222015-07-24 Yao Qi <yao.qi@linaro.org>
1023
1024 * server.c (start_inferior): Code refactor.
1025
10262015-07-24 Yao Qi <yao.qi@linaro.org>
1027
1028 * server.c (process_serial_event): Set general_thread.
1029
10302015-07-21 Yao Qi <yao.qi@linaro.org>
1031
1032 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1033 aarch64_linux_get_debug_reg_capacity.
1034
10352015-07-17 Yao Qi <yao.qi@linaro.org>
1036
1037 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1038 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1039 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1040 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1041 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1042 (AARCH64_HWP_ALIGNMENT): Likewise.
1043 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1044 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1045 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1046 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1047 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1048 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1049 (struct aarch64_debug_reg_state): Likewise.
1050 (struct arch_lwp_info): Likewise.
1051 (aarch64_align_watchpoint): Likewise.
1052 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1053 (aarch64_watchpoint_length): Likewise.
1054 (aarch64_point_encode_ctrl_reg): Likewise
1055 (aarch64_point_is_aligned): Likewise.
1056 (aarch64_align_watchpoint): Likewise.
1057 (aarch64_linux_set_debug_regs):
1058 (aarch64_dr_state_insert_one_point): Likewise.
1059 (aarch64_dr_state_remove_one_point): Likewise.
1060 (aarch64_handle_breakpoint): Likewise.
1061 (aarch64_handle_aligned_watchpoint): Likewise.
1062 (aarch64_handle_unaligned_watchpoint): Likewise.
1063 (aarch64_handle_watchpoint): Likewise.
1064
10652015-07-17 Yao Qi <yao.qi@linaro.org>
1066
1067 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1068 and don't aarch64_get_debug_reg_state. All callers update.
1069 (aarch64_handle_aligned_watchpoint): Likewise.
1070 (aarch64_handle_unaligned_watchpoint): Likewise.
1071 (aarch64_handle_watchpoint): Likewise.
1072 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1073 (aarch64_remove_point): Likewise.
1074
10752015-07-17 Yao Qi <yao.qi@linaro.org>
1076
1077 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1078 debug_printf.
1079 (aarch64_handle_unaligned_watchpoint): Likewise.
1080
10812015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1082
1083 Revert the previous 3 commits:
1084 Move gdb_regex* to common/
1085 Move linux_find_memory_regions_full & co.
1086 gdbserver build-id attribute generator
1087
10882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1089 Jan Kratochvil <jan.kratochvil@redhat.com>
1090
1091 gdbserver build-id attribute generator.
1092 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1093 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1094 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1095 (find_phdr): New.
1096 (get_dynamic): Use find_pdhr to traverse program headers.
1097 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1098 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1099 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1100 (get_hex_build_id): New.
1101 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1102 to reply XML document.
1103
11042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1105 Jan Kratochvil <jan.kratochvil@redhat.com>
1106
1107 * target.c: Include target/target-utils.h and fcntl.h.
1108 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1109 (target_fileio_read_stralloc): New functions.
1110
11112015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1112
1113 * Makefile.in (OBS): Add gdb_regex.o.
1114 (gdb_regex.o): New.
1115 * config.in: Rebuilt.
1116 * configure: Rebuilt.
1117
11182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1119 Jan Kratochvil <jan.kratochvil@redhat.com>
1120
1121 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1122 * Makefile.in (OBS): Add target-utils.o.
1123 (linux-maps.o, target-utils.o): New.
1124 * configure.srv (srv_linux_obj): Add linux-maps.o.
1125
11262015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1127
1128 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1129 function, return 1.
1130 (the_low_target): Install it.
1131
11322015-07-14 Pedro Alves <palves@redhat.com>
1133
1134 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1135 Instead, ignore ECHILD, and throw an error for other errnos.
1136
11372015-07-10 Pedro Alves <palves@redhat.com>
1138
1139 * event-loop.c (struct callback_event) <data>: Change type to
1140 gdb_client_data instance instead of gdb_client_data pointer.
1141 (append_callback_event): Adjust.
1142
11432015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1144
1145 * linux-aarch64-low.c: Add comments for each linux_target_ops
1146 method. Remove comments already covered in target_ops and
1147 linux_target_ops definitions.
1148 (the_low_target): Add comments for each unimplemented method.
1149
11502015-07-09 Yao Qi <yao.qi@linaro.org>
1151
1152 * linux-aarch64-low.c (aarch64_regmap): Remove.
1153 (aarch64_usrregs_info): Remove.
1154 (regs_info): Set field usrregs to NULL.
1155
11562015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1157
1158 * linux-low.c: Include "rsp-low.h"
1159 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1160 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1161 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1162 (handle_btrace_enable_pt): New.
1163 (handle_btrace_general_set): Support "pt".
1164 (handle_btrace_conf_general_set): Support "pt:size".
1165
11662015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1167
1168 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1169 Z_PACKET_SW_BP.
1170
11712015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1172
1173 * linux-aarch64-low.c: Remove comment about endianness.
1174 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1175 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1176 memcmp.
1177
11782015-06-24 Gary Benson <gbenson@redhat.com>
1179
1180 * linux-i386-ipa.c (stdint.h): Do not include.
1181 * lynx-i386-low.c (stdint.h): Likewise.
1182 * lynx-ppc-low.c (stdint.h): Likewise.
1183 * mem-break.c (stdint.h): Likewise.
1184 * thread-db.c (stdint.h): Likewise.
1185 * tracepoint.c (stdint.h): Likewise.
1186 * win32-low.c (stdint.h): Likewise.
1187
11882015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * server.c (write_qxfer_response): Update call to
1191 remote_escape_output.
1192
11932015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1194 Jan Kratochvil <jan.kratochvil@redhat.com>
1195
1196 Merge multiple hex conversions.
1197 * gdbreplay.c (tohex): Rename to 'fromhex'.
1198 (logchar): Use fromhex.
1199
12002015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1201
1202 * server.c (handle_qxfer_libraries): Set `version' attribute for
1203 <library-list>.
1204
12052015-06-10 Gary Benson <gbenson@redhat.com>
1206
1207 * target.h (struct target_ops) <multifs_open>: New field.
1208 <multifs_unlink>: Likewise.
1209 <multifs_readlink>: Likewise.
1210 * linux-low.c (nat/linux-namespaces.h): New include.
1211 (linux_target_ops): Initialize the_target->multifs_open,
1212 the_target->multifs_unlink and the_target->multifs_readlink.
1213 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1214 * hostio.c (hostio_fs_pid): New static variable.
1215 (hostio_handle_new_gdb_connection): New function.
1216 (handle_setfs): Likewise.
1217 (handle_open): Use the_target->multifs_open as appropriate.
1218 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1219 (handle_readlink): Use the_target->multifs_readlink as
1220 appropriate.
1221 (handle_vFile): Handle vFile:setfs packets.
1222 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1223 after target_handle_new_gdb_connection.
1224
12252015-06-10 Gary Benson <gbenson@redhat.com>
1226
1227 * configure.ac (AC_CHECK_FUNCS): Add setns.
1228 * config.in: Regenerate.
1229 * configure: Likewise.
1230 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1231 (linux-namespaces.o): New rule.
1232 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1233
12342015-06-09 Gary Benson <gbenson@redhat.com>
1235
1236 * hostio.c (handle_open): Process mode argument with
1237 fileio_to_host_mode.
1238
12392015-06-01 Yao Qi <yao.qi@linaro.org>
1240
1241 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1242 * linux-x86-low.c: Likewise.
1243
12442015-05-28 Don Breazeal <donb@codesourcery.com>
1245
1246 * linux-low.c (handle_extended_wait): Initialize
1247 thread_info.last_resume_kind for new fork children.
1248
12492015-05-15 Pedro Alves <palves@redhat.com>
1250
1251 * target.h (target_handle_new_gdb_connection): Rewrite using if
1252 wrapped in do/while.
1253
12542015-05-14 Joel Brobecker <brobecker@adacore.com>
1255
1256 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1257 * configure, config.in: Regenerate.
1258 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1259 Declare typedef.
1260
12612015-05-12 Don Breazeal <donb@codesourcery.com>
1262
1263 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1264 PTRACE_EVENT_VFORK_DONE.
1265 (linux_low_ptrace_options, extended_event_reported): Add vfork
1266 events.
1267 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1268 and "vforkdone" for RSP 'T' Stop Reply Packet.
1269 * server.h (report_vfork_events): Declare
1270 global variable.
1271
12722015-05-12 Don Breazeal <donb@codesourcery.com>
1273
1274 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1275 (the_low_target) <new_fork>: Initialize new member.
1276 * linux-arm-low.c (arm_new_fork): New function.
1277 (the_low_target) <new_fork>: Initialize new member.
1278 * linux-low.c (handle_extended_wait): Call new target function
1279 new_fork.
1280 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1281 * linux-mips-low.c (mips_add_watchpoint): New function
1282 extracted from mips_insert_point.
1283 (the_low_target) <new_fork>: Initialize new member.
1284 (mips_linux_new_fork): New function.
1285 (mips_insert_point): Call mips_add_watchpoint.
1286 * linux-x86-low.c (x86_linux_new_fork): New function.
1287 (the_low_target) <new_fork>: Initialize new member.
1288
12892015-05-12 Don Breazeal <donb@codesourcery.com>
1290
1291 * linux-low.c (handle_extended_wait): Implement return value,
1292 rename argument 'event_child' to 'event_lwp', handle
1293 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1294 (linux_low_ptrace_options): New function.
1295 (linux_low_filter_event): Call linux_low_ptrace_options,
1296 use different argument fo linux_enable_event_reporting,
1297 use return value from handle_extended_wait.
1298 (extended_event_reported): New function.
1299 (linux_wait_1): Call extended_event_reported and set
1300 status to report fork events.
1301 (linux_write_memory): Add pid to debug message.
1302 (reset_lwp_ptrace_options_callback): New function.
1303 (linux_handle_new_gdb_connection): New function.
1304 (linux_target_ops): Initialize new structure member.
1305 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1306 * lynx-low.c: Initialize new structure member.
1307 * remote-utils.c (prepare_resume_reply): Implement stop reason
1308 "fork" for "T" stop message.
1309 * server.c (handle_query): Call handle_new_gdb_connection.
1310 * server.h (report_fork_events): Declare global flag.
1311 * target.h (struct target_ops) <handle_new_gdb_connection>:
1312 New member.
1313 (target_handle_new_gdb_connection): New macro.
1314 * win32-low.c: Initialize new structure member.
1315
13162015-05-12 Don Breazeal <donb@codesourcery.com>
1317
1318 * mem-break.c (APPEND_TO_LIST): Define macro.
1319 (clone_agent_expr): New function.
1320 (clone_one_breakpoint): New function.
1321 (clone_all_breakpoints): New function.
1322 * mem-break.h: Declare new functions.
1323
13242015-05-12 Don Breazeal <donb@codesourcery.com>
1325
1326 * linux-low.c (linux_supports_fork_events): New function.
1327 (linux_supports_vfork_events): New function.
1328 (linux_target_ops): Initialize new structure members.
1329 (initialize_low): Call linux_check_ptrace_features.
1330 * lynx-low.c (lynx_target_ops): Initialize new structure
1331 members.
1332 * server.c (report_fork_events, report_vfork_events):
1333 New global flags.
1334 (handle_query): Add new features to qSupported packet and
1335 response.
1336 (captured_main): Initialize new global variables.
1337 * target.h (struct target_ops) <supports_fork_events>:
1338 New member.
1339 <supports_vfork_events>: New member.
1340 (target_supports_fork_events): New macro.
1341 (target_supports_vfork_events): New macro.
1342 * win32-low.c (win32_target_ops): Initialize new structure
1343 members.
1344
13452015-05-12 Gary Benson <gbenson@redhat.com>
1346
1347 * server.c (handle_qxfer_exec_file): Use current process
1348 if annex is empty.
1349
13502015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1351
1352 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1353 Remove HAVE_PTRACE_GETREGS conditionals.
1354 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1355 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1356
13572015-05-08 Yao Qi <yao.qi@linaro.org>
1358
1359 * linux-low.c (linux_supports_conditional_breakpoints): New
1360 function.
1361 (linux_target_ops): Install new target method.
1362 * lynx-low.c (lynx_target_ops): Install NULL hook for
1363 supports_conditional_breakpoints.
1364 * nto-low.c (nto_target_ops): Likewise.
1365 * spu-low.c (spu_target_ops): Likewise.
1366 * win32-low.c (win32_target_ops): Likewise.
1367 * server.c (handle_query): Check
1368 target_supports_conditional_breakpoints.
1369 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1370 New field.
1371 (target_supports_conditional_breakpoints): New macro.
1372
13732015-05-06 Pedro Alves <palves@redhat.com>
1374
1375 PR server/18081
1376 * server.c (start_inferior): If the process exits, mourn it.
1377
13782015-04-21 Gary Benson <gbenson@redhat.com>
1379
1380 * hostio.c (fileio_open_flags_to_host): Factored out to
1381 fileio_to_host_openflags in common/fileio.c. Single use
1382 updated.
1383
13842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1385
1386 * linux-xtensa-low.c (xtensa_fill_gregset)
1387 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1388 XCHAL_HAVE_LOOP.
1389
13902015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1391
1392 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1393 (regs_info): Replace usrregs pointer with NULL.
1394
13952015-04-17 Gary Benson <gbenson@redhat.com>
1396
1397 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1398 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1399 * server.c (handle_qxfer_exec_file): New function.
1400 (qxfer_packets): Add exec-file entry.
1401 (handle_query): Report qXfer:exec-file:read as supported packet.
1402
14032015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1404
1405 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1406
14072015-04-09 Gary Benson <gbenson@redhat.com>
1408
1409 * hostio-errno.c (errno_to_fileio_error): Remove function.
1410 Update caller to use remote_fileio_to_fio_error.
1411
14122015-04-09 Yao Qi <yao.qi@linaro.org>
1413
1414 * linux-low.c (linux_insert_point): Call
1415 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1416 (linux_remove_point): Call remove_memory_breakpoint if type is
1417 raw_bkpt_type_sw.
1418 * linux-x86-low.c (x86_insert_point): Don't call
1419 insert_memory_breakpoint.
1420 (x86_remove_point): Don't call remove_memory_breakpoint.
1421
14222015-04-01 Pedro Alves <palves@redhat.com>
1423 Cleber Rosa <crosa@redhat.com>
1424
1425 * server.c (gdbserver_usage): Reorganize and extend the usage
1426 message.
1427
14282015-03-24 Pedro Alves <palves@redhat.com>
1429
1430 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1431 output. Also dump TRAP_TRACE.
1432 (linux_low_filter_event): In debug output, distinguish a
1433 resume_stop SIGSTOP from a delayed SIGSTOP.
1434
14352015-03-24 Gary Benson <gbenson@redhat.com>
1436
1437 * linux-x86-low.c (x86_linux_new_thread): Moved to
1438 nat/x86-linux.c.
1439 (x86_linux_prepare_to_resume): Likewise.
1440
14412015-03-24 Gary Benson <gbenson@redhat.com>
1442
1443 * Makefile.in (x86-linux-dregs.o): New rule.
1444 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1445 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1446 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1447 (x86_linux_dr_get): Likewise.
1448 (x86_linux_dr_set): Likewise.
1449 (update_debug_registers_callback): Likewise.
1450 (x86_linux_dr_set_addr): Likewise.
1451 (x86_linux_dr_get_addr): Likewise.
1452 (x86_linux_dr_set_control): Likewise.
1453 (x86_linux_dr_get_control): Likewise.
1454 (x86_linux_dr_get_status): Likewise.
1455 (x86_linux_update_debug_registers): Likewise.
1456
14572015-03-24 Gary Benson <gbenson@redhat.com>
1458
1459 * linux-x86-low.c (x86_linux_update_debug_registers):
1460 New function, factored out from...
1461 (x86_linux_prepare_to_resume): ...this.
1462
14632015-03-24 Gary Benson <gbenson@redhat.com>
1464
1465 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1466 (x86_linux_dr_set): Likewise.
1467 (update_debug_registers_callback): Likewise.
1468 (x86_linux_dr_set_addr): Likewise.
1469 (x86_linux_dr_get_addr): Likewise.
1470 (x86_linux_dr_set_control): Likewise.
1471 (x86_linux_dr_get_control): Likewise.
1472 (x86_linux_dr_get_status): Likewise.
1473 (x86_linux_prepare_to_resume): Likewise.
1474
14752015-03-24 Gary Benson <gbenson@redhat.com>
1476
1477 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1478 Use perror_with_name. Pass string through gettext.
1479 (x86_linux_dr_set): Likewise.
1480
14812015-03-24 Gary Benson <gbenson@redhat.com>
1482
1483 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1484 (x86_linux_dr_set_addr): ...this.
1485 (x86_dr_low_get_addr): Rename to...
1486 (x86_linux_dr_get_addr): ...this.
1487 (x86_dr_low_set_control): Rename to...
1488 (x86_linux_dr_set_control): ...this.
1489 (x86_dr_low_get_control): Rename to...
1490 (x86_linux_dr_get_control): ...this.
1491 (x86_dr_low_get_status): Rename to...
1492 (x86_linux_dr_get_status): ...this.
1493 (x86_dr_low): Update with new function names.
1494
14952015-03-24 Gary Benson <gbenson@redhat.com>
1496
1497 * Makefile.in (x86-linux.o): New rule.
1498 * configure.srv: Add x86-linux.o to relevant targets.
1499 * linux-low.c (lwp_set_arch_private_info): New function.
1500 (lwp_arch_private_info): Likewise.
1501 * linux-x86-low.c: Include nat/x86-linux.h.
1502 (arch_lwp_info): Removed structure.
1503 (update_debug_registers_callback):
1504 Use lwp_set_debug_registers_changed.
1505 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1506 and lwp_set_debug_registers_changed.
1507 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1508
15092015-03-24 Gary Benson <gbenson@redhat.com>
1510
1511 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1512 * linux-arm-low.c (arm_new_thread): Likewise.
1513 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1514 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1515 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1516 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1517
15182015-03-24 Gary Benson <gbenson@redhat.com>
1519
1520 * linux-low.c (ptid_of_lwp): New function.
1521 (lwp_is_stopped): Likewise.
1522 (lwp_stop_reason): Likewise.
1523 * linux-x86-low.c (update_debug_registers_callback):
1524 Use lwp_is_stopped.
1525 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1526 lwp_stop_reason.
1527
15282015-03-24 Gary Benson <gbenson@redhat.com>
1529
1530 * linux-low.h (linux_stop_lwp): Remove declaration.
1531
15322015-03-24 Gary Benson <gbenson@redhat.com>
1533
1534 * linux-low.h: Include nat/linux-nat.h.
1535 * linux-low.c (iterate_over_lwps_args): New structure.
1536 (iterate_over_lwps_filter): New function.
1537 (iterate_over_lwps): Likewise.
1538 * linux-x86-low.c (update_debug_registers_callback):
1539 Update signature to what iterate_over_lwps expects.
1540 Remove PID check that iterate_over_lwps now performs.
1541 (x86_dr_low_set_addr): Use iterate_over_lwps.
1542 (x86_dr_low_set_control): Likewise.
1543
15442015-03-24 Gary Benson <gbenson@redhat.com>
1545
1546 * linux-x86-low.c (x86_debug_reg_state): New function.
1547 (x86_linux_prepare_to_resume): Use the above.
1548
15492015-03-24 Gary Benson <gbenson@redhat.com>
1550
1551 * linux-low.c (current_lwp_ptid): New function.
1552 * linux-x86-low.c: Include nat/linux-nat.h.
1553 (x86_dr_low_get_addr): Use current_lwp_ptid.
1554 (x86_dr_low_get_control): Likewise.
1555 (x86_dr_low_get_status): Likewise.
1556
15572015-03-20 Pedro Alves <palves@redhat.com>
1558
1559 * tracepoint.c (cmd_qtstatus): Make "str" const.
1560
15612015-03-20 Pedro Alves <palves@redhat.com>
1562
1563 * server.c (handle_general_set): Make "req_str" const.
1564
15652015-03-19 Pedro Alves <palves@redhat.com>
1566
1567 * linux-low.c (linux_resume_one_lwp): Rename to ...
1568 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1569 instead call perror_with_name.
1570 (check_ptrace_stopped_lwp_gone): New function.
1571 (linux_resume_one_lwp): Reimplement as wrapper around
1572 linux_resume_one_lwp_throw that swallows errors if the LWP is
1573 gone.
1574
15752015-03-19 Pedro Alves <palves@redhat.com>
1576
1577 * linux-low.c (count_events_callback, select_event_lwp_callback):
1578 No longer check whether the thread has resume_stop as last resume
1579 kind.
1580
15812015-03-19 Pedro Alves <palves@redhat.com>
1582
1583 * linux-low.c (count_events_callback, select_event_lwp_callback):
1584 Use the lwp's status_pending_p field, not the thread's.
1585
15862015-03-19 Pedro Alves <palves@redhat.com>
1587
1588 * linux-low.c (select_event_lwp_callback): Update comments to
1589 no longer mention SIGTRAP.
1590
15912015-03-18 Gary Benson <gbenson@redhat.com>
1592
1593 * server.c (handle_query): Do not report vFile:fstat as supported.
1594
15952015-03-11 Gary Benson <gbenson@redhat.com>
1596
1597 * hostio.c (sys/types.h): New include.
1598 (sys/stat.h): Likewise.
1599 (common-remote-fileio.h): Likewise.
1600 (handle_fstat): New function.
1601 (handle_vFile): Handle vFile:fstat packets.
1602
16032015-03-11 Gary Benson <gbenson@redhat.com>
1604
1605 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1606 struct stat.st_blocks and struct stat.st_blksize.
1607 * configure: Regenerate.
1608 * config.in: Likewise.
1609 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1610 (OBS): Add common-remote-fileio.o.
1611 (common-remote-fileio.o): New rule.
1612
16132015-03-09 Pedro Alves <palves@redhat.com>
1614
1615 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1616 'struct sockaddr' pointer in 'accept' call.
1617
16182015-03-09 Pedro Alves <palves@redhat.com>
1619
1620 Revert:
1621 2015-03-07 Pedro Alves <palves@redhat.com>
1622 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1623 or <winsock2.h> here. Instead include "gdb_socket.h".
1624 (remote_open): Use union gdb_sockaddr_u.
1625 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1626 or <winsock2.h> here. Instead include "gdb_socket.h".
1627 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1628 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1629 or <sys/un.h>.
1630 (init_named_socket, gdb_agent_helper_thread): Use union
1631 gdb_sockaddr_u.
1632
16332015-03-07 Pedro Alves <palves@redhat.com>
1634
1635 * configure.ac (build_warnings): Move
1636 -Wdeclaration-after-statement to the C-specific set.
1637 * configure: Regenerate.
1638
16392015-03-07 Pedro Alves <palves@redhat.com>
1640
1641 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1642 or <winsock2.h> here. Instead include "gdb_socket.h".
1643 (remote_open): Use union gdb_sockaddr_u.
1644 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1645 or <winsock2.h> here. Instead include "gdb_socket.h".
1646 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1647 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1648 or <sys/un.h>.
1649 (init_named_socket, gdb_agent_helper_thread): Use union
1650 gdb_sockaddr_u.
1651
16522015-03-07 Pedro Alves <palves@redhat.com>
1653
1654 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1655 instead.
1656
16572015-03-06 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-aarch64-low.c (aarch64_insert_point): Use
1660 show_debug_regs as a boolean.
1661 (aarch64_remove_point): Likewise.
1662
16632015-03-05 Pedro Alves <palves@redhat.com>
1664
1665 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1666 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1667 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1668 * nto-low.c (nto_target_ops): Likewise.
1669 * spu-low.c (spu_target_ops): Likewise.
1670 * win32-low.c (win32_target_ops): Likewise.
1671
16722015-03-04 Pedro Alves <palves@redhat.com>
1673
1674 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1675 Decide whether a breakpoint triggered based on the SIGTRAP's
1676 siginfo.si_code.
1677 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1678 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1679 (linux_low_filter_event): Check for breakpoints before checking
1680 watchpoints.
1681 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1682 siginfo.si_code.
1683 (linux_stopped_by_sw_breakpoint)
1684 (linux_supports_stopped_by_sw_breakpoint)
1685 (linux_stopped_by_hw_breakpoint)
1686 (linux_supports_stopped_by_hw_breakpoint): New functions.
1687 (linux_target_ops): Install new target methods.
1688
16892015-03-04 Pedro Alves <palves@redhat.com>
1690
1691 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1692 * server.c (swbreak_feature, hwbreak_feature): New globals.
1693 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1694 (captured_main): Clear swbreak_feature and hwbreak_feature.
1695 * server.h (swbreak_feature, hwbreak_feature): Declare.
1696 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1697 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1698 supports_stopped_by_hw_breakpoint>: New fields.
1699 (target_supports_stopped_by_sw_breakpoint)
1700 (target_stopped_by_sw_breakpoint)
1701 (target_supports_stopped_by_hw_breakpoint)
1702 (target_stopped_by_hw_breakpoint): Declare.
1703
17042015-03-04 Pedro Alves <palves@redhat.com>
1705
1706 enum lwp_stop_reason -> enum target_stop_reason
1707 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1708 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1709 (linux_wait_1, stuck_in_jump_pad_callback)
1710 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1711 (linux_stopped_by_watchpoint):
1712 * linux-low.h (enum lwp_stop_reason): Delete.
1713 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1714 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1715
17162015-03-04 Yao Qi <yao.qi@linaro.org>
1717
1718 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1719
17202015-03-03 Gary Benson <gbenson@redhat.com>
1721
1722 * hostio.c (handle_vFile): Fix prefix lengths.
1723
17242015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1725
1726 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1727 ptr_bits.
1728
17292015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1730
1731 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1732 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1733 (clean): Add "rm -f" for above C files.
1734 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1735 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1736 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1737 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1738 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1739 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1740 (init_registers_s390x_vx_linux64)
1741 (init_registers_s390x_tevx_linux64)
1742 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1743 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1744 declarations.
1745 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1746 (s390_store_vxrs_high): New functions.
1747 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1748 NT_S390_VXRS_HIGH.
1749 (s390_arch_setup): Add logic for selecting one of the new target
1750 descriptions. Activate the new vector regsets if applicable.
1751 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1752 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1753 and init_registers_s390x_tevx_linux64.
1754
17552015-03-01 Pedro Alves <palves@redhat.com>
1756
1757 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1758 parameter.
1759
17602015-02-27 Pedro Alves <palves@redhat.com>
1761
1762 * linux-x86-low.c (u_debugreg_offset): New function.
1763 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1764
17652015-02-27 Pedro Alves <palves@redhat.com>
1766
1767 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1768 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1769 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1770 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1771 (ps_lsetfpregs, ps_getpid)
1772 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1773 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1774 (ps_lsetxregs, ps_plog): Declare.
1775
17762015-02-27 Pedro Alves <palves@redhat.com>
1777
1778 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1779 IP_AGENT_EXPORT_FUNC.
1780 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1781 IP_AGENT_EXPORT_FUNC.
1782 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1783 (IP_AGENT_EXPORT): Delete.
1784 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1785 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1786 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1787 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1788 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1789 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1790 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1791 (traceframe_read_count, traceframe_write_count)
1792 (traceframes_created, trace_state_variables, get_raw_reg)
1793 (get_trace_state_variable_value, set_trace_state_variable_value)
1794 (ust_loaded, helper_thread_id, cmd_buf): Use
1795 IPA_SYM_EXPORTED_NAME.
1796 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1797 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1798 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1799 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1800 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1801 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1802 EXTERN_C_PUSH/EXTERN_C_POP.
1803 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1804 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1805 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1806 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1807 (traceframe_write_count, traceframe_read_count)
1808 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1809 (about_to_request_buffer_space, get_trace_state_variable_value)
1810 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1811 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1812 EXTERN_C_PUSH/EXTERN_C_POP.
1813 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1814 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1815 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1816 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1817 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1818 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1819 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1820 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1821 Define.
1822 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1823 (IP_AGENT_EXPORT_VAR_DECL): Define.
1824 (tracing): Declare.
1825 (gdb_agent_get_raw_reg): Declare.
1826
18272015-02-27 Tom Tromey <tromey@redhat.com>
1828 Pedro Alves <palves@redhat.com>
1829
1830 Rename symbols whose names are reserved C++ keywords throughout.
1831
18322015-02-27 Pedro Alves <palves@redhat.com>
1833
1834 * Makefile.in (COMPILER): New, get it from autoconf.
1835 (CXX): Get from autoconf instead.
1836 (COMPILE.pre): Use COMPILER.
1837 (CC-LD): Rename to ...
1838 (CC_LD): ... this. Use COMPILER.
1839 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1840 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1841 * acinclude.m4: Include build-with-cxx.m4.
1842 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1843 Disable -Werror by default if building in C++ mode.
1844 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1845 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1846 the C++ compiler. Save/restore CXXFLAGS too.
1847 * configure: Regenerate.
1848
18492015-02-27 Pedro Alves <palves@redhat.com>
1850
1851 * acinclude.m4: Include libiberty.m4.
1852 * configure.ac: Call libiberty_INIT.
1853 * config.in, configure: Regenerate.
1854
18552015-02-26 Pedro Alves <palves@redhat.com>
1856
1857 * linux-low.c (linux_wait_1): When incrementing the PC past a
1858 program breakpoint always use the_low_target.breakpoint_len as
1859 increment, rather than the maximum between that and
1860 the_low_target.decr_pc_after_break.
1861
18622015-02-23 Pedro Alves <palves@redhat.com>
1863
1864 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1865 thread was doing a step-over; always adjust the PC if
1866 we stepped over a permanent breakpoint.
1867 (linux_wait_1): If we stepped over breakpoint that was on top of a
1868 permanent breakpoint, manually advance the PC past it.
1869
18702015-02-23 Pedro Alves <palves@redhat.com>
1871
1872 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1873 modes.
1874 (x86_fill_gregset, x86_store_gregset): Use it when handling
1875 $orig_eax.
1876
18772015-02-20 Pedro Alves <palves@redhat.com>
1878
1879 * thread-db.c: Include "nat/linux-procfs.h".
1880 (thread_db_init): Skip listing new threads if the kernel supports
1881 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1882
18832015-02-20 Pedro Alves <palves@redhat.com>
1884
1885 * linux-low.c (status_pending_p_callback): Use ptid_match.
1886
18872015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1888
1889 PR breakpoints/16812
1890 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1891 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1892 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1893
18942015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1895
1896 PR breakpoints/15956
1897 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1898
18992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1900
1901 * linux-low.c (linux_low_btrace_conf): Print size.
1902 * server.c (handle_btrace_conf_general_set): New.
1903 (hanle_general_set): Call handle_btrace_conf_general_set.
1904 (handle_query): Report Qbtrace-conf:bts:size as supported.
1905
19062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1907
1908 * linux-low.c (linux_low_enable_btrace): Update parameters.
1909 (linux_low_btrace_conf): New.
1910 (linux_target_ops)<to_btrace_conf>: Initialize.
1911 * server.c (current_btrace_conf): New.
1912 (handle_btrace_enable): Rename to ...
1913 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1914 to target_enable_btrace. Update comment. Update users.
1915 (handle_qxfer_btrace_conf): New.
1916 (qxfer_packets): Add btrace-conf entry.
1917 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1918 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1919 (target_ops)<read_btrace_conf>: New.
1920 (target_enable_btrace): Update parameters.
1921 (target_read_btrace_conf): New.
1922
19232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1924
1925 * server.c (handle_btrace_general_set): Remove call to
1926 target_supports_btrace.
1927 (supported_btrace_packets): New.
1928 (handle_query): Call supported_btrace_packets.
1929 * target.h: include btrace-common.h.
1930 (btrace_target_info): Removed.
1931 (supports_btrace, target_supports_btrace): Update parameters.
1932
19332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1934
1935 * Makefile.in (SFILES): Add common/btrace-common.c.
1936 (OBS): Add common/btrace-common.o.
1937 (btrace-common.o): Add build rules.
1938 * linux-low: Include btrace-common.h.
1939 (linux_low_read_btrace): Use struct btrace_data. Call
1940 btrace_data_init and btrace_data_fini.
1941
19422015-02-06 Pedro Alves <palves@redhat.com>
1943
1944 * thread-db.c (find_new_threads_callback): Add debug output.
1945
19462015-02-04 Pedro Alves <palves@redhat.com>
1947
1948 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1949 (resume_stopped_resumed_lwps): New function.
1950 (linux_wait_for_event_filtered): Use it.
1951
19522015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1953
1954 * Makefile.in (SFILES): Add linux-personality.c.
1955 (linux-personality.o): New rule.
1956 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1957 list of objects to be built.
1958 * linux-low.c: Include nat/linux-personality.h.
1959 (linux_create_inferior): Remove code to disable address space
1960 randomization (moved to ../nat/linux-personality.c). Create
1961 cleanup to disable address space randomization.
1962
19632015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1964
1965 * Makefile.in (posix-strerror.o): New rule.
1966 (mingw-strerror.o): Likewise.
1967 * configure: Regenerated.
1968 * configure.ac: Source file ../common/common.host. Initialize new
1969 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1970
19712015-01-14 Yao Qi <yao@codesourcery.com>
1972
1973 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1974 (ppc-linux.o): New rule.
1975 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1976 * configure.ac: AC_CHECK_FUNCS(getauxval).
1977 * config.in: Re-generated.
1978 * configure: Re-generated.
1979 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1980 ppc64_64bit_inferior_p
1981
19822015-01-14 Yao Qi <yao@codesourcery.com>
1983
1984 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1985 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1986 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1987 (PT_ORIG_R3, PT_TRAP): Likewise.
1988 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1989 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1990 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1991
19922015-01-10 Joel Brobecker <brobecker@adacore.com>
1993
1994 * i387-fp.c (i387_cache_to_xsave): In look over
1995 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1996 zmmh_low_space field by use of zmmh_high_space.
1997
19982015-01-09 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (step_over_bkpt): Move higher up in the file.
2001 (handle_extended_wait): Don't store the stop_pc here.
2002 (get_stop_pc): Adjust comments and rename to ...
2003 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2004 stopped for a software breakpoint or hardware breakpoint.
2005 (thread_still_has_status_pending_p): New function.
2006 (status_pending_p_callback): Use
2007 thread_still_has_status_pending_p. If the event is no longer
2008 interesting, resume the LWP.
2009 (handle_tracepoints): Add assert.
2010 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2011 (wstatus_maybe_breakpoint): New function.
2012 (cancel_breakpoint): Delete function.
2013 (check_stopped_by_watchpoint): New function, factored out from
2014 linux_low_filter_event.
2015 (lp_status_maybe_breakpoint): Delete function.
2016 (linux_low_filter_event): Remove filter_ptid argument.
2017 Leave thread group exits pending here. Store the LWP's stop PC.
2018 Always leave events pending.
2019 (linux_wait_for_event_filtered): Pull all events out of the
2020 kernel, and leave them all pending.
2021 (count_events_callback, select_event_lwp_callback): Consider all
2022 events.
2023 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2024 (select_event_lwp): Only give preference to the stepping LWP in
2025 all-stop mode. Adjust comments.
2026 (ignore_event): New function.
2027 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2028 references to cancel_breakpoints. Adjust to renames. Also give
2029 equal priority to all LWPs that have had events in non-stop mode.
2030 If reporting a software breakpoint event, unadjust the LWP's PC.
2031 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2032 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2033 Adjust.
2034 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2035 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2036 (linux_stopped_by_watchpoint): Adjust.
2037 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2038 * linux-low.h (enum lwp_stop_reason): New.
2039 (struct lwp_info) <stop_pc>: Adjust comment.
2040 <stopped_by_watchpoint>: Delete field.
2041 <stop_reason>: New field.
2042 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2043 * mem-break.c (software_breakpoint_inserted_here)
2044 (hardware_breakpoint_inserted_here): New function.
2045 * mem-break.h (software_breakpoint_inserted_here)
2046 (hardware_breakpoint_inserted_here): Declare.
2047 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2048 (cancel_breakpoints): Delete.
2049 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2050 (upload_fast_traceframes): Remove references to
2051 cancel_breakpoints.
2052
20532015-01-09 Pedro Alves <palves@redhat.com>
2054
2055 * thread-db.c (find_new_threads_callback): Ignore thread if the
2056 kernel thread ID is -1.
2057
20582015-01-09 Pedro Alves <palves@redhat.com>
2059
2060 * linux-low.c (linux_attach_fail_reason_string): Move to
2061 nat/linux-ptrace.c, and rename.
2062 (linux_attach_lwp): Update comment.
2063 (attach_proc_task_lwp_callback): New function.
2064 (linux_attach): Adjust to rename and use
2065 linux_proc_attach_tgid_threads.
2066 (linux_attach_fail_reason_string): Delete declaration.
2067
20682015-01-01 Joel Brobecker <brobecker@adacore.com>
2069
2070 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2071 * server.c (gdbserver_version): Likewise.
2072
20732014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2074
2075 * remote-utils.c: Include ctype.h.
2076 (input_interrupt): Explicitly handle the case when the char
2077 received is the NUL byte. Improve the printing of non-ASCII
2078 characters.
2079
20802014-12-16 Joel Brobecker <brobecker@adacore.com>
2081
2082 * linux-low.c (linux_low_filter_event): Update call to
2083 linux_enable_event_reporting following the addition of
2084 a new parameter to that function.
2085
20862014-12-16 Catalin Udma <catalin.udma@freescale.com>
2087
2088 PR server/17457
2089 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2090 (AARCH64_FPCR_REGNO): Likewise.
2091 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2092 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2093 (aarch64_store_fpregset): Likewise.
2094
20952014-12-15 Joel Brobecker <brobecker@adacore.com>
2096
2097 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2098 Remove FIXME comment about assumption about N.
2099
21002014-12-13 Joel Brobecker <brobecker@adacore.com>
2101
2102 * configure.ac: If large-file support is disabled in GDBserver,
2103 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2104 * configure: Regenerate.
2105
21062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2107
2108 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2109 warning upon ENODATA from ptrace.
2110 * linux-s390-low.c (s390_store_tdb): New.
2111 (s390_regsets): Add regset for NT_S390_TDB.
2112
21132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2114
2115 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2116 without a fill_function.
2117 * linux-s390-low.c (s390_fill_last_break): Remove.
2118 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2119 (s390_arch_setup): Use regset's size instead of fill_function for
2120 loop end condition.
2121
21222014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2123
2124 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2125 the regset's store function when ptrace returned an error.
2126 * regcache.c (get_thread_regcache): Invalidate register cache
2127 before fetching inferior's registers.
2128
21292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2130
2131 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2132 while-loop as for-loop.
2133 (regsets_store_inferior_registers): Likewise.
2134
21352014-11-28 Yao Qi <yao@codesourcery.com>
2136
2137 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2138 * config.in, configure: Re-generate.
2139 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2140 is defined.
2141
21422014-11-21 Yao Qi <yao@codesourcery.com>
2143
2144 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2145 (AC_CHECK_HEADERS): Remove malloc.h.
2146 * configure: Re-generated.
2147 * config.in: Re-generated.
2148 * server.h: Don't include alloca.h and malloc.h.
2149 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2150 Don't include malloc.h.
2151
21522014-11-17 Joel Brobecker <brobecker@adacore.com>
2153
2154 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2155 corresponding ERRNO check in same block.
2156
21572014-11-12 Pedro Alves <palves@redhat.com>
2158
2159 * server.c (cont_thread): Update comment.
2160 (start_inferior, attach_inferior): No longer clear cont_thread.
2161 (handle_v_cont): No longer set cont_thread.
2162 (captured_main): Clear cont_thread each time a GDB connects.
2163
21642014-11-12 Pedro Alves <palves@redhat.com>
2165
2166 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2167 thread, and don't resume all threads if the Hc thread has exited.
2168
21692014-11-12 Pedro Alves <palves@redhat.com>
2170
2171 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2172 the process group instead of to a specific LWP.
2173
21742014-10-15 Pedro Alves <palves@redhat.com>
2175
2176 PR server/17487
2177 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2178 parameter.
2179 (arm_set_thread_context): Delete.
2180 (the_low_target): Adjust.
2181 * win32-i386-low.c (debug_registers_changed)
2182 (debug_registers_used): Delete.
2183 (update_debug_registers_callback): New function.
2184 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2185 needing to update their debug registers.
2186 (win32_get_current_dr): New function.
2187 (x86_dr_low_get_addr, x86_dr_low_get_control)
2188 (x86_dr_low_get_status): Fetch the debug register from the thread
2189 record's context.
2190 (i386_initial_stuff): Adjust.
2191 (i386_get_thread_context): Remove current_event parameter. Don't
2192 clear debug_registers_changed nor copy DR values to
2193 debug_reg_state.
2194 (i386_set_thread_context): Delete.
2195 (i386_prepare_to_resume): New function.
2196 (i386_thread_added): Mark the thread as needing to update irs
2197 debug registers.
2198 (the_low_target): Remove i386_set_thread_context and install
2199 i386_prepare_to_resume.
2200 * win32-low.c (win32_get_thread_context): Adjust.
2201 (win32_set_thread_context): Use SetThreadContext
2202 directly.
2203 (win32_prepare_to_resume): New function.
2204 (win32_require_context): New function, factored out from ...
2205 (thread_rec): ... this.
2206 (continue_one_thread): Call win32_prepare_to_resume on each thread
2207 we're about to continue.
2208 (win32_resume): Call win32_prepare_to_resume on the event thread.
2209 * win32-low.h (struct win32_thread_info)
2210 <debug_registers_changed>: New field.
2211 (struct win32_target_ops): Change prototype of set_thread_context,
2212 delete set_thread_context and add prepare_to_resume.
2213 (win32_require_context): New declaration.
2214
22152014-10-08 Gary Benson <gbenson@redhat.com>
2216
2217 * server.h: Do not include common-exceptions.h.
2218
22192014-10-08 Gary Benson <gbenson@redhat.com>
2220
2221 * server.h: Do not include cleanups.h.
2222
22232014-09-30 James Hogan <james.hogan@imgtec.com>
2224
2225 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2226 mips64-dsp-linux.c.
2227
22282014-09-23 Yao Qi <yao@codesourcery.com>
2229
2230 * linux-low.c (lp_status_maybe_breakpoint): New function.
2231 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2232 (count_events_callback): Likewise.
2233 (select_event_lwp_callback): Likewise.
2234 (cancel_breakpoints_callback): Likewise.
2235
22362014-09-19 Don Breazeal <donb@codesourcery.com>
2237
2238 * linux-low.c (handle_extended_wait): Call
2239 linux_ptrace_get_extended_event.
2240 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2241 linux_is_extended_waitstatus.
2242
22432014-09-16 Joel Brobecker <brobecker@adacore.com>
2244
2245 * Makefile.in (CPPFLAGS): Define.
2246 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2247 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2248
22492014-09-16 Gary Benson <gbenson@redhat.com>
2250
2251 * inferiors.h (current_inferior): Renamed as...
2252 (current_thread): New variable. All uses updated.
2253 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2254 (maybe_move_out_of_jump_pad): Likewise.
2255 (cancel_breakpoint): Likewise.
2256 (linux_low_filter_event): Likewise.
2257 (wait_for_sigstop): Likewise.
2258 (linux_resume_one_lwp): Likewise.
2259 (need_step_over_p): Likewise.
2260 (start_step_over): Likewise.
2261 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2262 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2263 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2264 and save_inferior as saved_thread.
2265 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2266 saved_thread.
2267 (regcache_invalidate_thread): Likewise.
2268 * remote-utils.c (prepare_resume_reply): Likewise.
2269 * thread-db.c (thread_db_get_tls_address): Likewise.
2270 (disable_thread_event_reporting): Likewise.
2271 (remove_thread_event_breakpoints): Likewise.
2272 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2273 as saved_thread.
2274 * target.h (set_desired_inferior): Renamed as...
2275 (set_desired_thread): New declaration. All uses updated.
2276 * server.c (myresume): Updated comment to reference thread instead
2277 of inferior.
2278 (handle_serial_event): Likewise.
2279 (handle_target_event): Likewise.
2280
22812014-09-12 Tom Tromey <tromey@redhat.com>
2282 Gary Benson <gbenson@redhat.com>
2283
2284 * regcache.h: Include common-regcache.h.
2285 (regcache_read_pc): Don't declare.
2286 * regcache.c (get_thread_regcache_for_ptid): New function.
2287
22882014-09-11 Tom Tromey <tromey@redhat.com>
2289 Gary Benson <gbenson@redhat.com>
2290
2291 * symbol.c: New file.
2292 * Makefile.in (SFILES): Add symbol.c.
2293 (OBS): Add symbol.o.
2294
22952014-09-11 Gary Benson <gbenson@redhat.com>
2296
2297 * target.c (target_stop_ptid, target_continue_ptid): New
2298 functions.
2299
23002014-09-11 Tom Tromey <tromey@redhat.com>
2301 Gary Benson <gbenson@redhat.com>
2302
2303 * target.h: Include target/target.h.
2304 * target.c (target_read_memory, target_read_uint32)
2305 (target_write_memory): New functions.
2306
23072014-09-11 Gary Benson <gbenson@redhat.com>
2308
2309 * server.h (debug_hw_points): Don't declare.
2310 * server.c (debug_hw_points): Don't define. Replace all uses
2311 with show_debug_regs.
2312 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2313 all uses with show_debug_regs.
2314
23152014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2316
2317 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2318 endianness into account.
2319 (ppc_supply_ptrace_register): Likewise.
2320
23212014-09-03 James Hogan <james.hogan@imgtec.com>
2322
2323 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2324 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2325
23262014-09-03 Gary Benson <gbenson@redhat.com>
2327
2328 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2329 ALL_DEBUG_ADDRESS_REGISTERS.
2330
23312014-09-02 Gary Benson <gbenson@redhat.com>
2332
2333 * i386-low.h: Renamed as...
2334 * x86-low.h: New file. All type, function and variable name
2335 prefixes changed from "i386_" to "x86_". All references updated.
2336 * i386-low.c: Renamed as...
2337 * x86-low.c: New file. All type, function and variable name
2338 prefixes changed from "i386_" to "x86_". All references updated.
2339
23402014-09-02 Gary Benson <gbenson@redhat.com>
2341
2342 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2343 (x86_linux_new_thread): Likewise.
2344
23452014-08-29 Gary Benson <gbenson@redhat.com>
2346
2347 * server.h (setjmp.h): Do not include.
2348 (toplevel): Do not declare.
2349 (common-exceptions.h): Include.
2350 (cleanups.h): Likewise.
2351 * server.c (toplevel): Do not define.
2352 (exit_code): New static global.
2353 (detach_or_kill_for_exit_cleanup): New function.
2354 (main): New function. Original main renamed to...
2355 (captured_main): New function.
2356 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2357
23582014-08-29 Gary Benson <gbenson@redhat.com>
2359
2360 * Makefile.in (SFILES): Add common/common-exceptions.c.
2361 (OBS): Add common-exceptions.o.
2362 (common-exceptions.o): New rule.
2363 * utils.c (prepare_to_throw_exception): New function.
2364
23652014-08-29 Gary Benson <gbenson@redhat.com>
2366
2367 * config.in: Regenerate.
2368 * configure: Likewise.
2369
23702014-08-29 Gary Benson <gbenson@redhat.com>
2371
2372 * Makefile.in (SFILES): Add common/cleanups.c.
2373 (OBS): cleanups.o.
2374 (cleanups.o): New rule.
2375
23762014-08-29 Gary Benson <gbenson@redhat.com>
2377
2378 * utils.c (internal_vwarning): New function.
2379
23802014-08-28 Gary Benson <gbenson@redhat.com>
2381
2382 * utils.h (fatal): Remove declaration.
2383 * utils.c (fatal): Remove function.
2384
23852014-08-28 Gary Benson <gbenson@redhat.com>
2386
2387 * tracepoint.c (gdb_agent_init): Replace fatal with
2388 perror_with_name.
2389 (initialize_tracepoint): Likewise.
2390
23912014-08-28 Gary Benson <gbenson@redhat.com>
2392
2393 * remote-utils.c (remote_prepare): Replace fatal with error.
2394
23952014-08-28 Gary Benson <gbenson@redhat.com>
2396
2397 * linux-low.c (linux_async): Replace fatal with warning.
2398 Tidy up and return.
2399 (linux_start_non_stop): Return -1 if linux_async failed.
2400
24012014-08-28 Gary Benson <gbenson@redhat.com>
2402
2403 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2404 gdb_assert.
2405 (i386_dr_low_get_addr): Remove vague comment.
2406 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2407 gdb_assert.
2408
24092014-08-28 Gary Benson <gbenson@redhat.com>
2410
2411 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2412 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2413 internal_error.
2414 (linux_resume_one_lwp): Likewise.
2415 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2416 gdb_assert.
2417 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2418 with internal_error.
2419 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2420 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2421 (find_register_by_name): Replace fatal with internal_error.
2422 (find_regno): Likewise.
2423 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2424 * thread-db.c (thread_db_create_event): Likewise.
2425 (thread_db_load_search): Likewise.
2426 (try_thread_db_load_1): Likewise.
2427 * tracepoint.c (get_jump_space_head): Replace fatal with
2428 internal_error.
2429 (claim_trampoline_space): Likewise.
2430 (have_fast_tracepoint_trampoline_buffer): Likewise.
2431 (cmd_qtstart): Likewise.
2432 (stop_tracing): Likewise.
2433 (fast_tracepoint_collecting): Likewise.
2434 (target_malloc): Likewise.
2435 (download_tracepoint): Likewise.
2436 (download_trace_state_variables): Replace check with gdb_assert.
2437 (upload_fast_traceframes): Replace fatal with internal_error.
2438
24392014-08-19 Tom Tromey <tromey@redhat.com>
2440 Gary Benson <gbenson@redhat.com>
2441
2442 * Makefile.in (SFILES): Add common/common-debug.c.
2443 (OBS): Add common-debug.o.
2444 (common-debug.o): New rule.
2445 * debug.h (debug_printf): Don't declare.
2446 * debug.c (debug_printf): Renamed and rewritten as...
2447 (debug_vprintf): New function.
2448
24492014-08-19 Gary Benson <gbenson@redhat.com>
2450
2451 * utils.h: Do not include print-utils.h.
2452
24532014-08-19 Tom Tromey <tromey@redhat.com>
2454 Gary Benson <gbenson@redhat.com>
2455
2456 * server.h: Add static assertion.
2457 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2458
24592014-08-19 Tom Tromey <tromey@redhat.com>
2460 Gary Benson <gbenson@redhat.com>
2461
2462 * Makefile.in (SFILES): Add common/errors.c.
2463 (OBS): Add errors.o.
2464 (IPA_OBS): Add errors-ipa.o.
2465 (errors.o): New rule.
2466 (errors-ipa.o): Likewise.
2467 * utils.h (perror_with_name, error, warning): Don't declare.
2468 * utils.c (warning): Renamed and rewritten as...
2469 (vwarning): New function.
2470 (error): Renamed and rewritten as...
2471 (verror): New function.
2472 (internal_error): Renamed and rewritten as...
2473 (internal_verror): New function.
2474
24752014-08-07 Gary Benson <gbenson@redhat.com>
2476
2477 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2478 * configure: Regenerate.
2479 * config.in: Likewise.
2480 * server.h: Do not include errno.h.
2481 * event-loop.c: Likewise.
2482 * hostio-errno.c: Likewise.
2483 * linux-low.c: Likewise.
2484 * remote-utils.c: Likewise.
2485 * spu-low.c: Likewise.
2486 * utils.c: Likewise.
2487 * gdbreplay.c: Unconditionally include errno.h.
2488
24892014-08-07 Gary Benson <gbenson@redhat.com>
2490
2491 * server.h: Do not include string.h.
2492 * event-loop.c: Likewise.
2493 * linux-low.c: Likewise.
2494 * regcache.c: Likewise.
2495 * remote-utils.c: Likewise.
2496 * spu-low.c: Likewise.
2497 * utils.c: Likewise.
2498
24992014-08-07 Gary Benson <gbenson@redhat.com>
2500
2501 * server.h: Do not include gdb_assert.h.
2502
25032014-08-07 Gary Benson <gbenson@redhat.com>
2504
2505 * server.h: Do not include common-utils.h.
2506
25072014-08-07 Gary Benson <gbenson@redhat.com>
2508
2509 * server.h: Do not include ptid.h.
2510 * notif.h: Likewise.
2511
25122014-08-07 Gary Benson <gbenson@redhat.com>
2513
2514 * server.h: Do not include gdb_locale.h.
2515
25162014-08-07 Gary Benson <gbenson@redhat.com>
2517
2518 * server.h: Do not include gdb/signals.h.
2519 * win32-low.c: Likewise.
2520
25212014-08-07 Gary Benson <gbenson@redhat.com>
2522
2523 * server.h: Do not include pathmax.h.
2524
25252014-08-07 Gary Benson <gbenson@redhat.com>
2526
2527 * server.h: Do not include libiberty.h.
2528 * linux-bfin-low.c: Likewise.
2529
25302014-08-07 Gary Benson <gbenson@redhat.com>
2531
2532 * server.h: Do not include ansidecl.h.
2533
25342014-08-07 Gary Benson <gbenson@redhat.com>
2535
2536 * linux-x86-low.c: Do not include stddef.h.
2537 * lynx-ppc-low.c: Likewise.
2538 * tracepoint.c: Likewise.
2539
25402014-08-07 Gary Benson <gbenson@redhat.com>
2541
2542 * server.h: Do not include stdarg.h.
2543 * nto-low.c: Likewise.
2544
25452014-08-07 Gary Benson <gbenson@redhat.com>
2546
2547 * server.h: Do not include stdlib.h.
2548 * inferiors.c: Likewise.
2549 * linux-low.c: Likewise.
2550 * regcache.c: Likewise.
2551 * spu-low.c: Likewise.
2552 * tracepoint.c: Likewise.
2553 * utils.c: Likewise.
2554
25552014-08-07 Gary Benson <gbenson@redhat.com>
2556
2557 * server.h: Do not include stdio.h.
2558 * linux-low.c: Likewise.
2559 * remote-utils.c: Likewise.
2560 * spu-low.c: Likewise.
2561 * utils.c: Likewise.
2562 * wincecompat.c: Likewise.
2563
25642014-08-06 Gary Benson <gbenson@redhat.com>
2565
2566 * regcache.c (init_register_cache): Move conditionals inside if.
2567
25682014-08-06 Gary Benson <gbenson@redhat.com>
2569
2570 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2571
25722014-07-31 Gary Benson <gbenson@redhat.com>
2573
2574 * ax.h: Do not include server.h.
2575 * gdbthread.h: Likewise.
2576 * lynx-low.h: Likewise.
2577 * notif.h: Likewise.
2578
25792014-07-30 Gary Benson <gbenson@redhat.com>
2580
2581 * server.h: Include common-defs.h.
2582 Do not include config.h or build-gnulib-gdbserver/config.h.
2583
25842014-07-30 Gary Benson <gbenson@redhat.com>
2585
2586 * hostio-errno.c: Move server.h to top of includes list.
2587 * inferiors.c: Likewise.
2588 * linux-x86-low.c: Likewise.
2589 * notif.c: Include server.h.
2590
25912014-07-24 Tom Tromey <tromey@redhat.com>
2592 Gary Benson <gbenson@redhat.com>
2593
2594 * server.h (CORE_ADDR): Now unsigned.
2595
25962014-07-16 Pedro Alves <palves@redhat.com>
2597
2598 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2599
26002014-07-15 Pedro Alves <palves@redhat.com>
2601
2602 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2603 copy.
2604
26052014-07-11 Pedro Alves <palves@redhat.com>
2606
2607 * linux-low.c (kill_wait_lwp): New function, based on
2608 kill_one_lwp_callback, but use my_waitpid directly.
2609 (kill_one_lwp_callback, linux_kill): Use it.
2610
26112014-06-23 Pedro Alves <palves@redhat.com>
2612
2613 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2614 before setting DR0..DR3.
2615
26162014-06-20 Gary Benson <gbenson@redhat.com>
2617
2618 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2619 * configure: Regenerated.
2620 * config.in: Likewise.
2621
26222014-06-20 Gary Benson <gbenson@redhat.com>
2623
2624 * Makefile.in (SFILES): Update locations for files moved
2625 from common to nat.
2626 (object file files): Reordered.
2627
26282014-06-20 Gary Benson <gbenson@redhat.com>
2629
2630 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2631 (i386_dr_low_set_addr): Likewise.
2632 (i386_dr_low_get_addr): Likewise.
2633 (i386_dr_low_can_set_control): Likewise.
2634 (i386_dr_low_set_control): Likewise.
2635 (i386_dr_low_get_control): Likewise.
2636 (i386_dr_low_get_status): Likewise.
2637 (i386_get_debug_register_length): Likewise.
2638 * linux-x86-low.c (i386_dr_low_set_addr):
2639 Changed signature. Made static.
2640 (i386_dr_low_get_addr): Likewise.
2641 (i386_dr_low_set_control): Likewise.
2642 (i386_dr_low_get_control): Likewise.
2643 (i386_dr_low_get_status): Likewise.
2644 (i386_dr_low): New global variable.
2645 * win32-i386-low.c (i386_dr_low_set_addr):
2646 Changed signature. Made static.
2647 (i386_dr_low_get_addr): Likewise.
2648 (i386_dr_low_set_control): Likewise.
2649 (i386_dr_low_get_control): Likewise.
2650 (i386_dr_low_get_status): Likewise.
2651 (i386_dr_low): New global variable.
2652
26532014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2654
2655 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2656 * Makefile.in (AR, AR_FLAGS): Define.
2657 * configure: Regenerate.
2658
26592014-06-19 Gary Benson <gbenson@redhat.com>
2660
2661 * Makefile.in (i386-dregs.o): New rule.
2662 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2663 * i386-low.c (target.h): Remove include.
2664 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2665 (DR_CONTROL_SHIFT): Likewise.
2666 (DR_CONTROL_SIZE): Likewise.
2667 (DR_RW_EXECUTE): Likewise.
2668 (DR_RW_WRITE): Likewise.
2669 (DR_RW_READ): Likewise.
2670 (DR_RW_IORW): Likewise.
2671 (DR_LEN_1): Likewise.
2672 (DR_LEN_2): Likewise.
2673 (DR_LEN_4): Likewise.
2674 (DR_LEN_8): Likewise.
2675 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2676 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2677 (DR_ENABLE_SIZE): Likewise.
2678 (DR_LOCAL_SLOWDOWN): Likewise.
2679 (DR_GLOBAL_SLOWDOWN): Likewise.
2680 (DR_CONTROL_RESERVED): Likewise.
2681 (I386_DR_CONTROL_MASK): Likewise.
2682 (I386_DR_VACANT): Likewise.
2683 (I386_DR_LOCAL_ENABLE): Likewise.
2684 (I386_DR_GLOBAL_ENABLE): Likewise.
2685 (I386_DR_DISABLE): Likewise.
2686 (I386_DR_SET_RW_LEN): Likewise.
2687 (I386_DR_GET_RW_LEN): Likewise.
2688 (I386_DR_WATCH_HIT): Likewise.
2689 (i386_wp_op_t): Likewise.
2690 (i386_show_dr): Likewise.
2691 (i386_length_and_rw_bits): Likewise.
2692 (i386_insert_aligned_watchpoint): Likewise.
2693 (i386_remove_aligned_watchpoint): Likewise.
2694 (i386_handle_nonaligned_watchpoint): Likewise.
2695 i386_update_inferior_debug_regs(): Likewise.
2696 (i386_dr_insert_watchpoint): Likewise.
2697 (i386_dr_remove_watchpoint): Likewise.
2698 (i386_dr_region_ok_for_watchpoint): Likewise.
2699 (i386_dr_stopped_data_address): Likewise.
2700 (i386_dr_stopped_by_watchpoint): Likewise.
2701
27022014-06-19 Gary Benson <gbenson@redhat.com>
2703
2704 * i386-low.c (i386_dr_show): Renamed to
2705 i386_show_dr and made static. All uses updated.
2706 (i386_dr_length_and_rw_bits): Renamed to
2707 i386_length_and_rw_bits and made static.
2708 All uses updated.
2709 (i386_dr_insert_aligned_watchpoint): Renamed to
2710 i386_insert_aligned_watchpoint and made static.
2711 All uses updated.
2712 (i386_dr_remove_aligned_watchpoint): Renamed to
2713 i386_remove_aligned_watchpoint and made static.
2714 All uses updated.
2715 (i386_dr_update_inferior_debug_regs): Renamed to
2716 i386_update_inferior_debug_regs and made static.
2717 All uses updated.
2718
27192014-06-18 Gary Benson <gbenson@redhat.com>
2720
2721 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2722 (i386_dr_low_can_set_control): Likewise.
2723 (i386_get_debug_register_length): Likewise.
2724 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2725 (i386_dr_low_can_set_control): Likewise.
2726 (i386_get_debug_register_length): Likewise.
2727
27282014-06-17 Gary Benson <gbenson@redhat.com>
2729
2730 * i386-low.h (i386-dregs.h): New include.
2731 (DR_FIRSTADDR): Now in i386-dregs.h.
2732 (DR_LASTADDR): Likewise.
2733 (DR_NADDR): Likewise.
2734 (DR_STATUS): Likewise.
2735 (DR_CONTROL): Likewise.
2736 (i386_debug_reg_state): Likewise.
2737 (i386_dr_insert_watchpoint): Likewise.
2738 (i386_dr_remove_watchpoint): Likewise.
2739 (i386_dr_region_ok_for_watchpoint): Likewise.
2740 (i386_dr_stopped_data_address): Likewise.
2741 (i386_dr_stopped_by_watchpoint): Likewise.
2742 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2743
27442014-06-18 Gary Benson <gbenson@redhat.com>
2745
2746 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2747 i386_dr_insert_watchpoint.
2748 (i386_low_remove_watchpoint): Renamed to
2749 i386_dr_remove_watchpoint.
2750 (i386_low_region_ok_for_watchpoint): Renamed to
2751 i386_dr_region_ok_for_watchpoint.
2752 (i386_low_stopped_data_address): Renamed to
2753 i386_dr_stopped_data_address.
2754 (i386_low_stopped_by_watchpoint): Renamed to
2755 i386_dr_stopped_by_watchpoint.
2756 * i386-low.c (i386_show_dr): Renamed to
2757 i386_dr_show and made nonstatic. All uses updated.
2758 (i386_length_and_rw_bits): Renamed to
2759 i386_dr_length_and_rw_bits and made nonstatic.
2760 All uses updated.
2761 (i386_insert_aligned_watchpoint): Renamed to
2762 i386_dr_insert_aligned_watchpoint and made nonstatic.
2763 All uses updated.
2764 (i386_remove_aligned_watchpoint): Renamed to
2765 i386_dr_remove_aligned_watchpoint and made nonstatic.
2766 All uses updated.
2767 (i386_update_inferior_debug_regs): Renamed to
2768 i386_dr_update_inferior_debug_regs and made nonstatic.
2769 All uses updated.
2770 (i386_low_insert_watchpoint): Renamed to
2771 i386_dr_insert_watchpoint. All uses updated.
2772 (i386_low_remove_watchpoint): Renamed to
2773 i386_dr_remove_watchpoint. All uses updated.
2774 (i386_low_region_ok_for_watchpoint): Renamed to
2775 i386_dr_region_ok_for_watchpoint. All uses updated.
2776 (i386_low_stopped_data_address): Renamed to
2777 i386_dr_stopped_data_address. All uses updated.
2778 (i386_low_stopped_by_watchpoint): Renamed to
2779 i386_dr_stopped_by_watchpoint. All uses updated.
2780
27812014-06-18 Gary Benson <gbenson@redhat.com>
2782
2783 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2784 (i386_dr_low_can_set_control): Likewise.
2785 (i386_insert_aligned_watchpoint): New check.
2786
27872014-06-18 Gary Benson <gbenson@redhat.com>
2788
2789 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2790 Renamed to state.
2791
27922014-06-18 Gary Benson <gbenson@redhat.com>
2793
2794 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2795 instead of fatal and error.
2796 (i386_handle_nonaligned_watchpoint): Likewise.
2797
27982014-06-18 Gary Benson <gbenson@redhat.com>
2799
2800 * i386-low.c (i386_get_debug_register_length): New macro.
2801 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2802 (i386_show_dr): Use debug_printf instead of fprintf. Use
2803 phex to format values.
2804
28052014-06-18 Gary Benson <gbenson@redhat.com>
2806
2807 * i386-low.h: Comment changes.
2808 * i386-low.c: Likewise.
2809
28102014-06-18 Gary Benson <gbenson@redhat.com>
2811
2812 * i386-low.c: Whitespace changes.
2813
28142014-06-12 Tom Tromey <tromey@redhat.com>
2815
2816 * utils.c (freeargv): Remove.
2817
28182014-06-12 Tom Tromey <tromey@redhat.com>
2819
2820 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2821 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2822 (parse_debug_format_options): Likewise.
2823 (gdbserver_usage): Likewise.
2824 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2825 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2826 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2827 against libiberty.
2828 ($(LIBGNU)): Depend on libiberty.
2829 (all-lib): Recurse into all subdirs.
2830 (install-only): Invoke "install" target in subdirs.
2831 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2832 targets.
2833 * configure: Rebuild.
2834 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2835 for vasprintf, vsnprintf, or gettimeofday.
2836 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2837 srv_tgtobj.
2838
28392014-06-05 Joel Brobecker <brobecker@adacore.com>
2840
2841 * development.sh: Delete.
2842 * Makefile.in (config.status): Adjust dependency on development.sh.
2843 * configure.ac: Adjust development.sh source call.
2844 * configure: Regenerate.
2845
28462014-06-02 Pedro Alves <palves@redhat.com>
2847
2848 * ax.c (gdb_free_agent_expr): New function.
2849 * ax.h (gdb_free_agent_expr): New declaration.
2850 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2851 list.
2852 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2853 static.
2854 (clear_breakpoint_conditions_and_commands): New function.
2855 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2856 (clear_breakpoint_conditions_and_commands): New declaration.
2857
28582014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2859
2860 * linux-aarch64-low.c (asm/ptrace.h): Include.
2861
28622014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2863
2864 Fix TLS access for -static -pthread.
2865 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2866 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2867 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2868
28692014-05-20 Pedro Alves <palves@redhat.com>
2870
2871 * linux-aarch64-low.c (aarch64_insert_point)
2872 (aarch64_remove_point): No longer check whether the type is
2873 supported here. Adjust to new interface.
2874 (the_low_target): Install aarch64_supports_z_point_type as
2875 supports_z_point_type method.
2876 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2877 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2878 instead of a Z packet char. Adjust.
2879 (arm_supports_z_point_type): New function.
2880 (arm_insert_point, arm_remove_point): Adjust to new interface.
2881 (the_low_target): Install arm_supports_z_point_type.
2882 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2883 (cris_insert_point, cris_remove_point): Adjust to new interface.
2884 Don't check whether the type is supported here.
2885 (the_low_target): Install cris_supports_z_point_type.
2886 * linux-low.c (linux_supports_z_point_type): New function.
2887 (linux_insert_point, linux_remove_point): Adjust to new interface.
2888 * linux-low.h (struct linux_target_ops) <insert_point,
2889 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2890 raw_breakpoint pointer parameter.
2891 <supports_z_point_type>: New method.
2892 * linux-mips-low.c (mips_supports_z_point_type): New function.
2893 (mips_insert_point, mips_remove_point): Adjust to new interface.
2894 Use mips_supports_z_point_type.
2895 (the_low_target): Install mips_supports_z_point_type.
2896 * linux-ppc-low.c (the_low_target): Install NULL as
2897 supports_z_point_type method.
2898 * linux-s390-low.c (the_low_target): Install NULL as
2899 supports_z_point_type method.
2900 * linux-sparc-low.c (the_low_target): Install NULL as
2901 supports_z_point_type method.
2902 * linux-x86-low.c (x86_supports_z_point_type): New function.
2903 (x86_insert_point): Adjust to new insert_point interface. Use
2904 insert_memory_breakpoint. Adjust to new
2905 i386_low_insert_watchpoint interface.
2906 (x86_remove_point): Adjust to remove_point interface. Use
2907 remove_memory_breakpoint. Adjust to new
2908 i386_low_remove_watchpoint interface.
2909 (the_low_target): Install x86_supports_z_point_type.
2910 * lynx-low.c (lynx_target_ops): Install NULL as
2911 supports_z_point_type callback.
2912 * nto-low.c (nto_supports_z_point_type): New.
2913 (nto_insert_point, nto_remove_point): Adjust to new interface.
2914 (nto_target_ops): Install nto_supports_z_point_type.
2915 * mem-break.c: Adjust intro comment.
2916 (struct raw_breakpoint) <raw_type, size>: New fields.
2917 <inserted>: Update comment.
2918 <shlib_disabled>: Delete field.
2919 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2920 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2921 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2922 (raw_bkpt_type_to_target_hw_bp_type): New function.
2923 (find_enabled_raw_code_breakpoint_at): New function.
2924 (find_raw_breakpoint_at): New type and size parameters. Use them.
2925 (insert_memory_breakpoint): New function, based off
2926 set_raw_breakpoint_at.
2927 (remove_memory_breakpoint): New function.
2928 (set_raw_breakpoint_at): Reimplement.
2929 (set_breakpoint): New, based on set_breakpoint_at.
2930 (set_breakpoint_at): Reimplement.
2931 (delete_raw_breakpoint): Go through the_target->remove_point
2932 instead of assuming memory breakpoints.
2933 (find_gdb_breakpoint_at): Delete.
2934 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2935 (find_gdb_breakpoint): New function.
2936 (set_gdb_breakpoint_at): Delete.
2937 (z_type_supported): New function.
2938 (set_gdb_breakpoint_1): New function, loosely based off
2939 set_gdb_breakpoint_at.
2940 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2941 (delete_gdb_breakpoint_at): Delete.
2942 (delete_gdb_breakpoint_1): New function, loosely based off
2943 delete_gdb_breakpoint_at.
2944 (delete_gdb_breakpoint): New function.
2945 (clear_gdb_breakpoint_conditions): Rename to ...
2946 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2947 breakpoint.
2948 (add_condition_to_breakpoint): Make static.
2949 (add_breakpoint_condition): Take a struct breakpoint pointer
2950 instead of an address. Adjust.
2951 (gdb_condition_true_at_breakpoint): Rename to ...
2952 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2953 z_type parameter.
2954 (gdb_condition_true_at_breakpoint): Reimplement.
2955 (add_breakpoint_commands): Take a struct breakpoint pointer
2956 instead of an address. Adjust.
2957 (gdb_no_commands_at_breakpoint): Rename to ...
2958 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2959 parameter. Return true if no breakpoint was found. Change debug
2960 output.
2961 (gdb_no_commands_at_breakpoint): Reimplement.
2962 (run_breakpoint_commands): Rename to ...
2963 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2964 and change return type to boolean.
2965 (run_breakpoint_commands): New function.
2966 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2967 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2968 breakpoint. Go through the_target->remove_point instead of
2969 assuming memory breakpoint.
2970 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2971 software and hardware breakpoints.
2972 (reinsert_raw_breakpoint): Go through the_target->insert_point
2973 instead of assuming memory breakpoint.
2974 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2975 software and hardware breakpoints.
2976 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2977 Check both software and hardware breakpoints.
2978 (validate_inserted_breakpoint): Assert the breakpoint is a
2979 software breakpoint. Set the inserted flag to -1 instead of
2980 setting shlib_disabled.
2981 (delete_disabled_breakpoints): Adjust.
2982 (validate_breakpoints): Only validate software breakpoints.
2983 Adjust to inserted flag change.
2984 (check_mem_read, check_mem_write): Skip breakpoint types other
2985 than software breakpoints. Adjust to inserted flag change.
2986 * mem-break.h (enum raw_bkpt_type): New enum.
2987 (raw_breakpoint, struct process_info): Forward declare.
2988 (Z_packet_to_target_hw_bp_type): Delete declaration.
2989 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2990 (set_gdb_breakpoint, delete_gdb_breakpoint)
2991 (clear_breakpoint_conditions): New declarations.
2992 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2993 (breakpoint_inserted_here): Update comment.
2994 (add_breakpoint_condition, add_breakpoint_commands): Replace
2995 address parameter with a breakpoint pointer parameter.
2996 (gdb_breakpoint_here): Update comment.
2997 (delete_gdb_breakpoint_at): Delete.
2998 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2999 * server.c (process_point_options): Take a struct breakpoint
3000 pointer instead of an address. Adjust.
3001 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3002 delete_gdb_breakpoint.
3003 * spu-low.c (spu_target_ops): Install NULL as
3004 supports_z_point_type method.
3005 * target.h: Include mem-break.h.
3006 (struct target_ops) <prepare_to_access_memory>: Update comment.
3007 <supports_z_point_type>: New field.
3008 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3009 instead of a char. Also take a raw breakpoint pointer.
3010 * win32-arm-low.c (the_low_target): Install NULL as
3011 supports_z_point_type.
3012 * win32-i386-low.c (i386_supports_z_point_type): New function.
3013 (i386_insert_point, i386_remove_point): Adjust to new interface.
3014 (the_low_target): Install i386_supports_z_point_type.
3015 * win32-low.c (win32_supports_z_point_type): New function.
3016 (win32_insert_point, win32_remove_point): Adjust to new interface.
3017 (win32_target_ops): Install win32_supports_z_point_type.
3018 * win32-low.h (struct win32_target_ops):
3019 <supports_z_point_type>: New method.
3020 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3021 instead of a char. Also take a raw breakpoint pointer.
3022
30232014-05-20 Pedro Alves <palves@redhat.com>
3024
3025 * mem-break.h: Include break-common.h.
3026 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3027 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3028 (Z_packet_to_target_hw_bp_type): New declaration.
3029 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3030 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3031 (Z_PACKET_ACCESS_WP): Delete macros.
3032 (Z_packet_to_hw_type): Delete function.
3033 * i386-low.h: Don't include break-common.h here.
3034 (Z_packet_to_hw_type): Delete declaration.
3035 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3036 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3037 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3038 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3039 * linux-aarch64-low.c: Don't include break-common.h here.
3040 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3041 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3042 (Z_packet_to_target_hw_bp_type): Delete function.
3043 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3044 function.
3045 (mips_insert_point, mips_remove_point): Use
3046 Z_packet_to_target_hw_bp_type.
3047
30482014-05-20 Pedro Alves <palves@redhat.com>
3049
3050 * linux-aarch64-low.c: Include break-common.h.
3051 (enum target_point_type): Delete.
3052 (Z_packet_to_point_type): Rename to ...
3053 (Z_packet_to_target_hw_bp_type): ... this, and return a
3054 target_hw_bp_type instead.
3055 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3056 instead of an enum target_point_type.
3057 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3058 breakpoint type.
3059 (aarch64_dr_state_insert_one_point)
3060 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3061 (aarch64_handle_aligned_watchpoint)
3062 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3063 Take an enum target_hw_bp_type instead of an enum
3064 target_point_type.
3065 (aarch64_supports_z_point_type): New function.
3066 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3067 use Z_packet_to_target_hw_bp_type.
3068
30692014-05-20 Joel Brobecker <brobecker@adacore.com>
3070
3071 * configure.ac: Only use -Werror by default when DEVELOPMENT
3072 is true.
3073 * configure: Regenerate.
3074
30752014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3076
3077 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3078 * linux-x86-low.c (X86_64_USER_REGS): New.
3079 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3080
30812014-04-28 Yao Qi <yao@codesourcery.com>
3082
3083 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3084 name.
3085
30862014-04-25 Pedro Alves <palves@redhat.com>
3087
3088 PR server/16255
3089 * linux-low.c (linux_attach_fail_reason_string): New function.
3090 (linux_attach_lwp): Delete.
3091 (linux_attach_lwp_1): Rename to ...
3092 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3093 argument. Remove "initial" parameter. Return int instead of
3094 void. Don't error or warn here.
3095 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3096 failure to attach to the tgid. Call warning when failing to
3097 attach to an lwp.
3098 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3099 argument. Remove "initial" parameter. Return int instead of
3100 void. Don't error or warn here.
3101 (linux_attach_fail_reason_string): New declaration.
3102 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3103 interface change. Use linux_attach_fail_reason_string.
3104
31052014-04-24 Michael Sturm <michael.sturm@mintel.com>
3106 Walfred Tedeschi <walfred.tedeschi@intel.com>
3107
3108 * Makefile.in: Added rules to handle new files
3109 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3110 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3111 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3112 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3113 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3114 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3115 x32-avx512-linux.o.
3116 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3117 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3118 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3119 i386/x32-avx512.xml.
3120 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3121 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3122 i386/x32-avx512-linux.xml.
3123 * i387-fp.c (num_avx512_k_registers): New constant for number
3124 of K registers.
3125 (num_avx512_zmmh_low_registers): New constant for number of
3126 lower ZMM registers (0-15).
3127 (num_avx512_zmmh_high_registers): New constant for number of
3128 higher ZMM registers (16-31).
3129 (num_avx512_ymmh_registers): New contant for number of higher
3130 YMM registers (ymm16-31 added by avx521 on x86_64).
3131 (num_avx512_xmm_registers): New constant for number of higher
3132 XMM registers (xmm16-31 added by AVX512 on x86_64).
3133 (struct i387_xsave): Add space for AVX512 registers.
3134 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3135 Add code to handle AVX512 registers.
3136 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3137 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3138 prototypei from generated file.
3139 (tdesc_amd64_avx512_linux): Likewise.
3140 (init_registers_x32_avx512_linux): Likewise.
3141 (tdesc_x32_avx512_linux): Likewise.
3142 (init_registers_i386_avx512_linux): Likewise.
3143 (tdesc_i386_avx512_linux): Likewise.
3144 (x86_64_regmap): Add AVX512 registers.
3145 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3146 mask.
3147 (initialize_low_arch): Add code to initialize AVX512 registers.
3148
31492014-04-23 Pedro Alves <palves@redhat.com>
3150
3151 * mem-break.c (find_gdb_breakpoint_at): Make static.
3152 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3153
31542014-04-23 Pedro Alves <palves@redhat.com>
3155
3156 * i386-low.c: Don't include break-common.h here.
3157 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3158 prototype to take target_hw_bp_type as argument instead of a Z
3159 packet char.
3160 * i386-low.h: Include break-common.h here.
3161 (Z_packet_to_hw_type): Declare.
3162 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3163 prototypes.
3164 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3165 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3166 (x86_remove_point): Convert the packet number to a
3167 target_hw_bp_type before calling i386_low_remove_watchpoint.
3168 * win32-i386-low.c (i386_insert_point): Convert the packet number
3169 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3170 (i386_remove_point): Convert the packet number to a
3171 target_hw_bp_type before calling i386_low_remove_watchpoint.
3172
31732014-04-23 Pedro Alves <palves@redhat.com>
3174
3175 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3176
31772014-04-10 Pedro Alves <palves@redhat.com>
3178
3179 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3180 Check if the condition or command is NULL before checking if the
3181 breakpoint is known. On success, return true.
3182 * mem-break.h (add_breakpoint_condition): Document return.
3183 (add_breakpoint_commands): Add describing comment.
3184 * server.c (skip_to_semicolon): New function.
3185 (process_point_options): Use it.
3186
31872014-04-09 Pedro Alves <palves@redhat.com>
3188
3189 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3190 to lwpid_of.
3191
31922014-02-27 Pedro Alves <palves@redhat.com>
3193
3194 PR 12702
3195 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3196 macros.
3197 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3198 output.
3199 (last_thread_of_process_p): Take a PID argument instead of a
3200 thread pointer.
3201 (linux_wait_for_lwp): Delete.
3202 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3203 functions.
3204 (linux_low_filter_event): New function, party factored out from
3205 linux_wait_for_event.
3206 (linux_wait_for_event): Rename to ...
3207 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3208 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3209 sigsuspend. Check for zombie leaders.
3210 (linux_wait_for_event): Reimplement as wrapper around
3211 linux_wait_for_event_filtered.
3212 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3213 a normal or signal exit is seen, it's the whole process exiting.
3214 (wait_for_sigstop): No longer a for_each_inferior callback.
3215 Rewrite on top of linux_wait_for_event_filtered.
3216 (stop_all_lwps): Call wait_for_sigstop directly.
3217 * server.c (resume, handle_target_event): Handle
3218 TARGET_WAITKIND_NO_RESUMED.
3219
32202014-02-26 Joel Brobecker <brobecker@adacore.com>
3221
3222 * win32-low.c (psapi_get_dll_name,
3223 * win32_CreateToolhelp32Snapshot): Delete.
3224 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3225 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3226 Delete.
3227 (handle_load_dll): Add function description.
3228 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3229
32302014-02-26 Joel Brobecker <brobecker@adacore.com>
3231
3232 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3233 Add comment.
3234 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3235 base address when calling win32_add_one_solib.
3236 (handle_load_dll): Delete local variable load_addr.
3237 Remove 0x1000 offset applied to DLL base address when calling
3238 win32_add_one_solib.
3239 (handle_unload_dll): Add comment.
3240
32412014-02-26 Joel Brobecker <brobecker@adacore.com>
3242
3243 * win32-low.c (win32_add_all_dlls): Renames
3244 win32_ensure_ntdll_loaded. Rewrite function documentation.
3245 Adjust implementation to always load all DLLs.
3246 Add 0x1000 offset to DLL base address when calling
3247 win32_add_one_solib.
3248 (child_initialization_done): New static global.
3249 (do_initial_child_stuff): Set child_initialization_done to
3250 zero during child initialization, and 1 after. Replace call
3251 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3252 Add comment.
3253 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3254 (handle_unload_dll): Add function documentation.
3255 (get_child_debug_event): Ignore load and unload DLL events
3256 during child initialization.
3257
32582014-02-20 Doug Evans <dje@google.com>
3259
3260 Remove global all_lwps.
3261 * inferiors.h (ptid_of): Move here from linux-low.h.
3262 (pid_of, lwpid_of): Ditto.
3263 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3264 parameter is a struct thread_info * now.
3265 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3266 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3267 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3268 directly.
3269 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3270 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3271 * linux-arm-low.c (update_registers_callback): Update, "entry"
3272 parameter is a struct thread_info * now.
3273 Fetch lwpid from current_inferior directly.
3274 (arm_insert_point): Pass &all_threads to find_inferior instead of
3275 &all_lwps.
3276 (arm_remove_point): Ditto.
3277 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3278 (arm_prepare_to_resume): Fetch pid from thread.
3279 (arm_read_description): Fetch lwpid from current_inferior directly.
3280 * linux-low.c (all_lwps): Delete.
3281 (delete_lwp): Delete call to remove_inferior.
3282 (handle_extended_wait): Fetch lwpid from thread.
3283 (add_lwp): Don't set lwp->entry.id. Remove call to
3284 add_inferior_to_list.
3285 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3286 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3287 (kill_one_lwp_callback): Ditto.
3288 (linux_kill): Don't dereference NULL pointer.
3289 Fetch ptid,lwpid from thread.
3290 (get_detach_signal): Fetch ptid from thread.
3291 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3292 Simplify call to regcache_invalidate_thread.
3293 (delete_lwp_callback): Update, "entry" parameter is a
3294 struct thread_info * now. Fetch pid from thread.
3295 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3296 (status_pending_p_callback): Update, "entry" parameter is a
3297 struct thread_info * now. Fetch ptid from thread.
3298 (find_lwp_pid): Update, "entry" parameter is a
3299 struct thread_info * now.
3300 (linux_wait_for_lwp): Fetch pid from thread.
3301 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3302 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3303 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3304 (dequeue_one_deferred_signal): Ditto.
3305 (cancel_breakpoint): Fetch ptid from current_inferior.
3306 (linux_wait_for_event): Pass &all_threads to find_inferior,
3307 not &all_lwps. Fetch ptid, lwpid from thread.
3308 (count_events_callback): Update, "entry" parameter is a
3309 struct thread_info * now.
3310 (select_singlestep_lwp_callback): Ditto.
3311 (select_event_lwp_callback): Ditto.
3312 (cancel_breakpoints_callback): Ditto.
3313 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3314 not &all_lwps.
3315 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3316 (unsuspend_one_lwp): Update, "entry" parameter is a
3317 struct thread_info * now.
3318 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3319 not &all_lwps.
3320 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3321 Fetch lwpid from thread, not lwp.
3322 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3323 Pass &all_threads to find_inferior, not &all_lwps.
3324 (send_sigstop): Fetch lwpid from thread, not lwp.
3325 (send_sigstop_callback): Update, "entry" parameter is a
3326 struct thread_info * now.
3327 (suspend_and_send_sigstop_callback): Ditto.
3328 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3329 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3330 struct thread_info * now.
3331 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3332 from thread, lwp.
3333 (lwp_running): Update, "entry" parameter is a
3334 struct thread_info * now.
3335 (stop_all_lwps): Fetch ptid from thread.
3336 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3337 (linux_resume_one_lwp): Fetch lwpid from thread.
3338 (linux_set_resume_request): Update, "entry" parameter is a
3339 struct thread_info * now. Fetch pid, lwpid from thread.
3340 (resume_status_pending_p): Update, "entry" parameter is a
3341 struct thread_info * now.
3342 (need_step_over_p): Ditto. Fetch lwpid from thread.
3343 (start_step_over): Fetch lwpid from thread.
3344 (linux_resume_one_thread): Update, "entry" parameter is a
3345 struct thread_info * now. Fetch lwpid from thread.
3346 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3347 (proceed_one_lwp): Update, "entry" parameter is a
3348 struct thread_info * now. Fetch lwpid from thread.
3349 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3350 struct thread_info * now.
3351 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3352 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3353 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3354 directly.
3355 (regsets_store_inferior_registers): Ditto.
3356 (fetch_register, store_register): Ditto.
3357 (linux_read_memory, linux_write_memory): Ditto.
3358 (linux_request_interrupt): Ditto.
3359 (linux_read_auxv): Ditto.
3360 (linux_xfer_siginfo): Ditto.
3361 (linux_qxfer_spu): Ditto.
3362 (linux_qxfer_libraries_svr4): Ditto.
3363 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3364 moved to inferiors.h.
3365 (get_lwp): Delete.
3366 (get_thread_lwp): Update.
3367 (struct lwp_info): Delete member "entry". Simplify comment for
3368 member "thread".
3369 (all_lwps): Delete.
3370 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3371 current_inferior directly.
3372 (update_watch_registers_callback): Update, "entry" parameter is a
3373 struct thread_info * now. Fetch pid from thread.
3374 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3375 (mips_insert_point): Fetch lwpid from current_inferior.
3376 Pass &all_threads to find_inferior, not &all_lwps.
3377 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3378 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3379 directly.
3380 (mips_stopped_data_address): Ditto.
3381 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3382 directly.
3383 * linux-tile-low.c (tile_arch_setup): Ditto.
3384 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3385 (update_debug_registers_callback): Update, "entry" parameter is a
3386 struct thread_info * now. Fetch pid from thread.
3387 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3388 Pass &all_threads to find_inferior, not &all_lwps.
3389 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3390 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3391 Pass &all_threads to find_inferior, not &all_lwps.
3392 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3393 (i386_dr_low_get_status): Ditto.
3394 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3395 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3396 (x86_linux_read_description): Ditto.
3397 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3398
33992014-02-20 Doug Evans <dje@google.com>
3400
3401 * inferiors.c (get_first_inferior): Fix buglet.
3402
34032014-02-19 Doug Evans <dje@google.com>
3404
3405 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3406 * inferiors.c (add_thread): Change result type to struct thread_info *.
3407 All callers updated.
3408 (add_lwp): Call add_thread here instead of in callers.
3409 All callers updated.
3410 * linux-low.h (get_lwp_thread): Rewrite.
3411 (struct lwp_info): New member "thread".
3412
34132014-02-19 Doug Evans <dje@google.com>
3414
3415 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3416 All callers updated.
3417
34182014-02-19 Doug Evans <dje@google.com>
3419
3420 * inferiors.c (add_thread): Fix whitespace.
3421
34222014-02-19 Doug Evans <dje@google.com>
3423
3424 * dll.c (clear_dlls): Replace accessing list implemention details
3425 with API function.
3426 * gdbthread.h (get_first_thread): Declare.
3427 * inferiors.c (for_each_inferior_with_data): New function.
3428 (get_first_thread): New function.
3429 (find_thread_ptid): Simplify.
3430 (get_first_inferior): New function.
3431 (clear_list): Delete.
3432 (one_inferior_p): New function.
3433 (clear_inferior_list): New function.
3434 (clear_inferiors): Update.
3435 * inferiors.h (for_each_inferior_with_data): Declare.
3436 (clear_inferior_list): Declare.
3437 (one_inferior_p): Declare.
3438 (get_first_inferior): Declare.
3439 * linux-low.c (linux_wait_for_event): Replace accessing list
3440 implemention details with API function.
3441 * server.c (target_running): Ditto.
3442 (accumulate_file_name_length): New function.
3443 (emit_dll_description): New function.
3444 (handle_qxfer_libraries): Replace accessing list implemention
3445 details with API function.
3446 (handle_qxfer_threads_worker): New function.
3447 (handle_qxfer_threads_proper): Replace accessing list implemention
3448 details with API function.
3449 (handle_query): Ditto.
3450 (visit_actioned_threads_callback_ftype): New typedef.
3451 (visit_actioned_threads_data): New struct.
3452 (visit_actioned_threads): Rewrite to be find_inferior callback.
3453 (resume): Call find_inferior.
3454 (handle_status): Replace accessing list implemention
3455 details with API function.
3456 (process_serial_event): Replace accessing list implemention details
3457 with API function.
3458 * target.c (set_desired_inferior): Replace accessing list implemention
3459 details with API function.
3460 * tracepoint.c (same_process_p): New function.
3461 (gdb_agent_about_to_close): Replace accessing list implemention
3462 details with API function.
3463 * win32-low.c (child_delete_thread): Replace accessing list
3464 implemention details with API function.
3465 (match_dll_by_basename): New function.
3466 (dll_is_loaded_by_basename): New function.
3467 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3468 details call to dll_is_loaded_by_basename.
3469
34702014-02-19 Doug Evans <dje@google.com>
3471
3472 * dll.h (struct dll_info): Add comment.
3473 * gdbthread.h (struct thread_info): Add comment.
3474 (current_ptid): Simplify.
3475 * inferiors.c (add_process): Update.
3476 (remove_process): Update.
3477 * inferiors.h (struct process_info): Rename member "head" to "entry".
3478 * linux-low.c (delete_lwp): Update.
3479 (add_lwp): Update.
3480 (last_thread_of_process_p): Update.
3481 (kill_one_lwp_callback, linux_kill): Update.
3482 (status_pending_p_callback): Update.
3483 (wait_for_sigstop): Update. Simplify read of ptid.
3484 (start_step_over): Update.
3485 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3486 (get_lwp_thread): Update.
3487 (struct lwp_info): Rename member "head" to "entry".
3488 * regcache.h (inferior_list_entry): Delete.
3489 * server.c (kill_inferior_callback): Update.
3490 (detach_or_kill_inferior_callback): Update.
3491 (print_started_pid): Update.
3492 (print_attached_pid): Update.
3493 (process_serial_event): Simplify read of ptid.
3494 * thread-db.c (thread_db_create_event): Update.
3495 (thread_db_get_tls_address): Update.
3496 * win32-low.c (current_inferior_ptid): Simplify.
3497
34982014-02-19 Tom Tromey <tromey@redhat.com>
3499
3500 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3501 argument.
3502 (target_supports_btrace): Update.
3503
35042014-02-14 Yao Qi <yao@codesourcery.com>
3505
3506 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3507 (rsp-low-ipa.o): New target.
3508
35092014-02-12 Tom Tromey <tromey@redhat.com>
3510
3511 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3512 convert_ascii_to_int.
3513 * regcache.c (registers_to_string): Likewise.
3514 * remote-utils.c (decode_M_packet): Likewise.
3515 * server.c (process_serial_event): Likewise.
3516
35172014-02-12 Tom Tromey <tromey@redhat.com>
3518
3519 * server.c (handle_query, handle_v_run): Use hex2bin, not
3520 unhexify.
3521 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3522
35232014-02-12 Tom Tromey <tromey@redhat.com>
3524
3525 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3526 convert_int_to_ascii.
3527 * regcache.c (registers_to_string, collect_register_as_string):
3528 Likewise.
3529 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3530 Likewise.
3531 * server.c (process_serial_event): Likewise.
3532 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3533 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3534
35352014-02-12 Tom Tromey <tromey@redhat.com>
3536
3537 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3538 bin2hex, not hexify.
3539 * tracepoint.c (cmd_qtstatus): Likewise.
3540
35412014-02-12 Tom Tromey <tromey@redhat.com>
3542
3543 * remote-utils.c (monitor_output): Pass explicit length to
3544 hexify.
3545
35462014-02-12 Tom Tromey <tromey@redhat.com>
3547
3548 * tracepoint.c: Include rsp-low.h.
3549 * server.c: Include rsp-low.h.
3550 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3551 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3552 declare.
3553 * remote-utils.c: Include rsp-low.h.
3554 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3555 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3556 (convert_int_to_ascii, convert_ascii_to_int): Move to
3557 common/rsp-low.c.
3558 * regcache.c: Include rsp-low.h.
3559 * ax.c: Include rsp-low.h.
3560 * Makefile.in (SFILES): Add common/rsp-low.c.
3561 (OBS): Add rsp-low.o.
3562 (rsp-low.o): New target.
3563
35642014-02-12 Tom Tromey <tromey@redhat.com>
3565
3566 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3567 Include print-utils.h.
3568 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3569 (plongest, thirty_two, phex_nz): Remove.
3570 * Makefile.in (SFILES): Add common/print-utils.c.
3571 (OBS): Add print-utils.o.
3572 (print-utils-ipa.o): New target.
3573 (print-utils.o): New target.
3574 (IPA_OBJS): Add print-utils-ipa.o.
3575
35762014-02-06 Tom Tromey <tromey@redhat.com>
3577
3578 * Makefile.in (SFILES): Fix indentation.
3579
35802014-02-05 Doug Evans <dje@google.com>
3581
3582 * linux-low.c (linux_wait_for_event): Improve comment.
3583 (linux_wait_1): Keep current_inferior in sync with event_child.
3584
35852014-01-22 Doug Evans <dje@google.com>
3586
3587 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3588
35892014-01-22 Doug Evans <dje@google.com>
3590
3591 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3592 * configure: Regenerate.
3593 * config.in: Regenerate.
3594 * Makefile.in (SFILES): Add debug.c.
3595 (OBS): Add debug.o.
3596 * debug.c: New file.
3597 * debug.h: New file.
3598 * linux-aarch64-low.c (*): Update all debugging printfs to use
3599 debug_printf instead of fprintf.
3600 * linux-arm-low.c (*): Ditto.
3601 * linux-cris-low.c (*): Ditto.
3602 * linux-crisv32-low.c (*): Ditto.
3603 * linux-m32r-low.c (*): Ditto.
3604 * linux-sparc-low.c (*): Ditto.
3605 * linux-x86.c (*): Ditto.
3606 * linux-low.c (*): Ditto.
3607 (linux_wait_1): Add calls to debug_enter, debug_exit.
3608 (linux_wait): Remove redundant debugging printf.
3609 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3610 (linux_resume, unstop_all_lwps): Ditto.
3611 * mem-break.c (*): Update all debugging printfs to use
3612 debug_printf instead of fprintf.
3613 * remote-utils.c (*): Ditto.
3614 * thread-db.c (*): Ditto.
3615 * server.c #include <ctype.h>, "gdb_vecs.h".
3616 (debug_threads): Moved to debug.c.
3617 (*): Update all debugging printfs to use debug_printf instead of
3618 fprintf.
3619 (start_inferior): Replace call to fflush with call to debug_flush.
3620 (monitor_show_help): Mention set debug-format.
3621 (parse_debug_format_options): New function.
3622 (handle_monitor_command): Handle "monitor set debug-format".
3623 (gdbserver_usage): Mention --debug-format.
3624 (main): Parse --debug-format.
3625 * server.h (debug_threads): Declaration moved to debug.h.
3626 #include "debug.h".
3627 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3628 trace_debug_1 that uses debug_printf.
3629 (tracepoint_look_up_symbols): Update all debugging printfs to use
3630 debug_printf instead of fprintf.
3631
36322014-01-20 Baruch Siach <baruch@tkos.co.il>
3633
3634 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3635 sys/ptrace.h.
3636
36372014-01-17 Pedro Alves <palves@redhat.com>
3638
3639 PR build/16445
3640 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3641 defined after including gdb_proc_service.h.
3642
36432014-01-16 Doug Evans <dje@google.com>
3644
3645 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3646 (match_dll): Use it.
3647
36482014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3649
3650 * target.h (target_ops) <read_btrace>: Change parameters and
3651 return type to allow error reporting.
3652 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3653 trace reading errors on.
3654 * linux-low.c (linux_low_read_btrace): Pass trace reading
3655 errors on.
3656 (linux_low_disable_btrace): New.
3657
36582014-01-15 Doug Evans <dje@google.com>
3659
3660 * inferiors.c (thread_id_to_gdb_id): Delete.
3661 * inferiors.h (thread_id_to_gdb_id): Delete.
3662
36632014-01-13 Eli Zaretskii <eliz@gnu.org>
3664
3665 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3666 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3667 versions.
3668
36692014-01-08 Pedro Alves <palves@redhat.com>
3670
3671 * server.c (handle_status): Don't discard previous queued stop
3672 replies or thread's pending status here.
3673 (main) <disconnection>: Do it here instead.
3674
36752014-01-08 Pedro Alves <palves@redhat.com>
3676
3677 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3678 * server.c (visit_actioned_threads, handle_pending_status): New
3679 function.
3680 (handle_v_cont): Factor out parts to ...
3681 (resume): ... this new function. If in all-stop, and a thread
3682 being resumed has a pending status, report it without actually
3683 resuming.
3684 (myresume): Adjust to use the new 'resume' function.
3685 (clear_pending_status_callback, set_pending_status_callback)
3686 (find_status_pending_thread_callback): New functions.
3687 (handle_status): Handle the case of multiple threads having
3688 interesting statuses to report. Report threads' real last signal
3689 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3690 with an interesting thread to report the status for, instead of
3691 always reporting the status of the first thread.
3692
36932014-01-01 Joel Brobecker <brobecker@adacore.com>
3694
3695 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3696 * gdbreplay.c (gdbreplay_version): Likewise.
3697
36982013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3699
3700 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3701 iov.iov_len with the real length in use.
3702
37032013-12-13 Joel Brobecker <brobecker@adacore.com>
3704
3705 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3706 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3707 for all targets that use win32-low.c.
3708 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3709 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3710
37112013-12-13 Pedro Alves <palves@redhat.com>
3712
3713 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3714 if equal to TARGET_WAITKIND_LOADED.
3715 * win32-low.c (cached_status): New static global.
3716 (win32_wait): Add declaration.
3717 (do_initial_child_stuff): Flush all initial pending debug events
3718 up to the initial breakpoint.
3719 (win32_wait): If CACHED_STATUS was set, return that instead
3720 of doing a real wait. Remove the code resuming the execution
3721 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3722 during the initial phase. Also remove the code changing
3723 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3724 TARGET_WAITKIND_STOPPED.
3725
37262013-12-11 Yao Qi <yao@codesourcery.com>
3727
3728 * notif.c (handle_notif_ack): Return 0 if no notification
3729 matches.
3730
37312013-11-20 Doug Evans <dje@google.com>
3732
3733 * linux-low.c (linux_set_resume_request): Fix comment.
3734
37352013-11-20 Doug Evans <dje@google.com>
3736
3737 * linux-low.c (resume_status_pending_p): Tweak comment.
3738
37392013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3740
3741 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3742 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3743 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3744 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3745 (srv_amd64_regobj): Add amd64-mpx.o.
3746 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3747 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3748 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3749 * i387-fp.c (num_pl_bnd_register) Added constant.
3750 (num_pl_bnd_cfg_registers) Added constant.
3751 (struct i387_xsave) Added reserved area and MPX fields.
3752 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3753 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3754 function.
3755 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3756 (init_registers_amd64_mpx_linux): Declare new function.
3757 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3758 (x86_64_regmap): Add MPX registers.
3759 (x86_linux_read_description): Add MPX case.
3760 (initialize_low_arch): Initialize MPX targets.
3761
37622013-11-18 Tom Tromey <tromey@redhat.com>
3763
3764 * configure: Rebuild.
3765 * configure.ac: Don't check for stdlib.h.
3766 * gdbreplay.c: Unconditionally include stdlib.h.
3767
37682013-11-18 Tom Tromey <tromey@redhat.com>
3769
3770 * config.in: Rebuild.
3771 * configure: Rebuild.
3772 * configure.ac: Don't use AC_HEADER_DIRENT.
3773
37742013-11-18 Tom Tromey <tromey@redhat.com>
3775
3776 * server.h: Don't check HAVE_STRING_H.
3777 * gdbreplay.c: Don't check HAVE_STRING_H.
3778 * configure: Rebuild.
3779
37802013-11-18 Tom Tromey <tromey@redhat.com>
3781
3782 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3783 LIBGNU.
3784
37852013-11-08 Tom Tromey <tromey@redhat.com>
3786
3787 * configure, config.in: Rebuild.
3788 * configure.ac: Remove unused configury.
3789
37902013-11-08 Tom Tromey <tromey@redhat.com>
3791
3792 * acinclude.m4: Include common.m4, codeset.m4.
3793 * configure, config.in: Rebuild.
3794 * configure.ac: Use GDB_AC_COMMON.
3795
37962013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3797
3798 * linux-s390-low.c (HWCAP_S390_TE): New define.
3799 (s390_arch_setup): Consider the TE field in the HWCAP for
3800 determining 'have_regset_tdb'.
3801
38022013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3803
3804 PR gdb/16014
3805 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3806 call to sizeof.
3807
38082013-10-02 Pedro Alves <palves@redhat.com>
3809
3810 * server.c (process_serial_event): Don't output "GDBserver
3811 exiting" if GDB is connected through stdio.
3812 * target.c (mywait): Likewise, be silent if GDB is connected
3813 through stdio.
3814
38152013-10-01 Joel Brobecker <brobecker@adacore.com>
3816
3817 * lynx-low.c (lynx_add_threads_after_attach): New function.
3818 (lynx_attach): Remove call to add_thread. Add call to
3819 lynx_add_threads_after_attach instead.
3820
38212013-09-28 Mike Frysinger <vapier@gentoo.org>
3822
3823 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3824 * config.in, configure: Regenerated.
3825
38262013-09-18 Yao Qi <yao@codesourcery.com>
3827
3828 PR server/15959
3829 * server.c (start_inferior): Clear 'resume_info'.
3830
38312013-09-16 Jiong Wang <jiwang@tilera.com>
3832
3833 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3834 for each register.
3835
38362013-09-16 Jiong Wang <jiwang@tilera.com>
3837
3838 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3839 linux-tile-low.o to srv_tgtobj.
3840
38412013-09-16 Will Newton <will.newton@linaro.org>
3842
3843 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3844 out regs.
3845
38462013-09-06 Pedro Alves <palves@redhat.com>
3847
3848 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3849 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3850 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3851 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3852 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3853 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3854
38552013-09-06 Pedro Alves <palves@redhat.com>
3856
3857 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3858 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3859
38602013-09-06 Pedro Alves <palves@redhat.com>
3861
3862 * linux-amd64-ipa.c: Include tracepoint.h.
3863 * linux-i386-ipa.c: Include tracepoint.h.
3864
38652013-09-06 Ricard Wanderlof <ricardw@axis.com>
3866
3867 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3868 (ps_get_thread_area): New function.
3869
38702013-09-06 Ricard Wanderlof <ricardw@axis.com>
3871
3872 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3873 (initialize_low_arch): Call init_registers_crisv32 rather than
3874 init_register_crisv32.
3875
38762013-09-05 Pedro Alves <palves@redhat.com>
3877
3878 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3879 to ...
3880 * hostio.h: ... this new file.
3881 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3882 win32-low.c: Include hostio.h.
3883
38842013-09-05 Pedro Alves <palves@redhat.com>
3885
3886 * server.h (gdb_client_data, handler_func, callback_handler_func)
3887 (delete_file_handler, add_file_handler, append_callback_event)
3888 (delete_callback_event, start_event_loop, initialize_event_loop):
3889 Move to event-loop.h and include it.
3890 * event-loop.h: New file.
3891
38922013-09-05 Pedro Alves <palves@redhat.com>
3893
3894 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3895 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3896 (loaded_dll, unloaded_dll): Move to ...
3897 * dll.h: ... this new file.
3898 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3899
39002013-09-05 Pedro Alves <palves@redhat.com>
3901
3902 * server.h (current_process, get_thread_process, all_processes)
3903 (add_inferior_to_list, for_each_inferior, current_inferior)
3904 (remove_inferior, add_process, remove_process, find_process_pid)
3905 (have_started_inferiors_p, have_attached_inferiors_p)
3906 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3907 (clear_inferiors, find_inferior, find_inferior_id)
3908 (inferior_target_data, set_inferior_target_data)
3909 (inferior_regcache_data, set_inferior_regcache_data): Move to
3910 inferiors.h, and include it.
3911 * inferiors.h: New file.
3912
39132013-09-05 Pedro Alves <palves@redhat.com>
3914
3915 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3916 Move ...
3917 * ax.h: ... here.
3918
39192013-09-05 Pedro Alves <palves@redhat.com>
3920
3921 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3922 tracepoint.h.
3923 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3924 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3925 (handle_tracepoint_general_set, handle_tracepoint_query)
3926 (tracepoint_finished_step, tracepoint_was_hit)
3927 (release_while_stepping_state_list, current_traceframe)
3928 (in_readonly_region, traceframe_read_mem)
3929 (fetch_traceframe_registers, traceframe_read_sdata)
3930 (traceframe_read_info, struct fast_tpoint_collect_status)
3931 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3932 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3933 (supply_fast_tracepoint_registers)
3934 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3935 (ipa_tdesc, claim_trampoline_space)
3936 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3937 (agent_mem_read, agent_get_trace_state_variable_value)
3938 (agent_set_trace_state_variable_value, agent_tsv_read)
3939 (agent_mem_read_string, get_raw_reg_func_addr)
3940 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3941 * tracepoint.h: ... this new file.
3942
39432013-09-05 Pedro Alves <palves@redhat.com>
3944
3945 * server.h (perror_with_name, error, fatal, warning, paddress)
3946 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3947 include it.
3948 * utils.h: New file.
3949
39502013-09-05 Pedro Alves <palves@redhat.com>
3951
3952 * server.h (remote_debug, noack_mode, transport_is_reliable)
3953 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3954 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3955 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3956 (write_enn, initialize_async_io, enable_async_io)
3957 (disable_async_io, check_remote_input_interrupt_request)
3958 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3959 (dead_thread_notify, prepare_resume_reply)
3960 (decode_address_to_semicolon, decode_address, decode_m_packet)
3961 (decode_M_packet, decode_X_packet, decode_xfer_write)
3962 (decode_search_memory_packet, unhexify, hexify)
3963 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3964 (look_up_one_symbol, relocate_instruction)
3965 (monitor_output): Move to remote-utils.h, and include it.
3966 * remote-utils.h: New file.
3967
39682013-09-05 Pedro Alves <palves@redhat.com>
3969
3970 * server.h (_): Delete.
3971
39722013-09-02 Pedro Alves <palves@redhat.com>
3973
3974 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3975 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3976 allocated.
3977 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3978
39792013-09-02 Pierre Muller <muller@sourceware.org>
3980
3981 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3982 or WriteProcessMemory complete successfully and handle
3983 ERROR_PARTIAL_COPY error.
3984
39852013-09-02 Pedro Alves <palves@redhat.com>
3986
3987 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3988 error instead of EIO.
3989
39902013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3991
3992 PR server/15604
3993 * linux-low.c: Include filestuff.h.
3994 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3995 * lynx-low.c: Include filestuff.h.
3996 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3997 * server.c: Include filestuff.h.
3998 (main): Call notice_open_fds.
3999 * spu-low.c: Include filestuff.h.
4000 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4001
40022013-08-22 Luis Machado <lgustavo@codesourcery.com>
4003
4004 * Makefile.in: Explain why ../target and ../nat are not
4005 listed as include file search paths.
4006 (linux-waitpid.o): New object file rule.
4007 * configure.srv (srv_native_linux_obj): New variable.
4008 Replace all occurrences of linux native object files with
4009 $srv_native_linux_obj.
4010 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4011 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4012 (linux_enable_event_reporting): Remove declaration.
4013 (my_waitpid): Moved to common/linux-waitpid.c.
4014 (linux_wait_for_event): Pass ptid when calling
4015 linux_enable_event_reporting.
4016 (linux_supports_tracefork_flag): Remove.
4017 (linux_enable_event_reporting): Likewise.
4018 (linux_tracefork_grandchild): Remove.
4019 (STACK_SIZE): Moved to common/linux-ptrace.c.
4020 (linux_tracefork_child): Remove.
4021 (linux_test_for_tracefork): Remove.
4022 (linux_look_up_symbols): Call linux_supports_traceclone.
4023 (initialize_low): Remove call to linux_test_for_tracefork.
4024 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4025 common/linux-ptrace.h.
4026 (PTRACE_TYPE_ARG4): Likewise.
4027 Include linux-ptrace.h.
4028
40292013-08-21 Pedro Alves <palves@redhat.com>
4030
4031 * config.in: Renegerate.
4032
40332013-08-19 Luis Machado <lgustavo@codesourcery.com>
4034
4035 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4036 (SFILES): Remove $(srcdir)/common/target-common.c and
4037 add $(srcdir)/target/waitstatus.c.
4038 (OBS): Remove target-common.o and add waitstatus.o.
4039 (server_h): Remove $(srcdir)/../common/target-common.h and
4040 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4041 and $(srcdir)/../target/waitstatus.h.
4042 (target-common.o): Remove.
4043 (waitstatus.o): New target object file.
4044 * target.h: Do not include target-common.h and
4045 include target/resume.h, target/wait.h and
4046 target/waitstatus.h.
4047
40482013-08-13 Luis Machado <lgustavo@codesourcery.com>
4049
4050 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4051 to PTRACE_TYPE_ARG3.
4052 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4053 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4054 PTRACE_TYPE_ARG4.
4055 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4056 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4057
40582013-07-27 Jie Zhang <jie@codesourcery.com>
4059 Daniel Jacobowitz <dan@codesourcery.com>
4060 Yao Qi <yao@codesourcery.com>
4061
4062 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4063 (mips-linux-watch.o): New rule.
4064 (mips_linux_watch_h): New variable.
4065 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4066 srv_tgtobj.
4067 * linux-mips-low.c: Include mips-linux-watch.h.
4068 (struct arch_process_info, struct arch_lwp_info): New.
4069 (update_watch_registers_callback): New function.
4070 (mips_linux_new_process, mips_linux_new_thread) New functions.
4071 (mips_linux_prepare_to_resume, mips_insert_point): New
4072 functions.
4073 (mips_remove_point, mips_stopped_by_watchpoint): New
4074 functions.
4075 (rsp_bp_type_to_target_hw_bp_type): New function.
4076 (mips_stopped_data_address): New function.
4077 (the_low_target): Add watchpoint support functions.
4078
40792013-07-27 Yao Qi <yao@codesourcery.com>
4080
4081 * i386-low.c: Include break-common.h.
4082 (enum target_hw_bp_type): Remove.
4083
40842013-07-24 Luis Machado <lgustavo@codesourcery.com>
4085
4086 * Makefile.in (SFILES): /common/target-common.c.
4087 (OBS): Add target-common.o.
4088 (server_h): Add $(srcdir)/../common/target-common.h.
4089 (target-common.o): New target.
4090 * server.c (queue_stop_reply_callback): Free
4091 status string after use.
4092 * target.c (target_waitstatus_to_string): Remove.
4093 * target.h: Include target-common.h.
4094 (resume_kind): Likewise.
4095 (target_waitkind): Likewise.
4096 (target_waitstatus): Likewise.
4097 (TARGET_WNOHANG): Likewise.
4098
40992013-07-04 Yao Qi <yao@codesourcery.com>
4100
4101 * Makefile.in (host_alias): Use @host_noncanonical@.
4102 (target_alias): Use @target_noncanonical@.
4103 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4104 ACX_NONCANONICAL_HOST.
4105 * configure: Regenerated.
4106
4107 Revert:
4108 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4109
4110 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4111 * configure: Rebuild.
4112 * Makefile.in (version_host, version_target): Get from configure.
4113 (version.c): Use $(version_host) and $(version_target).
4114
41152013-07-03 Pedro Alves <palves@redhat.com>
4116
4117 * Makefile.in (config.status): Depend on development.sh.
4118 * acinclude.m4: Include libmcheck.m4.
4119 * configure: Regenerate.
4120
41212013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4122
4123 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4124 attribute inside the parentheses.
4125 (winapi_DebugSetProcessKillOnExit): Ditto.
4126 (winapi_DebugBreakProcess): Ditto.
4127 (winapi_GenerateConsoleCtrlEvent): Ditto.
4128
41292013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4130
4131 * notif.h (notif_event): Add a dummy member to avoid compiler
4132 errors.
4133
41342013-07-01 Pedro Alves <palves@redhat.com>
4135
4136 * hostio.c (HOSTIO_PATH_MAX): Define.
4137 (require_filename, handle_open, handle_unlink, handle_readlink):
4138 Use it.
4139
41402013-07-01 Pedro Alves <palves@redhat.com>
4141
4142 * server.h: Include "pathmax.h".
4143 * linux-low.c: Don't include sys/param.h.
4144 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4145 MAXPATHLEN.
4146 * win32-low.c: Don't include sys/param.h.
4147 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4148
41492013-07-01 Pedro Alves <palves@redhat.com>
4150
4151 * event-loop.c: Don't check HAVE_UNISTD_H before including
4152 <unistd.h>.
4153 * gdbreplay.c: Likewise.
4154 * remote-utils.c: Likewise.
4155 * server.c: Likewise.
4156 * configure.ac: Don't check for unistd.h.
4157 * configure: Regenerate.
4158
41592013-06-28 Tom Tromey <tromey@redhat.com>
4160
4161 * Makefile.in (version.c): Use version.in, not
4162 common/version.in.
4163
41642013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4165
4166 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4167 * configure: Rebuild.
4168 * Makefile.in (version_host, version_target): Get from configure.
4169 (version.c): Use $(version_host) and $(version_target).
4170
41712013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4172
4173 Fix trace-status to output user name without trailing colon.
4174 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4175
41762013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4177
4178 Fix trace-status to output proper start-time and stop-time.
4179 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4180 output start time and stop time in hex as gdb expects.
4181
41822013-06-26 Pedro Alves <pedro@codesourcery.com>
4183
4184 * tracepoint.c (build_traceframe_info_xml): Output trace state
4185 variables present in the trace buffer.
4186
41872013-06-24 Tom Tromey <tromey@redhat.com>
4188
4189 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4190 create-version.sh.
4191 (version.o): Remove.
4192 * gdbreplay.c: Include version.h.
4193 (version, host_name): Don't declare.
4194 * server.h: Include version.h.
4195 (version, host_name): Don't declare.
4196
41972013-06-12 Pedro Alves <palves@redhat.com>
4198
4199 * linux-x86-low.c (linux_is_elf64): Delete global.
4200 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4201 with local linux_pid_exe_is_elf_64_file use.
4202
42032013-06-11 Pedro Alves <palves@redhat.com>
4204
4205 * linux-low.c (regset_disabled, disable_regset): New functions.
4206 (regsets_fetch_inferior_registers)
4207 (regsets_store_inferior_registers): Use them.
4208 (initialize_regsets_info); Don't allocate the disabled_regsets
4209 array here.
4210 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4211 comment.
4212
42132013-06-11 Pedro Alves <palves@redhat.com>
4214
4215 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4216 xmalloc.
4217
42182013-06-11 Pedro Alves <palves@redhat.com>
4219
4220 * linux-x86-low.c (initialize_low_arch): Call
4221 init_registers_x32_avx_linux.
4222
42232013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4224
4225 Fix compatibility with Android Bionic.
4226 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4227 it is not empty.
4228
42292013-06-07 Pedro Alves <palves@redhat.com>
4230
4231 PR server/14823
4232 * Makefile.in (OBS): Add tdesc.o.
4233 (IPA_OBJS): Add tdesc-ipa.o.
4234 (tdesc-ipa.o): New rule.
4235 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4236 interface.
4237 * linux-low.c (new_inferior): Delete.
4238 (disabled_regsets, num_regsets): Delete.
4239 (linux_add_process): Adjust to set the new per-process
4240 new_inferior flag.
4241 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4242 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4243 was a stop. When calling arch_setup, switch the current inferior
4244 to the thread that got an event.
4245 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4246 (regsets_fetch_inferior_registers)
4247 (regsets_store_inferior_registers): New regsets_info parameter.
4248 Adjust to use it.
4249 (linux_register_in_regsets): New regs_info parameter. Adjust to
4250 use it.
4251 (register_addr, fetch_register, store_register): New usrregs_info
4252 parameter. Adjust to use it.
4253 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4254 parameter regs_info. Adjust to use it.
4255 (linux_fetch_registers): Get the current inferior's regs_info, and
4256 adjust to use it.
4257 (linux_store_registers): Ditto.
4258 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4259 (initialize_low): Don't initialize the target_regsets here. Call
4260 initialize_low_arch.
4261 * linux-low.h (target_regsets): Delete declaration.
4262 (struct regsets_info): New.
4263 (struct usrregs_info): New.
4264 (struct regs_info): New.
4265 (struct process_info_private) <new_inferior>: New field.
4266 (struct linux_target_ops): Delete the num_regs, regmap, and
4267 regset_bitmap fields. New field regs_info.
4268 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4269 * i387-fp.c (num_xmm_registers): Delete.
4270 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4271 calls to new interface.
4272 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4273 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4274 Infer the number of xmm registers from the regcache's target
4275 description.
4276 * i387-fp.h (num_xmm_registers): Delete.
4277 * inferiors.c (add_thread): Don't install the thread's regcache
4278 here.
4279 * proc-service.c (gregset_info): Fetch the current inferior's
4280 regs_info. Adjust to use it.
4281 * regcache.c: Include tdesc.h.
4282 (register_bytes, reg_defs, num_registers)
4283 (gdbserver_expedite_regs): Delete.
4284 (get_thread_regcache): If the thread doesn't have a regcache yet,
4285 create one, instead of aborting gdbserver.
4286 (regcache_invalidate_one): Rename to ...
4287 (regcache_invalidate_thread): ... this.
4288 (regcache_invalidate_one): New.
4289 (regcache_invalidate): Only invalidate registers of the current
4290 process.
4291 (init_register_cache): Add target_desc parameter, and use it.
4292 (new_register_cache): Ditto. Assert the target description has a
4293 non zero registers_size.
4294 (regcache_cpy): Add assertions. Adjust.
4295 (realloc_register_cache, set_register_cache): Delete.
4296 (registers_to_string, registers_from_string): Adjust.
4297 (find_register_by_name, find_regno, find_register_by_number)
4298 (register_cache_size): Add target_desc parameter, and use it.
4299 (free_register_cache_thread, free_register_cache_thread_one)
4300 (regcache_release, register_cache_size): New.
4301 (register_size): Add target_desc parameter, and use it.
4302 (register_data, supply_register, supply_register_zeroed)
4303 (supply_regblock, supply_register_by_name, collect_register)
4304 (collect_register_as_string, collect_register_by_name): Adjust.
4305 * regcache.h (struct target_desc): Forward declare.
4306 (struct regcache) <tdesc>: New field.
4307 (init_register_cache, new_register_cache): Add target_desc
4308 parameter.
4309 (regcache_invalidate_thread): Declare.
4310 (regcache_invalidate_one): Delete declaration.
4311 (regcache_release): Declare.
4312 (find_register_by_number, register_cache_size, register_size)
4313 (find_regno): Add target_desc parameter.
4314 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4315 declarations.
4316 * remote-utils.c: Include tdesc.h.
4317 (outreg, prepare_resume_reply): Adjust.
4318 * server.c: Include tdesc.h.
4319 (gdbserver_xmltarget): Delete declaration.
4320 (get_features_xml, process_serial_event): Adjust.
4321 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4322 declare.
4323 (struct process_info) <tdesc>: New field.
4324 (ipa_tdesc): Declare.
4325 * tdesc.c: New file.
4326 * tdesc.h: New file.
4327 * tracepoint.c: Include tdesc.h.
4328 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4329 (get_context_regcache): Adjust to pass ipa_tdesc down.
4330 (do_action_at_tracepoint): Adjust to get the register cache size
4331 from the context regcache's description.
4332 (traceframe_walk_blocks): Adjust to get the register cache size
4333 from the current trace frame's description.
4334 (traceframe_get_pc): Adjust to get current trace frame's
4335 description and pass it down.
4336 (gdb_collect): Adjust to get the register cache size from the
4337 IPA's description.
4338 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4339 (gdbserver_xmltarget): Delete.
4340 (initialize_low_tracepoint): Set the ipa's target description.
4341 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4342 (initialize_low_tracepoint): Set the ipa's target description.
4343 * linux-x86-low.c: Include tdesc.h.
4344 [__x86_64__] (is_64bit_tdesc): New.
4345 (ps_get_thread_area, x86_get_thread_area): Use it.
4346 (i386_cannot_store_register): Rename to ...
4347 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4348 (i386_cannot_fetch_register): Rename to ...
4349 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4350 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4351 to new interface.
4352 (target_regsets): Rename to ...
4353 (x86_regsets): ... this.
4354 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4355 interface.
4356 (x86_siginfo_fixup): Use is_64bit_tdesc.
4357 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4358 (tdesc_x32_avx_linux, tdesc_x32_linux)
4359 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4360 Declare.
4361 (x86_linux_update_xmltarget): Delete.
4362 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4363 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4364 (AMD64_LINUX_USER64_CS): New.
4365 (x86_linux_read_description): New, based on
4366 x86_linux_update_xmltarget.
4367 (same_process_callback): New.
4368 (x86_arch_setup_process_callback): New.
4369 (x86_linux_update_xmltarget): New.
4370 (x86_regsets_info): New.
4371 (amd64_linux_regs_info): New.
4372 (i386_linux_usrregs_info): New.
4373 (i386_linux_regs_info): New.
4374 (x86_linux_regs_info): New.
4375 (x86_arch_setup): Reimplement.
4376 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4377 (x86_emit_ops): Ditto.
4378 (the_low_target): Adjust. Install x86_linux_regs_info,
4379 x86_cannot_fetch_register, and x86_cannot_store_register.
4380 (initialize_low_arch): New.
4381 * linux-ia64-low.c (tdesc_ia64): Declare.
4382 (ia64_fetch_register): Adjust.
4383 (ia64_usrregs_info, regs_info): New globals.
4384 (ia64_regs_info): New function.
4385 (the_low_target): Adjust.
4386 (initialize_low_arch): New function.
4387 * linux-sparc-low.c (tdesc_sparc64): Declare.
4388 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4389 Adjust.
4390 (sparc_arch_setup): New function.
4391 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4392 (the_low_target): Adjust.
4393 (initialize_low_arch): New function.
4394 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4395 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4396 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4397 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4398 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4399 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4400 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4401 (tdesc_powerpc_isa205_vsx64l): Declare.
4402 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4403 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4404 (ppc_set_pc, ppc_get_hwcap): Adjust.
4405 (ppc_usrregs_info): Forward declare.
4406 (!__powerpc64__) ppc_regmap_adjusted: New global.
4407 (ppc_arch_setup): Adjust to the current process'es target
4408 description.
4409 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4410 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4411 (ppc_store_evrregset): Adjust.
4412 (target_regsets): Rename to ...
4413 (ppc_regsets): ... this, and make static.
4414 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4415 (ppc_regs_info): New function.
4416 (the_low_target): Adjust.
4417 (initialize_low_arch): New function.
4418 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4419 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4420 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4421 (tdesc_s390x_linux64v2): Declare.
4422 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4423 (s390_fill_gregset, s390_store_last_break): Adjust.
4424 (target_regsets): Rename to ...
4425 (s390_regsets): ... this, and make static.
4426 (s390_get_pc, s390_set_pc): Adjust.
4427 (s390_get_hwcap): New target_desc parameter, and use it.
4428 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4429 (s390_arch_setup): Adjust to set the current process'es target
4430 description. Don't adjust the regmap.
4431 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4432 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4433 (regs_info_3264): New globals.
4434 (s390_regs_info): New function.
4435 (the_low_target): Adjust.
4436 (initialize_low_arch): New function.
4437 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4438 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4439 [__mips64] (init_registers_mips_linux)
4440 (init_registers_mips_dsp_linux): Delete defines.
4441 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4442 (have_dsp): New global.
4443 (mips_read_description): New, based on mips_arch_setup.
4444 (mips_arch_setup): Reimplement.
4445 (get_usrregs_info): New function.
4446 (mips_cannot_fetch_register, mips_cannot_store_register)
4447 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4448 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4449 (target_regsets): Rename to ...
4450 (mips_regsets): ... this, and make static.
4451 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4452 (dsp_regs_info, regs_info): New globals.
4453 (mips_regs_info): New function.
4454 (the_low_target): Adjust.
4455 (initialize_low_arch): New function.
4456 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4457 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4458 Declare.
4459 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4460 (arm_read_description): New, with bits factored from
4461 arm_arch_setup.
4462 (arm_arch_setup): Reimplement.
4463 (target_regsets): Rename to ...
4464 (arm_regsets): ... this, and make static.
4465 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4466 (arm_regs_info): New function.
4467 (the_low_target): Adjust.
4468 (initialize_low_arch): New function.
4469 * linux-m68k-low.c (tdesc_m68k): Declare.
4470 (target_regsets): Rename to ...
4471 (m68k_regsets): ... this, and make static.
4472 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4473 (m68k_regs_info): New function.
4474 (m68k_arch_setup): New function.
4475 (the_low_target): Adjust.
4476 (initialize_low_arch): New function.
4477 * linux-sh-low.c (tdesc_sharch): Declare.
4478 (target_regsets): Rename to ...
4479 (sh_regsets): ... this, and make static.
4480 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4481 (sh_regs_info, sh_arch_setup): New functions.
4482 (the_low_target): Adjust.
4483 (initialize_low_arch): New function.
4484 * linux-bfin-low.c (tdesc_bfin): Declare.
4485 (bfin_arch_setup): New function.
4486 (bfin_usrregs_info, regs_info): New globals.
4487 (bfin_regs_info): New function.
4488 (the_low_target): Adjust.
4489 (initialize_low_arch): New function.
4490 * linux-cris-low.c (tdesc_cris): Declare.
4491 (cris_arch_setup): New function.
4492 (cris_usrregs_info, regs_info): New globals.
4493 (cris_regs_info): New function.
4494 (the_low_target): Adjust.
4495 (initialize_low_arch): New function.
4496 * linux-cris-low.c (tdesc_crisv32): Declare.
4497 (cris_arch_setup): New function.
4498 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4499 (cris_regs_info): New function.
4500 (the_low_target): Adjust.
4501 (initialize_low_arch): New function.
4502 * linux-m32r-low.c (tdesc_m32r): Declare.
4503 (m32r_arch_setup): New function.
4504 (m32r_usrregs_info, regs_info): New globals.
4505 (m32r_regs_info): Adjust.
4506 (initialize_low_arch): New function.
4507 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4508 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4509 (tic6x_usrregs_info): Forward declare.
4510 (tic6x_read_description): New function, based on ...
4511 (tic6x_arch_setup): ... this. Reimplement.
4512 (target_regsets): Rename to ...
4513 (tic6x_regsets): ... this, and make static.
4514 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4515 (tic6x_regs_info): New function.
4516 (the_low_target): Adjust.
4517 (initialize_low_arch): New function.
4518 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4519 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4520 (target_regsets): Rename to ...
4521 (xtensa_regsets): ... this, and make static.
4522 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4523 globals.
4524 (xtensa_arch_setup, xtensa_regs_info): New functions.
4525 (the_low_target): Adjust.
4526 (initialize_low_arch): New function.
4527 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4528 (nios2_arch_setup): Set the current process'es tdesc.
4529 (target_regsets): Rename to ...
4530 (nios2_regsets): ... this.
4531 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4532 (nios2_regs_info): New function.
4533 (the_low_target): Adjust.
4534 (initialize_low_arch): New function.
4535 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4536 (aarch64_arch_setup): Set the current process'es tdesc.
4537 (target_regsets): Rename to ...
4538 (aarch64_regsets): ... this.
4539 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4540 (aarch64_regs_info): New function.
4541 (the_low_target): Adjust.
4542 (initialize_low_arch): New function.
4543 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4544 globals.
4545 (target_regsets): Rename to ...
4546 (tile_regsets): ... this.
4547 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4548 (tile_regs_info): New function.
4549 (tile_arch_setup): Set the current process'es tdesc.
4550 (the_low_target): Adjust.
4551 (initialize_low_arch): New function.
4552 * spu-low.c (tdesc_spu): Declare.
4553 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4554 * win32-arm-low.c (tdesc_arm): Declare.
4555 (arm_arch_setup): New function.
4556 (the_low_target): Install arm_arch_setup instead of
4557 init_registers_arm.
4558 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4559 (init_windows_x86): Rename to ...
4560 (i386_arch_setup): ... this. Set `win32_tdesc'.
4561 (the_low_target): Adjust.
4562 * win32-low.c (win32_tdesc): New global.
4563 (child_add_thread): Don't create the thread cache here.
4564 (do_initial_child_stuff): Set the new process'es tdesc.
4565 * win32-low.h (struct target_desc): Forward declare.
4566 (win32_tdesc): Declare.
4567 * lynx-i386-low.c (tdesc_i386): Declare global.
4568 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4569 * lynx-low.c (lynx_tdesc): New global.
4570 (lynx_add_process): Set the new process'es tdesc.
4571 * lynx-low.h (struct target_desc): Forward declare.
4572 (lynx_tdesc): Declare global.
4573 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4574 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4575 * nto-low.c (nto_tdesc): New global.
4576 (do_attach): Set the new process'es tdesc.
4577 * nto-low.h (struct target_desc): Forward declare.
4578 (nto_tdesc): Declare.
4579 * nto-x86-low.c (tdesc_i386): Declare.
4580 (nto_x86_arch_setup): Set `nto_tdesc'.
4581
45822013-06-04 Gary Benson <gbenson@redhat.com>
4583
4584 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4585 to qSupported response when appropriate.
4586 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4587 with nonzero-length annex.
4588 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4589 arguments supplied in annex.
4590
45912013-05-31 Doug Evans <dje@google.com>
4592
4593 PR server/15594
4594 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4595 64 bits in 64-cross-32 environment.
4596
45972013-05-28 Pedro Alves <palves@redhat.com>
4598
4599 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4600 (aarch64-without-fpu.c): Delete rule.
4601 * configure.srv (aarch64*-*-linux*): Remove references to
4602 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4603 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4604 declaration.
4605
46062013-05-24 Pedro Alves <palves@redhat.com>
4607
4608 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4609 instead of strchr/decode_address. Error if the range isn't split
4610 with a ','. Don't assume there's be a ':' in the action.
4611
46122013-05-23 Yao Qi <yao@codesourcery.com>
4613 Pedro Alves <palves@redhat.com>
4614
4615 * linux-low.c (lwp_in_step_range): New function.
4616 (linux_wait_1): If the thread was range stepping and stopped
4617 outside the stepping range, report the stop to GDB. Otherwise,
4618 continue stepping. Add range stepping debug output.
4619 (linux_set_resume_request): Copy the step range from the resume
4620 request to the lwp.
4621 (linux_supports_range_stepping): New.
4622 (linux_target_ops) <supports_range_stepping>: Set to
4623 linux_supports_range_stepping.
4624 * linux-low.h (struct linux_target_ops)
4625 <supports_range_stepping>: New field.
4626 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4627 * linux-x86-low.c (x86_supports_range_stepping): New.
4628 (the_low_target) <supports_range_stepping>: Set to
4629 x86_supports_range_stepping.
4630 * server.c (handle_v_cont): Handle 'r' action.
4631 (handle_v_requests): Append ";r" if the target supports range
4632 stepping.
4633 * target.h (struct thread_resume) <step_range_start,
4634 step_range_end>: New fields.
4635 (struct target_ops) <supports_range_stepping>:
4636 New field.
4637 (target_supports_range_stepping): New macro.
4638
46392013-05-17 Joel Brobecker <brobecker@adacore.com>
4640
4641 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4642 confusion in comment.
4643
46442013-05-17 Joel Brobecker <brobecker@adacore.com>
4645
4646 * lynx-low.c (struct process_info_private): New type.
4647 (lynx_add_process): New function.
4648 (lynx_create_inferior, lynx_attach): Replace calls to
4649 add_process by calls to lynx_add_process.
4650 (lynx_resume): If PTID is null, then try using
4651 current_process()->private->last_wait_event_ptid.
4652 Add comments.
4653 (lynx_clear_inferiors): Delete. The contents of that function
4654 has been inlined in lynx_mourn;
4655 (lynx_wait_1): Save the ptid in the process's private data.
4656 (lynx_mourn): Free the process' private data. Replace call
4657 to lynx_clear_inferiors by call to clear_inferiors.
4658
46592013-05-17 Yao Qi <yao@codesourcery.com>
4660
4661 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4662 the right place.
4663
46642013-05-16 Luis Machado <lgustavo@codesourcery.com>
4665
4666 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4667 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4668 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4669 PT_TEXT_END_ADDR guards. Update comments.
4670 (linux_target_op) <read_offsets>: Conditionally define to
4671 linux_read_offsets if the target is UCLIBC and if it defines
4672 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4673
46742013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4675 Andrew Jenner <andrew@codesourcery.com>
4676
4677 * Makefile.in (SFILES): Add linux-nios2-low.c.
4678 (clean): Add action to delete nios2-linux.c.
4679 (nios2-linux.c): New rule.
4680 * configure.srv: Add nios2*-*-linux*.
4681 * linux-nios2-low.c: New.
4682
46832013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4684
4685 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4686
46872013-04-25 Hui Zhu <hui@codesourcery.com>
4688
4689 PR gdb/15186
4690 * ax.c (ax_printf): Add fflush.
4691
46922013-04-22 Tom Tromey <tromey@redhat.com>
4693
4694 * Makefile.in (SFILES): Add filestuff.c.
4695 (OBS): Add filestuff.o.
4696 (filestuff.o): New target.
4697 * config.in, configure: Rebuild.
4698 * configure.ac: Check for fdwalk, pipe2.
4699
47002013-04-17 Pedro Alves <palves@redhat.com>
4701
4702 * configure.ac (USE_THREAD_DB): Delete variable.
4703 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4704 Don't AC_SUBST USE_THREAD_DB.
4705 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4706 * config.in, configure: Regenerate.
4707
47082013-04-16 Pedro Alves <palves@redhat.com>
4709
4710 * linux-low.h (struct lwp_info) <thread_known>: Move under
4711 the USE_THREAD_DB #ifdef.
4712
47132013-04-16 Pedro Alves <palves@redhat.com>
4714
4715 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4716 (linux-low.o): Delete rule.
4717 * linux-low.h: Always include "gdb_thread_db.h" instead of
4718 conditionally including thread_db.h.
4719 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4720 HAVE_THREAD_DB_H.
4721
47222013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4723
4724 * Makefile.in (install-only): Fix make install regression.
4725
47262013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4727
4728 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4729 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4730 installation.
4731 * gdbserver.1: Remove.
4732
47332013-03-22 Pedro Alves <palves@redhat.com>
4734
4735 * linux-low.c (handle_extended_wait): Don't call
4736 linux_enable_event_reporting.
4737
47382013-03-15 Tony Theodore <tonyt@logyst.com>
4739
4740 PR build/9098:
4741 * Makefile.in (SHELL): Use @SHELL@.
4742
47432013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4744
4745 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4746 compiler warning.
4747
47482013-03-13 Joel Brobecker <brobecker@adacore.com>
4749
4750 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4751 Remove extraneous NULL element.
4752
47532013-03-13 Yao Qi <yao@codesourcery.com>
4754
4755 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4756 'V' block in trace frame.
4757
47582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4759
4760 * target.h (struct target_ops): Add btrace ops.
4761 (target_supports_btrace): New macro.
4762 (target_enable_btrace): New macro.
4763 (target_disable_btrace): New macro.
4764 (target_read_btrace): New macro.
4765 * gdbthread.h (struct thread_info): Add btrace field.
4766 * server.c: Include btrace-common.h.
4767 (handle_btrace_general_set): New function.
4768 (handle_btrace_enable): New function.
4769 (handle_btrace_disable): New function.
4770 (handle_general_set): Call handle_btrace_general_set.
4771 (handle_qxfer_btrace): New function.
4772 (struct qxfer qxfer_packets[]): Add btrace entry.
4773 * inferiors.c (remove_thread): Disable btrace.
4774 * linux-low: Include linux-btrace.h.
4775 (linux_low_enable_btrace): New function.
4776 (linux_low_read_btrace): New function.
4777 (linux_target_ops): Add btrace ops.
4778 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4779 Add srv_linux_btrace=yes.
4780 (x86_64-*-linux*): Add linux-btrace.o.
4781 Add srv_linux_btrace=yes.
4782 * configure.ac: Define HAVE_LINUX_BTRACE.
4783 * config.in: Regenerated.
4784 * configure: Regenerated.
4785
47862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4787
4788 * server.c (handle_qxfer): Preserve error message if -3 is
4789 returned.
4790 (qxfer): Document the -3 return value.
4791
47922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4793
4794 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4795 (linux_btrace_h): New variable.
4796 (linux-btrace.o): New rule.
4797
47982013-03-08 Stan Shebs <stan@codesourcery.com>
4799 Hafiz Abid Qadeer <abidh@codesourcery.com>
4800
4801 * tracepoint.c (trace_buffer_size): New global.
4802 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4803 (init_trace_buffer): Change to one-argument function. Allocate
4804 trace buffer memory.
4805 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4806 handle QTBuffer:size packet.
4807 (cmd_bigqtbuffer_size): New function.
4808 (initialize_tracepoint): Call init_trace_buffer with
4809 DEFAULT_TRACE_BUFFER_SIZE.
4810 * server.c (handle_query): Add QTBuffer:size in the
4811 supported packets.
4812
48132013-03-07 Yao Qi <yao@codesourcery.com>
4814
4815 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4816 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4817 of -1.
4818 (cmd_qtsp): Adjust condition. Do post increment.
4819 Set cur_action and cur_step_action back to 0.
4820
48212013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4822
4823 PR server/15236
4824 * linux-low.c (linux_write_memory): Return early success if LEN is
4825 zero.
4826
48272013-03-05 Corinna Vinschen <vinschen@redhat.de>
4828
4829 * configure.srv: Add x86_64-*-cygwin* as target.
4830
48312013-02-28 Tom Tromey <tromey@redhat.com>
4832
4833 * configure.ac: Invoke AC_SYS_LARGEFILE.
4834 * configure, config.in: Rebuild.
4835
48362013-02-28 Corinna Vinschen <vinschen@redhat.com>
4837
4838 * win32-low.c: Throughout, fix format strings and casts of
4839 printf-like functions to avoid type related warnings on all
4840 platforms.
4841 (get_child_debug_event): Print dwDebugEventCode as hex since
4842 that's how it's usually documented.
4843
48442013-02-28 Yao Qi <yao@codesourcery.com>
4845
4846 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4847 pulongest.
4848
48492013-02-27 Jiong Wang <jiwang@tilera.com>
4850
4851 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4852 (reg-tilegx32.c): New rule.
4853 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4854 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4855 different register info initializer according to elf class.
4856 (init_registers_tilgx32): New function. The tilegx32 register info
4857 initializer.
4858 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4859 (tile_store_gregset): Likewise.
4860
48612013-02-27 Yao Qi <yao@codesourcery.com>
4862
4863 * server.c (process_point_options): Print debug message when
4864 debug_threads is true.
4865
48662013-02-26 Yao Qi <yao@codesourcery.com>
4867
4868 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4869
48702013-02-19 Pedro Alves <palves@redhat.com>
4871 Kai Tietz <ktietz@redhat.com>
4872
4873 PR gdb/15161
4874
4875 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4876 instead of strtoul to extract address from packet.
4877 (process_serial_event) <'z'>: Likewise.
4878
48792013-02-18 Yao Qi <yao@codesourcery.com>
4880
4881 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4882
48832013-02-14 Pedro Alves <palves@redhat.com>
4884
4885 Plug memory leak.
4886
4887 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4888 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4889
48902013-02-14 Pedro Alves <palves@redhat.com>
4891
4892 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4893
48942013-02-14 Pedro Alves <palves@redhat.com>
4895
4896 * tracepoint.c (save_string): Delete.
4897 (add_tracepoint_action): Use savestring instead of save_string.
4898
48992013-02-12 Pedro Alves <palves@redhat.com>
4900
4901 * linux-xtensa-low.c: Ditto.
4902 * xtensa-xtregs.c: Ditto.
4903
49042013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4905
4906 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4907 thread_db.
4908
49092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4910
4911 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4912 aarch64_num_wp_regs and aarch64_num_bp_regs to
4913 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4914
49152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4916
4917 * linux-aarch64-low.c (ps_get_thread_area): Replace
4918 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4919
49202013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4921 Marcus Shawcroft <marcus.shawcroft@arm.com>
4922 Nigel Stephens <nigel.stephens@arm.com>
4923 Yufeng Zhang <yufeng.zhang@arm.com>
4924
4925 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4926 (aarch64.c, aarch64-without-fpu.c): New targets.
4927 * configure.srv (aarch64*-*-linux*): New.
4928 * linux-aarch64-low.c: New file.
4929
49302013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4931
4932 * linux-low.c (handle_extended_wait, linux_create_inferior)
4933 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4934 (dequeue_one_deferred_signal, linux_resume_one_thread)
4935 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4936 (linux_tracefork_grandchild, linux_test_for_tracefork)
4937 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4938 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4939 where the argument is 0.
4940
49412013-01-25 Yao Qi <yao@codesourcery.com>
4942
4943 * event-loop.c: Include "queue.h".
4944 (gdb_event_p): New typedef.
4945 (struct gdb_event) <next_event>: Remove.
4946 (event_queue): Change to QUEUE(gdb_event_p).
4947 (async_queue_event): Remove.
4948 (gdb_event_xfree): New.
4949 (initialize_event_loop): New.
4950 (process_event): Use API from QUEUE.
4951 (wait_for_event): Likewise.
4952 * server.c (main): Call initialize_event_loop.
4953 * server.h (initialize_event_loop): Declare.
4954
49552013-01-18 Yao Qi <yao@codesourcery.com>
4956
4957 * ax.h (struct eval_agent_expr_context): New.
4958 (gdb_eval_agent_expr): Update declaration.
4959 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4960 TFRAME. Add new argument CTX.
4961 * server.h (struct eval_agent_expr_context): Declare.
4962 (agent_mem_read, agent_tsv_read): Update declaration.
4963 (agent_mem_read_string): Likewise.
4964 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4965 (add_traceframe_block): Add new argument TPOINT.
4966 Increase TPOINT->traceframe_usage.
4967 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4968 eval_tracepoint_agent_expr.
4969 (condition_true_at_tracepoint): Likewise.
4970 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4971 (agent_mem_read_string, agent_tsv_read): Likewise.
4972
49732013-01-16 Yao Qi <yao@codesourcery.com>
4974
4975 * linux-low.c (linux_resume_one_lwp): Don't check
4976 'lwp->bp_reinsert != 0'.
4977
49782013-01-07 Joel Brobecker <brobecker@adacore.com>
4979 Pedro Alves <palves@redhat.com>
4980
4981 * lynx-low.c (ptrace_request_to_str): Define a temporary
4982 macro and use it to simplify this function's implementation.
4983
49842013-01-07 Joel Brobecker <brobecker@adacore.com>
4985
4986 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4987 sets errno.
4988
49892013-01-07 Joel Brobecker <brobecker@adacore.com>
4990
4991 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4992
49932013-01-07 Joel Brobecker <brobecker@adacore.com>
4994
4995 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4996
49972013-01-07 Joel Brobecker <brobecker@adacore.com>
4998
4999 * lynx-low.c (lynx_resume): Use the resume_info parameter
5000 to determine the ptid for the lynx_ptrace call, unless
5001 it is equal to minus_one_ptid, in which case we use the
5002 ptid of the current_inferior.
5003 (lynx_wait_1): After having received a thread create/exit
5004 event, resume the inferior's execution using the signaling
5005 thread's ptid, rather than the old ptid.
5006
50072013-01-07 Joel Brobecker <brobecker@adacore.com>
5008
5009 * lynx-low.c (lynx_resume): Delete variable ret.
5010
50112013-01-01 Joel Brobecker <brobecker@adacore.com>
5012
5013 * gdbreplay.c (gdbreplay_version): Update copyright year.
5014 * server.c (gdbserver_version): Likewise.
5015
50162012-12-17 Joel Brobecker <brobecker@adacore.com>
5017
5018 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5019 new thread.
5020
50212012-12-17 Joel Brobecker <brobecker@adacore.com>
5022
5023 * lynx-low.c (ptrace_request_to_str): Add handling for
5024 PTRACE_GETTRACESIG.
5025
50262012-12-17 Joel Brobecker <brobecker@adacore.com>
5027
5028 * lynx-low.c (lynx_attach): Delete variable new_process.
5029
50302012-12-17 Joel Brobecker <brobecker@adacore.com>
5031
5032 * lynx-low.c (lynx_create_inferior): Delete variable
5033 new_process.
5034
50352012-12-17 Joel Brobecker <brobecker@adacore.com>
5036
5037 * lynx-low.c (ptrace_request_to_str): Do not handle
5038 PTRACE_GETTHREADLIST if this macro does not exist.
5039
50402012-12-15 Yao Qi <yao@codesourcery.com>
5041
5042 * Makefile.in (OBS): Add notif.o.
5043 * notif.c, notif.h: New.
5044 * server.c: Include "notif.h".
5045 (struct vstop_notif) <next>: Remove.
5046 <base>: New field.
5047 (queue_stop_reply): Update.
5048 (push_event, send_next_stop_reply): Remove.
5049 (discard_queued_stop_replies): Update.
5050 (notif_stop): New variable.
5051 (handle_v_stopped): Remove.
5052 (handle_v_requests): Don't call handle_v_stopped. Call
5053 handle_ack_notif instead.
5054 (queue_stop_reply_callback): Call notif_event_enque instead
5055 of queue_stop_reply.
5056 (handle_status): Don't call send_next_stop_reply, call
5057 notif_write_event instead.
5058 (kill_inferior_callback): Likewise.
5059 (detach_or_kill_inferior_callback): Likewise.
5060 (main): Call initialize_notif.
5061 (process_serial_event): Call QUEUE_is_empty.
5062 (handle_target_event): Call notif_push instead of push event.
5063 * server.h (push_event): Remove declaration.
5064
50652012-12-10 Tom Tromey <tromey@redhat.com>
5066
5067 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5068 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5069 macros.
5070 (.c.o): Rewrite.
5071 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5072 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5073 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5074 (amd64-linux-ipa.o, ax.o): Rewrite.
5075 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5076 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5077 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5078 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5079 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5080 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5081 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5082 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5083 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5084 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5085 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5086 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5087 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5088 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5089 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5090 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5091 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5092 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5093 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5094 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5095 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5096 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5097 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5098 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5099 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5100 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5101 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5102 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5103 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5104 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5105 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5106 (reg-tilegx.o): Remove.
5107 (all_object_files): New macro.
5108 Include .deps files.
5109 * aclocal.m4, configure: Rebuild.
5110 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5111 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5112 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5113
51142012-12-05 Tom Tromey <tromey@redhat.com>
5115
5116 PR gdb/14917:
5117 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5118
51192012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5120
5121 * configure.ac: Check for linux/perf_event.h.
5122 * config.in: Regenerated.
5123 * configure: Regenerated.
5124
51252012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5126
5127 * hostio.c (handle_readlink): Decrease buffer size
5128 parameter passed to readlink by one byte.
5129
51302012-11-26 Yao Qi <yao@codesourcery.com>
5131
5132 * configure.ac (build_warnings): Append '-Wempty-body'.
5133 * configure: Regenerated.
5134 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5135 body.
5136
51372012-11-15 Pierre Muller <muller@sourceware.org>
5138
5139 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5140 * config.in: Regenerate.
5141 * configure: Regenerate.
5142 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5143 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5144 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5145 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5146 header.
5147 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5148 instead of <sys/wait.h> header.
5149 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5150
51512012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5152
5153 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5154 (various make rules): Remove -DGDBSERVER
5155
51562012-11-09 Yao Qi <yao@codesourcery.com>
5157
5158 * spu-low.c (current_ptid): Move it to ..
5159 * gdbthread.h: ... here. New.
5160 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5161 * server.c (myresume, process_serial_event): Likewise.
5162 * thread-db.c (thread_db_find_new_threads): Likewise.
5163 * tracepoint.c (run_inferior_command): Likewise.
5164
51652012-10-01 Andrew Burgess <aburgess@broadcom.com>
5166
5167 * server.c (handle_search_memory_1): Include access length in
5168 warning message.
5169
51702012-09-05 Michael Brandt <michael.brandt@axis.com>
5171
5172 * linux-crisv32-low.c: Fix compile errors.
5173
51742012-09-04 Yao Qi <yao@codesourcery.com>
5175
5176 * tracepoint.c (cmd_qtsv): Adjust debug message.
5177 Don't check CUR_TPOINT.
5178
51792012-08-28 Yao Qi <yao@codesourcery.com>
5180
5181 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5182 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5183 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5184 Remove declarations of xmalloc, xreallloc, xstrdup and
5185 freeargv.
5186 * Makefile.in (libiberty_h): New.
5187 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5188 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5189
51902012-08-23 Yao Qi <yao@codesourcery.com>
5191
5192 * server.h: Remove declaration of 'xsnprintf'.
5193
51942012-08-22 Keith Seitz <keiths@redhat.com>
5195
5196 * server.h: Include build-gnulib-gbserver/config.h.
5197 * gdbreplay.c: Likewise.
5198
51992012-08-08 Doug Evans <dje@google.com>
5200
5201 * Makefile.in (SFILES): Add gdb_vecs.c.
5202 (OBS): Add gdb_vecs.o.
5203 (gdb_vecs_h, host_defs_h): New variables.
5204 (thread-db.o): Add $(gdb_vecs_h) dependency.
5205 (gdb_vecs.o): New rule.
5206 * thread-db.c: #include "gdb_vecs.h".
5207 (thread_db_load_search): Use a vector to iterate over path elements.
5208 Handle text appearing after "$pdir".
5209
5210 * configure.ac: Add check for strstr.
5211 * config.in: Regenerate.
5212 * configure: Regenerate.
5213
52142012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5215
5216 * hostio.c (handle_pread): If pread fails, fall back to attempting
5217 lseek/read.
5218 (handle_pwrite): Likewise for pwrite.
5219
52202012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5221
5222 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5223 between unsupported TYPE and unimplementable ADDR/LEN combination.
5224 (arm_insert_point): Act on new return value.
5225
52262012-07-31 Pedro Alves <palves@redhat.com>
5227
5228 * server.c (process_point_options): Only skip tokens if we find
5229 one that is unrecognized. Don't treat 'X' specially while
5230 skipping unrecognized tokens.
5231
52322012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5233
5234 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5235 to 4-byte-align HW breakpoint addresses for Thumb.
5236
52372012-07-27 Yao Qi <yao@codesourcery.com>
5238
5239 PR remote/14161.
5240
5241 * server.h: Declare gdb_agent_about_to_close.
5242 * target.c (kill_inferior): Include "agent.h".
5243 New. Send command 'kill'.
5244 * target.h (kill_inferior): Removed macro.
5245 * tracepoint.c (gdb_agent_about_to_close): New.
5246 (gdb_agent_helper_thread): Handle command 'close'.
5247 Wait endlessly until the inferior stops.
5248 Install gdb_agent_remove_socket to atexit hook.
5249 (agent_socket_name): New static variable.
5250 (gdb_agent_socket_init): Replace local variable 'name' with
5251 'agent_socket_name'.
5252 (gdb_agent_remove_socket): New.
5253
52542012-07-27 Yao Qi <yao@codesourcery.com>
5255
5256 * server.c (process_point_options): Stop at 'X' when parsing.
5257
52582012-07-19 Michael Eager <eager@eagercon.com>
5259
5260 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5261 to hw_execute.
5262 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5263 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5264 hardware breakpoint.
5265
52662012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5267
5268 * gdbserver/linux-low.c (initialize_low): Call
5269 linux_ptrace_init_warnings.
5270
52712012-07-02 Doug Evans <dje@google.com>
5272
5273 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5274 pointer to int.
5275
52762012-07-02 Stan Shebs <stan@codesourcery.com>
5277
5278 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5279 (ax.o): Add it to build rule.
5280 (ax-ipa.o): Ditto.
5281 (OBS): Add format.o.
5282 (IPA_OBS): Add format.o.
5283 * server.c (handle_query): Claim support for breakpoint commands.
5284 (process_point_options): Add command case.
5285 (process_serial_event): Leave running if there are printfs in
5286 effect.
5287 * mem-break.h (any_persistent_commands): Declare.
5288 (add_breakpoint_commands): Declare.
5289 (gdb_no_commands_at_breakpoint): Declare.
5290 (run_breakpoint_commands): Declare.
5291 * mem-break.c (struct point_command_list): New struct.
5292 (struct breakpoint): New field command_list.
5293 (any_persistent_commands): New function.
5294 (add_commands_to_breakpoint): New function.
5295 (add_breakpoint_commands): New function.
5296 (gdb_no_commands_at_breakpoint): New function.
5297 (run_breakpoint_commands): New function.
5298 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5299 locally.
5300 * ax.c: Include format.h.
5301 (ax_printf): New function.
5302 (gdb_eval_agent_expr): Add printf opcode.
5303
53042012-06-13 Yao Qi <yao@codesourcery.com>
5305
5306 * server.c (start_inferior): Remove duplicated writes to fields
5307 'last_resume_kind' and 'last_status' of 'current_inferior'.
5308
53092012-06-12 Yao Qi <yao@codesourcery.com>
5310 Pedro Alves <palves@redhat.com>
5311
5312 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5313 comment.
5314 * server.c (handle_v_cont): Extend comment.
5315
53162012-06-11 Yao Qi <yao@codesourcery.com>
5317
5318 * linux-low.c (linux_attach): Add 'static'.
5319
53202012-06-06 Yao Qi <yao@codesourcery.com>
5321
5322 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5323
53242012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5325
5326 Fix gcc -flto compilation warning.
5327 * server.c (main): Make variable multi_mode and attach volatile.
5328
53292012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5330
5331 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5332 if the platform doesn't know about it.
5333
53342012-05-30 Jeff Kenton <jkenton@tilera.com>
5335
5336 * Makefile.in (SFILES): Add linux-tile-low.c.
5337 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5338 * configure.srv: Handle tilegx-*-linux*.
5339 * linux-tile-low.c: New file.
5340
53412012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5342
5343 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5344
53452012-05-24 Pedro Alves <palves@redhat.com>
5346
5347 PR gdb/7205
5348
5349 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5350
53512012-05-24 Pedro Alves <palves@redhat.com>
5352
5353 PR gdb/7205
5354
5355 Replace target_signal with gdb_signal throughout.
5356
53572012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5358
5359 * linux-low.c (linux_store_registers): Avoid the copying sequence
5360 when no data has been retrieved by ptrace.
5361
53622012-05-22 Will Deacon <will.deacon@arm.com>
5363
5364 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5365 Include asm/ptrace.h.
5366 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5367 already defined.
5368
53692012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5370
5371 * linux-low.c (linux_store_registers): Don't re-retrieve data
5372 with ptrace that has already been obtained from /proc. Always
5373 copy any data retrieved with ptrace to the buffer supplied.
5374
53752012-05-11 Yao Qi <yao@codesourcery.com>
5376 Pedro Alves <palves@redhat.com>
5377
5378 * linux-low.c (enum stopping_threads_kind): New.
5379 (stopping_threads): Change type to `enum stopping_threads_kind'.
5380 (handle_extended_wait): If stopping and suspending threads, leave
5381 the new_lwp suspended too.
5382 (linux_wait_for_event): Adjust.
5383 (stop_all_lwps): Set `stopping_threads' to
5384 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5385 whether we're suspending threads or just stopping them. Assert no
5386 recursion happens.
5387
53882012-04-29 Yao Qi <yao@codesourcery.com>
5389
5390 * server.h: Move some code to ...
5391 * gdbthread.h: ... here. New.
5392 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5393 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5394 (nto-low.o, win32-low.o): Likewise.
5395 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5396 * regcache.c, remote-utils.c, server.c: Likewise.
5397 * target.c, tracepoint.c, win32-low.c: Likewise.
5398
53992012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5400
5401 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5402 (PTRACE_ARG4_TYPE): Likewise.
5403 (PTRACE_XFER_TYPE): Likewise.
5404 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5405 ptrace to PTRACE_ARG3_TYPE.
5406 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5407 (PTRACE_ARG4_TYPE): Likewise.
5408 (PTRACE_XFER_TYPE): Likewise.
5409 (linux_detach_one_lwp): Cast fourth argument of
5410 ptrace to long then PTRACE_ARG4_TYPE.
5411 (regsets_fetch_inferior_registers): Cast third argument of
5412 ptrace to long then PTRACE_ARG3_TYPE.
5413 (regsets_store_inferior_registers): Likewise.
5414
54152012-04-20 Pedro Alves <palves@redhat.com>
5416
5417 * configure: Regenerate.
5418
54192012-04-19 Pedro Alves <palves@redhat.com>
5420
5421 * Makefile.in (GNULIB_BUILDDIR): New.
5422 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5423 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5424 (all, install-only, uninstall, clean-info, all-lib, clean): No
5425 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5426 (maintainer-clean realclean distclean): Use subdir_do.
5427 (subdir_do): New.
5428 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5429 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5430 * acinclude.m4: Include acx_configure_dir.m4.
5431 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5432 calls. Call AC_PROG_RANLIB. Configure gnulib using
5433 ACX_CONFIGURE_DIR.
5434 (GNULIB): New.
5435 (GNULIB_STDINT_H): Adjust.
5436 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5437 * gdbreplay.c: Include build-gnulib/config.h.
5438 * server.h: Likewise.
5439 * aclocal.m4: Regenerate.
5440 * config.in: Regenerate.
5441 * configure: Regenerate.
5442
54432012-04-19 Pedro Alves <palves@redhat.com>
5444
5445 * Makefile.in (LIBGNU, INCGNU): Adjust.
5446 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5447 (all, install-only, uninstall, clean-info, all-lib, clean)
5448 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5449 * configure.ac: Adjust AC_OUTPUT output.
5450 * aclocal.m4: Regenerate.
5451 * configure: Regenerate.
5452
54532012-04-19 Pedro Alves <palves@redhat.com>
5454
5455 * Makefile.in (generated_files): New.
5456 (server_h): Remove the explicit dependency on config.h, and depend
5457 on $generated_files.
5458
54592012-04-19 Pedro Alves <palves@redhat.com>
5460
5461 * Makefile.in (INCGNU): Add -Ignulib.
5462
54632012-04-19 Pedro Alves <palves@redhat.com>
5464
5465 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5466 (INCGNU): ... this, and spell out -I here.
5467 (GNULIB_LIB): Rename to ...
5468 (LIBGNU): ... this.
5469 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5470
54712012-04-19 Pedro Alves <palves@redhat.com>
5472
5473 * config.in: Regenerate.
5474
54752012-04-19 Pedro Alves <palves@redhat.com>
5476
5477 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5478 * server.h (memmem): Remove declaration.
5479 * config.in: Regenerate.
5480 * configure: Regenerate.
5481
54822012-04-19 Yao Qi <yao@codesourcery.com>
5483
5484 * Makefile.in (SFILES): Add common/vec.c.
5485 (OBS): Add vec.o.
5486 (vec.o): New rule.
5487
54882012-04-19 Yao Qi <yao@codesourcery.com>
5489
5490 * remote-utils.c (prepare_resume_reply): Replace with macro
5491 target_core_of_thread.
5492 * server.c (handle_qxfer_threads_proper): Likewise.
5493 * target.h (traget_core_of_thread): New macro.
5494
54952012-04-18 Pedro Alves <palves@redhat.com>
5496
5497 * aclocal.m4: Regenerate.
5498 * configure: Regenerate.
5499
55002012-04-16 Yao Qi <yao@codesourcery.com>
5501
5502 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5503 duplicated on address.
5504
55052012-04-16 Yao Qi <yao@codesourcery.com>
5506
5507 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5508 (struct tracepoint_action_ops) <send>: New field.
5509 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5510 (agent_expr_send, x_tracepoint_action_send): New.
5511 (l_tracepoint_action_send): New.
5512 (cmd_qtdp): Download and install tracepoint
5513 according to `use_agent'.
5514 (run_inferior_command): Add one more parameter `len'.
5515 Update callers.
5516 (tracepoint_send_agent): New.
5517 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5518
55192012-04-16 Yao Qi <yao@codesourcery.com>
5520
5521 * tracepoint.c (download_tracepoints): Moved to ...
5522 (cmd_qtstart): ... here.
5523
55242012-04-14 Yao Qi <yao@codesourcery.com>
5525
5526 * tracepoint.c: Include inttypes.h.
5527 (struct collect_memory_action): Use sized types.
5528 (struct tracepoint): Likewise.
5529 (cmd_qtdp, stop_tracing): Update print specifiers.
5530 (cmd_qtp, response_tracepoint): Likewise.
5531 (collect_data_at_tracepoint): Likewise.
5532 (collect_data_at_step): Likewise.
5533
55342012-04-14 Yao Qi <yao@codesourcery.com>
5535
5536 Import gnulib module inttypes.
5537 * aclocal.m4, config.in, configure: Regenerated.
5538
55392012-04-14 Yao Qi <yao@codesourcery.com>
5540
5541 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5542 Makefile and config.status at last.
5543
55442012-04-13 Yao Qi <yao@codesourcery.com>
5545
5546 * tracepoint.c: Include stdint.h unconditionally.
5547
55482012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5549
5550 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5551 on BFD_HAVE_SYS_PROCFS_TYPE.
5552 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5553 * configure: Regenerate.
5554 * config.in: Likewise.
5555
55562012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5557
5558 * Makefile.in (clean): Also remove x32.c x32-linux.c
5559 x32-avx.c x32-avx-linux.c.
5560 (x32.o): New target.
5561 (x32.c): Likewise.
5562 (x32-linux.o): Likewise.
5563 (x32-linux.c): Likewise.
5564 (x32-avx.o): Likewise.
5565 (x32-avx.c): Likewise.
5566 (x32-avx-linux.o): Likewise.
5567 (x32-avx-linux.c): Likewise.
5568
5569 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5570 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5571 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5572 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5573 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5574 i386/x32-avx-linux.xml.
5575
5576 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5577 (init_registers_x32_avx_linux): Likwise.
5578 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5579 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5580
55812012-04-13 Pedro Alves <palves@redhat.com>
5582
5583 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5584 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5585 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5586 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5587 the sub-make.
5588
55892012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5590
5591 * linux-x86-low.c (compat_x32_clock_t): New.
5592 (compat_x32_siginfo_t): Likewise.
5593 (compat_x32_siginfo_from_siginfo): Likewise.
5594 (siginfo_from_compat_x32_siginfo): Likewise.
5595 (linux_is_elf64): Likewise.
5596 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5597 and siginfo_from_compat_x32_siginfo for x32.
5598 (x86_arch_setup): Set linux_is_elf64.
5599
56002012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5601
5602 PR gdb/13969
5603 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5604 e_machine field.
5605 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5606 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5607 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5608 compatible with process.
5609
56102012-04-12 Yao Qi <yao@codesourcery.com>
5611
5612 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5613 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5614 (install-only, install-info, clean): Handle sub dir gnulib.
5615 (all-lib, am--refresh): New targets.
5616 (memmem.o): Remove target.
5617 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5618 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5619 (AC_REPLACE_FUNCS): Remove memmem.
5620 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5621 (AC_OUTPUT): Generate Makefile in gnulib/.
5622 * aclocal.m4, config.in, configure: Regenerated.
5623
56242012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5625
5626 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5627
56282012-04-05 Pedro Alves <palves@redhat.com>
5629
5630 -Werror=strict-aliasing
5631
5632 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5633 pointer.
5634
56352012-04-04 Pedro Alves <palves@redhat.com>
5636
5637 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5638 (sparc_store_gregset_from_stack, sparc_store_gregset)
5639 (sparc_breakpoint_at): Fix formatting.
5640
56412012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5642
5643 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5644 are available.
5645 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5646 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5647 * config.in: Regenerate.
5648 * configure: Likewise.
5649
56502012-03-29 Pedro Alves <palves@redhat.com>
5651
5652 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5653 Correct ptrace arguments.
5654
56552012-03-28 Pedro Alves <palves@redhat.com>
5656
5657 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5658 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5659 (IA64_FR1_REGNUM): New defines.
5660 (ia64_fetch_register): New.
5661 (the_low_target): Install it.
5662 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5663 field.
5664 * linux-low.c (linux_fetch_registers): Try the
5665 the_low_target.fetch_register hook first.
5666
5667 * linux-arm-low.c (the_low_target): Adjust.
5668 * linux-bfin-low.c (the_low_target): Adjust.
5669 * linux-cris-low.c (the_low_target): Adjust.
5670 * linux-crisv32-low.c (the_low_target): Adjust.
5671 * linux-m32r-low.c (the_low_target): Adjust.
5672 * linux-m68k-low.c (the_low_target): Adjust.
5673 * linux-mips-low.c (the_low_target): Adjust.
5674 * linux-ppc-low.c (the_low_target): Adjust.
5675 * linux-s390-low.c (the_low_target): Adjust.
5676 * linux-sh-low.c (the_low_target): Adjust.
5677 * linux-sparc-low.c (the_low_target): Adjust.
5678 * linux-tic6x-low.c (the_low_target): Adjust.
5679 * linux-x86-low.c (the_low_target): Adjust.
5680 * linux-xtensa-low.c (the_low_target): Adjust.
5681
56822012-03-26 Pedro Alves <palves@redhat.com>
5683
5684 * server.c (handle_qxfer_libraries): Don't bail early if
5685 the_target->qxfer_libraries_svr4 is not NULL.
5686
56872012-03-26 Pedro Alves <palves@redhat.com>
5688
5689 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5690
56912012-03-23 Pedro Alves <palves@redhat.com>
5692
5693 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5694 "library-list-svr4" element's start tag when the the DSO list is
5695 empty.
5696
56972012-03-23 Pedro Alves <palves@redhat.com>
5698
5699 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5700 a variable whose type size is the same as the inferior's pointer
5701 size.
5702
57032012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5704
5705 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5706 struct siginfo.
5707 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5708 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5709 * linux-low.h: Include <signal.h>.
5710 (struct siginfo): Remove forward declaration.
5711 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5712 struct siginfo.
5713
57142012-03-21 Mike Frysinger <vapier@gentoo.org>
5715
5716 * .gitignore: Ignore more files.
5717
57182012-03-19 Pedro Alves <palves@redhat.com>
5719 Jan Kratochvil <jan.kratochvil@redhat.com>
5720
5721 * server.c (cont_thread, general_thread): Add describing comments.
5722 (start_inferior): Clear `cont_thread'.
5723 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5724 of a process.
5725
57262012-03-15 Yao Qi <yao@codesourcery.com>
5727
5728 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5729 handling to ...
5730 (cmd_qtdp): ... here.
5731
57322012-03-15 Yao Qi <yao@codesourcery.com>
5733
5734 * tracepoint.c (struct tracepoint_action_ops): New.
5735 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5736 (m_tracepoint_action_download): New.
5737 (r_tracepoint_action_download): New.
5738 (x_tracepoint_action_download): New.
5739 (l_tracepoint_action_download): New.
5740 (add_tracepoint_action): Install `action->ops' according type.
5741 (download_tracepoint_1): Move code `download' function pointer
5742 of various tracepoint_action_ops.
5743
57442012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5745
5746 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5747 linux_ptrace_attach_warnings.
5748
57492012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5750
5751 * Makefile.in (linux-ptrace.o): New.
5752 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5753 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5754 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5755 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5756 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5757 of these targets.
5758 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5759
57602012-03-08 Yao Qi <yao@codesourcery.com>
5761 Pedro Alves <palves@redhat.com>
5762
5763 Fix PR server/13392.
5764 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5765 offset of JMP insn.
5766 * tracepoint.c (remove_tracepoint): New.
5767 (cmd_qtdp): Call remove_tracepoint when failed to install.
5768
57692012-03-07 Pedro Alves <palves@redhat.com>
5770
5771 * linux-low.c (get_detach_signal): New.
5772 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5773 Pass on pending signals to PTRACE_DETACH. Check the result of the
5774 ptrace call.
5775 * server.c (program_signals, program_signals_p): New.
5776 (handle_general_set): Handle QProgramSignals.
5777 * server.h (program_signals, program_signals_p): Declare.
5778
57792012-03-05 Pedro Alves <palves@redhat.com>
5780 Jan Kratochvil <jan.kratochvil@redhat.com>
5781
5782 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5783 New comment why.
5784
57852012-03-03 Yao Qi <yao@codesourcery.com>
5786
5787 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5788 agent_look_up_symbols.
5789
57902012-03-03 Yao Qi <yao@codesourcery.com>
5791
5792 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5793 (linux-x86-low.o): Likewise.
5794 * server.h: Remove in_process_agent_loaded.
5795 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5796 common/agent.c.
5797 Update callers.
5798
57992012-03-03 Yao Qi <yao@codesourcery.com>
5800
5801 * tracepoint.c (gdb_agent_capability): New global.
5802 (in_process_agent_loaded_ust): Renamed to
5803 `in_process_agent_supports_ust'.
5804 Update callers.
5805 (in_process_agent_supports_ust): Call agent_capability_check.
5806 (clear_installed_tracepoints): Assert that agent supports
5807 agent.
5808
58092012-03-03 Yao Qi <yao@codesourcery.com>
5810
5811 * linux-low.c (linux_supports_agent): New.
5812 (linux_target_ops): Initialize field `supports_agent' with
5813 linux_supports_agent.
5814 * target.h (struct target_ops) <supports_agent>: New.
5815 (target_supports_agent): New macro.
5816 * server.c (handle_general_set): Handle packet 'QAgent'.
5817 (handle_query): Send `QAgent+'.
5818 * Makefile.in (server.o): Depends on agent.h.
5819
58202012-03-03 Yao Qi <yao@codesourcery.com>
5821
5822 * Makefile.in (OBS): Add agent.o.
5823 Add new rule for agent.o.
5824 Track dependence of tracepoint.c on agent.h.
5825 * tracepoint.c (run_inferior_command_1):
5826 (run_inferior_command): Call agent_run_command.
5827 (gdb_ust_connect_sync_socket): Deleted. Move it to
5828 common/agent.c.
5829 (resume_thread, stop_thread): Likewise.
5830 (gdb_ust_socket_init): Renamed to ...
5831 (gdb_agent_socket_init): ... New.
5832 (gdb_ust_thread): Renamed to ...
5833 (gdb_agent_helper_thread): ... New.
5834 (gdb_ust_init): Move some code to ...
5835 (gdb_agent_init): ... here. New.
5836 [HAVE_UST]: Call gdb_ust_init.
5837 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5838 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5839 * config.in, configure: Regenerated.
5840
58412012-03-02 Pedro Alves <palves@redhat.com>
5842
5843 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5844 * linux-low.c (struct simple_pid_list): New.
5845 (stopped_pids): New a struct simple_pid_list pointer.
5846 (add_to_pid_list, pull_pid_from_list): New.
5847 (handle_extended_wait): Don't assume the first signal new children
5848 report is SIGSTOP. Adjust call to pull_pid_from_list.
5849 (linux_wait_for_lwp): Adjust.
5850
58512012-03-02 Yao Qi <yao@codesourcery.com>
5852
5853 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5854 debug log.
5855
58562012-03-02 Yao Qi <yao@codesourcery.com>
5857
5858 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5859 `stop_pc' and `tpoint'. Update caller.
5860
58612012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5862
5863 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5864 * linux-low.c (use_linux_regsets): New macro.
5865 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5866 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5867 (linux_register_in_regsets): New function.
5868 (usr_fetch_inferior_registers): Skip registers covered by
5869 regsets.
5870 (usr_store_inferior_registers): Likewise.
5871 (usr_fetch_inferior_registers): New macro.
5872 (usr_store_inferior_registers): Likewise.
5873 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5874 (linux_store_registers): Likewise.
5875 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5876 prototype.
5877 (init_registers_mips64_dsp_linux): Likewise.
5878 (init_registers_mips_linux): New macro.
5879 (init_registers_mips_dsp_linux): Likewise.
5880 (mips_dsp_num_regs): Likewise.
5881 (DSP_BASE, DSP_CONTROL): New fallback macros.
5882 (mips_base_regs): New macro.
5883 (mips_regmap): Use it. Fix the size.
5884 (mips_dsp_regmap): New variable.
5885 (mips_dsp_regset_bitmap): Likewise.
5886 (mips_arch_setup): New function.
5887 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5888 than mips_regmap.
5889 (mips_cannot_store_register): Likewise.
5890 (the_low_target): Update .arch_setup, .num_regs and .regmap
5891 initializers. Add .regset_bitmap initializer.
5892 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5893 initializer.
5894 * linux-bfin-low.c (the_low_target): Likewise.
5895 * linux-cris-low.c (the_low_target): Likewise.
5896 * linux-crisv32-low.c (the_low_target): Likewise.
5897 * linux-ia64-low.c (the_low_target): Likewise.
5898 * linux-m32r-low.c (the_low_target): Likewise.
5899 * linux-m68k-low.c (the_low_target): Likewise.
5900 * linux-ppc-low.c (the_low_target): Likewise.
5901 * linux-s390-low.c (the_low_target): Likewise.
5902 * linux-sh-low.c (the_low_target): Likewise.
5903 * linux-sparc-low.c (the_low_target): Likewise.
5904 * linux-tic6x-low.c (the_low_target): Likewise.
5905 * linux-x86-low.c (the_low_target): Likewise.
5906 * linux-xtensa-low.c (the_low_target): Likewise.
5907 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5908 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5909 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5910 srv_xmlfiles.
5911 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5912 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5913
59142012-02-29 Yao Qi <yao@codesourcery.com>
5915 Pedro Alves <palves@redhat.com>
5916
5917 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5918 `step_over_finished' is true.
5919
59202012-02-27 Pedro Alves <palves@redhat.com>
5921
5922 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5923 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5924
59252012-02-27 Pedro Alves <palves@redhat.com>
5926
5927 PR server/9684
5928 * linux-low.c (pid_is_stopped): New.
5929 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5930
59312012-02-25 Luis Machado <lgustavo@codesourcery.com>
5932
5933 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5934 of conditions.
5935
59362012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5937
5938 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5939
59402012-02-24 Luis Machado <lgustavo@codesourcery>
5941
5942 * server.c (handle_query): Advertise support for target-side
5943 breakpoint condition evaluation.
5944 (process_point_options): New function.
5945 (process_serial_event): When inserting a breakpoint, check for
5946 a target-side condition that should be evaluated.
5947
5948 * mem-break.c: Include regcache.h and ax.h.
5949 (point_cond_list_t): New data structure.
5950 (breakpoint) <cond_list>: New field.
5951 (find_gdb_breakpoint_at): Make non-static.
5952 (delete_gdb_breakpoint_at): Clear any target-side
5953 conditions.
5954 (clear_gdb_breakpoint_conditions): New function.
5955 (add_condition_to_breakpoint): Likewise.
5956 (add_breakpoint_condition): Likewise.
5957 (gdb_condition_true_at_breakpoint): Likewise.
5958 (gdb_breakpoint_here): Return result directly instead
5959 of going through a local variable.
5960
5961 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5962 (clear_gdb_breakpoint_conditions): Likewise.
5963 (add_breakpoint_condition): Likewise.
5964 (gdb_condition_true_at_breakpoint): Likewise.
5965
5966 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5967 (need_step_over_p): Take target-side breakpoint condition into
5968 consideration.
5969
59702012-02-24 Luis Machado <lgustavo@codesourcery>
5971
5972 * server.h: Include tracepoint.h.
5973 (agent_mem_read, agent_get_trace_state_variable_value,
5974 agent_set_trace_state_variable_value,
5975 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5976 get_set_tsv_func_addr): New prototypes.
5977
5978 * ax.h: New include file.
5979 * ax.c: New source file.
5980
5981 * tracepoint.c: Include ax.h.
5982 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5983 agent_expr, eval_result_type): Move to ax.h.
5984 (parse_agent_expr): Rename to ...
5985 (gdb_parse_agent_expr): ... this, make it non-static and move
5986 to ax.h.
5987 (unparse_agent_expr) Rename to ...
5988 (gdb_unparse_agent_expr): ... this, make it non-static and move
5989 to ax.h.
5990 (eval_agent_expr): Rename to ...
5991 (eval_tracepoint_agent_expr): ... this.
5992 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5993 forward declarations.
5994 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5995 (agent_get_trace_state_variable_value): New function.
5996 (agent_set_trace_state_variable_value): New function.
5997 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5998 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5999 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6000 (condition_true_at_tracepoint): Likewise.
6001 (parse_agent_expr): Rename to ...
6002 (gdb_parse_agent_expr): ... this and move to ax.c.
6003 (unparse_agent_expr): Rename to ...
6004 (gdb_unparse_agent_expr): ... this and move to ax.c.
6005 (gdb_agent_op_name): Move to ax.c.
6006 (eval_agent_expr): Rename to ...
6007 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6008 and move to ax.c.
6009 (eval_tracepoint_agent_expr): New function.
6010 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6011 non-static.
6012 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6013 ax.c.
6014 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6015 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6016 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6017 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6018 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6019 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6020 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6021 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6022 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6023 (compile_bytecodes): Remove forward declaration.
6024 (is_goto_target): Move to ax.c.
6025 (compile_bytecodes): Move to ax.c and call
6026 agent_get_trace_state_variable_value (...) and
6027 agent_set_trace_state_variable_value (...).
6028
6029 * Makefile.in: Update ax.c and IPA dependencies.
6030
60312012-02-24 Pedro Alves <palves@redhat.com>
6032
6033 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6034 (cmd_bigqtbuffer_circular): ... this. Only handle
6035 'QTBuffer:circular:'.
6036 (handle_tracepoint_general_set): Adjust.
6037
60382012-02-16 Yao Qi <yao@codesourcery.com>
6039
6040 * inferiors.c: Move code to ...
6041 * dll.c: .... here. New.
6042 * server.h: Declare clear_dlls.
6043 * Makefile.in (SFILES): Add dll.c.
6044 (OBS): Add dll.o
6045 (dll.o): New rule.
6046
60472012-02-11 Yao Qi <yao@codesourcery.com>
6048
6049 * server.c: (handle_monitor_command): Add a new parameter
6050 `own_buf'.
6051 (handle_query): Update caller.
6052
60532012-02-09 Joel Brobecker <brobecker@adacore.com>
6054
6055 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6056 * configure, config.in: Regenerate.
6057 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6058 is not defined.
6059
60602012-02-02 Pedro Alves <palves@redhat.com>
6061
6062 Try SIGKILL first, then PTRACE_KILL.
6063 * linux-low.c (linux_kill_one_lwp): New.
6064 (linux_kill_one_lwp): Rename to ...
6065 (kill_one_lwp_callback): ... this. Use the new
6066 linux_kill_one_lwp.
6067
60682012-02-02 Pedro Alves <palves@redhat.com>
6069
6070 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6071 inferior.
6072
60732012-01-27 Pedro Alves <palves@redhat.com>
6074
6075 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6076 (elf_64_file_p): Make static.
6077 (linux_pid_exe_is_elf_64_file): New.
6078 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6079 Delete declarations.
6080 (linux_pid_exe_is_elf_64_file): Declare.
6081 * linux-x86-low.c (x86_arch_setup): Use
6082 linux_pid_exe_is_elf_64_file.
6083
60842012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6085
6086 * linux-low.c (linux_wait_for_event_1): Rename to ...
6087 (linux_wait_for_event): ... here and merge it with former
6088 linux_wait_for_event - new variable wait_ptid, use it.
6089 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6090
60912012-01-23 Pedro Alves <palves@redhat.com>
6092
6093 * server.c (main): Avoid yet another case of infinite loop while
6094 detaching/killing after a longjmp.
6095
60962012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6097
6098 Code cleanup.
6099 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6100
61012012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6102
6103 * hostio.c (handle_readlink): New function.
6104 (handle_vFile): Call it to handle "vFile:readlink" packets.
6105
61062012-01-20 Pedro Alves <palves@redhat.com>
6107 Ulrich Weigand <ulrich.weigand@linaro.org>
6108
6109 * server.c (handle_v_requests): Only support vAttach and vRun to
6110 start multiple processes when in extended protocol mode.
6111
61122012-01-17 Pedro Alves <palves@redhat.com>
6113
6114 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6115 memalign plus mprotect to allocate the scratch buffer.
6116
61172012-01-13 Pedro Alves <palves@redhat.com>
6118
6119 * server.c (attach_inferior): Clear `cont_thread'.
6120
61212012-01-13 Pedro Alves <palves@redhat.com>
6122
6123 * server.c (main): Avoid infinite loop while detaching/killing
6124 after a longjmp.
6125
61262012-01-09 Doug Evans <dje@google.com>
6127
6128 * server.c (start_inferior): Set last_ptid in --wrapper case.
6129
61302012-01-06 Yao Qi <yao@codesourcery.com>
6131
6132 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6133 defined.
6134 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6135
61362012-01-04 Yao Qi <yao@codesourcery.com>
6137
6138 * tracepoint.c (cmd_qtdp): Print debug message
6139 for static tracepoint.
6140
61412012-01-04 Yao Qi <yao@codesourcery.com>
6142
6143 * tracepoint.c (trace_vdebug): Differentiate debug message
6144 between gdbserver and IPA.
6145
61462012-01-03 Yao Qi <yao@codesourcery.com>
6147
6148 * tracepoint.c (tracepoint_was_hit): Don't collect for
6149 static tracepoint.
6150
61512012-01-02 Joel Brobecker <brobecker@adacore.com>
6152
6153 * terminal.h: Reformat copyright header.
6154
61552012-01-02 Joel Brobecker <brobecker@adacore.com>
6156
6157 * server.c (gdbserver_version): Update copyright year.
6158 * gdbreplay.c (gdbreplay_version): Likewise.
6159
61602011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6161
6162 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6163
6164 Revert:
6165 2011-12-18 Hui Zhu <teawater@gmail.com>
6166 * linux-low.c (linux_create_inferior): Save return value to ret.
6167
61682011-12-18 Hui Zhu <teawater@gmail.com>
6169
6170 * linux-low.c (linux_create_inferior): Save return value to ret.
6171
61722011-12-16 Doug Evans <dje@google.com>
6173
6174 * linux-low.c (linux_create_inferior): If stdio connection,
6175 redirect stdin from /dev/null, stdout to stderr.
6176 * remote-utils.c (remote_is_stdio): New static global.
6177 (remote_connection_is_stdio): New function.
6178 (remote_prepare): Handle stdio connection.
6179 (remote_open): Ditto.
6180 (remote_close): Don't close stdin for stdio connections.
6181 (read_prim,write_prim): New functions. Replace all calls to
6182 read/write to these.
6183 * server.c (main): Watch for "-" argument. Move call to
6184 remote_prepare before start_inferior.
6185 * server.h (STDIO_CONNECTION_NAME): New macro.
6186 (remote_connection_is_stdio): Declare.
6187
6188 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6189 in debugging output.
6190
61912011-12-15 Yao Qi <yao@codesourcery.com>
6192
6193 * tracepoint.c: Include sys/syscall.h.
6194 (gdb_ust_thread): Remove preprocessor conditional.
6195
61962011-12-14 Pedro Alves <pedro@codesourcery.com>
6197
6198 * linux-low.c (linux_detach_one_lwp): Call
6199 the_low_target.prepare_to_resume before detaching.
6200
62012011-12-14 Yao Qi <yao@codesourcery.com>
6202
6203 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6204 of write.
6205
62062011-12-14 Yao Qi <yao@codesourcery.com>
6207
6208 * i386-low.c (i386_low_stopped_data_address): Initialize local
6209 variable `control'.
6210
62112011-12-13 Pedro Alves <pedro@codesourcery.com>
6212
6213 PR remote/13492
6214
6215 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6216 DR_CONTROL unless necessary. Extend comments.
6217 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6218 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6219
62202011-12-13 Yao Qi <yao@codesourcery.com>
6221
6222 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6223 macros.
6224 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6225
62262011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6227
6228 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6229 Print new debug message for such case.
6230
62312011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6232
6233 Fix overlapping memcpy.
6234 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6235 the read_inferior_memory transfer.
6236 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6237 write_inferior_memory transfer.
6238 (set_fast_tracepoint_jump): New variable buf. Use it for the
6239 read_inferior_memory and write_inferior_memory transfers.
6240 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6241 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6242 Use it for the write_inferior_memory transfer.
6243 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6244 buffers.
6245
62462011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6247
6248 * linux-low.c (fetch_register, store_register): Make code
6249 consistent, fix formatting.
6250
62512011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6252
6253 * linux-low.c (usr_store_inferior_registers): Factor out code
6254 to handle individual registers into...
6255 (store_register): ... this new function.
6256
62572011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6258
6259 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6260 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6261 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6262 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6263 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6264 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6265 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6266 (srv_xmlfiles): Add new XML files.
6267
6268 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6269 and <sys/uio.h>.
6270 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6271 (init_registers_s390_linux32v1): Add prototype.
6272 (init_registers_s390_linux32v2): Likewise.
6273 (init_registers_s390_linux64v1): Likewise.
6274 (init_registers_s390_linux64v2): Likewise.
6275 (init_registers_s390x_linux64v1): Likewise.
6276 (init_registers_s390x_linux64v2): Likewise.
6277 (s390_num_regs): Increment to 52.
6278 (s390_regmap): Add orig_r2 register.
6279 (s390_num_regs_3264): Increment to 68.
6280 (s390_regmap_3264): Add orig_r2 register.
6281 (s390_collect_ptrace_register): Handle orig_r2 register.
6282 (s390_supply_ptrace_register): Likewise.
6283 (s390_fill_last_break): New function.
6284 (s390_store_last_break): Likewise.
6285 (s390_fill_system_call): New function.
6286 (s390_store_system_call): Likewise.
6287 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6288 register sets.
6289 (s390_check_regset): New function.
6290 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6291 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6292 Update target_regsets for available register sets.
6293
62942011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6295 Jan Kratochvil <jan.kratochvil@redhat.com>
6296
6297 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6298 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6299 New.
6300 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6301 * linux-low.h (struct process_info_private): New member r_debug.
6302 * server.c (handle_qxfer_libraries): Call
6303 the_target->qxfer_libraries_svr4.
6304 (handle_qxfer_libraries_svr4): New function.
6305 (qxfer_packets): New entry "libraries-svr4".
6306 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6307 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6308 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6309 PACKET_qXfer_libraries_svr4.
6310
63112011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6312
6313 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6314 PSW address/mask between 8-byte and 16-byte formats.
6315 (s390_supply_ptrace_register): Likewise.
6316 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6317 basic addressing mode bit.
6318
63192011-11-24 Stan Shebs <stan@codesourcery.com>
6320
6321 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6322
63232011-11-17 Stan Shebs <stan@codesourcery.com>
6324
6325 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6326 (tracing_start_time): New global.
6327 (tracing_stop_time): New global.
6328 (tracing_user_name): New global.
6329 (tracing_notes): New global.
6330 (tracing_stop_note): New global.
6331 (cmd_qtstart): Set traceframe_usage, start_time.
6332 (stop_tracing): Set stop_time.
6333 (cmd_qtstatus): Report additional status.
6334 (cmd_qtp): New function.
6335 (handle_tracepoint_query): Call it.
6336 (cmd_qtnotes): New function.
6337 (handle_tracepoint_general_set): Call it.
6338 (get_timestamp): Rename from tsv_get_timestamp.
6339
63402011-11-14 Stan Shebs <stan@codesourcery.com>
6341 Kwok Cheung Yeung <kcy@codesourcery.com>
6342
6343 * linux-x86-low.c (small_jump_insn): New.
6344 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6345 trampoline and error message, build a trampoline and issue a small
6346 jump instruction to it.
6347 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6348 trampoline and error message.
6349 (x86_get_min_fast_tracepoint_insn_len): New.
6350 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6351 * linux-low.h (struct linux_target_ops): Add arguments to
6352 install_fast_tracepoint_jump_pad operation, add new operation.
6353 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6354 arguments.
6355 (linux_get_min_fast_tracepoint_insn_len): New function.
6356 (linux_target_op): Add new operation.
6357 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6358 (gdb_trampoline_buffer_end): Ditto.
6359 (gdb_trampoline_buffer_error): Ditto.
6360 (struct ipa_sym_addresses): Add fields for new IPA variables.
6361 (symbol_list): Add entries for new IPA variables.
6362 (struct tracepoint): Add fields to hold the address range of the
6363 trampoline used by the tracepoint.
6364 (trampoline_buffer_head): New static variable.
6365 (trampoline_buffer_tail): Ditto.
6366 (claim_trampoline_space): New function.
6367 (have_fast_tracepoint_trampoline_buffer): New function.
6368 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6369 structure.
6370 (install_fast_tracepoint): Ditto, also add error buffer argument.
6371 (cmd_qtminftpilen): New function.
6372 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6373 (fast_tracepoint_from_trampoline_address): New function.
6374 (fast_tracepoint_collecting): Handle trampoline as part of jump
6375 pad space.
6376 (set_trampoline_buffer_space): New function.
6377 (initialize_tracepoint): Initialize new IPA variables.
6378 * target.h (struct target_ops): Add arguments to
6379 install_fast_tracepoint_jump_pad operation, add new
6380 get_min_fast_tracepoint_insn_len operation.
6381 (target_get_min_fast_tracepoint_insn_len): New.
6382 (install_fast_tracepoint_jump_pad): Add arguments.
6383 * server.h (IPA_BUFSIZ): Define.
6384 * linux-i386-ipa.c: Include extra header files.
6385 (initialize_fast_tracepoint_trampoline_buffer): New function.
6386 (initialize_low_tracepoint): Call it.
6387 * server.h (set_trampoline_buffer_space): Declare.
6388 (claim_trampoline_space): Ditto.
6389 (have_fast_tracepoint_trampoline_buffer): Ditto.
6390
63912011-11-14 Yao Qi <yao@codesourcery.com>
6392
6393 * server.c (handle_query): Handle InstallInTrace for qSupported.
6394 * tracepoint.c (add_tracepoint): Sort list.
6395 (install_tracepoint, download_tracepoint): New.
6396 (cmd_qtdp): Call them to install and download tracepoints.
6397 (sort_tracepoints): Removed.
6398 (cmd_qtstart): Update.
6399
64002011-11-14 Yao Qi <yao@codesourcery.com>
6401
6402 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6403 * mem-break.h: Declare.
6404 * tracepoint.c (cmd_qtstart): Move some code to ...
6405 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6406 New.
6407 (download_tracepoints): Move some code to ...
6408 (download_tracepoint_1): ... here. New.
6409
64102011-11-08 Yao Qi <yao@codesourcery.com>
6411
6412 * remote-utils.c (relocate_instruction): A comment fix.
6413
64142011-11-07 Joel Brobecker <brobecker@adacore.com>
6415
6416 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6417 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6418 dr_status_mirror and dr_control_mirror from debug_reg_state.
6419 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6420 (i386_initial_stuff): Remove use of deleted globals.
6421 (i386_get_thread_context, i386_set_thread_context,
6422 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6423 from debug_reg_state.
6424
64252011-11-05 Yao Qi <yao@codesourcery.com>
6426
6427 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6428 address as TPOINT's.
6429
64302011-11-02 Stan Shebs <stan@codesourcery.com>
6431
6432 * tracepoint.c (agent_mem_read_string): New function.
6433 (eval_agent_expr): Call it for tracenz.
6434 * server.c (handle_query): Report support for tracenz.
6435
64362011-11-02 Yao Qi <yao@codesourcery.com>
6437
6438 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6439
64402011-11-02 Yao Qi <yao@codesourcery.com>
6441
6442 * target.h: Fix a typo in comment.
6443
64442011-10-31 Pedro Alves <pedro@codesourcery.com>
6445
6446 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6447 clobber the breakpoints' shadows with fast tracepoint jumps.
6448 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6449 * target.c (write_inferior_memory): Also pass MYADDR down to
6450 check_mem_write.
6451
64522011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6453
6454 * configure.ac: Check support for personality routine.
6455 * configure: Regenerate.
6456 * config.in: Likewise.
6457 * linux-low.c: Include <sys/personality.h>.
6458 Define ADDR_NO_RANDOMIZE if necessary.
6459 (linux_create_inferior): Disable address space randomization when
6460 forking inferior, if requested.
6461 (linux_supports_disable_randomization): New function.
6462 (linux_target_ops): Install it.
6463 * server.h (disable_randomization): Declare.
6464 * server.c (disable_randomization): New global variable.
6465 (handle_general_set): Handle QDisableRandomization.
6466 (handle_query): Likewise for qSupported.
6467 (main): Support --disable-randomization and --no-disable-randomization
6468 command line arguments.
6469 * target.h (struct target_ops): Add supports_disable_randomization.
6470 (target_supports_disable_randomization): New macro.
6471
64722011-09-29 Mike Frysinger <vapier@gentoo.org>
6473
6474 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6475 ifdef check.
6476 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6477 [!PT_GETDSBT] (target_loadmap): New definition.
6478 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6479 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6480 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6481 and PT_GETDSBT to LINUX_LOADMAP.
6482 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6483 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6484
64852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6486
6487 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6488 (arm_linux_hwbp_cap): New static variable.
6489 (arm_linux_get_hwbp_cap): Replace by ...
6490 (arm_linux_init_hwbp_cap): ... this new function.
6491 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6492 (arm_linux_get_hw_watchpoint_count): Likewise.
6493 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6494 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6495 (arm_prepare_to_resume): Use perror_with_name instead of error.
6496
64972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6498
6499 * linux-arm-low.c: Include <signal.h>.
6500 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6501 (struct arm_linux_hwbp_cap): New data type.
6502 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6503 (struct arm_linux_hw_breakpoint): New data type.
6504 (MAX_BPTS, MAX_WPTS): Define.
6505 (struct arch_process_info, struct arch_lwp_info): New data types.
6506 (arm_linux_get_hwbp_cap): New function.
6507 (arm_linux_get_hw_breakpoint_count): Likewise.
6508 (arm_linux_get_hw_watchpoint_count): Likewise.
6509 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6510 (arm_hwbp_control_initialize): Likewise.
6511 (arm_hwbp_control_is_enabled): Likewise.
6512 (arm_hwbp_control_is_initialized): Likewise.
6513 (arm_hwbp_control_disable): Likewise.
6514 (arm_linux_hw_breakpoint_equal): Likewise.
6515 (arm_linux_hw_point_initialize): Likewise.
6516 (struct update_registers_data): New data structure.
6517 (update_registers_callback: New function.
6518 (arm_insert_point): Likewise.
6519 (arm_remove_point): Likewise.
6520 (arm_stopped_by_watchpoint): Likewise.
6521 (arm_stopped_data_address): Likewise.
6522 (arm_new_process): Likewise.
6523 (arm_new_thread): Likewise.
6524 (arm_prepare_to_resume): Likewise.
6525 (the_low_target): Register arm_insert_point, arm_remove_point,
6526 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6527 arm_new_thread, and arm_prepare_to_resume.
6528
65292011-09-15 Stan Shebs <stan@codesourcery.com>
6530
6531 * server.h (struct emit_ops): Add compare-goto fields.
6532 * tracepoint.c (gdb_agent_op_sizes): New table.
6533 (emit_eq_goto): New function.
6534 (emit_ne_goto): New function.
6535 (emit_lt_goto): New function.
6536 (emit_le_goto): New function.
6537 (emit_gt_goto): New function.
6538 (emit_ge_goto): New function.
6539 (is_goto_target): New function.
6540 (compile_bytecodes): Recognize special cases of compare-goto
6541 combinations and call specialized emitters for them.
6542 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6543 (amd64_emit_ne_goto): New function.
6544 (amd64_emit_lt_goto): New function.
6545 (amd64_emit_le_goto): New function.
6546 (amd64_emit_gt_goto): New function.
6547 (amd64_emit_ge_goto): New function.
6548 (amd64_emit_ops): Add the new functions.
6549 (i386_emit_eq_goto): New function.
6550 (i386_emit_ne_goto): New function.
6551 (i386_emit_lt_goto): New function.
6552 (i386_emit_le_goto): New function.
6553 (i386_emit_gt_goto): New function.
6554 (i386_emit_ge_goto): New function.
6555 (i386_emit_ops): Add the new functions.
6556
65572011-09-08 Stan Shebs <stan@codesourcery.com>
6558
6559 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6560 (i386_emit_epilogue): Restore %ebx.
6561
65622011-08-31 Jie Zhang <jzhang918@gmail.com>
6563
6564 * server.c (step_thread): Remove definition.
6565 (process_serial_event): Don't handle Hs.
6566 * server.h (step_thread): Remove declaration.
6567 * target.c (set_desired_inferior): Remove use of step_thread.
6568
65692011-08-24 Luis Machado <lgustavo@codesourcery.com>
6570
6571 * linux-low.c: Include linux-procfs.h.
6572 (linux_attach_lwp_1): Update comments.
6573 (linux_attach): Scan for existing threads when attaching to a
6574 process that is the tgid.
6575 * Makefile.in: Update dependencies.
6576
65772011-08-24 Luis Machado <lgustavo@codesourcery.com>
6578
6579 * configure.srv: Add linux-procfs.o dependencies.
6580
65812011-08-14 Yao Qi <yao@codesourcery.com>
6582
6583 * target.h (struct target_ops): Fix indent.
6584 * win32-low.c (win32_target_ops): Fix comment.
6585
65862011-08-14 Andrew Jenner <andrew@codesourcery.com>
6587 Yao Qi <yao@codesourcery.com>
6588
6589 * Makefile.in (clean): Remove tic6x-*.c files.
6590 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6591 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6592 (tic6x-c64xp-linux.c): Likewise.
6593 * configure.srv: Add support for tic6x-*-uclinux.
6594 * linux-tic6x-low.c: New.
6595 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6596
65972011-08-14 Andrew Stubbs <ams@codesourcery.com>
6598 Yao Qi <yao@codesourcery.com>
6599
6600 * target.h (struct target_ops): Add read_loadmap.
6601 * linux-low.c (struct target_loadseg): New type.
6602 (struct target_loadmap): New type.
6603 (linux_read_loadmap): New function.
6604 (linux_target_ops): Add linux_read_loadmap.
6605 * server.c (handle_query): Support qXfer:fdpic:read packet.
6606 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6607 to NULL.
6608
66092011-08-05 Eli Zaretskii <eliz@gnu.org>
6610
6611 * win32-low.c: Include <stdint.h>.
6612
66132011-07-22 Pedro Alves <pedro@codesourcery.com>
6614
6615 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6616 to the inferior here.
6617 (i386_remove_aligned_watchpoint): Ditto.
6618 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6619 fit part of the watchpoint in the debug registers.
6620 (i386_update_inferior_debug_regs): New.
6621 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6622 registers, and only update the inferior on success.
6623 (i386_low_remove_watchpoint): Ditto.
6624
66252011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6626
6627 * linux-low.c (compare_ints, unique, list_threads, show_process,
6628 linux_core_of_thread): Delete.
6629 (linux_target_ops): Change linux_core_of_thread to
6630 linux_common_core_of_thread.
6631 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6632 * utils.c (malloc_failure): Change type of argument.
6633 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6634 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6635 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6636 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6637 (IPA_OBJS): Add common-utils-ipa.o.
6638 (ptid_h, linux_osdata_h): New macros.
6639 (server_h): Add common/common-utils.h, common/xml-utils.h,
6640 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6641 common/ptid.h.
6642 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6643 ptid.o, buffer.o): New rules.
6644 (linux-low.o): Add common/linux-osdata.h as a dependency.
6645 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6646 * configure.ac: Add AC_HEADER_DIRENT check.
6647 * config.in: Regenerate.
6648 * configure: Regenerate.
6649 * remote-utils.c (xml_escape_text): Delete.
6650 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6651 buffer_xml_printf): Move to common/buffer.c.
6652 * server.c (main): Remove call to initialize_inferiors.
6653 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6654 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6655 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6656 internal_error, gdb_assert, gdb_assert_fail): Delete.
6657 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6658 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6659 common/buffer.h.
6660 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6661 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6662 initialize_inferiors): Delete.
6663
66642011-07-20 Pedro Alves <pedro@codesourcery.com>
6665
6666 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6667 symbol error.
6668
66692011-05-31 Pedro Alves <pedro@codesourcery.com>
6670
6671 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6672 assertion.
6673 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6674
66752011-05-26 Yao Qi <yao@codesourcery.com>
6676
6677 * Makefile.in (thread-db.o): Track dependence to
6678 common/gdb_thread_db.h.
6679 * thread-db.c: include gdb_thread_db.h from right place.
6680
66812011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6682
6683 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6684 __FILE__ and __LINE__ to internal_error.
6685
66862011-05-13 Doug Evans <dje@google.com>
6687
6688 * thread-db.c (try_thread_db_load_from_sdir): New function.
6689 (try_thread_db_load_from_dir): New function.
6690 (thread_db_load_search): Handle $sdir, ignore $pdir.
6691 Remove trying of system directories if search of
6692 libthread-db-search-path fails, that is now done via $sdir.
6693
66942011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6695
6696 * server.c (handle_query): Add EnableDisableTracepoints to the list
6697 of supported features.
6698 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6699 tracepoints.
6700 (cmd_qtenable_disable): New.
6701 (cmd_qtstart): Install tracepoints even if disabled.
6702 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6703 receiving a QTEnable or QTDisable packet.
6704 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6705 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6706 tracepoints.
6707 (gdb_probe): Skip data collection if static tracepoint is disabled.
6708
67092011-05-10 Doug Evans <dje@google.com>
6710
6711 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6712
67132011-05-04 Doug Evans <dje@google.com>
6714
6715 * linux-low.c (linux_join): Skip process lookup.
6716 * spu-low.c (spu_join): Ditto.
6717 * server.c (join_inferiors_callback): Delete.
6718 (process_serial_event): For 'D' packet (detach) call join_inferior
6719 directly.
6720
67212011-05-04 Joseph Myers <joseph@codesourcery.com>
6722
6723 * README: Don't mention xscale*-*-linux*.
6724 * configure.srv (xscale*-*-linux*): Don't handle target.
6725
67262011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6727
6728 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6729 casting pointers.
6730 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6731 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6732 (i386_emit_void_call_2): Likewise.
6733
67342011-04-26 Yao Qi <yao@codesourcery.com>
6735
6736 * linux-low.c: Move common macros to linux-ptrace.h.
6737 Include linux-ptrace.h.
6738 * Makefile.in (linux_ptrace_h): New.
6739 (linux-low.o): Depends on linux-ptrace.h.
6740
67412011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6742
6743 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6744 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6745 (remote_prepare): New function with most of the TCP code from ...
6746 (remote_open): ... here. Detect PORT here unconditionally. Move also
6747 setting transport_is_reliable.
6748 * server.c (run_once): New variable.
6749 (gdbserver_usage): Document it.
6750 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6751 the first run if RUN_ONCE.
6752 * server.h (run_once, remote_prepare): New declarations.
6753
67542011-04-19 Tom Tromey <tromey@redhat.com>
6755
6756 * win32-low.c (handle_load_dll): Remove duplicate "the".
6757
67582011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6759
6760 Remove support for old Cygwin 1.5 versions.
6761 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6762 function to avoid warning.
6763 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6764 warning.
6765
67662011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6767
6768 * gdbserver/server.h (Macro _): Define it if not available.
6769
67702011-03-14 Michael Snyder <msnyder@vmware.com>
6771
6772 * hostio.c (handle_close): Remove unnecessary null test.
6773
67742011-03-10 Joel Brobecker <brobecker@adacore.com>
6775
6776 * Makefile.in (maintainer-clean realclean distclean): Remove
6777 "make ... subdir_do" command.
6778
67792011-03-10 Michael Snyder <msnyder@vmware.com>
6780
6781 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6782
6783 * server.c (handle_v_run): Free alloced buffer on early return.
6784
67852011-03-09 Yao Qi <yao@codesourcery.com>
6786
6787 Revert:
6788 2011-03-04 Yao Qi <yao@codesourcery.com>
6789
6790 * Makefile.in: Remove GNU make feature --directory.
6791
6792 2011-03-05 Yao Qi <yao@codesourcery.com>
6793
6794 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6795 (subdir_do): New make target. Copied from gdb/Makefile.
6796 (maintainer-clean, realclean, distclean, clean): Call corresponding
6797 make targets in common/Makefile.
6798
6799 2011-02-11 Yao Qi <yao@codesourcery.com>
6800
6801 * configure.ac: Call AC_PROG_RANLIB.
6802 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6803 * configure: Regenerate.
6804
68052011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6806
6807 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6808
68092011-03-06 Yao Qi <yao@codesourcery.com>
6810
6811 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6812
68132011-03-05 Yao Qi <yao@codesourcery.com>
6814
6815 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6816 (subdir_do): New make target. Copied from gdb/Makefile.
6817 (maintainer-clean, realclean, distclean, clean): Call corresponding
6818 make targets in common/Makefile.
6819
68202011-03-04 Yao Qi <yao@codesourcery.com>
6821
6822 * Makefile.in: Remove GNU make feature --directory.
6823
68242011-03-04 Michael Snyder <msnyder@vmware.com>
6825
6826 * server.c (queue_stop_reply): Call xmalloc not malloc.
6827
68282011-03-02 Michael Snyder <msnyder@vmware.com>
6829
6830 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6831
68322011-02-28 Michael Snyder <msnyder@vmware.com>
6833
6834 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6835 (cmd_qtframe): Ditto.
6836 (cmd_qtbuffer): Ditto.
6837 (cmd_bigqtbuffer): Ditto.
6838
6839 * utils.c (decimal2str): Initialize 'width' to nine, then
6840 don't mess with it.
6841
68422011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6843
6844 * hostio.c (require_data): Free *data, not data.
6845
68462011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6847
6848 * hostio.c (require_data): Use free, not xfree.
6849
68502011-02-27 Michael Snyder <msnyder@vmware.com>
6851
6852 * server.c (handle_query): Discard unused value.
6853
6854 * hostio.c (require_data): Free malloc memory before returning
6855 error.
6856
68572011-02-26 Michael Snyder <msnyder@vmware.com>
6858
6859 * linux-low.c (list_threads): Call closedir for dirent.
6860
68612011-02-27 Michael Snyder <msnyder@vmware.com>
6862
6863 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6864 a case statement falls through.
6865
6866 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6867
6868 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6869 in comparison.
6870
68712011-02-26 Michael Snyder <msnyder@vmware.com>
6872
6873 * utils.c (decimal2str): Eliminate dead code and dead param.
6874 (pulongest): Drop dead param from call to decimal2str.
6875 (plongest): Ditto.
6876
68772011-02-24 Joel Brobecker <brobecker@adacore.com>
6878
6879 Revert the following patch (not approved yet):
6880 2011-02-21 Hui Zhu <teawater@gmail.com>
6881 * tracepoint.c (tp_printf): New function.
6882 (eval_agent_expr): Handle gdb_agent_op_printf.
6883
68842011-02-21 Hui Zhu <teawater@gmail.com>
6885
6886 * tracepoint.c (tp_printf): New function.
6887 (eval_agent_expr): Handle gdb_agent_op_printf.
6888
68892011-02-18 Tom Tromey <tromey@redhat.com>
6890
6891 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6892 (tracepoint.o): Likewise.
6893 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6894 (gdb_agent_op_names): Likewise.
6895
68962011-02-18 Tom Tromey <tromey@redhat.com>
6897
6898 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6899 gdb_agent_op_rot>: New constants.
6900 (gdb_agent_op_names): Add pick and roll.
6901 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6902 cases.
6903
69042011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6905
6906 * aclocal.m4: Regenerated with aclocal-1.11.1.
6907
69082011-02-14 Pedro Alves <pedro@codesourcery.com>
6909
6910 * server.c (handle_qxfer_traceframe_info): New.
6911 (qxfer_packets): Register "traceframe-info".
6912 (handle_query): Report support for qXfer:traceframe-info:read+.
6913 * tracepoint.c (match_blocktype): New.
6914 (traceframe_find_block_type): Rename to ...
6915 (traceframe_walk_blocks): ... this. Add callback filter argument,
6916 and use it.
6917 (traceframe_find_block_type): New, reimplemented on top of
6918 traceframe_walk_blocks.
6919 (build_traceframe_info_xml): New.
6920 (traceframe_read_info): New.
6921 * server.h (traceframe_read_info): Declare.
6922
69232011-02-11 Yao Qi <yao@codesourcery.com>
6924
6925 * configure.ac: Call AC_PROG_RANLIB.
6926 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6927 * configure: Regenerate.
6928
69292011-02-07 Pedro Alves <pedro@codesourcery.com>
6930
6931 * server.c (gdb_read_memory): Change return semantics to allow
6932 partial transfers.
6933 (handle_search_memory_1): Adjust.
6934 (process_serial_event) <'m' packet>: Handle partial transfers.
6935 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6936
69372011-01-28 Pedro Alves <pedro@codesourcery.com>
6938
6939 * regcache.c (init_register_cache): Initialize
6940 regcache->register_status.
6941 (free_register_cache): Release regcache->register_status.
6942 (regcache_cpy): Copy register_status.
6943 (registers_to_string): Print 'x's for unavailable registers.
6944 (supply_register): Mark the register's status valid or
6945 unavailable, depending on whether a buffer was passed in or not.
6946 (supply_register_zeroed): New.
6947 (supply_regblock): Mark the registers' status valid or
6948 unavailable, depending on whether a buffer was passed in or not.
6949 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6950 (struct regcache): New `register_status' field.
6951 (supply_register_zeroed): Declare.
6952 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6953 supply_register_zeroed, rather than passing a NULL buffer to
6954 supply_register.
6955 * tracepoint.c (fetch_traceframe_registers): Update comment.
6956
69572011-01-28 Pedro Alves <pedro@codesourcery.com>
6958
6959 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6960 buffer explicit.
6961
69622011-01-25 Pedro Alves <pedro@codesourcery.com>
6963
6964 * server.h (decode_xfer_write): Change prototype.
6965 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6966 and don't extract the annex here.
6967 * server.c (decode_xfer_read): Remove `annex' parameter,
6968 and don't extract the annex here.
6969 (decode_xfer): New.
6970 (struct qxfer): New.
6971 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6972 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6973 (handle_qxfer_statictrace): New functions, abstracted out from
6974 handle_query, and made to use the struct qxfer interface.
6975 (handle_threads_qxfer_proper): Rename to ...
6976 (handle_qxfer_threads_proper): ... this.
6977 (handle_threads_qxfer): Rename to ...
6978 (handle_qxfer_threads): ... this. Adjust.
6979 (qxfer_packets): New array.
6980 (handle_qxfer): New function.
6981 (handle_query): Use handle_qxfer.
6982
69832011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6984
6985 * gdbreplay.c: Shorten lines of >= 80 columns.
6986 * linux-low.c: Ditto.
6987 * linux-ppc-low.c: Ditto.
6988 * linux-s390-low.c: Ditto.
6989 * linux-sparc-low.c: Ditto.
6990 * linux-x86-low.c: Ditto.
6991 * linux-xtensa-low.c: Ditto.
6992 * mem-break.c: Ditto.
6993 * nto-low.c: Ditto.
6994 * regcache.h: Ditto.
6995 * remote-utils.c: Ditto.
6996 * server.c: Ditto.
6997 * server.h: Ditto.
6998 * thread-db.c: Ditto.
6999 * tracepoint.c: Ditto.
7000 * utils.c: Ditto.
7001 * win32-low.h: Ditto.
7002
70032011-01-05 Joel Brobecker <brobecker@adacore.com>
7004
7005 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7006 update.
7007
70082011-01-01 Joel Brobecker <brobecker@adacore.com>
7009
7010 * server.c (gdbserver_version): Update copyright year in version
7011 output.
7012 * gdbreplay.c (gdbreplay_version): Ditto.
7013
70142010-12-29 Jie Zhang <jie.zhang@analog.com>
7015
7016 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7017 * linux-bfin-low.c: New file.
7018 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7019 PT_DATA_ADDR for BFIN targets.
7020 * Makefile.in (SFILES): Add linux-bfin-low.c.
7021 (clean): Remove reg-bfin.c.
7022 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7023 * README: Mention supported Blackfin targets.
7024
70252010-12-23 Mike Frysinger <vapier@gentoo.org>
7026
7027 * .gitignore: New file.
7028
70292010-11-16 Mike Frysinger <vapier@gentoo.org>
7030
7031 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7032
70332010-10-22 Jie Zhang <jie@codesourcery.com>
7034
7035 * Makefile.in: Add FLAGS_TO_PASS variable.
7036 (install): Remove dependency of install-only and recursively
7037 invoke make for install-only.
7038
70392010-10-04 Doug Evans <dje@google.com>
7040
7041 * Makefile.in (uninstall): Use $(DESTDIR).
7042
70432010-09-24 Pedro Alves <pedro@codesourcery.com>
7044
7045 PR gdb/11842
7046
7047 * linux-x86-low.c (compat_siginfo_from_siginfo)
7048 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7049 si_code is < 0. Check for si_code == SI_TIMER before checking for
7050 si_code < 0.
7051
70522010-09-13 Joel Brobecker <brobecker@adacore.com>
7053
7054 * lynx-i386-low.c: New file.
7055 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7056
70572010-09-13 Joel Brobecker <brobecker@adacore.com>
7058
7059 * lynx-low.c (ptrace_request_to_str): Remove handling for
7060 request values that have been removed in LynxOS 5.x.
7061
70622010-09-13 Joel Brobecker <brobecker@adacore.com>
7063
7064 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7065 <ptrace.h>
7066
70672010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7068
7069 * configure.ac: Add --enable-inprocess-agent option.
7070 * configure: Rebuilt.
7071
70722010-09-06 Yao Qi <yao@codesourcery.com>
7073
7074 * linux-low.c (linux_kill): Remove unused variable.
7075 (linux_stabilize_threads): Likewise.
7076 * server.c (start_inferior): Likewise.
7077 (queue_stop_reply_callback): Likewise.
7078 * tracepoint.c (do_action_at_tracepoint): Likewise.
7079
70802010-09-06 Yao Qi <yao@codesourcery.com>
7081
7082 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7083 on return.
7084
70852010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7086
7087 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7088
70892010-09-06 Pedro Alves <pedro@codesourcery.com>
7090
7091 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7092 "$(IPA_DEPFILES)".
7093
70942010-09-01 Joel Brobecker <brobecker@adacore.com>
7095
7096 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7097 gdbserver/lynx-ppc-low.c: New files.
7098 * Makefile.in (lynx_low_h): New variable.
7099 (lynx-low.o, lynx-ppc-low.o): New rules.
7100 * configure.ac: On LynxOS, link with -lnetinet.
7101 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7102 * configure: regenerate.
7103
71042010-09-01 Joel Brobecker <brobecker@adacore.com>
7105
7106 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7107 * configure.ac: Add check for vasprintf and vsnprintf.
7108 * configure, config.in: Regenerate.
7109 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7110
71112010-09-01 Joel Brobecker <brobecker@adacore.com>
7112
7113 * gdbreplay.c: Move include of alloca.h up, next to include of
7114 malloc.h.
7115 * server.h: Add include of malloc.h.
7116 * mem-break.c: Remove include of malloc.h.
7117 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7118
71192010-09-01 Joel Brobecker <brobecker@adacore.com>
7120
7121 * Makefile.in (memmem.o): Build with -Wno-error.
7122
71232010-09-01 Joel Brobecker <brobecker@adacore.com>
7124
7125 * utils.c (xsnprintf): Make non-static.
7126 * server.h: Add xsnprintf declaration.
7127 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7128 replace calls to snprintf by calls to xsnprintf throughout.
7129
71302010-09-01 Joel Brobecker <brobecker@adacore.com>
7131
7132 * configure.ac: Add configure check for alloca.
7133 * configure, config.in: Regenerate.
7134 * server.h: Include alloca.h if it exists.
7135 * gdbreplay.c: Include alloca.h if it exists.
7136
71372010-08-28 Pedro Alves <pedro@codesourcery.com>
7138
7139 * linux-low.c (__SIGRTMIN): Define if not already defined.
7140 (linux_create_inferior): Check for __ANDROID__ rather than
7141 __SIGRTMIN.
7142 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7143 are already deferred.
7144 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7145 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7146 stopped and already has a pending signal to report.
7147 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7148 a pending signal to report or is moving out of a jump pad.
7149 (linux_init_signals): Check for __ANDROID__ rather than
7150 __SIGRTMIN.
7151
71522010-08-28 Pedro Alves <pedro@codesourcery.com>
7153
7154 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7155 debug_threads check. Avoid a linear search when not doing debug
7156 output.
7157
71582010-08-27 Pedro Alves <pedro@codesourcery.com>
7159
7160 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7161 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7162 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7163 (process_event): Change local fd's type to gdb_fildes_t.
7164 (create_file_handler): Adjust prototype.
7165 (delete_file_handler): Adjust prototype.
7166 (handle_file_event): Adjust prototype. Use pfildes.
7167 (create_file_event): Adjsut prototype.
7168 * remote-utils.c (remote_desc, listen_desc): Change type to
7169 gdb_fildes_t.
7170 * server.h: New gdb_fildes_t typedef.
7171 [USE_WIN32API]: Include winsock2.h.
7172 (delete_file_handler, add_file_handler): Adjust prototypes.
7173 (pfildes): Declare.
7174 * utils.c (pfildes): New.
7175
71762010-08-27 Pedro Alves <pedro@codesourcery.com>
7177
7178 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7179 * configure: Regenerate.
7180
71812010-08-27 Pedro Alves <pedro@codesourcery.com>
7182
7183 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7184 (linux_done_accessing_memory): ... this.
7185 (linux_target_ops): Adjust.
7186 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7187 * nto-low.c (nto_target_ops): Adjust comment.
7188 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7189 * spu-low.c (spu_target_ops): Adjust comment.
7190 * target.h (target_ops): Rename unprepare_to_access_memory field
7191 to done_accessing_memory.
7192 (unprepare_to_access_memory): Rename to ...
7193 (done_accessing_memory): ... this.
7194
71952010-08-26 Pedro Alves <pedro@codesourcery.com>
7196
7197 * linux-low.c (linux_prepare_to_access_memory): New.
7198 (linux_unprepare_to_access_memory): New.
7199 (linux_target_ops): Install them.
7200 * server.c (read_memory): Rename to ...
7201 (gdb_read_memory): ... this. Use
7202 prepare_to_access_memory/prepare_to_access_memory.
7203 (write_memory): Rename to ...
7204 (gdb_write_memory): ... this. Use
7205 prepare_to_access_memory/prepare_to_access_memory.
7206 (handle_search_memory_1): Adjust.
7207 (process_serial_event): Adjust.
7208 * target.h (struct target_ops): New fields
7209 prepare_to_access_memory and unprepare_to_access_memory.
7210 (prepare_to_access_memory, unprepare_to_access_memory): New.
7211 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7212 prepare_to_access_memory/prepare_to_access_memory.
7213 * nto-low.c (nto_target_ops): Adjust.
7214 * spu-low.c (spu_target_ops): Adjust.
7215 * win32-low.c (win32_target_ops): Adjust.
7216
72172010-08-26 Pedro Alves <pedro@codesourcery.com>
7218
7219 * Makefile.in (WARN_CFLAGS): Get it from configure.
7220 (WERROR_CFLAGS): New.
7221 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7222 * configure.ac: Introduce --enable-werror, which adds -Werror to
7223 the compiler command line. Enabled by default. Disable with
7224 --disable-werror. Add -Wdeclaration-after-statement
7225 Wpointer-arith and -Wformat-nonliteral to warning flags.
7226 * configure: Regenerate.
7227
72282010-08-26 Pedro Alves <pedro@codesourcery.com>
7229
7230 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7231
72322010-08-26 Pedro Alves <pedro@codesourcery.com>
7233
7234 * gdbreplay.c (remote_error): New.
7235 (gdbchar): New.
7236 (expect): Use gdbchar. Check for error reading from GDB.
7237 Clarify sync error output.
7238 (play): Check for errors writing to GDB.
7239 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7240 * remote-utils.c (getpkt): Check for errors writing to the remote
7241 descriptor.
7242
72432010-08-25 Pedro Alves <pedro@codesourcery.com>
7244
7245 * linux-low.c (linux_wait_1): Move non-debugging code out of
7246 `debug_threads' control.
7247
72482010-08-25 Pedro Alves <pedro@codesourcery.com>
7249
7250 * linux-low.c (linux_wait_1): Don't set last_status here.
7251 * server.c (push_event, queue_stop_reply_callback): Assert we're
7252 not pushing a TARGET_WAITKIND_IGNORE event.
7253 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7254 (myresume, handle_target_event): Set the thread's last_resume_kind
7255 and last_status from the target returned status.
7256
72572010-08-25 Pedro Alves <pedro@codesourcery.com>
7258
7259 PR threads/10729
7260
7261 * linux-x86-low.c (update_debug_registers_callback): New.
7262 (i386_dr_low_set_addr): Use it.
7263 (i386_dr_low_get_addr): New.
7264 (i386_dr_low_set_control): Use update_debug_registers_callback.
7265 (i386_dr_low_get_control): New.
7266 (i386_dr_low_get_status): Adjust.
7267 * linux-low.c (linux_stop_lwp): New.
7268 * linux-low.h (linux_stop_lwp): Declare.
7269
7270 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7271 argument instead of a i386_debug_reg_state.
7272 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7273 a i386_debug_reg_state.
7274 (i386_insert_aligned_watchpoint): Adjust.
7275 (i386_remove_aligned_watchpoint): Adjust.
7276 (i386_low_stopped_data_address): Read the debug registers from the
7277 inferior instead of from the mirrors.
7278 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7279 (i386_dr_low_get_addr): Declare.
7280 (i386_dr_low_get_control): Declare.
7281 (i386_dr_low_get_status): Change prototype.
7282
7283 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7284 (i386_dr_low_get_addr): New.
7285 (i386_dr_low_get_control): New.
7286 (i386_dr_low_get_status): Adjust prototype. Return
7287 dr_status_mirror.
7288 (i386_initial_stuff): Clear dr_status_mirror and
7289 dr_control_mirror.
7290 (i386_get_thread_context): Adjust.
7291 (i386_set_thread_context): Adjust.
7292 (i386_thread_added): Adjust.
7293
72942010-08-24 Pedro Alves <pedro@codesourcery.com>
7295
7296 * linux-low.h (linux_thread_area): Delete declaration.
7297
72982010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7299
7300 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7301 after its termination.
7302
73032010-08-09 Pedro Alves <pedro@codesourcery.com>
7304
7305 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7306 (gdb_wants_all_stopped): Delete.
7307 (linux_wait_1): Don't call them.
7308 * server.c (handle_v_cont): Tag all threads as want-stopped.
7309 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7310 stopped as "client-wants-stopped".
7311
73122010-07-31 Pedro Alves <pedro@codesourcery.com>
7313
7314 * Makefile.in (signals_h): New.
7315 (server_h): Depend on it.
7316 (server.o): Don't depend on $(signals_def).
7317 (signals.o): Depend on $(signals_def).
7318
73192010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7320
7321 * Makefile.in (signals_def): New.
7322 (server_h): Append include/gdb/signals.h and signals_def.
7323 (server.o): Append signals_def.
7324
73252010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7326
7327 * server.c (handle_target_event): Use target_signal_to_host for
7328 resume_info.sig initialization.
7329 * target.h (struct thread_resume) <sig>: New comment.
7330
73312010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7332
7333 * server.c (handle_query): strcpy() the returned string from paddress()
7334 instead of sprintf().
7335 * utils.c (paddress): Return phex_nz().
7336
73372010-07-07 Joel Brobecker <brobecker@adacore.com>
7338
7339 * server.c (handle_v_cont): Call mourn_inferior if process
7340 just exited.
7341 (myresume): Likewise.
7342
73432010-07-01 Pedro Alves <pedro@codesourcery.com>
7344
7345 Static tracepoints, and integration with UST.
7346
7347 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7348 * mem-break.c (uninsert_all_breakpoints)
7349 (reinsert_all_breakpoints): New.
7350 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7351 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7352 (gdb_agent_ust_loaded, helper_thread_id)
7353 (gdb_agent_helper_thread_id): New macros.
7354 (struct ipa_sym_addresses): Add addr_ust_loaded,
7355 addr_helper_thread_id, addr_cmd_buf.
7356 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7357 (in_process_agent_loaded_ust): New.
7358 (write_e_ust_not_loaded): New.
7359 (maybe_write_ipa_ust_not_loaded): New.
7360 (struct collect_static_trace_data_action): New.
7361 (enum tracepoint_type) <static_tracepoint>: New.
7362 (struct tracepoint) <handle>: Mention static tracepoints.
7363 (struct static_tracepoint_ctx): New.
7364 (CMD_BUF_SIZE): New.
7365 (add_tracepoint_action): Handle static tracepoint actions.
7366 (unprobe_marker_at): New.
7367 (clear_installed_tracepoints): Handle static tracepoints.
7368 (cmd_qtdp): Handle static tracepoints.
7369 (probe_marker_at): New.
7370 (cmd_qtstart): Handle static tracepoints.
7371 (response_tracepoint): Handle static tracepoints.
7372 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7373 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7374 (get_context_regcache): Handle static tracepoints.
7375 (do_action_at_tracepoint): Handle static tracepoint actions.
7376 (traceframe_find_block_type): Handle static trace data blocks.
7377 (traceframe_read_sdata): New.
7378 (download_tracepoints): Download static tracepoint actions.
7379 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7380 (GDB_PROBE_NAME): New.
7381 (ust_ops): New.
7382 (GET_UST_SYM): New.
7383 (USTF): New.
7384 (dlsym_ust): New.
7385 (ust_marker_to_static_tracepoint): New.
7386 (gdb_probe): New.
7387 (collect_ust_data_at_tracepoint): New.
7388 (gdb_ust_probe): New.
7389 (UNIX_PATH_MAX, SOCK_DIR): New.
7390 (gdb_ust_connect_sync_socket): New.
7391 (resume_thread, stop_thread): New.
7392 (run_inferior_command): New.
7393 (init_named_socket): New.
7394 (gdb_ust_socket_init): New.
7395 (cstr_to_hexstr): New.
7396 (next_st): New.
7397 (first_marker, next_marker): New.
7398 (response_ust_marker): New.
7399 (cmd_qtfstm, cmd_qtsstm): New.
7400 (unprobe_marker_at, probe_marker_at): New.
7401 (cmd_qtstmat, gdb_ust_thread): New.
7402 (gdb_ust_init): New.
7403 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7404 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7405 (ST_REGENTRY): New.
7406 (x86_64_st_collect_regmap): New.
7407 (X86_64_NUM_ST_COLLECT_GREGS): New.
7408 (AMD64_RIP_REGNUM): New.
7409 (supply_static_tracepoint_registers): New.
7410 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7411 (ST_REGENTRY): New.
7412 (i386_st_collect_regmap): New.
7413 (i386_NUM_ST_COLLECT_GREGS): New.
7414 (supply_static_tracepoint_registers): New.
7415 * server.c (handle_query): Handle qXfer:statictrace:read.
7416 <qSupported>: Report support for StaticTracepoints, and
7417 qXfer:statictrace:read features.
7418 * server.h (traceframe_read_sdata)
7419 (supply_static_tracepoint_registers): Declare.
7420 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7421 (unpack_varlen_hex): Include in IPA build.
7422 * Makefile.in (ustlibs, ustinc): New.
7423 (IPA_OBJS): Add remote-utils-ipa.o.
7424 ($(IPA_LIB)): Link -ldl and -lpthread.
7425 (UST_CFLAGS): New.
7426 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7427 * config.in, configure: Regenerate.
7428
74292010-06-20 Ian Lance Taylor <iant@google.com>
7430 Pedro Alves <pedro@codesourcery.com>
7431
7432 * linux-x86-low.c (always_true): Delete.
7433 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7434 trying to fool the compiler with always_true.
7435
74362010-06-20 Pedro Alves <pedro@codesourcery.com>
7437
7438 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7439 conditions in gdbserver.
7440
74412010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7442
7443 * spu-low.c (spu_read_memory): Wrap around local store limit.
7444 (spu_write_memory): Likewise.
7445
74462010-06-15 Pedro Alves <pedro@codesourcery.com>
7447
7448 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7449 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7450 LONGEST uses.
7451 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7452 uses.
7453 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7454 uses with LONGEST uses.
7455
74562010-06-14 Stan Shebs <stan@codesourcery.com>
7457 Pedro Alves <pedro@codesourcery.com>
7458
7459 Bytecode compiler.
7460
7461 * linux-x86-low.c: Include limits.h.
7462 (add_insns): New.
7463 (always_true): New.
7464 (EMIT_ASM): New.
7465 (EMIT_ASM32): New.
7466 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7467 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7468 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7469 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7470 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7471 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7472 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7473 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7474 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7475 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7476 (amd64_emit_void_call_2): New.
7477 (amd64_emit_ops): New.
7478 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7479 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7480 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7481 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7482 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7483 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7484 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7485 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7486 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7487 (i386_emit_stack_adjust, i386_emit_int_call_1)
7488 (i386_emit_void_call_2): New.
7489 (i386_emit_ops): New.
7490 (x86_emit_ops): New.
7491 (the_low_target): Install x86_emit_ops.
7492 * server.h (struct emit_ops): New.
7493 (get_raw_reg_func_addr): Declare.
7494 (current_insn_ptr, emit_error): Declare.
7495 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7496 (set_trace_state_variable_value): New defines.
7497 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7498 addr_get_trace_state_variable_value and
7499 addr_set_trace_state_variable_value.
7500 (symbol_list): New fields for get_raw_reg,
7501 get_trace_state_variable_value and set_trace_state_variable_value.
7502 (condfn): New typedef.
7503 (struct tracepoint): New field `compiled_cond'.
7504 (do_action_at_tracepoint): Clear compiled_cond.
7505 (get_trace_state_variable_value, set_trace_state_variable_value):
7506 Export in the IPA.
7507 (condition_true_at_tracepoint): If there's a compiled condition,
7508 run that.
7509 (current_insn_ptr, emit_error): New globals.
7510 (struct bytecode_address): New.
7511 (get_raw_reg_func_addr): New.
7512 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7513 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7514 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7515 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7516 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7517 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7518 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7519 (compile_tracepoint_condition, compile_bytecodes): New.
7520 * target.h (emit_ops): Forward declare.
7521 (struct target_ops): New field emit_ops.
7522 (target_emit_ops): New.
7523 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7524 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7525 * linux-low.c (linux_emit_ops): New.
7526 (linux_target_ops): Install it.
7527 * linux-low.h (struct linux_target_ops): New field emit_ops.
7528
75292010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7530
7531 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7532 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7533
75342010-06-01 Pedro Alves <pedro@codesourcery.com>
7535 Stan Shebs <stan@codesourcery.com>
7536
7537 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7538 (all): Depend on $(extra_libraries).
7539 (install-only): Install the IPA.
7540 (IPA_OBJS, IPA_LIB): New.
7541 (clean): Remove the IPA lib.
7542 (IPAGENT_CFLAGS): New.
7543 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7544 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7545 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7546 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7547 * configure.ac: Check for atomic builtins support in the compiler.
7548 (IPA_DEPFILES, extra_libraries): Define.
7549 * configure.srv (ipa_obj): Add description.
7550 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7551 (i[34567]86-*-linux*): Set ipa_obj.
7552 (x86_64-*-linux*): Set ipa_obj.
7553 * linux-low.c (stabilizing_threads): New.
7554 (supports_fast_tracepoints): New.
7555 (linux_detach): Stabilize threads before detaching.
7556 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7557 the lwp is either not stabilizing, or is moving out of a jump pad.
7558 (linux_fast_tracepoint_collecting): New.
7559 (maybe_move_out_of_jump_pad): New.
7560 (enqueue_one_deferred_signal): New.
7561 (dequeue_one_deferred_signal): New.
7562 (linux_wait_for_event_1): If moving out of a jump pad, defer
7563 pending signals to later.
7564 (linux_stabilize_threads): New.
7565 (linux_wait_1): Check if threads need moving out of jump pads, and
7566 do it if so.
7567 (stuck_in_jump_pad_callback): New.
7568 (move_out_of_jump_pad_callback): New.
7569 (lwp_running): New.
7570 (linux_resume_one_lwp): Handle moving out of jump pads.
7571 (linux_set_resume_request): Dequeue deferred signals.
7572 (need_step_over_p): Also step over fast tracepoint jumps.
7573 (start_step_over): Also uninsert fast tracepoint jumps.
7574 (finish_step_over): Also reinsert fast tracepoint jumps.
7575 (linux_install_fast_tracepoint_jump): New.
7576 (linux_target_ops): Install linux_stabilize_threads and
7577 linux_install_fast_tracepoint_jump_pad.
7578 * linux-low.h (linux_target_ops) <get_thread_area,
7579 install_fast_tracepoint_jump_pad>: New fields.
7580 (struct lwp_info) <collecting_fast_tracepoint,
7581 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7582 (linux_get_thread_area): Declare.
7583 * linux-x86-low.c (jump_insn): New.
7584 (x86_get_thread_area): New.
7585 (append_insns): New.
7586 (push_opcode): New.
7587 (amd64_install_fast_tracepoint_jump_pad): New.
7588 (i386_install_fast_tracepoint_jump_pad): New.
7589 (x86_install_fast_tracepoint_jump_pad): New.
7590 (the_low_target): Install x86_get_thread_area and
7591 x86_install_fast_tracepoint_jump_pad.
7592 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7593 (struct fast_tracepoint_jump): New.
7594 (fast_tracepoint_jump_insn): New.
7595 (fast_tracepoint_jump_shadow): New.
7596 (find_fast_tracepoint_jump_at): New.
7597 (fast_tracepoint_jump_here): New.
7598 (delete_fast_tracepoint_jump): New.
7599 (set_fast_tracepoint_jump): New.
7600 (uninsert_fast_tracepoint_jumps_at): New.
7601 (reinsert_fast_tracepoint_jumps_at): New.
7602 (set_breakpoint_at): Use write_inferior_memory.
7603 (uninsert_raw_breakpoint): Use write_inferior_memory.
7604 (check_mem_read): Mask out fast tracepoint jumps.
7605 (check_mem_write): Mask out fast tracepoint jumps.
7606 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7607 (set_fast_tracepoint_jump): Declare.
7608 (delete_fast_tracepoint_jump)
7609 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7610 (reinsert_fast_tracepoint_jumps_at): Declare.
7611 * regcache.c: Don't compile many functions when building the
7612 in-process agent library.
7613 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7614 the register buffer in the heap.
7615 (free_register_cache): If the register buffer isn't owned by the
7616 regcache, don't free it.
7617 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7618 pre-existing register caches.
7619 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7620 type.
7621 (convert_ascii_to_int): : Constify `from' parameter type.
7622 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7623 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7624 the needed buffer in-place.
7625 (relocate_instruction): New.
7626 * server.c (handle_query) <qSymbols>: If the target supports
7627 tracepoints, give it a chance of looking up symbols. Report
7628 support for fast tracepoints.
7629 (handle_status): Stabilize threads.
7630 (process_serial_event): Adjust.
7631 * server.h (struct fast_tracepoint_jump): Forward declare.
7632 (struct process_info) <fast_tracepoint_jumps>: New field.
7633 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7634 (decode_X_packet, decode_M_packet): Adjust.
7635 (relocate_instruction): Declare.
7636 (in_process_agent_loaded): Declare.
7637 (tracepoint_look_up_symbols): Declare.
7638 (struct fast_tpoint_collect_status): Declare.
7639 (fast_tracepoint_collecting): Declare.
7640 (force_unlock_trace_buffer): Declare.
7641 (handle_tracepoint_bkpts): Declare.
7642 (initialize_low_tracepoint)
7643 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7644 * target.h (struct target_ops) <stabilize_threads,
7645 install_fast_tracepoint_jump_pad>: New fields.
7646 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7647 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7648 [HAVE_STDINT_H]: Include stdint.h.
7649 (trace_debug_1): Rename to ...
7650 (trace_vdebug): ... this.
7651 (trace_debug): Rename to ...
7652 (trace_debug_1): ... this. Add `level' parameter.
7653 (trace_debug): New.
7654 (ATTR_USED, ATTR_NOINLINE): New.
7655 (IP_AGENT_EXPORT): New.
7656 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7657 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7658 (about_to_request_buffer_space, trace_buffer_is_full)
7659 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7660 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7661 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7662 (traceframe_write_count, traceframes_created)
7663 (trace_state_variables)
7664 New renaming defines.
7665 (struct ipa_sym_addresses): New.
7666 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7667 (symbol_list): New.
7668 (ipa_sym_addrs): New.
7669 (all_tracepoint_symbols_looked_up): New.
7670 (in_process_agent_loaded): New.
7671 (write_e_ipa_not_loaded): New.
7672 (maybe_write_ipa_not_loaded): New.
7673 (tracepoint_look_up_symbols): New.
7674 (debug_threads) [IN_PROCESS_AGENT]: New.
7675 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7676 (UNKNOWN_SIDE_EFFECTS): New.
7677 (stop_tracing): New.
7678 (flush_trace_buffer): New.
7679 (stop_tracing_bkpt): New.
7680 (flush_trace_buffer_bkpt): New.
7681 (read_inferior_integer): New.
7682 (read_inferior_uinteger): New.
7683 (read_inferior_data_pointer): New.
7684 (write_inferior_data_pointer): New.
7685 (write_inferior_integer): New.
7686 (write_inferior_uinteger): New.
7687 (struct collect_static_trace_data_action): Delete.
7688 (enum tracepoint_type): New.
7689 (struct tracepoint) <type>: New field `type'.
7690 <actions_str, step_actions, step_actions_str>: Only include in
7691 GDBserver.
7692 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7693 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7694 (tracepoints): Use IP_AGENT_EXPORT.
7695 (last_tracepoint): Don't include in the IPA.
7696 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7697 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7698 (alloced_trace_state_variables): New.
7699 (trace_state_variables): Use IP_AGENT_EXPORT.
7700 (traceframe_t): Delete unused variable.
7701 (circular_trace_buffer): Don't include in the IPA.
7702 (trace_buffer_start): Delete.
7703 (struct trace_buffer_control): New.
7704 (trace_buffer_free): Delete.
7705 (struct ipa_trace_buffer_control): New.
7706 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7707 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7708 New.
7709 (trace_buffer_ctrl): New.
7710 (TRACE_BUFFER_CTRL_CURR): New.
7711 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7712 Reimplement as macros.
7713 (trace_buffer_wrap): Delete.
7714 (traceframe_write_count, traceframe_read_count)
7715 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7716 (struct tracepoint_hit_ctx) <type>: New field.
7717 (struct fast_tracepoint_ctx): New.
7718 (memory_barrier): New.
7719 (cmpxchg): New.
7720 (record_tracepoint_error): Update atomically in the IPA.
7721 (clear_inferior_trace_buffer): New.
7722 (about_to_request_buffer_space): New.
7723 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7724 updating the same buffer.
7725 (add_tracepoint): Default the tracepoint's type to trap
7726 tracepoint, and orig_size to -1.
7727 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7728 internal variables.
7729 (create_trace_state_variable): New parameter `gdb'. Handle it.
7730 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7731 (cmd_qtdp): Handle fast tracepoints.
7732 (cmd_qtdv): Adjust.
7733 (max_jump_pad_size): New.
7734 (gdb_jump_pad_head): New.
7735 (get_jump_space_head): New.
7736 (claim_jump_space): New.
7737 (sort_tracepoints): New.
7738 (MAX_JUMP_SIZE): New.
7739 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7740 IPA.
7741 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7742 support. Upload fast traceframes, and delete internal IPA
7743 breakpoints.
7744 (stop_tracing_handler): New.
7745 (flush_trace_buffer_handler): New.
7746 (cmd_qtstop): Upload fast tracepoints.
7747 (response_tracepoint): Handle fast tracepoints.
7748 (tracepoint_finished_step): Upload fast traceframes. Set the
7749 tracepoint hit context's tracepoint type.
7750 (handle_tracepoint_bkpts): New.
7751 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7752 type. Add comment about fast tracepoints.
7753 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7754 non-existing action_str field.
7755 (get_context_regcache): Handle fast tracepoints.
7756 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7757 to the regcache.
7758 (fast_tracepoint_from_jump_pad_address): New.
7759 (fast_tracepoint_from_ipa_tpoint_address): New.
7760 (collecting_t): New.
7761 (force_unlock_trace_buffer): New.
7762 (fast_tracepoint_collecting): New.
7763 (collecting): New.
7764 (gdb_collect): New.
7765 (write_inferior_data_ptr): New.
7766 (target_tp_heap): New.
7767 (target_malloc): New.
7768 (download_agent_expr): New.
7769 (UALIGN): New.
7770 (download_tracepoints): New.
7771 (download_trace_state_variables): New.
7772 (upload_fast_traceframes): New.
7773 (IPA_FIRST_TRACEFRAME): New.
7774 (IPA_NEXT_TRACEFRAME_1): New.
7775 (IPA_NEXT_TRACEFRAME): New.
7776 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7777 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7778 (gdb_jump_pad_buffer_end): New.
7779 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7780 (initialize_tracepoint): Adjust.
7781 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7782 buffer. Initialize the low module.
7783 * utils.c (PREFIX, TOOLNAME): New.
7784 (malloc_failure): Use PREFIX.
7785 (error): In the IPA, an error causes an exit.
7786 (fatal, warning): Use PREFIX.
7787 (internal_error): Use TOOLNAME.
7788 (NUMCELLS): Increase to 10.
7789 * configure, config.in: Regenerate.
7790
77912010-06-01 Pedro Alves <pedro@codesourcery.com>
7792
7793 * server.c (handle_query) <qSupported>: Do two passes over the
7794 qSupported string to avoid nesting strtok.
7795
77962010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7797
7798 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7799 (CDEPS): New.
7800 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7801 -Wl,--dynamic-list.
7802 * configure: Regenerate.
7803 * proc-service.list: New.
7804
78052010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7806
7807 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7808 New comment.
7809
78102010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7811
7812 * gdbreplay.c (remote_open): Check error return from socket() call by
7813 its equality to -1 not by it being negative.
7814 * remote-utils.c (remote_open): Likewise.
7815
78162010-05-23 Pedro Alves <pedro@codesourcery.com>
7817
7818 * config.h: Regenerate.
7819
78202010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7821
7822 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7823 doesn't provide PTRACE_GET_THREAD_AREA.
7824
78252010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7826
7827 * linux-m68k-low.c: Include <asm/ptrace.h>
7828 (ps_get_thread_area): Implement.
7829
78302010-05-03 Doug Evans <dje@google.com>
7831
7832 * event-loop.c (struct callback_event): New struct.
7833 (callback_list): New global.
7834 (append_callback_event, delete_callback_event): New functions.
7835 (process_callback): New function.
7836 (start_event_loop): Call it.
7837 * remote-utils.c (NOT_SCHEDULED): Define.
7838 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7839 moved out of readchar.
7840 (readchar): Rewrite. Call reschedule before returning.
7841 (reset_readchar): New function.
7842 (remote_close): Call it.
7843 (process_remaining, reschedule): New functions.
7844 * server.h (callback_handler_func): New typedef.
7845 (append_callback_event, delete_callback_event): Declare.
7846
78472010-05-03 Pedro Alves <pedro@codesourcery.com>
7848
7849 * proc-service.c (ps_pglobal_lookup): Use
7850 thread_db_look_up_one_symbol.
7851 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7852 parameter. Use it instead of all_symbols_looked_up.
7853 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7854 field.
7855 (all_symbols_looked_up): Don't declare.
7856 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7857 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7858 field.
7859 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7860 Set all_symbols_looked_up here.
7861 (thread_db_look_up_one_symbol): New.
7862 (thread_db_get_tls_address): Adjust.
7863 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7864 thread_db object on the heap, and tentatively set it in the
7865 process structure.
7866 (thread_db_init): Don't set all_symbols_looked_up here.
7867 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7868
78692010-05-03 Pedro Alves <pedro@codesourcery.com>
7870
7871 * linux-low.c (linux_kill, linux_detach): Adjust.
7872 (status_pending_p_callback): Remove redundant statement. Check
7873 for !TARGET_WAITIKIND_IGNORE, instead of
7874 TARGET_WAITKIND_STOPPED.
7875 (handle_tracepoints): Make sure LWP is locked. Adjust.
7876 (linux_wait_for_event_1): Adjust.
7877 (linux_cancel_breakpoints): New.
7878 (unsuspend_one_lwp): New.
7879 (unsuspend_all_lwps): New.
7880 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7881 (send_sigstop_callback): Change return type to int, add new
7882 `except' parameter and handle it.
7883 (suspend_and_send_sigstop_callback): New.
7884 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7885 pass them down. If SUSPEND, also increment the lwp's suspend
7886 count.
7887 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7888 (need_step_over_p): Don't consider suspended LWPs.
7889 (start_step_over): Adjust.
7890 (proceed_one_lwp): Change return type to int, add new `except'
7891 parameter and handle it.
7892 (unsuspend_and_proceed_one_lwp): New.
7893 (proceed_all_lwps): Use find_inferior instead of
7894 for_each_inferior.
7895 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7896 also decrement the suspend count of LWPs. Pass `except' down,
7897 instead of hacking its suspend count.
7898 (linux_pause_all): Add `freeze' parameter. Adjust.
7899 (linux_unpause_all): New.
7900 (linux_target_ops): Install linux_unpause_all.
7901 * server.c (handle_status): Adjust.
7902 * target.h (struct target_ops): New fields `unpause_all' and
7903 `cancel_breakpoints'. Add new parameter to `pause_all'.
7904 (pause_all): Add new `freeze' parameter.
7905 (unpause_all): New.
7906 (cancel_breakpoints): New.
7907 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7908 cancel breakpoints.
7909 (cmd_qtstart): Pause threads.
7910 (stop_tracing): Pause threads, and cancel breakpoints.
7911 * win32-low.c (win32_target_ops): Adjust.
7912
79132010-05-03 Pedro Alves <pedro@codesourcery.com>
7914
7915 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7916 the inferior right away from here...
7917 (linux_wait_1): ... to here, and adjust to check the thread's
7918 last_resume_kind instead of the lwp's step or stop_expected flags.
7919
79202010-05-02 Pedro Alves <pedro@codesourcery.com>
7921
7922 * README: Use consistent `GDB' and `GDBserver' spellings.
7923
79242010-05-02 Pedro Alves <pedro@codesourcery.com>
7925
7926 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7927 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7928 (linux_detach_one_lwp): Assume the lwp is stopped.
7929 (any_thread_of): Delete.
7930 (linux_detach): Stop all lwps here. Don't blindly delete all
7931 breakpoints.
7932 (delete_lwp_callback): New.
7933 (linux_mourn): Delete all lwps of the process that is gone.
7934 (linux_wait_1): Don't delete the last lwp of the process here.
7935 * mem-break.h (mark_breakpoints_out): Declare.
7936 * mem-break.c (mark_breakpoints_out): New.
7937 (free_all_breakpoints): Use it.
7938 * server.c (handle_target_event): If the process is gone, mark
7939 breakpoints out.
7940 * thread-db.c (struct thread_db) <create_bp>: New field.
7941 (thread_db_enable_reporting): Fix prototype. Store a thread event
7942 breakpoint reference in the thread_db struct.
7943 (thread_db_load_search): Clear the thread_db object.
7944 (try_thread_db_load_1): Ditto.
7945 (switch_to_process): New.
7946 (disable_thread_event_reporting): Use it.
7947 (remove_thread_event_breakpoints): New.
7948 (thread_db_detach, thread_db_mourn): Use it.
7949
79502010-05-01 Pedro Alves <pedro@codesourcery.com>
7951
7952 * linux-low.c (linux_enable_event_reporting): New.
7953 (linux_wait_for_event_1, handle_extended_wait): Use it.
7954
79552010-04-30 Pedro Alves <pedro@codesourcery.com>
7956
7957 * linux-low.c (linux_kill_one_lwp, linux_kill)
7958 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7959 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7960 SIGSTOP even if the LWP is stopped.
7961 (send_sigstop_callback): New.
7962 (stop_all_lwps): Use send_sigstop_callback instead.
7963 (linux_resume_one_thread): Adjust.
7964 (proceed_one_lwp): Still proceed an LWP that the client has
7965 requested to stop, if we haven't reported it as stopped yet. Make
7966 sure that LWPs the client want stopped, have a pending SIGSTOP.
7967
79682010-04-26 Doug Evans <dje@google.com>
7969
7970 * server.c (handle_general_set): Make static.
7971
7972 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7973 Print received char after testing for error/eof instead of before.
7974 (input_interrupt): Tweak comment.
7975
79762010-04-23 Doug Evans <dje@google.com>
7977
7978 * server.c (start_inferior): Print inferior argv if --debug.
7979
79802010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7981
7982 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7983 * nto-x86-low.c: Include server.h
7984
79852010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7986
7987 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7988 be consistent with other sources of this directory.
7989 (init_registers_amd64): Correct name of source file of this function
7990 in the comment.
7991
79922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7993
7994 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7995 64-bit executables.
7996
79972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7998
7999 * win32-i386-low.c: Add 64-bit support.
8000 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8001 (init_registers_amd64): Declare.
8002 (mappings): Add 64-bit version of array.
8003 (init_windows_x86): New function.
8004 (the_low_target): Change init_arch field to init_windows_x86.
8005
80062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8007
8008 * win32-low.c: Adapt to support also 64-bit architecture.
8009 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8010 (get_image_name): Use SIZE_T type for local variable `done'.
8011 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8012 (toolhelp_get_dll_name): Idem.
8013 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8014 Use uintptr_t typecast to avoid warning.
8015 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8016 (handle_exception): Use phex_nz to avoid warning.
8017 (win32_wait): Remove unused local variable `process'.
8018
80192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8020
8021 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8022 `amd64-avx.o'.
8023
80242010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8025
8026 * configure.ac: Use `ws2_32' library for srv_mingw.
8027 * configure: Regenerate.
8028 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8029 * remote-utils.c: Likewise.
8030
80312010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8032
8033 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8034 if __x86_64__ is defined.
8035
80362010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8037
8038 * configure: Regenerate.
8039
80402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8041
8042 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8043 * target.h (target_ops): New get_tib_address field.
8044 * win32-low.h (win32_thread_info): Add thread_local_base field.
8045 * win32-low.c (child_add_thread): Add tlb argument.
8046 Set thread_local_base field to TLB.
8047 (get_child_debug_event): Adapt to child_add_thread change.
8048 (win32_get_tib_address): New function.
8049 (win32_target_ops): Set get_tib_address field to
8050 win32_get_tib_address.
8051 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8052
80532010-04-12 Pedro Alves <pedro@codesourcery.com>
8054
8055 * linux-low.c (linux_mourn): Also remove the process.
8056 * server.c (handle_target_event): Don't remove the process here.
8057 * nto-low.c (nto_mourn): New.
8058 (nto_target_ops): Install it.
8059 * spu-low.c (spu_mourn): New.
8060 (spu_target_ops): Install it.
8061 * win32-low.c (win32_mourn): New.
8062 (win32_target_ops): Install it.
8063
80642010-04-12 Pedro Alves <pedro@codesourcery.com>
8065
8066 * server.h (buffer_xml_printf): Remove redundant `;'.
8067
80682010-04-12 Pedro Alves <pedro@codesourcery.com>
8069
8070 * regcache.c (set_register_cache): Invalidate regcaches before
8071 changing the register cache layout.
8072 (regcache_invalidate_one): Allow a NULL regcache.
8073 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8074 regcaches before changing the register cache layout or the target
8075 regsets.
8076
80772010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8078
8079 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8080 variable warning on Linux/x86-64.
8081
80822010-04-11 Pedro Alves <pedro@codesourcery.com>
8083
8084 GDBserver disconnected tracing support.
8085
8086 * linux-low.c (linux_remove_process): Delete.
8087 (add_lwp): Don't set last_resume_kind here.
8088 (linux_kill): Use `mourn'.
8089 (linux_detach): Use `thread_db_detach', and `mourn'.
8090 (linux_mourn): New.
8091 (linux_attach_lwp_1): Adjust comment.
8092 (linux_attach): last_resume_kind moved the thread_info; adjust.
8093 (status_pending_p_callback): Adjust.
8094 (linux_wait_for_event_1): Adjust.
8095 (count_events_callback, select_singlestep_lwp_callback)
8096 (select_event_lwp_callback, cancel_breakpoints_callback)
8097 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8098 (proceed_one_lwp): Adjust.
8099 (linux_async): Add debug output.
8100 (linux_thread_stopped): New.
8101 (linux_pause_all): New.
8102 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8103 linux_pause_all.
8104 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8105 (thread_db_free): Delete declaration.
8106 (thread_db_detach, thread_db_mourn): Declare.
8107 * thread-db.c (thread_db_init): Use thread_db_mourn.
8108 (thread_db_free): Delete, split in two.
8109 (disable_thread_event_reporting): New.
8110 (thread_db_detach): New.
8111 (thread_db_mourn): New.
8112
8113 * server.h (struct thread_info) <last_resume_kind>: New field.
8114 <attached>: Add comment.
8115 <gdb_detached>: New field.
8116 (handler_func): Change return type to int.
8117 (handle_serial_event, handle_target_event): Ditto.
8118 (gdb_connected): Declare.
8119 (tracing): Delete.
8120 (disconnected_tracing): Declare.
8121 (stop_tracing): Declare.
8122
8123 * server.c (handle_query) <qSupported>: Report support for
8124 disconnected tracing.
8125 (queue_stop_reply_callback): Account for running threads.
8126 (gdb_wants_thread_stopped): New.
8127 (gdb_wants_all_threads_stopped): New.
8128 (gdb_reattached_process): New.
8129 (handle_status): Clear the `gdb_detached' flag of all processes.
8130 In all-stop, stop all threads.
8131 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8132 (process_serial_event): If the remote connection breaks, or if an
8133 exit was forced with "monitor exit", force an event loop exit.
8134 Handle disconnected tracing on detach.
8135 (handle_serial_event): Adjust.
8136 (handle_target_event): If GDB isn't connected, forward events back
8137 to the inferior, unless the last process exited, in which case,
8138 exit gdbserver. Adjust interface.
8139
8140 * remote-utils.c (remote_open): Don't block in accept. Instead
8141 register an event loop source on the listen socket file
8142 descriptor. Refactor bits into ...
8143 (listen_desc): ... this new global.
8144 (gdb_connected): ... this new function.
8145 (enable_async_notification): ... this new function.
8146 (handle_accept_event): ... this new function.
8147 (remote_close): Clear remote_desc.
8148
8149 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8150
8151 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8152 New fields.
8153 (mourn_inferior): Define.
8154 (target_process_qsupported): Avoid the dangling else problem.
8155 (thread_stopped): Define.
8156 (pause_all): Define.
8157 (target_waitstatus_to_string): Declare.
8158 * target.c (target_waitstatus_to_string): New.
8159
8160 * tracepoint.c (tracing): Make extern.
8161 (disconnected_tracing): New.
8162 (stop_tracing): Make extern. Handle tracing stops due to GDB
8163 disconnecting.
8164 (cmd_qtdisconnected): New.
8165 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8166 (handle_tracepoint_general_set): Handle QTDisconnected.
8167
8168 * event-loop.c (event_handler_func): Change return type to int.
8169 (process_event): Bail out if the event handler wants the event
8170 loop to stop.
8171 (handle_file_event): Ditto.
8172 (start_event_loop): Bail out if the event handler wants the event
8173 loop to stop.
8174
8175 * nto-low.c (nto_target_ops): Adjust.
8176 * spu-low.c (spu_wait): Don't remove the process here.
8177 (spu_target_ops): Adjust.
8178 * win32-low.c (win32_wait): Don't remove the process here.
8179 (win32_target_ops): Adjust.
8180
81812010-04-11 Pedro Alves <pedro@codesourcery.com>
8182
8183 * regcache.c (realloc_register_cache): Invalidate inferior's
8184 regcache before recreating it.
8185
81862010-04-09 Pedro Alves <pedro@codesourcery.com>
8187
8188 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8189
81902010-04-09 Stan Shebs <stan@codesourcery.com>
8191 Pedro Alves <pedro@codesourcery.com>
8192
8193 * server.h (LONGEST): New.
8194 (struct thread_info) <while_stepping>: New field.
8195 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8196 Declare.
8197 (initialize_tracepoint, handle_tracepoint_general_set)
8198 (handle_tracepoint_query, tracepoint_finished_step)
8199 (tracepoint_was_hit, release_while_stepping_state_list):
8200 (current_traceframe): Declare.
8201 * server.c (handle_general_set): Handle tracepoint packets.
8202 (read_memory): New.
8203 (write_memory): New.
8204 (handle_search_memory_1): Use read_memory.
8205 (handle_query): Report support for conditional tracepoints, trace
8206 state variables, and tracepoint sources. Handle tracepoint
8207 queries.
8208 (main): Initialize the tracepoints module.
8209 (process_serial_event): Handle traceframe reads/writes.
8210
8211 * linux-low.c (handle_tracepoints): New.
8212 (linux_wait_1): Call it.
8213 (linux_resume_one_lwp): Handle while-stepping.
8214 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8215 (linux_target_ops): Install them.
8216 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8217 New field.
8218 * linux-x86-low.c (x86_supports_tracepoints): New.
8219 (the_low_target). Install it.
8220
8221 * mem-break.h (delete_breakpoint): Declare.
8222 * mem-break.c (delete_breakpoint): Make external.
8223
8224 * target.h (struct target_ops): Add `supports_tracepoints',
8225 `read_pc', and `write_pc' fields.
8226 (target_supports_tracepoints): Define.
8227 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8228 (phex_nz): New.
8229
8230 * regcache.h (struct regcache) <registers_owned>: New field.
8231 (init_register_cache, regcache_cpy): Declare.
8232 (regcache_read_pc, regcache_write_pc): Declare.
8233 (register_cache_size): Declare.
8234 (supply_regblock): Declare.
8235 * regcache.c (init_register_cache): New.
8236 (new_register_cache): Use it.
8237 (regcache_cpy): New.
8238 (register_cache_size): New.
8239 (supply_regblock): New.
8240 (regcache_read_pc, regcache_write_pc): New.
8241
8242 * tracepoint.c: New.
8243
8244 * Makefile.in (OBS): Add tracepoint.o.
8245 (tracepoint.o): New rule.
8246
82472010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8248
8249 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8250 (i386-mmx.o): New.
8251 (i386-mmx.c): Likewise.
8252 (i386-mmx-linux.o): Likewise.
8253 (i386-mmx-linux.c): Likewise.
8254
8255 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8256 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8257 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8258 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8259
8260 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8261 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8262 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8263
82642010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8265
8266 * Makefile.in (clean): Updated.
8267 (i386-avx.o): New.
8268 (i386-avx.c): Likewise.
8269 (i386-avx-linux.o): Likewise.
8270 (i386-avx-linux.c): Likewise.
8271 (amd64-avx.o): Likewise.
8272 (amd64-avx.c): Likewise.
8273 (amd64-avx-linux.o): Likewise.
8274 (amd64-avx-linux.c): Likewise.
8275
8276 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8277 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8278 (srv_amd64_regobj): Add amd64-avx.o.
8279 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8280 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8281 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8282 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8283 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8284 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8285 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8286
8287 * i387-fp.c: Include "i386-xstate.h".
8288 (i387_xsave): New.
8289 (i387_cache_to_xsave): Likewise.
8290 (i387_xsave_to_cache): Likewise.
8291 (x86_xcr0): Likewise.
8292
8293 * i387-fp.h (i387_cache_to_xsave): Likewise.
8294 (i387_xsave_to_cache): Likewise.
8295 (x86_xcr0): Likewise.
8296
8297 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8298 * linux-crisv32-low.c (target_regsets): Likewise.
8299 * linux-m68k-low.c (target_regsets): Likewise.
8300 * linux-mips-low.c (target_regsets): Likewise.
8301 * linux-ppc-low.c (target_regsets): Likewise.
8302 * linux-s390-low.c (target_regsets): Likewise.
8303 * linux-sh-low.c (target_regsets): Likewise.
8304 * linux-sparc-low.c (target_regsets): Likewise.
8305 * linux-xtensa-low.c (target_regsets): Likewise.
8306
8307 * linux-low.c: Include <sys/uio.h>.
8308 (regsets_fetch_inferior_registers): Support nt_type.
8309 (regsets_store_inferior_registers): Likewise.
8310 (linux_process_qsupported): New.
8311 (linux_target_ops): Add linux_process_qsupported.
8312
8313 * linux-low.h (regset_info): Add nt_type.
8314 (linux_target_ops): Add process_qsupported.
8315
8316 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8317 and <sys/uio.h>.
8318 (init_registers_i386_avx_linux): New.
8319 (init_registers_amd64_avx_linux): Likewise.
8320 (xmltarget_i386_linux_no_xml): Likewise.
8321 (xmltarget_amd64_linux_no_xml): Likewise.
8322 (PTRACE_GETREGSET): Likewise.
8323 (PTRACE_SETREGSET): Likewise.
8324 (x86_fill_xstateregset): Likewise.
8325 (x86_store_xstateregset): Likewise.
8326 (use_xml): Likewise.
8327 (x86_linux_update_xmltarget): Likewise.
8328 (x86_linux_process_qsupported): Likewise.
8329 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8330 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8331 init_registers_i386_linux here. Call
8332 x86_linux_update_xmltarget.
8333 (the_low_target): Add x86_linux_process_qsupported.
8334
8335 * server.c (handle_query): Call target_process_qsupported.
8336
8337 * target.h (target_ops): Add process_qsupported.
8338 (target_process_qsupported): New.
8339
83402010-04-03 Pedro Alves <pedro@codesourcery.com>
8341
8342 * inferiors.c (add_thread): Set last_status kind to
8343 TARGET_WAITKIND_IGNORE.
8344 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8345 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8346 (linux_wait_1): Move `thread' local definition to block that uses
8347 it. Don't NULL initialize `event_child'.
8348 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8349 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8350 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8351
83522010-04-01 Pedro Alves <pedro@codesourcery.com>
8353
8354 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8355 an extended waitstatus, or by a watchpoint.
8356 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8357 thread was stepping or has been stopped by a watchpoint.
8358
83592010-04-01 Pedro Alves <pedro@codesourcery.com>
8360
8361 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8362 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8363 of another, then delete the previous, and validate all
8364 breakpoints.
8365 (validate_inserted_breakpoint): New.
8366 (delete_disabled_breakpoints): New.
8367 (validate_breakpoints): New.
8368 (check_mem_read): Validate breakpoints before trusting their
8369 shadow. Delete disabled breakpoints.
8370 (check_mem_write): Validate breakpoints before trusting they
8371 should be inserted. Delete disabled breakpoints.
8372 * mem-break.h (validate_breakpoints):
8373 * server.c (handle_query): Validate breakpoints when we see a
8374 qSymbol query.
8375
83762010-04-01 Pedro Alves <pedro@codesourcery.com>
8377
8378 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8379 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8380 if we could tell there's a GDB breakpoint at stop_pc.
8381 (need_step_over_p): Don't do a step over if we find a GDB
8382 breakpoint at the resume PC.
8383
8384 * mem-break.c (struct raw_breakpoint): New.
8385 (enum bkpt_type): New type `gdb_breakpoint'.
8386 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8387 fields. New field `raw'.
8388 (find_raw_breakpoint_at): New.
8389 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8390 breakpoint instead.
8391 (set_breakpoint_at): Adjust.
8392 (delete_raw_breakpoint): New.
8393 (release_breakpoint): New.
8394 (delete_breakpoint): Rename to...
8395 (delete_breakpoint_1): ... this. Add proc parameter. Use
8396 release_breakpoint. Return ENOENT.
8397 (delete_breakpoint): Reimplement.
8398 (find_breakpoint_at): Delete.
8399 (find_gdb_breakpoint_at): New.
8400 (delete_breakpoint_at): Delete.
8401 (set_gdb_breakpoint_at): New.
8402 (delete_gdb_breakpoint_at): New.
8403 (gdb_breakpoint_here): New.
8404 (set_reinsert_breakpoint): Use release_breakpoint.
8405 (uninsert_breakpoint): Rename to ...
8406 (uninsert_raw_breakpoint): ... this.
8407 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8408 (reinsert_raw_breakpoint): Change parameter type to
8409 raw_breakpoint.
8410 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8411 instead.
8412 (check_breakpoints): Adjust. Use release_breakpoint.
8413 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8414 (breakpoint_inserted_here): Ditto.
8415 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8416 Don't trust the breakpoint's shadow if it is not inserted.
8417 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8418 (delete_all_breakpoints): Adjust.
8419 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8420 use delete_breakpoint_1.
8421
8422 * mem-break.h (breakpoints_supported): Delete declaration.
8423 (set_gdb_breakpoint_at): Declare.
8424 (gdb_breakpoint_here): Declare.
8425 (delete_breakpoint_at): Delete.
8426 (delete_gdb_breakpoint_at): Declare.
8427
8428 * server.h (struct raw_breakpoint): Forward declare.
8429 (struct process_info): New field `raw_breakpoints'.
8430
8431 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8432 breakpoints.
8433
84342010-03-24 Pedro Alves <pedro@codesourcery.com>
8435
8436 * linux-low.c (status_pending_p_callback): Fix comment.
8437 (linux_wait_for_event_1): Move most of the internal breakpoint
8438 handling from here...
8439 (linux_wait_1): ... to here.
8440 (count_events_callback): New.
8441 (select_singlestep_lwp_callback): New.
8442 (select_event_lwp_callback): New.
8443 (cancel_breakpoints_callback): New.
8444 (select_event_lwp): New.
8445 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8446 priority to all LWPs that have had events that should be reported
8447 to the client. Cancel breakpoints when about to reporting the
8448 event to the client, not while stopping lwps. No longer cancel
8449 finished single-steps here.
8450 (cancel_finished_single_step): Delete.
8451 (cancel_finished_single_steps): Delete.
8452
84532010-03-24 Pedro Alves <pedro@codesourcery.com>
8454
8455 * mem-break.c (enum bkpt_type): New.
8456 (struct breakpoint): New field `type'.
8457 (set_breakpoint_at): Change return type to struct breakpoint
8458 pointer. Set type to `other_breakpoint' by default.
8459 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8460 in the breakpoint list.
8461 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8462 (reinsert_breakpoint): Rename to ...
8463 (reinsert_raw_breakpoint): ... this.
8464 (reinsert_breakpoints_at): Adjust.
8465 * mem-break.h (struct breakpoint): Declare.
8466 (set_breakpoint_at): Change return type to struct breakpoint
8467 pointer.
8468
84692010-03-24 Pedro Alves <pedro@codesourcery.com>
8470
8471 * server.c (handle_query): Assign, not compare.
8472
84732010-03-24 Pedro Alves <pedro@codesourcery.com>
8474
8475 Teach linux gdbserver to step-over-breakpoints.
8476
8477 * linux-low.c (can_hardware_single_step): New.
8478 (supports_breakpoints): New.
8479 (handle_extended_wait): If stopping threads, read the stop pc of
8480 the new cloned LWP.
8481 (get_pc): New.
8482 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8483 low target doesn't support retrieving the PC.
8484 (add_lwp): Set last_resume_kind to resume_continue.
8485 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8486 (linux_attach): Don't clear stop_expected. Set the lwp's
8487 last_resume_kind to resume_stop.
8488 (linux_detach_one_lwp): Don't check for removed breakpoints.
8489 (check_removed_breakpoint): Delete.
8490 (status_pending_p): Rename to ...
8491 (status_pending_p_callback): ... this. Don't check for removed
8492 breakpoints. Don't consider threads that are stopped from GDB's
8493 perspective.
8494 (linux_wait_for_lwp): Always read the stop_pc here.
8495 (cancel_breakpoint): New.
8496 (step_over_bkpt): New global.
8497 (linux_wait_for_event_1): Implement stepping over breakpoints.
8498 (gdb_wants_lwp_stopped): New.
8499 (gdb_wants_all_stopped): New.
8500 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8501 single-step traps here. Store the thread's last reported target
8502 wait status.
8503 (send_sigstop): Don't clear stop_expected. Always set it,
8504 instead.
8505 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8506 (cancel_finished_single_step): New.
8507 (cancel_finished_single_steps): New.
8508 (wait_for_sigstop): Don't cancel finished single-step traps here.
8509 (linux_resume_one_lwp): Don't check for removed breakpoints.
8510 Don't set `step' on non-hardware step archs.
8511 (linux_set_resume_request): Ignore resume_stop requests if already
8512 stopping or stopped. Set the lwp's last_resume_kind.
8513 (resume_status_pending_p): Don't check for removed breakpoints.
8514 (need_step_over_p): New.
8515 (start_step_over): New.
8516 (finish_step_over): New.
8517 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8518 requests. Clear the thread's last reported target waitstatus.
8519 Don't use the `suspended' flag. Don't consider pending breakpoints.
8520 (linux_resume): Start a step-over if necessary.
8521 (proceed_one_lwp): New.
8522 (proceed_all_lwps): New.
8523 (unstop_all_lwps): New.
8524 * linux-low.h (struct lwp_info): Rewrite comment for the
8525 `suspended' flag. Add the `stop_pc' field. Delete the
8526 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8527 Add `'last_resume_kind' and `need_step_over' fields.
8528 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8529 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8530 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8531 (set_raw_breakpoint_at): New.
8532 (set_breakpoint_at): Rewrite to use it.
8533 (reinsert_breakpoint_handler): Delete.
8534 (set_reinsert_breakpoint): New.
8535 (reinsert_breakpoint_by_bp): Delete.
8536 (delete_reinsert_breakpoints): New.
8537 (uninsert_breakpoint): Rewrite.
8538 (uninsert_breakpoints_at): New.
8539 (reinsert_breakpoint): Rewrite.
8540 (reinsert_breakpoints_at): New.
8541 (check_breakpoints): Rewrite.
8542 (breakpoint_here): New.
8543 (breakpoint_inserted_here): New.
8544 (check_mem_read): Adjust.
8545 * mem-break.h (breakpoints_supported, breakpoint_here)
8546 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8547 (reinsert_breakpoint_by_bp): Delete declaration.
8548 (delete_reinsert_breakpoints): Declare.
8549 (reinsert_breakpoint): Delete declaration.
8550 (reinsert_breakpoints_at): Declare.
8551 (uninsert_breakpoint): Delete declaration.
8552 (uninsert_breakpoints_at): Declare.
8553 (check_breakpoints): Adjust prototype.
8554 * server.h: Adjust include order.
8555 (struct thread_info): Declare here. Add a `last_status' field.
8556
85572010-03-23 Michael Snyder <msnyder@vmware.com>
8558
8559 * server.c (crc32): New function.
8560 (handle_query): Add handling for 'qCRC:' request.
8561
85622010-03-23 Pedro Alves <pedro@codesourcery.com>
8563
8564 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8565 lwp had been stopped by a watchpoint.
8566
85672010-03-16 Pedro Alves <pedro@codesourcery.com>
8568
8569 * server.h (internal_error): Declare.
8570 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8571 * utils.c (internal_error): New function.
8572
85732010-03-15 Andreas Schwab <schwab@redhat.com>
8574
8575 * configure.srv: Fix typo setting srv_regobj.
8576
85772010-03-15 Pedro Alves <pedro@codesourcery.com>
8578
8579 * linux-low.c (fetch_register): Avoid passing a non string literal
8580 format to `error'.
8581 (usr_store_inferior_registers): Ditto.
8582
85832010-03-14 Pedro Alves <pedro@codesourcery.com>
8584
8585 * linux-low.c (linux_write_memory): Bail out early if peeking
8586 memory failed.
8587
85882010-03-14 Pedro Alves <pedro@codesourcery.com>
8589
8590 * linux-low.h (struct lwp_info): New fields
8591 `stopped_by_watchpoint' and `stopped_data_address'.
8592 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8593 here, and cache them in the lwp object.
8594 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8595 directly.
8596 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8597 field.
8598 (linux_stopped_by_watchpoint): Rewrite.
8599 (linux_stopped_data_address): Rewrite.
8600
86012010-03-06 Simo Melenius <simo.melenius@iki.fi>
8602
8603 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8604 switching the current inferior, not before.
8605
86062010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8607
8608 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8609 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8610 i386-linux.c and amd64-linux.c.
8611 (reg-i386.o): Removed.
8612 (reg-i386.c): Likewise.
8613 (reg-i386-linux.o): Likewise.
8614 (reg-i386-linux.c): Likewise.
8615 (reg-x86-64.o): Likewise.
8616 (reg-x86-64.c): Likewise.
8617 (reg-x86-64-linux.o): Likewise.
8618 (reg-x86-64-linux.c): Likewise.
8619 (i386.o): New.
8620 (i386.c): Likewise.
8621 (i386-linux.o): Likewise.
8622 (i386-linux.c): Likewise.
8623 (amd64.o): Likewise.
8624 (amd64.c): Likewise.
8625 (amd64-linux.o): Likewise.
8626 (amd64-linux.c): Likewise.
8627
8628 * configure.srv (srv_i386_regobj): New.
8629 (srv_i386_linux_regobj): Likewise.
8630 (srv_amd64_regobj): Likewise.
8631 (srv_amd64_linux_regobj): Likewise.
8632 (srv_i386_32bit_xmlfiles): Likewise.
8633 (srv_i386_64bit_xmlfiles): Likewise.
8634 (srv_i386_xmlfiles): Likewise.
8635 (srv_amd64_xmlfiles): Likewise.
8636 (srv_i386_linux_xmlfiles): Likewise.
8637 (srv_amd64_linux_xmlfiles): Likewise.
8638 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8639 srv_xmlfiles to $srv_i386_xmlfiles.
8640 (i[34567]86-*-mingw32ce*): Likewise.
8641 (i[34567]86-*-mingw*): Likewise.
8642 (i[34567]86-*-nto*): Likewise.
8643 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8644 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8645 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8646 (x86_64-*-linux*): Likewise.
8647
8648 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8649 (init_registers_amd64_linux): New.
8650 (x86_arch_setup): Replace init_registers_x86_64_linux with
8651 init_registers_amd64_linux.
8652
86532010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8654
8655 * configure.ac: Check for libdl. If it is not available link against
8656 static libthread_db.
8657 * configure: Regenerate.
8658
86592010-02-22 Pedro Alves <pedro@codesourcery.com>
8660
8661 PR9605
8662
8663 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8664 handing a read watchpoint.
8665 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8666
86672010-02-12 Doug Evans <dje@google.com>
8668
8669 * linux-low.c (linux_supports_tracefork_flag): Document.
8670 (linux_look_up_symbols): Add comment.
8671
86722010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8673
8674 * regcache.c (supply_register): Clear regcache if buf is NULL.
8675
86762010-02-02 Nicolas Roche <roche@sourceware.org>
8677 Joel Brobecker <brobecker@adacore.com>
8678
8679 * inferiors.c (find_inferior): Add function documentation.
8680 (unloaded_dll): Handle the case where the unloaded dll has not
8681 been previously registered in the dll list.
8682
86832010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8684
8685 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8686 (thumb2_breakpoint): New.
8687 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8688
86892010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8690
8691 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8692 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8693 breakpoints.
8694
86952010-01-21 Pedro Alves <pedro@codesourcery.com>
8696
8697 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8698
86992010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8700
8701 * linux-s390-low.c (s390_collect_ptrace_register)
8702 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8703
87042010-01-21 Doug Evans <dje@google.com>
8705
8706 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8707 (PTRACE_ARG4_TYPE): New macro.
8708 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8709 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8710 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8711 (usr_store_inferior_registers): Ditto.
8712 (linux_read_memory, linux_write_memory): Ditto.
8713 (linux_test_for_tracefork): Ditto.
8714
8715 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8716 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8717
87182010-01-21 Pedro Alves <pedro@codesourcery.com>
8719
8720 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8721 target.
8722
87232010-01-21 Pedro Alves <pedro@codesourcery.com>
8724
8725 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8726 prototype to take a regcache. Adjust.
8727
87282010-01-20 Pedro Alves <pedro@codesourcery.com>
8729
8730 * regcache.h (struct thread_info): Forward declare.
8731 (struct regcache): New.
8732 (new_register_cache): Adjust prototype.
8733 (get_thread_regcache): Declare.
8734 (free_register_cache): Adjust prototype.
8735 (registers_to_string, registers_from_string): Ditto.
8736 (supply_register, supply_register_by_name, collect_register)
8737 (collect_register_as_string, collect_register_by_name): Ditto.
8738 * regcache.c (struct inferior_regcache_data): Delete.
8739 (get_regcache): Rename to ...
8740 (get_thread_regcache): ... this. Adjust. Switch inferior before
8741 fetching registers.
8742 (regcache_invalidate_one): Adjust.
8743 (regcache_invalidate): Fix prototype.
8744 (new_register_cache): Return the new register cache.
8745 (free_register_cache): Change prototype.
8746 (realloc_register_cache): Adjust.
8747 (registers_to_string): Change prototype to take a regcache. Adjust.
8748 (registers_from_string): Ditto.
8749 (register_data): Ditto.
8750 (supply_register): Ditto.
8751 (supply_register_by_name): Ditto.
8752 (collect_register): Ditto.
8753 (collect_register_as_string): Ditto.
8754 (collect_register_by_name): Ditto.
8755 * server.c (process_serial_event): Adjust.
8756 * linux-low.h (regset_fill_func, regset_store_func): Change
8757 prototype.
8758 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8759 Change prototype.
8760 * linux-low.c (get_stop_pc): Adjust.
8761 (check_removed_breakpoint): Adjust.
8762 (linux_wait_for_event): Adjust.
8763 (linux_resume_one_lwp): Adjust.
8764 (fetch_register): Add regcache parameter. Adjust.
8765 (usr_store_inferior_registers): Ditto.
8766 (regsets_fetch_inferior_registers): Ditto.
8767 (regsets_store_inferior_registers): Ditto.
8768 (linux_fetch_registers, linux_store_registers): Ditto.
8769 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8770 regcache. Adjust.
8771 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8772 Ditto.
8773 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8774 prototype to take a regcache.
8775 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8776 * remote-utils.c (convert_ascii_to_int, outreg)
8777 (prepare_resume_reply): Change prototype to take a regcache.
8778 Adjust.
8779 * target.h (struct target_ops) <fetch_registers, store_registers>:
8780 Change prototype to take a regcache.
8781 (fetch_inferior_registers, store_inferior_registers): Change
8782 prototype to take a regcache. Adjust.
8783 * proc-service.c (ps_lgetregs): Adjust.
8784 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8785 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8786 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8787 take a regcache. Adjust.
8788 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8789 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8790 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8791 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8792 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8793 (cris_cannot_fetch_register):
8794 (cris_breakpoint_at): Change prototype to take a regcache.
8795 Adjust.
8796 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8797 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8798 to take a regcache. Adjust.
8799 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8800 Adjust.
8801 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8802 take a regcache. Adjust.
8803 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8804 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8805 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8806 * linux-mips-low.c (mips_get_pc):
8807 (mips_set_pc): Change prototype to take a regcache. Adjust.
8808 (mips_reinsert_addr): Adjust.
8809 (mips_collect_register): Change prototype to take a regcache.
8810 Adjust.
8811 (mips_supply_register):
8812 (mips_collect_register_32bit, mips_supply_register_32bit)
8813 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8814 (mips_store_fpregset): Ditto.
8815 * linux-ppc-low.c (ppc_supply_ptrace_register)
8816 (ppc_supply_ptrace_register): Ditto.
8817 (parse_spufs_run): Adjust.
8818 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8819 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8820 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8821 take a regcache. Adjust.
8822 * linux-s390-low.c (s390_collect_ptrace_register)
8823 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8824 (s390_set_pc): Change prototype to take a regcache. Adjust.
8825 (s390_arch_setup): Adjust.
8826 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8827 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8828 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8829 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8830 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8831 regcache. Adjust.
8832 (sparc_breakpoint_at): Adjust.
8833 * linux-xtensa-low.c (xtensa_fill_gregset):
8834 (xtensa_store_gregset):
8835 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8836 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8837 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8838 prototype to take a regcache. Adjust.
8839 * win32-arm-low.c (arm_fetch_inferior_register)
8840 (arm_store_inferior_register): Change prototype to take a
8841 regcache. Adjust.
8842 * win32-i386-low.c (i386_fetch_inferior_register)
8843 (i386_store_inferior_register): Change prototype to take a
8844 regcache. Adjust.
8845 * win32-low.c (child_fetch_inferior_registers)
8846 (child_store_inferior_registers): Change prototype to take a
8847 regcache. Adjust.
8848 (win32_wait): Adjust.
8849 (win32_fetch_inferior_registers): Change prototype to take a
8850 regcache. Adjust.
8851 (win32_store_inferior_registers): Adjust.
8852 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8853 store_inferior_register>: Change prototype to take a regcache.
8854
88552010-01-20 Doug Evans <dje@google.com>
8856
8857 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8858 #ifdef.
8859 (linux_wait_for_event1, linux_init_signals): Ditto.
8860 (W_STOPCODE): Provide definition if missing.
8861
88622010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8863
8864 * linux-low.c (linux_core_of_thread): New.
8865 (compare_ints, show_process, list_threads): New.
8866 (linux_qxfer_osdata): Report threads and cores.
8867 (linux_target_op): Register linux_core_of_thread.
8868 * remote-utils.c (prepare_resume_reply): Report the core.
8869 (buffer_xml_printf): Support %d specifier.
8870 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8871 New.
8872 (handle_query): Handle qXfer:threads. Announce availability
8873 thereof.
8874 * target.h (struct target_ops): New field core_of_thread.
8875
88762010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8877
8878 * Makefile.in (clean): Remove new generated files.
8879 (reg-s390.o, reg-s390.c): Remove rules.
8880 (reg-s390x.o, reg-s390x.c): Likewise.
8881 (s390-linux32.o, s390-linux32.c): Add rules.
8882 (s390-linux64.o, s390-linux64.c): Likewise.
8883 (s390x-linux64.o, s390x-linux64.c): Likewise.
8884 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8885 * linux-s390-low.c: Include <elf.h>.
8886 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8887 (init_registers_s390): Remove prototype.
8888 (init_registers_s390x): Likewise.
8889 (init_registers_s390_linux32): Add prototype.
8890 (init_registers_s390_linux64): Likewise.
8891 (init_registers_s390x_linux64): Likewise.
8892 (s390_num_regs_3264): New define.
8893 (s390_regmap_3264): New global variable.
8894 (s390_cannot_fetch_register): Remove obsolete check.
8895 (s390_cannot_store_register): Likewise.
8896 (s390_collect_ptrace_register): Handle upper/lower register halves.
8897 (s390_supply_ptrace_register): Likewise.
8898 (s390_fill_gregset): Update to register number changes.
8899 (s390_get_hwcap): New routine.
8900 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8901 Install appropriate regmap and register set.
8902
89032010-01-01 Joel Brobecker <brobecker@adacore.com>
8904
8905 * server.c (gdbserver_version): Update copyright year to 2010.
8906 * gdbreplay.c (gdbreplay_version): Likewise.
8907
89082009-12-28 Doug Evans <dje@google.com>
8909
8910 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8911 elf/external.h. Include <elf.h> instead but only if necessary.
8912
89132009-12-28 Pedro Alves <pedro@codesourcery.com>
8914
8915 * linux-low.c (linux_remove_process): Remove `detaching'
8916 parameter. Don't release/detach from thread_db here.
8917 (linux_kill): Release/detach from thread_db here, ...
8918 (linux_detach): ... and here, before actually detaching.
8919 (linux_wait_1): ... and here, when a process exits.
8920 * thread-db.c (any_thread_of): New.
8921 (thread_db_free): Switch the current inferior to a thread of the
8922 passed in process.
8923
89242009-12-21 Doug Evans <dje@google.com>
8925
8926 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8927
8928 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8929 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8930 warning ifndef __NR_tkill. Move setting of errno there too.
8931 Delete unnecessary resetting of errno after syscall.
8932 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8933
8934 * configure.ac: Check for dladdr.
8935 * config.in: Regenerate.
8936 * configure: Regenerate.
8937 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8938 (try_thread_db_load): Update.
8939
8940 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8941
89422009-12-18 Doug Evans <dje@google.com>
8943
8944 * event-loop.c: Include unistd.h if it exists.
8945
8946 * linux-low.c (my_waitpid): Move definition away from being in
8947 between linux_tracefork_child/linux_test_for_tracefork.
8948
8949 * gdb_proc_service.h (psaddr_t): Fix type.
8950 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8951 signature to match glibc.
8952
89532009-12-16 Doug Evans <dje@google.com>
8954
8955 * linux-low.c (linux_read_memory): Fix argument to read.
8956
89572009-11-26 Pedro Alves <pedro@codesourcery.com>
8958
8959 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8960 events, don't leave current_inferior pointing at null.
8961
89622009-11-26 Pedro Alves <pedro@codesourcery.com>
8963
8964 * win32-low.c (LOG): Delete.
8965 (OUTMSG): Output to stderr.
8966 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8967 on compile time LOG macro.
8968 (win32_wait): Fix debug output.
8969
89702009-11-26 Pedro Alves <pedro@codesourcery.com>
8971
8972 * win32-low.c (win32_add_one_solib): If the dll name is
8973 "ntdll.dll", prepend the system directory to the dll path.
8974
89752009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8976
8977 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8978
89792009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8980 Vladimir Prus <vladimir@codesourcery.com>
8981
8982 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8983 * configure.ac: Check for __mcoldfire__ and set
8984 gdb_cv_m68k_is_coldfire.
8985 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8986 reg-cf.o and reg-m68k.o.
8987 * configure: Regenerated.
8988
89892009-11-16 Pedro Alves <pedro@codesourcery.com>
8990
8991 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8992 Pass it to thread_db_free.
8993 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8994 proper `detaching' argument to linux_remove_process.
8995 * linux-low.h (thread_db_free): Add `detaching' parameter.
8996 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8997 to thread_db_free.
8998 (thread_db_free): Add `detaching' parameter. Only
8999 call td_ta_clear_event if detaching from process.
9000
90012009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9002
9003 * thread-db.c (thread_db_free): Fix typo.
9004
90052009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9006
9007 PR gdb/10838
9008 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9009
90102009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9011
9012 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9013 with an i686 compiler.
9014 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9015 needed.
9016 * configure: Rebuilt.
9017
90182009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9019
9020 PR gdb/10783
9021
9022 * server.c (handle_search_memory_1): Correct read_addr initialization
9023 in loop for searching subsequent chunks.
9024
90252009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9026
9027 * configure.ac: New --with-libthread-db option.
9028 * thread-db.c: Allow direct dependence on libthread_db.
9029 (thread_db_free): Adjust.
9030 * config.in: Regenerate.
9031 * configure: Likewise.
9032
90332009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9034
9035 PR gdb/10757
9036 * thread-db.c (attach_thread): New function.
9037 (maybe_attach_thread): Return success/failure.
9038 (find_new_threads_callback): Adjust.
9039 (thread_db_find_new_threads): Loop until no new threads.
9040
90412009-10-13 Pedro Alves <pedro@codesourcery.com>
9042
9043 * proc-service.c (ps_lgetregs): Formatting.
9044
90452009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9046
9047 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9048 * configure.ac: Adjust.
9049 * linux-low.h (struct process_info_private): Move members to struct
9050 thread_db.
9051 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9052 * linux-low.c (linux_remove_process): Adjust.
9053 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9054 * server.c (handle_query): Move code ...
9055 (handle_monitor_command): ... here. New function.
9056 * target.h (struct target_ops): New member.
9057 * thread-db.c (struct thread_db): New.
9058 (libthread_db_search_path): New variable.
9059 (thread_db_create_event, thread_db_enable_reporting)
9060 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9061 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9062 (try_thread_db_load_1, dladdr_to_soname): New functions.
9063 (try_thread_db_load, thread_db_load_search): New functions.
9064 (thread_db_init): Search for libthread_db.
9065 (thread_db_free): New function.
9066 (thread_db_handle_monitor_command): Likewise.
9067 * config.in: Regenerate.
9068 * configure: Regenerate.
9069
90702009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9071
9072 * spu-low.c (spu_kill): Wait for inferior to terminate.
9073 Call clear_inferiors.
9074 (spu_detach): Call clear_inferiors.
9075
90762009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9077
9078 * aclocal.m4: Regenerate.
9079 * config.in: Likewise.
9080 * configure: Likewise.
9081
90822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9083
9084 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9085 (parse_spufs_run): New function.
9086 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9087 (ppc_breakpoint_at): Handle SPU breakpoints.
9088
90892009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9090
9091 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9092 (SPUFS_MAGIC): Define.
9093 (spu_enumerate_spu_ids): New function.
9094 (linux_qxfer_spu): New function.
9095 (linux_target_ops): Install linux_qxfer_spu.
9096
90972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9098
9099 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9100 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9101 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9102 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9103 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9104 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9105 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9106 (init_registers_powerpc_cell32l): Add prototype.
9107 (init_registers_powerpc_cell64l): Likewise.
9108 (ppc_arch_setup): Detect Cell/B.E. architecture.
9109
91102009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9111
9112 * Makefile.in (datarootdir): New variable.
9113
91142009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9115
9116 * linux-low.c (linux_write_memory): Update debugging output.
9117 * Makefile.in (clean): Add new descriptions.
9118 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9119 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9120 * configure.srv: Add new files for arm*-*-linux*.
9121 * linux-arm-low.c: Add new declarations.
9122 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9123 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9124 (HWCAP_VFPv3D16): New.
9125 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9126 instead of __IWMMXT__.
9127 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9128 (arm_arch_setup): New.
9129 (target_regsets): Remove #ifdef. Add VFP regset.
9130 (the_low_target): Use arm_arch_setup.
9131
91322009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9133
9134 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9135 the main thread again.
9136
91372009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9138
9139 Adding Neutrino gdbserver.
9140 * configure: Regenerated.
9141 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9142 * configure.srv (i[34567]86-*-nto*): New target.
9143 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9144 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9145 (nto_comctrl) [__QNX__]: New function.
9146 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9147
91482009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9149
9150 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9151 srv_tgtobj.
9152
91532009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9154 Pedro Alves <pedro@codesourcery.com>
9155
9156 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9157 don't support CONTEXT_EXTENDED_REGISTERS.
9158 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9159 (the_low_target): Install them.
9160 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9161 failing with ERROR_PIPE_NOT_CONNECTED.
9162
91632009-06-30 Doug Evans <dje@google.com>
9164 Pierre Muller <muller@ics.u-strasbg.fr>
9165
9166 Add h/w watchpoint support to x86-linux, win32-i386.
9167 * Makefile.in (SFILES): Add i386-low.c
9168 (i386_low_h): Define.
9169 (i386-low.o): Add dependencies.
9170 (linux-x86-low.o): Add i386-low.h dependency.
9171 (win32-i386-low.o): Ditto.
9172 * i386-low.c: New file.
9173 * i386-low.h: New file.
9174 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9175 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9176 * linux-low.c (linux_add_process): Initialize arch_private.
9177 (linux_remove_process): Free arch_private.
9178 (add_lwp): Initialize arch_private.
9179 (delete_lwp): Free arch_private.
9180 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9181 provided.
9182 * linux-low.h (process_info_private): New member arch_private.
9183 (lwp_info): New member arch_private.
9184 (linux_target_ops): New members new_process, new_thread,
9185 prepare_to_resume.
9186 (ptid_of): New macro.
9187 * linux-x86-low.c: Include stddef.h, i386-low.h.
9188 (arch_process_info): New struct.
9189 (arch_lwp_info): New struct.
9190 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9191 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9192 (i386_dr_low_get_status): New function.
9193 (x86_insert_point, x86_remove_point): New functions.
9194 (x86_stopped_by_watchpoint): New function.
9195 (x86_stopped_data_address): New function.
9196 (x86_linux_new_process, x86_linux_new_thread): New functions.
9197 (x86_linux_prepare_to_resume): New function.
9198 (the_low_target): Add entries for insert_point, remove_point,
9199 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9200 prepare_to_resume.
9201 * server.c (debug_hw_points): New global.
9202 (monitor_show_help): Document set debug-hw-points.
9203 (handle_query): Process "set debug-hw-points".
9204 * server.h (debug_hw_points): Declare.
9205 (paddress): Declare.
9206 * utils.c (NUMCELLS, CELLSIZE): New macros.
9207 (get_sell, xsnprintf, paddress): New functions.
9208 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9209 remove_point, stopped_by_watchpoint, stopped_data_address.
9210 * win32-i386-low.c: Include i386-low.h.
9211 (debug_reg_state): Replaces dr.
9212 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9213 (i386_dr_low_get_status): New function.
9214 (i386_insert_point, i386_remove_point): New functions.
9215 (i386_stopped_by_watchpoint): New function.
9216 (i386_stopped_data_address): New function.
9217 (i386_initial_stuff): Update.
9218 (get_thread_context,set_thread_context,i386_thread_added): Update.
9219 (the_low_target): Add entries for insert_point,
9220 remove_point, stopped_by_watchpoint, stopped_data_address.
9221 * win32-low.c (win32_insert_watchpoint): New function.
9222 (win32_remove_watchpoint): New function.
9223 (win32_stopped_by_watchpoint): New function.
9224 (win32_stopped_data_address): New function.
9225 (win32_target_ops): Add entries for insert_watchpoint,
9226 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9227 * win32-low.h (win32_target_ops): New members insert_point,
9228 remove_point, stopped_by_watchpoint, stopped_data_address.
9229
92302009-06-25 Pedro Alves <pedro@codesourcery.com>
9231
9232 * server.c (process_serial_event): Re-return unsupported, not
9233 error, if the type isn't recognized. Re-allow supporting only
9234 insert or remove packets. Also call require_running for
9235 breakpoints. Add missing break statement to default case. Tidy.
9236 * target.h (struct target_ops): Rename insert_watchpoint to
9237 insert_point, and remove_watchpoint to remove_point.
9238
9239 * linux-low.h (struct linux_target_ops): Likewise.
9240 * linux-low.c (linux_insert_watchpoint): Rename to ...
9241 (linux_insert_point): ... this. Adjust.
9242 (linux_remove_watchpoint): Rename to ...
9243 (linux_remove_point): ... this. Adjust.
9244 (linux_target_ops): Adjust.
9245 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9246 (cris_insert_point): ... this.
9247 (cris_remove_watchpoint): Rename to ...
9248 (cris_remove_point): ... this.
9249 (the_low_target): Adjust.
9250
92512009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9252
9253 * server.c (handle_v_kill): Pass signal_pid to
9254 kill_inferior if multi_process is zero.
9255
92562009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9257
9258 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9259 * target.h (target_ops): Comment for *_watchpoint to make it clear
9260 the functions can get types '0' and '1'.
9261
92622009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9263
9264 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9265 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9266 * regcache.c (get_regcache): Likewise.
9267 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9268 * win32-low.c (child_fetch_inferior_registers): Remove check for
9269 regno 0.
9270
92712009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9272 Pedro Alves <pedro@codesourcery.com>
9273
9274 * target.h (struct target_ops) <supports_multi_process>: New
9275 callback.
9276 (target_supports_multi_process): New.
9277 * server.c (handle_query): Even if GDB reports support, only
9278 enable multi-process if the target also supports it. Report
9279 multi-process support only if the target backend supports it.
9280 * linux-low.c (linux_supports_multi_process): New function.
9281 (linux_target_ops): Install it as target_supports_multi_process
9282 callback.
9283
92842009-05-24 Doug Evans <dje@google.com>
9285
9286 Global renaming of find_thread_pid to find_thread_ptid.
9287 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9288 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9289 All callers updated.
9290
9291 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9292 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9293 directly.
9294
9295 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9296 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9297 (linux_resume_one_lwp): Ditto.
9298
92992009-05-23 Doug Evans <dje@google.com>
9300
9301 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9302 from struct inferior_list_entry * to struct lwp_info *.
9303 All callers updated.
9304
93052009-05-13 Doug Evans <dje@google.com>
9306
9307 * linux-x86-low.c: Don't include assert.h.
9308 (x86_siginfo_fixup): Use fatal, not assert.
9309 (x86_arch_setup): Fix comment.
9310
93112009-05-12 Doug Evans <dje@google.com>
9312
9313 Biarch support for i386/amd64 gdbserver.
9314 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9315 Add linux-x86-low.c.
9316 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9317 (linux-x86-low.o): Add.
9318 * linux-x86-64-low.c: Delete.
9319 * linux-i386-low.c: Delete.
9320 * linux-x86-low.c: New file.
9321 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9322 linux-x86-low.o.
9323 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9324 linux-x86-low.o.
9325 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9326 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9327 (linux_child_pid_to_exec_file): New function.
9328 (elf_64_header_p, elf_64_file_p): New functions.
9329 (siginfo_fixup): New function.
9330 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9331 give target a chance to convert layout.
9332 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9333 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9334
93352009-05-07 Doug Evans <dje@google.com>
9336
9337 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9338 (regsets_store_inferior_registers): Ditto.
9339
93402009-05-06 Pedro Alves <pedro@codesourcery.com>
9341
9342 PR server/10048
9343
9344 * linux-low.c (must_set_ptrace_flags): Delete.
9345 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9346 of the global.
9347 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9348 `lwp->must_set_ptrace_flags' instead.
9349 (linux_wait_for_event_1): Set ptrace options here.
9350 (linux_wait_1): ... not here.
9351
93522009-04-30 Doug Evans <dje@google.com>
9353
9354 * inferiors.c (started_inferior_callback): New function.
9355 (attached_inferior_callback): New function.
9356 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9357 * server.c (print_started_pid, print_attached_pid): New functions.
9358 (detach_or_kill_for_exit): New function.
9359 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9360 * server.h (have_started_inferiors_p): Declare.
9361 (have_attached_inferiors_p): Declare.
9362
9363 * inferiors.c (remove_process): Fix memory leak, free process.
9364 * linux-low.c (linux_remove_process): New function.
9365 (linux_kill): Call it instead of remove_process.
9366 (linux_detach, linux_wait_1): Ditto.
9367
93682009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9369
9370 * configure.srv: Add x86 Windows CE target.
9371
93722009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9373
9374 * inferiors.c (get_thread_process): Make global.
9375 * server.h (get_thread_process): Add prototype.
9376 * thread-db.c (find_one_thread): Use get_thread_process
9377 instead of current_process.
9378 (thread_db_get_tls_address): Do not crash if called when
9379 thread layer is not yet initialized.
9380
93812009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9382
9383 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9384 * spu-low.c (current_tid): Rename to ...
9385 (current_ptid): ... this.
9386 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9387 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9388 ptid_get_lwp (current_ptid) instead of current_tid.
9389 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9390 instead of current_tid. Use find_process_pid to verify pid
9391 argument is valid. Pass proper argument to remove_process.
9392 (spu_thread_alive): Compare current_ptid instead of current_tid.
9393 (spu_resume): Likewise.
9394
93952009-04-02 Pedro Alves <pedro@codesourcery.com>
9396
9397 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9398 variable.
9399
94002009-04-01 Pedro Alves <pedro@codesourcery.com>
9401
9402 Implement the multiprocess extensions, and add linux multiprocess
9403 support.
9404
9405 * server.h (ULONGEST): Declare.
9406 (struct ptid, ptid_t): New.
9407 (minus_one_ptid, null_ptid): Declare.
9408 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9409 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9410 (struct inferior_list_entry): Change `id' type from unsigned from
9411 to ptid_t.
9412 (struct sym_cache, struct breakpoint, struct
9413 process_info_private): Forward declare.
9414 (struct process_info): Declare.
9415 (current_process): Declare.
9416 (all_processes): Declare.
9417 (initialize_inferiors): Declare.
9418 (add_thread): Adjust to use ptid_t.
9419 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9420 (add_process, remove_process, find_thread_pid): Declare.
9421 (find_inferior_id): Adjust to use ptid_t.
9422 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9423 (multi_process): Declare.
9424 (push_event): Adjust to use ptid_t.
9425 (read_ptid, write_ptid): Declare.
9426 (prepare_resume_reply): Adjust to use ptid_t.
9427 (clear_symbol_cache): Declare.
9428 * inferiors.c (all_processes): New.
9429 (null_ptid, minus_one_ptid): New.
9430 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9431 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9432 (add_thread): Change unsigned long to ptid. Remove gdb_id
9433 parameter. Adjust.
9434 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9435 (gdb_id_to_thread): Rename to ...
9436 (find_thread_pid): ... this. Change unsigned long to ptid.
9437 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9438 (loaded_dll, pull_pid_from_list): Adjust.
9439 (add_process, remove_process, find_process_pid)
9440 (get_thread_process, current_process, initialize_inferiors): New.
9441 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9442 (struct target_waitstatus) <related_pid>: Ditto.
9443 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9444 return type to int.
9445 (struct target_ops) <join>: Add `pid' argument.
9446 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9447 (struct target_ops) <wait>: Add `ptid' field. Change return type
9448 to ptid.
9449 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9450 (mywait): Add `ptid' argument. Change return type to ptid_t.
9451 (target_pid_to_str): Declare.
9452 * target.c (set_desired_inferior): Adjust to use ptids.
9453 (mywait): Add new `ptid' argument. Adjust.
9454 (target_pid_to_str): New.
9455 * mem-break.h (free_all_breakpoints): Declare.
9456 * mem-break.c (breakpoints): Delelete.
9457 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9458 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9459 to use per-process breakpoint list.
9460 (free_all_breakpoints): New.
9461 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9462 (symbol_cache, all_symbols_looked_up): Delete.
9463 (hexchars): New.
9464 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9465 read_ptid): New.
9466 (prepare_resume_reply): Change ptid argument's type from unsigned
9467 long to ptid_t. Adjust. Implement W;process and X;process.
9468 (free_sym_cache, clear_symbol_cache): New.
9469 (look_up_one_symbol): Adjust to per-process symbol cache. *
9470 * server.c (cont_thread, general_thread, step_thread): Change type
9471 to ptid_t.
9472 (attached): Delete.
9473 (multi_process): New.
9474 (last_ptid): Change type to ptid_t.
9475 (struct vstop_notif) <ptid>: Change type to ptid_t.
9476 (queue_stop_reply, push_event): Change `ptid' argument's type to
9477 ptid_t.
9478 (discard_queued_stop_replies): Add `pid' argument.
9479 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9480 changes. Don't reference the `attached' global.
9481 (attach_inferior): Adjust to mywait interface changes.
9482 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9483 features. Handle and report "multiprocess+". Handle
9484 "qAttached:PID".
9485 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9486 changes.
9487 (handle_v_kill): New.
9488 (handle_v_stopped): Adjust to use target_pid_to_str.
9489 (handle_v_requests): Allow multiple attaches and runs when
9490 multiprocess extensions are in effect. Handle "vKill".
9491 (myresume): Adjust to use ptids.
9492 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9493 (handle_status): Adjust to discard_queued_stop_replies interface
9494 change.
9495 (first_thread_of, kill_inferior_callback)
9496 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9497 (main): Call initialize_inferiors. Adjust to use ptids, killing
9498 and detaching from all inferiors. Handle multiprocess packet
9499 variants.
9500 * linux-low.h: Include gdb_proc_service.h.
9501 (struct process_info_private): New.
9502 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9503 <lwpid_of>: Use ptid_get_lwp.
9504 (get_lwp_thread): Adjust.
9505 (struct lwp_info): Add `dead' member.
9506 (find_lwp_pid): Declare.
9507 * linux-low.c (thread_db_active): Delete.
9508 (new_inferior): Adjust comment.
9509 (inferior_pid): Delete.
9510 (linux_add_process): New.
9511 (handle_extended_wait): Adjust.
9512 (add_lwp): Change unsigned long to ptid.
9513 (linux_create_inferior): Add process to processes table. Adjust
9514 to use ptids. Don't set new_inferior here.
9515 (linux_attach_lwp): Rename to ...
9516 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9517 it. Adjust to use ptids.
9518 (linux_attach_lwp): New.
9519 (linux_attach): Add process to processes table. Don't set
9520 new_inferior here.
9521 (struct counter): New.
9522 (second_thread_of_pid_p, last_thread_of_process_p): New.
9523 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9524 multiple processes.
9525 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9526 processes. Remove process from process table.
9527 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9528 to multiple processes.
9529 (any_thread_of): New.
9530 (linux_detach): Add `pid' argument, and handle it. Remove process
9531 from processes table.
9532 (linux_join): Add `pid' argument. Handle it.
9533 (linux_thread_alive): Change unsighed long argument to ptid_t.
9534 Consider dead lwps as not being alive.
9535 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9536 threads we're not interested in.
9537 (same_lwp, find_lwp_pid): New.
9538 (linux_wait_for_lwp): Change `pid' argument's type from int to
9539 ptid_t. Adjust.
9540 (linux_wait_for_event): Rename to ...
9541 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9542 from int to ptid_t. Adjust.
9543 (linux_wait_for_event): New.
9544 (linux_wait_1): Add `ptid' argument. Change return type to
9545 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9546 that exit from the process table.
9547 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9548 Adjust.
9549 (mark_lwp_dead): New.
9550 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9551 stopping all threads, mark its main lwp as dead.
9552 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9553 ptids.
9554 (fetch_register, usr_store_inferior_registers)
9555 (regsets_fetch_inferior_registers)
9556 (regsets_store_inferior_registers, linux_read_memory)
9557 (linux_write_memory): Inline `inferior_pid'.
9558 (linux_look_up_symbols): Adjust to use per-process
9559 `thread_db_active'.
9560 (linux_request_interrupt): Adjust to use ptids.
9561 (linux_read_auxv): Inline `inferior_pid'.
9562 (initialize_low): Don't reference thread_db_active.
9563 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9564 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9565 (ps_getpid): Return the pid of the current inferior.
9566 * thread-db.c (proc_handle, thread_agent): Delete.
9567 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9568 per-process data.
9569 (find_one_thread): Change argument type to ptid_t. Adjust to
9570 per-process data.
9571 (maybe_attach_thread): Adjust to per-process data and ptids.
9572 (thread_db_find_new_threads): Ditto.
9573 (thread_db_init): Ditto.
9574 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9575 processes table. Adjust to use ptids.
9576 (spu_kill, spu_detach): Adjust interface. Remove process from
9577 processes table.
9578 (spu_join, spu_thread_alive): Adjust interface.
9579 (spu_wait): Adjust interface. Remove process from processes
9580 table. Adjust to use ptids.
9581 * win32-low.c (current_inferior_tid): Delete.
9582 (current_inferior_ptid): New.
9583 (debug_event_ptid): New.
9584 (thread_rec): Take a ptid. Adjust.
9585 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9586 (child_delete_thread): Ditto.
9587 (do_initial_child_stuff): Add `attached' argument. Add process to
9588 processes table.
9589 (child_fetch_inferior_registers, child_store_inferior_registers):
9590 Adjust.
9591 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9592 (win32_attach): Pass 1 to do_initial_child_stuff.
9593 (win32_kill): Adjust interface. Remove process from processes
9594 table.
9595 (win32_detach): Ditto.
9596 (win32_join): Adjust interface.
9597 (win32_thread_alive): Take a ptid.
9598 (win32_resume): Adjust to use ptids.
9599 (get_child_debug_event): Ditto.
9600 (win32_wait): Adjust interface. Remove exiting process from
9601 processes table.
9602
96032009-04-01 Pedro Alves <pedro@codesourcery.com>
9604
9605 Non-stop mode support.
9606
9607 * server.h (non_stop): Declare.
9608 (gdb_client_data, handler_func): Declare.
9609 (delete_file_handler, add_file_handler, start_event_loop):
9610 Declare.
9611 (handle_serial_event, handle_target_event, push_event)
9612 (putpkt_notif): Declare.
9613 * target.h (enum resume_kind): New.
9614 (struct thread_resume): Replace `step' field by `kind' field.
9615 (TARGET_WNOHANG): Define.
9616 (struct target_ops) <wait>: Add `options' argument.
9617 <supports_non_stop, async, start_non_stop>: New fields.
9618 (target_supports_non_stop, target_async): New.
9619 (start_non_stop): Declare.
9620 (mywait): Add `options' argument.
9621 * target.c (mywait): Add `options' argument. Print child exit
9622 notifications here.
9623 (start_non_stop): New.
9624 * server.c (non_stop, own_buf, mem_buf): New globals.
9625 (struct vstop_notif): New.
9626 (notif_queue): New global.
9627 (queue_stop_reply, push_event, discard_queued_stop_replies)
9628 (send_next_stop_reply): New.
9629 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9630 interface changes.
9631 (attach_inferior): In non-stop mode, don't wait for the target
9632 here.
9633 (handle_general_set): Handle QNonStop.
9634 (handle_query): When handling qC, return the current general
9635 thread, instead of the first thread of the list.
9636 (handle_query): If the backend supports non-stop mode, include
9637 QNonStop+ in the qSupported query response.
9638 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9639 and non-stop mode.
9640 (handle_v_attach, handle_v_run): Handle non-stop mode.
9641 (handle_v_stopped): New.
9642 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9643 (myresume): Adjust to use resume_kind. Handle non-stop.
9644 (queue_stop_reply_callback): New.
9645 (handle_status): Handle non-stop mode.
9646 (main): Clear non_stop flag on reconnection. Use the event-loop.
9647 Refactor serial protocol handling from here ...
9648 (process_serial_event): ... to this new function. When GDB
9649 selects any thread, select one here. In non-stop mode, wait until
9650 GDB acks all pending events before exiting.
9651 (handle_serial_event, handle_target_event): New.
9652 * remote-utils.c (remote_open): Install remote_desc in the event
9653 loop.
9654 (remote_close): Remove remote_desc from the event loop.
9655 (putpkt_binary): Rename to...
9656 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9657 (putpkt_binary): New as wrapper around putpkt_binary_1.
9658 (putpkt_notif): New.
9659 (prepare_resume_reply): In non-stop mode, don't change the
9660 general_thread.
9661 * event-loop.c: New.
9662 * Makefile.in (OBJ): Add event-loop.o.
9663 (event-loop.o): New rule.
9664
9665 * linux-low.h (pid_of): Moved here.
9666 (lwpid_of): New.
9667 (get_lwp_thread): Use lwpid_of.
9668 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9669 * linux-low.c (pid_of): Delete.
9670 (inferior_pid): Use lwpid_of.
9671 (linux_event_pipe): New.
9672 (target_is_async_p): New.
9673 (delete_lwp): New.
9674 (handle_extended_wait): Use lwpid_of.
9675 (add_lwp): Don't set lwpid field.
9676 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9677 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9678 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9679 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9680 first. Adjust to linux_wait_for_event interface changes. Use
9681 lwpid_of.
9682 (linux_detach): Don't delete the main lwp here.
9683 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9684 (status_pending_p): Don't consider explicitly suspended lwps.
9685 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9686 pointer. Add OPTIONS argument. Change return type to int. Use
9687 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9688 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9689 pointer. Add status pointer argument. Return a pid instead of a
9690 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9691 changes. In non-stop mode, don't switch to a random thread.
9692 (linux_wait): Rename to...
9693 (linux_wait_1): ... this. Add target_options argument, and handle
9694 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9695 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9696 clean exit and signal exit code. Don't stop all threads in
9697 non-stop mode. In all-stop mode, only stop all threads when
9698 reporting a stop to GDB. Handle explicit thread stop requests.
9699 (async_file_flush, async_file_mark): New.
9700 (linux_wait): New.
9701 (send_sigstop): Use lwpid_of.
9702 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9703 interface changes. In non-stop mode, don't switch to a random
9704 thread.
9705 (linux_resume_one_lwp): Use lwpid_of.
9706 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9707 (linux_resume_one_thread): ... this. Handle resume_stop. In
9708 non-stop mode, don't look for pending flag in all threads.
9709 (resume_status_pending_p): Don't consider explicitly suspended
9710 threads.
9711 (my_waitpid): Reimplement. Emulate __WALL.
9712 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9713 Use lwpid_of.
9714 (sigchld_handler, linux_supports_non_stop, linux_async)
9715 (linux_start_non_stop): New.
9716 (linux_target_ops): Register linux_supports_non_stop, linux_async
9717 and linux_start_non_stop.
9718 (initialize_low): Install SIGCHLD handler.
9719 * thread-db.c (thread_db_create_event, find_one_thread)
9720 (thread_db_get_tls_address): Use lwpid_of.
9721 * win32-low.c (win32_detach): Adjust to use resume_kind.
9722 (win32_wait): Add `options' argument.
9723 * spu-low.c (spu_resume): Adjust to use resume_kind.
9724 (spu_wait): Add `options' argument.
9725
97262009-04-01 Pedro Alves <pedro@codesourcery.com>
9727
9728 Decouple target code from remote protocol.
9729
9730 * target.h (enum target_waitkind): New.
9731 (struct target_waitstatus): New.
9732 (struct target_ops) <wait>: Return an unsigned long. Take a
9733 target_waitstatus pointer instead of a char pointer.
9734 (mywait): Likewise.
9735 * target.c (mywait): Change prototype to return an unsigned long.
9736 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9737 * server.h (thread_from_wait, old_thread_from_wait): Delete
9738 declarations.
9739 (prepare_resume_reply): Change prototype to take a
9740 target_waitstatus.
9741 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9742 (last_status, last_ptid): New.
9743 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9744 pid instead of a signal.
9745 (attach_inferior): Remove "status" and "signal" parameters.
9746 Adjust.
9747 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9748 not as an address.
9749 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9750 (handle_v_requests, myresume): Remove "status" and "signal"
9751 parameters. Adjust.
9752 (handle_status): New.
9753 (main): Delete local `status'. Adjust.
9754 * remote-utils.c: Include target.h.
9755 (prepare_resume_reply): Change prototype to take a
9756 target_waitstatus. Adjust.
9757
9758 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9759 interface.
9760 * spu-low.c (spu_wait): Adjust.
9761 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9762 Delete.
9763 (win32_wait): Adjust.
9764
97652009-04-01 Pedro Alves <pedro@codesourcery.com>
9766
9767 * target.h (struct thread_resume): Delete leave_stopped member.
9768 (struct target_ops): Add a `n' argument to the `resume' callback.
9769 * server.c (start_inferior): Adjust.
9770 (handle_v_cont, myresume): Adjust.
9771 * linux-low.c (check_removed_breakpoint): Adjust to resume
9772 interface change, and to removed leave_stopped field.
9773 (resume_ptr): Delete.
9774 (struct thread_resume_array): New.
9775 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9776 resume interface change.
9777 (linux_continue_one_thread, linux_queue_one_thread)
9778 (resume_status_pending_p): Check if the resume field is NULL
9779 instead of checking the leave_stopped member.
9780 (linux_resume): Adjust to the target resume interface change.
9781 * spu-low.c (spu_resume): Adjust to the target resume interface
9782 change.
9783 * win32-low.c (win32_detach, win32_resume): Ditto.
9784
97852009-04-01 Pedro Alves <pedro@codesourcery.com>
9786
9787 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9788 flag.
9789 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9790 pending.
9791 (linux_continue_one_thread): Only preserve the stepping flag if
9792 there's a pending breakpoint.
9793
97942009-03-31 Pedro Alves <pedro@codesourcery.com>
9795
9796 * server.c (main): After the inferior having exited, call
9797 remote_close before exiting gdbserver.
9798
97992009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9800
9801 Fix size of FPSCR in Power 7 processors.
9802 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9803 (PPC_FEATURE_HAS_DFP): New #define.
9804 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9805 size of the FPSCR.
9806
98072009-03-23 Pedro Alves <pedro@codesourcery.com>
9808
9809 * server.c (handle_query) Whitespace and formatting.
9810
98112009-03-22 Pedro Alves <pedro@codesourcery.com>
9812
9813 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9814 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9815 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9816 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9817 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9818 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9819 Makefile.in, configure.ac: Fix whitespace throughout.
9820 * configure: Regenerate.
9821
98222009-03-22 Pedro Alves <pedro@codesourcery.com>
9823
9824 * inferiors.c (find_inferior): Make it safe for the callback
9825 function to delete the currently iterated inferior.
9826
98272009-03-22 Pedro Alves <pedro@codesourcery.com>
9828
9829 * Makefile.in (linuw_low_h): Move higher.
9830 (thread-db.o): Depend on $(linux_low_h).
9831
98322009-03-17 Pedro Alves <pedro@codesourcery.com>
9833
9834 Rename "process" to "lwp" throughout.
9835
9836 * linux-low.c (all_processes): Rename to...
9837 (all_lwps): ... this.
9838 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9839 (add_process): Rename to ...
9840 (add_lwp): ... this. Adjust.
9841 (linux_create_inferior): Adjust.
9842 (linux_attach_lwp): Adjust.
9843 (linux_attach): Adjust.
9844 (linux_kill_one_process): Rename to ...
9845 (linux_kill_one_lwp): ... this. Adjust.
9846 (linux_kill): Adjust.
9847 (linux_detach_one_process): Rename to ...
9848 (linux_detach_one_lwp): ... this. Adjust.
9849 (linux_detach): Adjust.
9850 (check_removed_breakpoint): Adjust.
9851 (status_pending_p): Adjust.
9852 (linux_wait_for_process): Rename to ...
9853 (linux_wait_for_lwp): ... this. Adjust.
9854 (linux_wait_for_event): Adjust.
9855 (send_sigstop): Adjust.
9856 (wait_for_sigstop): Adjust.
9857 (stop_all_processes): Rename to ...
9858 (stop_all_lwps): ... this.
9859 (linux_resume_one_process): Rename to ...
9860 (linux_resume_one_lwp): ... this. Adjust.
9861 (linux_set_resume_request, linux_continue_one_thread)
9862 (linux_queue_one_thread, resume_status_pending_p)
9863 (usr_store_inferior_registers, regsets_store_inferior_registers)
9864 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9865 Adjust.
9866 * linux-low.h (get_process): Rename to ...
9867 (get_lwp): ... this. Adjust.
9868 (get_thread_process): Rename to ...
9869 (get_thread_lwp): ... this. Adjust.
9870 (get_process_thread): Rename to ...
9871 (get_lwp_thread): ... this. Adjust.
9872 (struct process_info): Rename to ...
9873 (struct lwp_info): ... this.
9874 (all_processes): Rename to ...
9875 (all_lwps): ... this.
9876 * proc-service.c (ps_lgetregs): Adjust.
9877 * thread-db.c (thread_db_create_event, find_one_thread)
9878 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9879
98802009-03-14 Pedro Alves <pedro@codesourcery.com>
9881
9882 * server.c (handle_query): Handle "qAttached".
9883
98842009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9885
9886 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9887 GPLv3, update license URL.
9888
98892009-03-01 Doug Evans <dje@google.com>
9890
9891 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9892 (server_h): Add gdb_signals.h.
9893 (signals.o): Update.
9894 * server.h (target_signal_from_host,target_signal_to_host_p)
9895 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9896
98972009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9898
9899 * remote-utils.c (getpkt): Also generate remote-debug
9900 information if noack_mode is set.
9901
99022009-02-06 Pedro Alves <pedro@codesourcery.com>
9903
9904 * server.c (handle_query): Report qXfer:siginfo:read and
9905 qXfer:siginfo:write as supported and handle them.
9906 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9907 * linux-low.c (linux_xfer_siginfo): New.
9908 (linux_target_ops): Set it.
9909
99102009-01-26 Pedro Alves <pedro@codesourcery.com>
9911
9912 * server.c (gdbserver_usage): Mention --remote-debug.
9913 (main): Accept '--remote-debug' switch.
9914
99152009-01-18 Doug Evans <dje@google.com>
9916
9917 * regcache.c (new_register_cache): No need to check result of xcalloc.
9918 * server.c (handle_search_memory): Back out calls to xmalloc,
9919 result is checked and error is returned to user upon failure.
9920 (handle_query): Ditto. Add more checks for result of malloc.
9921 (handle_v_cont): Check result of malloc, report error back to
9922 user upon failure.
9923 (handle_v_run): Ditto. Call freeargv.
9924 * server.h (freeargv): Declare.
9925 * utils.c (freeargv): New fn.
9926
99272009-01-15 Doug Evans <dje@google.com>
9928
9929 * gdbreplay.c (perror_with_name): Make arg const char *.
9930 * server.h (target_signal_to_name): Make return type const char *.
9931 * thread-db.c (thread_db_err_str): Make return type const char *.
9932 * utils.c (perror_with_name): Make arg const char *.
9933
99342009-01-14 Pedro Alves <pedro@codesourcery.com>
9935
9936 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9937 when handling a EXIT_PROCESS_DEBUG_EVENT.
9938
99392009-01-06 Joel Brobecker <brobecker@adacore.com>
9940
9941 * gdbreplay.c (gdbreplay_version): Update copyright year.
9942 * server.c (gdbserver_version): Likewise.
9943
99442009-01-05 Doug Evans <dje@google.com>
9945
9946 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9947 (handle_extended_wait): Improve comment.
9948
99492008-12-13 Doug Evans <dje@google.com>
9950
9951 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9952 * server.h (ATTR_MALLOC): New macro.
9953 (xmalloc,xcalloc,xstrdup): Declare.
9954 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9955 * inferiors.c: Ditto.
9956 * linux-low.c: Ditto.
9957 * mem-break.c: Ditto.
9958 * regcache.c: Ditto.
9959 * remote-utils.c: Ditto.
9960 * server.c: Ditto.
9961 * target.c: Ditto.
9962 * win32-low.c: Ditto.
9963
99642008-12-12 Doug Evans <dje@google.com>
9965
9966 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9967 in debugging printf.
9968
9969 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9970
99712008-12-09 Doug Evans <dje@google.com>
9972
9973 * linux-low.h (struct process_info): Delete member tid, unused.
9974 * thread-db.c (find_one_thread): Update.
9975 (maybe_attach_thread): Update.
9976
99772008-12-02 Pedro Alves <pedro@codesourcery.com>
9978
9979 * target.h (struct target_ops): Add qxfer_osdata member.
9980 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9981 and dirent.h.
9982 (linux_qxfer_osdata): New functions.
9983 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9984 callback.
9985 * server.c (handle_query): Handle "qXfer:osdata:read:".
9986 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9987 (buffer_xml_printf): New functions.
9988 * server.h (struct buffer): New.
9989 (buffer_grow_str, buffer_grow_str0): New macros.
9990 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9991 (buffer_xml_printf): Declare.
9992
99932008-11-24 Doug Evans <dje@google.com>
9994
9995 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9996
99972008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * server.c (handle_v_run): Always use the supplied argument list.
10000
100012008-11-19 Bob Wilson <bob.wilson@acm.org>
10002
10003 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10004 (xtensa_regmap_table): Add entry for scompare1.
10005
100062008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10007
10008 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10009 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10010 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10011 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10012 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10013 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10014 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10015 XML target descriptions.
10016 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10017 when inferior is running on an ISA 2.05 or later processor. Add
10018 special case to return offset for full 64-bit slot of FPSCR when
10019 in 32-bits.
10020
100212008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10022
10023 * Makefile.in (SFILES, clean): Added sparc64 files.
10024 (reg-sparc64.o, reg-sparc64.c): New.
10025 * configure.srv (sparc*-*-linux*): New configuration.
10026 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10027 syscall arguments for SPARC.
10028 (regsets_store_inferior_registers): Likewise.
10029 * linux-sparc-low.c: New file.
10030
100312008-10-21 Doug Evans <dje@google.com>
10032
10033 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10034 (READLINE_DIR,READLINE_DEP): Delete.
10035 (INTERNAL_CFLAGS): Update.
10036 (LINTFLAGS): Update.
10037
100382008-10-10 Pedro Alves <pedro@codesourcery.com>
10039
10040 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10041 whole argv from the last run, not just argv[0].
10042
100432008-09-08 Pedro Alves <pedro@codesourcery.com>
10044
10045 * regcache.c (new_register_cache): Return NULL if the register
10046 cache size isn't known yet.
10047 (free_register_cache): Avoid dereferencing a NULL regcache.
10048
100492008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10050
10051 * configure.srv: Merge MIPS and MIPS64.
10052
100532008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10054
10055 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10056
100572008-08-18 Luis Machado <luisgpm@br.ibm.com>
10058
10059 * Makefile.in: Add required vsx dependencies.
10060
10061 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10062 Declare init_registers_powerpc_vsx32l.
10063 Declare init_registers_powerpc_vsx64l.
10064 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10065 (ppc_arch_setup): Check for VSX in hwcap.
10066 (ppc_fill_vsxregset): New function.
10067 (ppc_store_vsxregset): New function.
10068 Add new VSX entry in regset_info target_regsets.
10069
10070 * configure.srv: Add new VSX dependencies.
10071
100722008-08-12 Pedro Alves <pedro@codesourcery.com>
10073
10074 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10075 (remote_open): Set or clear transport_is_reliable.
10076 (putpkt_binary): Don't expect acks in noack mode.
10077 (getpkt): Don't send ack/nac in noack mode.
10078 * server.c (handle_general_set): Handle QStartNoAckMode.
10079 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10080 qSupported.
10081 (main): Reset noack_mode on every connection.
10082 * server.h (noack_mode): Declare.
10083
100842008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10085
10086 * Makefile.in (GDBREPLAY_OBS): New variable.
10087 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10088
100892008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10090 Daniel Jacobowitz <dan@codesourcery.com>
10091
10092 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10093 (usr_store_inferior_registers): Likewise.
10094 (regsets_store_inferior_registers): Likewise.
10095
100962008-07-31 Rolf Jansen <rj@surtec.com>
10097 Pedro Alves <pedro@codesourcery.com>
10098
10099 * configure.ac: Check for memmem declaration.
10100 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10101 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10102 (disable_packet_qfThreadInfo): Unconditionally compile.
10103 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10104 * configure, config.in: Regenerate.
10105
101062008-07-28 Doug Kwan <dougkwan@google.com>
10107
10108 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10109 (linux_write_memory): Remove declaration of errno.
10110
101112008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10112
10113 * linux-low.c (handle_extended_wait): Do not use "status"
10114 variable uninitialized.
10115
101162008-07-07 Pedro Alves <pedro@codesourcery.com>
10117
10118 * server.c (handle_v_attach): Inhibit reporting dll changes.
10119
101202008-06-27 Pedro Alves <pedro@codesourcery.com>
10121
10122 * remote-utils.c (prepare_resume_reply): If requested, don't
10123 output "thread:TID" in the T stop reply.
10124
10125 * server.c (disable_packet_vCont, disable_packet_Tthread)
10126 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10127 (handle_query): If requested, disable support for qC, qfThreadInfo
10128 and qsThreadInfo.
10129 (handle_v_requests): If requested, disable support for vCont.
10130 (gdbserver_show_disableable): New.
10131 (main): Handle --disable-packet and --disable-packet=LIST.
10132
10133 * server.h (disable_packet_vCont, disable_packet_Tthread)
10134 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10135
101362008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10137
10138 * server.c (gdbserver_usage): Mention --version.
10139
101402008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * Makefile.in (gdbreplay.o): New rule.
10143
101442008-06-06 Joseph Myers <joseph@codesourcery.com>
10145
10146 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10147 message, not gdbserver.
10148
101492008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10150 Nathan Sidwell <nathan@codesourcery.com>
10151 Joseph Myers <joseph@codesourcery.com>
10152
10153 * acinclude.m4: Include ../../config/acx.m4.
10154 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10155 * configure, config.in: Regenerate.
10156 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10157 * server.c (gdbserver_version): Print PKGVERSION.
10158 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10159 (main): Adjust gdbserver_usage calls.
10160 * gdbreplay.c (version, host_name): Add declarations.
10161 (gdbreplay_version, gdbreplay_usage): New.
10162 (main): Accept --version and --help options.
10163
101642008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10165
10166 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10167 (arm_breakpoint_at): Handle Thumb.
10168 (the_low_target): Add comment.
10169
101702008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10171
10172 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10173
101742008-05-09 Doug Evans <dje@google.com>
10175
10176 * server.h (decode_search_memory_packet): Declare.
10177 * remote-utils.c (decode_search_memory_packet): New fn.
10178 * server.c (handle_search_memory_1): New fn.
10179 (handle_search_memory): New fn.
10180 (handle_query): Process qSearch:memory packets.
10181
101822008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10183
10184 * regcache.c (registers_length): Remove.
10185 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10186 full register packet.
10187 * regcache.h (registers_length): Remove prototype.
10188 * server.h (PBUFSIZ): Define to 16384.
10189
101902008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10191
10192 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10193 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10194 powerpc-64l.o, and powerpc-altivec64l.o.
10195 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10196 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10197 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10198 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10199 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10200 to srv_xmlfiles.
10201
10202 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10203 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10204 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10205 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10206 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10207 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10208 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10209 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10210 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10211 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10212 (clean): Update.
10213
10214 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10215 (init_registers_powerpc_32l): ... this new prototype.
10216 (init_registers_powerpc_32): Remove, replace by ...
10217 (init_registers_powerpc_altivec32l): ... this new prototype.
10218 (init_registers_powerpc_e500): Remove, replace by ...
10219 (init_registers_powerpc_e500l): ... this new prototype.
10220 (init_registers_ppc64): Remove, replace by ...
10221 (init_registers_powerpc_64l): ... this new prototype.
10222 (init_registers_powerpc_64): Remove, replace by ...
10223 (init_registers_powerpc_altivec64l): ... this new prototype.
10224 (ppc_num_regs): Set to 73.
10225 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10226 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10227 (ppc_cannot_store_register): Handle orig_r3 and trap.
10228 (ppc_arch_setup): Update init_registers_... calls.
10229 (ppc_fill_gregset): Handle orig_r3 and trap.
10230
10231 * inferiors.c (clear_inferiors): Reset current_inferior.
10232
102332008-04-23 Paolo Bonzini <bonzini@gnu.org>
10234
10235 * acinclude.m4: Add override.m4.
10236 * configure: Regenerate.
10237
102382008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10239
10240 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10241 initial call to init_register_ppc64.
10242
102432008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10244
10245 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10246 single powerpc*-*-linux* case.
10247 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10248
102492008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10250
10251 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10252 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10253 from reg_xmlfiles.
10254 * linux-ppc-low.c: Include <elf.h>.
10255 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10256 (ppc_hwcap): New global variable.
10257 (ppc_regmap): Remove __SPE__ #ifdef sections.
10258 (ppc_regmap_e500): New global variable.
10259 (ppc_cannot_store_register): Update __SPE__ special case.
10260 (ppc_get_hwcap): New function.
10261 (ppc_arch_setup): Use it to determine whether inferior supports
10262 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10263 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10264 Do not access registers if target does not support AltiVec.
10265 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10266 Do not access registers if target does not support SPE.
10267 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10268
102692008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10270
10271 * linux-low.c (disabled_regsets, num_regsets): New.
10272 (use_regsets_p): Delete.
10273 (linux_wait_for_process): Clear disabled_regsets.
10274 (regsets_fetch_inferior_registers): Check and set it.
10275 (regsets_store_inferior_registers): Likewise.
10276 (linux_fetch_registers, linux_store_registers): Do not use
10277 use_regsets_p.
10278 (initialize_low): Allocate disabled_regsets.
10279
102802008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10281
10282 * Makefile.in (LIBOBJS): New.
10283 (OBS): Use LIBOBJS.
10284 (memmem.o): New rule.
10285 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10286 * configure: Regenerated.
10287
102882008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10289
10290 * server.c (handle_query): Never return "unsupported" for
10291 qXfer:features:read queries.
10292
102932008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10294
10295 * server.c (get_features_xml): Fix inverted condition.
10296 (handle_query): Always support qXfer:feature:read.
10297
102982008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * server.c (wrapper_argv): New.
10301 (start_inferior): Handle wrapper_argv. If set, expect an extra
10302 trap.
10303 (gdbserver_usage): Document --wrapper.
10304 (main): Parse --wrapper.
10305
103062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10307
10308 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10309 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10310 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10311 (ppc_set_pc): Likewise.
10312 (ppc_arch_setup): New function.
10313 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10314 of collect_register.
10315 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10316
103172008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10318
10319 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10320 instead of linux-ppc64-low.o.
10321 * linux-ppc64-low.c: Remove file.
10322 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10323 (linux-ppc64-low.o): Remove rule.
10324
10325 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10326 (init_registers_powerpc_64): Likewise.
10327 (ppc_regmap): Conditionally define depending on __powerpc64__.
10328 (ppc_cannot_store_register): Do not special-case "fpscr" when
10329 compiled on __powerpc64__.
10330 (ppc_collect_ptrace_register): New function.
10331 (ppc_supply_ptrace_register): New function.
10332 (ppc_breakpoint): Change type to "unsigned int".
10333 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10334 (the_low_target): Conditionally provide initializers for the
10335 arch_setup member depending on __powerpc64__. Install
10336 collect_ptrace_register and supply_ptrace_register members.
10337
103382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10339
10340 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10341 * server.c (gdbserver_xmltarget): Define.
10342 (get_features_xml): Use it to replace "target.xml" and arch_string.
10343
10344 * configure.srv: Remove srv_xmltarget. Add XML files that were
10345 mentioned there to srv_xmlfiles instead. Remove conditional tests
10346 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10347 srv_xmlfiles and srv_regobj to include all possible choices.
10348 * configure.ac (srv_xmltarget): Remove.
10349 (srv_xmlfiles): Do not add "target.xml".
10350 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10351 checks for supplementary target information.
10352 * configure: Regenerate.
10353 * Makefile.in (XML_TARGET): Remove.
10354 (target.xml): Remove rule.
10355 (clean): Do not clean up target.xml.
10356 (.PRECIOUS): Do not mention target.xml.
10357
10358 * target.h (struct target_ops): Remove arch_string member.
10359 * linux-low.c (linux_arch_string): Remove.
10360 (linux_target_ops): Remove arch_string initializer.
10361 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10362 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10363 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10364 * spu-low.c (spu_arch_string): Remove.
10365 (spu_target_ops): Remove arch_string initializer.
10366 * win32-low.c (win32_arch_string): Remove.
10367 (win32_target_ops): Remove arch_string initializer.
10368 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10369 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10370 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10371
103722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10373
10374 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10375 by collect_ptrace_register and supply_ptrace_register hooks.
10376 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10377 instead of checking for the_low_target.left_pad_xfer.
10378 (usr_store_inferior_registers): Use collect_ptrace_register callback
10379 instead of checking for the_low_target.left_pad_xfer.
10380
10381 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10382 (s390_supply_ptrace_register): Likewise.
10383 (s390_fill_gregset): Call s390_collect_ptrace_register.
10384 (the_low_target): Update.
10385
10386 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10387 (ppc_supply_ptrace_register): Likewise.
10388 (the_low_target): Update.
10389
10390 * linux-i386-low.c (the_low_target): Update.
10391 * linux-x86-64-low.c (the_low_target): Update.
10392
103932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10394
10395 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10396 reg-s390.o and reg-s390x.o.
10397
10398 * linux-low.c (new_inferior): New global variable.
10399 (linux_create_inferior, linux_attach): Set it.
10400 (linux_wait_for_process): Call the_low_target.arch_setup after the
10401 target has stopped for the first time.
10402 (initialize_low): Do not call the_low_target.arch_setup.
10403
10404 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10405 (s390_set_pc): Likewise.
10406 (s390_arch_setup): New function.
10407 (the_low_target): Use s390_arch_setup as arch_setup routine.
10408
10409 * regcache.c (realloc_register_cache): New function.
10410 (set_register_cache): Call it for each existing regcache.
10411
104122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10413
10414 * server.h (init_registers): Remove prototype.
10415
10416 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10417 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10418 instead of init_registers ().
10419 * linux-arm-low.c (init_registers_arm): Add prototype.
10420 (init_registers_arm_with_iwmmxt): Likewise.
10421 (the_low_target): Add initializer for arch_setup field.
10422 * linux-cris-low.c (init_registers_cris): Add prototype.
10423 (the_low_target): Add initializer for arch_setup field.
10424 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10425 (the_low_target): Add initializer for arch_setup field.
10426 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10427 (the_low_target): Add initializer for arch_setup field.
10428 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10429 (the_low_target): Add initializer for arch_setup field.
10430 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10431 (the_low_target): Add initializer for arch_setup field.
10432 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10433 (the_low_target): Add initializer for arch_setup field.
10434 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10435 (init_registers_mips64_linux): Likewise.
10436 (the_low_target): Add initializer for arch_setup field.
10437 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10438 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10439 (the_low_target): Add initializer for arch_setup field.
10440 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10441 (init_registers_powerpc_64): Likewise.
10442 (the_low_target): Add initializer for arch_setup field.
10443 * linux-s390-low.c (init_registers_s390): Add prototype.
10444 (init_registers_s390x): Likewise.
10445 (the_low_target): Add initializer for arch_setup field.
10446 * linux-sh-low.c (init_registers_sh): Add prototype.
10447 (the_low_target): Add initializer for arch_setup field.
10448 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10449 (the_low_target): Add initializer for arch_setup field.
10450 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10451 (the_low_target): Add initializer for arch_setup field.
10452
10453 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10454 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10455 instead of init_registers ().
10456 * win32-arm-low.c (init_registers_arm): Add prototype.
10457 (the_low_target): Add initializer for arch_setup field.
10458 * win32-i386-low.c (init_registers_i386): Add prototype.
10459 (the_low_target): Add initializer for arch_setup field.
10460
10461 * spu-low.c (init_registers_spu): Add prototype.
10462 (initialize_low): Call initialie_registers_spu () instead of
10463 initialize_registers ().
10464
104652008-02-19 Pedro Alves <pedro@codesourcery.com>
10466
10467 * server.c (handle_v_requests): When handling the vRun and vAttach
10468 packets, if already debugging a process, don't kill it. Return an
10469 error instead.
10470
104712008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10472
10473 * server.c (handle_query): Correct length check.
10474
104752008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10476
10477 * win32-low.c (do_initial_child_stuff): Add process handle
10478 parameter. Set current_process_handle and current_process_id from the
10479 parameters. Clear globals.
10480 (win32_create_inferior): Don't set current_process_handle and
10481 current_process_id here. Instead pass them on the call to
10482 do_initial_child_stuff.
10483 (win32_attach): Likewise.
10484 (win32_clear_inferiors): New.
10485 (win32_kill): Don't close the current process handle or the
10486 current thread handle here. Instead call win32_clear_inferiors.
10487 (win32_detach): Don't open a new handle to the process. Call
10488 win32_clear_inferiors.
10489 (win32_join): Don't rely on current_process_handle; open a new
10490 handle using the process id.
10491 (win32_wait): Call win32_clear_inferiors when the inferior process
10492 has exited.
10493
104942008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10495
10496 * server.c (monitor_show_help): Add "exit".
10497
104982008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10499
10500 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10501 (clean): Add reg-xtensa.c.
10502 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10503 * configure.srv (xtensa*-*-linux*) New target.
10504 * linux-xtensa-low.c: New.
10505 * xtensa-xtregs.c: New.
10506
105072008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10508
10509 * hostio.c: Don't include errno.h.
10510 (errno_to_fileio_errno): Move to hostio-errno.
10511 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10512 error number outputting to the target->hostio_last_error callback.
10513 (hostio_packet_error): Use FILEIO_EINVAL directly.
10514 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10515 calls to hostio_error.
10516 * hostio-errno.c: New.
10517 * server.h (hostio_last_error_from_errno): Declare.
10518 * target.h (target_ops): Add hostio_last_error member.
10519 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10520 as hostio_last_error handler.
10521 * spu-low.c (spu_target_ops): Likewise.
10522 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10523 (wince_hostio_last_error): New functions.
10524 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10525 as hostio_last_error handler.
10526 (win32_target_ops) [!_WIN32_WCE]: Register
10527 hostio_last_error_from_errno as hostio_last_error handler.
10528 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10529 (hostio-errno.o): New rule.
10530 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10531 * configure.srv (srv_hostio_err_objs): New variable. Default to
10532 hostio-errno.o.
10533 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10534 * configure: Regenerate.
10535
105362008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10537
10538 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10539 (linux_kill, linux_detach): Clean up the process list.
10540 * remote-utils.c (remote_open): Improve port number parsing.
10541 (putpkt_binary, input_interrupt): Only send interrupts if the target
10542 is running.
10543 * server.c (extended_protocol): Make static.
10544 (attached): Define earlier.
10545 (exit_requested, response_needed, program_argv): New variables.
10546 (target_running): New.
10547 (start_inferior): Clear attached here.
10548 (attach_inferior): Set attached here.
10549 (require_running): Define.
10550 (handle_query): Use require_running and target_running. Implement
10551 "monitor exit".
10552 (handle_v_attach, handle_v_run): New.
10553 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10554 (gdbserver_usage): Update.
10555 (main): Redo argument parsing. Handle --debug and --multi. Handle
10556 --attach along with other options or after the port. Save
10557 program_argv. Support no initial program. Resynchronize
10558 communication with GDB after an error. Handle "monitor exit".
10559 Use require_running and target_running. Always allow the extended
10560 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10561 restart in extended mode.
10562 * README: Refer to the GDB manual. Update --attach usage.
10563
105642007-12-20 Andreas Schwab <schwab@suse.de>
10565
10566 * linux-low.c (STACK_SIZE): Define.
10567 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10568 (linux_test_for_tracefork): Likewise.
10569
105702007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10571
10572 * linux-low.c (linux_wait_for_event): Update messages. Do not
10573 reinsert auto-delete breakpoints.
10574 * mem-break.c (struct breakpoint): Change return type of handler to
10575 int.
10576 (set_breakpoint_at): Update handler type.
10577 (reinsert_breakpoint_handler): Return 1 instead of calling
10578 delete_breakpoint.
10579 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10580 setting a new one.
10581 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10582 * mem-break.h (set_breakpoint_at): Update handler type.
10583 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10584 * win32-low.c (auto_delete_breakpoint): New.
10585 (get_child_debug_event): Use it.
10586
105872007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10588
10589 * configure.ac: Check for pread and pwrite.
10590 * hostio.c (handle_pread): Fall back to lseek and read.
10591 (handle_pwrite): Fall back to lseek and write.
10592 * config.in, configure: Regenerated.
10593
105942007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10595
10596 * server.c (myresume): Add own_buf argument.
10597 (main): Update calls.
10598
105992007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10602 * remote-utils.c (remote_open): Do not call disable_async_io.
10603 (block_async_io): Delete.
10604 (unblock_async_io): Make static.
10605 (initialize_async_io): New.
10606 * server.c (handle_v_cont): Handle async I/O here.
10607 (myresume): Likewise. Move other common resume tasks here...
10608 (main): ... from here. Call initialize_async_io. Disable async
10609 I/O before the main loop.
10610 * server.h (initialize_async_io): Declare.
10611 (block_async_io, unblock_async_io): Delete prototypes.
10612 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10613
106142007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10615
10616 * remote-utils.c (readchar): Allow binary data in received messages.
10617
106182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10619
10620 * win32-low.c (attaching): New global.
10621 (win32_create_inferior): Clear the `attaching' global.
10622 (win32_attach): Set the `attaching' global.
10623 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10624 attaching. Only set a breakpoint at the entry point if not
10625 attaching.
10626
106272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10628
10629 * server.c (main): Don't report dll events on the initial
10630 connection on attaches.
10631
106322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10633
10634 * server.c (main): Relax numerical bases supported for the pid of
10635 the --attach command line argument.
10636
106372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10638
10639 * win32-low.c (win32_attach): Call OpenProcess before
10640 DebugActiveProcess, not after. Add last error output to error
10641 call.
10642
106432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10644
10645 * win32-low.c (win32_get_thread_context)
10646 (win32_set_thread_context): New functions.
10647 (thread_rec): Use win32_get_thread_context.
10648 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10649 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10650 field.
10651
106522007-12-03 Leo Zayas
10653 Pedro Alves <pedro_alves@portugalmail.pt>
10654
10655 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10656 global variables.
10657 (child_add_thread): Minor cleanup.
10658 (child_continue): Resume artificially suspended threads before
10659 calling ContinueDebugEvent.
10660 (suspend_one_thread): New.
10661 (fake_breakpoint_event): New.
10662 (get_child_debug_event): Change return type to int. Check here if
10663 gdb sent an interrupt request. If a soft interrupt was requested,
10664 fake a breakpoint event. Return 0 if there is no event to handle,
10665 and 1 otherwise.
10666 (win32_wait): Don't check here if gdb sent an interrupt request.
10667 Ensure there is a valid event to handle.
10668 (win32_request_interrupt): Add soft interruption method as last
10669 resort.
10670
106712007-12-03 Leo Zayas
10672 Pedro Alves <pedro_alves@portugalmail.pt>
10673
10674 * win32-low.h (win32_thread_info): Add descriptions to the
10675 structure members. Replace `suspend_count' counter by a
10676 `suspended' flag.
10677 * win32-low.c (thread_rec): Update condition of when to get the
10678 context from the inferior. Rely on ContextFlags being set if it
10679 has already been retrieved. Only suspend the inferior thread if
10680 we haven't already. Warn if that fails.
10681 (continue_one_thread): s/suspend_count/suspended/. Only call
10682 ResumeThread once. Warn if that fails.
10683
106842007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10685
10686 * win32-low.c (win32_wait): Don't read from the inferior when it
10687 has already exited.
10688
106892007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10690
10691 * Makefile.in (win32_low_h): New variable.
10692 (win32-low.o): Add dependency on $(win32_low_h).
10693 (win32-arm-low.o, win32-i386-low.o): New rules.
10694
106952007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * hostio.c: Correct copyright year.
10698
106992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * Makefile.in (OBS): Add hostio.o.
10702 (hostio.o): New rule.
10703 * server.h (handle_vFile): Declare.
10704 * hostio.c: New file.
10705 * server.c (handle_v_requests): Take packet_len and new_packet_len
10706 for binary packets. Call handle_vFile.
10707 (main): Update call to handle_v_requests.
10708
107092007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10710
10711 * linux-low.c: Include <sched.h>.
10712
107132007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10714
10715 * linux-low.c (linux_tracefork_grandchild): New.
10716 (linux_tracefork_child): Use clone.
10717 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10718
107192007-10-31 Joel Brobecker <brobecker@adacore.com>
10720
10721 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10722
107232007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10724
10725 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10726
107272007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10728
10729 * inferiors.c (change_inferior_id): Delete.
10730 (add_pid_to_list, pull_pid_from_list): New.
10731 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10732 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10733 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10734 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10735 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10736 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10737 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10738 (using_threads): Always set to 1.
10739 (handle_extended_wait): New.
10740 (add_process): Do not set TID.
10741 (linux_create_inferior): Set must_set_ptrace_flags.
10742 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10743 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10744 (linux_thread_alive): Rename TID argument to LWPID.
10745 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10746 (linux_wait_for_event): Do not use TID or check using_threads. Update
10747 call to dead_thread_notify. Call handle_extended_wait.
10748 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10749 (send_sigstop): Delete sigstop_sent.
10750 (wait_for_sigstop): Avoid TID.
10751 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10752 (linux_test_for_tracefork): New.
10753 (linux_lookup_signals): Use thread_db_active and
10754 linux_supports_tracefork_flag.
10755 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10756 * linux-low.h (get_process_thread): Avoid TID.
10757 (struct process_ifo): Move thread_known and tid to the end. Remove
10758 sigstop_sent.
10759 (linux_attach_lwp, thread_db_init): Update prototypes.
10760 * server.h (change_inferior_id): Delete prototype.
10761 (add_pid_to_list, pull_pid_from_list): New prototypes.
10762 * thread-db.c (thread_db_use_events): New.
10763 (find_first_thread): Rename to...
10764 (find_one_thread): ...this. Update callers and messages. Do not
10765 call fatal. Check thread_db_use_events. Do not call
10766 change_inferior_id or new_thread_notify.
10767 (maybe_attach_thread): Update. Do not call new_thread_notify.
10768 (thread_db_init): Set thread_db_use_events. Check use_events.
10769 * utils.c (fatal, warning): Correct message prefix.
10770
107712007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10772
10773 * Makefile.in (clean): Remove new files.
10774 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10775 (powerpc-64.o, powerpc-64.c): New rules.
10776 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10777 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10778 with SPE.
10779 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10780 SPE targets.
10781 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10782 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10783 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10784 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10785 (target_regsets): Add AltiVec and SPE register sets.
10786 * configure.ac: Check for AltiVec and SPE.
10787 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10788 (ppc_fill_vrregset, ppc_store_vrregset): New.
10789 (target_regsets): Add AltiVec register set.
10790 * configure: Regenerated.
10791
107922007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10793
10794 * linux-low.c (O_LARGEFILE): Define.
10795 (linux_read_memory): Use /proc/PID/mem.
10796 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10797 * configure, config.in: Regenerated.
10798
107992007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10800
10801 * linux-low.c (linux_wait_for_event): Do not pass signals while
10802 single-stepping.
10803
108042007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10805
10806 * win32-low.c (create_process): New.
10807 (win32_create_inferior): Use create_process instead of
10808 CreateProcess. If create_process failed retry appending an ".exe"
10809 suffix. Store the GetLastError result immediatelly after
10810 create_process calls and use it on the call to error.
10811
108122007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10813
10814 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10815
108162007-08-23 Joel Brobecker <brobecker@adacore.com>
10817
10818 * configure.ac: Switch license to GPLv3.
10819
108202007-08-01 Michael Snyder <msnyder@access-company.com>
10821
10822 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10823
108242007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10825
10826 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10827 typedef.
10828 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10829 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10830 CloseToolhelp32Snapshot.
10831 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10832 CloseToolhelp32Snapshot.
10833
108342007-07-27 Michael Snyder <michael.snyder@access-company.com>
10835
10836 * server.c (main): Check for inferior exit before main loop.
10837
108382007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10839
10840 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10841 instead of on tmp_desc.
10842
108432007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10844 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10847 (add_thread): Minor cleanups.
10848 (clear_inferiors): Move lower in the file. Clear the DLL
10849 list.
10850 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10851 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10852 (xml_escape_text): New.
10853 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10854 for qSupported.
10855 (handle_v_cont): Report errors.
10856 (gdbserver_version): Update.
10857 (main): Correct size of own_buf. Do not report initial DLL events.
10858 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10859 (unloaded_dll, xml_escape_text): New.
10860 * win32-low.c (enum target_waitkind): Update comments.
10861 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10862 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10863 (win32_EnumProcessModules, win32_GetModuleInformation)
10864 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10865 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10866 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10867 (win32_Module32First, win32_Module32Next, load_toolhelp)
10868 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10869 (get_child_debug_event): Handle DLL events.
10870 (win32_wait): Likewise.
10871
108722007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10873
10874 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10875 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10876
108772007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10878
10879 * win32-low.c (handle_output_debug_string): Ignore event if not
10880 waiting.
10881
108822007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10883
10884 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10885
108862007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10887
10888 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10889
108902007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * inferiors.c (change_inferior_id): Add comment.
10893 * linux-low.c (check_removed_breakpoint): Add an early
10894 prototype. Improve debug output.
10895 (linux_attach): Doc update.
10896 (linux_detach_one_process, linux_detach): Clean up before releasing
10897 each process.
10898 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10899 * linux-low.h (struct process_info): Doc improvement.
10900 * mem-break.c (delete_all_breakpoints): New.
10901 * mem-break.h (delete_all_breakpoints): New prototype.
10902 * thread-db.c (find_first_thread): New.
10903 (thread_db_create_event): Call it instead of
10904 thread_db_find_new_threads. Clean up unused variables.
10905 (maybe_attach_thread): Remove first thread handling.
10906 (thread_db_find_new_threads): Use find_first_thread.
10907 (thread_db_get_tls_address): Likewise.
10908
109092007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * thread-db.c (thread_db_find_new_threads): Add prototype.
10912 (thread_db_create_event): Check for the main thread before adding
10913 a new thread.
10914 (maybe_attach_thread): Only enable event reporting if TID == 0.
10915 (thread_db_get_tls_address): Check for new threads.
10916
109172007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10918
10919 * linux-low.c (linux_create_inferior): Try execv before execvp.
10920 * spu-low.c (spu_create_inferior): Likewise.
10921
109222007-06-13 Mike Frysinger <vapier@gentoo.org>
10923
10924 * linux-low.c (linux_create_inferior): Change execv to execvp.
10925 * spu-low.c (spu_create_inferior): Likewies.
10926
109272007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10928
10929 * Makefile.in (clean): Clean new files instead of deleted ones.
10930 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10931 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10932 rules.
10933 * configure.srv: Specify XML files and new regformats for MIPS and
10934 MIPS64 GNU/Linux.
10935 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10936 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10937 an entry for the restart register.
10938 (mips_cannot_fetch_register, mips_cannot_store_register)
10939 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10940 register names to match the XML descriptions.
10941 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10942 restart register instead of $0.
10943
109442007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10945 Markus Deuling <deuling@de.ibm.com>
10946
10947 * remote-utils.c (decode_xfer_write): New function.
10948 * server.h (decode_xfer_write): Add prototype.
10949 * server.c (handle_query): Add PACKET_LEN argument. Support
10950 qXfer:spu:read and qXfer:spu:write packets.
10951 (main): Pass packet_len to handle_query.
10952 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10953 * target.h (target_ops): Add qxfer_spu.
10954
109552007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10956
10957 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10958 accessing non-seekable spufs files.
10959
109602007-05-16 Markus Deuling <deuling@de.ibm.com>
10961
10962 * server.c (handle_query): Add reply for qC packet.
10963
109642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10965 Leo Zayas <lerele@champenstudios@com>
10966
10967 * server.h (check_remote_input_interrupt_request): New function.
10968 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10969 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10970 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10971 (check_remote_input_interrupt_request): New function.
10972 * server.h (check_remote_input_interrupt_request): Declare.
10973 * win32-low.c (winapi_DebugBreakProcess,
10974 winapi_GenerateConsoleCtrlEvent): New typedefs.
10975 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10976 to 250 ms.
10977 (win32_wait): Check for remote interrupt request
10978 with check_remote_input_interrupt_request.
10979 (win32_request_interrupt): New function.
10980 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10981
109822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10983
10984 * win32-low.c (debug_registers_changed,
10985 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10986 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10987 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10988 (thread_rec): Get context using the low target.
10989 (child_add_thread): Call thread_added on the low target,
10990 which does the same thing.
10991 (regptr): Delete.
10992 (do_initial_child_stuff): Remove debug registers references.
10993 Set context using the low target. Resume threads after
10994 setting the contexts.
10995 (child_continue): Remove dead variable. Remove debug
10996 registers references.
10997 (child_fetch_inferior_registers): Go through the low target.
10998 (do_child_store_inferior_registers): Remove.
10999 (child_store_inferior_registers): Go through the low target.
11000 (win32_resume): Remove debug registers references.
11001 Set context using the low target.
11002 (handle_exception): Change return type to void. Don't record
11003 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11004 first chance exception.
11005 (get_child_debug_event): Change return type to void. Remove
11006 goto loop. Always return after waiting for debug event.
11007 (win32_wait): Convert to switch statement. Handle spurious
11008 events.
11009
11010 * win32-i386-low.c (debug_registers_changed,
11011 debug_registers_used): New.
11012 (initial_stuff): Rename to ...
11013 (i386_initial_stuff): ... this. Clear debug registers
11014 state variables.
11015 (store_debug_registers): Delete.
11016 (i386_get_thread_context): New.
11017 (load_debug_registers): Delete.
11018 (i386_set_thread_context): New.
11019 (i386_thread_added): New.
11020 (single_step): Rename to ...
11021 (i386_single_step): ... this.
11022 (do_fetch_inferior_registers): Rename to ...
11023 (i386_fetch_inferior_register): ... this.
11024 (i386_store_inferior_register): New.
11025 (the_low_target): Adapt to new interface.
11026
11027 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11028 (arm_get_thread_context): New.
11029 (arm_set_thread_context): New.
11030 (regptr): New.
11031 (do_fetch_inferior_registers): Rename to ...
11032 (arm_fetch_inferior_register): ... this.
11033 (arm_store_inferior_register): New.
11034 (arm_wince_breakpoint): Reimplement as unsigned long.
11035 (arm_wince_breakpoint_len): Define.
11036 (the_low_target): Adapt to new interface.
11037
11038 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11039 load_debug_registers. Add get_thread_context, set_thread_context,
11040 thread_added and store_inferior_register. Rename
11041 fetch_inferior_registers to fetch_inferior_register.
11042 (regptr): Remove declaration.
11043
110442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11045
11046 * linux-low.c (linux_detach): Change return type to int. Return 0.
11047 * spu-low.c (spu_detach): Likewise.
11048
110492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11050
11051 * target.h (target_ops): Change return type of detach to int.
11052 Add join.
11053 (join_inferior): New.
11054 * server.c (main): Don't skip detach support on mingw32.
11055 If the inferior doesn't support detaching return error.
11056 Call join_inferior instead of using waitpid.
11057 * linux-low.c (linux_join): New.
11058 (linux_target_op): Add linux_join.
11059 * spu-low.c (spu_join): New.
11060 (spu_target_ops): Add spu_join.
11061 * win32-low.c (win32_detach): Adapt to new interface.
11062 Reopen current_process_handle before detaching. Issue a child
11063 resume before detaching.
11064 (win32_join): New.
11065 (win32_target_op): Add win32_join.
11066
110672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11068
11069 * win32-low.c (win32-attach): Fix return value.
11070 * target.h (target_ops): Describe ATTACH return values.
11071
110722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11073
11074 * win32-low.c (GETPROCADDRESS): Define.
11075 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11076 (winapi_DebugSetProcessKillOnExit): Likewise.
11077 (win32_create_inferior): Force usage of ansi CreateProcessA.
11078 (win32_attach): Use GETPROCADDRESS.
11079 (win32_detach): Likewise.
11080
110812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11082
11083 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11084
110852007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11086
11087 * win32-low.c: Commit leftover changes from 2007-03-29.
11088
110892007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11090
11091 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11092 fields short instead of int. Add explicit padding.
11093 (i387_cache_to_fsave): Remove unnecessary casts.
11094 (i387_fsave_to_cache): Doc fix.
11095 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11096
110972007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11098
11099 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11100 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11101
111022007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11103
11104 * configure.srv (arm*-*-mingw32ce*): Move near the other
11105 arm targets.
11106
111072007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11108
11109 * configure.ac: Add errno checking.
11110 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11111 sys/file.h and malloc.h.
11112 (AC_CHECK_DECLS): Add perror.
11113 (srv_mingwce): Handle.
11114 * configure.srv (i[34567]86-*-cygwin*): Add
11115 win32-i386-low.o to srv_tgtobj.
11116 (i[34567]86-*-mingw*): Likewise.
11117 (arm*-*-mingw32ce*): Add case.
11118 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11119 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11120 [__MINGW32CE__] (strerror): New function.
11121 [__MINGW32CE__] (errno): Define to GetLastError.
11122 [__MINGW32CE__] (COUNTOF): New macro.
11123 (remote_open): Remove extra close call.
11124 * mem-break.c (delete_breakpoint_at): New function.
11125 * mem-break.h (delete_breakpoint_at): Declare.
11126 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11127 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11128 [USE_WIN32API] (read, write): Add char* casts.
11129 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11130 * server.h: Include wincecompat.h on Windows CE.
11131 [HAVE_ERRNO_H]: Check.
11132 (perror): Declare if not declared.
11133 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11134 (perror_with_name): Remove errno declaration.
11135 * wincecompat.h: New.
11136 * wincecompat.c: New.
11137 * win32-low.h: New.
11138 * win32-arm-low.c: New.
11139 * win32-i386-low.c: New.
11140 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11141 (OUTMSG2): Make it safe.
11142 (_T): New macro.
11143 (COUNTOF): New macro.
11144 (NUM_REGS): Get it from the low target.
11145 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11146 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11147 (thread_rec): Let low target handle debug registers.
11148 (child_add_thread): Likewise.
11149 (child_init_thread_list): Likewise.
11150 (continue_one_thread): Likewise.
11151 (regptr): New.
11152 (do_child_fetch_inferior_registers): Move to ...
11153 * win32-i386-low.c: ... here, and rename to ...
11154 (do_fetch_inferior_registers): ... this.
11155 * win32-low.c (child_fetch_inferior_registers):
11156 Go through the low target.
11157 (do_child_store_inferior_registers): Use regptr.
11158 (strwinerror): New function.
11159 (win32_create_inferior): Handle Windows CE.
11160 Use strwinerror instead of strerror on Windows error
11161 codes. Add program to the error output.
11162 Don't close the main thread handle on Windows CE.
11163 (win32_attach): Use coredll.dll on Windows CE.
11164 (win32_kill): Close current process and current
11165 thread handles.
11166 (win32_detach): Use coredll.dll on Windows CE.
11167 (win32_resume): Let low target handle debug registers, and
11168 step request.
11169 (handle_exception): Add/Remove initial breakpoint. Avoid
11170 non-existant WSTOPSIG on Windows CE.
11171 (win32_read_inferior_memory): Cast to remove warning.
11172 (win32_arch_string): Go through the low target.
11173 (initialize_low): Call set_breakpoint_data with the low
11174 target's breakpoint.
11175 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11176 FOP_REGNUM, mappings): Move to ...
11177 * win32-i386-low.c: ... here.
11178 * win32-low.c (win32_thread_info): Move to ...
11179 * win32-low.h: ... here.
11180 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11181 win32-arm-low.c and wincecompat.c.
11182 (all:): Add $EXEEXT.
11183 (install-only:): Likewise.
11184 (gdbserver:): Likewise.
11185 (gdbreplay:): Likewise.
11186 * config.in: Regenerate.
11187 * configure: Regenerate.
11188
111892007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11190
11191 * win32-low.c: Rename typedef thread_info to
11192 win32_thread_info throughout.
11193
111942007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11195
11196 * win32-i386-low.c: Rename to ...
11197 * win32-low.c: ... this.
11198 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11199 * Makefile.in: Likewise.
11200
112012007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11202
11203 * remote-utils.c (monitor_output): Constify msg parameter.
11204 * server.h (monitor_output): Likewise.
11205 * win32-i386-low.c (handle_output_debug_string): New.
11206 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11207 handle_output_debug_string.
11208 (get_child_debug_event): Likewise.
11209
112102007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11211
11212 * server.c (main): Correct strtoul check.
11213
112142007-03-27 Jon Ringle <jon@ringle.org>
11215
11216 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11217
112182007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11219
11220 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11221
112222007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11223
11224 * terminal.h: Check HAVE_SGTTY_H.
11225
112262007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11227
11228 * remote-utils.c (remote_open): Print out the assigned port number.
11229
112302007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11231
11232 * remote-utils.c (monitor_output): New function.
11233 * server.c (debug_threads): Define here.
11234 (monitor_show_help): New function.
11235 (handle_query): Handle qRcmd.
11236 (main): Do not handle 'd' packet.
11237 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11238 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11239 of debug_threads.
11240
112412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11242
11243 * Makefile.in (EXEEXT): New.
11244 (clean): Use $(EXEEXT).
11245
112462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11247
11248 * target.h (target_ops): Rename send_signal to request_interrupt,
11249 and remove enum target_signal parameter.
11250 * linux-low.c (linux_request_interrupt): Rename from
11251 linux_send_signal, and always send SIGINT.
11252 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11253 and always send SIGINT.
11254 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11255 of send_signal.
11256 (input_interrupt): Likewise.
11257
112582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11259
11260 * server.c (get_features_xml): Check if target implemented
11261 arch_string.
11262 * win32-i386-low.c (win32_arch_string): New.
11263 (win32_target_ops): Add win32_arch_string as arch_string member.
11264
112652007-02-22 Markus Deuling <deuling@de.ibm.com>
11266
11267 * spu-low.c (spu_arch_string): New.
11268 (spu_target_ops): Add spu_arch_string.
11269
112702007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11271
11272 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11273 * configure.ac: Do not check for terminal.h.
11274 * configure, config.in: Regenerated.
11275
112762007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11277
11278 * Makefile.in (OBS): Add $(XML_BUILTIN).
11279 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11280 (clean): Update.
11281 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11282 (arm-with-iwmmxt.c): New.
11283 * config.in, configure: Regenerate.
11284 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11285 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11286 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11287 (arm*-*-linux*): Add iWMMXt and regset support.
11288 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11289 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11290 (arm_store_wmmxregset, target_regsets): New.
11291 * server.c (get_features_xml): Take annex argument. Check builtin
11292 XML documents.
11293 (handle_query): Handle multiple annexes.
11294
112952007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11296
11297 * remote-utils.c [USE_WIN32API] (read, write): Define.
11298 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11299 write.
11300
113012007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11302
11303 * linux-i386-low.c (the_low_target): Set arch_string.
11304 * linux-x86-64-low.c (the_low_target): Likewise.
11305 * linux-low.c (linux_arch_string): New.
11306 (linux_target_ops): Add it.
11307 * linux-low.h (struct linux_target_ops): Add arch_string.
11308 * server.c (write_qxfer_response): Use const void * for DATA.
11309 (get_features_xml): New.
11310 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11311 * target.h (struct target_ops): Add arch_string method.
11312
113132007-01-03 Denis Pilat <denis.pilat@st.com>
11314 Daniel Jacobowitz <dan@codesourcery.com>
11315
11316 * linux-low.c (linux_kill): Handle being called with no threads.
11317 * win32-i386-low.c (win32_kill): Likewise.
11318 (get_child_debug_event): Clear current_process_handle.
11319
113202006-12-30 Denis PILAT <denis.pilat@st.com>
11321 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * remote-utils.c (remote_open): Check the type of specified
11324 serial port devices before opening them.
11325 * server.c (main): Kill the inferior if an error occurs during
11326 the first remote_open.
11327
113282006-12-05 Markus Deuling <deuling@de.ibm.com>
11329
11330 * README: Update supported targets.
11331
113322006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11333
11334 * Makefile.in (clean): Remove reg-mips64.c.
11335 (reg-mips64.c, reg-mips64.o): New rules.
11336 * configure.srv: Handle mips64. Include regset support for mips.
11337 * linux-mips-low.c (union mips_register): New.
11338 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11339 (mips_breakpoint, mips_breakpoint_at): Use int.
11340 (mips_collect_register, mips_supply_register)
11341 (mips_collect_register_32bit, mips_supply_register_32bit)
11342 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11343 (mips_store_fpregset, target_regsets): New.
11344 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11345
113462006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11347
11348 * configure.srv: Add target "spu*-*-*".
11349 * Makefile.in (clean): Remove reg-spu.c.
11350 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11351 * spu-low.c: New file.
11352
113532006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11354
11355 * configure.ac: Correct td_thr_tls_get_addr test.
11356 * configure: Regenerated.
11357
113582006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11359
11360 * linux-low.c (linux_wait_for_event): Reformat. Use the
11361 pass_signals array.
11362 * remote-utils.c (decode_address_to_semicolon): New.
11363 * server.c (pass_signals, handle_general_set): New.
11364 (handle_query): Mention QPassSignals for qSupported.
11365 (main): Call handle_general_set.
11366 * server.h (pass_signals, decode_address_to_semicolon): New.
11367
113682006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11369
11370 * server.c (handle_query): Correct error handling for read_auxv.
11371
113722005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11373
11374 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11375 and srv_linux_thread_db to yes.
11376 * linux-s390-low.c (s390_fill_gregset): New function.
11377 (target_regsets): Define data structure.
11378
113792006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11380
11381 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11382 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11383 * config.in, configure: Regenerated.
11384 * inferiors.c (gdb_id_to_thread): New function.
11385 (gdb_id_to_thread_id): Use it.
11386 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11387 * linux-low.h (struct process_info): Add th member.
11388 (thread_db_get_tls_address): New prototype.
11389 * remote-utils.c (decode_address): Make non-static.
11390 * server.c (handle_query): Handle qGetTLSAddr.
11391 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11392 * target.h (struct target_ops): Add get_tls_address.
11393 * thread-db.c (maybe_attach_thread): Save the thread handle.
11394 (thread_db_get_tls_address): New.
11395
113962006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11397
11398 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11399 (linux_resume_one_process): Take a siginfo_t *. Update all
11400 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11401 (struct pending_signals): Add a siginfo_t.
11402 (linux_wait_for_process): Always set last_status.
11403 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11404 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11405 * linux-low.h (struct process_info): Add last_status.
11406
114072006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11408
11409 * remote-utils.c (try_rle): New function.
11410 (putpkt_binary): Use it.
11411
114122006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11413
11414 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11415 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11416 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11417 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11418 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11419 point registers.
11420
114212006-08-08 Richard Sandiford <richard@codesourcery.com>
11422
11423 * server.c (terminal_fd): New variable.
11424 (old_foreground_pgrp): Likewise.
11425 (restore_old_foreground_pgrp): New function.
11426 (start_inferior): Record the terminal file descriptor in terminal_fd
11427 and its original foreground group in old_foreground_pgrp. Register
11428 restore_old_foreground_pgrp with atexit().
11429
114302006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11431
11432 * server.c (handle_query): Correct qPart to qXfer.
11433
114342006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11435
11436 * configure.ac: Check for more headers which are missing on
11437 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11438 * configure.srv: Add Cygwin and mingw32.
11439 * remote-utils.c: Don't include headers unconditionally which
11440 are missing on mingw32. Include <winsock.h> for mingw32.
11441 (remote_open): Adjust for mingw32 support. Flush
11442 standard error after writing to it.
11443 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11444 (unblock_async_io, enable_async_io, disable_async_io)
11445 (readchar, getpkt): Update for Winsock support.
11446 (prepare_resume_reply): Expect a protocol signal number.
11447 * server.c: Disable <sys/wait.h> on mingw32.
11448 (start_inferior): Adjust for mingw32 support. Flush
11449 standard error after writing to it.
11450 (attach_inferior): Likewise. Use protocol signal
11451 numbers.
11452 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11453 and names.
11454 * win32-i386-low.c: New file.
11455 * Makefile.in (XM_CLIBS): Set.
11456 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11457 (win32-i386-low.o): New dependency rule.
11458 * linux-low.c (linux_wait): Use target signal numbers.
11459 * target.h (struct target_ops): Doc fix.
11460 * server.h (target_signal_to_name): New prototype.
11461 * gdbreplay.c: Don't include headers unconditionally which
11462 are missing on mingw32. Include <winsock.h> for mingw32.
11463 (remote_close, remote_open): Adjust for Winsock support.
11464 * configure, config.in: Regenerated.
11465
114662006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11467
11468 * server.c (decode_xfer_read, write_qxfer_response): New.
11469 (handle_query): Take a packet length argument. Handle
11470 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11471 the qSupported response.
11472 (main): Update call to handle_query.
11473
114742006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11475
11476 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11477 (putpkt_binary): Renamed from putpkt and adjusted for binary
11478 data.
11479 (putpkt): New wrapper for putpkt_binary.
11480 (readchar): Don't mask off the high bit.
11481 (decode_X_packet): New function.
11482 * server.c (main): Call putpkt_binary if a handler sets the packet
11483 length. Save the length of the incoming packet. Handle 'X'.
11484 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11485
114862006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11487
11488 * server.c (handle_query): Handle qSupported.
11489
114902006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11491
11492 * remote-utils.c (all_symbols_looked_up): New variable.
11493 (look_up_one_symbol): Check it.
11494 * server.h (look_up_one_symbol): New declaration.
11495 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11496
114972006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11498
11499 * Makefile.in (linux-arm-low.o): Update dependencies.
11500 * linux-arm-low.c: Include "gdb_proc_service.h".
11501 (PTRACE_GET_THREAD_AREA): Define.
11502 (ps_get_thread_area): New function.
11503
115042006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11505
11506 * configure.srv (m68k*-*-uclinux*): New target.
11507 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11508 (linux_resume_one_process): Remove extraneous cast.
11509 (linux_read_offsets): New.
11510 (linux_target_op): Add linux_read_offsets on mmuless systems.
11511 * server.c (handle_query): Add qOffsets logic.
11512 * target.h (struct target_ops): Add read_offsets.
11513
115142006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11515
11516 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11517 (PTRACE_GET_THREAD_AREA): Define.
11518 (ps_get_thread_area): New function.
11519 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11520 (linux-x86-64-low.o): Update.
11521
115222006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11523
11524 * configure.ac: Remove checks for prfpregset_t.
11525 * gdb_proc_service.h: New file.
11526 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11527 new "gdb_proc_service.h".
11528 * proc-service.c: Likewise.
11529 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11530 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11531 * Makefile.in (gdb_proc_service_h): Updated.
11532 * configure, config.in: Regenerated.
11533
115342006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * remote-utils.c (prepare_resume_reply): Move declaration
11537 of gdb_id_from_wait to the top of the block.
11538
115392006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * linux-low.c (regsets_store_inferior_registers): Read the regset
11542 from the target before filling it.
11543
115442006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * server.c (attach_inferior): Return SIGTRAP for a successful
11547 attach.
11548
115492006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * Makefile.in (OBS): Add version.o.
11552 (STAGESTUFF): Delete.
11553 (version.o): Add dependencies.
11554 (version.c): Replace rule.
11555 (clean): Remove version.c.
11556 * server.c (gdbserver_version): New.
11557 (gdbserver_usage): Use printf.
11558 (main): Handle --version and --help.
11559 * server.h (version, host_name): Add declarations.
11560
115612005-12-23 Eli Zaretskii <eliz@gnu.org>
11562
11563 * linux-arm-low.c:
11564 * linux-arm-low.c:
11565 * inferiors.c:
11566 * i387-fp.h:
11567 * i387-fp.c:
11568 * gdbreplay.c:
11569 * regcache.c:
11570 * proc-service.c:
11571 * mem-break.h:
11572 * mem-break.c:
11573 * linux-x86-64-low.c:
11574 * linux-sh-low.c:
11575 * linux-s390-low.c:
11576 * linux-ppc64-low.c:
11577 * linux-ppc-low.c:
11578 * linux-mips-low.c:
11579 * linux-m68k-low.c:
11580 * linux-m32r-low.c:
11581 * linux-low.h:
11582 * linux-low.c:
11583 * linux-ia64-low.c:
11584 * linux-i386-low.c:
11585 * linux-crisv32-low.c:
11586 * thread-db.c:
11587 * terminal.h:
11588 * target.h:
11589 * target.c:
11590 * server.h:
11591 * server.c:
11592 * remote-utils.c:
11593 * regcache.h:
11594 * utils.c:
11595 * Makefile.in:
11596 * configure.ac:
11597 * gdbserver.1: Add (C) after Copyright. Update the FSF
11598 address.
11599
116002005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11601
11602 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11603 (arm_breakpoint_at): Recognize both breakpoints.
11604 (the_low_target): Use the correct breakpoint instruction.
11605
116062005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11607
11608 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11609 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11610 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11611 (the_low_target): Update.
11612
116132005-10-25 Andreas Schwab <schwab@suse.de>
11614
11615 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11616
11617 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11618 (ia64_num_regs): Reduce to 462.
11619
116202005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * acinclude.m4: Correct quoting.
11623 * aclocal.m4: Regenerated.
11624
11625 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11626 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11627 (thread_db_init): Call thread_db_err_str.
11628 * configure.ac: Check for TD_VERSION.
11629 * config.in, configure: Regenerated.
11630
116312005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11632
11633 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11634
116352005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11636
11637 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11638 is not available. Define HAVE_PTRACE_GETREGS if it is.
11639 * config.in, configure: Regenerated.
11640 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11641 * linux-i386-low.c, linux-m68k-low.c: Update to use
11642 HAVE_PTRACE_GETREGS.
11643 * linux-low.c (regsets_fetch_inferior_registers)
11644 (regsets_store_inferior_registers): Only return 0 if we processed
11645 GENERAL_REGS.
11646 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11647 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11648
116492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11650
11651 * inferiors.c (struct thread_info): Add gdb_id.
11652 (add_thread): Add gdb_id argument.
11653 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11654 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11655 calls to add_thread.
11656 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11657 * server.c (handle_query): Use thread_to_gdb_id.
11658 (handle_v_cont, main): Use gdb_id_to_thread_id.
11659 * server.h (add_thread): Update prototype.
11660 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11661 prototypes.
11662
116632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11664
11665 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11666 left-padded registers.
11667 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11668 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11669
116702005-07-01 Steve Ellcey <sje@cup.hp.com>
11671
11672 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11673 * configure: Regenerate.
11674 * config.in: Regenerate.
11675 * server.h (NEED_DECLARATION_STRERROR):
11676 Replace with !HAVE_DECL_STRERROR.
11677
116782005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11679
11680 * linux-low.c (linux_wait, linux_send_signal): Don't test
11681 an unsigned long variable for > 0 if it could be MAX_ULONG.
11682 * server.c (myresume): Likewise.
11683 * target.c (set_desired_inferior): Likewise.
11684
116852005-06-13 Mark Kettenis <kettenis@gnu.org>
11686
11687 * configure.ac: Simplify and improve check for socklen_t.
11688 * configure, config.in: Regenerate.
11689
116902005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11691
11692 * acconfig.h: Remove.
11693 * configure.ac: Add a test for socklen_t. Use three-argument
11694 AC_DEFINE throughout.
11695 * config.in: Regenerated using autoheader 2.59.
11696 * configure: Regenerated.
11697
11698 * gdbreplay.c (socklen_t): Provide a default.
11699 (remote_open): Use socklen_t.
11700 * remote-utils.c (socklen_t): Provide a default.
11701 (remote_open): Use socklen_t.
11702 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11703 unsigned char.
11704
11705 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11706 char for buffers.
11707 * linux-low.c (linux_read_memory, linux_write_memory)
11708 (linux_read_auxv): Likewise.
11709 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11710 (check_mem_write): Likewise.
11711 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11712 Likewise.
11713 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11714 (registers_from_string, register_data): Likewise.
11715 * server.c (handle_query, main): Likewise.
11716 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11717 (decode_M_packet): Likewise.
11718 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11719 * target.h (struct target_ops): Update read_memory, write_memory,
11720 and read_auxv.
11721 (read_inferior_memory, write_inferior_memory): Update.
11722 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11723 to unsigned char *.
11724 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11725 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11726 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11727 linux-s390-low.c, linux-sh-low.c: Update for changes in
11728 read_inferior_memory and the_low_target->breakpoint.
11729
117302005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11733 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11734 * configure.srv: Add powerpc64-*-linux*.
11735 * linux-ppc64-low.c: New file.
11736
117372005-05-23 Orjan Friberg <orjanf@axis.com>
11738
11739 * linux-cris-low.c: New file with support for CRIS.
11740 * linux-crisv32-low.c: Ditto for CRISv32.
11741 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11742 (clean): Add reg-cris.c and reg-crisv32.c.
11743 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11744 reg-crisv32.o, and reg-crisv32.c to make rules.
11745 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11746 recognized targets.
11747
117482005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11749
11750 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11751 of sizeof (PTRACE_XFER_TYPE).
11752 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11753
117542005-05-12 Orjan Friberg <orjanf@axis.com>
11755
11756 * target.h (struct target_ops): Add insert_watchpoint,
11757 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11758 pointers for hardware watchpoint support.
11759 * linux-low.h (struct linux_target_ops): Ditto.
11760 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11761 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11762 to linux_target_ops.
11763 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11764 reply packet.
11765 * server.c (main): Recognize 'Z' and 'z' packets.
11766
117672005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11768
11769 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11770 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11771 (the_low_target): Add new members.
11772
117732005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11774
11775 * proc-service.c (ps_lgetregs): Search all_processes instead of
11776 all_threads.
11777
117782005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11779
11780 * server.c (start_inferior): Change return type to int.
11781 (attach_inferior): Change sigptr to int *.
11782 (handle_v_cont, handle_v_requests): Change signal to int *.
11783 (main): Change signal to int.
11784
117852005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11786
11787 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11788 * configure.srv: Add m32r*-*-linux*.
11789 * linux-m32r-low.c: New file.
11790
117912005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11792
11793 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11794
117952005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11798 Take unsigned long arguments for PIDs.
11799 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11800 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11801 (wait_for_sigstop, linux_resume_one_process)
11802 (regsets_fetch_inferior_registers, linux_send_signal)
11803 (linux_read_auxv): Likewise. Update the types of variables holding
11804 PIDs. Update format string specifiers.
11805 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11806 * remote-utils.c (prepare_resume_reply): Likewise.
11807 * server.c (cont_thread, general_thread, step_thread)
11808 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11809 unsigned long.
11810 (handle_query): Update format specifiers.
11811 (handle_v_cont, main): Use strtoul for thread IDs.
11812 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11813 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11814 (general_thread, step_thread, thread_from_wait)
11815 (old_thread_from_wait): Update.
11816 * target.h (struct thread_resume): Use unsigned long for THREAD.
11817 (struct target_ops): Use unsigned long for arguments to attach and
11818 thread_alive.
11819
118202005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11821
11822 * acinclude.m4: Include bfd/bfd.m4 directly.
11823 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11824 <agriffis@toolchain.org>.
11825 * aclocal.m4, configure: Regenerated.
11826
118272005-01-07 Andrew Cagney <cagney@gnu.org>
11828
11829 * configure.ac: Rename configure.in, require autoconf 2.59.
11830 * configure: Re-generate.
11831
118322004-12-08 Daniel Jacobowitz <dan@debian.org>
11833
11834 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11835 LIBS when finished.
11836 * aclocal.m4: Regenerated.
11837 * configure: Regenerated.
11838
118392004-11-21 Andreas Schwab <schwab@suse.de>
11840
11841 * linux-m68k-low.c (m68k_num_gregs): Define.
11842 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11843 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11844 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11845 (m68k_breakpoint_at): New. Add to the_low_target.
11846
11847 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11848 srv_linux_thread_db to yes.
11849
118502004-10-20 Joel Brobecker <brobecker@gnat.com>
11851
11852 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11853 (ARCH_SET_FS): Likewise.
11854 (ARCH_GET_FS): Likewise.
11855 (ARCH_GET_GS): Likewise.
11856
118572004-10-16 Daniel Jacobowitz <dan@debian.org>
11858
11859 * linux-i386-low.c (ps_get_thread_area): New.
11860 * linux-x86-64-low.c (ps_get_thread_area): New.
11861 * linux-low.c: Include <sys/syscall.h>.
11862 (linux_kill_one_process): Don't kill the first thread here.
11863 (linux_kill): Kill the first thread here.
11864 (kill_lwp): New function.
11865 (send_sigstop, linux_send_signal): Use it.
11866 * proc-service.c: Clean up #ifdefs.
11867 (fpregset_info): Delete.
11868 (ps_lgetregs): Update and enable implementation.
11869 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11870 implementations.
11871 * remote-utils.c (struct sym_cache, symbol_cache): New.
11872 (input_interrupt): Print a clearer message.
11873 (async_io_enabled): New variable.
11874 (enable_async_io, disable_async_io): Use it. Update comments.
11875 (look_up_one_symbol): Use the symbol cache.
11876 * thread-db.c (thread_db_look_up_symbols): New function.
11877 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11878
118792004-10-16 Daniel Jacobowitz <dan@debian.org>
11880
11881 * configure.in: Test for -rdynamic.
11882 * configure: Regenerated.
11883 * Makefile (INTERNAL_LDFLAGS): New.
11884 (gdbserver, gdbreplay): Use it.
11885
118862004-09-02 Andrew Cagney <cagney@gnu.org>
11887
11888 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11889
118902004-03-23 Daniel Jacobowitz <drow@mvista.com>
11891
11892 * linux-low.c (linux_wait): Clear all_processes list also.
11893
118942004-03-12 Daniel Jacobowitz <drow@mvista.com>
11895
11896 * linux-low.c: Include <errno.h>. Remove extern declaration of
11897 errno.
11898
118992004-03-12 Daniel Jacobowitz <drow@mvista.com>
11900
11901 * gdbreplay.c, server.h, utils.c: Update copyright years.
11902
119032004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11904
11905 * server.c (main): Print child status or termination signal from
11906 variable 'signal', not 'sig'.
11907
119082004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11909
11910 * linux-low.c (linux_read_memory): Change return type to
11911 int. Check for and return error from ptrace().
11912 * target.c (read_inferior_memory): Change return type to int. Pass
11913 back return status from the_target->read_memory().
11914 * target.h (struct target_ops): Adapt *read_memory() prototype.
11915 Update comment.
11916 (read_inferior_memory): Adapt prototype.
11917 * server.c (main): Return an error packet if
11918 read_inferior_memory() returns an error.
11919
119202004-03-04 Daniel Jacobowitz <drow@mvista.com>
11921
11922 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11923 Unify with other clean targets.
11924
119252004-02-29 Daniel Jacobowitz <drow@mvista.com>
11926
11927 * server.c (handle_v_cont): Call set_desired_inferior.
11928
119292004-02-29 Daniel Jacobowitz <drow@mvista.com>
11930
11931 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11932
119332004-02-29 Daniel Jacobowitz <drow@mvista.com>
11934
11935 * linux-low.c (linux_wait): Unblock async I/O.
11936 (linux_resume): Block and enable async I/O.
11937 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11938 * server.h (block_async_io, unblock_async_io): Add prototypes.
11939
119402004-02-29 Daniel Jacobowitz <drow@mvista.com>
11941
11942 * remote-utils.c (remote_open): Print a status notice after
11943 opening a TCP port.
11944 * server.c (attach_inferior): Print a status notice after
11945 attaching.
11946
119472004-02-29 Daniel Jacobowitz <drow@mvista.com>
11948
11949 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11950
119512004-02-26 Daniel Jacobowitz <drow@mvista.com>
11952
11953 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11954 error packet.
11955 * server.c, target.h: Update copyright years.
11956
119572004-02-25 Roland McGrath <roland@redhat.com>
11958
11959 * target.h (struct target_ops): New member `read_auxv'.
11960 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11961 * linux-low.c (linux_read_auxv): New function.
11962 (linux_target_ops): Initialize `read_auxv' member to that.
11963
119642004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11965
11966 Committed by Jim Blandy <jimb@redhat.com>.
11967
11968 * linux-s390-low.c (s390_num_regs): Update.
11969 (s390_regmap): Remove control registers. Use __s390x__ predefine
11970 instead of GPR_SIZE to distiguish s390 and s390x targets.
11971
119722004-01-31 Daniel Jacobowitz <drow@mvista.com>
11973
11974 * linux-low.c: Update copyright year.
11975 (check_removed_breakpoint): Clear pending_is_breakpoint.
11976 (linux_set_resume_request, linux_queue_one_thread)
11977 (resume_status_pending_p): New functions.
11978 (linux_continue_one_thread): Use process->resume.
11979 (linux_resume): Only resume threads if there are no pending events.
11980 * linux-low.h (struct process_info): Add resume request
11981 pointer.
11982
119832004-01-30 Daniel Jacobowitz <drow@mvista.com>
11984
11985 * regcache.c (new_register_cache): Clear the allocated register
11986 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11987
119882003-10-13 Daniel Jacobowitz <drow@mvista.com>
11989
11990 * linux-low.c (linux_resume): Take a struct thread_resume *
11991 argument.
11992 (linux_wait): Update call.
11993 (resume_ptr): New static variable.
11994 (linux_continue_one_thread): Renamed from
11995 linux_continue_one_process. Use resume_ptr.
11996 (linux_resume): Use linux_continue_one_thread.
11997 * server.c (handle_v_cont, handle_v_requests): New functions.
11998 (myresume): New function.
11999 (main): Handle 'v' case.
12000 * target.h (struct thread_resume): New type.
12001 (struct target_ops): Change argument of "resume" to struct
12002 thread_resume *.
12003 (myresume): Delete macro.
12004
120052003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12006
12007 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12008 (uninstall): Support DESTDIR.
12009
12010Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12011
12012 * configure.srv: Add xscale*linux copy of arm*linux entry.
12013
120142003-07-24 Daniel Jacobowitz <drow@mvista.com>
12015
12016 * linux-arm-low.c (arm_reinsert_addr): New function.
12017 (the_low_target): Add arm_reinsert_addr.
12018
120192003-07-08 Mark Kettenis <kettenis@gnu.org>
12020
12021 * mem-break.c: Remove whitespace at end of file.
12022
120232003-06-28 Daniel Jacobowitz <drow@mvista.com>
12024
12025 * configure.in: Check whether we need to prototype strerror.
12026 * server.h: Optionally prototype strerror.
12027 * gdbreplay.c (perror_with_name): Use strerror.
12028 * linux-low.c (linux_attach_lwp): Use strerror.
12029 * utils.c (perror_with_name): Use strerror.
12030 * config.in, configure: Regenerated.
12031
120322003-06-28 Daniel Jacobowitz <drow@mvista.com>
12033
12034 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12035 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12036
120372003-06-20 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * Makefile.in (SFILES): Update.
12040 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12041 low-sun3.c: Remove files.
12042
120432003-06-17 Daniel Jacobowitz <drow@mvista.com>
12044
12045 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12046 (linux_detach_one_process, linux_detach): New functions.
12047 (linux_target_ops): Add linux_detach.
12048 * server.c (main): Handle 'D' packet.
12049 * target.h (struct target_ops): Add "detach" member.
12050 (detach_inferior): Define.
12051
120522003-06-13 Mark Kettenis <kettenis@gnu.org>
12053
12054 From Kelley Cook <kelleycook@wideopenwest.com>:
12055 * configure.srv: Accept i[34567]86 variants.
12056
120572003-06-05 Daniel Jacobowitz <drow@mvista.com>
12058
12059 * linux-low.c (linux_wait_for_event): Correct comment typos.
12060 (linux_resume_one_process): Call check_removed_breakpoint.
12061 (linux_send_signal): New function.
12062 (linux_target_ops): Add linux_send_signal.
12063 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12064 of kill.
12065 * target.h (struct target_ops): Add send_signal.
12066
120672003-05-29 Jim Blandy <jimb@redhat.com>
12068
12069 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12070 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12071 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12072 away part of the register's value.
12073
120742003-03-26 Daniel Jacobowitz <drow@mvista.com>
12075
12076 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12077 (linux_wait_for_event, linux_init_signals): Likewise.
12078
120792003-03-17 Daniel Jacobowitz <drow@mvista.com>
12080
12081 * configure.in: Check for stdlib.h.
12082 * configure: Regenerated.
12083 * config.in: Regenerated.
12084
120852003-01-04 Andreas Schwab <schwab@suse.de>
12086
12087 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12088
120892003-01-02 Andrew Cagney <ac131313@redhat.com>
12090
12091 * Makefile.in: Remove obsolete code.
12092
120932002-11-20 Daniel Jacobowitz <drow@mvista.com>
12094
12095 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12096 defined(PT_FPR0_HI).
12097
120982002-11-17 Stuart Hughes <seh@zee2.com>
12099
12100 * linux-arm-low.c (arm_num_regs): Increase.
12101 (arm_regmap): Include status register.
12102
121032002-11-17 Daniel Jacobowitz <drow@mvista.com>
12104
12105 * linux-low.c (register_addr): Remove incorrect -1 check.
12106
121072002-08-29 Daniel Jacobowitz <drow@mvista.com>
12108
12109 * linux-low.c (linux_create_inferior): Call setpgid. Return
12110 the new PID.
12111 (unstopped_p, linux_signal_pid): Remove.
12112 (linux_target_ops): Remove linux_signal_pid.
12113 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12114 global instead of target method.
12115 * target.h (struct target_ops): Remove signal_pid. Update comment
12116 for create_inferior.
12117 * server.c (signal_pid): New variable.
12118 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12119 gdbserver. Set the child to be the foreground process group.
12120 (attach_inferior): Set signal_pid.
12121
121222002-08-23 Daniel Jacobowitz <drow@mvista.com>
12123
12124 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12125
121262002-08-20 Jim Blandy <jimb@redhat.com>
12127
12128 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12129 default for this.
12130
121312002-08-01 Andrew Cagney <cagney@redhat.com>
12132
12133 * Makefile.in: Make chill references obsolete.
12134
121352002-07-24 Kevin Buettner <kevinb@redhat.com>
12136
12137 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12138 * configure: Regenerate.
12139 * config.in: Regenerate.
12140
121412002-07-09 David O'Brien <obrien@FreeBSD.org>
12142
12143 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12144 (perror_with_name, remote_close, remote_open, expect, play): Static.
12145
121462002-07-04 Michal Ludvig <mludvig@suse.cz>
12147
12148 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12149 byte offsets instead of an array of indexes.
12150 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12151
121522002-06-13 Daniel Jacobowitz <drow@mvista.com>
12153
12154 * regcache.c: Add comment.
12155
121562002-06-11 Daniel Jacobowitz <drow@mvista.com>
12157
12158 * thread-db.c: New file.
12159 * proc-service.c: New file.
12160 * acinclude.m4: New file.
12161 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12162 proc-service.o, and thread-db.o.
12163 (linux-low.o): Add USE_THREAD_DB.
12164 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12165 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12166 * aclocal.m4: Regenerated.
12167 * config.in: Regenerated.
12168 * configure: Regenerated.
12169 * configure.in: Check for proc_service.h, sys/procfs.h,
12170 thread_db.h, and linux/elf.h headrs.
12171 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12172 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12173 Check for -lthread_db and thread support.
12174 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12175 PowerPC, and SuperH.
12176 * i387-fp.c: Constify arguments.
12177 * i387-fp.h: Likewise.
12178 * inferiors.c: (struct thread_info): Renamed from
12179 `struct inferior_info'. Remove PID member. Use generic inferior
12180 list header. All uses updated.
12181 (inferiors, signal_pid): Removed.
12182 (all_threads): New variable.
12183 (get_thread): Define.
12184 (add_inferior_to_list): New function.
12185 (for_each_inferior): New function.
12186 (change_inferior_id): New function.
12187 (add_inferior): Removed.
12188 (remove_inferior): New function.
12189 (add_thread): New function.
12190 (free_one_thread): New function.
12191 (remove_thread): New function.
12192 (clear_inferiors): Use for_each_inferior and free_one_thread.
12193 (find_inferior): New function.
12194 (find_inferior_id): New function.
12195 (inferior_target_data): Update argument type.
12196 (set_inferior_target_data): Likewise.
12197 (inferior_regcache_data): Likewise.
12198 (set_inferior_regcache_data): Likewise.
12199 * linux-low.c (linux_bp_reinsert): Remove.
12200 (all_processes, stopping_threads, using_thrads)
12201 (struct pending_signals, debug_threads, pid_of): New.
12202 (inferior_pid): Replace with macro.
12203 (struct inferior_linux_data): Remove.
12204 (get_stop_pc, add_process): New functions.
12205 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12206 Use add_process and add_thread.
12207 (linux_attach_lwp): New function, based on old linux_attach. Use
12208 add_process and add_thread. Set stop_expected for new threads.
12209 (linux_attach): New function.
12210 (linux_kill_one_process): New function.
12211 (linux_kill): Kill all LWPs.
12212 (linux_thread_alive): Use find_inferior_id.
12213 (check_removed_breakpoints, status_pending_p): New functions.
12214 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12215 Update. Use WNOHANG. Wait for cloned processes also. Update process
12216 struct for the found process.
12217 (linux_wait_for_event): New function.
12218 (linux_wait): Use it. Support LWPs.
12219 (send_sigstop, wait_for_sigstop, stop_all_processes)
12220 (linux_resume_one_process, linux_continue_one_process): New functions.
12221 (linux_resume): Support LWPs.
12222 (REGISTER_RAW_SIZE): Remove.
12223 (fetch_register): Use register_size instead. Call supply_register.
12224 (usr_store_inferior_registers): Likewise. Call collect_register.
12225 Fix recursive case.
12226 (regsets_fetch_inferior_registers): Improve error message.
12227 (regsets_store_inferior_registers): Add debugging.
12228 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12229 (unstopped_p, linux_signal_pid): New functions.
12230 (linux_target_ops): Add linux_signal_pid.
12231 (linux_init_signals): New function.
12232 (initialize_low): Call it. Initialize using_threads.
12233 * regcache.c (inferior_regcache_data): Add valid
12234 flag.
12235 (get_regcache): Fetch registers lazily. Add fetch argument
12236 and update all callers.
12237 (regcache_invalidate_one, regcache_invalidate): New
12238 functions.
12239 (new_register_cache): Renamed from create_register_cache.
12240 Return the new regcache.
12241 (free_register_cache): Change argument to a void *.
12242 (registers_to_string, registers_from_string): Call get_regcache
12243 with fetch flag set.
12244 (register_data): Make static. Pass fetch flag to get_regcache.
12245 (supply_register): Call get_regcache with fetch flag clear.
12246 (collect_register): Call get_regcache with fetch flag set.
12247 (collect_register_as_string): New function.
12248 * regcache.h: Update.
12249 * remote-utils.c (putpkt): Flush after debug output and use
12250 stderr.
12251 Handle input interrupts while waiting for an ACK.
12252 (input_interrupt): Use signal_pid method.
12253 (getpkt): Flush after debug output and use stderr.
12254 (outreg): Use collect_register_as_string.
12255 (new_thread_notify, dead_thread_notify): New functions.
12256 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12257 and general_thread.
12258 (look_up_one_symbol): Flush after debug output.
12259 * server.c (step_thread, server_waiting): New variables.
12260 (start_inferior): Don't use signal_pid. Update call to mywait.
12261 (attach_inferior): Update call to mywait.
12262 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12263 (main): Don't fetch/store registers explicitly. Use
12264 set_desired_inferior. Support proposed ``Hs'' packet. Update
12265 calls to mywait.
12266 * server.h: Update.
12267 (struct inferior_list, struct_inferior_list_entry): New.
12268 * target.c (set_desired_inferior): New.
12269 (write_inferior_memory): Constify.
12270 (mywait): New function.
12271 * target.h: Update.
12272 (struct target_ops): New signal_pid method.
12273 (mywait): Removed macro, added prototype.
12274
12275 * linux-low.h (regset_func): Removed.
12276 (regset_fill_func, regset_store_func): New.
12277 (enum regset_type): New.
12278 (struct regset_info): Add type field. Use new operation types.
12279 (struct linux_target_ops): stop_pc renamed to get_pc.
12280 Add decr_pc_after_break and breakpoint_at.
12281 (get_process, get_thread_proess, get_process_thread)
12282 (strut process_info, all_processes, linux_attach_lwp)
12283 (thread_db_init): New.
12284
12285 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12286 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12287 (the_low_target): Add new members.
12288 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12289 (i386_store_fpxregset): Constify.
12290 (target_regsets): Add new kind identifier.
12291 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12292 (i386_set_pc): Add debugging.
12293 (i386_breakpoint_at): New function.
12294 (the_low_target): Add new members.
12295 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12296 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12297 (mips_breakpoint_at): New.
12298 (the_low_target): Add new members.
12299 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12300 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12301 (the_low_target): Add new members.
12302 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12303 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12304 (the_low_target): Add new members.
12305 * linux-x86-64-low.c (target_regsets): Add new kind
12306 identifier.
12307
123082002-05-15 Daniel Jacobowitz <drow@mvista.com>
12309
12310 From Martin Pool <mbp@samba.org>:
12311 * server.c (gdbserver_usage): New function.
12312 (main): Call it.
12313
123142002-05-14 Daniel Jacobowitz <drow@mvista.com>
12315
12316 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12317 stop_at -> stop_pc.
12318
123192002-05-04 Andrew Cagney <ac131313@redhat.com>
12320
12321 * Makefile.in: Remove obsolete code.
12322
123232002-04-24 Michal Ludvig <mludvig@suse.cz>
12324
12325 * linux-low.c (regsets_fetch_inferior_registers),
12326 (regsets_store_inferior_registers): Removed cast to int from
12327 ptrace() calls.
12328 * regcache.h: Added declaration of struct inferior_info.
12329
123302002-04-20 Daniel Jacobowitz <drow@mvista.com>
12331
12332 * inferiors.c (struct inferior_info): Add regcache_data.
12333 (add_inferior): Call create_register_cache.
12334 (clear_inferiors): Call free_register_cache.
12335 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12336 * regcache.c (struct inferior_regcache_data): New.
12337 (registers): Remove.
12338 (get_regcache): New function.
12339 (create_register_cache, free_register_cache): New functions.
12340 (set_register_cache): Don't initialize the register cache here.
12341 (registers_to_string, registers_from_string, register_data): Call
12342 get_regcache.
12343 * regcache.h: Add prototypes.
12344 * server.h: Likewise.
12345
123462002-04-20 Daniel Jacobowitz <drow@mvista.com>
12347
12348 * mem-break.c: New file.
12349 * mem-break.h: New file.
12350 * Makefile.in: Add mem-break.o rule; update server.h
12351 dependencies.
12352 * inferiors.c (struct inferior_info): Add target_data
12353 member.
12354 (clear_inferiors): Free target_data member if set.
12355 (inferior_target_data, set_inferior_target_data): New functions.
12356 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12357 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12358 * linux-low.c (linux_bp_reinsert): New variable.
12359 (struct inferior_linux_data): New.
12360 (linux_create_inferior): Use set_inferior_target_data.
12361 (linux_attach): Likewise. Call add_inferior.
12362 (linux_wait_for_one_inferior): New function.
12363 (linux_wait): Call it.
12364 (linux_write_memory): Add const.
12365 (initialize_low): Call set_breakpoint_data.
12366 * linux-low.h (struct linux_target_ops): Add breakpoint
12367 handling members.
12368 * server.c (attach_inferior): Remove extra add_inferior
12369 call.
12370 * server.h: Include mem-break.h. Update inferior.c
12371 prototypes.
12372 * target.c (read_inferior_memory)
12373 (write_inferior_memory): New functions.
12374 * target.h (read_inferior_memory)
12375 (write_inferior_memory): Change macros to prototypes.
12376 (struct target_ops): Update comments. Add const to write_memory
12377 definition.
12378
123792002-04-11 Daniel Jacobowitz <drow@mvista.com>
12380
12381 * linux-low.c (usr_store_inferior_registers): Support
12382 registers which are allowed to fail to store.
12383 * linux-low.h (linux_target_ops): Likewise.
12384 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12385 (ppc_cannot_store_register): FPSCR may not be storable.
12386
123872002-04-09 Daniel Jacobowitz <drow@mvista.com>
12388
12389 * server.h: Include <string.h> if HAVE_STRING_H.
12390 * ChangeLog: Correct paths in last ChangeLog entry.
12391
123922002-04-09 Daniel Jacobowitz <drow@mvista.com>
12393
12394 * linux-low.h: Remove obsolete prototypes.
12395 (struct linux_target_ops): New.
12396 (extern the_low_target): New.
12397 * linux-low.c (num_regs, regmap): Remove declarations.
12398 (register_addr): Use the_low_target explicitly.
12399 (fetch_register): Likewise.
12400 (usr_fetch_inferior_registers): Likewise.
12401 (usr_store_inferior_registers): Likewise.
12402 * linux-arm-low.c (num_regs): Remove.
12403 (arm_num_regs): Define.
12404 (arm_regmap): Renamed from regmap, made static.
12405 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12406 made static.
12407 (arm_cannot_store_register): Renamed from cannot_store_register,
12408 made static.
12409 (the_low_target): New.
12410 * linux-i386-low.c (num_regs): Remove.
12411 (i386_num_regs): Define.
12412 (i386_regmap): Renamed from regmap, made static.
12413 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12414 made static.
12415 (i386_cannot_store_register): Renamed from cannot_store_register,
12416 made static.
12417 (the_low_target): New.
12418 * linux-ia64-low.c (num_regs): Remove.
12419 (ia64_num_regs): Define.
12420 (ia64_regmap): Renamed from regmap, made static.
12421 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12422 made static.
12423 (ia64_cannot_store_register): Renamed from cannot_store_register,
12424 made static.
12425 (the_low_target): New.
12426 * linux-m68k-low.c (num_regs): Remove.
12427 (m68k_num_regs): Define.
12428 (m68k_regmap): Renamed from regmap, made static.
12429 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12430 made static.
12431 (m68k_cannot_store_register): Renamed from cannot_store_register,
12432 made static.
12433 (the_low_target): New.
12434 * linux-mips-low.c (num_regs): Remove.
12435 (mips_num_regs): Define.
12436 (mips_regmap): Renamed from regmap, made static.
12437 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12438 made static.
12439 (mips_cannot_store_register): Renamed from cannot_store_register,
12440 made static.
12441 (the_low_target): New.
12442 * linux-ppc-low.c (num_regs): Remove.
12443 (ppc_num_regs): Define.
12444 (ppc_regmap): Renamed from regmap, made static.
12445 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12446 made static.
12447 (ppc_cannot_store_register): Renamed from cannot_store_register,
12448 made static.
12449 (the_low_target): New.
12450 * linux-s390-low.c (num_regs): Remove.
12451 (s390_num_regs): Define.
12452 (s390_regmap): Renamed from regmap, made static.
12453 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12454 made static.
12455 (s390_cannot_store_register): Renamed from cannot_store_register,
12456 made static.
12457 (the_low_target): New.
12458 * linux-sh-low.c (num_regs): Remove.
12459 (sh_num_regs): Define.
12460 (sh_regmap): Renamed from regmap, made static.
12461 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12462 made static.
12463 (sh_cannot_store_register): Renamed from cannot_store_register,
12464 made static.
12465 (the_low_target): New.
12466 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12467 (the_low_target): New.
12468
124692002-04-09 Daniel Jacobowitz <drow@mvista.com>
12470
12471 * Makefile.in: Add stamp-h target.
12472 * configure.in: Create stamp-h.
12473 * configure: Regenerated.
12474
124752002-04-09 Daniel Jacobowitz <drow@mvista.com>
12476
12477 * inferiors.c: New file.
12478 * target.c: New file.
12479 * target.h: New file.
12480 * Makefile.in: Add target.o and inferiors.o. Update
12481 dependencies.
12482 * linux-low.c (inferior_pid): New static variable,
12483 moved from server.c.
12484 (linux_create_inferior): Renamed from create_inferior.
12485 Call add_inferior. Return 0 on success instead of a PID.
12486 (linux_attach): Renamed from myattach.
12487 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12488 (linux_thread_alive): Renamed from mythread_alive.
12489 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12490 child dies.
12491 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12492 (regsets_store_inferior_registers): Correct error message.
12493 Add missing ``return 0''.
12494 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12495 (linux_store_registers): Renamed from store_inferior_registers.
12496 (linux_read_memory): Renamed from read_inferior_memory.
12497 (linux_write_memory): Renamed from write_inferior_memory.
12498 (linux_target_ops): New structure.
12499 (initialize_low): Call set_target_ops ().
12500 * remote-utils.c (unhexify): New function.
12501 (hexify): New function.
12502 (input_interrupt): Send signals to ``signal_pid''.
12503 * server.c (inferior_pid): Remove.
12504 (start_inferior): Update create_inferior call.
12505 (attach_inferior): Call add_inferior.
12506 (handle_query): New function.
12507 (main): Call handle_query for `q' packets.
12508 * server.h: Include "target.h". Remove obsolete prototypes.
12509 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12510
125112002-04-09 Daniel Jacobowitz <drow@mvista.com>
12512
12513 * Makefile.in: Add WARN_CFLAGS. Update configury
12514 dependencies.
12515 * configure.in: Check for <string.h>
12516 * configure: Regenerate.
12517 * config.in: Regenerate.
12518 * gdbreplay.c: Include needed system headers.
12519 (remote_open): Remove strchr prototype.
12520 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12521 * regcache.c (supply_register): Change buf argument to const void *.
12522 (supply_register_by_name): Likewise.
12523 (collect_register): Change buf argument to void *.
12524 (collect_register_by_name): Likewise.
12525 * regcache.h: Add missing prototypes.
12526 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12527 * server.c (handle_query): New function.
12528 (attached): New static variable, moved out of main.
12529 (main): Quiet longjmp clobber warnings.
12530 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12531 * utils.c (error): Remove NORETURN.
12532 (fatal): Likewise.
This page took 0.078824 seconds and 4 git commands to generate.