Fix nto,spu and win32 builds of GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5 (initialize_low): Remove set_breakpoint_data call.
6 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8 (initialize_low): Remove set_breakpoint_data call.
9 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
11 (initialize_low): Remove set_breakpoint_data call.
12
132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
14
15 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
16 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
17 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
18 * target.h (target_breakpoint_kind_from_pc): New macro.
19
202015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
21
22 * linux-low.c (default_breakpoint_kind_from_pc): New function.
23 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
24 the default breakpoint kind.
25
262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
27
28 * linux-arm-low.c (arm_supports_z_point_type): Add software
29 breakpoint support.
30
312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
32
33 * linux-arm-low.c: Refactor breakpoint definitions.
34 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
35 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
36
372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
38
39 * Makefile.in: Add arm.c/o.
40 * configure.srv: Likewise.
41 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
42 (arm_breakpoint_kind_from_pc): New function.
43 (arm_sw_breakpoint_from_kind): Return proper kind.
44 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
45
462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
47
48 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
49 removal.
50 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
51 (struct raw_breakpoint) <size>: Remove.
52 (struct raw_breakpoint) <kind>: Add.
53 (bp_size): New function.
54 (bp_opcode): Likewise.
55 (find_raw_breakpoint_at): Adjust for kind.
56 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
57 (remove_memory_breakpoint): Adjust for kind call bp_size.
58 (set_raw_breakpoint_at): Adjust for kind.
59 (set_breakpoint): Likewise.
60 (set_breakpoint_at): Call breakpoint_kind_from_pc.
61 (delete_raw_breakpoint): Adjust for kind.
62 (delete_breakpoint): Likewise.
63 (find_gdb_breakpoint): Likewise.
64 (set_gdb_breakpoint_1): Likewise.
65 (set_gdb_breakpoint): Likewise.
66 (delete_gdb_breakpoint_1): Likewise.
67 (delete_gdb_breakpoint): Likewise.
68 (uninsert_raw_breakpoint): Likewise.
69 (reinsert_raw_breakpoint): Likewise.
70 (set_breakpoint_data): Remove.
71 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
72 (check_mem_read): Adjust for kind call bp_size.
73 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
74 (clone_one_breakpoint): Adjust for kind.
75 * mem-break.h (set_gdb_breakpoint): Likewise.
76 (delete_gdb_breakpoint): Likewise.
77 * server.c (process_serial_event): Likewise.
78
792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
80
81 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
82 (struct linux_target_ops) <breakpoint>: Remove.
83 (struct linux_target_ops) <breakpoint_len>: Remove.
84 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
85 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
86 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
87 (arm_sw_breakpoint_from_kind): New function.
88 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
104 and sw_breakpoint_from_kind to increment the pc.
105 (linux_breakpoint_kind_from_pc): New function.
106 (linux_sw_breakpoint_from_kind): New function.
107 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
108 (initialize_low): Call breakpoint_kind_from_pc and
109 sw_breakpoint_from_kind to replace breakpoint_data/len.
110 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
111 New field.
112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
113 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
114 (struct linux_target_ops) <breakpoint>: Remove.
115 (struct linux_target_ops) <breakpoint_len>: Remove.
116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
118 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
119 (struct linux_target_ops) <breakpoint>: Remove.
120 (struct linux_target_ops) <breakpoint_len>: Remove.
121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
123 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
124 (struct linux_target_ops) <breakpoint>: Remove.
125 (struct linux_target_ops) <breakpoint_len>: Remove.
126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
128 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
129 (struct linux_target_ops) <breakpoint>: Remove.
130 (struct linux_target_ops) <breakpoint_len>: Remove.
131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
133 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
134 (struct linux_target_ops) <breakpoint>: Remove.
135 (struct linux_target_ops) <breakpoint_len>: Remove.
136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
138 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
139 (struct linux_target_ops) <breakpoint>: Remove.
140 (struct linux_target_ops) <breakpoint_len>: Remove.
141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
143 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
144 (struct linux_target_ops) <breakpoint>: Remove.
145 (struct linux_target_ops) <breakpoint_len>: Remove.
146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
148 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
149 (struct linux_target_ops) <breakpoint>: Remove.
150 (struct linux_target_ops) <breakpoint_len>: Remove.
151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
153 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
154 (struct linux_target_ops) <breakpoint>: Remove.
155 (struct linux_target_ops) <breakpoint_len>: Remove.
156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
158 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
159 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
160 (struct linux_target_ops) <breakpoint>: Remove.
161 (struct linux_target_ops) <breakpoint_len>: Remove.
162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
164 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
165 (struct linux_target_ops) <breakpoint>: Remove.
166 (struct linux_target_ops) <breakpoint_len>: Remove.
167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
169
1702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
171
172 * linux-cris-low.c (cris_get_pc): Remove void arg.
173
1742015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
175
176 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
177 variable name.
178
1792015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
180
181 * inferiors.c (thread_pid_matches_callback): New function.
182 (find_thread_process): New function.
183 (remove_thread): Reset current_thread.
184 (remove_process): Assert threads have been removed first.
185
1862015-10-15 Yao Qi <yao.qi@linaro.org>
187
188 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
189 if it is 3.
190 (aarch64_remove_point): Likewise.
191 * regcache.c (regcache_register_size): New function.
192
1932015-10-12 Yao Qi <yao.qi@linaro.org>
194
195 * linux-aarch64-low.c: Update all callers as emit_load_store
196 is renamed to aarch64_emit_load_store.
197
1982015-10-12 Yao Qi <yao.qi@linaro.org>
199
200 * linux-aarch64-low.c: Update all callers of function renaming
201 from emit_insn to aarch64_emit_insn.
202
2032015-10-12 Yao Qi <yao.qi@linaro.org>
204
205 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
206 arch/aarch64-insn.h.
207 (struct aarch64_memory_operand): Likewise.
208 (ENCODE): Likewise.
209 (emit_insn): Move to arch/aarch64-insn.c.
210 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
211 (emit_load_store): Move to arch/aarch64-insn.c.
212 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
213 (can_encode_int32): Remove.
214
2152015-10-12 Yao Qi <yao.qi@linaro.org>
216
217 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
218 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
219 (aarch64_relocate_instruction): Likewise.
220 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
221 (struct aarch64_insn_visitor): Likewise.
222
2232015-10-12 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (struct aarch64_insn_data): New.
226 (struct aarch64_insn_visitor): New.
227 (struct aarch64_insn_relocation_data): New.
228 (aarch64_ftrace_insn_reloc_b): New function.
229 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
230 (aarch64_ftrace_insn_reloc_cb): Likewise.
231 (aarch64_ftrace_insn_reloc_tb): Likewise.
232 (aarch64_ftrace_insn_reloc_adr): Likewise.
233 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
234 (aarch64_ftrace_insn_reloc_others): Likewise.
235 (visitor): New.
236 (aarch64_relocate_instruction): Use visitor.
237
2382015-10-12 Yao Qi <yao.qi@linaro.org>
239
240 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
241 int. Add argument buf.
242 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
243 aarch64_relocate_instruction.
244
2452015-10-12 Yao Qi <yao.qi@linaro.org>
246
247 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
248 argument insn. Remove local variable insn. Don't call
249 target_read_uint32.
250 (aarch64_install_fast_tracepoint_jump_pad): Call
251 target_read_uint32.
252
2532015-09-30 Yao Qi <yao.qi@linaro.org>
254
255 * linux-aarch64-low.c (emit_movk): Shorten a long line.
256 (emit_load_store_pair): Likewise.
257
2582015-09-25 Simon Marchi <simon.marchi@ericsson.com>
259
260 * dll.c (match_dll): Add cast(s).
261 (unloaded_dll): Likewise.
262 * linux-low.c (second_thread_of_pid_p): Likewise.
263 (delete_lwp_callback): Likewise.
264 (count_events_callback): Likewise.
265 (select_event_lwp_callback): Likewise.
266 (linux_set_resume_request): Likewise.
267 * server.c (accumulate_file_name_length): Likewise.
268 (emit_dll_description): Likewise.
269 (handle_qxfer_threads_worker): Likewise.
270 (visit_actioned_threads): Likewise.
271 * thread-db.c (any_thread_of): Likewise.
272 * tracepoint.c (same_process_p): Likewise.
273 (match_blocktype): Likewise.
274 (build_traceframe_info_xml): Likewise.
275
2762015-09-25 Simon Marchi <simon.marchi@ericsson.com>
277
278 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
279 assignment.
280 (gdb_unparse_agent_expr): Likewise.
281 * hostio.c (require_data): Likewise.
282 (handle_pread): Likewise.
283 * linux-low.c (disable_regset): Likewise.
284 (fetch_register): Likewise.
285 (store_register): Likewise.
286 (get_dynamic): Likewise.
287 (linux_qxfer_libraries_svr4): Likewise.
288 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
289 (set_fast_tracepoint_jump): Likewise.
290 (uninsert_fast_tracepoint_jumps_at): Likewise.
291 (reinsert_fast_tracepoint_jumps_at): Likewise.
292 (validate_inserted_breakpoint): Likewise.
293 (clone_agent_expr): Likewise.
294 * regcache.c (init_register_cache): Likewise.
295 * remote-utils.c (putpkt_binary_1): Likewise.
296 (decode_M_packet): Likewise.
297 (decode_X_packet): Likewise.
298 (look_up_one_symbol): Likewise.
299 (relocate_instruction): Likewise.
300 (monitor_output): Likewise.
301 * server.c (handle_search_memory): Likewise.
302 (handle_qxfer_exec_file): Likewise.
303 (handle_qxfer_libraries): Likewise.
304 (handle_qxfer): Likewise.
305 (handle_query): Likewise.
306 (handle_v_cont): Likewise.
307 (handle_v_run): Likewise.
308 (captured_main): Likewise.
309 * target.c (write_inferior_memory): Likewise.
310 * thread-db.c (try_thread_db_load_from_dir): Likewise.
311 * tracepoint.c (init_trace_buffer): Likewise.
312 (add_tracepoint_action): Likewise.
313 (add_traceframe): Likewise.
314 (add_traceframe_block): Likewise.
315 (cmd_qtdpsrc): Likewise.
316 (cmd_qtdv): Likewise.
317 (cmd_qtstatus): Likewise.
318 (response_source): Likewise.
319 (response_tsv): Likewise.
320 (cmd_qtnotes): Likewise.
321 (gdb_collect): Likewise.
322 (initialize_tracepoint): Likewise.
323
3242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
325
326 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
327 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
328 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
329 <NOP>: New.
330 (enum aarch64_condition_codes): New enum.
331 (w0): New static global.
332 (fp): Likewise.
333 (lr): Likewise.
334 (struct aarch64_memory_operand) <type>: New
335 MEMORY_OPERAND_POSTINDEX type.
336 (postindex_memory_operand): New helper function.
337 (emit_ret): New function.
338 (emit_load_store_pair): New function, factored out of emit_stp
339 with support for MEMORY_OPERAND_POSTINDEX.
340 (emit_stp): Rewrite using emit_load_store_pair.
341 (emit_ldp): New function.
342 (emit_load_store): Likewise.
343 (emit_ldr): Mention post-index instruction in comment.
344 (emit_ldrh): New function.
345 (emit_ldrb): New function.
346 (emit_ldrsw): Mention post-index instruction in comment.
347 (emit_str): Likewise.
348 (emit_subs): New function.
349 (emit_cmp): Likewise.
350 (emit_and): Likewise.
351 (emit_orr): Likewise.
352 (emit_orn): Likewise.
353 (emit_eor): Likewise.
354 (emit_mvn): Likewise.
355 (emit_lslv): Likewise.
356 (emit_lsrv): Likewise.
357 (emit_asrv): Likewise.
358 (emit_mul): Likewise.
359 (emit_sbfm): Likewise.
360 (emit_sbfx): Likewise.
361 (emit_ubfm): Likewise.
362 (emit_ubfx): Likewise.
363 (emit_csinc): Likewise.
364 (emit_cset): Likewise.
365 (emit_nop): Likewise.
366 (emit_ops_insns): New helper function.
367 (emit_pop): Likewise.
368 (emit_push): Likewise.
369 (aarch64_emit_prologue): New function.
370 (aarch64_emit_epilogue): Likewise.
371 (aarch64_emit_add): Likewise.
372 (aarch64_emit_sub): Likewise.
373 (aarch64_emit_mul): Likewise.
374 (aarch64_emit_lsh): Likewise.
375 (aarch64_emit_rsh_signed): Likewise.
376 (aarch64_emit_rsh_unsigned): Likewise.
377 (aarch64_emit_ext): Likewise.
378 (aarch64_emit_log_not): Likewise.
379 (aarch64_emit_bit_and): Likewise.
380 (aarch64_emit_bit_or): Likewise.
381 (aarch64_emit_bit_xor): Likewise.
382 (aarch64_emit_bit_not): Likewise.
383 (aarch64_emit_equal): Likewise.
384 (aarch64_emit_less_signed): Likewise.
385 (aarch64_emit_less_unsigned): Likewise.
386 (aarch64_emit_ref): Likewise.
387 (aarch64_emit_if_goto): Likewise.
388 (aarch64_emit_goto): Likewise.
389 (aarch64_write_goto_address): Likewise.
390 (aarch64_emit_const): Likewise.
391 (aarch64_emit_call): Likewise.
392 (aarch64_emit_reg): Likewise.
393 (aarch64_emit_pop): Likewise.
394 (aarch64_emit_stack_flush): Likewise.
395 (aarch64_emit_zero_ext): Likewise.
396 (aarch64_emit_swap): Likewise.
397 (aarch64_emit_stack_adjust): Likewise.
398 (aarch64_emit_int_call_1): Likewise.
399 (aarch64_emit_void_call_2): Likewise.
400 (aarch64_emit_eq_goto): Likewise.
401 (aarch64_emit_ne_goto): Likewise.
402 (aarch64_emit_lt_goto): Likewise.
403 (aarch64_emit_le_goto): Likewise.
404 (aarch64_emit_gt_goto): Likewise.
405 (aarch64_emit_ge_got): Likewise.
406 (aarch64_emit_ops_impl): New static global variable.
407 (aarch64_emit_ops): New target function, return
408 &aarch64_emit_ops_impl.
409 (struct linux_target_ops): Install it.
410
4112015-09-21 Pierre Langlois <pierre.langlois@arm.com>
412
413 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
414 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
415 aarch64-ipa.o.
416 * linux-aarch64-ipa.c: New file.
417 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
418 and endian.h.
419 (aarch64_get_thread_area): New target method.
420 (extract_signed_bitfield): New helper function.
421 (aarch64_decode_ldr_literal): New function.
422 (enum aarch64_opcodes): New enum.
423 (struct aarch64_register): New struct.
424 (struct aarch64_operand): New struct.
425 (x0): New static global.
426 (x1): Likewise.
427 (x2): Likewise.
428 (x3): Likewise.
429 (x4): Likewise.
430 (w2): Likewise.
431 (ip0): Likewise.
432 (sp): Likewise.
433 (xzr): Likewise.
434 (aarch64_register): New helper function.
435 (register_operand): Likewise.
436 (immediate_operand): Likewise.
437 (struct aarch64_memory_operand): New struct.
438 (offset_memory_operand): New helper function.
439 (preindex_memory_operand): Likewise.
440 (enum aarch64_system_control_registers): New enum.
441 (ENCODE): New macro.
442 (emit_insn): New helper function.
443 (emit_b): New function.
444 (emit_bcond): Likewise.
445 (emit_cb): Likewise.
446 (emit_tb): Likewise.
447 (emit_blr): Likewise.
448 (emit_stp): Likewise.
449 (emit_ldp_q_offset): Likewise.
450 (emit_stp_q_offset): Likewise.
451 (emit_load_store): Likewise.
452 (emit_ldr): Likewise.
453 (emit_ldrsw): Likewise.
454 (emit_str): Likewise.
455 (emit_ldaxr): Likewise.
456 (emit_stxr): Likewise.
457 (emit_stlr): Likewise.
458 (emit_data_processing_reg): Likewise.
459 (emit_data_processing): Likewise.
460 (emit_add): Likewise.
461 (emit_sub): Likewise.
462 (emit_mov): Likewise.
463 (emit_movk): Likewise.
464 (emit_mov_addr): Likewise.
465 (emit_mrs): Likewise.
466 (emit_msr): Likewise.
467 (emit_sevl): Likewise.
468 (emit_wfe): Likewise.
469 (append_insns): Likewise.
470 (can_encode_int32_in): New helper function.
471 (aarch64_relocate_instruction): New function.
472 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
473 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
474 (struct linux_target_ops): Install aarch64_get_thread_area,
475 aarch64_install_fast_tracepoint_jump_pad and
476 aarch64_get_min_fast_tracepoint_insn_len.
477
4782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
479
480 * Makefile.in (aarch64-insn.o): New rule.
481 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
482
4832015-09-21 Yao Qi <yao.qi@linaro.org>
484
485 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
486
4872015-09-21 Yao Qi <yao.qi@linaro.org>
488
489 * tracepoint.c (max_jump_pad_size): Remove.
490
4912015-09-18 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c: Don't include sys/uio.h.
494 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
495
4962015-09-16 Wei-cheng Wang <cole945@gmail.com>
497
498 * tracepoint.c (eval_result_type): Change prototype.
499 (condition_true_at_tracepoint): Fix argument to compiled_cond.
500
5012015-09-15 Pedro Alves <palves@redhat.com>
502
503 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
504 Check whether to report exec events instead of checking whether
505 multiprocess is enabled.
506
5072015-09-15 Pedro Alves <palves@redhat.com>
508
509 PR remote/18965
510 * remote-utils.c (prepare_resume_reply): Merge
511 TARGET_WAITKIND_VFORK_DONE switch case with the
512 TARGET_WAITKIND_FORKED case.
513
5142015-09-15 Yao Qi <yao.qi@linaro.org>
515
516 * server.c (handle_query): Check string comparison using
517 "else if" instead of "if".
518
5192015-09-15 Yao Qi <yao.qi@linaro.org>
520
521 * server.c (vCont_supported): New global variable.
522 (handle_query): Set vCont_supported to 1 if "vContSupported+"
523 matches. Append ";vContSupported+" to own_buf.
524 (handle_v_requests): Append ";s;S" to own_buf if target supports
525 hardware single step or vCont_supported is false.
526 (capture_main): Set vCont_supported to zero.
527
5282015-09-15 Yao Qi <yao.qi@linaro.org>
529
530 * linux-low.c (linux_supports_conditional_breakpoints): Rename
531 it to ...
532 (linux_supports_hardware_single_step): ... New function.
533 (linux_target_ops): Update.
534 * lynx-low.c (lynx_target_ops): Set field
535 supports_hardware_single_step to target_can_do_hardware_single_step.
536 * nto-low.c (nto_target_ops): Likewise.
537 * spu-low.c (spu_target_ops): Likewise.
538 * win32-low.c (win32_target_ops): Likewise.
539 * target.c (target_can_do_hardware_single_step): New function.
540 * target.h (struct target_ops) <supports_conditional_breakpoints>:
541 Remove. <supports_hardware_single_step>: New field.
542 (target_supports_conditional_breakpoints): Remove.
543 (target_supports_hardware_single_step): New macro.
544 (target_can_do_hardware_single_step): Declare.
545 * server.c (handle_query): Use target_supports_hardware_single_step
546 instead of target_supports_conditional_breakpoints.
547
5482015-09-15 Yao Qi <yao.qi@linaro.org>
549
550 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
551 function.
552 (struct linux_target_ops the_low_target): Install
553 aarch64_linux_siginfo_fixup.
554
5552015-09-11 Don Breazeal <donb@codesourcery.com>
556 Luis Machado <lgustavo@codesourcery.com>
557
558 * linux-low.c (linux_mourn): Static declaration.
559 (linux_arch_setup): Move in front of
560 handle_extended_wait.
561 (linux_arch_setup_thread): New function.
562 (handle_extended_wait): Handle exec events. Call
563 linux_arch_setup_thread. Make event_lwp argument a
564 pointer-to-a-pointer.
565 (check_zombie_leaders): Do not check stopped threads.
566 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
567 (linux_low_filter_event): Add lwp and thread for exec'ing
568 non-leader thread if leader thread has been deleted.
569 Refactor code into linux_arch_setup_thread and call it.
570 Pass child lwp pointer by reference to handle_extended_wait.
571 (linux_wait_for_event_filtered): Update comment.
572 (linux_wait_1): Prevent clobbering exec event status.
573 (linux_supports_exec_events): New function.
574 (linux_target_ops) <supports_exec_events>: Initialize new member.
575 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
576 new member.
577 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
578 * server.c (report_exec_events): New global variable.
579 (handle_query): Handle qSupported query for exec-events feature.
580 (captured_main): Initialize report_exec_events.
581 * server.h (report_exec_events): Declare new global variable.
582 * target.h (struct target_ops) <supports_exec_events>: New
583 member.
584 (target_supports_exec_events): New macro.
585 * win32-low.c (win32_target_ops) <supports_exec_events>:
586 Initialize new member.
587
5882015-09-09 Markus Metzger <markus.t.metzger@intel.com>
589
590 * linux-low.c (linux_low_enable_btrace): Remove.
591 (linux_target_ops): Replace linux_low_enable_btrace with
592 linux_enable_btrace.
593
5942015-09-03 Yao Qi <yao.qi@linaro.org>
595
596 * linux-aarch64-low.c (aarch64_insert_point): Call
597 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
598 returns true.
599
6002015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
601
602 * linux-low.c (check_stopped_by_breakpoint): Use
603 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
604
6052015-08-27 Pedro Alves <palves@redhat.com>
606
607 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
608
6092015-08-26 Simon Marchi <simon.marchi@ericsson.com>
610
611 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
612 the XNEW-family equivalent.
613 (compile_bytecodes): Likewise.
614 * dll.c (loaded_dll): Likewise.
615 * event-loop.c (append_callback_event): Likewise.
616 (create_file_handler): Likewise.
617 (create_file_event): Likewise.
618 * hostio.c (handle_open): Likewise.
619 * inferiors.c (add_thread): Likewise.
620 (add_process): Likewise.
621 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
622 * linux-arm-low.c (arm_new_process): Likewise.
623 (arm_new_thread): Likewise.
624 * linux-low.c (add_to_pid_list): Likewise.
625 (linux_add_process): Likewise.
626 (handle_extended_wait): Likewise.
627 (add_lwp): Likewise.
628 (enqueue_one_deferred_signal): Likewise.
629 (enqueue_pending_signal): Likewise.
630 (linux_resume_one_lwp_throw): Likewise.
631 (linux_resume_one_thread): Likewise.
632 (linux_read_memory): Likewise.
633 (linux_write_memory): Likewise.
634 * linux-mips-low.c (mips_linux_new_process): Likewise.
635 (mips_linux_new_thread): Likewise.
636 (mips_add_watchpoint): Likewise.
637 * linux-x86-low.c (initialize_low_arch): Likewise.
638 * lynx-low.c (lynx_add_process): Likewise.
639 * mem-break.c (set_raw_breakpoint_at): Likewise.
640 (set_breakpoint): Likewise.
641 (add_condition_to_breakpoint): Likewise.
642 (add_commands_to_breakpoint): Likewise.
643 (clone_agent_expr): Likewise.
644 (clone_one_breakpoint): Likewise.
645 * regcache.c (new_register_cache): Likewise.
646 * remote-utils.c (look_up_one_symbol): Likewise.
647 * server.c (queue_stop_reply): Likewise.
648 (start_inferior): Likewise.
649 (queue_stop_reply_callback): Likewise.
650 (handle_target_event): Likewise.
651 * spu-low.c (fetch_ppc_memory): Likewise.
652 (store_ppc_memory): Likewise.
653 * target.c (set_target_ops): Likewise.
654 * thread-db.c (thread_db_load_search): Likewise.
655 (try_thread_db_load_1): Likewise.
656 * tracepoint.c (add_tracepoint): Likewise.
657 (add_tracepoint_action): Likewise.
658 (create_trace_state_variable): Likewise.
659 (cmd_qtdpsrc): Likewise.
660 (cmd_qtro): Likewise.
661 (add_while_stepping_state): Likewise.
662 * win32-low.c (child_add_thread): Likewise.
663 (get_image_name): Likewise.
664
6652015-08-25 Yao Qi <yao.qi@linaro.org>
666
667 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
668
6692015-08-25 Yao Qi <yao.qi@linaro.org>
670
671 * Makefile.in (aarch64-linux.o): New rule.
672 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
673 srv_tgtobj.
674 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
675 (aarch64_init_debug_reg_state): Make it extern.
676 (aarch64_linux_prepare_to_resume): Remove.
677
6782015-08-25 Yao Qi <yao.qi@linaro.org>
679
680 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
681 lwp_arch_private_info and ptid_of_lwp.
682
6832015-08-25 Yao Qi <yao.qi@linaro.org>
684
685 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
686 Find proc_info by find_process_pid. All callers updated.
687
6882015-08-25 Yao Qi <yao.qi@linaro.org>
689
690 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
691 Remove.
692 (debug_reg_change_callback): Remove.
693 (aarch64_notify_debug_reg_change): Remove.
694
6952015-08-25 Yao Qi <yao.qi@linaro.org>
696
697 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
698 Call current_lwp_ptid.
699
7002015-08-25 Yao Qi <yao.qi@linaro.org>
701
702 * linux-aarch64-low.c (debug_reg_change_callback): Use
703 debug_printf.
704
7052015-08-25 Yao Qi <yao.qi@linaro.org>
706
707 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
708
7092015-08-25 Yao Qi <yao.qi@linaro.org>
710
711 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
712
7132015-08-25 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
716 the code.
717
7182015-08-25 Yao Qi <yao.qi@linaro.org>
719
720 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
721 Remove.
722 (debug_reg_change_callback): Remove argument entry and add argument
723 lwp. Remove local variable thread. Don't print thread id in the
724 debugging output. Don't check whether pid of thread equals to pid.
725 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
726 iterate_over_lwps instead find_inferior.
727
7282015-08-24 Pedro Alves <palves@redhat.com>
729
730 * inferiors.c (get_first_process): New function.
731 * inferiors.h (get_first_process): New declaration.
732 * remote-utils.c (read_ptid): Default to the first process in the
733 list, instead of to the current thread's process.
734
7352015-08-24 Pedro Alves <palves@redhat.com>
736
737 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
738 * event-loop.c: Likewise.
739 * remote-utils.c: Likewise.
740 * tracepoint.c: Likewise.
741
7422015-08-24 Pedro Alves <palves@redhat.com>
743
744 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
745 ptid_get_lwp.
746
7472015-08-21 Pedro Alves <palves@redhat.com>
748
749 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
750 instead of literal 1.
751
7522015-08-21 Pedro Alves <palves@redhat.com>
753
754 * tdesc.c (default_description): Explicitly zero-initialize.
755
7562015-08-21 Pedro Alves <palves@redhat.com>
757
758 PR gdb/18749
759 * inferiors.c (remove_thread): Discard any pending stop reply for
760 this thread.
761 * server.c (remove_all_on_match_pid): Rename to ...
762 (remove_all_on_match_ptid): ... this. Work with a filter ptid
763 instead of a pid.
764 (discard_queued_stop_replies): Change parameter to a ptid. Now
765 extern.
766 (handle_v_kill, kill_inferior_callback, captured_main)
767 (process_serial_event): Adjust.
768 * server.h (discard_queued_stop_replies): Declare.
769
7702015-08-21 Pedro Alves <palves@redhat.com>
771
772 * linux-low.c (wait_for_sigstop): Always switch to no thread
773 selected if the previously current thread dies.
774 * lynx-low.c (lynx_request_interrupt): Use the first thread's
775 process instead of the current thread's.
776 * remote-utils.c (input_interrupt): Don't check if there's no
777 current thread.
778 * server.c (gdb_read_memory, gdb_write_memory): If setting the
779 current thread to the general thread fails, error out.
780 (handle_qxfer_auxv, handle_qxfer_libraries)
781 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
782 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
783 (handle_query): Check if there's a thread selected instead of
784 checking whether there's any thread in the thread list.
785 (handle_qxfer_threads, handle_qxfer_btrace)
786 (handle_qxfer_btrace_conf): Don't error out early if there's no
787 thread in the thread list.
788 (handle_v_cont, myresume): Don't set the current thread to the
789 continue thread.
790 (process_serial_event) <Hg handling>: Also set thread_id if the
791 previous general thread is still alive.
792 (process_serial_event) <g/G handling>: If setting the current
793 thread to the general thread fails, error out.
794 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
795 thread's lwp instead of the current thread's.
796 * target.c (set_desired_thread): If the desired thread was not
797 found, leave the current thread pointing to NULL. Return an int
798 (boolean) indicating success.
799 * target.h (set_desired_thread): Change return type to int.
800
8012015-08-20 Max Filippov <jcmvbkbc@gmail.com>
802
803 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
804 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
805 #includes.
806 (ps_get_thread_area): New function.
807
8082015-08-19 Gary Benson <gbenson@redhat.com>
809
810 * hostio.c (handle_pread): Do not attempt to read more data
811 than hostio_reply_with_data can fit in a packet.
812
8132015-08-18 Joel Brobecker <brobecker@adacore.com>
814
815 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
816
8172015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
818
819 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
820
8212015-08-06 Pedro Alves <palves@redhat.com>
822
823 * tracepoint.c (expr_eval_result): Now an int.
824
8252015-08-06 Pedro Alves <palves@redhat.com>
826
827 * gdbthread.h (struct regcache): Forward declare.
828 (struct thread_info) <regcache_data>: Now a struct regcache
829 pointer.
830 * inferiors.c (inferior_regcache_data)
831 (set_inferior_regcache_data): Now work with struct regcache
832 pointers.
833 * inferiors.h (struct regcache): Forward declare.
834 (inferior_regcache_data, set_inferior_regcache_data): Now work
835 with struct regcache pointers.
836 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
837 (free_register_cache_thread): Remove struct regcache pointer
838 casts.
839
8402015-08-06 Pedro Alves <palves@redhat.com>
841
842 * server.c (captured_main): On error, print the exception message
843 to stderr, and if run_once is set, throw a quit.
844
8452015-08-06 Pedro Alves <palves@redhat.com>
846
847 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
848 the current thread.
849
8502015-08-06 Pedro Alves <palves@redhat.com>
851
852 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
853 reading beyond the passed in buffer length.
854
8552015-08-06 Pierre Langlois <pierre.langlois@arm.com>
856
857 * tracepoint.c (symbol_list) <required>: Remove.
858
8592015-08-06 Pedro Alves <palves@redhat.com>
860
861 * linux-low.c (handle_extended_wait): Set the fork child's suspend
862 count if stopping and suspending threads.
863 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
864 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
865 (linux_detach): Complete an ongoing step-over.
866 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
867 throughout.
868 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
869 (linux_wait_1): If passing a signal to the inferior after
870 finishing a step-over, unsuspend and re-resume all lwps. If we
871 see a single-step event but the thread should be continuing, don't
872 pass the trap to gdb.
873 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
874 internal_error instead of gdb_assert.
875 (enqueue_pending_signal): New function.
876 (check_ptrace_stopped_lwp_gone): Add debug output.
877 (start_step_over): Use internal_error instead of gdb_assert.
878 (complete_ongoing_step_over): New function.
879 (linux_resume_one_thread): Don't resume a suspended thread.
880 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
881 it stepping.
882
8832015-08-06 Pedro Alves <palves@redhat.com>
884
885 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
886 (linux_thread_alive): Use lwp_is_marked_dead.
887 (extended_event_reported): Delete.
888 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
889 instead of extended_event_reported.
890 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
891 as well.
892 (lwp_is_marked_dead): New function.
893 (lwp_running): Use lwp_is_marked_dead.
894 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
895 comment.
896
8972015-08-06 Pedro Alves <palves@redhat.com>
898
899 * linux-low.c (linux_wait_1): Move fork event output out of the
900 !report_to_gdb check. Pass event_child->waitstatus to
901 target_waitstatus_to_string instead of ourstatus.
902
9032015-08-04 Yao Qi <yao.qi@linaro.org>
904
905 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
906 if current_thread is 32 bit.
907
9082015-08-04 Yao Qi <yao.qi@linaro.org>
909
910 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
911 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
912 * server.c (extended_protocol): Remove "static".
913 * server.h (extended_protocol): Declare it.
914
9152015-08-04 Yao Qi <yao.qi@linaro.org>
916
917 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
918 both aarch64 and aarch32.
919 (aarch64_set_pc): Likewise.
920
9212015-08-04 Yao Qi <yao.qi@linaro.org>
922
923 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
924 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
925 arm-with-neon.xml to srv_xmlfiles.
926 * linux-aarch64-low.c: Include linux-aarch32-low.h.
927 (is_64bit_tdesc): New function.
928 (aarch64_linux_read_description): New function.
929 (aarch64_arch_setup): Call aarch64_linux_read_description.
930 (regs_info): Rename to regs_info_aarch64.
931 (aarch64_regs_info): Return right regs_info.
932 (initialize_low_arch): Call initialize_low_arch_aarch32.
933
9342015-08-04 Yao Qi <yao.qi@linaro.org>
935
936 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
937 * linux-aarch32-low.c: New file.
938 * linux-aarch32-low.h: New file.
939 * linux-arm-low.c (arm_fill_gregset): Move it to
940 linux-aarch32-low.c.
941 (arm_store_gregset): Likewise.
942 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
943 (arm_store_vfpregset): Call arm_store_vfpregset_num.
944 (arm_arch_setup): Check if PTRACE_GETREGSET works.
945 (regs_info): Rename to regs_info_arm.
946 (arm_regs_info): Return regs_info_aarch32 if
947 have_ptrace_getregset is 1 and target description is
948 arm_with_neon or arm_with_vfpv3.
949 (initialize_low_arch): Don't call init_registers_arm_with_neon.
950 Call initialize_low_arch_aarch32 instead.
951
9522015-08-04 Yao Qi <yao.qi@linaro.org>
953
954 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
955 * linux-low.c: ... here.
956 * linux-low.h (have_ptrace_getregset): Declare it.
957
9582015-08-04 Pedro Alves <palves@redhat.com>
959
960 * thread-db.c (struct thread_db): Use new typedefs.
961 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
962 CHK calls.
963 (disable_thread_event_reporting): Cast result of dlsym to
964 destination function pointer type.
965 (thread_db_mourn): Use td_ta_delete_ftype.
966
9672015-08-03 Sandra Loosemore <sandra@codesourcery.com>
968
969 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
970 arch variant.
971 (CDX_BREAKPOINT): Define for R2.
972 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
973 (the_low_target): Add comments.
974
9752015-07-30 Yao Qi <yao.qi@linaro.org>
976
977 * linux-arm-low.c (arm_hwcap): Remove it.
978 (arm_read_description): New local variable arm_hwcap. Don't
979 set arm_hwcap to zero.
980
9812015-07-30 Yao Qi <yao.qi@linaro.org>
982
983 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
984 Use regcache->tdesc instead.
985 (arm_store_wmmxregset): Likewise.
986 (arm_fill_vfpregset): Likewise.
987 (arm_store_vfpregset): Likewise.
988
9892015-07-30 Yao Qi <yao.qi@linaro.org>
990
991 * linux-arm-low.c: Include arch/arm.h.
992 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
993 (arm_store_gregset): Likewise.
994
9952015-07-29 Simon Marchi <simon.marchi@ericsson.com>
996
997 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
998 ptrace's 4th parameter.
999
10002015-07-27 Yao Qi <yao.qi@linaro.org>
1001
1002 * configure.srv (case aarch64*-*-linux*): Don't set
1003 srv_linux_usrregs.
1004
10052015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1006
1007 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1008 sys/ptrace.h.
1009 * linux-arm-low.c: Likewise.
1010 * linux-cris-low.c: Likewise.
1011 * linux-crisv32-low.c: Likewise.
1012 * linux-low.c: Likewise.
1013 * linux-m68k-low.c: Likewise.
1014 * linux-mips-low.c: Likewise.
1015 * linux-nios2-low.c: Likewise.
1016 * linux-s390-low.c: Likewise.
1017 * linux-sparc-low.c: Likewise.
1018 * linux-tic6x-low.c: Likewise.
1019 * linux-tile-low.c: Likewise.
1020 * linux-x86-low.c: Likewise.
1021
10222015-07-24 Pedro Alves <palves@redhat.com>
1023
1024 * config.in: Regenerate.
1025 * configure: Regenerate.
1026
10272015-07-24 Pedro Alves <palves@redhat.com>
1028
1029 * acinclude.m4: Include ../ptrace.m4.
1030 * configure.ac: Call GDB_AC_PTRACE.
1031 * config.in, configure: Regenerate.
1032
10332015-07-24 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-low.c (linux_create_inferior): Remove setting to
1036 proc->priv->new_inferior.
1037 (linux_attach): Likewise.
1038 (linux_low_filter_event): Likewise.
1039 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1040
10412015-07-24 Yao Qi <yao.qi@linaro.org>
1042
1043 * linux-low.c (linux_arch_setup): New function.
1044 (linux_low_filter_event): If proc->tdesc is NULL and
1045 proc->attached is true, call the_low_target.arch_setup.
1046 Otherwise, keep status pending, and return.
1047 (linux_resume_one_lwp_throw): Don't call get_pc if
1048 thread->while_stepping isn't NULL. Don't call
1049 get_thread_regcache if proc->tdesc is NULL.
1050 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1051 (linux_target_ops): Install arch_setup.
1052 * server.c (start_inferior): Call the_target->arch_setup.
1053 * target.h (struct target_ops) <arch_setup>: New field.
1054 (target_arch_setup): New marco.
1055 * lynx-low.c (lynx_target_ops): Update.
1056 * nto-low.c (nto_target_ops): Update.
1057 * spu-low.c (spu_target_ops): Update.
1058 * win32-low.c (win32_target_ops): Update.
1059
10602015-07-24 Yao Qi <yao.qi@linaro.org>
1061
1062 * linux-low.c (linux_add_process): Don't set
1063 proc->priv->new_inferior.
1064 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1065 (linux_attach): Likewise.
1066
10672015-07-24 Yao Qi <yao.qi@linaro.org>
1068
1069 * server.c (start_inferior): Code refactor.
1070
10712015-07-24 Yao Qi <yao.qi@linaro.org>
1072
1073 * server.c (process_serial_event): Set general_thread.
1074
10752015-07-21 Yao Qi <yao.qi@linaro.org>
1076
1077 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1078 aarch64_linux_get_debug_reg_capacity.
1079
10802015-07-17 Yao Qi <yao.qi@linaro.org>
1081
1082 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1083 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1084 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1085 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1086 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1087 (AARCH64_HWP_ALIGNMENT): Likewise.
1088 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1089 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1090 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1091 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1092 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1093 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1094 (struct aarch64_debug_reg_state): Likewise.
1095 (struct arch_lwp_info): Likewise.
1096 (aarch64_align_watchpoint): Likewise.
1097 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1098 (aarch64_watchpoint_length): Likewise.
1099 (aarch64_point_encode_ctrl_reg): Likewise
1100 (aarch64_point_is_aligned): Likewise.
1101 (aarch64_align_watchpoint): Likewise.
1102 (aarch64_linux_set_debug_regs):
1103 (aarch64_dr_state_insert_one_point): Likewise.
1104 (aarch64_dr_state_remove_one_point): Likewise.
1105 (aarch64_handle_breakpoint): Likewise.
1106 (aarch64_handle_aligned_watchpoint): Likewise.
1107 (aarch64_handle_unaligned_watchpoint): Likewise.
1108 (aarch64_handle_watchpoint): Likewise.
1109
11102015-07-17 Yao Qi <yao.qi@linaro.org>
1111
1112 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1113 and don't aarch64_get_debug_reg_state. All callers update.
1114 (aarch64_handle_aligned_watchpoint): Likewise.
1115 (aarch64_handle_unaligned_watchpoint): Likewise.
1116 (aarch64_handle_watchpoint): Likewise.
1117 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1118 (aarch64_remove_point): Likewise.
1119
11202015-07-17 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1123 debug_printf.
1124 (aarch64_handle_unaligned_watchpoint): Likewise.
1125
11262015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1127
1128 Revert the previous 3 commits:
1129 Move gdb_regex* to common/
1130 Move linux_find_memory_regions_full & co.
1131 gdbserver build-id attribute generator
1132
11332015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1134 Jan Kratochvil <jan.kratochvil@redhat.com>
1135
1136 gdbserver build-id attribute generator.
1137 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1138 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1139 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1140 (find_phdr): New.
1141 (get_dynamic): Use find_pdhr to traverse program headers.
1142 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1143 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1144 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1145 (get_hex_build_id): New.
1146 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1147 to reply XML document.
1148
11492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1150 Jan Kratochvil <jan.kratochvil@redhat.com>
1151
1152 * target.c: Include target/target-utils.h and fcntl.h.
1153 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1154 (target_fileio_read_stralloc): New functions.
1155
11562015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1157
1158 * Makefile.in (OBS): Add gdb_regex.o.
1159 (gdb_regex.o): New.
1160 * config.in: Rebuilt.
1161 * configure: Rebuilt.
1162
11632015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1164 Jan Kratochvil <jan.kratochvil@redhat.com>
1165
1166 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1167 * Makefile.in (OBS): Add target-utils.o.
1168 (linux-maps.o, target-utils.o): New.
1169 * configure.srv (srv_linux_obj): Add linux-maps.o.
1170
11712015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1172
1173 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1174 function, return 1.
1175 (the_low_target): Install it.
1176
11772015-07-14 Pedro Alves <palves@redhat.com>
1178
1179 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1180 Instead, ignore ECHILD, and throw an error for other errnos.
1181
11822015-07-10 Pedro Alves <palves@redhat.com>
1183
1184 * event-loop.c (struct callback_event) <data>: Change type to
1185 gdb_client_data instance instead of gdb_client_data pointer.
1186 (append_callback_event): Adjust.
1187
11882015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1189
1190 * linux-aarch64-low.c: Add comments for each linux_target_ops
1191 method. Remove comments already covered in target_ops and
1192 linux_target_ops definitions.
1193 (the_low_target): Add comments for each unimplemented method.
1194
11952015-07-09 Yao Qi <yao.qi@linaro.org>
1196
1197 * linux-aarch64-low.c (aarch64_regmap): Remove.
1198 (aarch64_usrregs_info): Remove.
1199 (regs_info): Set field usrregs to NULL.
1200
12012015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1202
1203 * linux-low.c: Include "rsp-low.h"
1204 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1205 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1206 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1207 (handle_btrace_enable_pt): New.
1208 (handle_btrace_general_set): Support "pt".
1209 (handle_btrace_conf_general_set): Support "pt:size".
1210
12112015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1212
1213 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1214 Z_PACKET_SW_BP.
1215
12162015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1217
1218 * linux-aarch64-low.c: Remove comment about endianness.
1219 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1220 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1221 memcmp.
1222
12232015-06-24 Gary Benson <gbenson@redhat.com>
1224
1225 * linux-i386-ipa.c (stdint.h): Do not include.
1226 * lynx-i386-low.c (stdint.h): Likewise.
1227 * lynx-ppc-low.c (stdint.h): Likewise.
1228 * mem-break.c (stdint.h): Likewise.
1229 * thread-db.c (stdint.h): Likewise.
1230 * tracepoint.c (stdint.h): Likewise.
1231 * win32-low.c (stdint.h): Likewise.
1232
12332015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1234
1235 * server.c (write_qxfer_response): Update call to
1236 remote_escape_output.
1237
12382015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1239 Jan Kratochvil <jan.kratochvil@redhat.com>
1240
1241 Merge multiple hex conversions.
1242 * gdbreplay.c (tohex): Rename to 'fromhex'.
1243 (logchar): Use fromhex.
1244
12452015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1246
1247 * server.c (handle_qxfer_libraries): Set `version' attribute for
1248 <library-list>.
1249
12502015-06-10 Gary Benson <gbenson@redhat.com>
1251
1252 * target.h (struct target_ops) <multifs_open>: New field.
1253 <multifs_unlink>: Likewise.
1254 <multifs_readlink>: Likewise.
1255 * linux-low.c (nat/linux-namespaces.h): New include.
1256 (linux_target_ops): Initialize the_target->multifs_open,
1257 the_target->multifs_unlink and the_target->multifs_readlink.
1258 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1259 * hostio.c (hostio_fs_pid): New static variable.
1260 (hostio_handle_new_gdb_connection): New function.
1261 (handle_setfs): Likewise.
1262 (handle_open): Use the_target->multifs_open as appropriate.
1263 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1264 (handle_readlink): Use the_target->multifs_readlink as
1265 appropriate.
1266 (handle_vFile): Handle vFile:setfs packets.
1267 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1268 after target_handle_new_gdb_connection.
1269
12702015-06-10 Gary Benson <gbenson@redhat.com>
1271
1272 * configure.ac (AC_CHECK_FUNCS): Add setns.
1273 * config.in: Regenerate.
1274 * configure: Likewise.
1275 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1276 (linux-namespaces.o): New rule.
1277 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1278
12792015-06-09 Gary Benson <gbenson@redhat.com>
1280
1281 * hostio.c (handle_open): Process mode argument with
1282 fileio_to_host_mode.
1283
12842015-06-01 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1287 * linux-x86-low.c: Likewise.
1288
12892015-05-28 Don Breazeal <donb@codesourcery.com>
1290
1291 * linux-low.c (handle_extended_wait): Initialize
1292 thread_info.last_resume_kind for new fork children.
1293
12942015-05-15 Pedro Alves <palves@redhat.com>
1295
1296 * target.h (target_handle_new_gdb_connection): Rewrite using if
1297 wrapped in do/while.
1298
12992015-05-14 Joel Brobecker <brobecker@adacore.com>
1300
1301 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1302 * configure, config.in: Regenerate.
1303 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1304 Declare typedef.
1305
13062015-05-12 Don Breazeal <donb@codesourcery.com>
1307
1308 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1309 PTRACE_EVENT_VFORK_DONE.
1310 (linux_low_ptrace_options, extended_event_reported): Add vfork
1311 events.
1312 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1313 and "vforkdone" for RSP 'T' Stop Reply Packet.
1314 * server.h (report_vfork_events): Declare
1315 global variable.
1316
13172015-05-12 Don Breazeal <donb@codesourcery.com>
1318
1319 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1320 (the_low_target) <new_fork>: Initialize new member.
1321 * linux-arm-low.c (arm_new_fork): New function.
1322 (the_low_target) <new_fork>: Initialize new member.
1323 * linux-low.c (handle_extended_wait): Call new target function
1324 new_fork.
1325 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1326 * linux-mips-low.c (mips_add_watchpoint): New function
1327 extracted from mips_insert_point.
1328 (the_low_target) <new_fork>: Initialize new member.
1329 (mips_linux_new_fork): New function.
1330 (mips_insert_point): Call mips_add_watchpoint.
1331 * linux-x86-low.c (x86_linux_new_fork): New function.
1332 (the_low_target) <new_fork>: Initialize new member.
1333
13342015-05-12 Don Breazeal <donb@codesourcery.com>
1335
1336 * linux-low.c (handle_extended_wait): Implement return value,
1337 rename argument 'event_child' to 'event_lwp', handle
1338 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1339 (linux_low_ptrace_options): New function.
1340 (linux_low_filter_event): Call linux_low_ptrace_options,
1341 use different argument fo linux_enable_event_reporting,
1342 use return value from handle_extended_wait.
1343 (extended_event_reported): New function.
1344 (linux_wait_1): Call extended_event_reported and set
1345 status to report fork events.
1346 (linux_write_memory): Add pid to debug message.
1347 (reset_lwp_ptrace_options_callback): New function.
1348 (linux_handle_new_gdb_connection): New function.
1349 (linux_target_ops): Initialize new structure member.
1350 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1351 * lynx-low.c: Initialize new structure member.
1352 * remote-utils.c (prepare_resume_reply): Implement stop reason
1353 "fork" for "T" stop message.
1354 * server.c (handle_query): Call handle_new_gdb_connection.
1355 * server.h (report_fork_events): Declare global flag.
1356 * target.h (struct target_ops) <handle_new_gdb_connection>:
1357 New member.
1358 (target_handle_new_gdb_connection): New macro.
1359 * win32-low.c: Initialize new structure member.
1360
13612015-05-12 Don Breazeal <donb@codesourcery.com>
1362
1363 * mem-break.c (APPEND_TO_LIST): Define macro.
1364 (clone_agent_expr): New function.
1365 (clone_one_breakpoint): New function.
1366 (clone_all_breakpoints): New function.
1367 * mem-break.h: Declare new functions.
1368
13692015-05-12 Don Breazeal <donb@codesourcery.com>
1370
1371 * linux-low.c (linux_supports_fork_events): New function.
1372 (linux_supports_vfork_events): New function.
1373 (linux_target_ops): Initialize new structure members.
1374 (initialize_low): Call linux_check_ptrace_features.
1375 * lynx-low.c (lynx_target_ops): Initialize new structure
1376 members.
1377 * server.c (report_fork_events, report_vfork_events):
1378 New global flags.
1379 (handle_query): Add new features to qSupported packet and
1380 response.
1381 (captured_main): Initialize new global variables.
1382 * target.h (struct target_ops) <supports_fork_events>:
1383 New member.
1384 <supports_vfork_events>: New member.
1385 (target_supports_fork_events): New macro.
1386 (target_supports_vfork_events): New macro.
1387 * win32-low.c (win32_target_ops): Initialize new structure
1388 members.
1389
13902015-05-12 Gary Benson <gbenson@redhat.com>
1391
1392 * server.c (handle_qxfer_exec_file): Use current process
1393 if annex is empty.
1394
13952015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1396
1397 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1398 Remove HAVE_PTRACE_GETREGS conditionals.
1399 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1400 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1401
14022015-05-08 Yao Qi <yao.qi@linaro.org>
1403
1404 * linux-low.c (linux_supports_conditional_breakpoints): New
1405 function.
1406 (linux_target_ops): Install new target method.
1407 * lynx-low.c (lynx_target_ops): Install NULL hook for
1408 supports_conditional_breakpoints.
1409 * nto-low.c (nto_target_ops): Likewise.
1410 * spu-low.c (spu_target_ops): Likewise.
1411 * win32-low.c (win32_target_ops): Likewise.
1412 * server.c (handle_query): Check
1413 target_supports_conditional_breakpoints.
1414 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1415 New field.
1416 (target_supports_conditional_breakpoints): New macro.
1417
14182015-05-06 Pedro Alves <palves@redhat.com>
1419
1420 PR server/18081
1421 * server.c (start_inferior): If the process exits, mourn it.
1422
14232015-04-21 Gary Benson <gbenson@redhat.com>
1424
1425 * hostio.c (fileio_open_flags_to_host): Factored out to
1426 fileio_to_host_openflags in common/fileio.c. Single use
1427 updated.
1428
14292015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1430
1431 * linux-xtensa-low.c (xtensa_fill_gregset)
1432 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1433 XCHAL_HAVE_LOOP.
1434
14352015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1436
1437 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1438 (regs_info): Replace usrregs pointer with NULL.
1439
14402015-04-17 Gary Benson <gbenson@redhat.com>
1441
1442 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1443 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1444 * server.c (handle_qxfer_exec_file): New function.
1445 (qxfer_packets): Add exec-file entry.
1446 (handle_query): Report qXfer:exec-file:read as supported packet.
1447
14482015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1449
1450 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1451
14522015-04-09 Gary Benson <gbenson@redhat.com>
1453
1454 * hostio-errno.c (errno_to_fileio_error): Remove function.
1455 Update caller to use remote_fileio_to_fio_error.
1456
14572015-04-09 Yao Qi <yao.qi@linaro.org>
1458
1459 * linux-low.c (linux_insert_point): Call
1460 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1461 (linux_remove_point): Call remove_memory_breakpoint if type is
1462 raw_bkpt_type_sw.
1463 * linux-x86-low.c (x86_insert_point): Don't call
1464 insert_memory_breakpoint.
1465 (x86_remove_point): Don't call remove_memory_breakpoint.
1466
14672015-04-01 Pedro Alves <palves@redhat.com>
1468 Cleber Rosa <crosa@redhat.com>
1469
1470 * server.c (gdbserver_usage): Reorganize and extend the usage
1471 message.
1472
14732015-03-24 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1476 output. Also dump TRAP_TRACE.
1477 (linux_low_filter_event): In debug output, distinguish a
1478 resume_stop SIGSTOP from a delayed SIGSTOP.
1479
14802015-03-24 Gary Benson <gbenson@redhat.com>
1481
1482 * linux-x86-low.c (x86_linux_new_thread): Moved to
1483 nat/x86-linux.c.
1484 (x86_linux_prepare_to_resume): Likewise.
1485
14862015-03-24 Gary Benson <gbenson@redhat.com>
1487
1488 * Makefile.in (x86-linux-dregs.o): New rule.
1489 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1490 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1491 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1492 (x86_linux_dr_get): Likewise.
1493 (x86_linux_dr_set): Likewise.
1494 (update_debug_registers_callback): Likewise.
1495 (x86_linux_dr_set_addr): Likewise.
1496 (x86_linux_dr_get_addr): Likewise.
1497 (x86_linux_dr_set_control): Likewise.
1498 (x86_linux_dr_get_control): Likewise.
1499 (x86_linux_dr_get_status): Likewise.
1500 (x86_linux_update_debug_registers): Likewise.
1501
15022015-03-24 Gary Benson <gbenson@redhat.com>
1503
1504 * linux-x86-low.c (x86_linux_update_debug_registers):
1505 New function, factored out from...
1506 (x86_linux_prepare_to_resume): ...this.
1507
15082015-03-24 Gary Benson <gbenson@redhat.com>
1509
1510 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1511 (x86_linux_dr_set): Likewise.
1512 (update_debug_registers_callback): Likewise.
1513 (x86_linux_dr_set_addr): Likewise.
1514 (x86_linux_dr_get_addr): Likewise.
1515 (x86_linux_dr_set_control): Likewise.
1516 (x86_linux_dr_get_control): Likewise.
1517 (x86_linux_dr_get_status): Likewise.
1518 (x86_linux_prepare_to_resume): Likewise.
1519
15202015-03-24 Gary Benson <gbenson@redhat.com>
1521
1522 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1523 Use perror_with_name. Pass string through gettext.
1524 (x86_linux_dr_set): Likewise.
1525
15262015-03-24 Gary Benson <gbenson@redhat.com>
1527
1528 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1529 (x86_linux_dr_set_addr): ...this.
1530 (x86_dr_low_get_addr): Rename to...
1531 (x86_linux_dr_get_addr): ...this.
1532 (x86_dr_low_set_control): Rename to...
1533 (x86_linux_dr_set_control): ...this.
1534 (x86_dr_low_get_control): Rename to...
1535 (x86_linux_dr_get_control): ...this.
1536 (x86_dr_low_get_status): Rename to...
1537 (x86_linux_dr_get_status): ...this.
1538 (x86_dr_low): Update with new function names.
1539
15402015-03-24 Gary Benson <gbenson@redhat.com>
1541
1542 * Makefile.in (x86-linux.o): New rule.
1543 * configure.srv: Add x86-linux.o to relevant targets.
1544 * linux-low.c (lwp_set_arch_private_info): New function.
1545 (lwp_arch_private_info): Likewise.
1546 * linux-x86-low.c: Include nat/x86-linux.h.
1547 (arch_lwp_info): Removed structure.
1548 (update_debug_registers_callback):
1549 Use lwp_set_debug_registers_changed.
1550 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1551 and lwp_set_debug_registers_changed.
1552 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1553
15542015-03-24 Gary Benson <gbenson@redhat.com>
1555
1556 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1557 * linux-arm-low.c (arm_new_thread): Likewise.
1558 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1559 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1560 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1561 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1562
15632015-03-24 Gary Benson <gbenson@redhat.com>
1564
1565 * linux-low.c (ptid_of_lwp): New function.
1566 (lwp_is_stopped): Likewise.
1567 (lwp_stop_reason): Likewise.
1568 * linux-x86-low.c (update_debug_registers_callback):
1569 Use lwp_is_stopped.
1570 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1571 lwp_stop_reason.
1572
15732015-03-24 Gary Benson <gbenson@redhat.com>
1574
1575 * linux-low.h (linux_stop_lwp): Remove declaration.
1576
15772015-03-24 Gary Benson <gbenson@redhat.com>
1578
1579 * linux-low.h: Include nat/linux-nat.h.
1580 * linux-low.c (iterate_over_lwps_args): New structure.
1581 (iterate_over_lwps_filter): New function.
1582 (iterate_over_lwps): Likewise.
1583 * linux-x86-low.c (update_debug_registers_callback):
1584 Update signature to what iterate_over_lwps expects.
1585 Remove PID check that iterate_over_lwps now performs.
1586 (x86_dr_low_set_addr): Use iterate_over_lwps.
1587 (x86_dr_low_set_control): Likewise.
1588
15892015-03-24 Gary Benson <gbenson@redhat.com>
1590
1591 * linux-x86-low.c (x86_debug_reg_state): New function.
1592 (x86_linux_prepare_to_resume): Use the above.
1593
15942015-03-24 Gary Benson <gbenson@redhat.com>
1595
1596 * linux-low.c (current_lwp_ptid): New function.
1597 * linux-x86-low.c: Include nat/linux-nat.h.
1598 (x86_dr_low_get_addr): Use current_lwp_ptid.
1599 (x86_dr_low_get_control): Likewise.
1600 (x86_dr_low_get_status): Likewise.
1601
16022015-03-20 Pedro Alves <palves@redhat.com>
1603
1604 * tracepoint.c (cmd_qtstatus): Make "str" const.
1605
16062015-03-20 Pedro Alves <palves@redhat.com>
1607
1608 * server.c (handle_general_set): Make "req_str" const.
1609
16102015-03-19 Pedro Alves <palves@redhat.com>
1611
1612 * linux-low.c (linux_resume_one_lwp): Rename to ...
1613 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1614 instead call perror_with_name.
1615 (check_ptrace_stopped_lwp_gone): New function.
1616 (linux_resume_one_lwp): Reimplement as wrapper around
1617 linux_resume_one_lwp_throw that swallows errors if the LWP is
1618 gone.
1619
16202015-03-19 Pedro Alves <palves@redhat.com>
1621
1622 * linux-low.c (count_events_callback, select_event_lwp_callback):
1623 No longer check whether the thread has resume_stop as last resume
1624 kind.
1625
16262015-03-19 Pedro Alves <palves@redhat.com>
1627
1628 * linux-low.c (count_events_callback, select_event_lwp_callback):
1629 Use the lwp's status_pending_p field, not the thread's.
1630
16312015-03-19 Pedro Alves <palves@redhat.com>
1632
1633 * linux-low.c (select_event_lwp_callback): Update comments to
1634 no longer mention SIGTRAP.
1635
16362015-03-18 Gary Benson <gbenson@redhat.com>
1637
1638 * server.c (handle_query): Do not report vFile:fstat as supported.
1639
16402015-03-11 Gary Benson <gbenson@redhat.com>
1641
1642 * hostio.c (sys/types.h): New include.
1643 (sys/stat.h): Likewise.
1644 (common-remote-fileio.h): Likewise.
1645 (handle_fstat): New function.
1646 (handle_vFile): Handle vFile:fstat packets.
1647
16482015-03-11 Gary Benson <gbenson@redhat.com>
1649
1650 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1651 struct stat.st_blocks and struct stat.st_blksize.
1652 * configure: Regenerate.
1653 * config.in: Likewise.
1654 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1655 (OBS): Add common-remote-fileio.o.
1656 (common-remote-fileio.o): New rule.
1657
16582015-03-09 Pedro Alves <palves@redhat.com>
1659
1660 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1661 'struct sockaddr' pointer in 'accept' call.
1662
16632015-03-09 Pedro Alves <palves@redhat.com>
1664
1665 Revert:
1666 2015-03-07 Pedro Alves <palves@redhat.com>
1667 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1668 or <winsock2.h> here. Instead include "gdb_socket.h".
1669 (remote_open): Use union gdb_sockaddr_u.
1670 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1671 or <winsock2.h> here. Instead include "gdb_socket.h".
1672 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1673 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1674 or <sys/un.h>.
1675 (init_named_socket, gdb_agent_helper_thread): Use union
1676 gdb_sockaddr_u.
1677
16782015-03-07 Pedro Alves <palves@redhat.com>
1679
1680 * configure.ac (build_warnings): Move
1681 -Wdeclaration-after-statement to the C-specific set.
1682 * configure: Regenerate.
1683
16842015-03-07 Pedro Alves <palves@redhat.com>
1685
1686 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1687 or <winsock2.h> here. Instead include "gdb_socket.h".
1688 (remote_open): Use union gdb_sockaddr_u.
1689 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1690 or <winsock2.h> here. Instead include "gdb_socket.h".
1691 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1692 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1693 or <sys/un.h>.
1694 (init_named_socket, gdb_agent_helper_thread): Use union
1695 gdb_sockaddr_u.
1696
16972015-03-07 Pedro Alves <palves@redhat.com>
1698
1699 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1700 instead.
1701
17022015-03-06 Yao Qi <yao.qi@linaro.org>
1703
1704 * linux-aarch64-low.c (aarch64_insert_point): Use
1705 show_debug_regs as a boolean.
1706 (aarch64_remove_point): Likewise.
1707
17082015-03-05 Pedro Alves <palves@redhat.com>
1709
1710 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1711 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1712 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1713 * nto-low.c (nto_target_ops): Likewise.
1714 * spu-low.c (spu_target_ops): Likewise.
1715 * win32-low.c (win32_target_ops): Likewise.
1716
17172015-03-04 Pedro Alves <palves@redhat.com>
1718
1719 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1720 Decide whether a breakpoint triggered based on the SIGTRAP's
1721 siginfo.si_code.
1722 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1723 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1724 (linux_low_filter_event): Check for breakpoints before checking
1725 watchpoints.
1726 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1727 siginfo.si_code.
1728 (linux_stopped_by_sw_breakpoint)
1729 (linux_supports_stopped_by_sw_breakpoint)
1730 (linux_stopped_by_hw_breakpoint)
1731 (linux_supports_stopped_by_hw_breakpoint): New functions.
1732 (linux_target_ops): Install new target methods.
1733
17342015-03-04 Pedro Alves <palves@redhat.com>
1735
1736 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1737 * server.c (swbreak_feature, hwbreak_feature): New globals.
1738 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1739 (captured_main): Clear swbreak_feature and hwbreak_feature.
1740 * server.h (swbreak_feature, hwbreak_feature): Declare.
1741 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1742 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1743 supports_stopped_by_hw_breakpoint>: New fields.
1744 (target_supports_stopped_by_sw_breakpoint)
1745 (target_stopped_by_sw_breakpoint)
1746 (target_supports_stopped_by_hw_breakpoint)
1747 (target_stopped_by_hw_breakpoint): Declare.
1748
17492015-03-04 Pedro Alves <palves@redhat.com>
1750
1751 enum lwp_stop_reason -> enum target_stop_reason
1752 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1753 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1754 (linux_wait_1, stuck_in_jump_pad_callback)
1755 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1756 (linux_stopped_by_watchpoint):
1757 * linux-low.h (enum lwp_stop_reason): Delete.
1758 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1759 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1760
17612015-03-04 Yao Qi <yao.qi@linaro.org>
1762
1763 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1764
17652015-03-03 Gary Benson <gbenson@redhat.com>
1766
1767 * hostio.c (handle_vFile): Fix prefix lengths.
1768
17692015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1770
1771 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1772 ptr_bits.
1773
17742015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1775
1776 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1777 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1778 (clean): Add "rm -f" for above C files.
1779 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1780 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1781 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1782 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1783 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1784 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1785 (init_registers_s390x_vx_linux64)
1786 (init_registers_s390x_tevx_linux64)
1787 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1788 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1789 declarations.
1790 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1791 (s390_store_vxrs_high): New functions.
1792 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1793 NT_S390_VXRS_HIGH.
1794 (s390_arch_setup): Add logic for selecting one of the new target
1795 descriptions. Activate the new vector regsets if applicable.
1796 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1797 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1798 and init_registers_s390x_tevx_linux64.
1799
18002015-03-01 Pedro Alves <palves@redhat.com>
1801
1802 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1803 parameter.
1804
18052015-02-27 Pedro Alves <palves@redhat.com>
1806
1807 * linux-x86-low.c (u_debugreg_offset): New function.
1808 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1809
18102015-02-27 Pedro Alves <palves@redhat.com>
1811
1812 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1813 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1814 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1815 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1816 (ps_lsetfpregs, ps_getpid)
1817 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1818 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1819 (ps_lsetxregs, ps_plog): Declare.
1820
18212015-02-27 Pedro Alves <palves@redhat.com>
1822
1823 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1824 IP_AGENT_EXPORT_FUNC.
1825 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1826 IP_AGENT_EXPORT_FUNC.
1827 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1828 (IP_AGENT_EXPORT): Delete.
1829 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1830 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1831 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1832 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1833 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1834 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1835 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1836 (traceframe_read_count, traceframe_write_count)
1837 (traceframes_created, trace_state_variables, get_raw_reg)
1838 (get_trace_state_variable_value, set_trace_state_variable_value)
1839 (ust_loaded, helper_thread_id, cmd_buf): Use
1840 IPA_SYM_EXPORTED_NAME.
1841 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1842 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1843 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1844 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1845 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1846 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1847 EXTERN_C_PUSH/EXTERN_C_POP.
1848 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1849 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1850 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1851 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1852 (traceframe_write_count, traceframe_read_count)
1853 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1854 (about_to_request_buffer_space, get_trace_state_variable_value)
1855 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1856 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1857 EXTERN_C_PUSH/EXTERN_C_POP.
1858 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1859 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1860 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1861 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1862 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1863 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1864 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1865 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1866 Define.
1867 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1868 (IP_AGENT_EXPORT_VAR_DECL): Define.
1869 (tracing): Declare.
1870 (gdb_agent_get_raw_reg): Declare.
1871
18722015-02-27 Tom Tromey <tromey@redhat.com>
1873 Pedro Alves <palves@redhat.com>
1874
1875 Rename symbols whose names are reserved C++ keywords throughout.
1876
18772015-02-27 Pedro Alves <palves@redhat.com>
1878
1879 * Makefile.in (COMPILER): New, get it from autoconf.
1880 (CXX): Get from autoconf instead.
1881 (COMPILE.pre): Use COMPILER.
1882 (CC-LD): Rename to ...
1883 (CC_LD): ... this. Use COMPILER.
1884 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1885 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1886 * acinclude.m4: Include build-with-cxx.m4.
1887 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1888 Disable -Werror by default if building in C++ mode.
1889 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1890 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1891 the C++ compiler. Save/restore CXXFLAGS too.
1892 * configure: Regenerate.
1893
18942015-02-27 Pedro Alves <palves@redhat.com>
1895
1896 * acinclude.m4: Include libiberty.m4.
1897 * configure.ac: Call libiberty_INIT.
1898 * config.in, configure: Regenerate.
1899
19002015-02-26 Pedro Alves <palves@redhat.com>
1901
1902 * linux-low.c (linux_wait_1): When incrementing the PC past a
1903 program breakpoint always use the_low_target.breakpoint_len as
1904 increment, rather than the maximum between that and
1905 the_low_target.decr_pc_after_break.
1906
19072015-02-23 Pedro Alves <palves@redhat.com>
1908
1909 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1910 thread was doing a step-over; always adjust the PC if
1911 we stepped over a permanent breakpoint.
1912 (linux_wait_1): If we stepped over breakpoint that was on top of a
1913 permanent breakpoint, manually advance the PC past it.
1914
19152015-02-23 Pedro Alves <palves@redhat.com>
1916
1917 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1918 modes.
1919 (x86_fill_gregset, x86_store_gregset): Use it when handling
1920 $orig_eax.
1921
19222015-02-20 Pedro Alves <palves@redhat.com>
1923
1924 * thread-db.c: Include "nat/linux-procfs.h".
1925 (thread_db_init): Skip listing new threads if the kernel supports
1926 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1927
19282015-02-20 Pedro Alves <palves@redhat.com>
1929
1930 * linux-low.c (status_pending_p_callback): Use ptid_match.
1931
19322015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1933
1934 PR breakpoints/16812
1935 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1936 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1937 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1938
19392015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1940
1941 PR breakpoints/15956
1942 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1943
19442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1945
1946 * linux-low.c (linux_low_btrace_conf): Print size.
1947 * server.c (handle_btrace_conf_general_set): New.
1948 (hanle_general_set): Call handle_btrace_conf_general_set.
1949 (handle_query): Report Qbtrace-conf:bts:size as supported.
1950
19512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1952
1953 * linux-low.c (linux_low_enable_btrace): Update parameters.
1954 (linux_low_btrace_conf): New.
1955 (linux_target_ops)<to_btrace_conf>: Initialize.
1956 * server.c (current_btrace_conf): New.
1957 (handle_btrace_enable): Rename to ...
1958 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1959 to target_enable_btrace. Update comment. Update users.
1960 (handle_qxfer_btrace_conf): New.
1961 (qxfer_packets): Add btrace-conf entry.
1962 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1963 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1964 (target_ops)<read_btrace_conf>: New.
1965 (target_enable_btrace): Update parameters.
1966 (target_read_btrace_conf): New.
1967
19682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1969
1970 * server.c (handle_btrace_general_set): Remove call to
1971 target_supports_btrace.
1972 (supported_btrace_packets): New.
1973 (handle_query): Call supported_btrace_packets.
1974 * target.h: include btrace-common.h.
1975 (btrace_target_info): Removed.
1976 (supports_btrace, target_supports_btrace): Update parameters.
1977
19782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1979
1980 * Makefile.in (SFILES): Add common/btrace-common.c.
1981 (OBS): Add common/btrace-common.o.
1982 (btrace-common.o): Add build rules.
1983 * linux-low: Include btrace-common.h.
1984 (linux_low_read_btrace): Use struct btrace_data. Call
1985 btrace_data_init and btrace_data_fini.
1986
19872015-02-06 Pedro Alves <palves@redhat.com>
1988
1989 * thread-db.c (find_new_threads_callback): Add debug output.
1990
19912015-02-04 Pedro Alves <palves@redhat.com>
1992
1993 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1994 (resume_stopped_resumed_lwps): New function.
1995 (linux_wait_for_event_filtered): Use it.
1996
19972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1998
1999 * Makefile.in (SFILES): Add linux-personality.c.
2000 (linux-personality.o): New rule.
2001 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2002 list of objects to be built.
2003 * linux-low.c: Include nat/linux-personality.h.
2004 (linux_create_inferior): Remove code to disable address space
2005 randomization (moved to ../nat/linux-personality.c). Create
2006 cleanup to disable address space randomization.
2007
20082015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2009
2010 * Makefile.in (posix-strerror.o): New rule.
2011 (mingw-strerror.o): Likewise.
2012 * configure: Regenerated.
2013 * configure.ac: Source file ../common/common.host. Initialize new
2014 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2015
20162015-01-14 Yao Qi <yao@codesourcery.com>
2017
2018 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2019 (ppc-linux.o): New rule.
2020 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2021 * configure.ac: AC_CHECK_FUNCS(getauxval).
2022 * config.in: Re-generated.
2023 * configure: Re-generated.
2024 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2025 ppc64_64bit_inferior_p
2026
20272015-01-14 Yao Qi <yao@codesourcery.com>
2028
2029 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2030 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2031 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2032 (PT_ORIG_R3, PT_TRAP): Likewise.
2033 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2034 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2035 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2036
20372015-01-10 Joel Brobecker <brobecker@adacore.com>
2038
2039 * i387-fp.c (i387_cache_to_xsave): In look over
2040 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2041 zmmh_low_space field by use of zmmh_high_space.
2042
20432015-01-09 Pedro Alves <palves@redhat.com>
2044
2045 * linux-low.c (step_over_bkpt): Move higher up in the file.
2046 (handle_extended_wait): Don't store the stop_pc here.
2047 (get_stop_pc): Adjust comments and rename to ...
2048 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2049 stopped for a software breakpoint or hardware breakpoint.
2050 (thread_still_has_status_pending_p): New function.
2051 (status_pending_p_callback): Use
2052 thread_still_has_status_pending_p. If the event is no longer
2053 interesting, resume the LWP.
2054 (handle_tracepoints): Add assert.
2055 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2056 (wstatus_maybe_breakpoint): New function.
2057 (cancel_breakpoint): Delete function.
2058 (check_stopped_by_watchpoint): New function, factored out from
2059 linux_low_filter_event.
2060 (lp_status_maybe_breakpoint): Delete function.
2061 (linux_low_filter_event): Remove filter_ptid argument.
2062 Leave thread group exits pending here. Store the LWP's stop PC.
2063 Always leave events pending.
2064 (linux_wait_for_event_filtered): Pull all events out of the
2065 kernel, and leave them all pending.
2066 (count_events_callback, select_event_lwp_callback): Consider all
2067 events.
2068 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2069 (select_event_lwp): Only give preference to the stepping LWP in
2070 all-stop mode. Adjust comments.
2071 (ignore_event): New function.
2072 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2073 references to cancel_breakpoints. Adjust to renames. Also give
2074 equal priority to all LWPs that have had events in non-stop mode.
2075 If reporting a software breakpoint event, unadjust the LWP's PC.
2076 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2077 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2078 Adjust.
2079 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2080 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2081 (linux_stopped_by_watchpoint): Adjust.
2082 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2083 * linux-low.h (enum lwp_stop_reason): New.
2084 (struct lwp_info) <stop_pc>: Adjust comment.
2085 <stopped_by_watchpoint>: Delete field.
2086 <stop_reason>: New field.
2087 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2088 * mem-break.c (software_breakpoint_inserted_here)
2089 (hardware_breakpoint_inserted_here): New function.
2090 * mem-break.h (software_breakpoint_inserted_here)
2091 (hardware_breakpoint_inserted_here): Declare.
2092 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2093 (cancel_breakpoints): Delete.
2094 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2095 (upload_fast_traceframes): Remove references to
2096 cancel_breakpoints.
2097
20982015-01-09 Pedro Alves <palves@redhat.com>
2099
2100 * thread-db.c (find_new_threads_callback): Ignore thread if the
2101 kernel thread ID is -1.
2102
21032015-01-09 Pedro Alves <palves@redhat.com>
2104
2105 * linux-low.c (linux_attach_fail_reason_string): Move to
2106 nat/linux-ptrace.c, and rename.
2107 (linux_attach_lwp): Update comment.
2108 (attach_proc_task_lwp_callback): New function.
2109 (linux_attach): Adjust to rename and use
2110 linux_proc_attach_tgid_threads.
2111 (linux_attach_fail_reason_string): Delete declaration.
2112
21132015-01-01 Joel Brobecker <brobecker@adacore.com>
2114
2115 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2116 * server.c (gdbserver_version): Likewise.
2117
21182014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2119
2120 * remote-utils.c: Include ctype.h.
2121 (input_interrupt): Explicitly handle the case when the char
2122 received is the NUL byte. Improve the printing of non-ASCII
2123 characters.
2124
21252014-12-16 Joel Brobecker <brobecker@adacore.com>
2126
2127 * linux-low.c (linux_low_filter_event): Update call to
2128 linux_enable_event_reporting following the addition of
2129 a new parameter to that function.
2130
21312014-12-16 Catalin Udma <catalin.udma@freescale.com>
2132
2133 PR server/17457
2134 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2135 (AARCH64_FPCR_REGNO): Likewise.
2136 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2137 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2138 (aarch64_store_fpregset): Likewise.
2139
21402014-12-15 Joel Brobecker <brobecker@adacore.com>
2141
2142 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2143 Remove FIXME comment about assumption about N.
2144
21452014-12-13 Joel Brobecker <brobecker@adacore.com>
2146
2147 * configure.ac: If large-file support is disabled in GDBserver,
2148 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2149 * configure: Regenerate.
2150
21512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2152
2153 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2154 warning upon ENODATA from ptrace.
2155 * linux-s390-low.c (s390_store_tdb): New.
2156 (s390_regsets): Add regset for NT_S390_TDB.
2157
21582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2159
2160 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2161 without a fill_function.
2162 * linux-s390-low.c (s390_fill_last_break): Remove.
2163 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2164 (s390_arch_setup): Use regset's size instead of fill_function for
2165 loop end condition.
2166
21672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2168
2169 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2170 the regset's store function when ptrace returned an error.
2171 * regcache.c (get_thread_regcache): Invalidate register cache
2172 before fetching inferior's registers.
2173
21742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2175
2176 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2177 while-loop as for-loop.
2178 (regsets_store_inferior_registers): Likewise.
2179
21802014-11-28 Yao Qi <yao@codesourcery.com>
2181
2182 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2183 * config.in, configure: Re-generate.
2184 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2185 is defined.
2186
21872014-11-21 Yao Qi <yao@codesourcery.com>
2188
2189 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2190 (AC_CHECK_HEADERS): Remove malloc.h.
2191 * configure: Re-generated.
2192 * config.in: Re-generated.
2193 * server.h: Don't include alloca.h and malloc.h.
2194 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2195 Don't include malloc.h.
2196
21972014-11-17 Joel Brobecker <brobecker@adacore.com>
2198
2199 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2200 corresponding ERRNO check in same block.
2201
22022014-11-12 Pedro Alves <palves@redhat.com>
2203
2204 * server.c (cont_thread): Update comment.
2205 (start_inferior, attach_inferior): No longer clear cont_thread.
2206 (handle_v_cont): No longer set cont_thread.
2207 (captured_main): Clear cont_thread each time a GDB connects.
2208
22092014-11-12 Pedro Alves <palves@redhat.com>
2210
2211 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2212 thread, and don't resume all threads if the Hc thread has exited.
2213
22142014-11-12 Pedro Alves <palves@redhat.com>
2215
2216 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2217 the process group instead of to a specific LWP.
2218
22192014-10-15 Pedro Alves <palves@redhat.com>
2220
2221 PR server/17487
2222 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2223 parameter.
2224 (arm_set_thread_context): Delete.
2225 (the_low_target): Adjust.
2226 * win32-i386-low.c (debug_registers_changed)
2227 (debug_registers_used): Delete.
2228 (update_debug_registers_callback): New function.
2229 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2230 needing to update their debug registers.
2231 (win32_get_current_dr): New function.
2232 (x86_dr_low_get_addr, x86_dr_low_get_control)
2233 (x86_dr_low_get_status): Fetch the debug register from the thread
2234 record's context.
2235 (i386_initial_stuff): Adjust.
2236 (i386_get_thread_context): Remove current_event parameter. Don't
2237 clear debug_registers_changed nor copy DR values to
2238 debug_reg_state.
2239 (i386_set_thread_context): Delete.
2240 (i386_prepare_to_resume): New function.
2241 (i386_thread_added): Mark the thread as needing to update irs
2242 debug registers.
2243 (the_low_target): Remove i386_set_thread_context and install
2244 i386_prepare_to_resume.
2245 * win32-low.c (win32_get_thread_context): Adjust.
2246 (win32_set_thread_context): Use SetThreadContext
2247 directly.
2248 (win32_prepare_to_resume): New function.
2249 (win32_require_context): New function, factored out from ...
2250 (thread_rec): ... this.
2251 (continue_one_thread): Call win32_prepare_to_resume on each thread
2252 we're about to continue.
2253 (win32_resume): Call win32_prepare_to_resume on the event thread.
2254 * win32-low.h (struct win32_thread_info)
2255 <debug_registers_changed>: New field.
2256 (struct win32_target_ops): Change prototype of set_thread_context,
2257 delete set_thread_context and add prepare_to_resume.
2258 (win32_require_context): New declaration.
2259
22602014-10-08 Gary Benson <gbenson@redhat.com>
2261
2262 * server.h: Do not include common-exceptions.h.
2263
22642014-10-08 Gary Benson <gbenson@redhat.com>
2265
2266 * server.h: Do not include cleanups.h.
2267
22682014-09-30 James Hogan <james.hogan@imgtec.com>
2269
2270 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2271 mips64-dsp-linux.c.
2272
22732014-09-23 Yao Qi <yao@codesourcery.com>
2274
2275 * linux-low.c (lp_status_maybe_breakpoint): New function.
2276 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2277 (count_events_callback): Likewise.
2278 (select_event_lwp_callback): Likewise.
2279 (cancel_breakpoints_callback): Likewise.
2280
22812014-09-19 Don Breazeal <donb@codesourcery.com>
2282
2283 * linux-low.c (handle_extended_wait): Call
2284 linux_ptrace_get_extended_event.
2285 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2286 linux_is_extended_waitstatus.
2287
22882014-09-16 Joel Brobecker <brobecker@adacore.com>
2289
2290 * Makefile.in (CPPFLAGS): Define.
2291 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2292 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2293
22942014-09-16 Gary Benson <gbenson@redhat.com>
2295
2296 * inferiors.h (current_inferior): Renamed as...
2297 (current_thread): New variable. All uses updated.
2298 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2299 (maybe_move_out_of_jump_pad): Likewise.
2300 (cancel_breakpoint): Likewise.
2301 (linux_low_filter_event): Likewise.
2302 (wait_for_sigstop): Likewise.
2303 (linux_resume_one_lwp): Likewise.
2304 (need_step_over_p): Likewise.
2305 (start_step_over): Likewise.
2306 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2307 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2308 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2309 and save_inferior as saved_thread.
2310 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2311 saved_thread.
2312 (regcache_invalidate_thread): Likewise.
2313 * remote-utils.c (prepare_resume_reply): Likewise.
2314 * thread-db.c (thread_db_get_tls_address): Likewise.
2315 (disable_thread_event_reporting): Likewise.
2316 (remove_thread_event_breakpoints): Likewise.
2317 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2318 as saved_thread.
2319 * target.h (set_desired_inferior): Renamed as...
2320 (set_desired_thread): New declaration. All uses updated.
2321 * server.c (myresume): Updated comment to reference thread instead
2322 of inferior.
2323 (handle_serial_event): Likewise.
2324 (handle_target_event): Likewise.
2325
23262014-09-12 Tom Tromey <tromey@redhat.com>
2327 Gary Benson <gbenson@redhat.com>
2328
2329 * regcache.h: Include common-regcache.h.
2330 (regcache_read_pc): Don't declare.
2331 * regcache.c (get_thread_regcache_for_ptid): New function.
2332
23332014-09-11 Tom Tromey <tromey@redhat.com>
2334 Gary Benson <gbenson@redhat.com>
2335
2336 * symbol.c: New file.
2337 * Makefile.in (SFILES): Add symbol.c.
2338 (OBS): Add symbol.o.
2339
23402014-09-11 Gary Benson <gbenson@redhat.com>
2341
2342 * target.c (target_stop_ptid, target_continue_ptid): New
2343 functions.
2344
23452014-09-11 Tom Tromey <tromey@redhat.com>
2346 Gary Benson <gbenson@redhat.com>
2347
2348 * target.h: Include target/target.h.
2349 * target.c (target_read_memory, target_read_uint32)
2350 (target_write_memory): New functions.
2351
23522014-09-11 Gary Benson <gbenson@redhat.com>
2353
2354 * server.h (debug_hw_points): Don't declare.
2355 * server.c (debug_hw_points): Don't define. Replace all uses
2356 with show_debug_regs.
2357 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2358 all uses with show_debug_regs.
2359
23602014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2361
2362 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2363 endianness into account.
2364 (ppc_supply_ptrace_register): Likewise.
2365
23662014-09-03 James Hogan <james.hogan@imgtec.com>
2367
2368 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2369 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2370
23712014-09-03 Gary Benson <gbenson@redhat.com>
2372
2373 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2374 ALL_DEBUG_ADDRESS_REGISTERS.
2375
23762014-09-02 Gary Benson <gbenson@redhat.com>
2377
2378 * i386-low.h: Renamed as...
2379 * x86-low.h: New file. All type, function and variable name
2380 prefixes changed from "i386_" to "x86_". All references updated.
2381 * i386-low.c: Renamed as...
2382 * x86-low.c: New file. All type, function and variable name
2383 prefixes changed from "i386_" to "x86_". All references updated.
2384
23852014-09-02 Gary Benson <gbenson@redhat.com>
2386
2387 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2388 (x86_linux_new_thread): Likewise.
2389
23902014-08-29 Gary Benson <gbenson@redhat.com>
2391
2392 * server.h (setjmp.h): Do not include.
2393 (toplevel): Do not declare.
2394 (common-exceptions.h): Include.
2395 (cleanups.h): Likewise.
2396 * server.c (toplevel): Do not define.
2397 (exit_code): New static global.
2398 (detach_or_kill_for_exit_cleanup): New function.
2399 (main): New function. Original main renamed to...
2400 (captured_main): New function.
2401 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2402
24032014-08-29 Gary Benson <gbenson@redhat.com>
2404
2405 * Makefile.in (SFILES): Add common/common-exceptions.c.
2406 (OBS): Add common-exceptions.o.
2407 (common-exceptions.o): New rule.
2408 * utils.c (prepare_to_throw_exception): New function.
2409
24102014-08-29 Gary Benson <gbenson@redhat.com>
2411
2412 * config.in: Regenerate.
2413 * configure: Likewise.
2414
24152014-08-29 Gary Benson <gbenson@redhat.com>
2416
2417 * Makefile.in (SFILES): Add common/cleanups.c.
2418 (OBS): cleanups.o.
2419 (cleanups.o): New rule.
2420
24212014-08-29 Gary Benson <gbenson@redhat.com>
2422
2423 * utils.c (internal_vwarning): New function.
2424
24252014-08-28 Gary Benson <gbenson@redhat.com>
2426
2427 * utils.h (fatal): Remove declaration.
2428 * utils.c (fatal): Remove function.
2429
24302014-08-28 Gary Benson <gbenson@redhat.com>
2431
2432 * tracepoint.c (gdb_agent_init): Replace fatal with
2433 perror_with_name.
2434 (initialize_tracepoint): Likewise.
2435
24362014-08-28 Gary Benson <gbenson@redhat.com>
2437
2438 * remote-utils.c (remote_prepare): Replace fatal with error.
2439
24402014-08-28 Gary Benson <gbenson@redhat.com>
2441
2442 * linux-low.c (linux_async): Replace fatal with warning.
2443 Tidy up and return.
2444 (linux_start_non_stop): Return -1 if linux_async failed.
2445
24462014-08-28 Gary Benson <gbenson@redhat.com>
2447
2448 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2449 gdb_assert.
2450 (i386_dr_low_get_addr): Remove vague comment.
2451 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2452 gdb_assert.
2453
24542014-08-28 Gary Benson <gbenson@redhat.com>
2455
2456 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2457 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2458 internal_error.
2459 (linux_resume_one_lwp): Likewise.
2460 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2461 gdb_assert.
2462 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2463 with internal_error.
2464 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2465 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2466 (find_register_by_name): Replace fatal with internal_error.
2467 (find_regno): Likewise.
2468 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2469 * thread-db.c (thread_db_create_event): Likewise.
2470 (thread_db_load_search): Likewise.
2471 (try_thread_db_load_1): Likewise.
2472 * tracepoint.c (get_jump_space_head): Replace fatal with
2473 internal_error.
2474 (claim_trampoline_space): Likewise.
2475 (have_fast_tracepoint_trampoline_buffer): Likewise.
2476 (cmd_qtstart): Likewise.
2477 (stop_tracing): Likewise.
2478 (fast_tracepoint_collecting): Likewise.
2479 (target_malloc): Likewise.
2480 (download_tracepoint): Likewise.
2481 (download_trace_state_variables): Replace check with gdb_assert.
2482 (upload_fast_traceframes): Replace fatal with internal_error.
2483
24842014-08-19 Tom Tromey <tromey@redhat.com>
2485 Gary Benson <gbenson@redhat.com>
2486
2487 * Makefile.in (SFILES): Add common/common-debug.c.
2488 (OBS): Add common-debug.o.
2489 (common-debug.o): New rule.
2490 * debug.h (debug_printf): Don't declare.
2491 * debug.c (debug_printf): Renamed and rewritten as...
2492 (debug_vprintf): New function.
2493
24942014-08-19 Gary Benson <gbenson@redhat.com>
2495
2496 * utils.h: Do not include print-utils.h.
2497
24982014-08-19 Tom Tromey <tromey@redhat.com>
2499 Gary Benson <gbenson@redhat.com>
2500
2501 * server.h: Add static assertion.
2502 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2503
25042014-08-19 Tom Tromey <tromey@redhat.com>
2505 Gary Benson <gbenson@redhat.com>
2506
2507 * Makefile.in (SFILES): Add common/errors.c.
2508 (OBS): Add errors.o.
2509 (IPA_OBS): Add errors-ipa.o.
2510 (errors.o): New rule.
2511 (errors-ipa.o): Likewise.
2512 * utils.h (perror_with_name, error, warning): Don't declare.
2513 * utils.c (warning): Renamed and rewritten as...
2514 (vwarning): New function.
2515 (error): Renamed and rewritten as...
2516 (verror): New function.
2517 (internal_error): Renamed and rewritten as...
2518 (internal_verror): New function.
2519
25202014-08-07 Gary Benson <gbenson@redhat.com>
2521
2522 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2523 * configure: Regenerate.
2524 * config.in: Likewise.
2525 * server.h: Do not include errno.h.
2526 * event-loop.c: Likewise.
2527 * hostio-errno.c: Likewise.
2528 * linux-low.c: Likewise.
2529 * remote-utils.c: Likewise.
2530 * spu-low.c: Likewise.
2531 * utils.c: Likewise.
2532 * gdbreplay.c: Unconditionally include errno.h.
2533
25342014-08-07 Gary Benson <gbenson@redhat.com>
2535
2536 * server.h: Do not include string.h.
2537 * event-loop.c: Likewise.
2538 * linux-low.c: Likewise.
2539 * regcache.c: Likewise.
2540 * remote-utils.c: Likewise.
2541 * spu-low.c: Likewise.
2542 * utils.c: Likewise.
2543
25442014-08-07 Gary Benson <gbenson@redhat.com>
2545
2546 * server.h: Do not include gdb_assert.h.
2547
25482014-08-07 Gary Benson <gbenson@redhat.com>
2549
2550 * server.h: Do not include common-utils.h.
2551
25522014-08-07 Gary Benson <gbenson@redhat.com>
2553
2554 * server.h: Do not include ptid.h.
2555 * notif.h: Likewise.
2556
25572014-08-07 Gary Benson <gbenson@redhat.com>
2558
2559 * server.h: Do not include gdb_locale.h.
2560
25612014-08-07 Gary Benson <gbenson@redhat.com>
2562
2563 * server.h: Do not include gdb/signals.h.
2564 * win32-low.c: Likewise.
2565
25662014-08-07 Gary Benson <gbenson@redhat.com>
2567
2568 * server.h: Do not include pathmax.h.
2569
25702014-08-07 Gary Benson <gbenson@redhat.com>
2571
2572 * server.h: Do not include libiberty.h.
2573 * linux-bfin-low.c: Likewise.
2574
25752014-08-07 Gary Benson <gbenson@redhat.com>
2576
2577 * server.h: Do not include ansidecl.h.
2578
25792014-08-07 Gary Benson <gbenson@redhat.com>
2580
2581 * linux-x86-low.c: Do not include stddef.h.
2582 * lynx-ppc-low.c: Likewise.
2583 * tracepoint.c: Likewise.
2584
25852014-08-07 Gary Benson <gbenson@redhat.com>
2586
2587 * server.h: Do not include stdarg.h.
2588 * nto-low.c: Likewise.
2589
25902014-08-07 Gary Benson <gbenson@redhat.com>
2591
2592 * server.h: Do not include stdlib.h.
2593 * inferiors.c: Likewise.
2594 * linux-low.c: Likewise.
2595 * regcache.c: Likewise.
2596 * spu-low.c: Likewise.
2597 * tracepoint.c: Likewise.
2598 * utils.c: Likewise.
2599
26002014-08-07 Gary Benson <gbenson@redhat.com>
2601
2602 * server.h: Do not include stdio.h.
2603 * linux-low.c: Likewise.
2604 * remote-utils.c: Likewise.
2605 * spu-low.c: Likewise.
2606 * utils.c: Likewise.
2607 * wincecompat.c: Likewise.
2608
26092014-08-06 Gary Benson <gbenson@redhat.com>
2610
2611 * regcache.c (init_register_cache): Move conditionals inside if.
2612
26132014-08-06 Gary Benson <gbenson@redhat.com>
2614
2615 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2616
26172014-07-31 Gary Benson <gbenson@redhat.com>
2618
2619 * ax.h: Do not include server.h.
2620 * gdbthread.h: Likewise.
2621 * lynx-low.h: Likewise.
2622 * notif.h: Likewise.
2623
26242014-07-30 Gary Benson <gbenson@redhat.com>
2625
2626 * server.h: Include common-defs.h.
2627 Do not include config.h or build-gnulib-gdbserver/config.h.
2628
26292014-07-30 Gary Benson <gbenson@redhat.com>
2630
2631 * hostio-errno.c: Move server.h to top of includes list.
2632 * inferiors.c: Likewise.
2633 * linux-x86-low.c: Likewise.
2634 * notif.c: Include server.h.
2635
26362014-07-24 Tom Tromey <tromey@redhat.com>
2637 Gary Benson <gbenson@redhat.com>
2638
2639 * server.h (CORE_ADDR): Now unsigned.
2640
26412014-07-16 Pedro Alves <palves@redhat.com>
2642
2643 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2644
26452014-07-15 Pedro Alves <palves@redhat.com>
2646
2647 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2648 copy.
2649
26502014-07-11 Pedro Alves <palves@redhat.com>
2651
2652 * linux-low.c (kill_wait_lwp): New function, based on
2653 kill_one_lwp_callback, but use my_waitpid directly.
2654 (kill_one_lwp_callback, linux_kill): Use it.
2655
26562014-06-23 Pedro Alves <palves@redhat.com>
2657
2658 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2659 before setting DR0..DR3.
2660
26612014-06-20 Gary Benson <gbenson@redhat.com>
2662
2663 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2664 * configure: Regenerated.
2665 * config.in: Likewise.
2666
26672014-06-20 Gary Benson <gbenson@redhat.com>
2668
2669 * Makefile.in (SFILES): Update locations for files moved
2670 from common to nat.
2671 (object file files): Reordered.
2672
26732014-06-20 Gary Benson <gbenson@redhat.com>
2674
2675 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2676 (i386_dr_low_set_addr): Likewise.
2677 (i386_dr_low_get_addr): Likewise.
2678 (i386_dr_low_can_set_control): Likewise.
2679 (i386_dr_low_set_control): Likewise.
2680 (i386_dr_low_get_control): Likewise.
2681 (i386_dr_low_get_status): Likewise.
2682 (i386_get_debug_register_length): Likewise.
2683 * linux-x86-low.c (i386_dr_low_set_addr):
2684 Changed signature. Made static.
2685 (i386_dr_low_get_addr): Likewise.
2686 (i386_dr_low_set_control): Likewise.
2687 (i386_dr_low_get_control): Likewise.
2688 (i386_dr_low_get_status): Likewise.
2689 (i386_dr_low): New global variable.
2690 * win32-i386-low.c (i386_dr_low_set_addr):
2691 Changed signature. Made static.
2692 (i386_dr_low_get_addr): Likewise.
2693 (i386_dr_low_set_control): Likewise.
2694 (i386_dr_low_get_control): Likewise.
2695 (i386_dr_low_get_status): Likewise.
2696 (i386_dr_low): New global variable.
2697
26982014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2699
2700 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2701 * Makefile.in (AR, AR_FLAGS): Define.
2702 * configure: Regenerate.
2703
27042014-06-19 Gary Benson <gbenson@redhat.com>
2705
2706 * Makefile.in (i386-dregs.o): New rule.
2707 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2708 * i386-low.c (target.h): Remove include.
2709 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2710 (DR_CONTROL_SHIFT): Likewise.
2711 (DR_CONTROL_SIZE): Likewise.
2712 (DR_RW_EXECUTE): Likewise.
2713 (DR_RW_WRITE): Likewise.
2714 (DR_RW_READ): Likewise.
2715 (DR_RW_IORW): Likewise.
2716 (DR_LEN_1): Likewise.
2717 (DR_LEN_2): Likewise.
2718 (DR_LEN_4): Likewise.
2719 (DR_LEN_8): Likewise.
2720 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2721 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2722 (DR_ENABLE_SIZE): Likewise.
2723 (DR_LOCAL_SLOWDOWN): Likewise.
2724 (DR_GLOBAL_SLOWDOWN): Likewise.
2725 (DR_CONTROL_RESERVED): Likewise.
2726 (I386_DR_CONTROL_MASK): Likewise.
2727 (I386_DR_VACANT): Likewise.
2728 (I386_DR_LOCAL_ENABLE): Likewise.
2729 (I386_DR_GLOBAL_ENABLE): Likewise.
2730 (I386_DR_DISABLE): Likewise.
2731 (I386_DR_SET_RW_LEN): Likewise.
2732 (I386_DR_GET_RW_LEN): Likewise.
2733 (I386_DR_WATCH_HIT): Likewise.
2734 (i386_wp_op_t): Likewise.
2735 (i386_show_dr): Likewise.
2736 (i386_length_and_rw_bits): Likewise.
2737 (i386_insert_aligned_watchpoint): Likewise.
2738 (i386_remove_aligned_watchpoint): Likewise.
2739 (i386_handle_nonaligned_watchpoint): Likewise.
2740 i386_update_inferior_debug_regs(): Likewise.
2741 (i386_dr_insert_watchpoint): Likewise.
2742 (i386_dr_remove_watchpoint): Likewise.
2743 (i386_dr_region_ok_for_watchpoint): Likewise.
2744 (i386_dr_stopped_data_address): Likewise.
2745 (i386_dr_stopped_by_watchpoint): Likewise.
2746
27472014-06-19 Gary Benson <gbenson@redhat.com>
2748
2749 * i386-low.c (i386_dr_show): Renamed to
2750 i386_show_dr and made static. All uses updated.
2751 (i386_dr_length_and_rw_bits): Renamed to
2752 i386_length_and_rw_bits and made static.
2753 All uses updated.
2754 (i386_dr_insert_aligned_watchpoint): Renamed to
2755 i386_insert_aligned_watchpoint and made static.
2756 All uses updated.
2757 (i386_dr_remove_aligned_watchpoint): Renamed to
2758 i386_remove_aligned_watchpoint and made static.
2759 All uses updated.
2760 (i386_dr_update_inferior_debug_regs): Renamed to
2761 i386_update_inferior_debug_regs and made static.
2762 All uses updated.
2763
27642014-06-18 Gary Benson <gbenson@redhat.com>
2765
2766 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2767 (i386_dr_low_can_set_control): Likewise.
2768 (i386_get_debug_register_length): Likewise.
2769 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2770 (i386_dr_low_can_set_control): Likewise.
2771 (i386_get_debug_register_length): Likewise.
2772
27732014-06-17 Gary Benson <gbenson@redhat.com>
2774
2775 * i386-low.h (i386-dregs.h): New include.
2776 (DR_FIRSTADDR): Now in i386-dregs.h.
2777 (DR_LASTADDR): Likewise.
2778 (DR_NADDR): Likewise.
2779 (DR_STATUS): Likewise.
2780 (DR_CONTROL): Likewise.
2781 (i386_debug_reg_state): Likewise.
2782 (i386_dr_insert_watchpoint): Likewise.
2783 (i386_dr_remove_watchpoint): Likewise.
2784 (i386_dr_region_ok_for_watchpoint): Likewise.
2785 (i386_dr_stopped_data_address): Likewise.
2786 (i386_dr_stopped_by_watchpoint): Likewise.
2787 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2788
27892014-06-18 Gary Benson <gbenson@redhat.com>
2790
2791 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2792 i386_dr_insert_watchpoint.
2793 (i386_low_remove_watchpoint): Renamed to
2794 i386_dr_remove_watchpoint.
2795 (i386_low_region_ok_for_watchpoint): Renamed to
2796 i386_dr_region_ok_for_watchpoint.
2797 (i386_low_stopped_data_address): Renamed to
2798 i386_dr_stopped_data_address.
2799 (i386_low_stopped_by_watchpoint): Renamed to
2800 i386_dr_stopped_by_watchpoint.
2801 * i386-low.c (i386_show_dr): Renamed to
2802 i386_dr_show and made nonstatic. All uses updated.
2803 (i386_length_and_rw_bits): Renamed to
2804 i386_dr_length_and_rw_bits and made nonstatic.
2805 All uses updated.
2806 (i386_insert_aligned_watchpoint): Renamed to
2807 i386_dr_insert_aligned_watchpoint and made nonstatic.
2808 All uses updated.
2809 (i386_remove_aligned_watchpoint): Renamed to
2810 i386_dr_remove_aligned_watchpoint and made nonstatic.
2811 All uses updated.
2812 (i386_update_inferior_debug_regs): Renamed to
2813 i386_dr_update_inferior_debug_regs and made nonstatic.
2814 All uses updated.
2815 (i386_low_insert_watchpoint): Renamed to
2816 i386_dr_insert_watchpoint. All uses updated.
2817 (i386_low_remove_watchpoint): Renamed to
2818 i386_dr_remove_watchpoint. All uses updated.
2819 (i386_low_region_ok_for_watchpoint): Renamed to
2820 i386_dr_region_ok_for_watchpoint. All uses updated.
2821 (i386_low_stopped_data_address): Renamed to
2822 i386_dr_stopped_data_address. All uses updated.
2823 (i386_low_stopped_by_watchpoint): Renamed to
2824 i386_dr_stopped_by_watchpoint. All uses updated.
2825
28262014-06-18 Gary Benson <gbenson@redhat.com>
2827
2828 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2829 (i386_dr_low_can_set_control): Likewise.
2830 (i386_insert_aligned_watchpoint): New check.
2831
28322014-06-18 Gary Benson <gbenson@redhat.com>
2833
2834 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2835 Renamed to state.
2836
28372014-06-18 Gary Benson <gbenson@redhat.com>
2838
2839 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2840 instead of fatal and error.
2841 (i386_handle_nonaligned_watchpoint): Likewise.
2842
28432014-06-18 Gary Benson <gbenson@redhat.com>
2844
2845 * i386-low.c (i386_get_debug_register_length): New macro.
2846 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2847 (i386_show_dr): Use debug_printf instead of fprintf. Use
2848 phex to format values.
2849
28502014-06-18 Gary Benson <gbenson@redhat.com>
2851
2852 * i386-low.h: Comment changes.
2853 * i386-low.c: Likewise.
2854
28552014-06-18 Gary Benson <gbenson@redhat.com>
2856
2857 * i386-low.c: Whitespace changes.
2858
28592014-06-12 Tom Tromey <tromey@redhat.com>
2860
2861 * utils.c (freeargv): Remove.
2862
28632014-06-12 Tom Tromey <tromey@redhat.com>
2864
2865 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2866 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2867 (parse_debug_format_options): Likewise.
2868 (gdbserver_usage): Likewise.
2869 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2870 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2871 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2872 against libiberty.
2873 ($(LIBGNU)): Depend on libiberty.
2874 (all-lib): Recurse into all subdirs.
2875 (install-only): Invoke "install" target in subdirs.
2876 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2877 targets.
2878 * configure: Rebuild.
2879 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2880 for vasprintf, vsnprintf, or gettimeofday.
2881 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2882 srv_tgtobj.
2883
28842014-06-05 Joel Brobecker <brobecker@adacore.com>
2885
2886 * development.sh: Delete.
2887 * Makefile.in (config.status): Adjust dependency on development.sh.
2888 * configure.ac: Adjust development.sh source call.
2889 * configure: Regenerate.
2890
28912014-06-02 Pedro Alves <palves@redhat.com>
2892
2893 * ax.c (gdb_free_agent_expr): New function.
2894 * ax.h (gdb_free_agent_expr): New declaration.
2895 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2896 list.
2897 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2898 static.
2899 (clear_breakpoint_conditions_and_commands): New function.
2900 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2901 (clear_breakpoint_conditions_and_commands): New declaration.
2902
29032014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2904
2905 * linux-aarch64-low.c (asm/ptrace.h): Include.
2906
29072014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2908
2909 Fix TLS access for -static -pthread.
2910 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2911 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2912 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2913
29142014-05-20 Pedro Alves <palves@redhat.com>
2915
2916 * linux-aarch64-low.c (aarch64_insert_point)
2917 (aarch64_remove_point): No longer check whether the type is
2918 supported here. Adjust to new interface.
2919 (the_low_target): Install aarch64_supports_z_point_type as
2920 supports_z_point_type method.
2921 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2922 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2923 instead of a Z packet char. Adjust.
2924 (arm_supports_z_point_type): New function.
2925 (arm_insert_point, arm_remove_point): Adjust to new interface.
2926 (the_low_target): Install arm_supports_z_point_type.
2927 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2928 (cris_insert_point, cris_remove_point): Adjust to new interface.
2929 Don't check whether the type is supported here.
2930 (the_low_target): Install cris_supports_z_point_type.
2931 * linux-low.c (linux_supports_z_point_type): New function.
2932 (linux_insert_point, linux_remove_point): Adjust to new interface.
2933 * linux-low.h (struct linux_target_ops) <insert_point,
2934 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2935 raw_breakpoint pointer parameter.
2936 <supports_z_point_type>: New method.
2937 * linux-mips-low.c (mips_supports_z_point_type): New function.
2938 (mips_insert_point, mips_remove_point): Adjust to new interface.
2939 Use mips_supports_z_point_type.
2940 (the_low_target): Install mips_supports_z_point_type.
2941 * linux-ppc-low.c (the_low_target): Install NULL as
2942 supports_z_point_type method.
2943 * linux-s390-low.c (the_low_target): Install NULL as
2944 supports_z_point_type method.
2945 * linux-sparc-low.c (the_low_target): Install NULL as
2946 supports_z_point_type method.
2947 * linux-x86-low.c (x86_supports_z_point_type): New function.
2948 (x86_insert_point): Adjust to new insert_point interface. Use
2949 insert_memory_breakpoint. Adjust to new
2950 i386_low_insert_watchpoint interface.
2951 (x86_remove_point): Adjust to remove_point interface. Use
2952 remove_memory_breakpoint. Adjust to new
2953 i386_low_remove_watchpoint interface.
2954 (the_low_target): Install x86_supports_z_point_type.
2955 * lynx-low.c (lynx_target_ops): Install NULL as
2956 supports_z_point_type callback.
2957 * nto-low.c (nto_supports_z_point_type): New.
2958 (nto_insert_point, nto_remove_point): Adjust to new interface.
2959 (nto_target_ops): Install nto_supports_z_point_type.
2960 * mem-break.c: Adjust intro comment.
2961 (struct raw_breakpoint) <raw_type, size>: New fields.
2962 <inserted>: Update comment.
2963 <shlib_disabled>: Delete field.
2964 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2965 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2966 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2967 (raw_bkpt_type_to_target_hw_bp_type): New function.
2968 (find_enabled_raw_code_breakpoint_at): New function.
2969 (find_raw_breakpoint_at): New type and size parameters. Use them.
2970 (insert_memory_breakpoint): New function, based off
2971 set_raw_breakpoint_at.
2972 (remove_memory_breakpoint): New function.
2973 (set_raw_breakpoint_at): Reimplement.
2974 (set_breakpoint): New, based on set_breakpoint_at.
2975 (set_breakpoint_at): Reimplement.
2976 (delete_raw_breakpoint): Go through the_target->remove_point
2977 instead of assuming memory breakpoints.
2978 (find_gdb_breakpoint_at): Delete.
2979 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2980 (find_gdb_breakpoint): New function.
2981 (set_gdb_breakpoint_at): Delete.
2982 (z_type_supported): New function.
2983 (set_gdb_breakpoint_1): New function, loosely based off
2984 set_gdb_breakpoint_at.
2985 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2986 (delete_gdb_breakpoint_at): Delete.
2987 (delete_gdb_breakpoint_1): New function, loosely based off
2988 delete_gdb_breakpoint_at.
2989 (delete_gdb_breakpoint): New function.
2990 (clear_gdb_breakpoint_conditions): Rename to ...
2991 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2992 breakpoint.
2993 (add_condition_to_breakpoint): Make static.
2994 (add_breakpoint_condition): Take a struct breakpoint pointer
2995 instead of an address. Adjust.
2996 (gdb_condition_true_at_breakpoint): Rename to ...
2997 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2998 z_type parameter.
2999 (gdb_condition_true_at_breakpoint): Reimplement.
3000 (add_breakpoint_commands): Take a struct breakpoint pointer
3001 instead of an address. Adjust.
3002 (gdb_no_commands_at_breakpoint): Rename to ...
3003 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3004 parameter. Return true if no breakpoint was found. Change debug
3005 output.
3006 (gdb_no_commands_at_breakpoint): Reimplement.
3007 (run_breakpoint_commands): Rename to ...
3008 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3009 and change return type to boolean.
3010 (run_breakpoint_commands): New function.
3011 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3012 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3013 breakpoint. Go through the_target->remove_point instead of
3014 assuming memory breakpoint.
3015 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3016 software and hardware breakpoints.
3017 (reinsert_raw_breakpoint): Go through the_target->insert_point
3018 instead of assuming memory breakpoint.
3019 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3020 software and hardware breakpoints.
3021 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3022 Check both software and hardware breakpoints.
3023 (validate_inserted_breakpoint): Assert the breakpoint is a
3024 software breakpoint. Set the inserted flag to -1 instead of
3025 setting shlib_disabled.
3026 (delete_disabled_breakpoints): Adjust.
3027 (validate_breakpoints): Only validate software breakpoints.
3028 Adjust to inserted flag change.
3029 (check_mem_read, check_mem_write): Skip breakpoint types other
3030 than software breakpoints. Adjust to inserted flag change.
3031 * mem-break.h (enum raw_bkpt_type): New enum.
3032 (raw_breakpoint, struct process_info): Forward declare.
3033 (Z_packet_to_target_hw_bp_type): Delete declaration.
3034 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3035 (set_gdb_breakpoint, delete_gdb_breakpoint)
3036 (clear_breakpoint_conditions): New declarations.
3037 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3038 (breakpoint_inserted_here): Update comment.
3039 (add_breakpoint_condition, add_breakpoint_commands): Replace
3040 address parameter with a breakpoint pointer parameter.
3041 (gdb_breakpoint_here): Update comment.
3042 (delete_gdb_breakpoint_at): Delete.
3043 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3044 * server.c (process_point_options): Take a struct breakpoint
3045 pointer instead of an address. Adjust.
3046 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3047 delete_gdb_breakpoint.
3048 * spu-low.c (spu_target_ops): Install NULL as
3049 supports_z_point_type method.
3050 * target.h: Include mem-break.h.
3051 (struct target_ops) <prepare_to_access_memory>: Update comment.
3052 <supports_z_point_type>: New field.
3053 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3054 instead of a char. Also take a raw breakpoint pointer.
3055 * win32-arm-low.c (the_low_target): Install NULL as
3056 supports_z_point_type.
3057 * win32-i386-low.c (i386_supports_z_point_type): New function.
3058 (i386_insert_point, i386_remove_point): Adjust to new interface.
3059 (the_low_target): Install i386_supports_z_point_type.
3060 * win32-low.c (win32_supports_z_point_type): New function.
3061 (win32_insert_point, win32_remove_point): Adjust to new interface.
3062 (win32_target_ops): Install win32_supports_z_point_type.
3063 * win32-low.h (struct win32_target_ops):
3064 <supports_z_point_type>: New method.
3065 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3066 instead of a char. Also take a raw breakpoint pointer.
3067
30682014-05-20 Pedro Alves <palves@redhat.com>
3069
3070 * mem-break.h: Include break-common.h.
3071 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3072 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3073 (Z_packet_to_target_hw_bp_type): New declaration.
3074 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3075 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3076 (Z_PACKET_ACCESS_WP): Delete macros.
3077 (Z_packet_to_hw_type): Delete function.
3078 * i386-low.h: Don't include break-common.h here.
3079 (Z_packet_to_hw_type): Delete declaration.
3080 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3081 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3082 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3083 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3084 * linux-aarch64-low.c: Don't include break-common.h here.
3085 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3086 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3087 (Z_packet_to_target_hw_bp_type): Delete function.
3088 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3089 function.
3090 (mips_insert_point, mips_remove_point): Use
3091 Z_packet_to_target_hw_bp_type.
3092
30932014-05-20 Pedro Alves <palves@redhat.com>
3094
3095 * linux-aarch64-low.c: Include break-common.h.
3096 (enum target_point_type): Delete.
3097 (Z_packet_to_point_type): Rename to ...
3098 (Z_packet_to_target_hw_bp_type): ... this, and return a
3099 target_hw_bp_type instead.
3100 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3101 instead of an enum target_point_type.
3102 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3103 breakpoint type.
3104 (aarch64_dr_state_insert_one_point)
3105 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3106 (aarch64_handle_aligned_watchpoint)
3107 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3108 Take an enum target_hw_bp_type instead of an enum
3109 target_point_type.
3110 (aarch64_supports_z_point_type): New function.
3111 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3112 use Z_packet_to_target_hw_bp_type.
3113
31142014-05-20 Joel Brobecker <brobecker@adacore.com>
3115
3116 * configure.ac: Only use -Werror by default when DEVELOPMENT
3117 is true.
3118 * configure: Regenerate.
3119
31202014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3121
3122 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3123 * linux-x86-low.c (X86_64_USER_REGS): New.
3124 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3125
31262014-04-28 Yao Qi <yao@codesourcery.com>
3127
3128 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3129 name.
3130
31312014-04-25 Pedro Alves <palves@redhat.com>
3132
3133 PR server/16255
3134 * linux-low.c (linux_attach_fail_reason_string): New function.
3135 (linux_attach_lwp): Delete.
3136 (linux_attach_lwp_1): Rename to ...
3137 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3138 argument. Remove "initial" parameter. Return int instead of
3139 void. Don't error or warn here.
3140 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3141 failure to attach to the tgid. Call warning when failing to
3142 attach to an lwp.
3143 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3144 argument. Remove "initial" parameter. Return int instead of
3145 void. Don't error or warn here.
3146 (linux_attach_fail_reason_string): New declaration.
3147 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3148 interface change. Use linux_attach_fail_reason_string.
3149
31502014-04-24 Michael Sturm <michael.sturm@mintel.com>
3151 Walfred Tedeschi <walfred.tedeschi@intel.com>
3152
3153 * Makefile.in: Added rules to handle new files
3154 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3155 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3156 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3157 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3158 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3159 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3160 x32-avx512-linux.o.
3161 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3162 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3163 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3164 i386/x32-avx512.xml.
3165 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3166 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3167 i386/x32-avx512-linux.xml.
3168 * i387-fp.c (num_avx512_k_registers): New constant for number
3169 of K registers.
3170 (num_avx512_zmmh_low_registers): New constant for number of
3171 lower ZMM registers (0-15).
3172 (num_avx512_zmmh_high_registers): New constant for number of
3173 higher ZMM registers (16-31).
3174 (num_avx512_ymmh_registers): New contant for number of higher
3175 YMM registers (ymm16-31 added by avx521 on x86_64).
3176 (num_avx512_xmm_registers): New constant for number of higher
3177 XMM registers (xmm16-31 added by AVX512 on x86_64).
3178 (struct i387_xsave): Add space for AVX512 registers.
3179 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3180 Add code to handle AVX512 registers.
3181 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3182 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3183 prototypei from generated file.
3184 (tdesc_amd64_avx512_linux): Likewise.
3185 (init_registers_x32_avx512_linux): Likewise.
3186 (tdesc_x32_avx512_linux): Likewise.
3187 (init_registers_i386_avx512_linux): Likewise.
3188 (tdesc_i386_avx512_linux): Likewise.
3189 (x86_64_regmap): Add AVX512 registers.
3190 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3191 mask.
3192 (initialize_low_arch): Add code to initialize AVX512 registers.
3193
31942014-04-23 Pedro Alves <palves@redhat.com>
3195
3196 * mem-break.c (find_gdb_breakpoint_at): Make static.
3197 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3198
31992014-04-23 Pedro Alves <palves@redhat.com>
3200
3201 * i386-low.c: Don't include break-common.h here.
3202 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3203 prototype to take target_hw_bp_type as argument instead of a Z
3204 packet char.
3205 * i386-low.h: Include break-common.h here.
3206 (Z_packet_to_hw_type): Declare.
3207 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3208 prototypes.
3209 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3210 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3211 (x86_remove_point): Convert the packet number to a
3212 target_hw_bp_type before calling i386_low_remove_watchpoint.
3213 * win32-i386-low.c (i386_insert_point): Convert the packet number
3214 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3215 (i386_remove_point): Convert the packet number to a
3216 target_hw_bp_type before calling i386_low_remove_watchpoint.
3217
32182014-04-23 Pedro Alves <palves@redhat.com>
3219
3220 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3221
32222014-04-10 Pedro Alves <palves@redhat.com>
3223
3224 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3225 Check if the condition or command is NULL before checking if the
3226 breakpoint is known. On success, return true.
3227 * mem-break.h (add_breakpoint_condition): Document return.
3228 (add_breakpoint_commands): Add describing comment.
3229 * server.c (skip_to_semicolon): New function.
3230 (process_point_options): Use it.
3231
32322014-04-09 Pedro Alves <palves@redhat.com>
3233
3234 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3235 to lwpid_of.
3236
32372014-02-27 Pedro Alves <palves@redhat.com>
3238
3239 PR 12702
3240 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3241 macros.
3242 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3243 output.
3244 (last_thread_of_process_p): Take a PID argument instead of a
3245 thread pointer.
3246 (linux_wait_for_lwp): Delete.
3247 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3248 functions.
3249 (linux_low_filter_event): New function, party factored out from
3250 linux_wait_for_event.
3251 (linux_wait_for_event): Rename to ...
3252 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3253 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3254 sigsuspend. Check for zombie leaders.
3255 (linux_wait_for_event): Reimplement as wrapper around
3256 linux_wait_for_event_filtered.
3257 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3258 a normal or signal exit is seen, it's the whole process exiting.
3259 (wait_for_sigstop): No longer a for_each_inferior callback.
3260 Rewrite on top of linux_wait_for_event_filtered.
3261 (stop_all_lwps): Call wait_for_sigstop directly.
3262 * server.c (resume, handle_target_event): Handle
3263 TARGET_WAITKIND_NO_RESUMED.
3264
32652014-02-26 Joel Brobecker <brobecker@adacore.com>
3266
3267 * win32-low.c (psapi_get_dll_name,
3268 * win32_CreateToolhelp32Snapshot): Delete.
3269 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3270 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3271 Delete.
3272 (handle_load_dll): Add function description.
3273 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3274
32752014-02-26 Joel Brobecker <brobecker@adacore.com>
3276
3277 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3278 Add comment.
3279 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3280 base address when calling win32_add_one_solib.
3281 (handle_load_dll): Delete local variable load_addr.
3282 Remove 0x1000 offset applied to DLL base address when calling
3283 win32_add_one_solib.
3284 (handle_unload_dll): Add comment.
3285
32862014-02-26 Joel Brobecker <brobecker@adacore.com>
3287
3288 * win32-low.c (win32_add_all_dlls): Renames
3289 win32_ensure_ntdll_loaded. Rewrite function documentation.
3290 Adjust implementation to always load all DLLs.
3291 Add 0x1000 offset to DLL base address when calling
3292 win32_add_one_solib.
3293 (child_initialization_done): New static global.
3294 (do_initial_child_stuff): Set child_initialization_done to
3295 zero during child initialization, and 1 after. Replace call
3296 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3297 Add comment.
3298 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3299 (handle_unload_dll): Add function documentation.
3300 (get_child_debug_event): Ignore load and unload DLL events
3301 during child initialization.
3302
33032014-02-20 Doug Evans <dje@google.com>
3304
3305 Remove global all_lwps.
3306 * inferiors.h (ptid_of): Move here from linux-low.h.
3307 (pid_of, lwpid_of): Ditto.
3308 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3309 parameter is a struct thread_info * now.
3310 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3311 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3312 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3313 directly.
3314 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3315 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3316 * linux-arm-low.c (update_registers_callback): Update, "entry"
3317 parameter is a struct thread_info * now.
3318 Fetch lwpid from current_inferior directly.
3319 (arm_insert_point): Pass &all_threads to find_inferior instead of
3320 &all_lwps.
3321 (arm_remove_point): Ditto.
3322 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3323 (arm_prepare_to_resume): Fetch pid from thread.
3324 (arm_read_description): Fetch lwpid from current_inferior directly.
3325 * linux-low.c (all_lwps): Delete.
3326 (delete_lwp): Delete call to remove_inferior.
3327 (handle_extended_wait): Fetch lwpid from thread.
3328 (add_lwp): Don't set lwp->entry.id. Remove call to
3329 add_inferior_to_list.
3330 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3331 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3332 (kill_one_lwp_callback): Ditto.
3333 (linux_kill): Don't dereference NULL pointer.
3334 Fetch ptid,lwpid from thread.
3335 (get_detach_signal): Fetch ptid from thread.
3336 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3337 Simplify call to regcache_invalidate_thread.
3338 (delete_lwp_callback): Update, "entry" parameter is a
3339 struct thread_info * now. Fetch pid from thread.
3340 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3341 (status_pending_p_callback): Update, "entry" parameter is a
3342 struct thread_info * now. Fetch ptid from thread.
3343 (find_lwp_pid): Update, "entry" parameter is a
3344 struct thread_info * now.
3345 (linux_wait_for_lwp): Fetch pid from thread.
3346 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3347 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3348 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3349 (dequeue_one_deferred_signal): Ditto.
3350 (cancel_breakpoint): Fetch ptid from current_inferior.
3351 (linux_wait_for_event): Pass &all_threads to find_inferior,
3352 not &all_lwps. Fetch ptid, lwpid from thread.
3353 (count_events_callback): Update, "entry" parameter is a
3354 struct thread_info * now.
3355 (select_singlestep_lwp_callback): Ditto.
3356 (select_event_lwp_callback): Ditto.
3357 (cancel_breakpoints_callback): Ditto.
3358 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3359 not &all_lwps.
3360 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3361 (unsuspend_one_lwp): Update, "entry" parameter is a
3362 struct thread_info * now.
3363 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3364 not &all_lwps.
3365 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3366 Fetch lwpid from thread, not lwp.
3367 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3368 Pass &all_threads to find_inferior, not &all_lwps.
3369 (send_sigstop): Fetch lwpid from thread, not lwp.
3370 (send_sigstop_callback): Update, "entry" parameter is a
3371 struct thread_info * now.
3372 (suspend_and_send_sigstop_callback): Ditto.
3373 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3374 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3375 struct thread_info * now.
3376 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3377 from thread, lwp.
3378 (lwp_running): Update, "entry" parameter is a
3379 struct thread_info * now.
3380 (stop_all_lwps): Fetch ptid from thread.
3381 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3382 (linux_resume_one_lwp): Fetch lwpid from thread.
3383 (linux_set_resume_request): Update, "entry" parameter is a
3384 struct thread_info * now. Fetch pid, lwpid from thread.
3385 (resume_status_pending_p): Update, "entry" parameter is a
3386 struct thread_info * now.
3387 (need_step_over_p): Ditto. Fetch lwpid from thread.
3388 (start_step_over): Fetch lwpid from thread.
3389 (linux_resume_one_thread): Update, "entry" parameter is a
3390 struct thread_info * now. Fetch lwpid from thread.
3391 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3392 (proceed_one_lwp): Update, "entry" parameter is a
3393 struct thread_info * now. Fetch lwpid from thread.
3394 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3395 struct thread_info * now.
3396 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3397 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3398 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3399 directly.
3400 (regsets_store_inferior_registers): Ditto.
3401 (fetch_register, store_register): Ditto.
3402 (linux_read_memory, linux_write_memory): Ditto.
3403 (linux_request_interrupt): Ditto.
3404 (linux_read_auxv): Ditto.
3405 (linux_xfer_siginfo): Ditto.
3406 (linux_qxfer_spu): Ditto.
3407 (linux_qxfer_libraries_svr4): Ditto.
3408 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3409 moved to inferiors.h.
3410 (get_lwp): Delete.
3411 (get_thread_lwp): Update.
3412 (struct lwp_info): Delete member "entry". Simplify comment for
3413 member "thread".
3414 (all_lwps): Delete.
3415 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3416 current_inferior directly.
3417 (update_watch_registers_callback): Update, "entry" parameter is a
3418 struct thread_info * now. Fetch pid from thread.
3419 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3420 (mips_insert_point): Fetch lwpid from current_inferior.
3421 Pass &all_threads to find_inferior, not &all_lwps.
3422 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3423 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3424 directly.
3425 (mips_stopped_data_address): Ditto.
3426 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3427 directly.
3428 * linux-tile-low.c (tile_arch_setup): Ditto.
3429 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3430 (update_debug_registers_callback): Update, "entry" parameter is a
3431 struct thread_info * now. Fetch pid from thread.
3432 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3433 Pass &all_threads to find_inferior, not &all_lwps.
3434 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3435 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3436 Pass &all_threads to find_inferior, not &all_lwps.
3437 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3438 (i386_dr_low_get_status): Ditto.
3439 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3440 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3441 (x86_linux_read_description): Ditto.
3442 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3443
34442014-02-20 Doug Evans <dje@google.com>
3445
3446 * inferiors.c (get_first_inferior): Fix buglet.
3447
34482014-02-19 Doug Evans <dje@google.com>
3449
3450 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3451 * inferiors.c (add_thread): Change result type to struct thread_info *.
3452 All callers updated.
3453 (add_lwp): Call add_thread here instead of in callers.
3454 All callers updated.
3455 * linux-low.h (get_lwp_thread): Rewrite.
3456 (struct lwp_info): New member "thread".
3457
34582014-02-19 Doug Evans <dje@google.com>
3459
3460 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3461 All callers updated.
3462
34632014-02-19 Doug Evans <dje@google.com>
3464
3465 * inferiors.c (add_thread): Fix whitespace.
3466
34672014-02-19 Doug Evans <dje@google.com>
3468
3469 * dll.c (clear_dlls): Replace accessing list implemention details
3470 with API function.
3471 * gdbthread.h (get_first_thread): Declare.
3472 * inferiors.c (for_each_inferior_with_data): New function.
3473 (get_first_thread): New function.
3474 (find_thread_ptid): Simplify.
3475 (get_first_inferior): New function.
3476 (clear_list): Delete.
3477 (one_inferior_p): New function.
3478 (clear_inferior_list): New function.
3479 (clear_inferiors): Update.
3480 * inferiors.h (for_each_inferior_with_data): Declare.
3481 (clear_inferior_list): Declare.
3482 (one_inferior_p): Declare.
3483 (get_first_inferior): Declare.
3484 * linux-low.c (linux_wait_for_event): Replace accessing list
3485 implemention details with API function.
3486 * server.c (target_running): Ditto.
3487 (accumulate_file_name_length): New function.
3488 (emit_dll_description): New function.
3489 (handle_qxfer_libraries): Replace accessing list implemention
3490 details with API function.
3491 (handle_qxfer_threads_worker): New function.
3492 (handle_qxfer_threads_proper): Replace accessing list implemention
3493 details with API function.
3494 (handle_query): Ditto.
3495 (visit_actioned_threads_callback_ftype): New typedef.
3496 (visit_actioned_threads_data): New struct.
3497 (visit_actioned_threads): Rewrite to be find_inferior callback.
3498 (resume): Call find_inferior.
3499 (handle_status): Replace accessing list implemention
3500 details with API function.
3501 (process_serial_event): Replace accessing list implemention details
3502 with API function.
3503 * target.c (set_desired_inferior): Replace accessing list implemention
3504 details with API function.
3505 * tracepoint.c (same_process_p): New function.
3506 (gdb_agent_about_to_close): Replace accessing list implemention
3507 details with API function.
3508 * win32-low.c (child_delete_thread): Replace accessing list
3509 implemention details with API function.
3510 (match_dll_by_basename): New function.
3511 (dll_is_loaded_by_basename): New function.
3512 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3513 details call to dll_is_loaded_by_basename.
3514
35152014-02-19 Doug Evans <dje@google.com>
3516
3517 * dll.h (struct dll_info): Add comment.
3518 * gdbthread.h (struct thread_info): Add comment.
3519 (current_ptid): Simplify.
3520 * inferiors.c (add_process): Update.
3521 (remove_process): Update.
3522 * inferiors.h (struct process_info): Rename member "head" to "entry".
3523 * linux-low.c (delete_lwp): Update.
3524 (add_lwp): Update.
3525 (last_thread_of_process_p): Update.
3526 (kill_one_lwp_callback, linux_kill): Update.
3527 (status_pending_p_callback): Update.
3528 (wait_for_sigstop): Update. Simplify read of ptid.
3529 (start_step_over): Update.
3530 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3531 (get_lwp_thread): Update.
3532 (struct lwp_info): Rename member "head" to "entry".
3533 * regcache.h (inferior_list_entry): Delete.
3534 * server.c (kill_inferior_callback): Update.
3535 (detach_or_kill_inferior_callback): Update.
3536 (print_started_pid): Update.
3537 (print_attached_pid): Update.
3538 (process_serial_event): Simplify read of ptid.
3539 * thread-db.c (thread_db_create_event): Update.
3540 (thread_db_get_tls_address): Update.
3541 * win32-low.c (current_inferior_ptid): Simplify.
3542
35432014-02-19 Tom Tromey <tromey@redhat.com>
3544
3545 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3546 argument.
3547 (target_supports_btrace): Update.
3548
35492014-02-14 Yao Qi <yao@codesourcery.com>
3550
3551 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3552 (rsp-low-ipa.o): New target.
3553
35542014-02-12 Tom Tromey <tromey@redhat.com>
3555
3556 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3557 convert_ascii_to_int.
3558 * regcache.c (registers_to_string): Likewise.
3559 * remote-utils.c (decode_M_packet): Likewise.
3560 * server.c (process_serial_event): Likewise.
3561
35622014-02-12 Tom Tromey <tromey@redhat.com>
3563
3564 * server.c (handle_query, handle_v_run): Use hex2bin, not
3565 unhexify.
3566 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3567
35682014-02-12 Tom Tromey <tromey@redhat.com>
3569
3570 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3571 convert_int_to_ascii.
3572 * regcache.c (registers_to_string, collect_register_as_string):
3573 Likewise.
3574 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3575 Likewise.
3576 * server.c (process_serial_event): Likewise.
3577 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3578 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3579
35802014-02-12 Tom Tromey <tromey@redhat.com>
3581
3582 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3583 bin2hex, not hexify.
3584 * tracepoint.c (cmd_qtstatus): Likewise.
3585
35862014-02-12 Tom Tromey <tromey@redhat.com>
3587
3588 * remote-utils.c (monitor_output): Pass explicit length to
3589 hexify.
3590
35912014-02-12 Tom Tromey <tromey@redhat.com>
3592
3593 * tracepoint.c: Include rsp-low.h.
3594 * server.c: Include rsp-low.h.
3595 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3596 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3597 declare.
3598 * remote-utils.c: Include rsp-low.h.
3599 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3600 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3601 (convert_int_to_ascii, convert_ascii_to_int): Move to
3602 common/rsp-low.c.
3603 * regcache.c: Include rsp-low.h.
3604 * ax.c: Include rsp-low.h.
3605 * Makefile.in (SFILES): Add common/rsp-low.c.
3606 (OBS): Add rsp-low.o.
3607 (rsp-low.o): New target.
3608
36092014-02-12 Tom Tromey <tromey@redhat.com>
3610
3611 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3612 Include print-utils.h.
3613 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3614 (plongest, thirty_two, phex_nz): Remove.
3615 * Makefile.in (SFILES): Add common/print-utils.c.
3616 (OBS): Add print-utils.o.
3617 (print-utils-ipa.o): New target.
3618 (print-utils.o): New target.
3619 (IPA_OBJS): Add print-utils-ipa.o.
3620
36212014-02-06 Tom Tromey <tromey@redhat.com>
3622
3623 * Makefile.in (SFILES): Fix indentation.
3624
36252014-02-05 Doug Evans <dje@google.com>
3626
3627 * linux-low.c (linux_wait_for_event): Improve comment.
3628 (linux_wait_1): Keep current_inferior in sync with event_child.
3629
36302014-01-22 Doug Evans <dje@google.com>
3631
3632 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3633
36342014-01-22 Doug Evans <dje@google.com>
3635
3636 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3637 * configure: Regenerate.
3638 * config.in: Regenerate.
3639 * Makefile.in (SFILES): Add debug.c.
3640 (OBS): Add debug.o.
3641 * debug.c: New file.
3642 * debug.h: New file.
3643 * linux-aarch64-low.c (*): Update all debugging printfs to use
3644 debug_printf instead of fprintf.
3645 * linux-arm-low.c (*): Ditto.
3646 * linux-cris-low.c (*): Ditto.
3647 * linux-crisv32-low.c (*): Ditto.
3648 * linux-m32r-low.c (*): Ditto.
3649 * linux-sparc-low.c (*): Ditto.
3650 * linux-x86.c (*): Ditto.
3651 * linux-low.c (*): Ditto.
3652 (linux_wait_1): Add calls to debug_enter, debug_exit.
3653 (linux_wait): Remove redundant debugging printf.
3654 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3655 (linux_resume, unstop_all_lwps): Ditto.
3656 * mem-break.c (*): Update all debugging printfs to use
3657 debug_printf instead of fprintf.
3658 * remote-utils.c (*): Ditto.
3659 * thread-db.c (*): Ditto.
3660 * server.c #include <ctype.h>, "gdb_vecs.h".
3661 (debug_threads): Moved to debug.c.
3662 (*): Update all debugging printfs to use debug_printf instead of
3663 fprintf.
3664 (start_inferior): Replace call to fflush with call to debug_flush.
3665 (monitor_show_help): Mention set debug-format.
3666 (parse_debug_format_options): New function.
3667 (handle_monitor_command): Handle "monitor set debug-format".
3668 (gdbserver_usage): Mention --debug-format.
3669 (main): Parse --debug-format.
3670 * server.h (debug_threads): Declaration moved to debug.h.
3671 #include "debug.h".
3672 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3673 trace_debug_1 that uses debug_printf.
3674 (tracepoint_look_up_symbols): Update all debugging printfs to use
3675 debug_printf instead of fprintf.
3676
36772014-01-20 Baruch Siach <baruch@tkos.co.il>
3678
3679 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3680 sys/ptrace.h.
3681
36822014-01-17 Pedro Alves <palves@redhat.com>
3683
3684 PR build/16445
3685 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3686 defined after including gdb_proc_service.h.
3687
36882014-01-16 Doug Evans <dje@google.com>
3689
3690 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3691 (match_dll): Use it.
3692
36932014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3694
3695 * target.h (target_ops) <read_btrace>: Change parameters and
3696 return type to allow error reporting.
3697 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3698 trace reading errors on.
3699 * linux-low.c (linux_low_read_btrace): Pass trace reading
3700 errors on.
3701 (linux_low_disable_btrace): New.
3702
37032014-01-15 Doug Evans <dje@google.com>
3704
3705 * inferiors.c (thread_id_to_gdb_id): Delete.
3706 * inferiors.h (thread_id_to_gdb_id): Delete.
3707
37082014-01-13 Eli Zaretskii <eliz@gnu.org>
3709
3710 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3711 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3712 versions.
3713
37142014-01-08 Pedro Alves <palves@redhat.com>
3715
3716 * server.c (handle_status): Don't discard previous queued stop
3717 replies or thread's pending status here.
3718 (main) <disconnection>: Do it here instead.
3719
37202014-01-08 Pedro Alves <palves@redhat.com>
3721
3722 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3723 * server.c (visit_actioned_threads, handle_pending_status): New
3724 function.
3725 (handle_v_cont): Factor out parts to ...
3726 (resume): ... this new function. If in all-stop, and a thread
3727 being resumed has a pending status, report it without actually
3728 resuming.
3729 (myresume): Adjust to use the new 'resume' function.
3730 (clear_pending_status_callback, set_pending_status_callback)
3731 (find_status_pending_thread_callback): New functions.
3732 (handle_status): Handle the case of multiple threads having
3733 interesting statuses to report. Report threads' real last signal
3734 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3735 with an interesting thread to report the status for, instead of
3736 always reporting the status of the first thread.
3737
37382014-01-01 Joel Brobecker <brobecker@adacore.com>
3739
3740 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3741 * gdbreplay.c (gdbreplay_version): Likewise.
3742
37432013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3744
3745 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3746 iov.iov_len with the real length in use.
3747
37482013-12-13 Joel Brobecker <brobecker@adacore.com>
3749
3750 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3751 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3752 for all targets that use win32-low.c.
3753 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3754 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3755
37562013-12-13 Pedro Alves <palves@redhat.com>
3757
3758 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3759 if equal to TARGET_WAITKIND_LOADED.
3760 * win32-low.c (cached_status): New static global.
3761 (win32_wait): Add declaration.
3762 (do_initial_child_stuff): Flush all initial pending debug events
3763 up to the initial breakpoint.
3764 (win32_wait): If CACHED_STATUS was set, return that instead
3765 of doing a real wait. Remove the code resuming the execution
3766 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3767 during the initial phase. Also remove the code changing
3768 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3769 TARGET_WAITKIND_STOPPED.
3770
37712013-12-11 Yao Qi <yao@codesourcery.com>
3772
3773 * notif.c (handle_notif_ack): Return 0 if no notification
3774 matches.
3775
37762013-11-20 Doug Evans <dje@google.com>
3777
3778 * linux-low.c (linux_set_resume_request): Fix comment.
3779
37802013-11-20 Doug Evans <dje@google.com>
3781
3782 * linux-low.c (resume_status_pending_p): Tweak comment.
3783
37842013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3785
3786 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3787 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3788 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3789 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3790 (srv_amd64_regobj): Add amd64-mpx.o.
3791 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3792 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3793 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3794 * i387-fp.c (num_pl_bnd_register) Added constant.
3795 (num_pl_bnd_cfg_registers) Added constant.
3796 (struct i387_xsave) Added reserved area and MPX fields.
3797 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3798 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3799 function.
3800 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3801 (init_registers_amd64_mpx_linux): Declare new function.
3802 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3803 (x86_64_regmap): Add MPX registers.
3804 (x86_linux_read_description): Add MPX case.
3805 (initialize_low_arch): Initialize MPX targets.
3806
38072013-11-18 Tom Tromey <tromey@redhat.com>
3808
3809 * configure: Rebuild.
3810 * configure.ac: Don't check for stdlib.h.
3811 * gdbreplay.c: Unconditionally include stdlib.h.
3812
38132013-11-18 Tom Tromey <tromey@redhat.com>
3814
3815 * config.in: Rebuild.
3816 * configure: Rebuild.
3817 * configure.ac: Don't use AC_HEADER_DIRENT.
3818
38192013-11-18 Tom Tromey <tromey@redhat.com>
3820
3821 * server.h: Don't check HAVE_STRING_H.
3822 * gdbreplay.c: Don't check HAVE_STRING_H.
3823 * configure: Rebuild.
3824
38252013-11-18 Tom Tromey <tromey@redhat.com>
3826
3827 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3828 LIBGNU.
3829
38302013-11-08 Tom Tromey <tromey@redhat.com>
3831
3832 * configure, config.in: Rebuild.
3833 * configure.ac: Remove unused configury.
3834
38352013-11-08 Tom Tromey <tromey@redhat.com>
3836
3837 * acinclude.m4: Include common.m4, codeset.m4.
3838 * configure, config.in: Rebuild.
3839 * configure.ac: Use GDB_AC_COMMON.
3840
38412013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3842
3843 * linux-s390-low.c (HWCAP_S390_TE): New define.
3844 (s390_arch_setup): Consider the TE field in the HWCAP for
3845 determining 'have_regset_tdb'.
3846
38472013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3848
3849 PR gdb/16014
3850 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3851 call to sizeof.
3852
38532013-10-02 Pedro Alves <palves@redhat.com>
3854
3855 * server.c (process_serial_event): Don't output "GDBserver
3856 exiting" if GDB is connected through stdio.
3857 * target.c (mywait): Likewise, be silent if GDB is connected
3858 through stdio.
3859
38602013-10-01 Joel Brobecker <brobecker@adacore.com>
3861
3862 * lynx-low.c (lynx_add_threads_after_attach): New function.
3863 (lynx_attach): Remove call to add_thread. Add call to
3864 lynx_add_threads_after_attach instead.
3865
38662013-09-28 Mike Frysinger <vapier@gentoo.org>
3867
3868 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3869 * config.in, configure: Regenerated.
3870
38712013-09-18 Yao Qi <yao@codesourcery.com>
3872
3873 PR server/15959
3874 * server.c (start_inferior): Clear 'resume_info'.
3875
38762013-09-16 Jiong Wang <jiwang@tilera.com>
3877
3878 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3879 for each register.
3880
38812013-09-16 Jiong Wang <jiwang@tilera.com>
3882
3883 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3884 linux-tile-low.o to srv_tgtobj.
3885
38862013-09-16 Will Newton <will.newton@linaro.org>
3887
3888 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3889 out regs.
3890
38912013-09-06 Pedro Alves <palves@redhat.com>
3892
3893 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3894 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3895 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3896 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3897 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3898 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3899
39002013-09-06 Pedro Alves <palves@redhat.com>
3901
3902 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3903 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3904
39052013-09-06 Pedro Alves <palves@redhat.com>
3906
3907 * linux-amd64-ipa.c: Include tracepoint.h.
3908 * linux-i386-ipa.c: Include tracepoint.h.
3909
39102013-09-06 Ricard Wanderlof <ricardw@axis.com>
3911
3912 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3913 (ps_get_thread_area): New function.
3914
39152013-09-06 Ricard Wanderlof <ricardw@axis.com>
3916
3917 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3918 (initialize_low_arch): Call init_registers_crisv32 rather than
3919 init_register_crisv32.
3920
39212013-09-05 Pedro Alves <palves@redhat.com>
3922
3923 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3924 to ...
3925 * hostio.h: ... this new file.
3926 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3927 win32-low.c: Include hostio.h.
3928
39292013-09-05 Pedro Alves <palves@redhat.com>
3930
3931 * server.h (gdb_client_data, handler_func, callback_handler_func)
3932 (delete_file_handler, add_file_handler, append_callback_event)
3933 (delete_callback_event, start_event_loop, initialize_event_loop):
3934 Move to event-loop.h and include it.
3935 * event-loop.h: New file.
3936
39372013-09-05 Pedro Alves <palves@redhat.com>
3938
3939 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3940 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3941 (loaded_dll, unloaded_dll): Move to ...
3942 * dll.h: ... this new file.
3943 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3944
39452013-09-05 Pedro Alves <palves@redhat.com>
3946
3947 * server.h (current_process, get_thread_process, all_processes)
3948 (add_inferior_to_list, for_each_inferior, current_inferior)
3949 (remove_inferior, add_process, remove_process, find_process_pid)
3950 (have_started_inferiors_p, have_attached_inferiors_p)
3951 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3952 (clear_inferiors, find_inferior, find_inferior_id)
3953 (inferior_target_data, set_inferior_target_data)
3954 (inferior_regcache_data, set_inferior_regcache_data): Move to
3955 inferiors.h, and include it.
3956 * inferiors.h: New file.
3957
39582013-09-05 Pedro Alves <palves@redhat.com>
3959
3960 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3961 Move ...
3962 * ax.h: ... here.
3963
39642013-09-05 Pedro Alves <palves@redhat.com>
3965
3966 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3967 tracepoint.h.
3968 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3969 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3970 (handle_tracepoint_general_set, handle_tracepoint_query)
3971 (tracepoint_finished_step, tracepoint_was_hit)
3972 (release_while_stepping_state_list, current_traceframe)
3973 (in_readonly_region, traceframe_read_mem)
3974 (fetch_traceframe_registers, traceframe_read_sdata)
3975 (traceframe_read_info, struct fast_tpoint_collect_status)
3976 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3977 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3978 (supply_fast_tracepoint_registers)
3979 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3980 (ipa_tdesc, claim_trampoline_space)
3981 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3982 (agent_mem_read, agent_get_trace_state_variable_value)
3983 (agent_set_trace_state_variable_value, agent_tsv_read)
3984 (agent_mem_read_string, get_raw_reg_func_addr)
3985 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3986 * tracepoint.h: ... this new file.
3987
39882013-09-05 Pedro Alves <palves@redhat.com>
3989
3990 * server.h (perror_with_name, error, fatal, warning, paddress)
3991 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3992 include it.
3993 * utils.h: New file.
3994
39952013-09-05 Pedro Alves <palves@redhat.com>
3996
3997 * server.h (remote_debug, noack_mode, transport_is_reliable)
3998 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3999 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4000 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4001 (write_enn, initialize_async_io, enable_async_io)
4002 (disable_async_io, check_remote_input_interrupt_request)
4003 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4004 (dead_thread_notify, prepare_resume_reply)
4005 (decode_address_to_semicolon, decode_address, decode_m_packet)
4006 (decode_M_packet, decode_X_packet, decode_xfer_write)
4007 (decode_search_memory_packet, unhexify, hexify)
4008 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4009 (look_up_one_symbol, relocate_instruction)
4010 (monitor_output): Move to remote-utils.h, and include it.
4011 * remote-utils.h: New file.
4012
40132013-09-05 Pedro Alves <palves@redhat.com>
4014
4015 * server.h (_): Delete.
4016
40172013-09-02 Pedro Alves <palves@redhat.com>
4018
4019 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4020 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4021 allocated.
4022 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4023
40242013-09-02 Pierre Muller <muller@sourceware.org>
4025
4026 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4027 or WriteProcessMemory complete successfully and handle
4028 ERROR_PARTIAL_COPY error.
4029
40302013-09-02 Pedro Alves <palves@redhat.com>
4031
4032 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4033 error instead of EIO.
4034
40352013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4036
4037 PR server/15604
4038 * linux-low.c: Include filestuff.h.
4039 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4040 * lynx-low.c: Include filestuff.h.
4041 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4042 * server.c: Include filestuff.h.
4043 (main): Call notice_open_fds.
4044 * spu-low.c: Include filestuff.h.
4045 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4046
40472013-08-22 Luis Machado <lgustavo@codesourcery.com>
4048
4049 * Makefile.in: Explain why ../target and ../nat are not
4050 listed as include file search paths.
4051 (linux-waitpid.o): New object file rule.
4052 * configure.srv (srv_native_linux_obj): New variable.
4053 Replace all occurrences of linux native object files with
4054 $srv_native_linux_obj.
4055 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4056 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4057 (linux_enable_event_reporting): Remove declaration.
4058 (my_waitpid): Moved to common/linux-waitpid.c.
4059 (linux_wait_for_event): Pass ptid when calling
4060 linux_enable_event_reporting.
4061 (linux_supports_tracefork_flag): Remove.
4062 (linux_enable_event_reporting): Likewise.
4063 (linux_tracefork_grandchild): Remove.
4064 (STACK_SIZE): Moved to common/linux-ptrace.c.
4065 (linux_tracefork_child): Remove.
4066 (linux_test_for_tracefork): Remove.
4067 (linux_look_up_symbols): Call linux_supports_traceclone.
4068 (initialize_low): Remove call to linux_test_for_tracefork.
4069 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4070 common/linux-ptrace.h.
4071 (PTRACE_TYPE_ARG4): Likewise.
4072 Include linux-ptrace.h.
4073
40742013-08-21 Pedro Alves <palves@redhat.com>
4075
4076 * config.in: Renegerate.
4077
40782013-08-19 Luis Machado <lgustavo@codesourcery.com>
4079
4080 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4081 (SFILES): Remove $(srcdir)/common/target-common.c and
4082 add $(srcdir)/target/waitstatus.c.
4083 (OBS): Remove target-common.o and add waitstatus.o.
4084 (server_h): Remove $(srcdir)/../common/target-common.h and
4085 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4086 and $(srcdir)/../target/waitstatus.h.
4087 (target-common.o): Remove.
4088 (waitstatus.o): New target object file.
4089 * target.h: Do not include target-common.h and
4090 include target/resume.h, target/wait.h and
4091 target/waitstatus.h.
4092
40932013-08-13 Luis Machado <lgustavo@codesourcery.com>
4094
4095 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4096 to PTRACE_TYPE_ARG3.
4097 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4098 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4099 PTRACE_TYPE_ARG4.
4100 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4101 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4102
41032013-07-27 Jie Zhang <jie@codesourcery.com>
4104 Daniel Jacobowitz <dan@codesourcery.com>
4105 Yao Qi <yao@codesourcery.com>
4106
4107 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4108 (mips-linux-watch.o): New rule.
4109 (mips_linux_watch_h): New variable.
4110 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4111 srv_tgtobj.
4112 * linux-mips-low.c: Include mips-linux-watch.h.
4113 (struct arch_process_info, struct arch_lwp_info): New.
4114 (update_watch_registers_callback): New function.
4115 (mips_linux_new_process, mips_linux_new_thread) New functions.
4116 (mips_linux_prepare_to_resume, mips_insert_point): New
4117 functions.
4118 (mips_remove_point, mips_stopped_by_watchpoint): New
4119 functions.
4120 (rsp_bp_type_to_target_hw_bp_type): New function.
4121 (mips_stopped_data_address): New function.
4122 (the_low_target): Add watchpoint support functions.
4123
41242013-07-27 Yao Qi <yao@codesourcery.com>
4125
4126 * i386-low.c: Include break-common.h.
4127 (enum target_hw_bp_type): Remove.
4128
41292013-07-24 Luis Machado <lgustavo@codesourcery.com>
4130
4131 * Makefile.in (SFILES): /common/target-common.c.
4132 (OBS): Add target-common.o.
4133 (server_h): Add $(srcdir)/../common/target-common.h.
4134 (target-common.o): New target.
4135 * server.c (queue_stop_reply_callback): Free
4136 status string after use.
4137 * target.c (target_waitstatus_to_string): Remove.
4138 * target.h: Include target-common.h.
4139 (resume_kind): Likewise.
4140 (target_waitkind): Likewise.
4141 (target_waitstatus): Likewise.
4142 (TARGET_WNOHANG): Likewise.
4143
41442013-07-04 Yao Qi <yao@codesourcery.com>
4145
4146 * Makefile.in (host_alias): Use @host_noncanonical@.
4147 (target_alias): Use @target_noncanonical@.
4148 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4149 ACX_NONCANONICAL_HOST.
4150 * configure: Regenerated.
4151
4152 Revert:
4153 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4154
4155 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4156 * configure: Rebuild.
4157 * Makefile.in (version_host, version_target): Get from configure.
4158 (version.c): Use $(version_host) and $(version_target).
4159
41602013-07-03 Pedro Alves <palves@redhat.com>
4161
4162 * Makefile.in (config.status): Depend on development.sh.
4163 * acinclude.m4: Include libmcheck.m4.
4164 * configure: Regenerate.
4165
41662013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4167
4168 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4169 attribute inside the parentheses.
4170 (winapi_DebugSetProcessKillOnExit): Ditto.
4171 (winapi_DebugBreakProcess): Ditto.
4172 (winapi_GenerateConsoleCtrlEvent): Ditto.
4173
41742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4175
4176 * notif.h (notif_event): Add a dummy member to avoid compiler
4177 errors.
4178
41792013-07-01 Pedro Alves <palves@redhat.com>
4180
4181 * hostio.c (HOSTIO_PATH_MAX): Define.
4182 (require_filename, handle_open, handle_unlink, handle_readlink):
4183 Use it.
4184
41852013-07-01 Pedro Alves <palves@redhat.com>
4186
4187 * server.h: Include "pathmax.h".
4188 * linux-low.c: Don't include sys/param.h.
4189 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4190 MAXPATHLEN.
4191 * win32-low.c: Don't include sys/param.h.
4192 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4193
41942013-07-01 Pedro Alves <palves@redhat.com>
4195
4196 * event-loop.c: Don't check HAVE_UNISTD_H before including
4197 <unistd.h>.
4198 * gdbreplay.c: Likewise.
4199 * remote-utils.c: Likewise.
4200 * server.c: Likewise.
4201 * configure.ac: Don't check for unistd.h.
4202 * configure: Regenerate.
4203
42042013-06-28 Tom Tromey <tromey@redhat.com>
4205
4206 * Makefile.in (version.c): Use version.in, not
4207 common/version.in.
4208
42092013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4210
4211 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4212 * configure: Rebuild.
4213 * Makefile.in (version_host, version_target): Get from configure.
4214 (version.c): Use $(version_host) and $(version_target).
4215
42162013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4217
4218 Fix trace-status to output user name without trailing colon.
4219 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4220
42212013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4222
4223 Fix trace-status to output proper start-time and stop-time.
4224 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4225 output start time and stop time in hex as gdb expects.
4226
42272013-06-26 Pedro Alves <pedro@codesourcery.com>
4228
4229 * tracepoint.c (build_traceframe_info_xml): Output trace state
4230 variables present in the trace buffer.
4231
42322013-06-24 Tom Tromey <tromey@redhat.com>
4233
4234 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4235 create-version.sh.
4236 (version.o): Remove.
4237 * gdbreplay.c: Include version.h.
4238 (version, host_name): Don't declare.
4239 * server.h: Include version.h.
4240 (version, host_name): Don't declare.
4241
42422013-06-12 Pedro Alves <palves@redhat.com>
4243
4244 * linux-x86-low.c (linux_is_elf64): Delete global.
4245 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4246 with local linux_pid_exe_is_elf_64_file use.
4247
42482013-06-11 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (regset_disabled, disable_regset): New functions.
4251 (regsets_fetch_inferior_registers)
4252 (regsets_store_inferior_registers): Use them.
4253 (initialize_regsets_info); Don't allocate the disabled_regsets
4254 array here.
4255 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4256 comment.
4257
42582013-06-11 Pedro Alves <palves@redhat.com>
4259
4260 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4261 xmalloc.
4262
42632013-06-11 Pedro Alves <palves@redhat.com>
4264
4265 * linux-x86-low.c (initialize_low_arch): Call
4266 init_registers_x32_avx_linux.
4267
42682013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4269
4270 Fix compatibility with Android Bionic.
4271 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4272 it is not empty.
4273
42742013-06-07 Pedro Alves <palves@redhat.com>
4275
4276 PR server/14823
4277 * Makefile.in (OBS): Add tdesc.o.
4278 (IPA_OBJS): Add tdesc-ipa.o.
4279 (tdesc-ipa.o): New rule.
4280 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4281 interface.
4282 * linux-low.c (new_inferior): Delete.
4283 (disabled_regsets, num_regsets): Delete.
4284 (linux_add_process): Adjust to set the new per-process
4285 new_inferior flag.
4286 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4287 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4288 was a stop. When calling arch_setup, switch the current inferior
4289 to the thread that got an event.
4290 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4291 (regsets_fetch_inferior_registers)
4292 (regsets_store_inferior_registers): New regsets_info parameter.
4293 Adjust to use it.
4294 (linux_register_in_regsets): New regs_info parameter. Adjust to
4295 use it.
4296 (register_addr, fetch_register, store_register): New usrregs_info
4297 parameter. Adjust to use it.
4298 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4299 parameter regs_info. Adjust to use it.
4300 (linux_fetch_registers): Get the current inferior's regs_info, and
4301 adjust to use it.
4302 (linux_store_registers): Ditto.
4303 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4304 (initialize_low): Don't initialize the target_regsets here. Call
4305 initialize_low_arch.
4306 * linux-low.h (target_regsets): Delete declaration.
4307 (struct regsets_info): New.
4308 (struct usrregs_info): New.
4309 (struct regs_info): New.
4310 (struct process_info_private) <new_inferior>: New field.
4311 (struct linux_target_ops): Delete the num_regs, regmap, and
4312 regset_bitmap fields. New field regs_info.
4313 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4314 * i387-fp.c (num_xmm_registers): Delete.
4315 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4316 calls to new interface.
4317 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4318 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4319 Infer the number of xmm registers from the regcache's target
4320 description.
4321 * i387-fp.h (num_xmm_registers): Delete.
4322 * inferiors.c (add_thread): Don't install the thread's regcache
4323 here.
4324 * proc-service.c (gregset_info): Fetch the current inferior's
4325 regs_info. Adjust to use it.
4326 * regcache.c: Include tdesc.h.
4327 (register_bytes, reg_defs, num_registers)
4328 (gdbserver_expedite_regs): Delete.
4329 (get_thread_regcache): If the thread doesn't have a regcache yet,
4330 create one, instead of aborting gdbserver.
4331 (regcache_invalidate_one): Rename to ...
4332 (regcache_invalidate_thread): ... this.
4333 (regcache_invalidate_one): New.
4334 (regcache_invalidate): Only invalidate registers of the current
4335 process.
4336 (init_register_cache): Add target_desc parameter, and use it.
4337 (new_register_cache): Ditto. Assert the target description has a
4338 non zero registers_size.
4339 (regcache_cpy): Add assertions. Adjust.
4340 (realloc_register_cache, set_register_cache): Delete.
4341 (registers_to_string, registers_from_string): Adjust.
4342 (find_register_by_name, find_regno, find_register_by_number)
4343 (register_cache_size): Add target_desc parameter, and use it.
4344 (free_register_cache_thread, free_register_cache_thread_one)
4345 (regcache_release, register_cache_size): New.
4346 (register_size): Add target_desc parameter, and use it.
4347 (register_data, supply_register, supply_register_zeroed)
4348 (supply_regblock, supply_register_by_name, collect_register)
4349 (collect_register_as_string, collect_register_by_name): Adjust.
4350 * regcache.h (struct target_desc): Forward declare.
4351 (struct regcache) <tdesc>: New field.
4352 (init_register_cache, new_register_cache): Add target_desc
4353 parameter.
4354 (regcache_invalidate_thread): Declare.
4355 (regcache_invalidate_one): Delete declaration.
4356 (regcache_release): Declare.
4357 (find_register_by_number, register_cache_size, register_size)
4358 (find_regno): Add target_desc parameter.
4359 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4360 declarations.
4361 * remote-utils.c: Include tdesc.h.
4362 (outreg, prepare_resume_reply): Adjust.
4363 * server.c: Include tdesc.h.
4364 (gdbserver_xmltarget): Delete declaration.
4365 (get_features_xml, process_serial_event): Adjust.
4366 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4367 declare.
4368 (struct process_info) <tdesc>: New field.
4369 (ipa_tdesc): Declare.
4370 * tdesc.c: New file.
4371 * tdesc.h: New file.
4372 * tracepoint.c: Include tdesc.h.
4373 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4374 (get_context_regcache): Adjust to pass ipa_tdesc down.
4375 (do_action_at_tracepoint): Adjust to get the register cache size
4376 from the context regcache's description.
4377 (traceframe_walk_blocks): Adjust to get the register cache size
4378 from the current trace frame's description.
4379 (traceframe_get_pc): Adjust to get current trace frame's
4380 description and pass it down.
4381 (gdb_collect): Adjust to get the register cache size from the
4382 IPA's description.
4383 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4384 (gdbserver_xmltarget): Delete.
4385 (initialize_low_tracepoint): Set the ipa's target description.
4386 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4387 (initialize_low_tracepoint): Set the ipa's target description.
4388 * linux-x86-low.c: Include tdesc.h.
4389 [__x86_64__] (is_64bit_tdesc): New.
4390 (ps_get_thread_area, x86_get_thread_area): Use it.
4391 (i386_cannot_store_register): Rename to ...
4392 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4393 (i386_cannot_fetch_register): Rename to ...
4394 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4395 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4396 to new interface.
4397 (target_regsets): Rename to ...
4398 (x86_regsets): ... this.
4399 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4400 interface.
4401 (x86_siginfo_fixup): Use is_64bit_tdesc.
4402 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4403 (tdesc_x32_avx_linux, tdesc_x32_linux)
4404 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4405 Declare.
4406 (x86_linux_update_xmltarget): Delete.
4407 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4408 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4409 (AMD64_LINUX_USER64_CS): New.
4410 (x86_linux_read_description): New, based on
4411 x86_linux_update_xmltarget.
4412 (same_process_callback): New.
4413 (x86_arch_setup_process_callback): New.
4414 (x86_linux_update_xmltarget): New.
4415 (x86_regsets_info): New.
4416 (amd64_linux_regs_info): New.
4417 (i386_linux_usrregs_info): New.
4418 (i386_linux_regs_info): New.
4419 (x86_linux_regs_info): New.
4420 (x86_arch_setup): Reimplement.
4421 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4422 (x86_emit_ops): Ditto.
4423 (the_low_target): Adjust. Install x86_linux_regs_info,
4424 x86_cannot_fetch_register, and x86_cannot_store_register.
4425 (initialize_low_arch): New.
4426 * linux-ia64-low.c (tdesc_ia64): Declare.
4427 (ia64_fetch_register): Adjust.
4428 (ia64_usrregs_info, regs_info): New globals.
4429 (ia64_regs_info): New function.
4430 (the_low_target): Adjust.
4431 (initialize_low_arch): New function.
4432 * linux-sparc-low.c (tdesc_sparc64): Declare.
4433 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4434 Adjust.
4435 (sparc_arch_setup): New function.
4436 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4437 (the_low_target): Adjust.
4438 (initialize_low_arch): New function.
4439 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4440 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4441 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4442 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4443 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4444 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4445 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4446 (tdesc_powerpc_isa205_vsx64l): Declare.
4447 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4448 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4449 (ppc_set_pc, ppc_get_hwcap): Adjust.
4450 (ppc_usrregs_info): Forward declare.
4451 (!__powerpc64__) ppc_regmap_adjusted: New global.
4452 (ppc_arch_setup): Adjust to the current process'es target
4453 description.
4454 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4455 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4456 (ppc_store_evrregset): Adjust.
4457 (target_regsets): Rename to ...
4458 (ppc_regsets): ... this, and make static.
4459 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4460 (ppc_regs_info): New function.
4461 (the_low_target): Adjust.
4462 (initialize_low_arch): New function.
4463 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4464 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4465 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4466 (tdesc_s390x_linux64v2): Declare.
4467 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4468 (s390_fill_gregset, s390_store_last_break): Adjust.
4469 (target_regsets): Rename to ...
4470 (s390_regsets): ... this, and make static.
4471 (s390_get_pc, s390_set_pc): Adjust.
4472 (s390_get_hwcap): New target_desc parameter, and use it.
4473 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4474 (s390_arch_setup): Adjust to set the current process'es target
4475 description. Don't adjust the regmap.
4476 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4477 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4478 (regs_info_3264): New globals.
4479 (s390_regs_info): New function.
4480 (the_low_target): Adjust.
4481 (initialize_low_arch): New function.
4482 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4483 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4484 [__mips64] (init_registers_mips_linux)
4485 (init_registers_mips_dsp_linux): Delete defines.
4486 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4487 (have_dsp): New global.
4488 (mips_read_description): New, based on mips_arch_setup.
4489 (mips_arch_setup): Reimplement.
4490 (get_usrregs_info): New function.
4491 (mips_cannot_fetch_register, mips_cannot_store_register)
4492 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4493 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4494 (target_regsets): Rename to ...
4495 (mips_regsets): ... this, and make static.
4496 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4497 (dsp_regs_info, regs_info): New globals.
4498 (mips_regs_info): New function.
4499 (the_low_target): Adjust.
4500 (initialize_low_arch): New function.
4501 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4502 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4503 Declare.
4504 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4505 (arm_read_description): New, with bits factored from
4506 arm_arch_setup.
4507 (arm_arch_setup): Reimplement.
4508 (target_regsets): Rename to ...
4509 (arm_regsets): ... this, and make static.
4510 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4511 (arm_regs_info): New function.
4512 (the_low_target): Adjust.
4513 (initialize_low_arch): New function.
4514 * linux-m68k-low.c (tdesc_m68k): Declare.
4515 (target_regsets): Rename to ...
4516 (m68k_regsets): ... this, and make static.
4517 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4518 (m68k_regs_info): New function.
4519 (m68k_arch_setup): New function.
4520 (the_low_target): Adjust.
4521 (initialize_low_arch): New function.
4522 * linux-sh-low.c (tdesc_sharch): Declare.
4523 (target_regsets): Rename to ...
4524 (sh_regsets): ... this, and make static.
4525 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4526 (sh_regs_info, sh_arch_setup): New functions.
4527 (the_low_target): Adjust.
4528 (initialize_low_arch): New function.
4529 * linux-bfin-low.c (tdesc_bfin): Declare.
4530 (bfin_arch_setup): New function.
4531 (bfin_usrregs_info, regs_info): New globals.
4532 (bfin_regs_info): New function.
4533 (the_low_target): Adjust.
4534 (initialize_low_arch): New function.
4535 * linux-cris-low.c (tdesc_cris): Declare.
4536 (cris_arch_setup): New function.
4537 (cris_usrregs_info, regs_info): New globals.
4538 (cris_regs_info): New function.
4539 (the_low_target): Adjust.
4540 (initialize_low_arch): New function.
4541 * linux-cris-low.c (tdesc_crisv32): Declare.
4542 (cris_arch_setup): New function.
4543 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4544 (cris_regs_info): New function.
4545 (the_low_target): Adjust.
4546 (initialize_low_arch): New function.
4547 * linux-m32r-low.c (tdesc_m32r): Declare.
4548 (m32r_arch_setup): New function.
4549 (m32r_usrregs_info, regs_info): New globals.
4550 (m32r_regs_info): Adjust.
4551 (initialize_low_arch): New function.
4552 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4553 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4554 (tic6x_usrregs_info): Forward declare.
4555 (tic6x_read_description): New function, based on ...
4556 (tic6x_arch_setup): ... this. Reimplement.
4557 (target_regsets): Rename to ...
4558 (tic6x_regsets): ... this, and make static.
4559 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4560 (tic6x_regs_info): New function.
4561 (the_low_target): Adjust.
4562 (initialize_low_arch): New function.
4563 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4564 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4565 (target_regsets): Rename to ...
4566 (xtensa_regsets): ... this, and make static.
4567 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4568 globals.
4569 (xtensa_arch_setup, xtensa_regs_info): New functions.
4570 (the_low_target): Adjust.
4571 (initialize_low_arch): New function.
4572 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4573 (nios2_arch_setup): Set the current process'es tdesc.
4574 (target_regsets): Rename to ...
4575 (nios2_regsets): ... this.
4576 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4577 (nios2_regs_info): New function.
4578 (the_low_target): Adjust.
4579 (initialize_low_arch): New function.
4580 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4581 (aarch64_arch_setup): Set the current process'es tdesc.
4582 (target_regsets): Rename to ...
4583 (aarch64_regsets): ... this.
4584 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4585 (aarch64_regs_info): New function.
4586 (the_low_target): Adjust.
4587 (initialize_low_arch): New function.
4588 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4589 globals.
4590 (target_regsets): Rename to ...
4591 (tile_regsets): ... this.
4592 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4593 (tile_regs_info): New function.
4594 (tile_arch_setup): Set the current process'es tdesc.
4595 (the_low_target): Adjust.
4596 (initialize_low_arch): New function.
4597 * spu-low.c (tdesc_spu): Declare.
4598 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4599 * win32-arm-low.c (tdesc_arm): Declare.
4600 (arm_arch_setup): New function.
4601 (the_low_target): Install arm_arch_setup instead of
4602 init_registers_arm.
4603 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4604 (init_windows_x86): Rename to ...
4605 (i386_arch_setup): ... this. Set `win32_tdesc'.
4606 (the_low_target): Adjust.
4607 * win32-low.c (win32_tdesc): New global.
4608 (child_add_thread): Don't create the thread cache here.
4609 (do_initial_child_stuff): Set the new process'es tdesc.
4610 * win32-low.h (struct target_desc): Forward declare.
4611 (win32_tdesc): Declare.
4612 * lynx-i386-low.c (tdesc_i386): Declare global.
4613 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4614 * lynx-low.c (lynx_tdesc): New global.
4615 (lynx_add_process): Set the new process'es tdesc.
4616 * lynx-low.h (struct target_desc): Forward declare.
4617 (lynx_tdesc): Declare global.
4618 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4619 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4620 * nto-low.c (nto_tdesc): New global.
4621 (do_attach): Set the new process'es tdesc.
4622 * nto-low.h (struct target_desc): Forward declare.
4623 (nto_tdesc): Declare.
4624 * nto-x86-low.c (tdesc_i386): Declare.
4625 (nto_x86_arch_setup): Set `nto_tdesc'.
4626
46272013-06-04 Gary Benson <gbenson@redhat.com>
4628
4629 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4630 to qSupported response when appropriate.
4631 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4632 with nonzero-length annex.
4633 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4634 arguments supplied in annex.
4635
46362013-05-31 Doug Evans <dje@google.com>
4637
4638 PR server/15594
4639 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4640 64 bits in 64-cross-32 environment.
4641
46422013-05-28 Pedro Alves <palves@redhat.com>
4643
4644 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4645 (aarch64-without-fpu.c): Delete rule.
4646 * configure.srv (aarch64*-*-linux*): Remove references to
4647 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4648 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4649 declaration.
4650
46512013-05-24 Pedro Alves <palves@redhat.com>
4652
4653 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4654 instead of strchr/decode_address. Error if the range isn't split
4655 with a ','. Don't assume there's be a ':' in the action.
4656
46572013-05-23 Yao Qi <yao@codesourcery.com>
4658 Pedro Alves <palves@redhat.com>
4659
4660 * linux-low.c (lwp_in_step_range): New function.
4661 (linux_wait_1): If the thread was range stepping and stopped
4662 outside the stepping range, report the stop to GDB. Otherwise,
4663 continue stepping. Add range stepping debug output.
4664 (linux_set_resume_request): Copy the step range from the resume
4665 request to the lwp.
4666 (linux_supports_range_stepping): New.
4667 (linux_target_ops) <supports_range_stepping>: Set to
4668 linux_supports_range_stepping.
4669 * linux-low.h (struct linux_target_ops)
4670 <supports_range_stepping>: New field.
4671 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4672 * linux-x86-low.c (x86_supports_range_stepping): New.
4673 (the_low_target) <supports_range_stepping>: Set to
4674 x86_supports_range_stepping.
4675 * server.c (handle_v_cont): Handle 'r' action.
4676 (handle_v_requests): Append ";r" if the target supports range
4677 stepping.
4678 * target.h (struct thread_resume) <step_range_start,
4679 step_range_end>: New fields.
4680 (struct target_ops) <supports_range_stepping>:
4681 New field.
4682 (target_supports_range_stepping): New macro.
4683
46842013-05-17 Joel Brobecker <brobecker@adacore.com>
4685
4686 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4687 confusion in comment.
4688
46892013-05-17 Joel Brobecker <brobecker@adacore.com>
4690
4691 * lynx-low.c (struct process_info_private): New type.
4692 (lynx_add_process): New function.
4693 (lynx_create_inferior, lynx_attach): Replace calls to
4694 add_process by calls to lynx_add_process.
4695 (lynx_resume): If PTID is null, then try using
4696 current_process()->private->last_wait_event_ptid.
4697 Add comments.
4698 (lynx_clear_inferiors): Delete. The contents of that function
4699 has been inlined in lynx_mourn;
4700 (lynx_wait_1): Save the ptid in the process's private data.
4701 (lynx_mourn): Free the process' private data. Replace call
4702 to lynx_clear_inferiors by call to clear_inferiors.
4703
47042013-05-17 Yao Qi <yao@codesourcery.com>
4705
4706 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4707 the right place.
4708
47092013-05-16 Luis Machado <lgustavo@codesourcery.com>
4710
4711 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4712 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4713 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4714 PT_TEXT_END_ADDR guards. Update comments.
4715 (linux_target_op) <read_offsets>: Conditionally define to
4716 linux_read_offsets if the target is UCLIBC and if it defines
4717 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4718
47192013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4720 Andrew Jenner <andrew@codesourcery.com>
4721
4722 * Makefile.in (SFILES): Add linux-nios2-low.c.
4723 (clean): Add action to delete nios2-linux.c.
4724 (nios2-linux.c): New rule.
4725 * configure.srv: Add nios2*-*-linux*.
4726 * linux-nios2-low.c: New.
4727
47282013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4729
4730 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4731
47322013-04-25 Hui Zhu <hui@codesourcery.com>
4733
4734 PR gdb/15186
4735 * ax.c (ax_printf): Add fflush.
4736
47372013-04-22 Tom Tromey <tromey@redhat.com>
4738
4739 * Makefile.in (SFILES): Add filestuff.c.
4740 (OBS): Add filestuff.o.
4741 (filestuff.o): New target.
4742 * config.in, configure: Rebuild.
4743 * configure.ac: Check for fdwalk, pipe2.
4744
47452013-04-17 Pedro Alves <palves@redhat.com>
4746
4747 * configure.ac (USE_THREAD_DB): Delete variable.
4748 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4749 Don't AC_SUBST USE_THREAD_DB.
4750 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4751 * config.in, configure: Regenerate.
4752
47532013-04-16 Pedro Alves <palves@redhat.com>
4754
4755 * linux-low.h (struct lwp_info) <thread_known>: Move under
4756 the USE_THREAD_DB #ifdef.
4757
47582013-04-16 Pedro Alves <palves@redhat.com>
4759
4760 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4761 (linux-low.o): Delete rule.
4762 * linux-low.h: Always include "gdb_thread_db.h" instead of
4763 conditionally including thread_db.h.
4764 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4765 HAVE_THREAD_DB_H.
4766
47672013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4768
4769 * Makefile.in (install-only): Fix make install regression.
4770
47712013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4772
4773 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4774 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4775 installation.
4776 * gdbserver.1: Remove.
4777
47782013-03-22 Pedro Alves <palves@redhat.com>
4779
4780 * linux-low.c (handle_extended_wait): Don't call
4781 linux_enable_event_reporting.
4782
47832013-03-15 Tony Theodore <tonyt@logyst.com>
4784
4785 PR build/9098:
4786 * Makefile.in (SHELL): Use @SHELL@.
4787
47882013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4789
4790 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4791 compiler warning.
4792
47932013-03-13 Joel Brobecker <brobecker@adacore.com>
4794
4795 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4796 Remove extraneous NULL element.
4797
47982013-03-13 Yao Qi <yao@codesourcery.com>
4799
4800 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4801 'V' block in trace frame.
4802
48032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4804
4805 * target.h (struct target_ops): Add btrace ops.
4806 (target_supports_btrace): New macro.
4807 (target_enable_btrace): New macro.
4808 (target_disable_btrace): New macro.
4809 (target_read_btrace): New macro.
4810 * gdbthread.h (struct thread_info): Add btrace field.
4811 * server.c: Include btrace-common.h.
4812 (handle_btrace_general_set): New function.
4813 (handle_btrace_enable): New function.
4814 (handle_btrace_disable): New function.
4815 (handle_general_set): Call handle_btrace_general_set.
4816 (handle_qxfer_btrace): New function.
4817 (struct qxfer qxfer_packets[]): Add btrace entry.
4818 * inferiors.c (remove_thread): Disable btrace.
4819 * linux-low: Include linux-btrace.h.
4820 (linux_low_enable_btrace): New function.
4821 (linux_low_read_btrace): New function.
4822 (linux_target_ops): Add btrace ops.
4823 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4824 Add srv_linux_btrace=yes.
4825 (x86_64-*-linux*): Add linux-btrace.o.
4826 Add srv_linux_btrace=yes.
4827 * configure.ac: Define HAVE_LINUX_BTRACE.
4828 * config.in: Regenerated.
4829 * configure: Regenerated.
4830
48312013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4832
4833 * server.c (handle_qxfer): Preserve error message if -3 is
4834 returned.
4835 (qxfer): Document the -3 return value.
4836
48372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4838
4839 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4840 (linux_btrace_h): New variable.
4841 (linux-btrace.o): New rule.
4842
48432013-03-08 Stan Shebs <stan@codesourcery.com>
4844 Hafiz Abid Qadeer <abidh@codesourcery.com>
4845
4846 * tracepoint.c (trace_buffer_size): New global.
4847 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4848 (init_trace_buffer): Change to one-argument function. Allocate
4849 trace buffer memory.
4850 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4851 handle QTBuffer:size packet.
4852 (cmd_bigqtbuffer_size): New function.
4853 (initialize_tracepoint): Call init_trace_buffer with
4854 DEFAULT_TRACE_BUFFER_SIZE.
4855 * server.c (handle_query): Add QTBuffer:size in the
4856 supported packets.
4857
48582013-03-07 Yao Qi <yao@codesourcery.com>
4859
4860 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4861 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4862 of -1.
4863 (cmd_qtsp): Adjust condition. Do post increment.
4864 Set cur_action and cur_step_action back to 0.
4865
48662013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4867
4868 PR server/15236
4869 * linux-low.c (linux_write_memory): Return early success if LEN is
4870 zero.
4871
48722013-03-05 Corinna Vinschen <vinschen@redhat.de>
4873
4874 * configure.srv: Add x86_64-*-cygwin* as target.
4875
48762013-02-28 Tom Tromey <tromey@redhat.com>
4877
4878 * configure.ac: Invoke AC_SYS_LARGEFILE.
4879 * configure, config.in: Rebuild.
4880
48812013-02-28 Corinna Vinschen <vinschen@redhat.com>
4882
4883 * win32-low.c: Throughout, fix format strings and casts of
4884 printf-like functions to avoid type related warnings on all
4885 platforms.
4886 (get_child_debug_event): Print dwDebugEventCode as hex since
4887 that's how it's usually documented.
4888
48892013-02-28 Yao Qi <yao@codesourcery.com>
4890
4891 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4892 pulongest.
4893
48942013-02-27 Jiong Wang <jiwang@tilera.com>
4895
4896 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4897 (reg-tilegx32.c): New rule.
4898 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4899 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4900 different register info initializer according to elf class.
4901 (init_registers_tilgx32): New function. The tilegx32 register info
4902 initializer.
4903 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4904 (tile_store_gregset): Likewise.
4905
49062013-02-27 Yao Qi <yao@codesourcery.com>
4907
4908 * server.c (process_point_options): Print debug message when
4909 debug_threads is true.
4910
49112013-02-26 Yao Qi <yao@codesourcery.com>
4912
4913 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4914
49152013-02-19 Pedro Alves <palves@redhat.com>
4916 Kai Tietz <ktietz@redhat.com>
4917
4918 PR gdb/15161
4919
4920 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4921 instead of strtoul to extract address from packet.
4922 (process_serial_event) <'z'>: Likewise.
4923
49242013-02-18 Yao Qi <yao@codesourcery.com>
4925
4926 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4927
49282013-02-14 Pedro Alves <palves@redhat.com>
4929
4930 Plug memory leak.
4931
4932 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4933 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4934
49352013-02-14 Pedro Alves <palves@redhat.com>
4936
4937 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4938
49392013-02-14 Pedro Alves <palves@redhat.com>
4940
4941 * tracepoint.c (save_string): Delete.
4942 (add_tracepoint_action): Use savestring instead of save_string.
4943
49442013-02-12 Pedro Alves <palves@redhat.com>
4945
4946 * linux-xtensa-low.c: Ditto.
4947 * xtensa-xtregs.c: Ditto.
4948
49492013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4950
4951 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4952 thread_db.
4953
49542013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4955
4956 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4957 aarch64_num_wp_regs and aarch64_num_bp_regs to
4958 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4959
49602013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4961
4962 * linux-aarch64-low.c (ps_get_thread_area): Replace
4963 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4964
49652013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4966 Marcus Shawcroft <marcus.shawcroft@arm.com>
4967 Nigel Stephens <nigel.stephens@arm.com>
4968 Yufeng Zhang <yufeng.zhang@arm.com>
4969
4970 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4971 (aarch64.c, aarch64-without-fpu.c): New targets.
4972 * configure.srv (aarch64*-*-linux*): New.
4973 * linux-aarch64-low.c: New file.
4974
49752013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4976
4977 * linux-low.c (handle_extended_wait, linux_create_inferior)
4978 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4979 (dequeue_one_deferred_signal, linux_resume_one_thread)
4980 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4981 (linux_tracefork_grandchild, linux_test_for_tracefork)
4982 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4983 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4984 where the argument is 0.
4985
49862013-01-25 Yao Qi <yao@codesourcery.com>
4987
4988 * event-loop.c: Include "queue.h".
4989 (gdb_event_p): New typedef.
4990 (struct gdb_event) <next_event>: Remove.
4991 (event_queue): Change to QUEUE(gdb_event_p).
4992 (async_queue_event): Remove.
4993 (gdb_event_xfree): New.
4994 (initialize_event_loop): New.
4995 (process_event): Use API from QUEUE.
4996 (wait_for_event): Likewise.
4997 * server.c (main): Call initialize_event_loop.
4998 * server.h (initialize_event_loop): Declare.
4999
50002013-01-18 Yao Qi <yao@codesourcery.com>
5001
5002 * ax.h (struct eval_agent_expr_context): New.
5003 (gdb_eval_agent_expr): Update declaration.
5004 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5005 TFRAME. Add new argument CTX.
5006 * server.h (struct eval_agent_expr_context): Declare.
5007 (agent_mem_read, agent_tsv_read): Update declaration.
5008 (agent_mem_read_string): Likewise.
5009 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5010 (add_traceframe_block): Add new argument TPOINT.
5011 Increase TPOINT->traceframe_usage.
5012 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5013 eval_tracepoint_agent_expr.
5014 (condition_true_at_tracepoint): Likewise.
5015 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5016 (agent_mem_read_string, agent_tsv_read): Likewise.
5017
50182013-01-16 Yao Qi <yao@codesourcery.com>
5019
5020 * linux-low.c (linux_resume_one_lwp): Don't check
5021 'lwp->bp_reinsert != 0'.
5022
50232013-01-07 Joel Brobecker <brobecker@adacore.com>
5024 Pedro Alves <palves@redhat.com>
5025
5026 * lynx-low.c (ptrace_request_to_str): Define a temporary
5027 macro and use it to simplify this function's implementation.
5028
50292013-01-07 Joel Brobecker <brobecker@adacore.com>
5030
5031 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5032 sets errno.
5033
50342013-01-07 Joel Brobecker <brobecker@adacore.com>
5035
5036 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5037
50382013-01-07 Joel Brobecker <brobecker@adacore.com>
5039
5040 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5041
50422013-01-07 Joel Brobecker <brobecker@adacore.com>
5043
5044 * lynx-low.c (lynx_resume): Use the resume_info parameter
5045 to determine the ptid for the lynx_ptrace call, unless
5046 it is equal to minus_one_ptid, in which case we use the
5047 ptid of the current_inferior.
5048 (lynx_wait_1): After having received a thread create/exit
5049 event, resume the inferior's execution using the signaling
5050 thread's ptid, rather than the old ptid.
5051
50522013-01-07 Joel Brobecker <brobecker@adacore.com>
5053
5054 * lynx-low.c (lynx_resume): Delete variable ret.
5055
50562013-01-01 Joel Brobecker <brobecker@adacore.com>
5057
5058 * gdbreplay.c (gdbreplay_version): Update copyright year.
5059 * server.c (gdbserver_version): Likewise.
5060
50612012-12-17 Joel Brobecker <brobecker@adacore.com>
5062
5063 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5064 new thread.
5065
50662012-12-17 Joel Brobecker <brobecker@adacore.com>
5067
5068 * lynx-low.c (ptrace_request_to_str): Add handling for
5069 PTRACE_GETTRACESIG.
5070
50712012-12-17 Joel Brobecker <brobecker@adacore.com>
5072
5073 * lynx-low.c (lynx_attach): Delete variable new_process.
5074
50752012-12-17 Joel Brobecker <brobecker@adacore.com>
5076
5077 * lynx-low.c (lynx_create_inferior): Delete variable
5078 new_process.
5079
50802012-12-17 Joel Brobecker <brobecker@adacore.com>
5081
5082 * lynx-low.c (ptrace_request_to_str): Do not handle
5083 PTRACE_GETTHREADLIST if this macro does not exist.
5084
50852012-12-15 Yao Qi <yao@codesourcery.com>
5086
5087 * Makefile.in (OBS): Add notif.o.
5088 * notif.c, notif.h: New.
5089 * server.c: Include "notif.h".
5090 (struct vstop_notif) <next>: Remove.
5091 <base>: New field.
5092 (queue_stop_reply): Update.
5093 (push_event, send_next_stop_reply): Remove.
5094 (discard_queued_stop_replies): Update.
5095 (notif_stop): New variable.
5096 (handle_v_stopped): Remove.
5097 (handle_v_requests): Don't call handle_v_stopped. Call
5098 handle_ack_notif instead.
5099 (queue_stop_reply_callback): Call notif_event_enque instead
5100 of queue_stop_reply.
5101 (handle_status): Don't call send_next_stop_reply, call
5102 notif_write_event instead.
5103 (kill_inferior_callback): Likewise.
5104 (detach_or_kill_inferior_callback): Likewise.
5105 (main): Call initialize_notif.
5106 (process_serial_event): Call QUEUE_is_empty.
5107 (handle_target_event): Call notif_push instead of push event.
5108 * server.h (push_event): Remove declaration.
5109
51102012-12-10 Tom Tromey <tromey@redhat.com>
5111
5112 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5113 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5114 macros.
5115 (.c.o): Rewrite.
5116 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5117 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5118 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5119 (amd64-linux-ipa.o, ax.o): Rewrite.
5120 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5121 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5122 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5123 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5124 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5125 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5126 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5127 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5128 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5129 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5130 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5131 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5132 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5133 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5134 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5135 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5136 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5137 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5138 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5139 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5140 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5141 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5142 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5143 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5144 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5145 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5146 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5147 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5148 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5149 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5150 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5151 (reg-tilegx.o): Remove.
5152 (all_object_files): New macro.
5153 Include .deps files.
5154 * aclocal.m4, configure: Rebuild.
5155 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5156 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5157 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5158
51592012-12-05 Tom Tromey <tromey@redhat.com>
5160
5161 PR gdb/14917:
5162 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5163
51642012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5165
5166 * configure.ac: Check for linux/perf_event.h.
5167 * config.in: Regenerated.
5168 * configure: Regenerated.
5169
51702012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5171
5172 * hostio.c (handle_readlink): Decrease buffer size
5173 parameter passed to readlink by one byte.
5174
51752012-11-26 Yao Qi <yao@codesourcery.com>
5176
5177 * configure.ac (build_warnings): Append '-Wempty-body'.
5178 * configure: Regenerated.
5179 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5180 body.
5181
51822012-11-15 Pierre Muller <muller@sourceware.org>
5183
5184 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5185 * config.in: Regenerate.
5186 * configure: Regenerate.
5187 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5188 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5189 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5190 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5191 header.
5192 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5193 instead of <sys/wait.h> header.
5194 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5195
51962012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5197
5198 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5199 (various make rules): Remove -DGDBSERVER
5200
52012012-11-09 Yao Qi <yao@codesourcery.com>
5202
5203 * spu-low.c (current_ptid): Move it to ..
5204 * gdbthread.h: ... here. New.
5205 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5206 * server.c (myresume, process_serial_event): Likewise.
5207 * thread-db.c (thread_db_find_new_threads): Likewise.
5208 * tracepoint.c (run_inferior_command): Likewise.
5209
52102012-10-01 Andrew Burgess <aburgess@broadcom.com>
5211
5212 * server.c (handle_search_memory_1): Include access length in
5213 warning message.
5214
52152012-09-05 Michael Brandt <michael.brandt@axis.com>
5216
5217 * linux-crisv32-low.c: Fix compile errors.
5218
52192012-09-04 Yao Qi <yao@codesourcery.com>
5220
5221 * tracepoint.c (cmd_qtsv): Adjust debug message.
5222 Don't check CUR_TPOINT.
5223
52242012-08-28 Yao Qi <yao@codesourcery.com>
5225
5226 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5227 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5228 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5229 Remove declarations of xmalloc, xreallloc, xstrdup and
5230 freeargv.
5231 * Makefile.in (libiberty_h): New.
5232 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5233 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5234
52352012-08-23 Yao Qi <yao@codesourcery.com>
5236
5237 * server.h: Remove declaration of 'xsnprintf'.
5238
52392012-08-22 Keith Seitz <keiths@redhat.com>
5240
5241 * server.h: Include build-gnulib-gbserver/config.h.
5242 * gdbreplay.c: Likewise.
5243
52442012-08-08 Doug Evans <dje@google.com>
5245
5246 * Makefile.in (SFILES): Add gdb_vecs.c.
5247 (OBS): Add gdb_vecs.o.
5248 (gdb_vecs_h, host_defs_h): New variables.
5249 (thread-db.o): Add $(gdb_vecs_h) dependency.
5250 (gdb_vecs.o): New rule.
5251 * thread-db.c: #include "gdb_vecs.h".
5252 (thread_db_load_search): Use a vector to iterate over path elements.
5253 Handle text appearing after "$pdir".
5254
5255 * configure.ac: Add check for strstr.
5256 * config.in: Regenerate.
5257 * configure: Regenerate.
5258
52592012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5260
5261 * hostio.c (handle_pread): If pread fails, fall back to attempting
5262 lseek/read.
5263 (handle_pwrite): Likewise for pwrite.
5264
52652012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5266
5267 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5268 between unsupported TYPE and unimplementable ADDR/LEN combination.
5269 (arm_insert_point): Act on new return value.
5270
52712012-07-31 Pedro Alves <palves@redhat.com>
5272
5273 * server.c (process_point_options): Only skip tokens if we find
5274 one that is unrecognized. Don't treat 'X' specially while
5275 skipping unrecognized tokens.
5276
52772012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5278
5279 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5280 to 4-byte-align HW breakpoint addresses for Thumb.
5281
52822012-07-27 Yao Qi <yao@codesourcery.com>
5283
5284 PR remote/14161.
5285
5286 * server.h: Declare gdb_agent_about_to_close.
5287 * target.c (kill_inferior): Include "agent.h".
5288 New. Send command 'kill'.
5289 * target.h (kill_inferior): Removed macro.
5290 * tracepoint.c (gdb_agent_about_to_close): New.
5291 (gdb_agent_helper_thread): Handle command 'close'.
5292 Wait endlessly until the inferior stops.
5293 Install gdb_agent_remove_socket to atexit hook.
5294 (agent_socket_name): New static variable.
5295 (gdb_agent_socket_init): Replace local variable 'name' with
5296 'agent_socket_name'.
5297 (gdb_agent_remove_socket): New.
5298
52992012-07-27 Yao Qi <yao@codesourcery.com>
5300
5301 * server.c (process_point_options): Stop at 'X' when parsing.
5302
53032012-07-19 Michael Eager <eager@eagercon.com>
5304
5305 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5306 to hw_execute.
5307 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5308 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5309 hardware breakpoint.
5310
53112012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5312
5313 * gdbserver/linux-low.c (initialize_low): Call
5314 linux_ptrace_init_warnings.
5315
53162012-07-02 Doug Evans <dje@google.com>
5317
5318 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5319 pointer to int.
5320
53212012-07-02 Stan Shebs <stan@codesourcery.com>
5322
5323 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5324 (ax.o): Add it to build rule.
5325 (ax-ipa.o): Ditto.
5326 (OBS): Add format.o.
5327 (IPA_OBS): Add format.o.
5328 * server.c (handle_query): Claim support for breakpoint commands.
5329 (process_point_options): Add command case.
5330 (process_serial_event): Leave running if there are printfs in
5331 effect.
5332 * mem-break.h (any_persistent_commands): Declare.
5333 (add_breakpoint_commands): Declare.
5334 (gdb_no_commands_at_breakpoint): Declare.
5335 (run_breakpoint_commands): Declare.
5336 * mem-break.c (struct point_command_list): New struct.
5337 (struct breakpoint): New field command_list.
5338 (any_persistent_commands): New function.
5339 (add_commands_to_breakpoint): New function.
5340 (add_breakpoint_commands): New function.
5341 (gdb_no_commands_at_breakpoint): New function.
5342 (run_breakpoint_commands): New function.
5343 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5344 locally.
5345 * ax.c: Include format.h.
5346 (ax_printf): New function.
5347 (gdb_eval_agent_expr): Add printf opcode.
5348
53492012-06-13 Yao Qi <yao@codesourcery.com>
5350
5351 * server.c (start_inferior): Remove duplicated writes to fields
5352 'last_resume_kind' and 'last_status' of 'current_inferior'.
5353
53542012-06-12 Yao Qi <yao@codesourcery.com>
5355 Pedro Alves <palves@redhat.com>
5356
5357 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5358 comment.
5359 * server.c (handle_v_cont): Extend comment.
5360
53612012-06-11 Yao Qi <yao@codesourcery.com>
5362
5363 * linux-low.c (linux_attach): Add 'static'.
5364
53652012-06-06 Yao Qi <yao@codesourcery.com>
5366
5367 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5368
53692012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5370
5371 Fix gcc -flto compilation warning.
5372 * server.c (main): Make variable multi_mode and attach volatile.
5373
53742012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5375
5376 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5377 if the platform doesn't know about it.
5378
53792012-05-30 Jeff Kenton <jkenton@tilera.com>
5380
5381 * Makefile.in (SFILES): Add linux-tile-low.c.
5382 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5383 * configure.srv: Handle tilegx-*-linux*.
5384 * linux-tile-low.c: New file.
5385
53862012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5387
5388 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5389
53902012-05-24 Pedro Alves <palves@redhat.com>
5391
5392 PR gdb/7205
5393
5394 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5395
53962012-05-24 Pedro Alves <palves@redhat.com>
5397
5398 PR gdb/7205
5399
5400 Replace target_signal with gdb_signal throughout.
5401
54022012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5403
5404 * linux-low.c (linux_store_registers): Avoid the copying sequence
5405 when no data has been retrieved by ptrace.
5406
54072012-05-22 Will Deacon <will.deacon@arm.com>
5408
5409 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5410 Include asm/ptrace.h.
5411 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5412 already defined.
5413
54142012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5415
5416 * linux-low.c (linux_store_registers): Don't re-retrieve data
5417 with ptrace that has already been obtained from /proc. Always
5418 copy any data retrieved with ptrace to the buffer supplied.
5419
54202012-05-11 Yao Qi <yao@codesourcery.com>
5421 Pedro Alves <palves@redhat.com>
5422
5423 * linux-low.c (enum stopping_threads_kind): New.
5424 (stopping_threads): Change type to `enum stopping_threads_kind'.
5425 (handle_extended_wait): If stopping and suspending threads, leave
5426 the new_lwp suspended too.
5427 (linux_wait_for_event): Adjust.
5428 (stop_all_lwps): Set `stopping_threads' to
5429 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5430 whether we're suspending threads or just stopping them. Assert no
5431 recursion happens.
5432
54332012-04-29 Yao Qi <yao@codesourcery.com>
5434
5435 * server.h: Move some code to ...
5436 * gdbthread.h: ... here. New.
5437 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5438 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5439 (nto-low.o, win32-low.o): Likewise.
5440 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5441 * regcache.c, remote-utils.c, server.c: Likewise.
5442 * target.c, tracepoint.c, win32-low.c: Likewise.
5443
54442012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5445
5446 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5447 (PTRACE_ARG4_TYPE): Likewise.
5448 (PTRACE_XFER_TYPE): Likewise.
5449 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5450 ptrace to PTRACE_ARG3_TYPE.
5451 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5452 (PTRACE_ARG4_TYPE): Likewise.
5453 (PTRACE_XFER_TYPE): Likewise.
5454 (linux_detach_one_lwp): Cast fourth argument of
5455 ptrace to long then PTRACE_ARG4_TYPE.
5456 (regsets_fetch_inferior_registers): Cast third argument of
5457 ptrace to long then PTRACE_ARG3_TYPE.
5458 (regsets_store_inferior_registers): Likewise.
5459
54602012-04-20 Pedro Alves <palves@redhat.com>
5461
5462 * configure: Regenerate.
5463
54642012-04-19 Pedro Alves <palves@redhat.com>
5465
5466 * Makefile.in (GNULIB_BUILDDIR): New.
5467 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5468 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5469 (all, install-only, uninstall, clean-info, all-lib, clean): No
5470 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5471 (maintainer-clean realclean distclean): Use subdir_do.
5472 (subdir_do): New.
5473 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5474 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5475 * acinclude.m4: Include acx_configure_dir.m4.
5476 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5477 calls. Call AC_PROG_RANLIB. Configure gnulib using
5478 ACX_CONFIGURE_DIR.
5479 (GNULIB): New.
5480 (GNULIB_STDINT_H): Adjust.
5481 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5482 * gdbreplay.c: Include build-gnulib/config.h.
5483 * server.h: Likewise.
5484 * aclocal.m4: Regenerate.
5485 * config.in: Regenerate.
5486 * configure: Regenerate.
5487
54882012-04-19 Pedro Alves <palves@redhat.com>
5489
5490 * Makefile.in (LIBGNU, INCGNU): Adjust.
5491 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5492 (all, install-only, uninstall, clean-info, all-lib, clean)
5493 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5494 * configure.ac: Adjust AC_OUTPUT output.
5495 * aclocal.m4: Regenerate.
5496 * configure: Regenerate.
5497
54982012-04-19 Pedro Alves <palves@redhat.com>
5499
5500 * Makefile.in (generated_files): New.
5501 (server_h): Remove the explicit dependency on config.h, and depend
5502 on $generated_files.
5503
55042012-04-19 Pedro Alves <palves@redhat.com>
5505
5506 * Makefile.in (INCGNU): Add -Ignulib.
5507
55082012-04-19 Pedro Alves <palves@redhat.com>
5509
5510 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5511 (INCGNU): ... this, and spell out -I here.
5512 (GNULIB_LIB): Rename to ...
5513 (LIBGNU): ... this.
5514 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5515
55162012-04-19 Pedro Alves <palves@redhat.com>
5517
5518 * config.in: Regenerate.
5519
55202012-04-19 Pedro Alves <palves@redhat.com>
5521
5522 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5523 * server.h (memmem): Remove declaration.
5524 * config.in: Regenerate.
5525 * configure: Regenerate.
5526
55272012-04-19 Yao Qi <yao@codesourcery.com>
5528
5529 * Makefile.in (SFILES): Add common/vec.c.
5530 (OBS): Add vec.o.
5531 (vec.o): New rule.
5532
55332012-04-19 Yao Qi <yao@codesourcery.com>
5534
5535 * remote-utils.c (prepare_resume_reply): Replace with macro
5536 target_core_of_thread.
5537 * server.c (handle_qxfer_threads_proper): Likewise.
5538 * target.h (traget_core_of_thread): New macro.
5539
55402012-04-18 Pedro Alves <palves@redhat.com>
5541
5542 * aclocal.m4: Regenerate.
5543 * configure: Regenerate.
5544
55452012-04-16 Yao Qi <yao@codesourcery.com>
5546
5547 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5548 duplicated on address.
5549
55502012-04-16 Yao Qi <yao@codesourcery.com>
5551
5552 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5553 (struct tracepoint_action_ops) <send>: New field.
5554 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5555 (agent_expr_send, x_tracepoint_action_send): New.
5556 (l_tracepoint_action_send): New.
5557 (cmd_qtdp): Download and install tracepoint
5558 according to `use_agent'.
5559 (run_inferior_command): Add one more parameter `len'.
5560 Update callers.
5561 (tracepoint_send_agent): New.
5562 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5563
55642012-04-16 Yao Qi <yao@codesourcery.com>
5565
5566 * tracepoint.c (download_tracepoints): Moved to ...
5567 (cmd_qtstart): ... here.
5568
55692012-04-14 Yao Qi <yao@codesourcery.com>
5570
5571 * tracepoint.c: Include inttypes.h.
5572 (struct collect_memory_action): Use sized types.
5573 (struct tracepoint): Likewise.
5574 (cmd_qtdp, stop_tracing): Update print specifiers.
5575 (cmd_qtp, response_tracepoint): Likewise.
5576 (collect_data_at_tracepoint): Likewise.
5577 (collect_data_at_step): Likewise.
5578
55792012-04-14 Yao Qi <yao@codesourcery.com>
5580
5581 Import gnulib module inttypes.
5582 * aclocal.m4, config.in, configure: Regenerated.
5583
55842012-04-14 Yao Qi <yao@codesourcery.com>
5585
5586 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5587 Makefile and config.status at last.
5588
55892012-04-13 Yao Qi <yao@codesourcery.com>
5590
5591 * tracepoint.c: Include stdint.h unconditionally.
5592
55932012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5594
5595 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5596 on BFD_HAVE_SYS_PROCFS_TYPE.
5597 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5598 * configure: Regenerate.
5599 * config.in: Likewise.
5600
56012012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5602
5603 * Makefile.in (clean): Also remove x32.c x32-linux.c
5604 x32-avx.c x32-avx-linux.c.
5605 (x32.o): New target.
5606 (x32.c): Likewise.
5607 (x32-linux.o): Likewise.
5608 (x32-linux.c): Likewise.
5609 (x32-avx.o): Likewise.
5610 (x32-avx.c): Likewise.
5611 (x32-avx-linux.o): Likewise.
5612 (x32-avx-linux.c): Likewise.
5613
5614 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5615 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5616 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5617 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5618 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5619 i386/x32-avx-linux.xml.
5620
5621 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5622 (init_registers_x32_avx_linux): Likwise.
5623 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5624 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5625
56262012-04-13 Pedro Alves <palves@redhat.com>
5627
5628 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5629 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5630 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5631 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5632 the sub-make.
5633
56342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5635
5636 * linux-x86-low.c (compat_x32_clock_t): New.
5637 (compat_x32_siginfo_t): Likewise.
5638 (compat_x32_siginfo_from_siginfo): Likewise.
5639 (siginfo_from_compat_x32_siginfo): Likewise.
5640 (linux_is_elf64): Likewise.
5641 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5642 and siginfo_from_compat_x32_siginfo for x32.
5643 (x86_arch_setup): Set linux_is_elf64.
5644
56452012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5646
5647 PR gdb/13969
5648 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5649 e_machine field.
5650 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5651 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5652 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5653 compatible with process.
5654
56552012-04-12 Yao Qi <yao@codesourcery.com>
5656
5657 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5658 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5659 (install-only, install-info, clean): Handle sub dir gnulib.
5660 (all-lib, am--refresh): New targets.
5661 (memmem.o): Remove target.
5662 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5663 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5664 (AC_REPLACE_FUNCS): Remove memmem.
5665 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5666 (AC_OUTPUT): Generate Makefile in gnulib/.
5667 * aclocal.m4, config.in, configure: Regenerated.
5668
56692012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5670
5671 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5672
56732012-04-05 Pedro Alves <palves@redhat.com>
5674
5675 -Werror=strict-aliasing
5676
5677 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5678 pointer.
5679
56802012-04-04 Pedro Alves <palves@redhat.com>
5681
5682 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5683 (sparc_store_gregset_from_stack, sparc_store_gregset)
5684 (sparc_breakpoint_at): Fix formatting.
5685
56862012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5687
5688 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5689 are available.
5690 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5691 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5692 * config.in: Regenerate.
5693 * configure: Likewise.
5694
56952012-03-29 Pedro Alves <palves@redhat.com>
5696
5697 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5698 Correct ptrace arguments.
5699
57002012-03-28 Pedro Alves <palves@redhat.com>
5701
5702 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5703 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5704 (IA64_FR1_REGNUM): New defines.
5705 (ia64_fetch_register): New.
5706 (the_low_target): Install it.
5707 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5708 field.
5709 * linux-low.c (linux_fetch_registers): Try the
5710 the_low_target.fetch_register hook first.
5711
5712 * linux-arm-low.c (the_low_target): Adjust.
5713 * linux-bfin-low.c (the_low_target): Adjust.
5714 * linux-cris-low.c (the_low_target): Adjust.
5715 * linux-crisv32-low.c (the_low_target): Adjust.
5716 * linux-m32r-low.c (the_low_target): Adjust.
5717 * linux-m68k-low.c (the_low_target): Adjust.
5718 * linux-mips-low.c (the_low_target): Adjust.
5719 * linux-ppc-low.c (the_low_target): Adjust.
5720 * linux-s390-low.c (the_low_target): Adjust.
5721 * linux-sh-low.c (the_low_target): Adjust.
5722 * linux-sparc-low.c (the_low_target): Adjust.
5723 * linux-tic6x-low.c (the_low_target): Adjust.
5724 * linux-x86-low.c (the_low_target): Adjust.
5725 * linux-xtensa-low.c (the_low_target): Adjust.
5726
57272012-03-26 Pedro Alves <palves@redhat.com>
5728
5729 * server.c (handle_qxfer_libraries): Don't bail early if
5730 the_target->qxfer_libraries_svr4 is not NULL.
5731
57322012-03-26 Pedro Alves <palves@redhat.com>
5733
5734 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5735
57362012-03-23 Pedro Alves <palves@redhat.com>
5737
5738 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5739 "library-list-svr4" element's start tag when the the DSO list is
5740 empty.
5741
57422012-03-23 Pedro Alves <palves@redhat.com>
5743
5744 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5745 a variable whose type size is the same as the inferior's pointer
5746 size.
5747
57482012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5749
5750 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5751 struct siginfo.
5752 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5753 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5754 * linux-low.h: Include <signal.h>.
5755 (struct siginfo): Remove forward declaration.
5756 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5757 struct siginfo.
5758
57592012-03-21 Mike Frysinger <vapier@gentoo.org>
5760
5761 * .gitignore: Ignore more files.
5762
57632012-03-19 Pedro Alves <palves@redhat.com>
5764 Jan Kratochvil <jan.kratochvil@redhat.com>
5765
5766 * server.c (cont_thread, general_thread): Add describing comments.
5767 (start_inferior): Clear `cont_thread'.
5768 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5769 of a process.
5770
57712012-03-15 Yao Qi <yao@codesourcery.com>
5772
5773 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5774 handling to ...
5775 (cmd_qtdp): ... here.
5776
57772012-03-15 Yao Qi <yao@codesourcery.com>
5778
5779 * tracepoint.c (struct tracepoint_action_ops): New.
5780 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5781 (m_tracepoint_action_download): New.
5782 (r_tracepoint_action_download): New.
5783 (x_tracepoint_action_download): New.
5784 (l_tracepoint_action_download): New.
5785 (add_tracepoint_action): Install `action->ops' according type.
5786 (download_tracepoint_1): Move code `download' function pointer
5787 of various tracepoint_action_ops.
5788
57892012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5790
5791 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5792 linux_ptrace_attach_warnings.
5793
57942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5795
5796 * Makefile.in (linux-ptrace.o): New.
5797 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5798 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5799 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5800 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5801 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5802 of these targets.
5803 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5804
58052012-03-08 Yao Qi <yao@codesourcery.com>
5806 Pedro Alves <palves@redhat.com>
5807
5808 Fix PR server/13392.
5809 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5810 offset of JMP insn.
5811 * tracepoint.c (remove_tracepoint): New.
5812 (cmd_qtdp): Call remove_tracepoint when failed to install.
5813
58142012-03-07 Pedro Alves <palves@redhat.com>
5815
5816 * linux-low.c (get_detach_signal): New.
5817 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5818 Pass on pending signals to PTRACE_DETACH. Check the result of the
5819 ptrace call.
5820 * server.c (program_signals, program_signals_p): New.
5821 (handle_general_set): Handle QProgramSignals.
5822 * server.h (program_signals, program_signals_p): Declare.
5823
58242012-03-05 Pedro Alves <palves@redhat.com>
5825 Jan Kratochvil <jan.kratochvil@redhat.com>
5826
5827 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5828 New comment why.
5829
58302012-03-03 Yao Qi <yao@codesourcery.com>
5831
5832 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5833 agent_look_up_symbols.
5834
58352012-03-03 Yao Qi <yao@codesourcery.com>
5836
5837 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5838 (linux-x86-low.o): Likewise.
5839 * server.h: Remove in_process_agent_loaded.
5840 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5841 common/agent.c.
5842 Update callers.
5843
58442012-03-03 Yao Qi <yao@codesourcery.com>
5845
5846 * tracepoint.c (gdb_agent_capability): New global.
5847 (in_process_agent_loaded_ust): Renamed to
5848 `in_process_agent_supports_ust'.
5849 Update callers.
5850 (in_process_agent_supports_ust): Call agent_capability_check.
5851 (clear_installed_tracepoints): Assert that agent supports
5852 agent.
5853
58542012-03-03 Yao Qi <yao@codesourcery.com>
5855
5856 * linux-low.c (linux_supports_agent): New.
5857 (linux_target_ops): Initialize field `supports_agent' with
5858 linux_supports_agent.
5859 * target.h (struct target_ops) <supports_agent>: New.
5860 (target_supports_agent): New macro.
5861 * server.c (handle_general_set): Handle packet 'QAgent'.
5862 (handle_query): Send `QAgent+'.
5863 * Makefile.in (server.o): Depends on agent.h.
5864
58652012-03-03 Yao Qi <yao@codesourcery.com>
5866
5867 * Makefile.in (OBS): Add agent.o.
5868 Add new rule for agent.o.
5869 Track dependence of tracepoint.c on agent.h.
5870 * tracepoint.c (run_inferior_command_1):
5871 (run_inferior_command): Call agent_run_command.
5872 (gdb_ust_connect_sync_socket): Deleted. Move it to
5873 common/agent.c.
5874 (resume_thread, stop_thread): Likewise.
5875 (gdb_ust_socket_init): Renamed to ...
5876 (gdb_agent_socket_init): ... New.
5877 (gdb_ust_thread): Renamed to ...
5878 (gdb_agent_helper_thread): ... New.
5879 (gdb_ust_init): Move some code to ...
5880 (gdb_agent_init): ... here. New.
5881 [HAVE_UST]: Call gdb_ust_init.
5882 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5883 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5884 * config.in, configure: Regenerated.
5885
58862012-03-02 Pedro Alves <palves@redhat.com>
5887
5888 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5889 * linux-low.c (struct simple_pid_list): New.
5890 (stopped_pids): New a struct simple_pid_list pointer.
5891 (add_to_pid_list, pull_pid_from_list): New.
5892 (handle_extended_wait): Don't assume the first signal new children
5893 report is SIGSTOP. Adjust call to pull_pid_from_list.
5894 (linux_wait_for_lwp): Adjust.
5895
58962012-03-02 Yao Qi <yao@codesourcery.com>
5897
5898 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5899 debug log.
5900
59012012-03-02 Yao Qi <yao@codesourcery.com>
5902
5903 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5904 `stop_pc' and `tpoint'. Update caller.
5905
59062012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5907
5908 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5909 * linux-low.c (use_linux_regsets): New macro.
5910 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5911 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5912 (linux_register_in_regsets): New function.
5913 (usr_fetch_inferior_registers): Skip registers covered by
5914 regsets.
5915 (usr_store_inferior_registers): Likewise.
5916 (usr_fetch_inferior_registers): New macro.
5917 (usr_store_inferior_registers): Likewise.
5918 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5919 (linux_store_registers): Likewise.
5920 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5921 prototype.
5922 (init_registers_mips64_dsp_linux): Likewise.
5923 (init_registers_mips_linux): New macro.
5924 (init_registers_mips_dsp_linux): Likewise.
5925 (mips_dsp_num_regs): Likewise.
5926 (DSP_BASE, DSP_CONTROL): New fallback macros.
5927 (mips_base_regs): New macro.
5928 (mips_regmap): Use it. Fix the size.
5929 (mips_dsp_regmap): New variable.
5930 (mips_dsp_regset_bitmap): Likewise.
5931 (mips_arch_setup): New function.
5932 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5933 than mips_regmap.
5934 (mips_cannot_store_register): Likewise.
5935 (the_low_target): Update .arch_setup, .num_regs and .regmap
5936 initializers. Add .regset_bitmap initializer.
5937 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5938 initializer.
5939 * linux-bfin-low.c (the_low_target): Likewise.
5940 * linux-cris-low.c (the_low_target): Likewise.
5941 * linux-crisv32-low.c (the_low_target): Likewise.
5942 * linux-ia64-low.c (the_low_target): Likewise.
5943 * linux-m32r-low.c (the_low_target): Likewise.
5944 * linux-m68k-low.c (the_low_target): Likewise.
5945 * linux-ppc-low.c (the_low_target): Likewise.
5946 * linux-s390-low.c (the_low_target): Likewise.
5947 * linux-sh-low.c (the_low_target): Likewise.
5948 * linux-sparc-low.c (the_low_target): Likewise.
5949 * linux-tic6x-low.c (the_low_target): Likewise.
5950 * linux-x86-low.c (the_low_target): Likewise.
5951 * linux-xtensa-low.c (the_low_target): Likewise.
5952 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5953 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5954 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5955 srv_xmlfiles.
5956 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5957 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5958
59592012-02-29 Yao Qi <yao@codesourcery.com>
5960 Pedro Alves <palves@redhat.com>
5961
5962 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5963 `step_over_finished' is true.
5964
59652012-02-27 Pedro Alves <palves@redhat.com>
5966
5967 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5968 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5969
59702012-02-27 Pedro Alves <palves@redhat.com>
5971
5972 PR server/9684
5973 * linux-low.c (pid_is_stopped): New.
5974 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5975
59762012-02-25 Luis Machado <lgustavo@codesourcery.com>
5977
5978 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5979 of conditions.
5980
59812012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5982
5983 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5984
59852012-02-24 Luis Machado <lgustavo@codesourcery>
5986
5987 * server.c (handle_query): Advertise support for target-side
5988 breakpoint condition evaluation.
5989 (process_point_options): New function.
5990 (process_serial_event): When inserting a breakpoint, check for
5991 a target-side condition that should be evaluated.
5992
5993 * mem-break.c: Include regcache.h and ax.h.
5994 (point_cond_list_t): New data structure.
5995 (breakpoint) <cond_list>: New field.
5996 (find_gdb_breakpoint_at): Make non-static.
5997 (delete_gdb_breakpoint_at): Clear any target-side
5998 conditions.
5999 (clear_gdb_breakpoint_conditions): New function.
6000 (add_condition_to_breakpoint): Likewise.
6001 (add_breakpoint_condition): Likewise.
6002 (gdb_condition_true_at_breakpoint): Likewise.
6003 (gdb_breakpoint_here): Return result directly instead
6004 of going through a local variable.
6005
6006 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6007 (clear_gdb_breakpoint_conditions): Likewise.
6008 (add_breakpoint_condition): Likewise.
6009 (gdb_condition_true_at_breakpoint): Likewise.
6010
6011 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6012 (need_step_over_p): Take target-side breakpoint condition into
6013 consideration.
6014
60152012-02-24 Luis Machado <lgustavo@codesourcery>
6016
6017 * server.h: Include tracepoint.h.
6018 (agent_mem_read, agent_get_trace_state_variable_value,
6019 agent_set_trace_state_variable_value,
6020 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6021 get_set_tsv_func_addr): New prototypes.
6022
6023 * ax.h: New include file.
6024 * ax.c: New source file.
6025
6026 * tracepoint.c: Include ax.h.
6027 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6028 agent_expr, eval_result_type): Move to ax.h.
6029 (parse_agent_expr): Rename to ...
6030 (gdb_parse_agent_expr): ... this, make it non-static and move
6031 to ax.h.
6032 (unparse_agent_expr) Rename to ...
6033 (gdb_unparse_agent_expr): ... this, make it non-static and move
6034 to ax.h.
6035 (eval_agent_expr): Rename to ...
6036 (eval_tracepoint_agent_expr): ... this.
6037 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6038 forward declarations.
6039 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6040 (agent_get_trace_state_variable_value): New function.
6041 (agent_set_trace_state_variable_value): New function.
6042 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6043 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6044 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6045 (condition_true_at_tracepoint): Likewise.
6046 (parse_agent_expr): Rename to ...
6047 (gdb_parse_agent_expr): ... this and move to ax.c.
6048 (unparse_agent_expr): Rename to ...
6049 (gdb_unparse_agent_expr): ... this and move to ax.c.
6050 (gdb_agent_op_name): Move to ax.c.
6051 (eval_agent_expr): Rename to ...
6052 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6053 and move to ax.c.
6054 (eval_tracepoint_agent_expr): New function.
6055 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6056 non-static.
6057 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6058 ax.c.
6059 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6060 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6061 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6062 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6063 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6064 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6065 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6066 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6067 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6068 (compile_bytecodes): Remove forward declaration.
6069 (is_goto_target): Move to ax.c.
6070 (compile_bytecodes): Move to ax.c and call
6071 agent_get_trace_state_variable_value (...) and
6072 agent_set_trace_state_variable_value (...).
6073
6074 * Makefile.in: Update ax.c and IPA dependencies.
6075
60762012-02-24 Pedro Alves <palves@redhat.com>
6077
6078 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6079 (cmd_bigqtbuffer_circular): ... this. Only handle
6080 'QTBuffer:circular:'.
6081 (handle_tracepoint_general_set): Adjust.
6082
60832012-02-16 Yao Qi <yao@codesourcery.com>
6084
6085 * inferiors.c: Move code to ...
6086 * dll.c: .... here. New.
6087 * server.h: Declare clear_dlls.
6088 * Makefile.in (SFILES): Add dll.c.
6089 (OBS): Add dll.o
6090 (dll.o): New rule.
6091
60922012-02-11 Yao Qi <yao@codesourcery.com>
6093
6094 * server.c: (handle_monitor_command): Add a new parameter
6095 `own_buf'.
6096 (handle_query): Update caller.
6097
60982012-02-09 Joel Brobecker <brobecker@adacore.com>
6099
6100 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6101 * configure, config.in: Regenerate.
6102 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6103 is not defined.
6104
61052012-02-02 Pedro Alves <palves@redhat.com>
6106
6107 Try SIGKILL first, then PTRACE_KILL.
6108 * linux-low.c (linux_kill_one_lwp): New.
6109 (linux_kill_one_lwp): Rename to ...
6110 (kill_one_lwp_callback): ... this. Use the new
6111 linux_kill_one_lwp.
6112
61132012-02-02 Pedro Alves <palves@redhat.com>
6114
6115 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6116 inferior.
6117
61182012-01-27 Pedro Alves <palves@redhat.com>
6119
6120 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6121 (elf_64_file_p): Make static.
6122 (linux_pid_exe_is_elf_64_file): New.
6123 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6124 Delete declarations.
6125 (linux_pid_exe_is_elf_64_file): Declare.
6126 * linux-x86-low.c (x86_arch_setup): Use
6127 linux_pid_exe_is_elf_64_file.
6128
61292012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6130
6131 * linux-low.c (linux_wait_for_event_1): Rename to ...
6132 (linux_wait_for_event): ... here and merge it with former
6133 linux_wait_for_event - new variable wait_ptid, use it.
6134 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6135
61362012-01-23 Pedro Alves <palves@redhat.com>
6137
6138 * server.c (main): Avoid yet another case of infinite loop while
6139 detaching/killing after a longjmp.
6140
61412012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6142
6143 Code cleanup.
6144 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6145
61462012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6147
6148 * hostio.c (handle_readlink): New function.
6149 (handle_vFile): Call it to handle "vFile:readlink" packets.
6150
61512012-01-20 Pedro Alves <palves@redhat.com>
6152 Ulrich Weigand <ulrich.weigand@linaro.org>
6153
6154 * server.c (handle_v_requests): Only support vAttach and vRun to
6155 start multiple processes when in extended protocol mode.
6156
61572012-01-17 Pedro Alves <palves@redhat.com>
6158
6159 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6160 memalign plus mprotect to allocate the scratch buffer.
6161
61622012-01-13 Pedro Alves <palves@redhat.com>
6163
6164 * server.c (attach_inferior): Clear `cont_thread'.
6165
61662012-01-13 Pedro Alves <palves@redhat.com>
6167
6168 * server.c (main): Avoid infinite loop while detaching/killing
6169 after a longjmp.
6170
61712012-01-09 Doug Evans <dje@google.com>
6172
6173 * server.c (start_inferior): Set last_ptid in --wrapper case.
6174
61752012-01-06 Yao Qi <yao@codesourcery.com>
6176
6177 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6178 defined.
6179 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6180
61812012-01-04 Yao Qi <yao@codesourcery.com>
6182
6183 * tracepoint.c (cmd_qtdp): Print debug message
6184 for static tracepoint.
6185
61862012-01-04 Yao Qi <yao@codesourcery.com>
6187
6188 * tracepoint.c (trace_vdebug): Differentiate debug message
6189 between gdbserver and IPA.
6190
61912012-01-03 Yao Qi <yao@codesourcery.com>
6192
6193 * tracepoint.c (tracepoint_was_hit): Don't collect for
6194 static tracepoint.
6195
61962012-01-02 Joel Brobecker <brobecker@adacore.com>
6197
6198 * terminal.h: Reformat copyright header.
6199
62002012-01-02 Joel Brobecker <brobecker@adacore.com>
6201
6202 * server.c (gdbserver_version): Update copyright year.
6203 * gdbreplay.c (gdbreplay_version): Likewise.
6204
62052011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6206
6207 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6208
6209 Revert:
6210 2011-12-18 Hui Zhu <teawater@gmail.com>
6211 * linux-low.c (linux_create_inferior): Save return value to ret.
6212
62132011-12-18 Hui Zhu <teawater@gmail.com>
6214
6215 * linux-low.c (linux_create_inferior): Save return value to ret.
6216
62172011-12-16 Doug Evans <dje@google.com>
6218
6219 * linux-low.c (linux_create_inferior): If stdio connection,
6220 redirect stdin from /dev/null, stdout to stderr.
6221 * remote-utils.c (remote_is_stdio): New static global.
6222 (remote_connection_is_stdio): New function.
6223 (remote_prepare): Handle stdio connection.
6224 (remote_open): Ditto.
6225 (remote_close): Don't close stdin for stdio connections.
6226 (read_prim,write_prim): New functions. Replace all calls to
6227 read/write to these.
6228 * server.c (main): Watch for "-" argument. Move call to
6229 remote_prepare before start_inferior.
6230 * server.h (STDIO_CONNECTION_NAME): New macro.
6231 (remote_connection_is_stdio): Declare.
6232
6233 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6234 in debugging output.
6235
62362011-12-15 Yao Qi <yao@codesourcery.com>
6237
6238 * tracepoint.c: Include sys/syscall.h.
6239 (gdb_ust_thread): Remove preprocessor conditional.
6240
62412011-12-14 Pedro Alves <pedro@codesourcery.com>
6242
6243 * linux-low.c (linux_detach_one_lwp): Call
6244 the_low_target.prepare_to_resume before detaching.
6245
62462011-12-14 Yao Qi <yao@codesourcery.com>
6247
6248 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6249 of write.
6250
62512011-12-14 Yao Qi <yao@codesourcery.com>
6252
6253 * i386-low.c (i386_low_stopped_data_address): Initialize local
6254 variable `control'.
6255
62562011-12-13 Pedro Alves <pedro@codesourcery.com>
6257
6258 PR remote/13492
6259
6260 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6261 DR_CONTROL unless necessary. Extend comments.
6262 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6263 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6264
62652011-12-13 Yao Qi <yao@codesourcery.com>
6266
6267 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6268 macros.
6269 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6270
62712011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6272
6273 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6274 Print new debug message for such case.
6275
62762011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6277
6278 Fix overlapping memcpy.
6279 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6280 the read_inferior_memory transfer.
6281 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6282 write_inferior_memory transfer.
6283 (set_fast_tracepoint_jump): New variable buf. Use it for the
6284 read_inferior_memory and write_inferior_memory transfers.
6285 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6286 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6287 Use it for the write_inferior_memory transfer.
6288 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6289 buffers.
6290
62912011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6292
6293 * linux-low.c (fetch_register, store_register): Make code
6294 consistent, fix formatting.
6295
62962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6297
6298 * linux-low.c (usr_store_inferior_registers): Factor out code
6299 to handle individual registers into...
6300 (store_register): ... this new function.
6301
63022011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6303
6304 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6305 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6306 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6307 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6308 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6309 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6310 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6311 (srv_xmlfiles): Add new XML files.
6312
6313 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6314 and <sys/uio.h>.
6315 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6316 (init_registers_s390_linux32v1): Add prototype.
6317 (init_registers_s390_linux32v2): Likewise.
6318 (init_registers_s390_linux64v1): Likewise.
6319 (init_registers_s390_linux64v2): Likewise.
6320 (init_registers_s390x_linux64v1): Likewise.
6321 (init_registers_s390x_linux64v2): Likewise.
6322 (s390_num_regs): Increment to 52.
6323 (s390_regmap): Add orig_r2 register.
6324 (s390_num_regs_3264): Increment to 68.
6325 (s390_regmap_3264): Add orig_r2 register.
6326 (s390_collect_ptrace_register): Handle orig_r2 register.
6327 (s390_supply_ptrace_register): Likewise.
6328 (s390_fill_last_break): New function.
6329 (s390_store_last_break): Likewise.
6330 (s390_fill_system_call): New function.
6331 (s390_store_system_call): Likewise.
6332 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6333 register sets.
6334 (s390_check_regset): New function.
6335 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6336 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6337 Update target_regsets for available register sets.
6338
63392011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6340 Jan Kratochvil <jan.kratochvil@redhat.com>
6341
6342 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6343 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6344 New.
6345 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6346 * linux-low.h (struct process_info_private): New member r_debug.
6347 * server.c (handle_qxfer_libraries): Call
6348 the_target->qxfer_libraries_svr4.
6349 (handle_qxfer_libraries_svr4): New function.
6350 (qxfer_packets): New entry "libraries-svr4".
6351 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6352 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6353 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6354 PACKET_qXfer_libraries_svr4.
6355
63562011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6357
6358 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6359 PSW address/mask between 8-byte and 16-byte formats.
6360 (s390_supply_ptrace_register): Likewise.
6361 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6362 basic addressing mode bit.
6363
63642011-11-24 Stan Shebs <stan@codesourcery.com>
6365
6366 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6367
63682011-11-17 Stan Shebs <stan@codesourcery.com>
6369
6370 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6371 (tracing_start_time): New global.
6372 (tracing_stop_time): New global.
6373 (tracing_user_name): New global.
6374 (tracing_notes): New global.
6375 (tracing_stop_note): New global.
6376 (cmd_qtstart): Set traceframe_usage, start_time.
6377 (stop_tracing): Set stop_time.
6378 (cmd_qtstatus): Report additional status.
6379 (cmd_qtp): New function.
6380 (handle_tracepoint_query): Call it.
6381 (cmd_qtnotes): New function.
6382 (handle_tracepoint_general_set): Call it.
6383 (get_timestamp): Rename from tsv_get_timestamp.
6384
63852011-11-14 Stan Shebs <stan@codesourcery.com>
6386 Kwok Cheung Yeung <kcy@codesourcery.com>
6387
6388 * linux-x86-low.c (small_jump_insn): New.
6389 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6390 trampoline and error message, build a trampoline and issue a small
6391 jump instruction to it.
6392 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6393 trampoline and error message.
6394 (x86_get_min_fast_tracepoint_insn_len): New.
6395 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6396 * linux-low.h (struct linux_target_ops): Add arguments to
6397 install_fast_tracepoint_jump_pad operation, add new operation.
6398 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6399 arguments.
6400 (linux_get_min_fast_tracepoint_insn_len): New function.
6401 (linux_target_op): Add new operation.
6402 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6403 (gdb_trampoline_buffer_end): Ditto.
6404 (gdb_trampoline_buffer_error): Ditto.
6405 (struct ipa_sym_addresses): Add fields for new IPA variables.
6406 (symbol_list): Add entries for new IPA variables.
6407 (struct tracepoint): Add fields to hold the address range of the
6408 trampoline used by the tracepoint.
6409 (trampoline_buffer_head): New static variable.
6410 (trampoline_buffer_tail): Ditto.
6411 (claim_trampoline_space): New function.
6412 (have_fast_tracepoint_trampoline_buffer): New function.
6413 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6414 structure.
6415 (install_fast_tracepoint): Ditto, also add error buffer argument.
6416 (cmd_qtminftpilen): New function.
6417 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6418 (fast_tracepoint_from_trampoline_address): New function.
6419 (fast_tracepoint_collecting): Handle trampoline as part of jump
6420 pad space.
6421 (set_trampoline_buffer_space): New function.
6422 (initialize_tracepoint): Initialize new IPA variables.
6423 * target.h (struct target_ops): Add arguments to
6424 install_fast_tracepoint_jump_pad operation, add new
6425 get_min_fast_tracepoint_insn_len operation.
6426 (target_get_min_fast_tracepoint_insn_len): New.
6427 (install_fast_tracepoint_jump_pad): Add arguments.
6428 * server.h (IPA_BUFSIZ): Define.
6429 * linux-i386-ipa.c: Include extra header files.
6430 (initialize_fast_tracepoint_trampoline_buffer): New function.
6431 (initialize_low_tracepoint): Call it.
6432 * server.h (set_trampoline_buffer_space): Declare.
6433 (claim_trampoline_space): Ditto.
6434 (have_fast_tracepoint_trampoline_buffer): Ditto.
6435
64362011-11-14 Yao Qi <yao@codesourcery.com>
6437
6438 * server.c (handle_query): Handle InstallInTrace for qSupported.
6439 * tracepoint.c (add_tracepoint): Sort list.
6440 (install_tracepoint, download_tracepoint): New.
6441 (cmd_qtdp): Call them to install and download tracepoints.
6442 (sort_tracepoints): Removed.
6443 (cmd_qtstart): Update.
6444
64452011-11-14 Yao Qi <yao@codesourcery.com>
6446
6447 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6448 * mem-break.h: Declare.
6449 * tracepoint.c (cmd_qtstart): Move some code to ...
6450 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6451 New.
6452 (download_tracepoints): Move some code to ...
6453 (download_tracepoint_1): ... here. New.
6454
64552011-11-08 Yao Qi <yao@codesourcery.com>
6456
6457 * remote-utils.c (relocate_instruction): A comment fix.
6458
64592011-11-07 Joel Brobecker <brobecker@adacore.com>
6460
6461 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6462 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6463 dr_status_mirror and dr_control_mirror from debug_reg_state.
6464 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6465 (i386_initial_stuff): Remove use of deleted globals.
6466 (i386_get_thread_context, i386_set_thread_context,
6467 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6468 from debug_reg_state.
6469
64702011-11-05 Yao Qi <yao@codesourcery.com>
6471
6472 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6473 address as TPOINT's.
6474
64752011-11-02 Stan Shebs <stan@codesourcery.com>
6476
6477 * tracepoint.c (agent_mem_read_string): New function.
6478 (eval_agent_expr): Call it for tracenz.
6479 * server.c (handle_query): Report support for tracenz.
6480
64812011-11-02 Yao Qi <yao@codesourcery.com>
6482
6483 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6484
64852011-11-02 Yao Qi <yao@codesourcery.com>
6486
6487 * target.h: Fix a typo in comment.
6488
64892011-10-31 Pedro Alves <pedro@codesourcery.com>
6490
6491 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6492 clobber the breakpoints' shadows with fast tracepoint jumps.
6493 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6494 * target.c (write_inferior_memory): Also pass MYADDR down to
6495 check_mem_write.
6496
64972011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6498
6499 * configure.ac: Check support for personality routine.
6500 * configure: Regenerate.
6501 * config.in: Likewise.
6502 * linux-low.c: Include <sys/personality.h>.
6503 Define ADDR_NO_RANDOMIZE if necessary.
6504 (linux_create_inferior): Disable address space randomization when
6505 forking inferior, if requested.
6506 (linux_supports_disable_randomization): New function.
6507 (linux_target_ops): Install it.
6508 * server.h (disable_randomization): Declare.
6509 * server.c (disable_randomization): New global variable.
6510 (handle_general_set): Handle QDisableRandomization.
6511 (handle_query): Likewise for qSupported.
6512 (main): Support --disable-randomization and --no-disable-randomization
6513 command line arguments.
6514 * target.h (struct target_ops): Add supports_disable_randomization.
6515 (target_supports_disable_randomization): New macro.
6516
65172011-09-29 Mike Frysinger <vapier@gentoo.org>
6518
6519 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6520 ifdef check.
6521 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6522 [!PT_GETDSBT] (target_loadmap): New definition.
6523 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6524 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6525 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6526 and PT_GETDSBT to LINUX_LOADMAP.
6527 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6528 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6529
65302011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6531
6532 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6533 (arm_linux_hwbp_cap): New static variable.
6534 (arm_linux_get_hwbp_cap): Replace by ...
6535 (arm_linux_init_hwbp_cap): ... this new function.
6536 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6537 (arm_linux_get_hw_watchpoint_count): Likewise.
6538 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6539 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6540 (arm_prepare_to_resume): Use perror_with_name instead of error.
6541
65422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6543
6544 * linux-arm-low.c: Include <signal.h>.
6545 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6546 (struct arm_linux_hwbp_cap): New data type.
6547 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6548 (struct arm_linux_hw_breakpoint): New data type.
6549 (MAX_BPTS, MAX_WPTS): Define.
6550 (struct arch_process_info, struct arch_lwp_info): New data types.
6551 (arm_linux_get_hwbp_cap): New function.
6552 (arm_linux_get_hw_breakpoint_count): Likewise.
6553 (arm_linux_get_hw_watchpoint_count): Likewise.
6554 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6555 (arm_hwbp_control_initialize): Likewise.
6556 (arm_hwbp_control_is_enabled): Likewise.
6557 (arm_hwbp_control_is_initialized): Likewise.
6558 (arm_hwbp_control_disable): Likewise.
6559 (arm_linux_hw_breakpoint_equal): Likewise.
6560 (arm_linux_hw_point_initialize): Likewise.
6561 (struct update_registers_data): New data structure.
6562 (update_registers_callback: New function.
6563 (arm_insert_point): Likewise.
6564 (arm_remove_point): Likewise.
6565 (arm_stopped_by_watchpoint): Likewise.
6566 (arm_stopped_data_address): Likewise.
6567 (arm_new_process): Likewise.
6568 (arm_new_thread): Likewise.
6569 (arm_prepare_to_resume): Likewise.
6570 (the_low_target): Register arm_insert_point, arm_remove_point,
6571 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6572 arm_new_thread, and arm_prepare_to_resume.
6573
65742011-09-15 Stan Shebs <stan@codesourcery.com>
6575
6576 * server.h (struct emit_ops): Add compare-goto fields.
6577 * tracepoint.c (gdb_agent_op_sizes): New table.
6578 (emit_eq_goto): New function.
6579 (emit_ne_goto): New function.
6580 (emit_lt_goto): New function.
6581 (emit_le_goto): New function.
6582 (emit_gt_goto): New function.
6583 (emit_ge_goto): New function.
6584 (is_goto_target): New function.
6585 (compile_bytecodes): Recognize special cases of compare-goto
6586 combinations and call specialized emitters for them.
6587 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6588 (amd64_emit_ne_goto): New function.
6589 (amd64_emit_lt_goto): New function.
6590 (amd64_emit_le_goto): New function.
6591 (amd64_emit_gt_goto): New function.
6592 (amd64_emit_ge_goto): New function.
6593 (amd64_emit_ops): Add the new functions.
6594 (i386_emit_eq_goto): New function.
6595 (i386_emit_ne_goto): New function.
6596 (i386_emit_lt_goto): New function.
6597 (i386_emit_le_goto): New function.
6598 (i386_emit_gt_goto): New function.
6599 (i386_emit_ge_goto): New function.
6600 (i386_emit_ops): Add the new functions.
6601
66022011-09-08 Stan Shebs <stan@codesourcery.com>
6603
6604 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6605 (i386_emit_epilogue): Restore %ebx.
6606
66072011-08-31 Jie Zhang <jzhang918@gmail.com>
6608
6609 * server.c (step_thread): Remove definition.
6610 (process_serial_event): Don't handle Hs.
6611 * server.h (step_thread): Remove declaration.
6612 * target.c (set_desired_inferior): Remove use of step_thread.
6613
66142011-08-24 Luis Machado <lgustavo@codesourcery.com>
6615
6616 * linux-low.c: Include linux-procfs.h.
6617 (linux_attach_lwp_1): Update comments.
6618 (linux_attach): Scan for existing threads when attaching to a
6619 process that is the tgid.
6620 * Makefile.in: Update dependencies.
6621
66222011-08-24 Luis Machado <lgustavo@codesourcery.com>
6623
6624 * configure.srv: Add linux-procfs.o dependencies.
6625
66262011-08-14 Yao Qi <yao@codesourcery.com>
6627
6628 * target.h (struct target_ops): Fix indent.
6629 * win32-low.c (win32_target_ops): Fix comment.
6630
66312011-08-14 Andrew Jenner <andrew@codesourcery.com>
6632 Yao Qi <yao@codesourcery.com>
6633
6634 * Makefile.in (clean): Remove tic6x-*.c files.
6635 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6636 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6637 (tic6x-c64xp-linux.c): Likewise.
6638 * configure.srv: Add support for tic6x-*-uclinux.
6639 * linux-tic6x-low.c: New.
6640 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6641
66422011-08-14 Andrew Stubbs <ams@codesourcery.com>
6643 Yao Qi <yao@codesourcery.com>
6644
6645 * target.h (struct target_ops): Add read_loadmap.
6646 * linux-low.c (struct target_loadseg): New type.
6647 (struct target_loadmap): New type.
6648 (linux_read_loadmap): New function.
6649 (linux_target_ops): Add linux_read_loadmap.
6650 * server.c (handle_query): Support qXfer:fdpic:read packet.
6651 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6652 to NULL.
6653
66542011-08-05 Eli Zaretskii <eliz@gnu.org>
6655
6656 * win32-low.c: Include <stdint.h>.
6657
66582011-07-22 Pedro Alves <pedro@codesourcery.com>
6659
6660 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6661 to the inferior here.
6662 (i386_remove_aligned_watchpoint): Ditto.
6663 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6664 fit part of the watchpoint in the debug registers.
6665 (i386_update_inferior_debug_regs): New.
6666 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6667 registers, and only update the inferior on success.
6668 (i386_low_remove_watchpoint): Ditto.
6669
66702011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6671
6672 * linux-low.c (compare_ints, unique, list_threads, show_process,
6673 linux_core_of_thread): Delete.
6674 (linux_target_ops): Change linux_core_of_thread to
6675 linux_common_core_of_thread.
6676 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6677 * utils.c (malloc_failure): Change type of argument.
6678 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6679 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6680 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6681 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6682 (IPA_OBJS): Add common-utils-ipa.o.
6683 (ptid_h, linux_osdata_h): New macros.
6684 (server_h): Add common/common-utils.h, common/xml-utils.h,
6685 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6686 common/ptid.h.
6687 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6688 ptid.o, buffer.o): New rules.
6689 (linux-low.o): Add common/linux-osdata.h as a dependency.
6690 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6691 * configure.ac: Add AC_HEADER_DIRENT check.
6692 * config.in: Regenerate.
6693 * configure: Regenerate.
6694 * remote-utils.c (xml_escape_text): Delete.
6695 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6696 buffer_xml_printf): Move to common/buffer.c.
6697 * server.c (main): Remove call to initialize_inferiors.
6698 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6699 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6700 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6701 internal_error, gdb_assert, gdb_assert_fail): Delete.
6702 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6703 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6704 common/buffer.h.
6705 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6706 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6707 initialize_inferiors): Delete.
6708
67092011-07-20 Pedro Alves <pedro@codesourcery.com>
6710
6711 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6712 symbol error.
6713
67142011-05-31 Pedro Alves <pedro@codesourcery.com>
6715
6716 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6717 assertion.
6718 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6719
67202011-05-26 Yao Qi <yao@codesourcery.com>
6721
6722 * Makefile.in (thread-db.o): Track dependence to
6723 common/gdb_thread_db.h.
6724 * thread-db.c: include gdb_thread_db.h from right place.
6725
67262011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6727
6728 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6729 __FILE__ and __LINE__ to internal_error.
6730
67312011-05-13 Doug Evans <dje@google.com>
6732
6733 * thread-db.c (try_thread_db_load_from_sdir): New function.
6734 (try_thread_db_load_from_dir): New function.
6735 (thread_db_load_search): Handle $sdir, ignore $pdir.
6736 Remove trying of system directories if search of
6737 libthread-db-search-path fails, that is now done via $sdir.
6738
67392011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6740
6741 * server.c (handle_query): Add EnableDisableTracepoints to the list
6742 of supported features.
6743 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6744 tracepoints.
6745 (cmd_qtenable_disable): New.
6746 (cmd_qtstart): Install tracepoints even if disabled.
6747 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6748 receiving a QTEnable or QTDisable packet.
6749 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6750 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6751 tracepoints.
6752 (gdb_probe): Skip data collection if static tracepoint is disabled.
6753
67542011-05-10 Doug Evans <dje@google.com>
6755
6756 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6757
67582011-05-04 Doug Evans <dje@google.com>
6759
6760 * linux-low.c (linux_join): Skip process lookup.
6761 * spu-low.c (spu_join): Ditto.
6762 * server.c (join_inferiors_callback): Delete.
6763 (process_serial_event): For 'D' packet (detach) call join_inferior
6764 directly.
6765
67662011-05-04 Joseph Myers <joseph@codesourcery.com>
6767
6768 * README: Don't mention xscale*-*-linux*.
6769 * configure.srv (xscale*-*-linux*): Don't handle target.
6770
67712011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6772
6773 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6774 casting pointers.
6775 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6776 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6777 (i386_emit_void_call_2): Likewise.
6778
67792011-04-26 Yao Qi <yao@codesourcery.com>
6780
6781 * linux-low.c: Move common macros to linux-ptrace.h.
6782 Include linux-ptrace.h.
6783 * Makefile.in (linux_ptrace_h): New.
6784 (linux-low.o): Depends on linux-ptrace.h.
6785
67862011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6787
6788 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6789 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6790 (remote_prepare): New function with most of the TCP code from ...
6791 (remote_open): ... here. Detect PORT here unconditionally. Move also
6792 setting transport_is_reliable.
6793 * server.c (run_once): New variable.
6794 (gdbserver_usage): Document it.
6795 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6796 the first run if RUN_ONCE.
6797 * server.h (run_once, remote_prepare): New declarations.
6798
67992011-04-19 Tom Tromey <tromey@redhat.com>
6800
6801 * win32-low.c (handle_load_dll): Remove duplicate "the".
6802
68032011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6804
6805 Remove support for old Cygwin 1.5 versions.
6806 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6807 function to avoid warning.
6808 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6809 warning.
6810
68112011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6812
6813 * gdbserver/server.h (Macro _): Define it if not available.
6814
68152011-03-14 Michael Snyder <msnyder@vmware.com>
6816
6817 * hostio.c (handle_close): Remove unnecessary null test.
6818
68192011-03-10 Joel Brobecker <brobecker@adacore.com>
6820
6821 * Makefile.in (maintainer-clean realclean distclean): Remove
6822 "make ... subdir_do" command.
6823
68242011-03-10 Michael Snyder <msnyder@vmware.com>
6825
6826 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6827
6828 * server.c (handle_v_run): Free alloced buffer on early return.
6829
68302011-03-09 Yao Qi <yao@codesourcery.com>
6831
6832 Revert:
6833 2011-03-04 Yao Qi <yao@codesourcery.com>
6834
6835 * Makefile.in: Remove GNU make feature --directory.
6836
6837 2011-03-05 Yao Qi <yao@codesourcery.com>
6838
6839 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6840 (subdir_do): New make target. Copied from gdb/Makefile.
6841 (maintainer-clean, realclean, distclean, clean): Call corresponding
6842 make targets in common/Makefile.
6843
6844 2011-02-11 Yao Qi <yao@codesourcery.com>
6845
6846 * configure.ac: Call AC_PROG_RANLIB.
6847 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6848 * configure: Regenerate.
6849
68502011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6851
6852 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6853
68542011-03-06 Yao Qi <yao@codesourcery.com>
6855
6856 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6857
68582011-03-05 Yao Qi <yao@codesourcery.com>
6859
6860 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6861 (subdir_do): New make target. Copied from gdb/Makefile.
6862 (maintainer-clean, realclean, distclean, clean): Call corresponding
6863 make targets in common/Makefile.
6864
68652011-03-04 Yao Qi <yao@codesourcery.com>
6866
6867 * Makefile.in: Remove GNU make feature --directory.
6868
68692011-03-04 Michael Snyder <msnyder@vmware.com>
6870
6871 * server.c (queue_stop_reply): Call xmalloc not malloc.
6872
68732011-03-02 Michael Snyder <msnyder@vmware.com>
6874
6875 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6876
68772011-02-28 Michael Snyder <msnyder@vmware.com>
6878
6879 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6880 (cmd_qtframe): Ditto.
6881 (cmd_qtbuffer): Ditto.
6882 (cmd_bigqtbuffer): Ditto.
6883
6884 * utils.c (decimal2str): Initialize 'width' to nine, then
6885 don't mess with it.
6886
68872011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6888
6889 * hostio.c (require_data): Free *data, not data.
6890
68912011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6892
6893 * hostio.c (require_data): Use free, not xfree.
6894
68952011-02-27 Michael Snyder <msnyder@vmware.com>
6896
6897 * server.c (handle_query): Discard unused value.
6898
6899 * hostio.c (require_data): Free malloc memory before returning
6900 error.
6901
69022011-02-26 Michael Snyder <msnyder@vmware.com>
6903
6904 * linux-low.c (list_threads): Call closedir for dirent.
6905
69062011-02-27 Michael Snyder <msnyder@vmware.com>
6907
6908 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6909 a case statement falls through.
6910
6911 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6912
6913 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6914 in comparison.
6915
69162011-02-26 Michael Snyder <msnyder@vmware.com>
6917
6918 * utils.c (decimal2str): Eliminate dead code and dead param.
6919 (pulongest): Drop dead param from call to decimal2str.
6920 (plongest): Ditto.
6921
69222011-02-24 Joel Brobecker <brobecker@adacore.com>
6923
6924 Revert the following patch (not approved yet):
6925 2011-02-21 Hui Zhu <teawater@gmail.com>
6926 * tracepoint.c (tp_printf): New function.
6927 (eval_agent_expr): Handle gdb_agent_op_printf.
6928
69292011-02-21 Hui Zhu <teawater@gmail.com>
6930
6931 * tracepoint.c (tp_printf): New function.
6932 (eval_agent_expr): Handle gdb_agent_op_printf.
6933
69342011-02-18 Tom Tromey <tromey@redhat.com>
6935
6936 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6937 (tracepoint.o): Likewise.
6938 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6939 (gdb_agent_op_names): Likewise.
6940
69412011-02-18 Tom Tromey <tromey@redhat.com>
6942
6943 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6944 gdb_agent_op_rot>: New constants.
6945 (gdb_agent_op_names): Add pick and roll.
6946 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6947 cases.
6948
69492011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6950
6951 * aclocal.m4: Regenerated with aclocal-1.11.1.
6952
69532011-02-14 Pedro Alves <pedro@codesourcery.com>
6954
6955 * server.c (handle_qxfer_traceframe_info): New.
6956 (qxfer_packets): Register "traceframe-info".
6957 (handle_query): Report support for qXfer:traceframe-info:read+.
6958 * tracepoint.c (match_blocktype): New.
6959 (traceframe_find_block_type): Rename to ...
6960 (traceframe_walk_blocks): ... this. Add callback filter argument,
6961 and use it.
6962 (traceframe_find_block_type): New, reimplemented on top of
6963 traceframe_walk_blocks.
6964 (build_traceframe_info_xml): New.
6965 (traceframe_read_info): New.
6966 * server.h (traceframe_read_info): Declare.
6967
69682011-02-11 Yao Qi <yao@codesourcery.com>
6969
6970 * configure.ac: Call AC_PROG_RANLIB.
6971 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6972 * configure: Regenerate.
6973
69742011-02-07 Pedro Alves <pedro@codesourcery.com>
6975
6976 * server.c (gdb_read_memory): Change return semantics to allow
6977 partial transfers.
6978 (handle_search_memory_1): Adjust.
6979 (process_serial_event) <'m' packet>: Handle partial transfers.
6980 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6981
69822011-01-28 Pedro Alves <pedro@codesourcery.com>
6983
6984 * regcache.c (init_register_cache): Initialize
6985 regcache->register_status.
6986 (free_register_cache): Release regcache->register_status.
6987 (regcache_cpy): Copy register_status.
6988 (registers_to_string): Print 'x's for unavailable registers.
6989 (supply_register): Mark the register's status valid or
6990 unavailable, depending on whether a buffer was passed in or not.
6991 (supply_register_zeroed): New.
6992 (supply_regblock): Mark the registers' status valid or
6993 unavailable, depending on whether a buffer was passed in or not.
6994 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6995 (struct regcache): New `register_status' field.
6996 (supply_register_zeroed): Declare.
6997 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6998 supply_register_zeroed, rather than passing a NULL buffer to
6999 supply_register.
7000 * tracepoint.c (fetch_traceframe_registers): Update comment.
7001
70022011-01-28 Pedro Alves <pedro@codesourcery.com>
7003
7004 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7005 buffer explicit.
7006
70072011-01-25 Pedro Alves <pedro@codesourcery.com>
7008
7009 * server.h (decode_xfer_write): Change prototype.
7010 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7011 and don't extract the annex here.
7012 * server.c (decode_xfer_read): Remove `annex' parameter,
7013 and don't extract the annex here.
7014 (decode_xfer): New.
7015 (struct qxfer): New.
7016 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7017 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7018 (handle_qxfer_statictrace): New functions, abstracted out from
7019 handle_query, and made to use the struct qxfer interface.
7020 (handle_threads_qxfer_proper): Rename to ...
7021 (handle_qxfer_threads_proper): ... this.
7022 (handle_threads_qxfer): Rename to ...
7023 (handle_qxfer_threads): ... this. Adjust.
7024 (qxfer_packets): New array.
7025 (handle_qxfer): New function.
7026 (handle_query): Use handle_qxfer.
7027
70282011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7029
7030 * gdbreplay.c: Shorten lines of >= 80 columns.
7031 * linux-low.c: Ditto.
7032 * linux-ppc-low.c: Ditto.
7033 * linux-s390-low.c: Ditto.
7034 * linux-sparc-low.c: Ditto.
7035 * linux-x86-low.c: Ditto.
7036 * linux-xtensa-low.c: Ditto.
7037 * mem-break.c: Ditto.
7038 * nto-low.c: Ditto.
7039 * regcache.h: Ditto.
7040 * remote-utils.c: Ditto.
7041 * server.c: Ditto.
7042 * server.h: Ditto.
7043 * thread-db.c: Ditto.
7044 * tracepoint.c: Ditto.
7045 * utils.c: Ditto.
7046 * win32-low.h: Ditto.
7047
70482011-01-05 Joel Brobecker <brobecker@adacore.com>
7049
7050 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7051 update.
7052
70532011-01-01 Joel Brobecker <brobecker@adacore.com>
7054
7055 * server.c (gdbserver_version): Update copyright year in version
7056 output.
7057 * gdbreplay.c (gdbreplay_version): Ditto.
7058
70592010-12-29 Jie Zhang <jie.zhang@analog.com>
7060
7061 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7062 * linux-bfin-low.c: New file.
7063 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7064 PT_DATA_ADDR for BFIN targets.
7065 * Makefile.in (SFILES): Add linux-bfin-low.c.
7066 (clean): Remove reg-bfin.c.
7067 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7068 * README: Mention supported Blackfin targets.
7069
70702010-12-23 Mike Frysinger <vapier@gentoo.org>
7071
7072 * .gitignore: New file.
7073
70742010-11-16 Mike Frysinger <vapier@gentoo.org>
7075
7076 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7077
70782010-10-22 Jie Zhang <jie@codesourcery.com>
7079
7080 * Makefile.in: Add FLAGS_TO_PASS variable.
7081 (install): Remove dependency of install-only and recursively
7082 invoke make for install-only.
7083
70842010-10-04 Doug Evans <dje@google.com>
7085
7086 * Makefile.in (uninstall): Use $(DESTDIR).
7087
70882010-09-24 Pedro Alves <pedro@codesourcery.com>
7089
7090 PR gdb/11842
7091
7092 * linux-x86-low.c (compat_siginfo_from_siginfo)
7093 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7094 si_code is < 0. Check for si_code == SI_TIMER before checking for
7095 si_code < 0.
7096
70972010-09-13 Joel Brobecker <brobecker@adacore.com>
7098
7099 * lynx-i386-low.c: New file.
7100 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7101
71022010-09-13 Joel Brobecker <brobecker@adacore.com>
7103
7104 * lynx-low.c (ptrace_request_to_str): Remove handling for
7105 request values that have been removed in LynxOS 5.x.
7106
71072010-09-13 Joel Brobecker <brobecker@adacore.com>
7108
7109 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7110 <ptrace.h>
7111
71122010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7113
7114 * configure.ac: Add --enable-inprocess-agent option.
7115 * configure: Rebuilt.
7116
71172010-09-06 Yao Qi <yao@codesourcery.com>
7118
7119 * linux-low.c (linux_kill): Remove unused variable.
7120 (linux_stabilize_threads): Likewise.
7121 * server.c (start_inferior): Likewise.
7122 (queue_stop_reply_callback): Likewise.
7123 * tracepoint.c (do_action_at_tracepoint): Likewise.
7124
71252010-09-06 Yao Qi <yao@codesourcery.com>
7126
7127 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7128 on return.
7129
71302010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7131
7132 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7133
71342010-09-06 Pedro Alves <pedro@codesourcery.com>
7135
7136 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7137 "$(IPA_DEPFILES)".
7138
71392010-09-01 Joel Brobecker <brobecker@adacore.com>
7140
7141 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7142 gdbserver/lynx-ppc-low.c: New files.
7143 * Makefile.in (lynx_low_h): New variable.
7144 (lynx-low.o, lynx-ppc-low.o): New rules.
7145 * configure.ac: On LynxOS, link with -lnetinet.
7146 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7147 * configure: regenerate.
7148
71492010-09-01 Joel Brobecker <brobecker@adacore.com>
7150
7151 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7152 * configure.ac: Add check for vasprintf and vsnprintf.
7153 * configure, config.in: Regenerate.
7154 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7155
71562010-09-01 Joel Brobecker <brobecker@adacore.com>
7157
7158 * gdbreplay.c: Move include of alloca.h up, next to include of
7159 malloc.h.
7160 * server.h: Add include of malloc.h.
7161 * mem-break.c: Remove include of malloc.h.
7162 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7163
71642010-09-01 Joel Brobecker <brobecker@adacore.com>
7165
7166 * Makefile.in (memmem.o): Build with -Wno-error.
7167
71682010-09-01 Joel Brobecker <brobecker@adacore.com>
7169
7170 * utils.c (xsnprintf): Make non-static.
7171 * server.h: Add xsnprintf declaration.
7172 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7173 replace calls to snprintf by calls to xsnprintf throughout.
7174
71752010-09-01 Joel Brobecker <brobecker@adacore.com>
7176
7177 * configure.ac: Add configure check for alloca.
7178 * configure, config.in: Regenerate.
7179 * server.h: Include alloca.h if it exists.
7180 * gdbreplay.c: Include alloca.h if it exists.
7181
71822010-08-28 Pedro Alves <pedro@codesourcery.com>
7183
7184 * linux-low.c (__SIGRTMIN): Define if not already defined.
7185 (linux_create_inferior): Check for __ANDROID__ rather than
7186 __SIGRTMIN.
7187 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7188 are already deferred.
7189 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7190 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7191 stopped and already has a pending signal to report.
7192 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7193 a pending signal to report or is moving out of a jump pad.
7194 (linux_init_signals): Check for __ANDROID__ rather than
7195 __SIGRTMIN.
7196
71972010-08-28 Pedro Alves <pedro@codesourcery.com>
7198
7199 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7200 debug_threads check. Avoid a linear search when not doing debug
7201 output.
7202
72032010-08-27 Pedro Alves <pedro@codesourcery.com>
7204
7205 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7206 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7207 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7208 (process_event): Change local fd's type to gdb_fildes_t.
7209 (create_file_handler): Adjust prototype.
7210 (delete_file_handler): Adjust prototype.
7211 (handle_file_event): Adjust prototype. Use pfildes.
7212 (create_file_event): Adjsut prototype.
7213 * remote-utils.c (remote_desc, listen_desc): Change type to
7214 gdb_fildes_t.
7215 * server.h: New gdb_fildes_t typedef.
7216 [USE_WIN32API]: Include winsock2.h.
7217 (delete_file_handler, add_file_handler): Adjust prototypes.
7218 (pfildes): Declare.
7219 * utils.c (pfildes): New.
7220
72212010-08-27 Pedro Alves <pedro@codesourcery.com>
7222
7223 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7224 * configure: Regenerate.
7225
72262010-08-27 Pedro Alves <pedro@codesourcery.com>
7227
7228 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7229 (linux_done_accessing_memory): ... this.
7230 (linux_target_ops): Adjust.
7231 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7232 * nto-low.c (nto_target_ops): Adjust comment.
7233 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7234 * spu-low.c (spu_target_ops): Adjust comment.
7235 * target.h (target_ops): Rename unprepare_to_access_memory field
7236 to done_accessing_memory.
7237 (unprepare_to_access_memory): Rename to ...
7238 (done_accessing_memory): ... this.
7239
72402010-08-26 Pedro Alves <pedro@codesourcery.com>
7241
7242 * linux-low.c (linux_prepare_to_access_memory): New.
7243 (linux_unprepare_to_access_memory): New.
7244 (linux_target_ops): Install them.
7245 * server.c (read_memory): Rename to ...
7246 (gdb_read_memory): ... this. Use
7247 prepare_to_access_memory/prepare_to_access_memory.
7248 (write_memory): Rename to ...
7249 (gdb_write_memory): ... this. Use
7250 prepare_to_access_memory/prepare_to_access_memory.
7251 (handle_search_memory_1): Adjust.
7252 (process_serial_event): Adjust.
7253 * target.h (struct target_ops): New fields
7254 prepare_to_access_memory and unprepare_to_access_memory.
7255 (prepare_to_access_memory, unprepare_to_access_memory): New.
7256 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7257 prepare_to_access_memory/prepare_to_access_memory.
7258 * nto-low.c (nto_target_ops): Adjust.
7259 * spu-low.c (spu_target_ops): Adjust.
7260 * win32-low.c (win32_target_ops): Adjust.
7261
72622010-08-26 Pedro Alves <pedro@codesourcery.com>
7263
7264 * Makefile.in (WARN_CFLAGS): Get it from configure.
7265 (WERROR_CFLAGS): New.
7266 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7267 * configure.ac: Introduce --enable-werror, which adds -Werror to
7268 the compiler command line. Enabled by default. Disable with
7269 --disable-werror. Add -Wdeclaration-after-statement
7270 Wpointer-arith and -Wformat-nonliteral to warning flags.
7271 * configure: Regenerate.
7272
72732010-08-26 Pedro Alves <pedro@codesourcery.com>
7274
7275 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7276
72772010-08-26 Pedro Alves <pedro@codesourcery.com>
7278
7279 * gdbreplay.c (remote_error): New.
7280 (gdbchar): New.
7281 (expect): Use gdbchar. Check for error reading from GDB.
7282 Clarify sync error output.
7283 (play): Check for errors writing to GDB.
7284 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7285 * remote-utils.c (getpkt): Check for errors writing to the remote
7286 descriptor.
7287
72882010-08-25 Pedro Alves <pedro@codesourcery.com>
7289
7290 * linux-low.c (linux_wait_1): Move non-debugging code out of
7291 `debug_threads' control.
7292
72932010-08-25 Pedro Alves <pedro@codesourcery.com>
7294
7295 * linux-low.c (linux_wait_1): Don't set last_status here.
7296 * server.c (push_event, queue_stop_reply_callback): Assert we're
7297 not pushing a TARGET_WAITKIND_IGNORE event.
7298 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7299 (myresume, handle_target_event): Set the thread's last_resume_kind
7300 and last_status from the target returned status.
7301
73022010-08-25 Pedro Alves <pedro@codesourcery.com>
7303
7304 PR threads/10729
7305
7306 * linux-x86-low.c (update_debug_registers_callback): New.
7307 (i386_dr_low_set_addr): Use it.
7308 (i386_dr_low_get_addr): New.
7309 (i386_dr_low_set_control): Use update_debug_registers_callback.
7310 (i386_dr_low_get_control): New.
7311 (i386_dr_low_get_status): Adjust.
7312 * linux-low.c (linux_stop_lwp): New.
7313 * linux-low.h (linux_stop_lwp): Declare.
7314
7315 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7316 argument instead of a i386_debug_reg_state.
7317 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7318 a i386_debug_reg_state.
7319 (i386_insert_aligned_watchpoint): Adjust.
7320 (i386_remove_aligned_watchpoint): Adjust.
7321 (i386_low_stopped_data_address): Read the debug registers from the
7322 inferior instead of from the mirrors.
7323 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7324 (i386_dr_low_get_addr): Declare.
7325 (i386_dr_low_get_control): Declare.
7326 (i386_dr_low_get_status): Change prototype.
7327
7328 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7329 (i386_dr_low_get_addr): New.
7330 (i386_dr_low_get_control): New.
7331 (i386_dr_low_get_status): Adjust prototype. Return
7332 dr_status_mirror.
7333 (i386_initial_stuff): Clear dr_status_mirror and
7334 dr_control_mirror.
7335 (i386_get_thread_context): Adjust.
7336 (i386_set_thread_context): Adjust.
7337 (i386_thread_added): Adjust.
7338
73392010-08-24 Pedro Alves <pedro@codesourcery.com>
7340
7341 * linux-low.h (linux_thread_area): Delete declaration.
7342
73432010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7344
7345 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7346 after its termination.
7347
73482010-08-09 Pedro Alves <pedro@codesourcery.com>
7349
7350 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7351 (gdb_wants_all_stopped): Delete.
7352 (linux_wait_1): Don't call them.
7353 * server.c (handle_v_cont): Tag all threads as want-stopped.
7354 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7355 stopped as "client-wants-stopped".
7356
73572010-07-31 Pedro Alves <pedro@codesourcery.com>
7358
7359 * Makefile.in (signals_h): New.
7360 (server_h): Depend on it.
7361 (server.o): Don't depend on $(signals_def).
7362 (signals.o): Depend on $(signals_def).
7363
73642010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7365
7366 * Makefile.in (signals_def): New.
7367 (server_h): Append include/gdb/signals.h and signals_def.
7368 (server.o): Append signals_def.
7369
73702010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7371
7372 * server.c (handle_target_event): Use target_signal_to_host for
7373 resume_info.sig initialization.
7374 * target.h (struct thread_resume) <sig>: New comment.
7375
73762010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7377
7378 * server.c (handle_query): strcpy() the returned string from paddress()
7379 instead of sprintf().
7380 * utils.c (paddress): Return phex_nz().
7381
73822010-07-07 Joel Brobecker <brobecker@adacore.com>
7383
7384 * server.c (handle_v_cont): Call mourn_inferior if process
7385 just exited.
7386 (myresume): Likewise.
7387
73882010-07-01 Pedro Alves <pedro@codesourcery.com>
7389
7390 Static tracepoints, and integration with UST.
7391
7392 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7393 * mem-break.c (uninsert_all_breakpoints)
7394 (reinsert_all_breakpoints): New.
7395 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7396 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7397 (gdb_agent_ust_loaded, helper_thread_id)
7398 (gdb_agent_helper_thread_id): New macros.
7399 (struct ipa_sym_addresses): Add addr_ust_loaded,
7400 addr_helper_thread_id, addr_cmd_buf.
7401 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7402 (in_process_agent_loaded_ust): New.
7403 (write_e_ust_not_loaded): New.
7404 (maybe_write_ipa_ust_not_loaded): New.
7405 (struct collect_static_trace_data_action): New.
7406 (enum tracepoint_type) <static_tracepoint>: New.
7407 (struct tracepoint) <handle>: Mention static tracepoints.
7408 (struct static_tracepoint_ctx): New.
7409 (CMD_BUF_SIZE): New.
7410 (add_tracepoint_action): Handle static tracepoint actions.
7411 (unprobe_marker_at): New.
7412 (clear_installed_tracepoints): Handle static tracepoints.
7413 (cmd_qtdp): Handle static tracepoints.
7414 (probe_marker_at): New.
7415 (cmd_qtstart): Handle static tracepoints.
7416 (response_tracepoint): Handle static tracepoints.
7417 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7418 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7419 (get_context_regcache): Handle static tracepoints.
7420 (do_action_at_tracepoint): Handle static tracepoint actions.
7421 (traceframe_find_block_type): Handle static trace data blocks.
7422 (traceframe_read_sdata): New.
7423 (download_tracepoints): Download static tracepoint actions.
7424 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7425 (GDB_PROBE_NAME): New.
7426 (ust_ops): New.
7427 (GET_UST_SYM): New.
7428 (USTF): New.
7429 (dlsym_ust): New.
7430 (ust_marker_to_static_tracepoint): New.
7431 (gdb_probe): New.
7432 (collect_ust_data_at_tracepoint): New.
7433 (gdb_ust_probe): New.
7434 (UNIX_PATH_MAX, SOCK_DIR): New.
7435 (gdb_ust_connect_sync_socket): New.
7436 (resume_thread, stop_thread): New.
7437 (run_inferior_command): New.
7438 (init_named_socket): New.
7439 (gdb_ust_socket_init): New.
7440 (cstr_to_hexstr): New.
7441 (next_st): New.
7442 (first_marker, next_marker): New.
7443 (response_ust_marker): New.
7444 (cmd_qtfstm, cmd_qtsstm): New.
7445 (unprobe_marker_at, probe_marker_at): New.
7446 (cmd_qtstmat, gdb_ust_thread): New.
7447 (gdb_ust_init): New.
7448 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7449 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7450 (ST_REGENTRY): New.
7451 (x86_64_st_collect_regmap): New.
7452 (X86_64_NUM_ST_COLLECT_GREGS): New.
7453 (AMD64_RIP_REGNUM): New.
7454 (supply_static_tracepoint_registers): New.
7455 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7456 (ST_REGENTRY): New.
7457 (i386_st_collect_regmap): New.
7458 (i386_NUM_ST_COLLECT_GREGS): New.
7459 (supply_static_tracepoint_registers): New.
7460 * server.c (handle_query): Handle qXfer:statictrace:read.
7461 <qSupported>: Report support for StaticTracepoints, and
7462 qXfer:statictrace:read features.
7463 * server.h (traceframe_read_sdata)
7464 (supply_static_tracepoint_registers): Declare.
7465 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7466 (unpack_varlen_hex): Include in IPA build.
7467 * Makefile.in (ustlibs, ustinc): New.
7468 (IPA_OBJS): Add remote-utils-ipa.o.
7469 ($(IPA_LIB)): Link -ldl and -lpthread.
7470 (UST_CFLAGS): New.
7471 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7472 * config.in, configure: Regenerate.
7473
74742010-06-20 Ian Lance Taylor <iant@google.com>
7475 Pedro Alves <pedro@codesourcery.com>
7476
7477 * linux-x86-low.c (always_true): Delete.
7478 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7479 trying to fool the compiler with always_true.
7480
74812010-06-20 Pedro Alves <pedro@codesourcery.com>
7482
7483 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7484 conditions in gdbserver.
7485
74862010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7487
7488 * spu-low.c (spu_read_memory): Wrap around local store limit.
7489 (spu_write_memory): Likewise.
7490
74912010-06-15 Pedro Alves <pedro@codesourcery.com>
7492
7493 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7494 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7495 LONGEST uses.
7496 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7497 uses.
7498 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7499 uses with LONGEST uses.
7500
75012010-06-14 Stan Shebs <stan@codesourcery.com>
7502 Pedro Alves <pedro@codesourcery.com>
7503
7504 Bytecode compiler.
7505
7506 * linux-x86-low.c: Include limits.h.
7507 (add_insns): New.
7508 (always_true): New.
7509 (EMIT_ASM): New.
7510 (EMIT_ASM32): New.
7511 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7512 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7513 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7514 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7515 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7516 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7517 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7518 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7519 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7520 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7521 (amd64_emit_void_call_2): New.
7522 (amd64_emit_ops): New.
7523 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7524 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7525 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7526 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7527 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7528 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7529 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7530 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7531 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7532 (i386_emit_stack_adjust, i386_emit_int_call_1)
7533 (i386_emit_void_call_2): New.
7534 (i386_emit_ops): New.
7535 (x86_emit_ops): New.
7536 (the_low_target): Install x86_emit_ops.
7537 * server.h (struct emit_ops): New.
7538 (get_raw_reg_func_addr): Declare.
7539 (current_insn_ptr, emit_error): Declare.
7540 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7541 (set_trace_state_variable_value): New defines.
7542 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7543 addr_get_trace_state_variable_value and
7544 addr_set_trace_state_variable_value.
7545 (symbol_list): New fields for get_raw_reg,
7546 get_trace_state_variable_value and set_trace_state_variable_value.
7547 (condfn): New typedef.
7548 (struct tracepoint): New field `compiled_cond'.
7549 (do_action_at_tracepoint): Clear compiled_cond.
7550 (get_trace_state_variable_value, set_trace_state_variable_value):
7551 Export in the IPA.
7552 (condition_true_at_tracepoint): If there's a compiled condition,
7553 run that.
7554 (current_insn_ptr, emit_error): New globals.
7555 (struct bytecode_address): New.
7556 (get_raw_reg_func_addr): New.
7557 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7558 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7559 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7560 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7561 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7562 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7563 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7564 (compile_tracepoint_condition, compile_bytecodes): New.
7565 * target.h (emit_ops): Forward declare.
7566 (struct target_ops): New field emit_ops.
7567 (target_emit_ops): New.
7568 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7569 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7570 * linux-low.c (linux_emit_ops): New.
7571 (linux_target_ops): Install it.
7572 * linux-low.h (struct linux_target_ops): New field emit_ops.
7573
75742010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7575
7576 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7577 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7578
75792010-06-01 Pedro Alves <pedro@codesourcery.com>
7580 Stan Shebs <stan@codesourcery.com>
7581
7582 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7583 (all): Depend on $(extra_libraries).
7584 (install-only): Install the IPA.
7585 (IPA_OBJS, IPA_LIB): New.
7586 (clean): Remove the IPA lib.
7587 (IPAGENT_CFLAGS): New.
7588 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7589 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7590 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7591 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7592 * configure.ac: Check for atomic builtins support in the compiler.
7593 (IPA_DEPFILES, extra_libraries): Define.
7594 * configure.srv (ipa_obj): Add description.
7595 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7596 (i[34567]86-*-linux*): Set ipa_obj.
7597 (x86_64-*-linux*): Set ipa_obj.
7598 * linux-low.c (stabilizing_threads): New.
7599 (supports_fast_tracepoints): New.
7600 (linux_detach): Stabilize threads before detaching.
7601 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7602 the lwp is either not stabilizing, or is moving out of a jump pad.
7603 (linux_fast_tracepoint_collecting): New.
7604 (maybe_move_out_of_jump_pad): New.
7605 (enqueue_one_deferred_signal): New.
7606 (dequeue_one_deferred_signal): New.
7607 (linux_wait_for_event_1): If moving out of a jump pad, defer
7608 pending signals to later.
7609 (linux_stabilize_threads): New.
7610 (linux_wait_1): Check if threads need moving out of jump pads, and
7611 do it if so.
7612 (stuck_in_jump_pad_callback): New.
7613 (move_out_of_jump_pad_callback): New.
7614 (lwp_running): New.
7615 (linux_resume_one_lwp): Handle moving out of jump pads.
7616 (linux_set_resume_request): Dequeue deferred signals.
7617 (need_step_over_p): Also step over fast tracepoint jumps.
7618 (start_step_over): Also uninsert fast tracepoint jumps.
7619 (finish_step_over): Also reinsert fast tracepoint jumps.
7620 (linux_install_fast_tracepoint_jump): New.
7621 (linux_target_ops): Install linux_stabilize_threads and
7622 linux_install_fast_tracepoint_jump_pad.
7623 * linux-low.h (linux_target_ops) <get_thread_area,
7624 install_fast_tracepoint_jump_pad>: New fields.
7625 (struct lwp_info) <collecting_fast_tracepoint,
7626 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7627 (linux_get_thread_area): Declare.
7628 * linux-x86-low.c (jump_insn): New.
7629 (x86_get_thread_area): New.
7630 (append_insns): New.
7631 (push_opcode): New.
7632 (amd64_install_fast_tracepoint_jump_pad): New.
7633 (i386_install_fast_tracepoint_jump_pad): New.
7634 (x86_install_fast_tracepoint_jump_pad): New.
7635 (the_low_target): Install x86_get_thread_area and
7636 x86_install_fast_tracepoint_jump_pad.
7637 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7638 (struct fast_tracepoint_jump): New.
7639 (fast_tracepoint_jump_insn): New.
7640 (fast_tracepoint_jump_shadow): New.
7641 (find_fast_tracepoint_jump_at): New.
7642 (fast_tracepoint_jump_here): New.
7643 (delete_fast_tracepoint_jump): New.
7644 (set_fast_tracepoint_jump): New.
7645 (uninsert_fast_tracepoint_jumps_at): New.
7646 (reinsert_fast_tracepoint_jumps_at): New.
7647 (set_breakpoint_at): Use write_inferior_memory.
7648 (uninsert_raw_breakpoint): Use write_inferior_memory.
7649 (check_mem_read): Mask out fast tracepoint jumps.
7650 (check_mem_write): Mask out fast tracepoint jumps.
7651 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7652 (set_fast_tracepoint_jump): Declare.
7653 (delete_fast_tracepoint_jump)
7654 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7655 (reinsert_fast_tracepoint_jumps_at): Declare.
7656 * regcache.c: Don't compile many functions when building the
7657 in-process agent library.
7658 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7659 the register buffer in the heap.
7660 (free_register_cache): If the register buffer isn't owned by the
7661 regcache, don't free it.
7662 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7663 pre-existing register caches.
7664 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7665 type.
7666 (convert_ascii_to_int): : Constify `from' parameter type.
7667 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7668 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7669 the needed buffer in-place.
7670 (relocate_instruction): New.
7671 * server.c (handle_query) <qSymbols>: If the target supports
7672 tracepoints, give it a chance of looking up symbols. Report
7673 support for fast tracepoints.
7674 (handle_status): Stabilize threads.
7675 (process_serial_event): Adjust.
7676 * server.h (struct fast_tracepoint_jump): Forward declare.
7677 (struct process_info) <fast_tracepoint_jumps>: New field.
7678 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7679 (decode_X_packet, decode_M_packet): Adjust.
7680 (relocate_instruction): Declare.
7681 (in_process_agent_loaded): Declare.
7682 (tracepoint_look_up_symbols): Declare.
7683 (struct fast_tpoint_collect_status): Declare.
7684 (fast_tracepoint_collecting): Declare.
7685 (force_unlock_trace_buffer): Declare.
7686 (handle_tracepoint_bkpts): Declare.
7687 (initialize_low_tracepoint)
7688 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7689 * target.h (struct target_ops) <stabilize_threads,
7690 install_fast_tracepoint_jump_pad>: New fields.
7691 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7692 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7693 [HAVE_STDINT_H]: Include stdint.h.
7694 (trace_debug_1): Rename to ...
7695 (trace_vdebug): ... this.
7696 (trace_debug): Rename to ...
7697 (trace_debug_1): ... this. Add `level' parameter.
7698 (trace_debug): New.
7699 (ATTR_USED, ATTR_NOINLINE): New.
7700 (IP_AGENT_EXPORT): New.
7701 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7702 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7703 (about_to_request_buffer_space, trace_buffer_is_full)
7704 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7705 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7706 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7707 (traceframe_write_count, traceframes_created)
7708 (trace_state_variables)
7709 New renaming defines.
7710 (struct ipa_sym_addresses): New.
7711 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7712 (symbol_list): New.
7713 (ipa_sym_addrs): New.
7714 (all_tracepoint_symbols_looked_up): New.
7715 (in_process_agent_loaded): New.
7716 (write_e_ipa_not_loaded): New.
7717 (maybe_write_ipa_not_loaded): New.
7718 (tracepoint_look_up_symbols): New.
7719 (debug_threads) [IN_PROCESS_AGENT]: New.
7720 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7721 (UNKNOWN_SIDE_EFFECTS): New.
7722 (stop_tracing): New.
7723 (flush_trace_buffer): New.
7724 (stop_tracing_bkpt): New.
7725 (flush_trace_buffer_bkpt): New.
7726 (read_inferior_integer): New.
7727 (read_inferior_uinteger): New.
7728 (read_inferior_data_pointer): New.
7729 (write_inferior_data_pointer): New.
7730 (write_inferior_integer): New.
7731 (write_inferior_uinteger): New.
7732 (struct collect_static_trace_data_action): Delete.
7733 (enum tracepoint_type): New.
7734 (struct tracepoint) <type>: New field `type'.
7735 <actions_str, step_actions, step_actions_str>: Only include in
7736 GDBserver.
7737 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7738 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7739 (tracepoints): Use IP_AGENT_EXPORT.
7740 (last_tracepoint): Don't include in the IPA.
7741 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7742 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7743 (alloced_trace_state_variables): New.
7744 (trace_state_variables): Use IP_AGENT_EXPORT.
7745 (traceframe_t): Delete unused variable.
7746 (circular_trace_buffer): Don't include in the IPA.
7747 (trace_buffer_start): Delete.
7748 (struct trace_buffer_control): New.
7749 (trace_buffer_free): Delete.
7750 (struct ipa_trace_buffer_control): New.
7751 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7752 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7753 New.
7754 (trace_buffer_ctrl): New.
7755 (TRACE_BUFFER_CTRL_CURR): New.
7756 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7757 Reimplement as macros.
7758 (trace_buffer_wrap): Delete.
7759 (traceframe_write_count, traceframe_read_count)
7760 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7761 (struct tracepoint_hit_ctx) <type>: New field.
7762 (struct fast_tracepoint_ctx): New.
7763 (memory_barrier): New.
7764 (cmpxchg): New.
7765 (record_tracepoint_error): Update atomically in the IPA.
7766 (clear_inferior_trace_buffer): New.
7767 (about_to_request_buffer_space): New.
7768 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7769 updating the same buffer.
7770 (add_tracepoint): Default the tracepoint's type to trap
7771 tracepoint, and orig_size to -1.
7772 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7773 internal variables.
7774 (create_trace_state_variable): New parameter `gdb'. Handle it.
7775 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7776 (cmd_qtdp): Handle fast tracepoints.
7777 (cmd_qtdv): Adjust.
7778 (max_jump_pad_size): New.
7779 (gdb_jump_pad_head): New.
7780 (get_jump_space_head): New.
7781 (claim_jump_space): New.
7782 (sort_tracepoints): New.
7783 (MAX_JUMP_SIZE): New.
7784 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7785 IPA.
7786 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7787 support. Upload fast traceframes, and delete internal IPA
7788 breakpoints.
7789 (stop_tracing_handler): New.
7790 (flush_trace_buffer_handler): New.
7791 (cmd_qtstop): Upload fast tracepoints.
7792 (response_tracepoint): Handle fast tracepoints.
7793 (tracepoint_finished_step): Upload fast traceframes. Set the
7794 tracepoint hit context's tracepoint type.
7795 (handle_tracepoint_bkpts): New.
7796 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7797 type. Add comment about fast tracepoints.
7798 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7799 non-existing action_str field.
7800 (get_context_regcache): Handle fast tracepoints.
7801 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7802 to the regcache.
7803 (fast_tracepoint_from_jump_pad_address): New.
7804 (fast_tracepoint_from_ipa_tpoint_address): New.
7805 (collecting_t): New.
7806 (force_unlock_trace_buffer): New.
7807 (fast_tracepoint_collecting): New.
7808 (collecting): New.
7809 (gdb_collect): New.
7810 (write_inferior_data_ptr): New.
7811 (target_tp_heap): New.
7812 (target_malloc): New.
7813 (download_agent_expr): New.
7814 (UALIGN): New.
7815 (download_tracepoints): New.
7816 (download_trace_state_variables): New.
7817 (upload_fast_traceframes): New.
7818 (IPA_FIRST_TRACEFRAME): New.
7819 (IPA_NEXT_TRACEFRAME_1): New.
7820 (IPA_NEXT_TRACEFRAME): New.
7821 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7822 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7823 (gdb_jump_pad_buffer_end): New.
7824 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7825 (initialize_tracepoint): Adjust.
7826 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7827 buffer. Initialize the low module.
7828 * utils.c (PREFIX, TOOLNAME): New.
7829 (malloc_failure): Use PREFIX.
7830 (error): In the IPA, an error causes an exit.
7831 (fatal, warning): Use PREFIX.
7832 (internal_error): Use TOOLNAME.
7833 (NUMCELLS): Increase to 10.
7834 * configure, config.in: Regenerate.
7835
78362010-06-01 Pedro Alves <pedro@codesourcery.com>
7837
7838 * server.c (handle_query) <qSupported>: Do two passes over the
7839 qSupported string to avoid nesting strtok.
7840
78412010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7842
7843 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7844 (CDEPS): New.
7845 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7846 -Wl,--dynamic-list.
7847 * configure: Regenerate.
7848 * proc-service.list: New.
7849
78502010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7851
7852 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7853 New comment.
7854
78552010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7856
7857 * gdbreplay.c (remote_open): Check error return from socket() call by
7858 its equality to -1 not by it being negative.
7859 * remote-utils.c (remote_open): Likewise.
7860
78612010-05-23 Pedro Alves <pedro@codesourcery.com>
7862
7863 * config.h: Regenerate.
7864
78652010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7866
7867 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7868 doesn't provide PTRACE_GET_THREAD_AREA.
7869
78702010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7871
7872 * linux-m68k-low.c: Include <asm/ptrace.h>
7873 (ps_get_thread_area): Implement.
7874
78752010-05-03 Doug Evans <dje@google.com>
7876
7877 * event-loop.c (struct callback_event): New struct.
7878 (callback_list): New global.
7879 (append_callback_event, delete_callback_event): New functions.
7880 (process_callback): New function.
7881 (start_event_loop): Call it.
7882 * remote-utils.c (NOT_SCHEDULED): Define.
7883 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7884 moved out of readchar.
7885 (readchar): Rewrite. Call reschedule before returning.
7886 (reset_readchar): New function.
7887 (remote_close): Call it.
7888 (process_remaining, reschedule): New functions.
7889 * server.h (callback_handler_func): New typedef.
7890 (append_callback_event, delete_callback_event): Declare.
7891
78922010-05-03 Pedro Alves <pedro@codesourcery.com>
7893
7894 * proc-service.c (ps_pglobal_lookup): Use
7895 thread_db_look_up_one_symbol.
7896 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7897 parameter. Use it instead of all_symbols_looked_up.
7898 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7899 field.
7900 (all_symbols_looked_up): Don't declare.
7901 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7902 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7903 field.
7904 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7905 Set all_symbols_looked_up here.
7906 (thread_db_look_up_one_symbol): New.
7907 (thread_db_get_tls_address): Adjust.
7908 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7909 thread_db object on the heap, and tentatively set it in the
7910 process structure.
7911 (thread_db_init): Don't set all_symbols_looked_up here.
7912 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7913
79142010-05-03 Pedro Alves <pedro@codesourcery.com>
7915
7916 * linux-low.c (linux_kill, linux_detach): Adjust.
7917 (status_pending_p_callback): Remove redundant statement. Check
7918 for !TARGET_WAITIKIND_IGNORE, instead of
7919 TARGET_WAITKIND_STOPPED.
7920 (handle_tracepoints): Make sure LWP is locked. Adjust.
7921 (linux_wait_for_event_1): Adjust.
7922 (linux_cancel_breakpoints): New.
7923 (unsuspend_one_lwp): New.
7924 (unsuspend_all_lwps): New.
7925 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7926 (send_sigstop_callback): Change return type to int, add new
7927 `except' parameter and handle it.
7928 (suspend_and_send_sigstop_callback): New.
7929 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7930 pass them down. If SUSPEND, also increment the lwp's suspend
7931 count.
7932 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7933 (need_step_over_p): Don't consider suspended LWPs.
7934 (start_step_over): Adjust.
7935 (proceed_one_lwp): Change return type to int, add new `except'
7936 parameter and handle it.
7937 (unsuspend_and_proceed_one_lwp): New.
7938 (proceed_all_lwps): Use find_inferior instead of
7939 for_each_inferior.
7940 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7941 also decrement the suspend count of LWPs. Pass `except' down,
7942 instead of hacking its suspend count.
7943 (linux_pause_all): Add `freeze' parameter. Adjust.
7944 (linux_unpause_all): New.
7945 (linux_target_ops): Install linux_unpause_all.
7946 * server.c (handle_status): Adjust.
7947 * target.h (struct target_ops): New fields `unpause_all' and
7948 `cancel_breakpoints'. Add new parameter to `pause_all'.
7949 (pause_all): Add new `freeze' parameter.
7950 (unpause_all): New.
7951 (cancel_breakpoints): New.
7952 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7953 cancel breakpoints.
7954 (cmd_qtstart): Pause threads.
7955 (stop_tracing): Pause threads, and cancel breakpoints.
7956 * win32-low.c (win32_target_ops): Adjust.
7957
79582010-05-03 Pedro Alves <pedro@codesourcery.com>
7959
7960 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7961 the inferior right away from here...
7962 (linux_wait_1): ... to here, and adjust to check the thread's
7963 last_resume_kind instead of the lwp's step or stop_expected flags.
7964
79652010-05-02 Pedro Alves <pedro@codesourcery.com>
7966
7967 * README: Use consistent `GDB' and `GDBserver' spellings.
7968
79692010-05-02 Pedro Alves <pedro@codesourcery.com>
7970
7971 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7972 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7973 (linux_detach_one_lwp): Assume the lwp is stopped.
7974 (any_thread_of): Delete.
7975 (linux_detach): Stop all lwps here. Don't blindly delete all
7976 breakpoints.
7977 (delete_lwp_callback): New.
7978 (linux_mourn): Delete all lwps of the process that is gone.
7979 (linux_wait_1): Don't delete the last lwp of the process here.
7980 * mem-break.h (mark_breakpoints_out): Declare.
7981 * mem-break.c (mark_breakpoints_out): New.
7982 (free_all_breakpoints): Use it.
7983 * server.c (handle_target_event): If the process is gone, mark
7984 breakpoints out.
7985 * thread-db.c (struct thread_db) <create_bp>: New field.
7986 (thread_db_enable_reporting): Fix prototype. Store a thread event
7987 breakpoint reference in the thread_db struct.
7988 (thread_db_load_search): Clear the thread_db object.
7989 (try_thread_db_load_1): Ditto.
7990 (switch_to_process): New.
7991 (disable_thread_event_reporting): Use it.
7992 (remove_thread_event_breakpoints): New.
7993 (thread_db_detach, thread_db_mourn): Use it.
7994
79952010-05-01 Pedro Alves <pedro@codesourcery.com>
7996
7997 * linux-low.c (linux_enable_event_reporting): New.
7998 (linux_wait_for_event_1, handle_extended_wait): Use it.
7999
80002010-04-30 Pedro Alves <pedro@codesourcery.com>
8001
8002 * linux-low.c (linux_kill_one_lwp, linux_kill)
8003 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8004 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8005 SIGSTOP even if the LWP is stopped.
8006 (send_sigstop_callback): New.
8007 (stop_all_lwps): Use send_sigstop_callback instead.
8008 (linux_resume_one_thread): Adjust.
8009 (proceed_one_lwp): Still proceed an LWP that the client has
8010 requested to stop, if we haven't reported it as stopped yet. Make
8011 sure that LWPs the client want stopped, have a pending SIGSTOP.
8012
80132010-04-26 Doug Evans <dje@google.com>
8014
8015 * server.c (handle_general_set): Make static.
8016
8017 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8018 Print received char after testing for error/eof instead of before.
8019 (input_interrupt): Tweak comment.
8020
80212010-04-23 Doug Evans <dje@google.com>
8022
8023 * server.c (start_inferior): Print inferior argv if --debug.
8024
80252010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8026
8027 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8028 * nto-x86-low.c: Include server.h
8029
80302010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8031
8032 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8033 be consistent with other sources of this directory.
8034 (init_registers_amd64): Correct name of source file of this function
8035 in the comment.
8036
80372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8038
8039 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8040 64-bit executables.
8041
80422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8043
8044 * win32-i386-low.c: Add 64-bit support.
8045 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8046 (init_registers_amd64): Declare.
8047 (mappings): Add 64-bit version of array.
8048 (init_windows_x86): New function.
8049 (the_low_target): Change init_arch field to init_windows_x86.
8050
80512010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8052
8053 * win32-low.c: Adapt to support also 64-bit architecture.
8054 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8055 (get_image_name): Use SIZE_T type for local variable `done'.
8056 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8057 (toolhelp_get_dll_name): Idem.
8058 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8059 Use uintptr_t typecast to avoid warning.
8060 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8061 (handle_exception): Use phex_nz to avoid warning.
8062 (win32_wait): Remove unused local variable `process'.
8063
80642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8065
8066 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8067 `amd64-avx.o'.
8068
80692010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8070
8071 * configure.ac: Use `ws2_32' library for srv_mingw.
8072 * configure: Regenerate.
8073 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8074 * remote-utils.c: Likewise.
8075
80762010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8077
8078 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8079 if __x86_64__ is defined.
8080
80812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8082
8083 * configure: Regenerate.
8084
80852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8086
8087 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8088 * target.h (target_ops): New get_tib_address field.
8089 * win32-low.h (win32_thread_info): Add thread_local_base field.
8090 * win32-low.c (child_add_thread): Add tlb argument.
8091 Set thread_local_base field to TLB.
8092 (get_child_debug_event): Adapt to child_add_thread change.
8093 (win32_get_tib_address): New function.
8094 (win32_target_ops): Set get_tib_address field to
8095 win32_get_tib_address.
8096 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8097
80982010-04-12 Pedro Alves <pedro@codesourcery.com>
8099
8100 * linux-low.c (linux_mourn): Also remove the process.
8101 * server.c (handle_target_event): Don't remove the process here.
8102 * nto-low.c (nto_mourn): New.
8103 (nto_target_ops): Install it.
8104 * spu-low.c (spu_mourn): New.
8105 (spu_target_ops): Install it.
8106 * win32-low.c (win32_mourn): New.
8107 (win32_target_ops): Install it.
8108
81092010-04-12 Pedro Alves <pedro@codesourcery.com>
8110
8111 * server.h (buffer_xml_printf): Remove redundant `;'.
8112
81132010-04-12 Pedro Alves <pedro@codesourcery.com>
8114
8115 * regcache.c (set_register_cache): Invalidate regcaches before
8116 changing the register cache layout.
8117 (regcache_invalidate_one): Allow a NULL regcache.
8118 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8119 regcaches before changing the register cache layout or the target
8120 regsets.
8121
81222010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8123
8124 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8125 variable warning on Linux/x86-64.
8126
81272010-04-11 Pedro Alves <pedro@codesourcery.com>
8128
8129 GDBserver disconnected tracing support.
8130
8131 * linux-low.c (linux_remove_process): Delete.
8132 (add_lwp): Don't set last_resume_kind here.
8133 (linux_kill): Use `mourn'.
8134 (linux_detach): Use `thread_db_detach', and `mourn'.
8135 (linux_mourn): New.
8136 (linux_attach_lwp_1): Adjust comment.
8137 (linux_attach): last_resume_kind moved the thread_info; adjust.
8138 (status_pending_p_callback): Adjust.
8139 (linux_wait_for_event_1): Adjust.
8140 (count_events_callback, select_singlestep_lwp_callback)
8141 (select_event_lwp_callback, cancel_breakpoints_callback)
8142 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8143 (proceed_one_lwp): Adjust.
8144 (linux_async): Add debug output.
8145 (linux_thread_stopped): New.
8146 (linux_pause_all): New.
8147 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8148 linux_pause_all.
8149 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8150 (thread_db_free): Delete declaration.
8151 (thread_db_detach, thread_db_mourn): Declare.
8152 * thread-db.c (thread_db_init): Use thread_db_mourn.
8153 (thread_db_free): Delete, split in two.
8154 (disable_thread_event_reporting): New.
8155 (thread_db_detach): New.
8156 (thread_db_mourn): New.
8157
8158 * server.h (struct thread_info) <last_resume_kind>: New field.
8159 <attached>: Add comment.
8160 <gdb_detached>: New field.
8161 (handler_func): Change return type to int.
8162 (handle_serial_event, handle_target_event): Ditto.
8163 (gdb_connected): Declare.
8164 (tracing): Delete.
8165 (disconnected_tracing): Declare.
8166 (stop_tracing): Declare.
8167
8168 * server.c (handle_query) <qSupported>: Report support for
8169 disconnected tracing.
8170 (queue_stop_reply_callback): Account for running threads.
8171 (gdb_wants_thread_stopped): New.
8172 (gdb_wants_all_threads_stopped): New.
8173 (gdb_reattached_process): New.
8174 (handle_status): Clear the `gdb_detached' flag of all processes.
8175 In all-stop, stop all threads.
8176 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8177 (process_serial_event): If the remote connection breaks, or if an
8178 exit was forced with "monitor exit", force an event loop exit.
8179 Handle disconnected tracing on detach.
8180 (handle_serial_event): Adjust.
8181 (handle_target_event): If GDB isn't connected, forward events back
8182 to the inferior, unless the last process exited, in which case,
8183 exit gdbserver. Adjust interface.
8184
8185 * remote-utils.c (remote_open): Don't block in accept. Instead
8186 register an event loop source on the listen socket file
8187 descriptor. Refactor bits into ...
8188 (listen_desc): ... this new global.
8189 (gdb_connected): ... this new function.
8190 (enable_async_notification): ... this new function.
8191 (handle_accept_event): ... this new function.
8192 (remote_close): Clear remote_desc.
8193
8194 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8195
8196 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8197 New fields.
8198 (mourn_inferior): Define.
8199 (target_process_qsupported): Avoid the dangling else problem.
8200 (thread_stopped): Define.
8201 (pause_all): Define.
8202 (target_waitstatus_to_string): Declare.
8203 * target.c (target_waitstatus_to_string): New.
8204
8205 * tracepoint.c (tracing): Make extern.
8206 (disconnected_tracing): New.
8207 (stop_tracing): Make extern. Handle tracing stops due to GDB
8208 disconnecting.
8209 (cmd_qtdisconnected): New.
8210 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8211 (handle_tracepoint_general_set): Handle QTDisconnected.
8212
8213 * event-loop.c (event_handler_func): Change return type to int.
8214 (process_event): Bail out if the event handler wants the event
8215 loop to stop.
8216 (handle_file_event): Ditto.
8217 (start_event_loop): Bail out if the event handler wants the event
8218 loop to stop.
8219
8220 * nto-low.c (nto_target_ops): Adjust.
8221 * spu-low.c (spu_wait): Don't remove the process here.
8222 (spu_target_ops): Adjust.
8223 * win32-low.c (win32_wait): Don't remove the process here.
8224 (win32_target_ops): Adjust.
8225
82262010-04-11 Pedro Alves <pedro@codesourcery.com>
8227
8228 * regcache.c (realloc_register_cache): Invalidate inferior's
8229 regcache before recreating it.
8230
82312010-04-09 Pedro Alves <pedro@codesourcery.com>
8232
8233 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8234
82352010-04-09 Stan Shebs <stan@codesourcery.com>
8236 Pedro Alves <pedro@codesourcery.com>
8237
8238 * server.h (LONGEST): New.
8239 (struct thread_info) <while_stepping>: New field.
8240 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8241 Declare.
8242 (initialize_tracepoint, handle_tracepoint_general_set)
8243 (handle_tracepoint_query, tracepoint_finished_step)
8244 (tracepoint_was_hit, release_while_stepping_state_list):
8245 (current_traceframe): Declare.
8246 * server.c (handle_general_set): Handle tracepoint packets.
8247 (read_memory): New.
8248 (write_memory): New.
8249 (handle_search_memory_1): Use read_memory.
8250 (handle_query): Report support for conditional tracepoints, trace
8251 state variables, and tracepoint sources. Handle tracepoint
8252 queries.
8253 (main): Initialize the tracepoints module.
8254 (process_serial_event): Handle traceframe reads/writes.
8255
8256 * linux-low.c (handle_tracepoints): New.
8257 (linux_wait_1): Call it.
8258 (linux_resume_one_lwp): Handle while-stepping.
8259 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8260 (linux_target_ops): Install them.
8261 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8262 New field.
8263 * linux-x86-low.c (x86_supports_tracepoints): New.
8264 (the_low_target). Install it.
8265
8266 * mem-break.h (delete_breakpoint): Declare.
8267 * mem-break.c (delete_breakpoint): Make external.
8268
8269 * target.h (struct target_ops): Add `supports_tracepoints',
8270 `read_pc', and `write_pc' fields.
8271 (target_supports_tracepoints): Define.
8272 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8273 (phex_nz): New.
8274
8275 * regcache.h (struct regcache) <registers_owned>: New field.
8276 (init_register_cache, regcache_cpy): Declare.
8277 (regcache_read_pc, regcache_write_pc): Declare.
8278 (register_cache_size): Declare.
8279 (supply_regblock): Declare.
8280 * regcache.c (init_register_cache): New.
8281 (new_register_cache): Use it.
8282 (regcache_cpy): New.
8283 (register_cache_size): New.
8284 (supply_regblock): New.
8285 (regcache_read_pc, regcache_write_pc): New.
8286
8287 * tracepoint.c: New.
8288
8289 * Makefile.in (OBS): Add tracepoint.o.
8290 (tracepoint.o): New rule.
8291
82922010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8293
8294 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8295 (i386-mmx.o): New.
8296 (i386-mmx.c): Likewise.
8297 (i386-mmx-linux.o): Likewise.
8298 (i386-mmx-linux.c): Likewise.
8299
8300 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8301 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8302 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8303 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8304
8305 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8306 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8307 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8308
83092010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8310
8311 * Makefile.in (clean): Updated.
8312 (i386-avx.o): New.
8313 (i386-avx.c): Likewise.
8314 (i386-avx-linux.o): Likewise.
8315 (i386-avx-linux.c): Likewise.
8316 (amd64-avx.o): Likewise.
8317 (amd64-avx.c): Likewise.
8318 (amd64-avx-linux.o): Likewise.
8319 (amd64-avx-linux.c): Likewise.
8320
8321 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8322 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8323 (srv_amd64_regobj): Add amd64-avx.o.
8324 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8325 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8326 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8327 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8328 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8329 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8330 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8331
8332 * i387-fp.c: Include "i386-xstate.h".
8333 (i387_xsave): New.
8334 (i387_cache_to_xsave): Likewise.
8335 (i387_xsave_to_cache): Likewise.
8336 (x86_xcr0): Likewise.
8337
8338 * i387-fp.h (i387_cache_to_xsave): Likewise.
8339 (i387_xsave_to_cache): Likewise.
8340 (x86_xcr0): Likewise.
8341
8342 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8343 * linux-crisv32-low.c (target_regsets): Likewise.
8344 * linux-m68k-low.c (target_regsets): Likewise.
8345 * linux-mips-low.c (target_regsets): Likewise.
8346 * linux-ppc-low.c (target_regsets): Likewise.
8347 * linux-s390-low.c (target_regsets): Likewise.
8348 * linux-sh-low.c (target_regsets): Likewise.
8349 * linux-sparc-low.c (target_regsets): Likewise.
8350 * linux-xtensa-low.c (target_regsets): Likewise.
8351
8352 * linux-low.c: Include <sys/uio.h>.
8353 (regsets_fetch_inferior_registers): Support nt_type.
8354 (regsets_store_inferior_registers): Likewise.
8355 (linux_process_qsupported): New.
8356 (linux_target_ops): Add linux_process_qsupported.
8357
8358 * linux-low.h (regset_info): Add nt_type.
8359 (linux_target_ops): Add process_qsupported.
8360
8361 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8362 and <sys/uio.h>.
8363 (init_registers_i386_avx_linux): New.
8364 (init_registers_amd64_avx_linux): Likewise.
8365 (xmltarget_i386_linux_no_xml): Likewise.
8366 (xmltarget_amd64_linux_no_xml): Likewise.
8367 (PTRACE_GETREGSET): Likewise.
8368 (PTRACE_SETREGSET): Likewise.
8369 (x86_fill_xstateregset): Likewise.
8370 (x86_store_xstateregset): Likewise.
8371 (use_xml): Likewise.
8372 (x86_linux_update_xmltarget): Likewise.
8373 (x86_linux_process_qsupported): Likewise.
8374 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8375 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8376 init_registers_i386_linux here. Call
8377 x86_linux_update_xmltarget.
8378 (the_low_target): Add x86_linux_process_qsupported.
8379
8380 * server.c (handle_query): Call target_process_qsupported.
8381
8382 * target.h (target_ops): Add process_qsupported.
8383 (target_process_qsupported): New.
8384
83852010-04-03 Pedro Alves <pedro@codesourcery.com>
8386
8387 * inferiors.c (add_thread): Set last_status kind to
8388 TARGET_WAITKIND_IGNORE.
8389 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8390 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8391 (linux_wait_1): Move `thread' local definition to block that uses
8392 it. Don't NULL initialize `event_child'.
8393 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8394 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8395 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8396
83972010-04-01 Pedro Alves <pedro@codesourcery.com>
8398
8399 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8400 an extended waitstatus, or by a watchpoint.
8401 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8402 thread was stepping or has been stopped by a watchpoint.
8403
84042010-04-01 Pedro Alves <pedro@codesourcery.com>
8405
8406 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8407 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8408 of another, then delete the previous, and validate all
8409 breakpoints.
8410 (validate_inserted_breakpoint): New.
8411 (delete_disabled_breakpoints): New.
8412 (validate_breakpoints): New.
8413 (check_mem_read): Validate breakpoints before trusting their
8414 shadow. Delete disabled breakpoints.
8415 (check_mem_write): Validate breakpoints before trusting they
8416 should be inserted. Delete disabled breakpoints.
8417 * mem-break.h (validate_breakpoints):
8418 * server.c (handle_query): Validate breakpoints when we see a
8419 qSymbol query.
8420
84212010-04-01 Pedro Alves <pedro@codesourcery.com>
8422
8423 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8424 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8425 if we could tell there's a GDB breakpoint at stop_pc.
8426 (need_step_over_p): Don't do a step over if we find a GDB
8427 breakpoint at the resume PC.
8428
8429 * mem-break.c (struct raw_breakpoint): New.
8430 (enum bkpt_type): New type `gdb_breakpoint'.
8431 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8432 fields. New field `raw'.
8433 (find_raw_breakpoint_at): New.
8434 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8435 breakpoint instead.
8436 (set_breakpoint_at): Adjust.
8437 (delete_raw_breakpoint): New.
8438 (release_breakpoint): New.
8439 (delete_breakpoint): Rename to...
8440 (delete_breakpoint_1): ... this. Add proc parameter. Use
8441 release_breakpoint. Return ENOENT.
8442 (delete_breakpoint): Reimplement.
8443 (find_breakpoint_at): Delete.
8444 (find_gdb_breakpoint_at): New.
8445 (delete_breakpoint_at): Delete.
8446 (set_gdb_breakpoint_at): New.
8447 (delete_gdb_breakpoint_at): New.
8448 (gdb_breakpoint_here): New.
8449 (set_reinsert_breakpoint): Use release_breakpoint.
8450 (uninsert_breakpoint): Rename to ...
8451 (uninsert_raw_breakpoint): ... this.
8452 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8453 (reinsert_raw_breakpoint): Change parameter type to
8454 raw_breakpoint.
8455 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8456 instead.
8457 (check_breakpoints): Adjust. Use release_breakpoint.
8458 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8459 (breakpoint_inserted_here): Ditto.
8460 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8461 Don't trust the breakpoint's shadow if it is not inserted.
8462 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8463 (delete_all_breakpoints): Adjust.
8464 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8465 use delete_breakpoint_1.
8466
8467 * mem-break.h (breakpoints_supported): Delete declaration.
8468 (set_gdb_breakpoint_at): Declare.
8469 (gdb_breakpoint_here): Declare.
8470 (delete_breakpoint_at): Delete.
8471 (delete_gdb_breakpoint_at): Declare.
8472
8473 * server.h (struct raw_breakpoint): Forward declare.
8474 (struct process_info): New field `raw_breakpoints'.
8475
8476 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8477 breakpoints.
8478
84792010-03-24 Pedro Alves <pedro@codesourcery.com>
8480
8481 * linux-low.c (status_pending_p_callback): Fix comment.
8482 (linux_wait_for_event_1): Move most of the internal breakpoint
8483 handling from here...
8484 (linux_wait_1): ... to here.
8485 (count_events_callback): New.
8486 (select_singlestep_lwp_callback): New.
8487 (select_event_lwp_callback): New.
8488 (cancel_breakpoints_callback): New.
8489 (select_event_lwp): New.
8490 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8491 priority to all LWPs that have had events that should be reported
8492 to the client. Cancel breakpoints when about to reporting the
8493 event to the client, not while stopping lwps. No longer cancel
8494 finished single-steps here.
8495 (cancel_finished_single_step): Delete.
8496 (cancel_finished_single_steps): Delete.
8497
84982010-03-24 Pedro Alves <pedro@codesourcery.com>
8499
8500 * mem-break.c (enum bkpt_type): New.
8501 (struct breakpoint): New field `type'.
8502 (set_breakpoint_at): Change return type to struct breakpoint
8503 pointer. Set type to `other_breakpoint' by default.
8504 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8505 in the breakpoint list.
8506 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8507 (reinsert_breakpoint): Rename to ...
8508 (reinsert_raw_breakpoint): ... this.
8509 (reinsert_breakpoints_at): Adjust.
8510 * mem-break.h (struct breakpoint): Declare.
8511 (set_breakpoint_at): Change return type to struct breakpoint
8512 pointer.
8513
85142010-03-24 Pedro Alves <pedro@codesourcery.com>
8515
8516 * server.c (handle_query): Assign, not compare.
8517
85182010-03-24 Pedro Alves <pedro@codesourcery.com>
8519
8520 Teach linux gdbserver to step-over-breakpoints.
8521
8522 * linux-low.c (can_hardware_single_step): New.
8523 (supports_breakpoints): New.
8524 (handle_extended_wait): If stopping threads, read the stop pc of
8525 the new cloned LWP.
8526 (get_pc): New.
8527 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8528 low target doesn't support retrieving the PC.
8529 (add_lwp): Set last_resume_kind to resume_continue.
8530 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8531 (linux_attach): Don't clear stop_expected. Set the lwp's
8532 last_resume_kind to resume_stop.
8533 (linux_detach_one_lwp): Don't check for removed breakpoints.
8534 (check_removed_breakpoint): Delete.
8535 (status_pending_p): Rename to ...
8536 (status_pending_p_callback): ... this. Don't check for removed
8537 breakpoints. Don't consider threads that are stopped from GDB's
8538 perspective.
8539 (linux_wait_for_lwp): Always read the stop_pc here.
8540 (cancel_breakpoint): New.
8541 (step_over_bkpt): New global.
8542 (linux_wait_for_event_1): Implement stepping over breakpoints.
8543 (gdb_wants_lwp_stopped): New.
8544 (gdb_wants_all_stopped): New.
8545 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8546 single-step traps here. Store the thread's last reported target
8547 wait status.
8548 (send_sigstop): Don't clear stop_expected. Always set it,
8549 instead.
8550 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8551 (cancel_finished_single_step): New.
8552 (cancel_finished_single_steps): New.
8553 (wait_for_sigstop): Don't cancel finished single-step traps here.
8554 (linux_resume_one_lwp): Don't check for removed breakpoints.
8555 Don't set `step' on non-hardware step archs.
8556 (linux_set_resume_request): Ignore resume_stop requests if already
8557 stopping or stopped. Set the lwp's last_resume_kind.
8558 (resume_status_pending_p): Don't check for removed breakpoints.
8559 (need_step_over_p): New.
8560 (start_step_over): New.
8561 (finish_step_over): New.
8562 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8563 requests. Clear the thread's last reported target waitstatus.
8564 Don't use the `suspended' flag. Don't consider pending breakpoints.
8565 (linux_resume): Start a step-over if necessary.
8566 (proceed_one_lwp): New.
8567 (proceed_all_lwps): New.
8568 (unstop_all_lwps): New.
8569 * linux-low.h (struct lwp_info): Rewrite comment for the
8570 `suspended' flag. Add the `stop_pc' field. Delete the
8571 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8572 Add `'last_resume_kind' and `need_step_over' fields.
8573 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8574 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8575 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8576 (set_raw_breakpoint_at): New.
8577 (set_breakpoint_at): Rewrite to use it.
8578 (reinsert_breakpoint_handler): Delete.
8579 (set_reinsert_breakpoint): New.
8580 (reinsert_breakpoint_by_bp): Delete.
8581 (delete_reinsert_breakpoints): New.
8582 (uninsert_breakpoint): Rewrite.
8583 (uninsert_breakpoints_at): New.
8584 (reinsert_breakpoint): Rewrite.
8585 (reinsert_breakpoints_at): New.
8586 (check_breakpoints): Rewrite.
8587 (breakpoint_here): New.
8588 (breakpoint_inserted_here): New.
8589 (check_mem_read): Adjust.
8590 * mem-break.h (breakpoints_supported, breakpoint_here)
8591 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8592 (reinsert_breakpoint_by_bp): Delete declaration.
8593 (delete_reinsert_breakpoints): Declare.
8594 (reinsert_breakpoint): Delete declaration.
8595 (reinsert_breakpoints_at): Declare.
8596 (uninsert_breakpoint): Delete declaration.
8597 (uninsert_breakpoints_at): Declare.
8598 (check_breakpoints): Adjust prototype.
8599 * server.h: Adjust include order.
8600 (struct thread_info): Declare here. Add a `last_status' field.
8601
86022010-03-23 Michael Snyder <msnyder@vmware.com>
8603
8604 * server.c (crc32): New function.
8605 (handle_query): Add handling for 'qCRC:' request.
8606
86072010-03-23 Pedro Alves <pedro@codesourcery.com>
8608
8609 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8610 lwp had been stopped by a watchpoint.
8611
86122010-03-16 Pedro Alves <pedro@codesourcery.com>
8613
8614 * server.h (internal_error): Declare.
8615 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8616 * utils.c (internal_error): New function.
8617
86182010-03-15 Andreas Schwab <schwab@redhat.com>
8619
8620 * configure.srv: Fix typo setting srv_regobj.
8621
86222010-03-15 Pedro Alves <pedro@codesourcery.com>
8623
8624 * linux-low.c (fetch_register): Avoid passing a non string literal
8625 format to `error'.
8626 (usr_store_inferior_registers): Ditto.
8627
86282010-03-14 Pedro Alves <pedro@codesourcery.com>
8629
8630 * linux-low.c (linux_write_memory): Bail out early if peeking
8631 memory failed.
8632
86332010-03-14 Pedro Alves <pedro@codesourcery.com>
8634
8635 * linux-low.h (struct lwp_info): New fields
8636 `stopped_by_watchpoint' and `stopped_data_address'.
8637 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8638 here, and cache them in the lwp object.
8639 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8640 directly.
8641 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8642 field.
8643 (linux_stopped_by_watchpoint): Rewrite.
8644 (linux_stopped_data_address): Rewrite.
8645
86462010-03-06 Simo Melenius <simo.melenius@iki.fi>
8647
8648 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8649 switching the current inferior, not before.
8650
86512010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8652
8653 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8654 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8655 i386-linux.c and amd64-linux.c.
8656 (reg-i386.o): Removed.
8657 (reg-i386.c): Likewise.
8658 (reg-i386-linux.o): Likewise.
8659 (reg-i386-linux.c): Likewise.
8660 (reg-x86-64.o): Likewise.
8661 (reg-x86-64.c): Likewise.
8662 (reg-x86-64-linux.o): Likewise.
8663 (reg-x86-64-linux.c): Likewise.
8664 (i386.o): New.
8665 (i386.c): Likewise.
8666 (i386-linux.o): Likewise.
8667 (i386-linux.c): Likewise.
8668 (amd64.o): Likewise.
8669 (amd64.c): Likewise.
8670 (amd64-linux.o): Likewise.
8671 (amd64-linux.c): Likewise.
8672
8673 * configure.srv (srv_i386_regobj): New.
8674 (srv_i386_linux_regobj): Likewise.
8675 (srv_amd64_regobj): Likewise.
8676 (srv_amd64_linux_regobj): Likewise.
8677 (srv_i386_32bit_xmlfiles): Likewise.
8678 (srv_i386_64bit_xmlfiles): Likewise.
8679 (srv_i386_xmlfiles): Likewise.
8680 (srv_amd64_xmlfiles): Likewise.
8681 (srv_i386_linux_xmlfiles): Likewise.
8682 (srv_amd64_linux_xmlfiles): Likewise.
8683 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8684 srv_xmlfiles to $srv_i386_xmlfiles.
8685 (i[34567]86-*-mingw32ce*): Likewise.
8686 (i[34567]86-*-mingw*): Likewise.
8687 (i[34567]86-*-nto*): Likewise.
8688 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8689 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8690 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8691 (x86_64-*-linux*): Likewise.
8692
8693 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8694 (init_registers_amd64_linux): New.
8695 (x86_arch_setup): Replace init_registers_x86_64_linux with
8696 init_registers_amd64_linux.
8697
86982010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8699
8700 * configure.ac: Check for libdl. If it is not available link against
8701 static libthread_db.
8702 * configure: Regenerate.
8703
87042010-02-22 Pedro Alves <pedro@codesourcery.com>
8705
8706 PR9605
8707
8708 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8709 handing a read watchpoint.
8710 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8711
87122010-02-12 Doug Evans <dje@google.com>
8713
8714 * linux-low.c (linux_supports_tracefork_flag): Document.
8715 (linux_look_up_symbols): Add comment.
8716
87172010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8718
8719 * regcache.c (supply_register): Clear regcache if buf is NULL.
8720
87212010-02-02 Nicolas Roche <roche@sourceware.org>
8722 Joel Brobecker <brobecker@adacore.com>
8723
8724 * inferiors.c (find_inferior): Add function documentation.
8725 (unloaded_dll): Handle the case where the unloaded dll has not
8726 been previously registered in the dll list.
8727
87282010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8729
8730 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8731 (thumb2_breakpoint): New.
8732 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8733
87342010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8735
8736 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8737 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8738 breakpoints.
8739
87402010-01-21 Pedro Alves <pedro@codesourcery.com>
8741
8742 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8743
87442010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8745
8746 * linux-s390-low.c (s390_collect_ptrace_register)
8747 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8748
87492010-01-21 Doug Evans <dje@google.com>
8750
8751 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8752 (PTRACE_ARG4_TYPE): New macro.
8753 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8754 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8755 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8756 (usr_store_inferior_registers): Ditto.
8757 (linux_read_memory, linux_write_memory): Ditto.
8758 (linux_test_for_tracefork): Ditto.
8759
8760 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8761 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8762
87632010-01-21 Pedro Alves <pedro@codesourcery.com>
8764
8765 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8766 target.
8767
87682010-01-21 Pedro Alves <pedro@codesourcery.com>
8769
8770 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8771 prototype to take a regcache. Adjust.
8772
87732010-01-20 Pedro Alves <pedro@codesourcery.com>
8774
8775 * regcache.h (struct thread_info): Forward declare.
8776 (struct regcache): New.
8777 (new_register_cache): Adjust prototype.
8778 (get_thread_regcache): Declare.
8779 (free_register_cache): Adjust prototype.
8780 (registers_to_string, registers_from_string): Ditto.
8781 (supply_register, supply_register_by_name, collect_register)
8782 (collect_register_as_string, collect_register_by_name): Ditto.
8783 * regcache.c (struct inferior_regcache_data): Delete.
8784 (get_regcache): Rename to ...
8785 (get_thread_regcache): ... this. Adjust. Switch inferior before
8786 fetching registers.
8787 (regcache_invalidate_one): Adjust.
8788 (regcache_invalidate): Fix prototype.
8789 (new_register_cache): Return the new register cache.
8790 (free_register_cache): Change prototype.
8791 (realloc_register_cache): Adjust.
8792 (registers_to_string): Change prototype to take a regcache. Adjust.
8793 (registers_from_string): Ditto.
8794 (register_data): Ditto.
8795 (supply_register): Ditto.
8796 (supply_register_by_name): Ditto.
8797 (collect_register): Ditto.
8798 (collect_register_as_string): Ditto.
8799 (collect_register_by_name): Ditto.
8800 * server.c (process_serial_event): Adjust.
8801 * linux-low.h (regset_fill_func, regset_store_func): Change
8802 prototype.
8803 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8804 Change prototype.
8805 * linux-low.c (get_stop_pc): Adjust.
8806 (check_removed_breakpoint): Adjust.
8807 (linux_wait_for_event): Adjust.
8808 (linux_resume_one_lwp): Adjust.
8809 (fetch_register): Add regcache parameter. Adjust.
8810 (usr_store_inferior_registers): Ditto.
8811 (regsets_fetch_inferior_registers): Ditto.
8812 (regsets_store_inferior_registers): Ditto.
8813 (linux_fetch_registers, linux_store_registers): Ditto.
8814 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8815 regcache. Adjust.
8816 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8817 Ditto.
8818 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8819 prototype to take a regcache.
8820 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8821 * remote-utils.c (convert_ascii_to_int, outreg)
8822 (prepare_resume_reply): Change prototype to take a regcache.
8823 Adjust.
8824 * target.h (struct target_ops) <fetch_registers, store_registers>:
8825 Change prototype to take a regcache.
8826 (fetch_inferior_registers, store_inferior_registers): Change
8827 prototype to take a regcache. Adjust.
8828 * proc-service.c (ps_lgetregs): Adjust.
8829 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8830 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8831 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8832 take a regcache. Adjust.
8833 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8834 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8835 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8836 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8837 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8838 (cris_cannot_fetch_register):
8839 (cris_breakpoint_at): Change prototype to take a regcache.
8840 Adjust.
8841 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8842 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8843 to take a regcache. Adjust.
8844 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8845 Adjust.
8846 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8847 take a regcache. Adjust.
8848 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8849 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8850 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8851 * linux-mips-low.c (mips_get_pc):
8852 (mips_set_pc): Change prototype to take a regcache. Adjust.
8853 (mips_reinsert_addr): Adjust.
8854 (mips_collect_register): Change prototype to take a regcache.
8855 Adjust.
8856 (mips_supply_register):
8857 (mips_collect_register_32bit, mips_supply_register_32bit)
8858 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8859 (mips_store_fpregset): Ditto.
8860 * linux-ppc-low.c (ppc_supply_ptrace_register)
8861 (ppc_supply_ptrace_register): Ditto.
8862 (parse_spufs_run): Adjust.
8863 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8864 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8865 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8866 take a regcache. Adjust.
8867 * linux-s390-low.c (s390_collect_ptrace_register)
8868 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8869 (s390_set_pc): Change prototype to take a regcache. Adjust.
8870 (s390_arch_setup): Adjust.
8871 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8872 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8873 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8874 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8875 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8876 regcache. Adjust.
8877 (sparc_breakpoint_at): Adjust.
8878 * linux-xtensa-low.c (xtensa_fill_gregset):
8879 (xtensa_store_gregset):
8880 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8881 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8882 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8883 prototype to take a regcache. Adjust.
8884 * win32-arm-low.c (arm_fetch_inferior_register)
8885 (arm_store_inferior_register): Change prototype to take a
8886 regcache. Adjust.
8887 * win32-i386-low.c (i386_fetch_inferior_register)
8888 (i386_store_inferior_register): Change prototype to take a
8889 regcache. Adjust.
8890 * win32-low.c (child_fetch_inferior_registers)
8891 (child_store_inferior_registers): Change prototype to take a
8892 regcache. Adjust.
8893 (win32_wait): Adjust.
8894 (win32_fetch_inferior_registers): Change prototype to take a
8895 regcache. Adjust.
8896 (win32_store_inferior_registers): Adjust.
8897 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8898 store_inferior_register>: Change prototype to take a regcache.
8899
89002010-01-20 Doug Evans <dje@google.com>
8901
8902 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8903 #ifdef.
8904 (linux_wait_for_event1, linux_init_signals): Ditto.
8905 (W_STOPCODE): Provide definition if missing.
8906
89072010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8908
8909 * linux-low.c (linux_core_of_thread): New.
8910 (compare_ints, show_process, list_threads): New.
8911 (linux_qxfer_osdata): Report threads and cores.
8912 (linux_target_op): Register linux_core_of_thread.
8913 * remote-utils.c (prepare_resume_reply): Report the core.
8914 (buffer_xml_printf): Support %d specifier.
8915 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8916 New.
8917 (handle_query): Handle qXfer:threads. Announce availability
8918 thereof.
8919 * target.h (struct target_ops): New field core_of_thread.
8920
89212010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8922
8923 * Makefile.in (clean): Remove new generated files.
8924 (reg-s390.o, reg-s390.c): Remove rules.
8925 (reg-s390x.o, reg-s390x.c): Likewise.
8926 (s390-linux32.o, s390-linux32.c): Add rules.
8927 (s390-linux64.o, s390-linux64.c): Likewise.
8928 (s390x-linux64.o, s390x-linux64.c): Likewise.
8929 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8930 * linux-s390-low.c: Include <elf.h>.
8931 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8932 (init_registers_s390): Remove prototype.
8933 (init_registers_s390x): Likewise.
8934 (init_registers_s390_linux32): Add prototype.
8935 (init_registers_s390_linux64): Likewise.
8936 (init_registers_s390x_linux64): Likewise.
8937 (s390_num_regs_3264): New define.
8938 (s390_regmap_3264): New global variable.
8939 (s390_cannot_fetch_register): Remove obsolete check.
8940 (s390_cannot_store_register): Likewise.
8941 (s390_collect_ptrace_register): Handle upper/lower register halves.
8942 (s390_supply_ptrace_register): Likewise.
8943 (s390_fill_gregset): Update to register number changes.
8944 (s390_get_hwcap): New routine.
8945 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8946 Install appropriate regmap and register set.
8947
89482010-01-01 Joel Brobecker <brobecker@adacore.com>
8949
8950 * server.c (gdbserver_version): Update copyright year to 2010.
8951 * gdbreplay.c (gdbreplay_version): Likewise.
8952
89532009-12-28 Doug Evans <dje@google.com>
8954
8955 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8956 elf/external.h. Include <elf.h> instead but only if necessary.
8957
89582009-12-28 Pedro Alves <pedro@codesourcery.com>
8959
8960 * linux-low.c (linux_remove_process): Remove `detaching'
8961 parameter. Don't release/detach from thread_db here.
8962 (linux_kill): Release/detach from thread_db here, ...
8963 (linux_detach): ... and here, before actually detaching.
8964 (linux_wait_1): ... and here, when a process exits.
8965 * thread-db.c (any_thread_of): New.
8966 (thread_db_free): Switch the current inferior to a thread of the
8967 passed in process.
8968
89692009-12-21 Doug Evans <dje@google.com>
8970
8971 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8972
8973 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8974 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8975 warning ifndef __NR_tkill. Move setting of errno there too.
8976 Delete unnecessary resetting of errno after syscall.
8977 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8978
8979 * configure.ac: Check for dladdr.
8980 * config.in: Regenerate.
8981 * configure: Regenerate.
8982 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8983 (try_thread_db_load): Update.
8984
8985 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8986
89872009-12-18 Doug Evans <dje@google.com>
8988
8989 * event-loop.c: Include unistd.h if it exists.
8990
8991 * linux-low.c (my_waitpid): Move definition away from being in
8992 between linux_tracefork_child/linux_test_for_tracefork.
8993
8994 * gdb_proc_service.h (psaddr_t): Fix type.
8995 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8996 signature to match glibc.
8997
89982009-12-16 Doug Evans <dje@google.com>
8999
9000 * linux-low.c (linux_read_memory): Fix argument to read.
9001
90022009-11-26 Pedro Alves <pedro@codesourcery.com>
9003
9004 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9005 events, don't leave current_inferior pointing at null.
9006
90072009-11-26 Pedro Alves <pedro@codesourcery.com>
9008
9009 * win32-low.c (LOG): Delete.
9010 (OUTMSG): Output to stderr.
9011 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9012 on compile time LOG macro.
9013 (win32_wait): Fix debug output.
9014
90152009-11-26 Pedro Alves <pedro@codesourcery.com>
9016
9017 * win32-low.c (win32_add_one_solib): If the dll name is
9018 "ntdll.dll", prepend the system directory to the dll path.
9019
90202009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9021
9022 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9023
90242009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9025 Vladimir Prus <vladimir@codesourcery.com>
9026
9027 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9028 * configure.ac: Check for __mcoldfire__ and set
9029 gdb_cv_m68k_is_coldfire.
9030 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9031 reg-cf.o and reg-m68k.o.
9032 * configure: Regenerated.
9033
90342009-11-16 Pedro Alves <pedro@codesourcery.com>
9035
9036 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9037 Pass it to thread_db_free.
9038 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9039 proper `detaching' argument to linux_remove_process.
9040 * linux-low.h (thread_db_free): Add `detaching' parameter.
9041 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9042 to thread_db_free.
9043 (thread_db_free): Add `detaching' parameter. Only
9044 call td_ta_clear_event if detaching from process.
9045
90462009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9047
9048 * thread-db.c (thread_db_free): Fix typo.
9049
90502009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9051
9052 PR gdb/10838
9053 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9054
90552009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9056
9057 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9058 with an i686 compiler.
9059 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9060 needed.
9061 * configure: Rebuilt.
9062
90632009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9064
9065 PR gdb/10783
9066
9067 * server.c (handle_search_memory_1): Correct read_addr initialization
9068 in loop for searching subsequent chunks.
9069
90702009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9071
9072 * configure.ac: New --with-libthread-db option.
9073 * thread-db.c: Allow direct dependence on libthread_db.
9074 (thread_db_free): Adjust.
9075 * config.in: Regenerate.
9076 * configure: Likewise.
9077
90782009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9079
9080 PR gdb/10757
9081 * thread-db.c (attach_thread): New function.
9082 (maybe_attach_thread): Return success/failure.
9083 (find_new_threads_callback): Adjust.
9084 (thread_db_find_new_threads): Loop until no new threads.
9085
90862009-10-13 Pedro Alves <pedro@codesourcery.com>
9087
9088 * proc-service.c (ps_lgetregs): Formatting.
9089
90902009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9091
9092 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9093 * configure.ac: Adjust.
9094 * linux-low.h (struct process_info_private): Move members to struct
9095 thread_db.
9096 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9097 * linux-low.c (linux_remove_process): Adjust.
9098 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9099 * server.c (handle_query): Move code ...
9100 (handle_monitor_command): ... here. New function.
9101 * target.h (struct target_ops): New member.
9102 * thread-db.c (struct thread_db): New.
9103 (libthread_db_search_path): New variable.
9104 (thread_db_create_event, thread_db_enable_reporting)
9105 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9106 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9107 (try_thread_db_load_1, dladdr_to_soname): New functions.
9108 (try_thread_db_load, thread_db_load_search): New functions.
9109 (thread_db_init): Search for libthread_db.
9110 (thread_db_free): New function.
9111 (thread_db_handle_monitor_command): Likewise.
9112 * config.in: Regenerate.
9113 * configure: Regenerate.
9114
91152009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9116
9117 * spu-low.c (spu_kill): Wait for inferior to terminate.
9118 Call clear_inferiors.
9119 (spu_detach): Call clear_inferiors.
9120
91212009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9122
9123 * aclocal.m4: Regenerate.
9124 * config.in: Likewise.
9125 * configure: Likewise.
9126
91272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9128
9129 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9130 (parse_spufs_run): New function.
9131 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9132 (ppc_breakpoint_at): Handle SPU breakpoints.
9133
91342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9135
9136 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9137 (SPUFS_MAGIC): Define.
9138 (spu_enumerate_spu_ids): New function.
9139 (linux_qxfer_spu): New function.
9140 (linux_target_ops): Install linux_qxfer_spu.
9141
91422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9143
9144 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9145 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9146 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9147 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9148 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9149 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9150 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9151 (init_registers_powerpc_cell32l): Add prototype.
9152 (init_registers_powerpc_cell64l): Likewise.
9153 (ppc_arch_setup): Detect Cell/B.E. architecture.
9154
91552009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9156
9157 * Makefile.in (datarootdir): New variable.
9158
91592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9160
9161 * linux-low.c (linux_write_memory): Update debugging output.
9162 * Makefile.in (clean): Add new descriptions.
9163 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9164 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9165 * configure.srv: Add new files for arm*-*-linux*.
9166 * linux-arm-low.c: Add new declarations.
9167 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9168 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9169 (HWCAP_VFPv3D16): New.
9170 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9171 instead of __IWMMXT__.
9172 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9173 (arm_arch_setup): New.
9174 (target_regsets): Remove #ifdef. Add VFP regset.
9175 (the_low_target): Use arm_arch_setup.
9176
91772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9180 the main thread again.
9181
91822009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9183
9184 Adding Neutrino gdbserver.
9185 * configure: Regenerated.
9186 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9187 * configure.srv (i[34567]86-*-nto*): New target.
9188 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9189 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9190 (nto_comctrl) [__QNX__]: New function.
9191 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9192
91932009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9194
9195 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9196 srv_tgtobj.
9197
91982009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9199 Pedro Alves <pedro@codesourcery.com>
9200
9201 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9202 don't support CONTEXT_EXTENDED_REGISTERS.
9203 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9204 (the_low_target): Install them.
9205 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9206 failing with ERROR_PIPE_NOT_CONNECTED.
9207
92082009-06-30 Doug Evans <dje@google.com>
9209 Pierre Muller <muller@ics.u-strasbg.fr>
9210
9211 Add h/w watchpoint support to x86-linux, win32-i386.
9212 * Makefile.in (SFILES): Add i386-low.c
9213 (i386_low_h): Define.
9214 (i386-low.o): Add dependencies.
9215 (linux-x86-low.o): Add i386-low.h dependency.
9216 (win32-i386-low.o): Ditto.
9217 * i386-low.c: New file.
9218 * i386-low.h: New file.
9219 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9220 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9221 * linux-low.c (linux_add_process): Initialize arch_private.
9222 (linux_remove_process): Free arch_private.
9223 (add_lwp): Initialize arch_private.
9224 (delete_lwp): Free arch_private.
9225 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9226 provided.
9227 * linux-low.h (process_info_private): New member arch_private.
9228 (lwp_info): New member arch_private.
9229 (linux_target_ops): New members new_process, new_thread,
9230 prepare_to_resume.
9231 (ptid_of): New macro.
9232 * linux-x86-low.c: Include stddef.h, i386-low.h.
9233 (arch_process_info): New struct.
9234 (arch_lwp_info): New struct.
9235 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9236 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9237 (i386_dr_low_get_status): New function.
9238 (x86_insert_point, x86_remove_point): New functions.
9239 (x86_stopped_by_watchpoint): New function.
9240 (x86_stopped_data_address): New function.
9241 (x86_linux_new_process, x86_linux_new_thread): New functions.
9242 (x86_linux_prepare_to_resume): New function.
9243 (the_low_target): Add entries for insert_point, remove_point,
9244 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9245 prepare_to_resume.
9246 * server.c (debug_hw_points): New global.
9247 (monitor_show_help): Document set debug-hw-points.
9248 (handle_query): Process "set debug-hw-points".
9249 * server.h (debug_hw_points): Declare.
9250 (paddress): Declare.
9251 * utils.c (NUMCELLS, CELLSIZE): New macros.
9252 (get_sell, xsnprintf, paddress): New functions.
9253 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9254 remove_point, stopped_by_watchpoint, stopped_data_address.
9255 * win32-i386-low.c: Include i386-low.h.
9256 (debug_reg_state): Replaces dr.
9257 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9258 (i386_dr_low_get_status): New function.
9259 (i386_insert_point, i386_remove_point): New functions.
9260 (i386_stopped_by_watchpoint): New function.
9261 (i386_stopped_data_address): New function.
9262 (i386_initial_stuff): Update.
9263 (get_thread_context,set_thread_context,i386_thread_added): Update.
9264 (the_low_target): Add entries for insert_point,
9265 remove_point, stopped_by_watchpoint, stopped_data_address.
9266 * win32-low.c (win32_insert_watchpoint): New function.
9267 (win32_remove_watchpoint): New function.
9268 (win32_stopped_by_watchpoint): New function.
9269 (win32_stopped_data_address): New function.
9270 (win32_target_ops): Add entries for insert_watchpoint,
9271 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9272 * win32-low.h (win32_target_ops): New members insert_point,
9273 remove_point, stopped_by_watchpoint, stopped_data_address.
9274
92752009-06-25 Pedro Alves <pedro@codesourcery.com>
9276
9277 * server.c (process_serial_event): Re-return unsupported, not
9278 error, if the type isn't recognized. Re-allow supporting only
9279 insert or remove packets. Also call require_running for
9280 breakpoints. Add missing break statement to default case. Tidy.
9281 * target.h (struct target_ops): Rename insert_watchpoint to
9282 insert_point, and remove_watchpoint to remove_point.
9283
9284 * linux-low.h (struct linux_target_ops): Likewise.
9285 * linux-low.c (linux_insert_watchpoint): Rename to ...
9286 (linux_insert_point): ... this. Adjust.
9287 (linux_remove_watchpoint): Rename to ...
9288 (linux_remove_point): ... this. Adjust.
9289 (linux_target_ops): Adjust.
9290 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9291 (cris_insert_point): ... this.
9292 (cris_remove_watchpoint): Rename to ...
9293 (cris_remove_point): ... this.
9294 (the_low_target): Adjust.
9295
92962009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9297
9298 * server.c (handle_v_kill): Pass signal_pid to
9299 kill_inferior if multi_process is zero.
9300
93012009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9302
9303 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9304 * target.h (target_ops): Comment for *_watchpoint to make it clear
9305 the functions can get types '0' and '1'.
9306
93072009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9308
9309 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9310 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9311 * regcache.c (get_regcache): Likewise.
9312 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9313 * win32-low.c (child_fetch_inferior_registers): Remove check for
9314 regno 0.
9315
93162009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9317 Pedro Alves <pedro@codesourcery.com>
9318
9319 * target.h (struct target_ops) <supports_multi_process>: New
9320 callback.
9321 (target_supports_multi_process): New.
9322 * server.c (handle_query): Even if GDB reports support, only
9323 enable multi-process if the target also supports it. Report
9324 multi-process support only if the target backend supports it.
9325 * linux-low.c (linux_supports_multi_process): New function.
9326 (linux_target_ops): Install it as target_supports_multi_process
9327 callback.
9328
93292009-05-24 Doug Evans <dje@google.com>
9330
9331 Global renaming of find_thread_pid to find_thread_ptid.
9332 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9333 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9334 All callers updated.
9335
9336 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9337 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9338 directly.
9339
9340 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9341 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9342 (linux_resume_one_lwp): Ditto.
9343
93442009-05-23 Doug Evans <dje@google.com>
9345
9346 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9347 from struct inferior_list_entry * to struct lwp_info *.
9348 All callers updated.
9349
93502009-05-13 Doug Evans <dje@google.com>
9351
9352 * linux-x86-low.c: Don't include assert.h.
9353 (x86_siginfo_fixup): Use fatal, not assert.
9354 (x86_arch_setup): Fix comment.
9355
93562009-05-12 Doug Evans <dje@google.com>
9357
9358 Biarch support for i386/amd64 gdbserver.
9359 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9360 Add linux-x86-low.c.
9361 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9362 (linux-x86-low.o): Add.
9363 * linux-x86-64-low.c: Delete.
9364 * linux-i386-low.c: Delete.
9365 * linux-x86-low.c: New file.
9366 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9367 linux-x86-low.o.
9368 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9369 linux-x86-low.o.
9370 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9371 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9372 (linux_child_pid_to_exec_file): New function.
9373 (elf_64_header_p, elf_64_file_p): New functions.
9374 (siginfo_fixup): New function.
9375 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9376 give target a chance to convert layout.
9377 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9378 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9379
93802009-05-07 Doug Evans <dje@google.com>
9381
9382 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9383 (regsets_store_inferior_registers): Ditto.
9384
93852009-05-06 Pedro Alves <pedro@codesourcery.com>
9386
9387 PR server/10048
9388
9389 * linux-low.c (must_set_ptrace_flags): Delete.
9390 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9391 of the global.
9392 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9393 `lwp->must_set_ptrace_flags' instead.
9394 (linux_wait_for_event_1): Set ptrace options here.
9395 (linux_wait_1): ... not here.
9396
93972009-04-30 Doug Evans <dje@google.com>
9398
9399 * inferiors.c (started_inferior_callback): New function.
9400 (attached_inferior_callback): New function.
9401 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9402 * server.c (print_started_pid, print_attached_pid): New functions.
9403 (detach_or_kill_for_exit): New function.
9404 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9405 * server.h (have_started_inferiors_p): Declare.
9406 (have_attached_inferiors_p): Declare.
9407
9408 * inferiors.c (remove_process): Fix memory leak, free process.
9409 * linux-low.c (linux_remove_process): New function.
9410 (linux_kill): Call it instead of remove_process.
9411 (linux_detach, linux_wait_1): Ditto.
9412
94132009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9414
9415 * configure.srv: Add x86 Windows CE target.
9416
94172009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9418
9419 * inferiors.c (get_thread_process): Make global.
9420 * server.h (get_thread_process): Add prototype.
9421 * thread-db.c (find_one_thread): Use get_thread_process
9422 instead of current_process.
9423 (thread_db_get_tls_address): Do not crash if called when
9424 thread layer is not yet initialized.
9425
94262009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9427
9428 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9429 * spu-low.c (current_tid): Rename to ...
9430 (current_ptid): ... this.
9431 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9432 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9433 ptid_get_lwp (current_ptid) instead of current_tid.
9434 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9435 instead of current_tid. Use find_process_pid to verify pid
9436 argument is valid. Pass proper argument to remove_process.
9437 (spu_thread_alive): Compare current_ptid instead of current_tid.
9438 (spu_resume): Likewise.
9439
94402009-04-02 Pedro Alves <pedro@codesourcery.com>
9441
9442 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9443 variable.
9444
94452009-04-01 Pedro Alves <pedro@codesourcery.com>
9446
9447 Implement the multiprocess extensions, and add linux multiprocess
9448 support.
9449
9450 * server.h (ULONGEST): Declare.
9451 (struct ptid, ptid_t): New.
9452 (minus_one_ptid, null_ptid): Declare.
9453 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9454 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9455 (struct inferior_list_entry): Change `id' type from unsigned from
9456 to ptid_t.
9457 (struct sym_cache, struct breakpoint, struct
9458 process_info_private): Forward declare.
9459 (struct process_info): Declare.
9460 (current_process): Declare.
9461 (all_processes): Declare.
9462 (initialize_inferiors): Declare.
9463 (add_thread): Adjust to use ptid_t.
9464 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9465 (add_process, remove_process, find_thread_pid): Declare.
9466 (find_inferior_id): Adjust to use ptid_t.
9467 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9468 (multi_process): Declare.
9469 (push_event): Adjust to use ptid_t.
9470 (read_ptid, write_ptid): Declare.
9471 (prepare_resume_reply): Adjust to use ptid_t.
9472 (clear_symbol_cache): Declare.
9473 * inferiors.c (all_processes): New.
9474 (null_ptid, minus_one_ptid): New.
9475 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9476 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9477 (add_thread): Change unsigned long to ptid. Remove gdb_id
9478 parameter. Adjust.
9479 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9480 (gdb_id_to_thread): Rename to ...
9481 (find_thread_pid): ... this. Change unsigned long to ptid.
9482 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9483 (loaded_dll, pull_pid_from_list): Adjust.
9484 (add_process, remove_process, find_process_pid)
9485 (get_thread_process, current_process, initialize_inferiors): New.
9486 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9487 (struct target_waitstatus) <related_pid>: Ditto.
9488 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9489 return type to int.
9490 (struct target_ops) <join>: Add `pid' argument.
9491 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9492 (struct target_ops) <wait>: Add `ptid' field. Change return type
9493 to ptid.
9494 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9495 (mywait): Add `ptid' argument. Change return type to ptid_t.
9496 (target_pid_to_str): Declare.
9497 * target.c (set_desired_inferior): Adjust to use ptids.
9498 (mywait): Add new `ptid' argument. Adjust.
9499 (target_pid_to_str): New.
9500 * mem-break.h (free_all_breakpoints): Declare.
9501 * mem-break.c (breakpoints): Delelete.
9502 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9503 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9504 to use per-process breakpoint list.
9505 (free_all_breakpoints): New.
9506 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9507 (symbol_cache, all_symbols_looked_up): Delete.
9508 (hexchars): New.
9509 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9510 read_ptid): New.
9511 (prepare_resume_reply): Change ptid argument's type from unsigned
9512 long to ptid_t. Adjust. Implement W;process and X;process.
9513 (free_sym_cache, clear_symbol_cache): New.
9514 (look_up_one_symbol): Adjust to per-process symbol cache. *
9515 * server.c (cont_thread, general_thread, step_thread): Change type
9516 to ptid_t.
9517 (attached): Delete.
9518 (multi_process): New.
9519 (last_ptid): Change type to ptid_t.
9520 (struct vstop_notif) <ptid>: Change type to ptid_t.
9521 (queue_stop_reply, push_event): Change `ptid' argument's type to
9522 ptid_t.
9523 (discard_queued_stop_replies): Add `pid' argument.
9524 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9525 changes. Don't reference the `attached' global.
9526 (attach_inferior): Adjust to mywait interface changes.
9527 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9528 features. Handle and report "multiprocess+". Handle
9529 "qAttached:PID".
9530 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9531 changes.
9532 (handle_v_kill): New.
9533 (handle_v_stopped): Adjust to use target_pid_to_str.
9534 (handle_v_requests): Allow multiple attaches and runs when
9535 multiprocess extensions are in effect. Handle "vKill".
9536 (myresume): Adjust to use ptids.
9537 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9538 (handle_status): Adjust to discard_queued_stop_replies interface
9539 change.
9540 (first_thread_of, kill_inferior_callback)
9541 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9542 (main): Call initialize_inferiors. Adjust to use ptids, killing
9543 and detaching from all inferiors. Handle multiprocess packet
9544 variants.
9545 * linux-low.h: Include gdb_proc_service.h.
9546 (struct process_info_private): New.
9547 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9548 <lwpid_of>: Use ptid_get_lwp.
9549 (get_lwp_thread): Adjust.
9550 (struct lwp_info): Add `dead' member.
9551 (find_lwp_pid): Declare.
9552 * linux-low.c (thread_db_active): Delete.
9553 (new_inferior): Adjust comment.
9554 (inferior_pid): Delete.
9555 (linux_add_process): New.
9556 (handle_extended_wait): Adjust.
9557 (add_lwp): Change unsigned long to ptid.
9558 (linux_create_inferior): Add process to processes table. Adjust
9559 to use ptids. Don't set new_inferior here.
9560 (linux_attach_lwp): Rename to ...
9561 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9562 it. Adjust to use ptids.
9563 (linux_attach_lwp): New.
9564 (linux_attach): Add process to processes table. Don't set
9565 new_inferior here.
9566 (struct counter): New.
9567 (second_thread_of_pid_p, last_thread_of_process_p): New.
9568 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9569 multiple processes.
9570 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9571 processes. Remove process from process table.
9572 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9573 to multiple processes.
9574 (any_thread_of): New.
9575 (linux_detach): Add `pid' argument, and handle it. Remove process
9576 from processes table.
9577 (linux_join): Add `pid' argument. Handle it.
9578 (linux_thread_alive): Change unsighed long argument to ptid_t.
9579 Consider dead lwps as not being alive.
9580 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9581 threads we're not interested in.
9582 (same_lwp, find_lwp_pid): New.
9583 (linux_wait_for_lwp): Change `pid' argument's type from int to
9584 ptid_t. Adjust.
9585 (linux_wait_for_event): Rename to ...
9586 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9587 from int to ptid_t. Adjust.
9588 (linux_wait_for_event): New.
9589 (linux_wait_1): Add `ptid' argument. Change return type to
9590 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9591 that exit from the process table.
9592 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9593 Adjust.
9594 (mark_lwp_dead): New.
9595 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9596 stopping all threads, mark its main lwp as dead.
9597 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9598 ptids.
9599 (fetch_register, usr_store_inferior_registers)
9600 (regsets_fetch_inferior_registers)
9601 (regsets_store_inferior_registers, linux_read_memory)
9602 (linux_write_memory): Inline `inferior_pid'.
9603 (linux_look_up_symbols): Adjust to use per-process
9604 `thread_db_active'.
9605 (linux_request_interrupt): Adjust to use ptids.
9606 (linux_read_auxv): Inline `inferior_pid'.
9607 (initialize_low): Don't reference thread_db_active.
9608 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9609 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9610 (ps_getpid): Return the pid of the current inferior.
9611 * thread-db.c (proc_handle, thread_agent): Delete.
9612 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9613 per-process data.
9614 (find_one_thread): Change argument type to ptid_t. Adjust to
9615 per-process data.
9616 (maybe_attach_thread): Adjust to per-process data and ptids.
9617 (thread_db_find_new_threads): Ditto.
9618 (thread_db_init): Ditto.
9619 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9620 processes table. Adjust to use ptids.
9621 (spu_kill, spu_detach): Adjust interface. Remove process from
9622 processes table.
9623 (spu_join, spu_thread_alive): Adjust interface.
9624 (spu_wait): Adjust interface. Remove process from processes
9625 table. Adjust to use ptids.
9626 * win32-low.c (current_inferior_tid): Delete.
9627 (current_inferior_ptid): New.
9628 (debug_event_ptid): New.
9629 (thread_rec): Take a ptid. Adjust.
9630 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9631 (child_delete_thread): Ditto.
9632 (do_initial_child_stuff): Add `attached' argument. Add process to
9633 processes table.
9634 (child_fetch_inferior_registers, child_store_inferior_registers):
9635 Adjust.
9636 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9637 (win32_attach): Pass 1 to do_initial_child_stuff.
9638 (win32_kill): Adjust interface. Remove process from processes
9639 table.
9640 (win32_detach): Ditto.
9641 (win32_join): Adjust interface.
9642 (win32_thread_alive): Take a ptid.
9643 (win32_resume): Adjust to use ptids.
9644 (get_child_debug_event): Ditto.
9645 (win32_wait): Adjust interface. Remove exiting process from
9646 processes table.
9647
96482009-04-01 Pedro Alves <pedro@codesourcery.com>
9649
9650 Non-stop mode support.
9651
9652 * server.h (non_stop): Declare.
9653 (gdb_client_data, handler_func): Declare.
9654 (delete_file_handler, add_file_handler, start_event_loop):
9655 Declare.
9656 (handle_serial_event, handle_target_event, push_event)
9657 (putpkt_notif): Declare.
9658 * target.h (enum resume_kind): New.
9659 (struct thread_resume): Replace `step' field by `kind' field.
9660 (TARGET_WNOHANG): Define.
9661 (struct target_ops) <wait>: Add `options' argument.
9662 <supports_non_stop, async, start_non_stop>: New fields.
9663 (target_supports_non_stop, target_async): New.
9664 (start_non_stop): Declare.
9665 (mywait): Add `options' argument.
9666 * target.c (mywait): Add `options' argument. Print child exit
9667 notifications here.
9668 (start_non_stop): New.
9669 * server.c (non_stop, own_buf, mem_buf): New globals.
9670 (struct vstop_notif): New.
9671 (notif_queue): New global.
9672 (queue_stop_reply, push_event, discard_queued_stop_replies)
9673 (send_next_stop_reply): New.
9674 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9675 interface changes.
9676 (attach_inferior): In non-stop mode, don't wait for the target
9677 here.
9678 (handle_general_set): Handle QNonStop.
9679 (handle_query): When handling qC, return the current general
9680 thread, instead of the first thread of the list.
9681 (handle_query): If the backend supports non-stop mode, include
9682 QNonStop+ in the qSupported query response.
9683 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9684 and non-stop mode.
9685 (handle_v_attach, handle_v_run): Handle non-stop mode.
9686 (handle_v_stopped): New.
9687 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9688 (myresume): Adjust to use resume_kind. Handle non-stop.
9689 (queue_stop_reply_callback): New.
9690 (handle_status): Handle non-stop mode.
9691 (main): Clear non_stop flag on reconnection. Use the event-loop.
9692 Refactor serial protocol handling from here ...
9693 (process_serial_event): ... to this new function. When GDB
9694 selects any thread, select one here. In non-stop mode, wait until
9695 GDB acks all pending events before exiting.
9696 (handle_serial_event, handle_target_event): New.
9697 * remote-utils.c (remote_open): Install remote_desc in the event
9698 loop.
9699 (remote_close): Remove remote_desc from the event loop.
9700 (putpkt_binary): Rename to...
9701 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9702 (putpkt_binary): New as wrapper around putpkt_binary_1.
9703 (putpkt_notif): New.
9704 (prepare_resume_reply): In non-stop mode, don't change the
9705 general_thread.
9706 * event-loop.c: New.
9707 * Makefile.in (OBJ): Add event-loop.o.
9708 (event-loop.o): New rule.
9709
9710 * linux-low.h (pid_of): Moved here.
9711 (lwpid_of): New.
9712 (get_lwp_thread): Use lwpid_of.
9713 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9714 * linux-low.c (pid_of): Delete.
9715 (inferior_pid): Use lwpid_of.
9716 (linux_event_pipe): New.
9717 (target_is_async_p): New.
9718 (delete_lwp): New.
9719 (handle_extended_wait): Use lwpid_of.
9720 (add_lwp): Don't set lwpid field.
9721 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9722 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9723 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9724 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9725 first. Adjust to linux_wait_for_event interface changes. Use
9726 lwpid_of.
9727 (linux_detach): Don't delete the main lwp here.
9728 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9729 (status_pending_p): Don't consider explicitly suspended lwps.
9730 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9731 pointer. Add OPTIONS argument. Change return type to int. Use
9732 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9733 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9734 pointer. Add status pointer argument. Return a pid instead of a
9735 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9736 changes. In non-stop mode, don't switch to a random thread.
9737 (linux_wait): Rename to...
9738 (linux_wait_1): ... this. Add target_options argument, and handle
9739 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9740 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9741 clean exit and signal exit code. Don't stop all threads in
9742 non-stop mode. In all-stop mode, only stop all threads when
9743 reporting a stop to GDB. Handle explicit thread stop requests.
9744 (async_file_flush, async_file_mark): New.
9745 (linux_wait): New.
9746 (send_sigstop): Use lwpid_of.
9747 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9748 interface changes. In non-stop mode, don't switch to a random
9749 thread.
9750 (linux_resume_one_lwp): Use lwpid_of.
9751 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9752 (linux_resume_one_thread): ... this. Handle resume_stop. In
9753 non-stop mode, don't look for pending flag in all threads.
9754 (resume_status_pending_p): Don't consider explicitly suspended
9755 threads.
9756 (my_waitpid): Reimplement. Emulate __WALL.
9757 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9758 Use lwpid_of.
9759 (sigchld_handler, linux_supports_non_stop, linux_async)
9760 (linux_start_non_stop): New.
9761 (linux_target_ops): Register linux_supports_non_stop, linux_async
9762 and linux_start_non_stop.
9763 (initialize_low): Install SIGCHLD handler.
9764 * thread-db.c (thread_db_create_event, find_one_thread)
9765 (thread_db_get_tls_address): Use lwpid_of.
9766 * win32-low.c (win32_detach): Adjust to use resume_kind.
9767 (win32_wait): Add `options' argument.
9768 * spu-low.c (spu_resume): Adjust to use resume_kind.
9769 (spu_wait): Add `options' argument.
9770
97712009-04-01 Pedro Alves <pedro@codesourcery.com>
9772
9773 Decouple target code from remote protocol.
9774
9775 * target.h (enum target_waitkind): New.
9776 (struct target_waitstatus): New.
9777 (struct target_ops) <wait>: Return an unsigned long. Take a
9778 target_waitstatus pointer instead of a char pointer.
9779 (mywait): Likewise.
9780 * target.c (mywait): Change prototype to return an unsigned long.
9781 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9782 * server.h (thread_from_wait, old_thread_from_wait): Delete
9783 declarations.
9784 (prepare_resume_reply): Change prototype to take a
9785 target_waitstatus.
9786 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9787 (last_status, last_ptid): New.
9788 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9789 pid instead of a signal.
9790 (attach_inferior): Remove "status" and "signal" parameters.
9791 Adjust.
9792 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9793 not as an address.
9794 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9795 (handle_v_requests, myresume): Remove "status" and "signal"
9796 parameters. Adjust.
9797 (handle_status): New.
9798 (main): Delete local `status'. Adjust.
9799 * remote-utils.c: Include target.h.
9800 (prepare_resume_reply): Change prototype to take a
9801 target_waitstatus. Adjust.
9802
9803 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9804 interface.
9805 * spu-low.c (spu_wait): Adjust.
9806 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9807 Delete.
9808 (win32_wait): Adjust.
9809
98102009-04-01 Pedro Alves <pedro@codesourcery.com>
9811
9812 * target.h (struct thread_resume): Delete leave_stopped member.
9813 (struct target_ops): Add a `n' argument to the `resume' callback.
9814 * server.c (start_inferior): Adjust.
9815 (handle_v_cont, myresume): Adjust.
9816 * linux-low.c (check_removed_breakpoint): Adjust to resume
9817 interface change, and to removed leave_stopped field.
9818 (resume_ptr): Delete.
9819 (struct thread_resume_array): New.
9820 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9821 resume interface change.
9822 (linux_continue_one_thread, linux_queue_one_thread)
9823 (resume_status_pending_p): Check if the resume field is NULL
9824 instead of checking the leave_stopped member.
9825 (linux_resume): Adjust to the target resume interface change.
9826 * spu-low.c (spu_resume): Adjust to the target resume interface
9827 change.
9828 * win32-low.c (win32_detach, win32_resume): Ditto.
9829
98302009-04-01 Pedro Alves <pedro@codesourcery.com>
9831
9832 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9833 flag.
9834 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9835 pending.
9836 (linux_continue_one_thread): Only preserve the stepping flag if
9837 there's a pending breakpoint.
9838
98392009-03-31 Pedro Alves <pedro@codesourcery.com>
9840
9841 * server.c (main): After the inferior having exited, call
9842 remote_close before exiting gdbserver.
9843
98442009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9845
9846 Fix size of FPSCR in Power 7 processors.
9847 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9848 (PPC_FEATURE_HAS_DFP): New #define.
9849 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9850 size of the FPSCR.
9851
98522009-03-23 Pedro Alves <pedro@codesourcery.com>
9853
9854 * server.c (handle_query) Whitespace and formatting.
9855
98562009-03-22 Pedro Alves <pedro@codesourcery.com>
9857
9858 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9859 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9860 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9861 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9862 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9863 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9864 Makefile.in, configure.ac: Fix whitespace throughout.
9865 * configure: Regenerate.
9866
98672009-03-22 Pedro Alves <pedro@codesourcery.com>
9868
9869 * inferiors.c (find_inferior): Make it safe for the callback
9870 function to delete the currently iterated inferior.
9871
98722009-03-22 Pedro Alves <pedro@codesourcery.com>
9873
9874 * Makefile.in (linuw_low_h): Move higher.
9875 (thread-db.o): Depend on $(linux_low_h).
9876
98772009-03-17 Pedro Alves <pedro@codesourcery.com>
9878
9879 Rename "process" to "lwp" throughout.
9880
9881 * linux-low.c (all_processes): Rename to...
9882 (all_lwps): ... this.
9883 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9884 (add_process): Rename to ...
9885 (add_lwp): ... this. Adjust.
9886 (linux_create_inferior): Adjust.
9887 (linux_attach_lwp): Adjust.
9888 (linux_attach): Adjust.
9889 (linux_kill_one_process): Rename to ...
9890 (linux_kill_one_lwp): ... this. Adjust.
9891 (linux_kill): Adjust.
9892 (linux_detach_one_process): Rename to ...
9893 (linux_detach_one_lwp): ... this. Adjust.
9894 (linux_detach): Adjust.
9895 (check_removed_breakpoint): Adjust.
9896 (status_pending_p): Adjust.
9897 (linux_wait_for_process): Rename to ...
9898 (linux_wait_for_lwp): ... this. Adjust.
9899 (linux_wait_for_event): Adjust.
9900 (send_sigstop): Adjust.
9901 (wait_for_sigstop): Adjust.
9902 (stop_all_processes): Rename to ...
9903 (stop_all_lwps): ... this.
9904 (linux_resume_one_process): Rename to ...
9905 (linux_resume_one_lwp): ... this. Adjust.
9906 (linux_set_resume_request, linux_continue_one_thread)
9907 (linux_queue_one_thread, resume_status_pending_p)
9908 (usr_store_inferior_registers, regsets_store_inferior_registers)
9909 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9910 Adjust.
9911 * linux-low.h (get_process): Rename to ...
9912 (get_lwp): ... this. Adjust.
9913 (get_thread_process): Rename to ...
9914 (get_thread_lwp): ... this. Adjust.
9915 (get_process_thread): Rename to ...
9916 (get_lwp_thread): ... this. Adjust.
9917 (struct process_info): Rename to ...
9918 (struct lwp_info): ... this.
9919 (all_processes): Rename to ...
9920 (all_lwps): ... this.
9921 * proc-service.c (ps_lgetregs): Adjust.
9922 * thread-db.c (thread_db_create_event, find_one_thread)
9923 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9924
99252009-03-14 Pedro Alves <pedro@codesourcery.com>
9926
9927 * server.c (handle_query): Handle "qAttached".
9928
99292009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9930
9931 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9932 GPLv3, update license URL.
9933
99342009-03-01 Doug Evans <dje@google.com>
9935
9936 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9937 (server_h): Add gdb_signals.h.
9938 (signals.o): Update.
9939 * server.h (target_signal_from_host,target_signal_to_host_p)
9940 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9941
99422009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9943
9944 * remote-utils.c (getpkt): Also generate remote-debug
9945 information if noack_mode is set.
9946
99472009-02-06 Pedro Alves <pedro@codesourcery.com>
9948
9949 * server.c (handle_query): Report qXfer:siginfo:read and
9950 qXfer:siginfo:write as supported and handle them.
9951 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9952 * linux-low.c (linux_xfer_siginfo): New.
9953 (linux_target_ops): Set it.
9954
99552009-01-26 Pedro Alves <pedro@codesourcery.com>
9956
9957 * server.c (gdbserver_usage): Mention --remote-debug.
9958 (main): Accept '--remote-debug' switch.
9959
99602009-01-18 Doug Evans <dje@google.com>
9961
9962 * regcache.c (new_register_cache): No need to check result of xcalloc.
9963 * server.c (handle_search_memory): Back out calls to xmalloc,
9964 result is checked and error is returned to user upon failure.
9965 (handle_query): Ditto. Add more checks for result of malloc.
9966 (handle_v_cont): Check result of malloc, report error back to
9967 user upon failure.
9968 (handle_v_run): Ditto. Call freeargv.
9969 * server.h (freeargv): Declare.
9970 * utils.c (freeargv): New fn.
9971
99722009-01-15 Doug Evans <dje@google.com>
9973
9974 * gdbreplay.c (perror_with_name): Make arg const char *.
9975 * server.h (target_signal_to_name): Make return type const char *.
9976 * thread-db.c (thread_db_err_str): Make return type const char *.
9977 * utils.c (perror_with_name): Make arg const char *.
9978
99792009-01-14 Pedro Alves <pedro@codesourcery.com>
9980
9981 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9982 when handling a EXIT_PROCESS_DEBUG_EVENT.
9983
99842009-01-06 Joel Brobecker <brobecker@adacore.com>
9985
9986 * gdbreplay.c (gdbreplay_version): Update copyright year.
9987 * server.c (gdbserver_version): Likewise.
9988
99892009-01-05 Doug Evans <dje@google.com>
9990
9991 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9992 (handle_extended_wait): Improve comment.
9993
99942008-12-13 Doug Evans <dje@google.com>
9995
9996 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9997 * server.h (ATTR_MALLOC): New macro.
9998 (xmalloc,xcalloc,xstrdup): Declare.
9999 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10000 * inferiors.c: Ditto.
10001 * linux-low.c: Ditto.
10002 * mem-break.c: Ditto.
10003 * regcache.c: Ditto.
10004 * remote-utils.c: Ditto.
10005 * server.c: Ditto.
10006 * target.c: Ditto.
10007 * win32-low.c: Ditto.
10008
100092008-12-12 Doug Evans <dje@google.com>
10010
10011 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10012 in debugging printf.
10013
10014 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10015
100162008-12-09 Doug Evans <dje@google.com>
10017
10018 * linux-low.h (struct process_info): Delete member tid, unused.
10019 * thread-db.c (find_one_thread): Update.
10020 (maybe_attach_thread): Update.
10021
100222008-12-02 Pedro Alves <pedro@codesourcery.com>
10023
10024 * target.h (struct target_ops): Add qxfer_osdata member.
10025 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10026 and dirent.h.
10027 (linux_qxfer_osdata): New functions.
10028 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10029 callback.
10030 * server.c (handle_query): Handle "qXfer:osdata:read:".
10031 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10032 (buffer_xml_printf): New functions.
10033 * server.h (struct buffer): New.
10034 (buffer_grow_str, buffer_grow_str0): New macros.
10035 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10036 (buffer_xml_printf): Declare.
10037
100382008-11-24 Doug Evans <dje@google.com>
10039
10040 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10041
100422008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10043
10044 * server.c (handle_v_run): Always use the supplied argument list.
10045
100462008-11-19 Bob Wilson <bob.wilson@acm.org>
10047
10048 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10049 (xtensa_regmap_table): Add entry for scompare1.
10050
100512008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10052
10053 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10054 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10055 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10056 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10057 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10058 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10059 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10060 XML target descriptions.
10061 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10062 when inferior is running on an ISA 2.05 or later processor. Add
10063 special case to return offset for full 64-bit slot of FPSCR when
10064 in 32-bits.
10065
100662008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10067
10068 * Makefile.in (SFILES, clean): Added sparc64 files.
10069 (reg-sparc64.o, reg-sparc64.c): New.
10070 * configure.srv (sparc*-*-linux*): New configuration.
10071 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10072 syscall arguments for SPARC.
10073 (regsets_store_inferior_registers): Likewise.
10074 * linux-sparc-low.c: New file.
10075
100762008-10-21 Doug Evans <dje@google.com>
10077
10078 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10079 (READLINE_DIR,READLINE_DEP): Delete.
10080 (INTERNAL_CFLAGS): Update.
10081 (LINTFLAGS): Update.
10082
100832008-10-10 Pedro Alves <pedro@codesourcery.com>
10084
10085 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10086 whole argv from the last run, not just argv[0].
10087
100882008-09-08 Pedro Alves <pedro@codesourcery.com>
10089
10090 * regcache.c (new_register_cache): Return NULL if the register
10091 cache size isn't known yet.
10092 (free_register_cache): Avoid dereferencing a NULL regcache.
10093
100942008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10095
10096 * configure.srv: Merge MIPS and MIPS64.
10097
100982008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10099
10100 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10101
101022008-08-18 Luis Machado <luisgpm@br.ibm.com>
10103
10104 * Makefile.in: Add required vsx dependencies.
10105
10106 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10107 Declare init_registers_powerpc_vsx32l.
10108 Declare init_registers_powerpc_vsx64l.
10109 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10110 (ppc_arch_setup): Check for VSX in hwcap.
10111 (ppc_fill_vsxregset): New function.
10112 (ppc_store_vsxregset): New function.
10113 Add new VSX entry in regset_info target_regsets.
10114
10115 * configure.srv: Add new VSX dependencies.
10116
101172008-08-12 Pedro Alves <pedro@codesourcery.com>
10118
10119 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10120 (remote_open): Set or clear transport_is_reliable.
10121 (putpkt_binary): Don't expect acks in noack mode.
10122 (getpkt): Don't send ack/nac in noack mode.
10123 * server.c (handle_general_set): Handle QStartNoAckMode.
10124 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10125 qSupported.
10126 (main): Reset noack_mode on every connection.
10127 * server.h (noack_mode): Declare.
10128
101292008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10130
10131 * Makefile.in (GDBREPLAY_OBS): New variable.
10132 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10133
101342008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10135 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10138 (usr_store_inferior_registers): Likewise.
10139 (regsets_store_inferior_registers): Likewise.
10140
101412008-07-31 Rolf Jansen <rj@surtec.com>
10142 Pedro Alves <pedro@codesourcery.com>
10143
10144 * configure.ac: Check for memmem declaration.
10145 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10146 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10147 (disable_packet_qfThreadInfo): Unconditionally compile.
10148 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10149 * configure, config.in: Regenerate.
10150
101512008-07-28 Doug Kwan <dougkwan@google.com>
10152
10153 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10154 (linux_write_memory): Remove declaration of errno.
10155
101562008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10157
10158 * linux-low.c (handle_extended_wait): Do not use "status"
10159 variable uninitialized.
10160
101612008-07-07 Pedro Alves <pedro@codesourcery.com>
10162
10163 * server.c (handle_v_attach): Inhibit reporting dll changes.
10164
101652008-06-27 Pedro Alves <pedro@codesourcery.com>
10166
10167 * remote-utils.c (prepare_resume_reply): If requested, don't
10168 output "thread:TID" in the T stop reply.
10169
10170 * server.c (disable_packet_vCont, disable_packet_Tthread)
10171 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10172 (handle_query): If requested, disable support for qC, qfThreadInfo
10173 and qsThreadInfo.
10174 (handle_v_requests): If requested, disable support for vCont.
10175 (gdbserver_show_disableable): New.
10176 (main): Handle --disable-packet and --disable-packet=LIST.
10177
10178 * server.h (disable_packet_vCont, disable_packet_Tthread)
10179 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10180
101812008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10182
10183 * server.c (gdbserver_usage): Mention --version.
10184
101852008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * Makefile.in (gdbreplay.o): New rule.
10188
101892008-06-06 Joseph Myers <joseph@codesourcery.com>
10190
10191 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10192 message, not gdbserver.
10193
101942008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10195 Nathan Sidwell <nathan@codesourcery.com>
10196 Joseph Myers <joseph@codesourcery.com>
10197
10198 * acinclude.m4: Include ../../config/acx.m4.
10199 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10200 * configure, config.in: Regenerate.
10201 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10202 * server.c (gdbserver_version): Print PKGVERSION.
10203 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10204 (main): Adjust gdbserver_usage calls.
10205 * gdbreplay.c (version, host_name): Add declarations.
10206 (gdbreplay_version, gdbreplay_usage): New.
10207 (main): Accept --version and --help options.
10208
102092008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10210
10211 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10212 (arm_breakpoint_at): Handle Thumb.
10213 (the_low_target): Add comment.
10214
102152008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10216
10217 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10218
102192008-05-09 Doug Evans <dje@google.com>
10220
10221 * server.h (decode_search_memory_packet): Declare.
10222 * remote-utils.c (decode_search_memory_packet): New fn.
10223 * server.c (handle_search_memory_1): New fn.
10224 (handle_search_memory): New fn.
10225 (handle_query): Process qSearch:memory packets.
10226
102272008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10228
10229 * regcache.c (registers_length): Remove.
10230 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10231 full register packet.
10232 * regcache.h (registers_length): Remove prototype.
10233 * server.h (PBUFSIZ): Define to 16384.
10234
102352008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10236
10237 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10238 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10239 powerpc-64l.o, and powerpc-altivec64l.o.
10240 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10241 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10242 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10243 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10244 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10245 to srv_xmlfiles.
10246
10247 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10248 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10249 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10250 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10251 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10252 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10253 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10254 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10255 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10256 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10257 (clean): Update.
10258
10259 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10260 (init_registers_powerpc_32l): ... this new prototype.
10261 (init_registers_powerpc_32): Remove, replace by ...
10262 (init_registers_powerpc_altivec32l): ... this new prototype.
10263 (init_registers_powerpc_e500): Remove, replace by ...
10264 (init_registers_powerpc_e500l): ... this new prototype.
10265 (init_registers_ppc64): Remove, replace by ...
10266 (init_registers_powerpc_64l): ... this new prototype.
10267 (init_registers_powerpc_64): Remove, replace by ...
10268 (init_registers_powerpc_altivec64l): ... this new prototype.
10269 (ppc_num_regs): Set to 73.
10270 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10271 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10272 (ppc_cannot_store_register): Handle orig_r3 and trap.
10273 (ppc_arch_setup): Update init_registers_... calls.
10274 (ppc_fill_gregset): Handle orig_r3 and trap.
10275
10276 * inferiors.c (clear_inferiors): Reset current_inferior.
10277
102782008-04-23 Paolo Bonzini <bonzini@gnu.org>
10279
10280 * acinclude.m4: Add override.m4.
10281 * configure: Regenerate.
10282
102832008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10284
10285 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10286 initial call to init_register_ppc64.
10287
102882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10289
10290 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10291 single powerpc*-*-linux* case.
10292 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10293
102942008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10295
10296 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10297 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10298 from reg_xmlfiles.
10299 * linux-ppc-low.c: Include <elf.h>.
10300 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10301 (ppc_hwcap): New global variable.
10302 (ppc_regmap): Remove __SPE__ #ifdef sections.
10303 (ppc_regmap_e500): New global variable.
10304 (ppc_cannot_store_register): Update __SPE__ special case.
10305 (ppc_get_hwcap): New function.
10306 (ppc_arch_setup): Use it to determine whether inferior supports
10307 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10308 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10309 Do not access registers if target does not support AltiVec.
10310 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10311 Do not access registers if target does not support SPE.
10312 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10313
103142008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10315
10316 * linux-low.c (disabled_regsets, num_regsets): New.
10317 (use_regsets_p): Delete.
10318 (linux_wait_for_process): Clear disabled_regsets.
10319 (regsets_fetch_inferior_registers): Check and set it.
10320 (regsets_store_inferior_registers): Likewise.
10321 (linux_fetch_registers, linux_store_registers): Do not use
10322 use_regsets_p.
10323 (initialize_low): Allocate disabled_regsets.
10324
103252008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * Makefile.in (LIBOBJS): New.
10328 (OBS): Use LIBOBJS.
10329 (memmem.o): New rule.
10330 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10331 * configure: Regenerated.
10332
103332008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10334
10335 * server.c (handle_query): Never return "unsupported" for
10336 qXfer:features:read queries.
10337
103382008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10339
10340 * server.c (get_features_xml): Fix inverted condition.
10341 (handle_query): Always support qXfer:feature:read.
10342
103432008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * server.c (wrapper_argv): New.
10346 (start_inferior): Handle wrapper_argv. If set, expect an extra
10347 trap.
10348 (gdbserver_usage): Document --wrapper.
10349 (main): Parse --wrapper.
10350
103512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10352
10353 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10354 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10355 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10356 (ppc_set_pc): Likewise.
10357 (ppc_arch_setup): New function.
10358 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10359 of collect_register.
10360 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10361
103622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10363
10364 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10365 instead of linux-ppc64-low.o.
10366 * linux-ppc64-low.c: Remove file.
10367 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10368 (linux-ppc64-low.o): Remove rule.
10369
10370 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10371 (init_registers_powerpc_64): Likewise.
10372 (ppc_regmap): Conditionally define depending on __powerpc64__.
10373 (ppc_cannot_store_register): Do not special-case "fpscr" when
10374 compiled on __powerpc64__.
10375 (ppc_collect_ptrace_register): New function.
10376 (ppc_supply_ptrace_register): New function.
10377 (ppc_breakpoint): Change type to "unsigned int".
10378 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10379 (the_low_target): Conditionally provide initializers for the
10380 arch_setup member depending on __powerpc64__. Install
10381 collect_ptrace_register and supply_ptrace_register members.
10382
103832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10384
10385 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10386 * server.c (gdbserver_xmltarget): Define.
10387 (get_features_xml): Use it to replace "target.xml" and arch_string.
10388
10389 * configure.srv: Remove srv_xmltarget. Add XML files that were
10390 mentioned there to srv_xmlfiles instead. Remove conditional tests
10391 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10392 srv_xmlfiles and srv_regobj to include all possible choices.
10393 * configure.ac (srv_xmltarget): Remove.
10394 (srv_xmlfiles): Do not add "target.xml".
10395 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10396 checks for supplementary target information.
10397 * configure: Regenerate.
10398 * Makefile.in (XML_TARGET): Remove.
10399 (target.xml): Remove rule.
10400 (clean): Do not clean up target.xml.
10401 (.PRECIOUS): Do not mention target.xml.
10402
10403 * target.h (struct target_ops): Remove arch_string member.
10404 * linux-low.c (linux_arch_string): Remove.
10405 (linux_target_ops): Remove arch_string initializer.
10406 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10407 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10408 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10409 * spu-low.c (spu_arch_string): Remove.
10410 (spu_target_ops): Remove arch_string initializer.
10411 * win32-low.c (win32_arch_string): Remove.
10412 (win32_target_ops): Remove arch_string initializer.
10413 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10414 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10415 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10416
104172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10418
10419 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10420 by collect_ptrace_register and supply_ptrace_register hooks.
10421 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10422 instead of checking for the_low_target.left_pad_xfer.
10423 (usr_store_inferior_registers): Use collect_ptrace_register callback
10424 instead of checking for the_low_target.left_pad_xfer.
10425
10426 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10427 (s390_supply_ptrace_register): Likewise.
10428 (s390_fill_gregset): Call s390_collect_ptrace_register.
10429 (the_low_target): Update.
10430
10431 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10432 (ppc_supply_ptrace_register): Likewise.
10433 (the_low_target): Update.
10434
10435 * linux-i386-low.c (the_low_target): Update.
10436 * linux-x86-64-low.c (the_low_target): Update.
10437
104382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10439
10440 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10441 reg-s390.o and reg-s390x.o.
10442
10443 * linux-low.c (new_inferior): New global variable.
10444 (linux_create_inferior, linux_attach): Set it.
10445 (linux_wait_for_process): Call the_low_target.arch_setup after the
10446 target has stopped for the first time.
10447 (initialize_low): Do not call the_low_target.arch_setup.
10448
10449 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10450 (s390_set_pc): Likewise.
10451 (s390_arch_setup): New function.
10452 (the_low_target): Use s390_arch_setup as arch_setup routine.
10453
10454 * regcache.c (realloc_register_cache): New function.
10455 (set_register_cache): Call it for each existing regcache.
10456
104572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10458
10459 * server.h (init_registers): Remove prototype.
10460
10461 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10462 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10463 instead of init_registers ().
10464 * linux-arm-low.c (init_registers_arm): Add prototype.
10465 (init_registers_arm_with_iwmmxt): Likewise.
10466 (the_low_target): Add initializer for arch_setup field.
10467 * linux-cris-low.c (init_registers_cris): Add prototype.
10468 (the_low_target): Add initializer for arch_setup field.
10469 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10470 (the_low_target): Add initializer for arch_setup field.
10471 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10472 (the_low_target): Add initializer for arch_setup field.
10473 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10474 (the_low_target): Add initializer for arch_setup field.
10475 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10476 (the_low_target): Add initializer for arch_setup field.
10477 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10478 (the_low_target): Add initializer for arch_setup field.
10479 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10480 (init_registers_mips64_linux): Likewise.
10481 (the_low_target): Add initializer for arch_setup field.
10482 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10483 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10484 (the_low_target): Add initializer for arch_setup field.
10485 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10486 (init_registers_powerpc_64): Likewise.
10487 (the_low_target): Add initializer for arch_setup field.
10488 * linux-s390-low.c (init_registers_s390): Add prototype.
10489 (init_registers_s390x): Likewise.
10490 (the_low_target): Add initializer for arch_setup field.
10491 * linux-sh-low.c (init_registers_sh): Add prototype.
10492 (the_low_target): Add initializer for arch_setup field.
10493 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10494 (the_low_target): Add initializer for arch_setup field.
10495 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10496 (the_low_target): Add initializer for arch_setup field.
10497
10498 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10499 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10500 instead of init_registers ().
10501 * win32-arm-low.c (init_registers_arm): Add prototype.
10502 (the_low_target): Add initializer for arch_setup field.
10503 * win32-i386-low.c (init_registers_i386): Add prototype.
10504 (the_low_target): Add initializer for arch_setup field.
10505
10506 * spu-low.c (init_registers_spu): Add prototype.
10507 (initialize_low): Call initialie_registers_spu () instead of
10508 initialize_registers ().
10509
105102008-02-19 Pedro Alves <pedro@codesourcery.com>
10511
10512 * server.c (handle_v_requests): When handling the vRun and vAttach
10513 packets, if already debugging a process, don't kill it. Return an
10514 error instead.
10515
105162008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10517
10518 * server.c (handle_query): Correct length check.
10519
105202008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10521
10522 * win32-low.c (do_initial_child_stuff): Add process handle
10523 parameter. Set current_process_handle and current_process_id from the
10524 parameters. Clear globals.
10525 (win32_create_inferior): Don't set current_process_handle and
10526 current_process_id here. Instead pass them on the call to
10527 do_initial_child_stuff.
10528 (win32_attach): Likewise.
10529 (win32_clear_inferiors): New.
10530 (win32_kill): Don't close the current process handle or the
10531 current thread handle here. Instead call win32_clear_inferiors.
10532 (win32_detach): Don't open a new handle to the process. Call
10533 win32_clear_inferiors.
10534 (win32_join): Don't rely on current_process_handle; open a new
10535 handle using the process id.
10536 (win32_wait): Call win32_clear_inferiors when the inferior process
10537 has exited.
10538
105392008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10540
10541 * server.c (monitor_show_help): Add "exit".
10542
105432008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10544
10545 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10546 (clean): Add reg-xtensa.c.
10547 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10548 * configure.srv (xtensa*-*-linux*) New target.
10549 * linux-xtensa-low.c: New.
10550 * xtensa-xtregs.c: New.
10551
105522008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10553
10554 * hostio.c: Don't include errno.h.
10555 (errno_to_fileio_errno): Move to hostio-errno.
10556 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10557 error number outputting to the target->hostio_last_error callback.
10558 (hostio_packet_error): Use FILEIO_EINVAL directly.
10559 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10560 calls to hostio_error.
10561 * hostio-errno.c: New.
10562 * server.h (hostio_last_error_from_errno): Declare.
10563 * target.h (target_ops): Add hostio_last_error member.
10564 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10565 as hostio_last_error handler.
10566 * spu-low.c (spu_target_ops): Likewise.
10567 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10568 (wince_hostio_last_error): New functions.
10569 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10570 as hostio_last_error handler.
10571 (win32_target_ops) [!_WIN32_WCE]: Register
10572 hostio_last_error_from_errno as hostio_last_error handler.
10573 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10574 (hostio-errno.o): New rule.
10575 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10576 * configure.srv (srv_hostio_err_objs): New variable. Default to
10577 hostio-errno.o.
10578 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10579 * configure: Regenerate.
10580
105812008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10582
10583 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10584 (linux_kill, linux_detach): Clean up the process list.
10585 * remote-utils.c (remote_open): Improve port number parsing.
10586 (putpkt_binary, input_interrupt): Only send interrupts if the target
10587 is running.
10588 * server.c (extended_protocol): Make static.
10589 (attached): Define earlier.
10590 (exit_requested, response_needed, program_argv): New variables.
10591 (target_running): New.
10592 (start_inferior): Clear attached here.
10593 (attach_inferior): Set attached here.
10594 (require_running): Define.
10595 (handle_query): Use require_running and target_running. Implement
10596 "monitor exit".
10597 (handle_v_attach, handle_v_run): New.
10598 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10599 (gdbserver_usage): Update.
10600 (main): Redo argument parsing. Handle --debug and --multi. Handle
10601 --attach along with other options or after the port. Save
10602 program_argv. Support no initial program. Resynchronize
10603 communication with GDB after an error. Handle "monitor exit".
10604 Use require_running and target_running. Always allow the extended
10605 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10606 restart in extended mode.
10607 * README: Refer to the GDB manual. Update --attach usage.
10608
106092007-12-20 Andreas Schwab <schwab@suse.de>
10610
10611 * linux-low.c (STACK_SIZE): Define.
10612 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10613 (linux_test_for_tracefork): Likewise.
10614
106152007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10616
10617 * linux-low.c (linux_wait_for_event): Update messages. Do not
10618 reinsert auto-delete breakpoints.
10619 * mem-break.c (struct breakpoint): Change return type of handler to
10620 int.
10621 (set_breakpoint_at): Update handler type.
10622 (reinsert_breakpoint_handler): Return 1 instead of calling
10623 delete_breakpoint.
10624 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10625 setting a new one.
10626 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10627 * mem-break.h (set_breakpoint_at): Update handler type.
10628 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10629 * win32-low.c (auto_delete_breakpoint): New.
10630 (get_child_debug_event): Use it.
10631
106322007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10633
10634 * configure.ac: Check for pread and pwrite.
10635 * hostio.c (handle_pread): Fall back to lseek and read.
10636 (handle_pwrite): Fall back to lseek and write.
10637 * config.in, configure: Regenerated.
10638
106392007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * server.c (myresume): Add own_buf argument.
10642 (main): Update calls.
10643
106442007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10645
10646 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10647 * remote-utils.c (remote_open): Do not call disable_async_io.
10648 (block_async_io): Delete.
10649 (unblock_async_io): Make static.
10650 (initialize_async_io): New.
10651 * server.c (handle_v_cont): Handle async I/O here.
10652 (myresume): Likewise. Move other common resume tasks here...
10653 (main): ... from here. Call initialize_async_io. Disable async
10654 I/O before the main loop.
10655 * server.h (initialize_async_io): Declare.
10656 (block_async_io, unblock_async_io): Delete prototypes.
10657 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10658
106592007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10660
10661 * remote-utils.c (readchar): Allow binary data in received messages.
10662
106632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10664
10665 * win32-low.c (attaching): New global.
10666 (win32_create_inferior): Clear the `attaching' global.
10667 (win32_attach): Set the `attaching' global.
10668 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10669 attaching. Only set a breakpoint at the entry point if not
10670 attaching.
10671
106722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10673
10674 * server.c (main): Don't report dll events on the initial
10675 connection on attaches.
10676
106772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10678
10679 * server.c (main): Relax numerical bases supported for the pid of
10680 the --attach command line argument.
10681
106822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10683
10684 * win32-low.c (win32_attach): Call OpenProcess before
10685 DebugActiveProcess, not after. Add last error output to error
10686 call.
10687
106882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10689
10690 * win32-low.c (win32_get_thread_context)
10691 (win32_set_thread_context): New functions.
10692 (thread_rec): Use win32_get_thread_context.
10693 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10694 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10695 field.
10696
106972007-12-03 Leo Zayas
10698 Pedro Alves <pedro_alves@portugalmail.pt>
10699
10700 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10701 global variables.
10702 (child_add_thread): Minor cleanup.
10703 (child_continue): Resume artificially suspended threads before
10704 calling ContinueDebugEvent.
10705 (suspend_one_thread): New.
10706 (fake_breakpoint_event): New.
10707 (get_child_debug_event): Change return type to int. Check here if
10708 gdb sent an interrupt request. If a soft interrupt was requested,
10709 fake a breakpoint event. Return 0 if there is no event to handle,
10710 and 1 otherwise.
10711 (win32_wait): Don't check here if gdb sent an interrupt request.
10712 Ensure there is a valid event to handle.
10713 (win32_request_interrupt): Add soft interruption method as last
10714 resort.
10715
107162007-12-03 Leo Zayas
10717 Pedro Alves <pedro_alves@portugalmail.pt>
10718
10719 * win32-low.h (win32_thread_info): Add descriptions to the
10720 structure members. Replace `suspend_count' counter by a
10721 `suspended' flag.
10722 * win32-low.c (thread_rec): Update condition of when to get the
10723 context from the inferior. Rely on ContextFlags being set if it
10724 has already been retrieved. Only suspend the inferior thread if
10725 we haven't already. Warn if that fails.
10726 (continue_one_thread): s/suspend_count/suspended/. Only call
10727 ResumeThread once. Warn if that fails.
10728
107292007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10730
10731 * win32-low.c (win32_wait): Don't read from the inferior when it
10732 has already exited.
10733
107342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10735
10736 * Makefile.in (win32_low_h): New variable.
10737 (win32-low.o): Add dependency on $(win32_low_h).
10738 (win32-arm-low.o, win32-i386-low.o): New rules.
10739
107402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10741
10742 * hostio.c: Correct copyright year.
10743
107442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * Makefile.in (OBS): Add hostio.o.
10747 (hostio.o): New rule.
10748 * server.h (handle_vFile): Declare.
10749 * hostio.c: New file.
10750 * server.c (handle_v_requests): Take packet_len and new_packet_len
10751 for binary packets. Call handle_vFile.
10752 (main): Update call to handle_v_requests.
10753
107542007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10755
10756 * linux-low.c: Include <sched.h>.
10757
107582007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * linux-low.c (linux_tracefork_grandchild): New.
10761 (linux_tracefork_child): Use clone.
10762 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10763
107642007-10-31 Joel Brobecker <brobecker@adacore.com>
10765
10766 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10767
107682007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10769
10770 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10771
107722007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10773
10774 * inferiors.c (change_inferior_id): Delete.
10775 (add_pid_to_list, pull_pid_from_list): New.
10776 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10777 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10778 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10779 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10780 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10781 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10782 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10783 (using_threads): Always set to 1.
10784 (handle_extended_wait): New.
10785 (add_process): Do not set TID.
10786 (linux_create_inferior): Set must_set_ptrace_flags.
10787 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10788 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10789 (linux_thread_alive): Rename TID argument to LWPID.
10790 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10791 (linux_wait_for_event): Do not use TID or check using_threads. Update
10792 call to dead_thread_notify. Call handle_extended_wait.
10793 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10794 (send_sigstop): Delete sigstop_sent.
10795 (wait_for_sigstop): Avoid TID.
10796 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10797 (linux_test_for_tracefork): New.
10798 (linux_lookup_signals): Use thread_db_active and
10799 linux_supports_tracefork_flag.
10800 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10801 * linux-low.h (get_process_thread): Avoid TID.
10802 (struct process_ifo): Move thread_known and tid to the end. Remove
10803 sigstop_sent.
10804 (linux_attach_lwp, thread_db_init): Update prototypes.
10805 * server.h (change_inferior_id): Delete prototype.
10806 (add_pid_to_list, pull_pid_from_list): New prototypes.
10807 * thread-db.c (thread_db_use_events): New.
10808 (find_first_thread): Rename to...
10809 (find_one_thread): ...this. Update callers and messages. Do not
10810 call fatal. Check thread_db_use_events. Do not call
10811 change_inferior_id or new_thread_notify.
10812 (maybe_attach_thread): Update. Do not call new_thread_notify.
10813 (thread_db_init): Set thread_db_use_events. Check use_events.
10814 * utils.c (fatal, warning): Correct message prefix.
10815
108162007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10817
10818 * Makefile.in (clean): Remove new files.
10819 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10820 (powerpc-64.o, powerpc-64.c): New rules.
10821 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10822 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10823 with SPE.
10824 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10825 SPE targets.
10826 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10827 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10828 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10829 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10830 (target_regsets): Add AltiVec and SPE register sets.
10831 * configure.ac: Check for AltiVec and SPE.
10832 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10833 (ppc_fill_vrregset, ppc_store_vrregset): New.
10834 (target_regsets): Add AltiVec register set.
10835 * configure: Regenerated.
10836
108372007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10838
10839 * linux-low.c (O_LARGEFILE): Define.
10840 (linux_read_memory): Use /proc/PID/mem.
10841 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10842 * configure, config.in: Regenerated.
10843
108442007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * linux-low.c (linux_wait_for_event): Do not pass signals while
10847 single-stepping.
10848
108492007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10850
10851 * win32-low.c (create_process): New.
10852 (win32_create_inferior): Use create_process instead of
10853 CreateProcess. If create_process failed retry appending an ".exe"
10854 suffix. Store the GetLastError result immediatelly after
10855 create_process calls and use it on the call to error.
10856
108572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10858
10859 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10860
108612007-08-23 Joel Brobecker <brobecker@adacore.com>
10862
10863 * configure.ac: Switch license to GPLv3.
10864
108652007-08-01 Michael Snyder <msnyder@access-company.com>
10866
10867 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10868
108692007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10870
10871 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10872 typedef.
10873 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10874 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10875 CloseToolhelp32Snapshot.
10876 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10877 CloseToolhelp32Snapshot.
10878
108792007-07-27 Michael Snyder <michael.snyder@access-company.com>
10880
10881 * server.c (main): Check for inferior exit before main loop.
10882
108832007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10884
10885 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10886 instead of on tmp_desc.
10887
108882007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10889 Daniel Jacobowitz <dan@codesourcery.com>
10890
10891 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10892 (add_thread): Minor cleanups.
10893 (clear_inferiors): Move lower in the file. Clear the DLL
10894 list.
10895 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10896 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10897 (xml_escape_text): New.
10898 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10899 for qSupported.
10900 (handle_v_cont): Report errors.
10901 (gdbserver_version): Update.
10902 (main): Correct size of own_buf. Do not report initial DLL events.
10903 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10904 (unloaded_dll, xml_escape_text): New.
10905 * win32-low.c (enum target_waitkind): Update comments.
10906 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10907 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10908 (win32_EnumProcessModules, win32_GetModuleInformation)
10909 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10910 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10911 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10912 (win32_Module32First, win32_Module32Next, load_toolhelp)
10913 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10914 (get_child_debug_event): Handle DLL events.
10915 (win32_wait): Likewise.
10916
109172007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10918
10919 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10920 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10921
109222007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10923
10924 * win32-low.c (handle_output_debug_string): Ignore event if not
10925 waiting.
10926
109272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10928
10929 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10930
109312007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10932
10933 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10934
109352007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10936
10937 * inferiors.c (change_inferior_id): Add comment.
10938 * linux-low.c (check_removed_breakpoint): Add an early
10939 prototype. Improve debug output.
10940 (linux_attach): Doc update.
10941 (linux_detach_one_process, linux_detach): Clean up before releasing
10942 each process.
10943 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10944 * linux-low.h (struct process_info): Doc improvement.
10945 * mem-break.c (delete_all_breakpoints): New.
10946 * mem-break.h (delete_all_breakpoints): New prototype.
10947 * thread-db.c (find_first_thread): New.
10948 (thread_db_create_event): Call it instead of
10949 thread_db_find_new_threads. Clean up unused variables.
10950 (maybe_attach_thread): Remove first thread handling.
10951 (thread_db_find_new_threads): Use find_first_thread.
10952 (thread_db_get_tls_address): Likewise.
10953
109542007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10955
10956 * thread-db.c (thread_db_find_new_threads): Add prototype.
10957 (thread_db_create_event): Check for the main thread before adding
10958 a new thread.
10959 (maybe_attach_thread): Only enable event reporting if TID == 0.
10960 (thread_db_get_tls_address): Check for new threads.
10961
109622007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10963
10964 * linux-low.c (linux_create_inferior): Try execv before execvp.
10965 * spu-low.c (spu_create_inferior): Likewise.
10966
109672007-06-13 Mike Frysinger <vapier@gentoo.org>
10968
10969 * linux-low.c (linux_create_inferior): Change execv to execvp.
10970 * spu-low.c (spu_create_inferior): Likewies.
10971
109722007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10973
10974 * Makefile.in (clean): Clean new files instead of deleted ones.
10975 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10976 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10977 rules.
10978 * configure.srv: Specify XML files and new regformats for MIPS and
10979 MIPS64 GNU/Linux.
10980 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10981 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10982 an entry for the restart register.
10983 (mips_cannot_fetch_register, mips_cannot_store_register)
10984 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10985 register names to match the XML descriptions.
10986 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10987 restart register instead of $0.
10988
109892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10990 Markus Deuling <deuling@de.ibm.com>
10991
10992 * remote-utils.c (decode_xfer_write): New function.
10993 * server.h (decode_xfer_write): Add prototype.
10994 * server.c (handle_query): Add PACKET_LEN argument. Support
10995 qXfer:spu:read and qXfer:spu:write packets.
10996 (main): Pass packet_len to handle_query.
10997 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10998 * target.h (target_ops): Add qxfer_spu.
10999
110002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11001
11002 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11003 accessing non-seekable spufs files.
11004
110052007-05-16 Markus Deuling <deuling@de.ibm.com>
11006
11007 * server.c (handle_query): Add reply for qC packet.
11008
110092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11010 Leo Zayas <lerele@champenstudios@com>
11011
11012 * server.h (check_remote_input_interrupt_request): New function.
11013 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11014 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11015 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11016 (check_remote_input_interrupt_request): New function.
11017 * server.h (check_remote_input_interrupt_request): Declare.
11018 * win32-low.c (winapi_DebugBreakProcess,
11019 winapi_GenerateConsoleCtrlEvent): New typedefs.
11020 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11021 to 250 ms.
11022 (win32_wait): Check for remote interrupt request
11023 with check_remote_input_interrupt_request.
11024 (win32_request_interrupt): New function.
11025 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11026
110272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11028
11029 * win32-low.c (debug_registers_changed,
11030 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11031 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11032 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11033 (thread_rec): Get context using the low target.
11034 (child_add_thread): Call thread_added on the low target,
11035 which does the same thing.
11036 (regptr): Delete.
11037 (do_initial_child_stuff): Remove debug registers references.
11038 Set context using the low target. Resume threads after
11039 setting the contexts.
11040 (child_continue): Remove dead variable. Remove debug
11041 registers references.
11042 (child_fetch_inferior_registers): Go through the low target.
11043 (do_child_store_inferior_registers): Remove.
11044 (child_store_inferior_registers): Go through the low target.
11045 (win32_resume): Remove debug registers references.
11046 Set context using the low target.
11047 (handle_exception): Change return type to void. Don't record
11048 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11049 first chance exception.
11050 (get_child_debug_event): Change return type to void. Remove
11051 goto loop. Always return after waiting for debug event.
11052 (win32_wait): Convert to switch statement. Handle spurious
11053 events.
11054
11055 * win32-i386-low.c (debug_registers_changed,
11056 debug_registers_used): New.
11057 (initial_stuff): Rename to ...
11058 (i386_initial_stuff): ... this. Clear debug registers
11059 state variables.
11060 (store_debug_registers): Delete.
11061 (i386_get_thread_context): New.
11062 (load_debug_registers): Delete.
11063 (i386_set_thread_context): New.
11064 (i386_thread_added): New.
11065 (single_step): Rename to ...
11066 (i386_single_step): ... this.
11067 (do_fetch_inferior_registers): Rename to ...
11068 (i386_fetch_inferior_register): ... this.
11069 (i386_store_inferior_register): New.
11070 (the_low_target): Adapt to new interface.
11071
11072 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11073 (arm_get_thread_context): New.
11074 (arm_set_thread_context): New.
11075 (regptr): New.
11076 (do_fetch_inferior_registers): Rename to ...
11077 (arm_fetch_inferior_register): ... this.
11078 (arm_store_inferior_register): New.
11079 (arm_wince_breakpoint): Reimplement as unsigned long.
11080 (arm_wince_breakpoint_len): Define.
11081 (the_low_target): Adapt to new interface.
11082
11083 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11084 load_debug_registers. Add get_thread_context, set_thread_context,
11085 thread_added and store_inferior_register. Rename
11086 fetch_inferior_registers to fetch_inferior_register.
11087 (regptr): Remove declaration.
11088
110892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11090
11091 * linux-low.c (linux_detach): Change return type to int. Return 0.
11092 * spu-low.c (spu_detach): Likewise.
11093
110942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11095
11096 * target.h (target_ops): Change return type of detach to int.
11097 Add join.
11098 (join_inferior): New.
11099 * server.c (main): Don't skip detach support on mingw32.
11100 If the inferior doesn't support detaching return error.
11101 Call join_inferior instead of using waitpid.
11102 * linux-low.c (linux_join): New.
11103 (linux_target_op): Add linux_join.
11104 * spu-low.c (spu_join): New.
11105 (spu_target_ops): Add spu_join.
11106 * win32-low.c (win32_detach): Adapt to new interface.
11107 Reopen current_process_handle before detaching. Issue a child
11108 resume before detaching.
11109 (win32_join): New.
11110 (win32_target_op): Add win32_join.
11111
111122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11113
11114 * win32-low.c (win32-attach): Fix return value.
11115 * target.h (target_ops): Describe ATTACH return values.
11116
111172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11118
11119 * win32-low.c (GETPROCADDRESS): Define.
11120 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11121 (winapi_DebugSetProcessKillOnExit): Likewise.
11122 (win32_create_inferior): Force usage of ansi CreateProcessA.
11123 (win32_attach): Use GETPROCADDRESS.
11124 (win32_detach): Likewise.
11125
111262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11127
11128 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11129
111302007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11131
11132 * win32-low.c: Commit leftover changes from 2007-03-29.
11133
111342007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11135
11136 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11137 fields short instead of int. Add explicit padding.
11138 (i387_cache_to_fsave): Remove unnecessary casts.
11139 (i387_fsave_to_cache): Doc fix.
11140 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11141
111422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11143
11144 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11145 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11146
111472007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11148
11149 * configure.srv (arm*-*-mingw32ce*): Move near the other
11150 arm targets.
11151
111522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11153
11154 * configure.ac: Add errno checking.
11155 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11156 sys/file.h and malloc.h.
11157 (AC_CHECK_DECLS): Add perror.
11158 (srv_mingwce): Handle.
11159 * configure.srv (i[34567]86-*-cygwin*): Add
11160 win32-i386-low.o to srv_tgtobj.
11161 (i[34567]86-*-mingw*): Likewise.
11162 (arm*-*-mingw32ce*): Add case.
11163 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11164 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11165 [__MINGW32CE__] (strerror): New function.
11166 [__MINGW32CE__] (errno): Define to GetLastError.
11167 [__MINGW32CE__] (COUNTOF): New macro.
11168 (remote_open): Remove extra close call.
11169 * mem-break.c (delete_breakpoint_at): New function.
11170 * mem-break.h (delete_breakpoint_at): Declare.
11171 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11172 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11173 [USE_WIN32API] (read, write): Add char* casts.
11174 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11175 * server.h: Include wincecompat.h on Windows CE.
11176 [HAVE_ERRNO_H]: Check.
11177 (perror): Declare if not declared.
11178 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11179 (perror_with_name): Remove errno declaration.
11180 * wincecompat.h: New.
11181 * wincecompat.c: New.
11182 * win32-low.h: New.
11183 * win32-arm-low.c: New.
11184 * win32-i386-low.c: New.
11185 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11186 (OUTMSG2): Make it safe.
11187 (_T): New macro.
11188 (COUNTOF): New macro.
11189 (NUM_REGS): Get it from the low target.
11190 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11191 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11192 (thread_rec): Let low target handle debug registers.
11193 (child_add_thread): Likewise.
11194 (child_init_thread_list): Likewise.
11195 (continue_one_thread): Likewise.
11196 (regptr): New.
11197 (do_child_fetch_inferior_registers): Move to ...
11198 * win32-i386-low.c: ... here, and rename to ...
11199 (do_fetch_inferior_registers): ... this.
11200 * win32-low.c (child_fetch_inferior_registers):
11201 Go through the low target.
11202 (do_child_store_inferior_registers): Use regptr.
11203 (strwinerror): New function.
11204 (win32_create_inferior): Handle Windows CE.
11205 Use strwinerror instead of strerror on Windows error
11206 codes. Add program to the error output.
11207 Don't close the main thread handle on Windows CE.
11208 (win32_attach): Use coredll.dll on Windows CE.
11209 (win32_kill): Close current process and current
11210 thread handles.
11211 (win32_detach): Use coredll.dll on Windows CE.
11212 (win32_resume): Let low target handle debug registers, and
11213 step request.
11214 (handle_exception): Add/Remove initial breakpoint. Avoid
11215 non-existant WSTOPSIG on Windows CE.
11216 (win32_read_inferior_memory): Cast to remove warning.
11217 (win32_arch_string): Go through the low target.
11218 (initialize_low): Call set_breakpoint_data with the low
11219 target's breakpoint.
11220 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11221 FOP_REGNUM, mappings): Move to ...
11222 * win32-i386-low.c: ... here.
11223 * win32-low.c (win32_thread_info): Move to ...
11224 * win32-low.h: ... here.
11225 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11226 win32-arm-low.c and wincecompat.c.
11227 (all:): Add $EXEEXT.
11228 (install-only:): Likewise.
11229 (gdbserver:): Likewise.
11230 (gdbreplay:): Likewise.
11231 * config.in: Regenerate.
11232 * configure: Regenerate.
11233
112342007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11235
11236 * win32-low.c: Rename typedef thread_info to
11237 win32_thread_info throughout.
11238
112392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11240
11241 * win32-i386-low.c: Rename to ...
11242 * win32-low.c: ... this.
11243 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11244 * Makefile.in: Likewise.
11245
112462007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11247
11248 * remote-utils.c (monitor_output): Constify msg parameter.
11249 * server.h (monitor_output): Likewise.
11250 * win32-i386-low.c (handle_output_debug_string): New.
11251 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11252 handle_output_debug_string.
11253 (get_child_debug_event): Likewise.
11254
112552007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11256
11257 * server.c (main): Correct strtoul check.
11258
112592007-03-27 Jon Ringle <jon@ringle.org>
11260
11261 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11262
112632007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11264
11265 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11266
112672007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11268
11269 * terminal.h: Check HAVE_SGTTY_H.
11270
112712007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11272
11273 * remote-utils.c (remote_open): Print out the assigned port number.
11274
112752007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11276
11277 * remote-utils.c (monitor_output): New function.
11278 * server.c (debug_threads): Define here.
11279 (monitor_show_help): New function.
11280 (handle_query): Handle qRcmd.
11281 (main): Do not handle 'd' packet.
11282 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11283 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11284 of debug_threads.
11285
112862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11287
11288 * Makefile.in (EXEEXT): New.
11289 (clean): Use $(EXEEXT).
11290
112912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11292
11293 * target.h (target_ops): Rename send_signal to request_interrupt,
11294 and remove enum target_signal parameter.
11295 * linux-low.c (linux_request_interrupt): Rename from
11296 linux_send_signal, and always send SIGINT.
11297 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11298 and always send SIGINT.
11299 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11300 of send_signal.
11301 (input_interrupt): Likewise.
11302
113032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11304
11305 * server.c (get_features_xml): Check if target implemented
11306 arch_string.
11307 * win32-i386-low.c (win32_arch_string): New.
11308 (win32_target_ops): Add win32_arch_string as arch_string member.
11309
113102007-02-22 Markus Deuling <deuling@de.ibm.com>
11311
11312 * spu-low.c (spu_arch_string): New.
11313 (spu_target_ops): Add spu_arch_string.
11314
113152007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11318 * configure.ac: Do not check for terminal.h.
11319 * configure, config.in: Regenerated.
11320
113212007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * Makefile.in (OBS): Add $(XML_BUILTIN).
11324 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11325 (clean): Update.
11326 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11327 (arm-with-iwmmxt.c): New.
11328 * config.in, configure: Regenerate.
11329 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11330 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11331 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11332 (arm*-*-linux*): Add iWMMXt and regset support.
11333 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11334 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11335 (arm_store_wmmxregset, target_regsets): New.
11336 * server.c (get_features_xml): Take annex argument. Check builtin
11337 XML documents.
11338 (handle_query): Handle multiple annexes.
11339
113402007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11341
11342 * remote-utils.c [USE_WIN32API] (read, write): Define.
11343 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11344 write.
11345
113462007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11347
11348 * linux-i386-low.c (the_low_target): Set arch_string.
11349 * linux-x86-64-low.c (the_low_target): Likewise.
11350 * linux-low.c (linux_arch_string): New.
11351 (linux_target_ops): Add it.
11352 * linux-low.h (struct linux_target_ops): Add arch_string.
11353 * server.c (write_qxfer_response): Use const void * for DATA.
11354 (get_features_xml): New.
11355 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11356 * target.h (struct target_ops): Add arch_string method.
11357
113582007-01-03 Denis Pilat <denis.pilat@st.com>
11359 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * linux-low.c (linux_kill): Handle being called with no threads.
11362 * win32-i386-low.c (win32_kill): Likewise.
11363 (get_child_debug_event): Clear current_process_handle.
11364
113652006-12-30 Denis PILAT <denis.pilat@st.com>
11366 Daniel Jacobowitz <dan@codesourcery.com>
11367
11368 * remote-utils.c (remote_open): Check the type of specified
11369 serial port devices before opening them.
11370 * server.c (main): Kill the inferior if an error occurs during
11371 the first remote_open.
11372
113732006-12-05 Markus Deuling <deuling@de.ibm.com>
11374
11375 * README: Update supported targets.
11376
113772006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11378
11379 * Makefile.in (clean): Remove reg-mips64.c.
11380 (reg-mips64.c, reg-mips64.o): New rules.
11381 * configure.srv: Handle mips64. Include regset support for mips.
11382 * linux-mips-low.c (union mips_register): New.
11383 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11384 (mips_breakpoint, mips_breakpoint_at): Use int.
11385 (mips_collect_register, mips_supply_register)
11386 (mips_collect_register_32bit, mips_supply_register_32bit)
11387 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11388 (mips_store_fpregset, target_regsets): New.
11389 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11390
113912006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11392
11393 * configure.srv: Add target "spu*-*-*".
11394 * Makefile.in (clean): Remove reg-spu.c.
11395 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11396 * spu-low.c: New file.
11397
113982006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11399
11400 * configure.ac: Correct td_thr_tls_get_addr test.
11401 * configure: Regenerated.
11402
114032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11404
11405 * linux-low.c (linux_wait_for_event): Reformat. Use the
11406 pass_signals array.
11407 * remote-utils.c (decode_address_to_semicolon): New.
11408 * server.c (pass_signals, handle_general_set): New.
11409 (handle_query): Mention QPassSignals for qSupported.
11410 (main): Call handle_general_set.
11411 * server.h (pass_signals, decode_address_to_semicolon): New.
11412
114132006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * server.c (handle_query): Correct error handling for read_auxv.
11416
114172005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11418
11419 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11420 and srv_linux_thread_db to yes.
11421 * linux-s390-low.c (s390_fill_gregset): New function.
11422 (target_regsets): Define data structure.
11423
114242006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11425
11426 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11427 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11428 * config.in, configure: Regenerated.
11429 * inferiors.c (gdb_id_to_thread): New function.
11430 (gdb_id_to_thread_id): Use it.
11431 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11432 * linux-low.h (struct process_info): Add th member.
11433 (thread_db_get_tls_address): New prototype.
11434 * remote-utils.c (decode_address): Make non-static.
11435 * server.c (handle_query): Handle qGetTLSAddr.
11436 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11437 * target.h (struct target_ops): Add get_tls_address.
11438 * thread-db.c (maybe_attach_thread): Save the thread handle.
11439 (thread_db_get_tls_address): New.
11440
114412006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11442
11443 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11444 (linux_resume_one_process): Take a siginfo_t *. Update all
11445 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11446 (struct pending_signals): Add a siginfo_t.
11447 (linux_wait_for_process): Always set last_status.
11448 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11449 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11450 * linux-low.h (struct process_info): Add last_status.
11451
114522006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11453
11454 * remote-utils.c (try_rle): New function.
11455 (putpkt_binary): Use it.
11456
114572006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11460 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11461 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11462 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11463 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11464 point registers.
11465
114662006-08-08 Richard Sandiford <richard@codesourcery.com>
11467
11468 * server.c (terminal_fd): New variable.
11469 (old_foreground_pgrp): Likewise.
11470 (restore_old_foreground_pgrp): New function.
11471 (start_inferior): Record the terminal file descriptor in terminal_fd
11472 and its original foreground group in old_foreground_pgrp. Register
11473 restore_old_foreground_pgrp with atexit().
11474
114752006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * server.c (handle_query): Correct qPart to qXfer.
11478
114792006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11480
11481 * configure.ac: Check for more headers which are missing on
11482 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11483 * configure.srv: Add Cygwin and mingw32.
11484 * remote-utils.c: Don't include headers unconditionally which
11485 are missing on mingw32. Include <winsock.h> for mingw32.
11486 (remote_open): Adjust for mingw32 support. Flush
11487 standard error after writing to it.
11488 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11489 (unblock_async_io, enable_async_io, disable_async_io)
11490 (readchar, getpkt): Update for Winsock support.
11491 (prepare_resume_reply): Expect a protocol signal number.
11492 * server.c: Disable <sys/wait.h> on mingw32.
11493 (start_inferior): Adjust for mingw32 support. Flush
11494 standard error after writing to it.
11495 (attach_inferior): Likewise. Use protocol signal
11496 numbers.
11497 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11498 and names.
11499 * win32-i386-low.c: New file.
11500 * Makefile.in (XM_CLIBS): Set.
11501 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11502 (win32-i386-low.o): New dependency rule.
11503 * linux-low.c (linux_wait): Use target signal numbers.
11504 * target.h (struct target_ops): Doc fix.
11505 * server.h (target_signal_to_name): New prototype.
11506 * gdbreplay.c: Don't include headers unconditionally which
11507 are missing on mingw32. Include <winsock.h> for mingw32.
11508 (remote_close, remote_open): Adjust for Winsock support.
11509 * configure, config.in: Regenerated.
11510
115112006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * server.c (decode_xfer_read, write_qxfer_response): New.
11514 (handle_query): Take a packet length argument. Handle
11515 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11516 the qSupported response.
11517 (main): Update call to handle_query.
11518
115192006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11520
11521 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11522 (putpkt_binary): Renamed from putpkt and adjusted for binary
11523 data.
11524 (putpkt): New wrapper for putpkt_binary.
11525 (readchar): Don't mask off the high bit.
11526 (decode_X_packet): New function.
11527 * server.c (main): Call putpkt_binary if a handler sets the packet
11528 length. Save the length of the incoming packet. Handle 'X'.
11529 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11530
115312006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11532
11533 * server.c (handle_query): Handle qSupported.
11534
115352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11536
11537 * remote-utils.c (all_symbols_looked_up): New variable.
11538 (look_up_one_symbol): Check it.
11539 * server.h (look_up_one_symbol): New declaration.
11540 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11541
115422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * Makefile.in (linux-arm-low.o): Update dependencies.
11545 * linux-arm-low.c: Include "gdb_proc_service.h".
11546 (PTRACE_GET_THREAD_AREA): Define.
11547 (ps_get_thread_area): New function.
11548
115492006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11550
11551 * configure.srv (m68k*-*-uclinux*): New target.
11552 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11553 (linux_resume_one_process): Remove extraneous cast.
11554 (linux_read_offsets): New.
11555 (linux_target_op): Add linux_read_offsets on mmuless systems.
11556 * server.c (handle_query): Add qOffsets logic.
11557 * target.h (struct target_ops): Add read_offsets.
11558
115592006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11560
11561 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11562 (PTRACE_GET_THREAD_AREA): Define.
11563 (ps_get_thread_area): New function.
11564 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11565 (linux-x86-64-low.o): Update.
11566
115672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * configure.ac: Remove checks for prfpregset_t.
11570 * gdb_proc_service.h: New file.
11571 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11572 new "gdb_proc_service.h".
11573 * proc-service.c: Likewise.
11574 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11575 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11576 * Makefile.in (gdb_proc_service_h): Updated.
11577 * configure, config.in: Regenerated.
11578
115792006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11580
11581 * remote-utils.c (prepare_resume_reply): Move declaration
11582 of gdb_id_from_wait to the top of the block.
11583
115842006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11585
11586 * linux-low.c (regsets_store_inferior_registers): Read the regset
11587 from the target before filling it.
11588
115892006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11590
11591 * server.c (attach_inferior): Return SIGTRAP for a successful
11592 attach.
11593
115942006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11595
11596 * Makefile.in (OBS): Add version.o.
11597 (STAGESTUFF): Delete.
11598 (version.o): Add dependencies.
11599 (version.c): Replace rule.
11600 (clean): Remove version.c.
11601 * server.c (gdbserver_version): New.
11602 (gdbserver_usage): Use printf.
11603 (main): Handle --version and --help.
11604 * server.h (version, host_name): Add declarations.
11605
116062005-12-23 Eli Zaretskii <eliz@gnu.org>
11607
11608 * linux-arm-low.c:
11609 * linux-arm-low.c:
11610 * inferiors.c:
11611 * i387-fp.h:
11612 * i387-fp.c:
11613 * gdbreplay.c:
11614 * regcache.c:
11615 * proc-service.c:
11616 * mem-break.h:
11617 * mem-break.c:
11618 * linux-x86-64-low.c:
11619 * linux-sh-low.c:
11620 * linux-s390-low.c:
11621 * linux-ppc64-low.c:
11622 * linux-ppc-low.c:
11623 * linux-mips-low.c:
11624 * linux-m68k-low.c:
11625 * linux-m32r-low.c:
11626 * linux-low.h:
11627 * linux-low.c:
11628 * linux-ia64-low.c:
11629 * linux-i386-low.c:
11630 * linux-crisv32-low.c:
11631 * thread-db.c:
11632 * terminal.h:
11633 * target.h:
11634 * target.c:
11635 * server.h:
11636 * server.c:
11637 * remote-utils.c:
11638 * regcache.h:
11639 * utils.c:
11640 * Makefile.in:
11641 * configure.ac:
11642 * gdbserver.1: Add (C) after Copyright. Update the FSF
11643 address.
11644
116452005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11646
11647 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11648 (arm_breakpoint_at): Recognize both breakpoints.
11649 (the_low_target): Use the correct breakpoint instruction.
11650
116512005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11654 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11655 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11656 (the_low_target): Update.
11657
116582005-10-25 Andreas Schwab <schwab@suse.de>
11659
11660 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11661
11662 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11663 (ia64_num_regs): Reduce to 462.
11664
116652005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * acinclude.m4: Correct quoting.
11668 * aclocal.m4: Regenerated.
11669
11670 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11671 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11672 (thread_db_init): Call thread_db_err_str.
11673 * configure.ac: Check for TD_VERSION.
11674 * config.in, configure: Regenerated.
11675
116762005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11677
11678 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11679
116802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11681
11682 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11683 is not available. Define HAVE_PTRACE_GETREGS if it is.
11684 * config.in, configure: Regenerated.
11685 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11686 * linux-i386-low.c, linux-m68k-low.c: Update to use
11687 HAVE_PTRACE_GETREGS.
11688 * linux-low.c (regsets_fetch_inferior_registers)
11689 (regsets_store_inferior_registers): Only return 0 if we processed
11690 GENERAL_REGS.
11691 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11692 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11693
116942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11695
11696 * inferiors.c (struct thread_info): Add gdb_id.
11697 (add_thread): Add gdb_id argument.
11698 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11699 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11700 calls to add_thread.
11701 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11702 * server.c (handle_query): Use thread_to_gdb_id.
11703 (handle_v_cont, main): Use gdb_id_to_thread_id.
11704 * server.h (add_thread): Update prototype.
11705 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11706 prototypes.
11707
117082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11711 left-padded registers.
11712 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11713 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11714
117152005-07-01 Steve Ellcey <sje@cup.hp.com>
11716
11717 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11718 * configure: Regenerate.
11719 * config.in: Regenerate.
11720 * server.h (NEED_DECLARATION_STRERROR):
11721 Replace with !HAVE_DECL_STRERROR.
11722
117232005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * linux-low.c (linux_wait, linux_send_signal): Don't test
11726 an unsigned long variable for > 0 if it could be MAX_ULONG.
11727 * server.c (myresume): Likewise.
11728 * target.c (set_desired_inferior): Likewise.
11729
117302005-06-13 Mark Kettenis <kettenis@gnu.org>
11731
11732 * configure.ac: Simplify and improve check for socklen_t.
11733 * configure, config.in: Regenerate.
11734
117352005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * acconfig.h: Remove.
11738 * configure.ac: Add a test for socklen_t. Use three-argument
11739 AC_DEFINE throughout.
11740 * config.in: Regenerated using autoheader 2.59.
11741 * configure: Regenerated.
11742
11743 * gdbreplay.c (socklen_t): Provide a default.
11744 (remote_open): Use socklen_t.
11745 * remote-utils.c (socklen_t): Provide a default.
11746 (remote_open): Use socklen_t.
11747 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11748 unsigned char.
11749
11750 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11751 char for buffers.
11752 * linux-low.c (linux_read_memory, linux_write_memory)
11753 (linux_read_auxv): Likewise.
11754 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11755 (check_mem_write): Likewise.
11756 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11757 Likewise.
11758 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11759 (registers_from_string, register_data): Likewise.
11760 * server.c (handle_query, main): Likewise.
11761 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11762 (decode_M_packet): Likewise.
11763 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11764 * target.h (struct target_ops): Update read_memory, write_memory,
11765 and read_auxv.
11766 (read_inferior_memory, write_inferior_memory): Update.
11767 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11768 to unsigned char *.
11769 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11770 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11771 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11772 linux-s390-low.c, linux-sh-low.c: Update for changes in
11773 read_inferior_memory and the_low_target->breakpoint.
11774
117752005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11776
11777 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11778 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11779 * configure.srv: Add powerpc64-*-linux*.
11780 * linux-ppc64-low.c: New file.
11781
117822005-05-23 Orjan Friberg <orjanf@axis.com>
11783
11784 * linux-cris-low.c: New file with support for CRIS.
11785 * linux-crisv32-low.c: Ditto for CRISv32.
11786 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11787 (clean): Add reg-cris.c and reg-crisv32.c.
11788 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11789 reg-crisv32.o, and reg-crisv32.c to make rules.
11790 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11791 recognized targets.
11792
117932005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11794
11795 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11796 of sizeof (PTRACE_XFER_TYPE).
11797 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11798
117992005-05-12 Orjan Friberg <orjanf@axis.com>
11800
11801 * target.h (struct target_ops): Add insert_watchpoint,
11802 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11803 pointers for hardware watchpoint support.
11804 * linux-low.h (struct linux_target_ops): Ditto.
11805 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11806 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11807 to linux_target_ops.
11808 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11809 reply packet.
11810 * server.c (main): Recognize 'Z' and 'z' packets.
11811
118122005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11813
11814 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11815 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11816 (the_low_target): Add new members.
11817
118182005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11819
11820 * proc-service.c (ps_lgetregs): Search all_processes instead of
11821 all_threads.
11822
118232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11824
11825 * server.c (start_inferior): Change return type to int.
11826 (attach_inferior): Change sigptr to int *.
11827 (handle_v_cont, handle_v_requests): Change signal to int *.
11828 (main): Change signal to int.
11829
118302005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11831
11832 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11833 * configure.srv: Add m32r*-*-linux*.
11834 * linux-m32r-low.c: New file.
11835
118362005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11837
11838 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11839
118402005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11843 Take unsigned long arguments for PIDs.
11844 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11845 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11846 (wait_for_sigstop, linux_resume_one_process)
11847 (regsets_fetch_inferior_registers, linux_send_signal)
11848 (linux_read_auxv): Likewise. Update the types of variables holding
11849 PIDs. Update format string specifiers.
11850 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11851 * remote-utils.c (prepare_resume_reply): Likewise.
11852 * server.c (cont_thread, general_thread, step_thread)
11853 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11854 unsigned long.
11855 (handle_query): Update format specifiers.
11856 (handle_v_cont, main): Use strtoul for thread IDs.
11857 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11858 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11859 (general_thread, step_thread, thread_from_wait)
11860 (old_thread_from_wait): Update.
11861 * target.h (struct thread_resume): Use unsigned long for THREAD.
11862 (struct target_ops): Use unsigned long for arguments to attach and
11863 thread_alive.
11864
118652005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11866
11867 * acinclude.m4: Include bfd/bfd.m4 directly.
11868 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11869 <agriffis@toolchain.org>.
11870 * aclocal.m4, configure: Regenerated.
11871
118722005-01-07 Andrew Cagney <cagney@gnu.org>
11873
11874 * configure.ac: Rename configure.in, require autoconf 2.59.
11875 * configure: Re-generate.
11876
118772004-12-08 Daniel Jacobowitz <dan@debian.org>
11878
11879 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11880 LIBS when finished.
11881 * aclocal.m4: Regenerated.
11882 * configure: Regenerated.
11883
118842004-11-21 Andreas Schwab <schwab@suse.de>
11885
11886 * linux-m68k-low.c (m68k_num_gregs): Define.
11887 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11888 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11889 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11890 (m68k_breakpoint_at): New. Add to the_low_target.
11891
11892 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11893 srv_linux_thread_db to yes.
11894
118952004-10-20 Joel Brobecker <brobecker@gnat.com>
11896
11897 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11898 (ARCH_SET_FS): Likewise.
11899 (ARCH_GET_FS): Likewise.
11900 (ARCH_GET_GS): Likewise.
11901
119022004-10-16 Daniel Jacobowitz <dan@debian.org>
11903
11904 * linux-i386-low.c (ps_get_thread_area): New.
11905 * linux-x86-64-low.c (ps_get_thread_area): New.
11906 * linux-low.c: Include <sys/syscall.h>.
11907 (linux_kill_one_process): Don't kill the first thread here.
11908 (linux_kill): Kill the first thread here.
11909 (kill_lwp): New function.
11910 (send_sigstop, linux_send_signal): Use it.
11911 * proc-service.c: Clean up #ifdefs.
11912 (fpregset_info): Delete.
11913 (ps_lgetregs): Update and enable implementation.
11914 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11915 implementations.
11916 * remote-utils.c (struct sym_cache, symbol_cache): New.
11917 (input_interrupt): Print a clearer message.
11918 (async_io_enabled): New variable.
11919 (enable_async_io, disable_async_io): Use it. Update comments.
11920 (look_up_one_symbol): Use the symbol cache.
11921 * thread-db.c (thread_db_look_up_symbols): New function.
11922 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11923
119242004-10-16 Daniel Jacobowitz <dan@debian.org>
11925
11926 * configure.in: Test for -rdynamic.
11927 * configure: Regenerated.
11928 * Makefile (INTERNAL_LDFLAGS): New.
11929 (gdbserver, gdbreplay): Use it.
11930
119312004-09-02 Andrew Cagney <cagney@gnu.org>
11932
11933 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11934
119352004-03-23 Daniel Jacobowitz <drow@mvista.com>
11936
11937 * linux-low.c (linux_wait): Clear all_processes list also.
11938
119392004-03-12 Daniel Jacobowitz <drow@mvista.com>
11940
11941 * linux-low.c: Include <errno.h>. Remove extern declaration of
11942 errno.
11943
119442004-03-12 Daniel Jacobowitz <drow@mvista.com>
11945
11946 * gdbreplay.c, server.h, utils.c: Update copyright years.
11947
119482004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11949
11950 * server.c (main): Print child status or termination signal from
11951 variable 'signal', not 'sig'.
11952
119532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11954
11955 * linux-low.c (linux_read_memory): Change return type to
11956 int. Check for and return error from ptrace().
11957 * target.c (read_inferior_memory): Change return type to int. Pass
11958 back return status from the_target->read_memory().
11959 * target.h (struct target_ops): Adapt *read_memory() prototype.
11960 Update comment.
11961 (read_inferior_memory): Adapt prototype.
11962 * server.c (main): Return an error packet if
11963 read_inferior_memory() returns an error.
11964
119652004-03-04 Daniel Jacobowitz <drow@mvista.com>
11966
11967 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11968 Unify with other clean targets.
11969
119702004-02-29 Daniel Jacobowitz <drow@mvista.com>
11971
11972 * server.c (handle_v_cont): Call set_desired_inferior.
11973
119742004-02-29 Daniel Jacobowitz <drow@mvista.com>
11975
11976 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11977
119782004-02-29 Daniel Jacobowitz <drow@mvista.com>
11979
11980 * linux-low.c (linux_wait): Unblock async I/O.
11981 (linux_resume): Block and enable async I/O.
11982 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11983 * server.h (block_async_io, unblock_async_io): Add prototypes.
11984
119852004-02-29 Daniel Jacobowitz <drow@mvista.com>
11986
11987 * remote-utils.c (remote_open): Print a status notice after
11988 opening a TCP port.
11989 * server.c (attach_inferior): Print a status notice after
11990 attaching.
11991
119922004-02-29 Daniel Jacobowitz <drow@mvista.com>
11993
11994 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11995
119962004-02-26 Daniel Jacobowitz <drow@mvista.com>
11997
11998 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11999 error packet.
12000 * server.c, target.h: Update copyright years.
12001
120022004-02-25 Roland McGrath <roland@redhat.com>
12003
12004 * target.h (struct target_ops): New member `read_auxv'.
12005 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12006 * linux-low.c (linux_read_auxv): New function.
12007 (linux_target_ops): Initialize `read_auxv' member to that.
12008
120092004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12010
12011 Committed by Jim Blandy <jimb@redhat.com>.
12012
12013 * linux-s390-low.c (s390_num_regs): Update.
12014 (s390_regmap): Remove control registers. Use __s390x__ predefine
12015 instead of GPR_SIZE to distiguish s390 and s390x targets.
12016
120172004-01-31 Daniel Jacobowitz <drow@mvista.com>
12018
12019 * linux-low.c: Update copyright year.
12020 (check_removed_breakpoint): Clear pending_is_breakpoint.
12021 (linux_set_resume_request, linux_queue_one_thread)
12022 (resume_status_pending_p): New functions.
12023 (linux_continue_one_thread): Use process->resume.
12024 (linux_resume): Only resume threads if there are no pending events.
12025 * linux-low.h (struct process_info): Add resume request
12026 pointer.
12027
120282004-01-30 Daniel Jacobowitz <drow@mvista.com>
12029
12030 * regcache.c (new_register_cache): Clear the allocated register
12031 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12032
120332003-10-13 Daniel Jacobowitz <drow@mvista.com>
12034
12035 * linux-low.c (linux_resume): Take a struct thread_resume *
12036 argument.
12037 (linux_wait): Update call.
12038 (resume_ptr): New static variable.
12039 (linux_continue_one_thread): Renamed from
12040 linux_continue_one_process. Use resume_ptr.
12041 (linux_resume): Use linux_continue_one_thread.
12042 * server.c (handle_v_cont, handle_v_requests): New functions.
12043 (myresume): New function.
12044 (main): Handle 'v' case.
12045 * target.h (struct thread_resume): New type.
12046 (struct target_ops): Change argument of "resume" to struct
12047 thread_resume *.
12048 (myresume): Delete macro.
12049
120502003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12051
12052 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12053 (uninstall): Support DESTDIR.
12054
12055Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12056
12057 * configure.srv: Add xscale*linux copy of arm*linux entry.
12058
120592003-07-24 Daniel Jacobowitz <drow@mvista.com>
12060
12061 * linux-arm-low.c (arm_reinsert_addr): New function.
12062 (the_low_target): Add arm_reinsert_addr.
12063
120642003-07-08 Mark Kettenis <kettenis@gnu.org>
12065
12066 * mem-break.c: Remove whitespace at end of file.
12067
120682003-06-28 Daniel Jacobowitz <drow@mvista.com>
12069
12070 * configure.in: Check whether we need to prototype strerror.
12071 * server.h: Optionally prototype strerror.
12072 * gdbreplay.c (perror_with_name): Use strerror.
12073 * linux-low.c (linux_attach_lwp): Use strerror.
12074 * utils.c (perror_with_name): Use strerror.
12075 * config.in, configure: Regenerated.
12076
120772003-06-28 Daniel Jacobowitz <drow@mvista.com>
12078
12079 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12080 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12081
120822003-06-20 Daniel Jacobowitz <drow@mvista.com>
12083
12084 * Makefile.in (SFILES): Update.
12085 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12086 low-sun3.c: Remove files.
12087
120882003-06-17 Daniel Jacobowitz <drow@mvista.com>
12089
12090 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12091 (linux_detach_one_process, linux_detach): New functions.
12092 (linux_target_ops): Add linux_detach.
12093 * server.c (main): Handle 'D' packet.
12094 * target.h (struct target_ops): Add "detach" member.
12095 (detach_inferior): Define.
12096
120972003-06-13 Mark Kettenis <kettenis@gnu.org>
12098
12099 From Kelley Cook <kelleycook@wideopenwest.com>:
12100 * configure.srv: Accept i[34567]86 variants.
12101
121022003-06-05 Daniel Jacobowitz <drow@mvista.com>
12103
12104 * linux-low.c (linux_wait_for_event): Correct comment typos.
12105 (linux_resume_one_process): Call check_removed_breakpoint.
12106 (linux_send_signal): New function.
12107 (linux_target_ops): Add linux_send_signal.
12108 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12109 of kill.
12110 * target.h (struct target_ops): Add send_signal.
12111
121122003-05-29 Jim Blandy <jimb@redhat.com>
12113
12114 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12115 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12116 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12117 away part of the register's value.
12118
121192003-03-26 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12122 (linux_wait_for_event, linux_init_signals): Likewise.
12123
121242003-03-17 Daniel Jacobowitz <drow@mvista.com>
12125
12126 * configure.in: Check for stdlib.h.
12127 * configure: Regenerated.
12128 * config.in: Regenerated.
12129
121302003-01-04 Andreas Schwab <schwab@suse.de>
12131
12132 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12133
121342003-01-02 Andrew Cagney <ac131313@redhat.com>
12135
12136 * Makefile.in: Remove obsolete code.
12137
121382002-11-20 Daniel Jacobowitz <drow@mvista.com>
12139
12140 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12141 defined(PT_FPR0_HI).
12142
121432002-11-17 Stuart Hughes <seh@zee2.com>
12144
12145 * linux-arm-low.c (arm_num_regs): Increase.
12146 (arm_regmap): Include status register.
12147
121482002-11-17 Daniel Jacobowitz <drow@mvista.com>
12149
12150 * linux-low.c (register_addr): Remove incorrect -1 check.
12151
121522002-08-29 Daniel Jacobowitz <drow@mvista.com>
12153
12154 * linux-low.c (linux_create_inferior): Call setpgid. Return
12155 the new PID.
12156 (unstopped_p, linux_signal_pid): Remove.
12157 (linux_target_ops): Remove linux_signal_pid.
12158 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12159 global instead of target method.
12160 * target.h (struct target_ops): Remove signal_pid. Update comment
12161 for create_inferior.
12162 * server.c (signal_pid): New variable.
12163 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12164 gdbserver. Set the child to be the foreground process group.
12165 (attach_inferior): Set signal_pid.
12166
121672002-08-23 Daniel Jacobowitz <drow@mvista.com>
12168
12169 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12170
121712002-08-20 Jim Blandy <jimb@redhat.com>
12172
12173 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12174 default for this.
12175
121762002-08-01 Andrew Cagney <cagney@redhat.com>
12177
12178 * Makefile.in: Make chill references obsolete.
12179
121802002-07-24 Kevin Buettner <kevinb@redhat.com>
12181
12182 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12183 * configure: Regenerate.
12184 * config.in: Regenerate.
12185
121862002-07-09 David O'Brien <obrien@FreeBSD.org>
12187
12188 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12189 (perror_with_name, remote_close, remote_open, expect, play): Static.
12190
121912002-07-04 Michal Ludvig <mludvig@suse.cz>
12192
12193 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12194 byte offsets instead of an array of indexes.
12195 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12196
121972002-06-13 Daniel Jacobowitz <drow@mvista.com>
12198
12199 * regcache.c: Add comment.
12200
122012002-06-11 Daniel Jacobowitz <drow@mvista.com>
12202
12203 * thread-db.c: New file.
12204 * proc-service.c: New file.
12205 * acinclude.m4: New file.
12206 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12207 proc-service.o, and thread-db.o.
12208 (linux-low.o): Add USE_THREAD_DB.
12209 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12210 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12211 * aclocal.m4: Regenerated.
12212 * config.in: Regenerated.
12213 * configure: Regenerated.
12214 * configure.in: Check for proc_service.h, sys/procfs.h,
12215 thread_db.h, and linux/elf.h headrs.
12216 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12217 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12218 Check for -lthread_db and thread support.
12219 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12220 PowerPC, and SuperH.
12221 * i387-fp.c: Constify arguments.
12222 * i387-fp.h: Likewise.
12223 * inferiors.c: (struct thread_info): Renamed from
12224 `struct inferior_info'. Remove PID member. Use generic inferior
12225 list header. All uses updated.
12226 (inferiors, signal_pid): Removed.
12227 (all_threads): New variable.
12228 (get_thread): Define.
12229 (add_inferior_to_list): New function.
12230 (for_each_inferior): New function.
12231 (change_inferior_id): New function.
12232 (add_inferior): Removed.
12233 (remove_inferior): New function.
12234 (add_thread): New function.
12235 (free_one_thread): New function.
12236 (remove_thread): New function.
12237 (clear_inferiors): Use for_each_inferior and free_one_thread.
12238 (find_inferior): New function.
12239 (find_inferior_id): New function.
12240 (inferior_target_data): Update argument type.
12241 (set_inferior_target_data): Likewise.
12242 (inferior_regcache_data): Likewise.
12243 (set_inferior_regcache_data): Likewise.
12244 * linux-low.c (linux_bp_reinsert): Remove.
12245 (all_processes, stopping_threads, using_thrads)
12246 (struct pending_signals, debug_threads, pid_of): New.
12247 (inferior_pid): Replace with macro.
12248 (struct inferior_linux_data): Remove.
12249 (get_stop_pc, add_process): New functions.
12250 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12251 Use add_process and add_thread.
12252 (linux_attach_lwp): New function, based on old linux_attach. Use
12253 add_process and add_thread. Set stop_expected for new threads.
12254 (linux_attach): New function.
12255 (linux_kill_one_process): New function.
12256 (linux_kill): Kill all LWPs.
12257 (linux_thread_alive): Use find_inferior_id.
12258 (check_removed_breakpoints, status_pending_p): New functions.
12259 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12260 Update. Use WNOHANG. Wait for cloned processes also. Update process
12261 struct for the found process.
12262 (linux_wait_for_event): New function.
12263 (linux_wait): Use it. Support LWPs.
12264 (send_sigstop, wait_for_sigstop, stop_all_processes)
12265 (linux_resume_one_process, linux_continue_one_process): New functions.
12266 (linux_resume): Support LWPs.
12267 (REGISTER_RAW_SIZE): Remove.
12268 (fetch_register): Use register_size instead. Call supply_register.
12269 (usr_store_inferior_registers): Likewise. Call collect_register.
12270 Fix recursive case.
12271 (regsets_fetch_inferior_registers): Improve error message.
12272 (regsets_store_inferior_registers): Add debugging.
12273 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12274 (unstopped_p, linux_signal_pid): New functions.
12275 (linux_target_ops): Add linux_signal_pid.
12276 (linux_init_signals): New function.
12277 (initialize_low): Call it. Initialize using_threads.
12278 * regcache.c (inferior_regcache_data): Add valid
12279 flag.
12280 (get_regcache): Fetch registers lazily. Add fetch argument
12281 and update all callers.
12282 (regcache_invalidate_one, regcache_invalidate): New
12283 functions.
12284 (new_register_cache): Renamed from create_register_cache.
12285 Return the new regcache.
12286 (free_register_cache): Change argument to a void *.
12287 (registers_to_string, registers_from_string): Call get_regcache
12288 with fetch flag set.
12289 (register_data): Make static. Pass fetch flag to get_regcache.
12290 (supply_register): Call get_regcache with fetch flag clear.
12291 (collect_register): Call get_regcache with fetch flag set.
12292 (collect_register_as_string): New function.
12293 * regcache.h: Update.
12294 * remote-utils.c (putpkt): Flush after debug output and use
12295 stderr.
12296 Handle input interrupts while waiting for an ACK.
12297 (input_interrupt): Use signal_pid method.
12298 (getpkt): Flush after debug output and use stderr.
12299 (outreg): Use collect_register_as_string.
12300 (new_thread_notify, dead_thread_notify): New functions.
12301 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12302 and general_thread.
12303 (look_up_one_symbol): Flush after debug output.
12304 * server.c (step_thread, server_waiting): New variables.
12305 (start_inferior): Don't use signal_pid. Update call to mywait.
12306 (attach_inferior): Update call to mywait.
12307 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12308 (main): Don't fetch/store registers explicitly. Use
12309 set_desired_inferior. Support proposed ``Hs'' packet. Update
12310 calls to mywait.
12311 * server.h: Update.
12312 (struct inferior_list, struct_inferior_list_entry): New.
12313 * target.c (set_desired_inferior): New.
12314 (write_inferior_memory): Constify.
12315 (mywait): New function.
12316 * target.h: Update.
12317 (struct target_ops): New signal_pid method.
12318 (mywait): Removed macro, added prototype.
12319
12320 * linux-low.h (regset_func): Removed.
12321 (regset_fill_func, regset_store_func): New.
12322 (enum regset_type): New.
12323 (struct regset_info): Add type field. Use new operation types.
12324 (struct linux_target_ops): stop_pc renamed to get_pc.
12325 Add decr_pc_after_break and breakpoint_at.
12326 (get_process, get_thread_proess, get_process_thread)
12327 (strut process_info, all_processes, linux_attach_lwp)
12328 (thread_db_init): New.
12329
12330 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12331 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12332 (the_low_target): Add new members.
12333 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12334 (i386_store_fpxregset): Constify.
12335 (target_regsets): Add new kind identifier.
12336 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12337 (i386_set_pc): Add debugging.
12338 (i386_breakpoint_at): New function.
12339 (the_low_target): Add new members.
12340 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12341 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12342 (mips_breakpoint_at): New.
12343 (the_low_target): Add new members.
12344 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12345 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12346 (the_low_target): Add new members.
12347 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12348 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12349 (the_low_target): Add new members.
12350 * linux-x86-64-low.c (target_regsets): Add new kind
12351 identifier.
12352
123532002-05-15 Daniel Jacobowitz <drow@mvista.com>
12354
12355 From Martin Pool <mbp@samba.org>:
12356 * server.c (gdbserver_usage): New function.
12357 (main): Call it.
12358
123592002-05-14 Daniel Jacobowitz <drow@mvista.com>
12360
12361 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12362 stop_at -> stop_pc.
12363
123642002-05-04 Andrew Cagney <ac131313@redhat.com>
12365
12366 * Makefile.in: Remove obsolete code.
12367
123682002-04-24 Michal Ludvig <mludvig@suse.cz>
12369
12370 * linux-low.c (regsets_fetch_inferior_registers),
12371 (regsets_store_inferior_registers): Removed cast to int from
12372 ptrace() calls.
12373 * regcache.h: Added declaration of struct inferior_info.
12374
123752002-04-20 Daniel Jacobowitz <drow@mvista.com>
12376
12377 * inferiors.c (struct inferior_info): Add regcache_data.
12378 (add_inferior): Call create_register_cache.
12379 (clear_inferiors): Call free_register_cache.
12380 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12381 * regcache.c (struct inferior_regcache_data): New.
12382 (registers): Remove.
12383 (get_regcache): New function.
12384 (create_register_cache, free_register_cache): New functions.
12385 (set_register_cache): Don't initialize the register cache here.
12386 (registers_to_string, registers_from_string, register_data): Call
12387 get_regcache.
12388 * regcache.h: Add prototypes.
12389 * server.h: Likewise.
12390
123912002-04-20 Daniel Jacobowitz <drow@mvista.com>
12392
12393 * mem-break.c: New file.
12394 * mem-break.h: New file.
12395 * Makefile.in: Add mem-break.o rule; update server.h
12396 dependencies.
12397 * inferiors.c (struct inferior_info): Add target_data
12398 member.
12399 (clear_inferiors): Free target_data member if set.
12400 (inferior_target_data, set_inferior_target_data): New functions.
12401 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12402 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12403 * linux-low.c (linux_bp_reinsert): New variable.
12404 (struct inferior_linux_data): New.
12405 (linux_create_inferior): Use set_inferior_target_data.
12406 (linux_attach): Likewise. Call add_inferior.
12407 (linux_wait_for_one_inferior): New function.
12408 (linux_wait): Call it.
12409 (linux_write_memory): Add const.
12410 (initialize_low): Call set_breakpoint_data.
12411 * linux-low.h (struct linux_target_ops): Add breakpoint
12412 handling members.
12413 * server.c (attach_inferior): Remove extra add_inferior
12414 call.
12415 * server.h: Include mem-break.h. Update inferior.c
12416 prototypes.
12417 * target.c (read_inferior_memory)
12418 (write_inferior_memory): New functions.
12419 * target.h (read_inferior_memory)
12420 (write_inferior_memory): Change macros to prototypes.
12421 (struct target_ops): Update comments. Add const to write_memory
12422 definition.
12423
124242002-04-11 Daniel Jacobowitz <drow@mvista.com>
12425
12426 * linux-low.c (usr_store_inferior_registers): Support
12427 registers which are allowed to fail to store.
12428 * linux-low.h (linux_target_ops): Likewise.
12429 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12430 (ppc_cannot_store_register): FPSCR may not be storable.
12431
124322002-04-09 Daniel Jacobowitz <drow@mvista.com>
12433
12434 * server.h: Include <string.h> if HAVE_STRING_H.
12435 * ChangeLog: Correct paths in last ChangeLog entry.
12436
124372002-04-09 Daniel Jacobowitz <drow@mvista.com>
12438
12439 * linux-low.h: Remove obsolete prototypes.
12440 (struct linux_target_ops): New.
12441 (extern the_low_target): New.
12442 * linux-low.c (num_regs, regmap): Remove declarations.
12443 (register_addr): Use the_low_target explicitly.
12444 (fetch_register): Likewise.
12445 (usr_fetch_inferior_registers): Likewise.
12446 (usr_store_inferior_registers): Likewise.
12447 * linux-arm-low.c (num_regs): Remove.
12448 (arm_num_regs): Define.
12449 (arm_regmap): Renamed from regmap, made static.
12450 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12451 made static.
12452 (arm_cannot_store_register): Renamed from cannot_store_register,
12453 made static.
12454 (the_low_target): New.
12455 * linux-i386-low.c (num_regs): Remove.
12456 (i386_num_regs): Define.
12457 (i386_regmap): Renamed from regmap, made static.
12458 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12459 made static.
12460 (i386_cannot_store_register): Renamed from cannot_store_register,
12461 made static.
12462 (the_low_target): New.
12463 * linux-ia64-low.c (num_regs): Remove.
12464 (ia64_num_regs): Define.
12465 (ia64_regmap): Renamed from regmap, made static.
12466 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12467 made static.
12468 (ia64_cannot_store_register): Renamed from cannot_store_register,
12469 made static.
12470 (the_low_target): New.
12471 * linux-m68k-low.c (num_regs): Remove.
12472 (m68k_num_regs): Define.
12473 (m68k_regmap): Renamed from regmap, made static.
12474 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12475 made static.
12476 (m68k_cannot_store_register): Renamed from cannot_store_register,
12477 made static.
12478 (the_low_target): New.
12479 * linux-mips-low.c (num_regs): Remove.
12480 (mips_num_regs): Define.
12481 (mips_regmap): Renamed from regmap, made static.
12482 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12483 made static.
12484 (mips_cannot_store_register): Renamed from cannot_store_register,
12485 made static.
12486 (the_low_target): New.
12487 * linux-ppc-low.c (num_regs): Remove.
12488 (ppc_num_regs): Define.
12489 (ppc_regmap): Renamed from regmap, made static.
12490 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12491 made static.
12492 (ppc_cannot_store_register): Renamed from cannot_store_register,
12493 made static.
12494 (the_low_target): New.
12495 * linux-s390-low.c (num_regs): Remove.
12496 (s390_num_regs): Define.
12497 (s390_regmap): Renamed from regmap, made static.
12498 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12499 made static.
12500 (s390_cannot_store_register): Renamed from cannot_store_register,
12501 made static.
12502 (the_low_target): New.
12503 * linux-sh-low.c (num_regs): Remove.
12504 (sh_num_regs): Define.
12505 (sh_regmap): Renamed from regmap, made static.
12506 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12507 made static.
12508 (sh_cannot_store_register): Renamed from cannot_store_register,
12509 made static.
12510 (the_low_target): New.
12511 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12512 (the_low_target): New.
12513
125142002-04-09 Daniel Jacobowitz <drow@mvista.com>
12515
12516 * Makefile.in: Add stamp-h target.
12517 * configure.in: Create stamp-h.
12518 * configure: Regenerated.
12519
125202002-04-09 Daniel Jacobowitz <drow@mvista.com>
12521
12522 * inferiors.c: New file.
12523 * target.c: New file.
12524 * target.h: New file.
12525 * Makefile.in: Add target.o and inferiors.o. Update
12526 dependencies.
12527 * linux-low.c (inferior_pid): New static variable,
12528 moved from server.c.
12529 (linux_create_inferior): Renamed from create_inferior.
12530 Call add_inferior. Return 0 on success instead of a PID.
12531 (linux_attach): Renamed from myattach.
12532 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12533 (linux_thread_alive): Renamed from mythread_alive.
12534 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12535 child dies.
12536 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12537 (regsets_store_inferior_registers): Correct error message.
12538 Add missing ``return 0''.
12539 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12540 (linux_store_registers): Renamed from store_inferior_registers.
12541 (linux_read_memory): Renamed from read_inferior_memory.
12542 (linux_write_memory): Renamed from write_inferior_memory.
12543 (linux_target_ops): New structure.
12544 (initialize_low): Call set_target_ops ().
12545 * remote-utils.c (unhexify): New function.
12546 (hexify): New function.
12547 (input_interrupt): Send signals to ``signal_pid''.
12548 * server.c (inferior_pid): Remove.
12549 (start_inferior): Update create_inferior call.
12550 (attach_inferior): Call add_inferior.
12551 (handle_query): New function.
12552 (main): Call handle_query for `q' packets.
12553 * server.h: Include "target.h". Remove obsolete prototypes.
12554 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12555
125562002-04-09 Daniel Jacobowitz <drow@mvista.com>
12557
12558 * Makefile.in: Add WARN_CFLAGS. Update configury
12559 dependencies.
12560 * configure.in: Check for <string.h>
12561 * configure: Regenerate.
12562 * config.in: Regenerate.
12563 * gdbreplay.c: Include needed system headers.
12564 (remote_open): Remove strchr prototype.
12565 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12566 * regcache.c (supply_register): Change buf argument to const void *.
12567 (supply_register_by_name): Likewise.
12568 (collect_register): Change buf argument to void *.
12569 (collect_register_by_name): Likewise.
12570 * regcache.h: Add missing prototypes.
12571 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12572 * server.c (handle_query): New function.
12573 (attached): New static variable, moved out of main.
12574 (main): Quiet longjmp clobber warnings.
12575 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12576 * utils.c (error): Remove NORETURN.
12577 (fatal): Likewise.
This page took 0.078917 seconds and 4 git commands to generate.